All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Enable CONFIG_VT support for S390
@ 2018-02-19 15:47 ` Farhan Ali
  0 siblings, 0 replies; 49+ messages in thread
From: Farhan Ali @ 2018-02-19 15:47 UTC (permalink / raw)
  To: linux-kernel, linux-s390, linux-fbdev
  Cc: geert, borntraeger, tomi.valkeinen, thuth, b.zolnierkie, alifm

Hi,

This series of patches add support for an additional tty
and console for a S390 KVM guest using a virtio-gpu device[1].

Patch 1 enables the "Graphics support" menu which is
needed to enable dummy console, since the VT layer needs it.
The dependency is moved to sub menu items and console
drivers now.

Patch 2 fixes few linker issues.

Patch 3 add support for enabling VT layer for S390.


ChangeLog
---------
v2 -> v3
    - Move HAS_IOMEM dependency to sub menu items and console
    drivers (patch 1)

v1 -> v2

v1 was posted under a different subject and here is a link to it:
https://www.spinics.net/lists/linux-s390/msg18175.html

   - Combine patch 1 and 2 from v1 into one patch (patch 1).
   - Additional patches to enable CONFIG_VT for S390.


Thanks
Farhan


Farhan Ali (3):
  Kconfig : Remove HAS_IOMEM dependency for Graphics support
  s390/char : Rename EBCDIC keymap variables
  s390/setup : enable display support for KVM guest

 arch/s390/kernel/setup.c      |  2 ++
 drivers/s390/char/defkeymap.c | 66 ++++++++++++++++++++++---------------------
 drivers/s390/char/keyboard.c  | 32 ++++++++++-----------
 drivers/s390/char/keyboard.h  | 11 ++++++++
 drivers/tty/Kconfig           |  2 +-
 drivers/video/Kconfig         | 21 +++++++-------
 drivers/video/console/Kconfig |  6 ++--
 7 files changed, 78 insertions(+), 62 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH v3 0/3] Enable CONFIG_VT support for S390
@ 2018-02-19 15:47 ` Farhan Ali
  0 siblings, 0 replies; 49+ messages in thread
From: Farhan Ali @ 2018-02-19 15:47 UTC (permalink / raw)
  To: linux-kernel, linux-s390, linux-fbdev
  Cc: geert, borntraeger, tomi.valkeinen, thuth, b.zolnierkie, alifm

Hi,

This series of patches add support for an additional tty
and console for a S390 KVM guest using a virtio-gpu device[1].

Patch 1 enables the "Graphics support" menu which is
needed to enable dummy console, since the VT layer needs it.
The dependency is moved to sub menu items and console
drivers now.

Patch 2 fixes few linker issues.

Patch 3 add support for enabling VT layer for S390.


ChangeLog
---------
v2 -> v3
    - Move HAS_IOMEM dependency to sub menu items and console
    drivers (patch 1)

v1 -> v2

v1 was posted under a different subject and here is a link to it:
https://www.spinics.net/lists/linux-s390/msg18175.html

   - Combine patch 1 and 2 from v1 into one patch (patch 1).
   - Additional patches to enable CONFIG_VT for S390.


Thanks
Farhan


Farhan Ali (3):
  Kconfig : Remove HAS_IOMEM dependency for Graphics support
  s390/char : Rename EBCDIC keymap variables
  s390/setup : enable display support for KVM guest

 arch/s390/kernel/setup.c      |  2 ++
 drivers/s390/char/defkeymap.c | 66 ++++++++++++++++++++++---------------------
 drivers/s390/char/keyboard.c  | 32 ++++++++++-----------
 drivers/s390/char/keyboard.h  | 11 ++++++++
 drivers/tty/Kconfig           |  2 +-
 drivers/video/Kconfig         | 21 +++++++-------
 drivers/video/console/Kconfig |  6 ++--
 7 files changed, 78 insertions(+), 62 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
  2018-02-19 15:47 ` Farhan Ali
@ 2018-02-19 15:47   ` Farhan Ali
  -1 siblings, 0 replies; 49+ messages in thread
From: Farhan Ali @ 2018-02-19 15:47 UTC (permalink / raw)
  To: linux-kernel, linux-s390, linux-fbdev
  Cc: geert, borntraeger, tomi.valkeinen, thuth, b.zolnierkie, alifm

The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
added the HAS_IOMEM dependecy for "Graphics support". This disabled the
"Graphics support" menu for S390. But if we enable VT layer for S390,
we would also need to enable the dummy console. So let's remove the
HAS_IOMEM dependency.

Move this dependency to sub menu items and console drivers that use
io memory.

Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
---
 drivers/video/Kconfig         | 21 +++++++++++----------
 drivers/video/console/Kconfig |  4 ++--
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 3c20af9..8f10915 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -3,7 +3,6 @@
 #
 
 menu "Graphics support"
-	depends on HAS_IOMEM
 
 config HAVE_FB_ATMEL
 	bool
@@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
 config SH_LCD_MIPI_DSI
 	bool
 
-source "drivers/char/agp/Kconfig"
+if HAS_IOMEM
+	source "drivers/char/agp/Kconfig"
 
-source "drivers/gpu/vga/Kconfig"
+	source "drivers/gpu/vga/Kconfig"
 
-source "drivers/gpu/host1x/Kconfig"
-source "drivers/gpu/ipu-v3/Kconfig"
+	source "drivers/gpu/host1x/Kconfig"
+	source "drivers/gpu/ipu-v3/Kconfig"
 
-source "drivers/gpu/drm/Kconfig"
+	source "drivers/gpu/drm/Kconfig"
 
-menu "Frame buffer Devices"
-source "drivers/video/fbdev/Kconfig"
-endmenu
+	menu "Frame buffer Devices"
+	source "drivers/video/fbdev/Kconfig"
+	endmenu
 
-source "drivers/video/backlight/Kconfig"
+        source "drivers/video/backlight/Kconfig"
+endif
 
 config VGASTATE
        tristate
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index 7f1f1fb..0023b16 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -85,7 +85,7 @@ config MDA_CONSOLE
 
 config SGI_NEWPORT_CONSOLE
         tristate "SGI Newport Console support"
-        depends on SGI_IP22 
+        depends on SGI_IP22 && HAS_IOMEM
         select FONT_SUPPORT
         help
           Say Y here if you want the console on the Newport aka XL graphics
@@ -153,7 +153,7 @@ config FRAMEBUFFER_CONSOLE_ROTATION
 
 config STI_CONSOLE
         bool "STI text console"
-        depends on PARISC
+        depends on PARISC && HAS_IOMEM
         select FONT_SUPPORT
         default y
         help
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
@ 2018-02-19 15:47   ` Farhan Ali
  0 siblings, 0 replies; 49+ messages in thread
From: Farhan Ali @ 2018-02-19 15:47 UTC (permalink / raw)
  To: linux-kernel, linux-s390, linux-fbdev
  Cc: geert, borntraeger, tomi.valkeinen, thuth, b.zolnierkie, alifm

The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
added the HAS_IOMEM dependecy for "Graphics support". This disabled the
"Graphics support" menu for S390. But if we enable VT layer for S390,
we would also need to enable the dummy console. So let's remove the
HAS_IOMEM dependency.

Move this dependency to sub menu items and console drivers that use
io memory.

Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
---
 drivers/video/Kconfig         | 21 +++++++++++----------
 drivers/video/console/Kconfig |  4 ++--
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 3c20af9..8f10915 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -3,7 +3,6 @@
 #
 
 menu "Graphics support"
-	depends on HAS_IOMEM
 
 config HAVE_FB_ATMEL
 	bool
@@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
 config SH_LCD_MIPI_DSI
 	bool
 
-source "drivers/char/agp/Kconfig"
+if HAS_IOMEM
+	source "drivers/char/agp/Kconfig"
 
-source "drivers/gpu/vga/Kconfig"
+	source "drivers/gpu/vga/Kconfig"
 
-source "drivers/gpu/host1x/Kconfig"
-source "drivers/gpu/ipu-v3/Kconfig"
+	source "drivers/gpu/host1x/Kconfig"
+	source "drivers/gpu/ipu-v3/Kconfig"
 
-source "drivers/gpu/drm/Kconfig"
+	source "drivers/gpu/drm/Kconfig"
 
-menu "Frame buffer Devices"
-source "drivers/video/fbdev/Kconfig"
-endmenu
+	menu "Frame buffer Devices"
+	source "drivers/video/fbdev/Kconfig"
+	endmenu
 
-source "drivers/video/backlight/Kconfig"
+        source "drivers/video/backlight/Kconfig"
+endif
 
 config VGASTATE
        tristate
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index 7f1f1fb..0023b16 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -85,7 +85,7 @@ config MDA_CONSOLE
 
 config SGI_NEWPORT_CONSOLE
         tristate "SGI Newport Console support"
-        depends on SGI_IP22 
+        depends on SGI_IP22 && HAS_IOMEM
         select FONT_SUPPORT
         help
           Say Y here if you want the console on the Newport aka XL graphics
@@ -153,7 +153,7 @@ config FRAMEBUFFER_CONSOLE_ROTATION
 
 config STI_CONSOLE
         bool "STI text console"
-        depends on PARISC
+        depends on PARISC && HAS_IOMEM
         select FONT_SUPPORT
         default y
         help
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH v3 2/3] s390/char : Rename EBCDIC keymap variables
  2018-02-19 15:47 ` Farhan Ali
@ 2018-02-19 15:47   ` Farhan Ali
  -1 siblings, 0 replies; 49+ messages in thread
From: Farhan Ali @ 2018-02-19 15:47 UTC (permalink / raw)
  To: linux-kernel, linux-s390, linux-fbdev
  Cc: geert, borntraeger, tomi.valkeinen, thuth, b.zolnierkie, alifm

The Linux Virtual Terminal (VT) layer provides a default keymap
which is compiled when VT layer is enabled. But at the same time
we are also compiling the EBCDIC keymap and this causes the linker
to complain.

So let's rename the EBCDIC keymap variables to prevent linker
conflict.

Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 drivers/s390/char/defkeymap.c | 66 ++++++++++++++++++++++---------------------
 drivers/s390/char/keyboard.c  | 32 ++++++++++-----------
 drivers/s390/char/keyboard.h  | 11 ++++++++
 3 files changed, 61 insertions(+), 48 deletions(-)

diff --git a/drivers/s390/char/defkeymap.c b/drivers/s390/char/defkeymap.c
index 98a5c45..193142c 100644
--- a/drivers/s390/char/defkeymap.c
+++ b/drivers/s390/char/defkeymap.c
@@ -9,7 +9,9 @@
 #include <linux/kbd_kern.h>
 #include <linux/kbd_diacr.h>
 
-u_short plain_map[NR_KEYS] = {
+#include "keyboard.h"
+
+u_short ebc_plain_map[NR_KEYS] = {
 	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,
 	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,
 	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,
@@ -85,12 +87,12 @@ static u_short shift_ctrl_map[NR_KEYS] = {
 	0xf20a,	0xf108,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,
 };
 
-ushort *key_maps[MAX_NR_KEYMAPS] = {
-	plain_map, shift_map, NULL, NULL,
+ushort *ebc_key_maps[MAX_NR_KEYMAPS] = {
+	ebc_plain_map, shift_map, NULL, NULL,
 	ctrl_map, shift_ctrl_map, NULL,
 };
 
-unsigned int keymap_count = 4;
+unsigned int ebc_keymap_count = 4;
 
 
 /*
@@ -99,7 +101,7 @@ unsigned int keymap_count = 4;
  * the default and allocate dynamically in chunks of 512 bytes.
  */
 
-char func_buf[] = {
+char ebc_func_buf[] = {
 	'\033', '[', '[', 'A', 0, 
 	'\033', '[', '[', 'B', 0, 
 	'\033', '[', '[', 'C', 0, 
@@ -123,37 +125,37 @@ char func_buf[] = {
 };
 
 
-char *funcbufptr = func_buf;
-int funcbufsize = sizeof(func_buf);
-int funcbufleft = 0;          /* space left */
-
-char *func_table[MAX_NR_FUNC] = {
-	func_buf + 0,
-	func_buf + 5,
-	func_buf + 10,
-	func_buf + 15,
-	func_buf + 20,
-	func_buf + 25,
-	func_buf + 31,
-	func_buf + 37,
-	func_buf + 43,
-	func_buf + 49,
-	func_buf + 55,
-	func_buf + 61,
-	func_buf + 67,
-	func_buf + 73,
-	func_buf + 79,
-	func_buf + 85,
-	func_buf + 91,
-	func_buf + 97,
-	func_buf + 103,
-	func_buf + 109,
+char *ebc_funcbufptr = ebc_func_buf;
+int ebc_funcbufsize = sizeof(ebc_func_buf);
+int ebc_funcbufleft = 0;          /* space left */
+
+char *ebc_func_table[MAX_NR_FUNC] = {
+	ebc_func_buf + 0,
+	ebc_func_buf + 5,
+	ebc_func_buf + 10,
+	ebc_func_buf + 15,
+	ebc_func_buf + 20,
+	ebc_func_buf + 25,
+	ebc_func_buf + 31,
+	ebc_func_buf + 37,
+	ebc_func_buf + 43,
+	ebc_func_buf + 49,
+	ebc_func_buf + 55,
+	ebc_func_buf + 61,
+	ebc_func_buf + 67,
+	ebc_func_buf + 73,
+	ebc_func_buf + 79,
+	ebc_func_buf + 85,
+	ebc_func_buf + 91,
+	ebc_func_buf + 97,
+	ebc_func_buf + 103,
+	ebc_func_buf + 109,
 	NULL,
 };
 
-struct kbdiacruc accent_table[MAX_DIACR] = {
+struct kbdiacruc ebc_accent_table[MAX_DIACR] = {
 	{'^', 'c', 0003},	{'^', 'd', 0004},
 	{'^', 'z', 0032},	{'^', 0012, 0000},
 };
 
-unsigned int accent_table_size = 4;
+unsigned int ebc_accent_table_size = 4;
diff --git a/drivers/s390/char/keyboard.c b/drivers/s390/char/keyboard.c
index 5b505fd..db1fbf9 100644
--- a/drivers/s390/char/keyboard.c
+++ b/drivers/s390/char/keyboard.c
@@ -54,24 +54,24 @@ kbd_alloc(void) {
 	kbd = kzalloc(sizeof(struct kbd_data), GFP_KERNEL);
 	if (!kbd)
 		goto out;
-	kbd->key_maps = kzalloc(sizeof(key_maps), GFP_KERNEL);
+	kbd->key_maps = kzalloc(sizeof(ebc_key_maps), GFP_KERNEL);
 	if (!kbd->key_maps)
 		goto out_kbd;
-	for (i = 0; i < ARRAY_SIZE(key_maps); i++) {
-		if (key_maps[i]) {
-			kbd->key_maps[i] = kmemdup(key_maps[i],
+	for (i = 0; i < ARRAY_SIZE(ebc_key_maps); i++) {
+		if (ebc_key_maps[i]) {
+			kbd->key_maps[i] = kmemdup(ebc_key_maps[i],
 						   sizeof(u_short) * NR_KEYS,
 						   GFP_KERNEL);
 			if (!kbd->key_maps[i])
 				goto out_maps;
 		}
 	}
-	kbd->func_table = kzalloc(sizeof(func_table), GFP_KERNEL);
+	kbd->func_table = kzalloc(sizeof(ebc_func_table), GFP_KERNEL);
 	if (!kbd->func_table)
 		goto out_maps;
-	for (i = 0; i < ARRAY_SIZE(func_table); i++) {
-		if (func_table[i]) {
-			kbd->func_table[i] = kstrdup(func_table[i],
+	for (i = 0; i < ARRAY_SIZE(ebc_func_table); i++) {
+		if (ebc_func_table[i]) {
+			kbd->func_table[i] = kstrdup(ebc_func_table[i],
 						     GFP_KERNEL);
 			if (!kbd->func_table[i])
 				goto out_func;
@@ -81,22 +81,22 @@ kbd_alloc(void) {
 		kzalloc(sizeof(fn_handler_fn *) * NR_FN_HANDLER, GFP_KERNEL);
 	if (!kbd->fn_handler)
 		goto out_func;
-	kbd->accent_table = kmemdup(accent_table,
+	kbd->accent_table = kmemdup(ebc_accent_table,
 				    sizeof(struct kbdiacruc) * MAX_DIACR,
 				    GFP_KERNEL);
 	if (!kbd->accent_table)
 		goto out_fn_handler;
-	kbd->accent_table_size = accent_table_size;
+	kbd->accent_table_size = ebc_accent_table_size;
 	return kbd;
 
 out_fn_handler:
 	kfree(kbd->fn_handler);
 out_func:
-	for (i = 0; i < ARRAY_SIZE(func_table); i++)
+	for (i = 0; i < ARRAY_SIZE(ebc_func_table); i++)
 		kfree(kbd->func_table[i]);
 	kfree(kbd->func_table);
 out_maps:
-	for (i = 0; i < ARRAY_SIZE(key_maps); i++)
+	for (i = 0; i < ARRAY_SIZE(ebc_key_maps); i++)
 		kfree(kbd->key_maps[i]);
 	kfree(kbd->key_maps);
 out_kbd:
@@ -112,10 +112,10 @@ kbd_free(struct kbd_data *kbd)
 
 	kfree(kbd->accent_table);
 	kfree(kbd->fn_handler);
-	for (i = 0; i < ARRAY_SIZE(func_table); i++)
+	for (i = 0; i < ARRAY_SIZE(ebc_func_table); i++)
 		kfree(kbd->func_table[i]);
 	kfree(kbd->func_table);
-	for (i = 0; i < ARRAY_SIZE(key_maps); i++)
+	for (i = 0; i < ARRAY_SIZE(ebc_key_maps); i++)
 		kfree(kbd->key_maps[i]);
 	kfree(kbd->key_maps);
 	kfree(kbd);
@@ -131,7 +131,7 @@ kbd_ascebc(struct kbd_data *kbd, unsigned char *ascebc)
 	int i, j, k;
 
 	memset(ascebc, 0x40, 256);
-	for (i = 0; i < ARRAY_SIZE(key_maps); i++) {
+	for (i = 0; i < ARRAY_SIZE(ebc_key_maps); i++) {
 		keymap = kbd->key_maps[i];
 		if (!keymap)
 			continue;
@@ -158,7 +158,7 @@ kbd_ebcasc(struct kbd_data *kbd, unsigned char *ebcasc)
 	int i, j, k;
 
 	memset(ebcasc, ' ', 256);
-	for (i = 0; i < ARRAY_SIZE(key_maps); i++) {
+	for (i = 0; i < ARRAY_SIZE(ebc_key_maps); i++) {
 		keymap = kbd->key_maps[i];
 		if (!keymap)
 			continue;
diff --git a/drivers/s390/char/keyboard.h b/drivers/s390/char/keyboard.h
index a074d97..c467589 100644
--- a/drivers/s390/char/keyboard.h
+++ b/drivers/s390/char/keyboard.h
@@ -14,6 +14,17 @@
 
 struct kbd_data;
 
+extern int ebc_funcbufsize, ebc_funcbufleft;
+extern char *ebc_func_table[MAX_NR_FUNC];
+extern char ebc_func_buf[];
+extern char *ebc_funcbufptr;
+extern unsigned int ebc_keymap_count;
+
+extern struct kbdiacruc ebc_accent_table[];
+extern unsigned int ebc_accent_table_size;
+extern unsigned short *ebc_key_maps[MAX_NR_KEYMAPS];
+extern unsigned short ebc_plain_map[NR_KEYS];
+
 typedef void (fn_handler_fn)(struct kbd_data *);
 
 /*
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH v3 2/3] s390/char : Rename EBCDIC keymap variables
@ 2018-02-19 15:47   ` Farhan Ali
  0 siblings, 0 replies; 49+ messages in thread
From: Farhan Ali @ 2018-02-19 15:47 UTC (permalink / raw)
  To: linux-kernel, linux-s390, linux-fbdev
  Cc: geert, borntraeger, tomi.valkeinen, thuth, b.zolnierkie, alifm

The Linux Virtual Terminal (VT) layer provides a default keymap
which is compiled when VT layer is enabled. But at the same time
we are also compiling the EBCDIC keymap and this causes the linker
to complain.

So let's rename the EBCDIC keymap variables to prevent linker
conflict.

Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 drivers/s390/char/defkeymap.c | 66 ++++++++++++++++++++++---------------------
 drivers/s390/char/keyboard.c  | 32 ++++++++++-----------
 drivers/s390/char/keyboard.h  | 11 ++++++++
 3 files changed, 61 insertions(+), 48 deletions(-)

diff --git a/drivers/s390/char/defkeymap.c b/drivers/s390/char/defkeymap.c
index 98a5c45..193142c 100644
--- a/drivers/s390/char/defkeymap.c
+++ b/drivers/s390/char/defkeymap.c
@@ -9,7 +9,9 @@
 #include <linux/kbd_kern.h>
 #include <linux/kbd_diacr.h>
 
-u_short plain_map[NR_KEYS] = {
+#include "keyboard.h"
+
+u_short ebc_plain_map[NR_KEYS] = {
 	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,
 	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,
 	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,	0xf000,
@@ -85,12 +87,12 @@ static u_short shift_ctrl_map[NR_KEYS] = {
 	0xf20a,	0xf108,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,
 };
 
-ushort *key_maps[MAX_NR_KEYMAPS] = {
-	plain_map, shift_map, NULL, NULL,
+ushort *ebc_key_maps[MAX_NR_KEYMAPS] = {
+	ebc_plain_map, shift_map, NULL, NULL,
 	ctrl_map, shift_ctrl_map, NULL,
 };
 
-unsigned int keymap_count = 4;
+unsigned int ebc_keymap_count = 4;
 
 
 /*
@@ -99,7 +101,7 @@ unsigned int keymap_count = 4;
  * the default and allocate dynamically in chunks of 512 bytes.
  */
 
-char func_buf[] = {
+char ebc_func_buf[] = {
 	'\033', '[', '[', 'A', 0, 
 	'\033', '[', '[', 'B', 0, 
 	'\033', '[', '[', 'C', 0, 
@@ -123,37 +125,37 @@ char func_buf[] = {
 };
 
 
-char *funcbufptr = func_buf;
-int funcbufsize = sizeof(func_buf);
-int funcbufleft = 0;          /* space left */
-
-char *func_table[MAX_NR_FUNC] = {
-	func_buf + 0,
-	func_buf + 5,
-	func_buf + 10,
-	func_buf + 15,
-	func_buf + 20,
-	func_buf + 25,
-	func_buf + 31,
-	func_buf + 37,
-	func_buf + 43,
-	func_buf + 49,
-	func_buf + 55,
-	func_buf + 61,
-	func_buf + 67,
-	func_buf + 73,
-	func_buf + 79,
-	func_buf + 85,
-	func_buf + 91,
-	func_buf + 97,
-	func_buf + 103,
-	func_buf + 109,
+char *ebc_funcbufptr = ebc_func_buf;
+int ebc_funcbufsize = sizeof(ebc_func_buf);
+int ebc_funcbufleft = 0;          /* space left */
+
+char *ebc_func_table[MAX_NR_FUNC] = {
+	ebc_func_buf + 0,
+	ebc_func_buf + 5,
+	ebc_func_buf + 10,
+	ebc_func_buf + 15,
+	ebc_func_buf + 20,
+	ebc_func_buf + 25,
+	ebc_func_buf + 31,
+	ebc_func_buf + 37,
+	ebc_func_buf + 43,
+	ebc_func_buf + 49,
+	ebc_func_buf + 55,
+	ebc_func_buf + 61,
+	ebc_func_buf + 67,
+	ebc_func_buf + 73,
+	ebc_func_buf + 79,
+	ebc_func_buf + 85,
+	ebc_func_buf + 91,
+	ebc_func_buf + 97,
+	ebc_func_buf + 103,
+	ebc_func_buf + 109,
 	NULL,
 };
 
-struct kbdiacruc accent_table[MAX_DIACR] = {
+struct kbdiacruc ebc_accent_table[MAX_DIACR] = {
 	{'^', 'c', 0003},	{'^', 'd', 0004},
 	{'^', 'z', 0032},	{'^', 0012, 0000},
 };
 
-unsigned int accent_table_size = 4;
+unsigned int ebc_accent_table_size = 4;
diff --git a/drivers/s390/char/keyboard.c b/drivers/s390/char/keyboard.c
index 5b505fd..db1fbf9 100644
--- a/drivers/s390/char/keyboard.c
+++ b/drivers/s390/char/keyboard.c
@@ -54,24 +54,24 @@ kbd_alloc(void) {
 	kbd = kzalloc(sizeof(struct kbd_data), GFP_KERNEL);
 	if (!kbd)
 		goto out;
-	kbd->key_maps = kzalloc(sizeof(key_maps), GFP_KERNEL);
+	kbd->key_maps = kzalloc(sizeof(ebc_key_maps), GFP_KERNEL);
 	if (!kbd->key_maps)
 		goto out_kbd;
-	for (i = 0; i < ARRAY_SIZE(key_maps); i++) {
-		if (key_maps[i]) {
-			kbd->key_maps[i] = kmemdup(key_maps[i],
+	for (i = 0; i < ARRAY_SIZE(ebc_key_maps); i++) {
+		if (ebc_key_maps[i]) {
+			kbd->key_maps[i] = kmemdup(ebc_key_maps[i],
 						   sizeof(u_short) * NR_KEYS,
 						   GFP_KERNEL);
 			if (!kbd->key_maps[i])
 				goto out_maps;
 		}
 	}
-	kbd->func_table = kzalloc(sizeof(func_table), GFP_KERNEL);
+	kbd->func_table = kzalloc(sizeof(ebc_func_table), GFP_KERNEL);
 	if (!kbd->func_table)
 		goto out_maps;
-	for (i = 0; i < ARRAY_SIZE(func_table); i++) {
-		if (func_table[i]) {
-			kbd->func_table[i] = kstrdup(func_table[i],
+	for (i = 0; i < ARRAY_SIZE(ebc_func_table); i++) {
+		if (ebc_func_table[i]) {
+			kbd->func_table[i] = kstrdup(ebc_func_table[i],
 						     GFP_KERNEL);
 			if (!kbd->func_table[i])
 				goto out_func;
@@ -81,22 +81,22 @@ kbd_alloc(void) {
 		kzalloc(sizeof(fn_handler_fn *) * NR_FN_HANDLER, GFP_KERNEL);
 	if (!kbd->fn_handler)
 		goto out_func;
-	kbd->accent_table = kmemdup(accent_table,
+	kbd->accent_table = kmemdup(ebc_accent_table,
 				    sizeof(struct kbdiacruc) * MAX_DIACR,
 				    GFP_KERNEL);
 	if (!kbd->accent_table)
 		goto out_fn_handler;
-	kbd->accent_table_size = accent_table_size;
+	kbd->accent_table_size = ebc_accent_table_size;
 	return kbd;
 
 out_fn_handler:
 	kfree(kbd->fn_handler);
 out_func:
-	for (i = 0; i < ARRAY_SIZE(func_table); i++)
+	for (i = 0; i < ARRAY_SIZE(ebc_func_table); i++)
 		kfree(kbd->func_table[i]);
 	kfree(kbd->func_table);
 out_maps:
-	for (i = 0; i < ARRAY_SIZE(key_maps); i++)
+	for (i = 0; i < ARRAY_SIZE(ebc_key_maps); i++)
 		kfree(kbd->key_maps[i]);
 	kfree(kbd->key_maps);
 out_kbd:
@@ -112,10 +112,10 @@ kbd_free(struct kbd_data *kbd)
 
 	kfree(kbd->accent_table);
 	kfree(kbd->fn_handler);
-	for (i = 0; i < ARRAY_SIZE(func_table); i++)
+	for (i = 0; i < ARRAY_SIZE(ebc_func_table); i++)
 		kfree(kbd->func_table[i]);
 	kfree(kbd->func_table);
-	for (i = 0; i < ARRAY_SIZE(key_maps); i++)
+	for (i = 0; i < ARRAY_SIZE(ebc_key_maps); i++)
 		kfree(kbd->key_maps[i]);
 	kfree(kbd->key_maps);
 	kfree(kbd);
@@ -131,7 +131,7 @@ kbd_ascebc(struct kbd_data *kbd, unsigned char *ascebc)
 	int i, j, k;
 
 	memset(ascebc, 0x40, 256);
-	for (i = 0; i < ARRAY_SIZE(key_maps); i++) {
+	for (i = 0; i < ARRAY_SIZE(ebc_key_maps); i++) {
 		keymap = kbd->key_maps[i];
 		if (!keymap)
 			continue;
@@ -158,7 +158,7 @@ kbd_ebcasc(struct kbd_data *kbd, unsigned char *ebcasc)
 	int i, j, k;
 
 	memset(ebcasc, ' ', 256);
-	for (i = 0; i < ARRAY_SIZE(key_maps); i++) {
+	for (i = 0; i < ARRAY_SIZE(ebc_key_maps); i++) {
 		keymap = kbd->key_maps[i];
 		if (!keymap)
 			continue;
diff --git a/drivers/s390/char/keyboard.h b/drivers/s390/char/keyboard.h
index a074d97..c467589 100644
--- a/drivers/s390/char/keyboard.h
+++ b/drivers/s390/char/keyboard.h
@@ -14,6 +14,17 @@
 
 struct kbd_data;
 
+extern int ebc_funcbufsize, ebc_funcbufleft;
+extern char *ebc_func_table[MAX_NR_FUNC];
+extern char ebc_func_buf[];
+extern char *ebc_funcbufptr;
+extern unsigned int ebc_keymap_count;
+
+extern struct kbdiacruc ebc_accent_table[];
+extern unsigned int ebc_accent_table_size;
+extern unsigned short *ebc_key_maps[MAX_NR_KEYMAPS];
+extern unsigned short ebc_plain_map[NR_KEYS];
+
 typedef void (fn_handler_fn)(struct kbd_data *);
 
 /*
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH v3 3/3] s390/setup : enable display support for KVM guest
  2018-02-19 15:47 ` Farhan Ali
@ 2018-02-19 15:47   ` Farhan Ali
  -1 siblings, 0 replies; 49+ messages in thread
From: Farhan Ali @ 2018-02-19 15:47 UTC (permalink / raw)
  To: linux-kernel, linux-s390, linux-fbdev
  Cc: geert, borntraeger, tomi.valkeinen, thuth, b.zolnierkie, alifm

The S390 architecture does not support any graphics hardware,
but with the latest support for Virtio GPU in Linux and Virtio
GPU emulation in QEMU, it's possible to enable graphics for
S390 using the Virtio GPU device.

To enable display we need to enable the Linux Virtual Terminal (VT)
layer for S390. But the VT subsystem initializes quite early
at boot so we need a dummy console driver till the Virtio GPU
driver is initialized and we can run the framebuffer console.

The framebuffer console over a Virtio GPU device can be run
in combination with the serial SCLP console (default on S390).
The SCLP console can still be accessed by management applications
(eg: via Libvirt's virsh console).

Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 arch/s390/kernel/setup.c      | 2 ++
 drivers/tty/Kconfig           | 2 +-
 drivers/video/console/Kconfig | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index a6a91f0..f98a0f3 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -221,6 +221,8 @@ static void __init conmode_default(void)
 		SET_CONSOLE_SCLP;
 #endif
 	}
+	if (IS_ENABLED(CONFIG_VT) && IS_ENABLED(CONFIG_DUMMY_CONSOLE))
+		conswitchp = &dummy_con;
 }
 
 #ifdef CONFIG_CRASH_DUMP
diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig
index b811442..5ca53fa 100644
--- a/drivers/tty/Kconfig
+++ b/drivers/tty/Kconfig
@@ -11,7 +11,7 @@ if TTY
 
 config VT
 	bool "Virtual terminal" if EXPERT
-	depends on !S390 && !UML
+	depends on !UML
 	select INPUT
 	default y
 	---help---
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index 0023b16..7aa721e 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -9,7 +9,7 @@ config VGA_CONSOLE
 	depends on !4xx && !PPC_8xx && !SPARC && !M68K && !PARISC && !FRV && \
 		!SUPERH && !BLACKFIN && !AVR32 && !MN10300 && !CRIS && \
 		(!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) && \
-		!ARM64 && !ARC && !MICROBLAZE && !OPENRISC
+		!ARM64 && !ARC && !MICROBLAZE && !OPENRISC && !S390
 	default y
 	help
 	  Saying Y here will allow you to use Linux in text mode through a
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH v3 3/3] s390/setup : enable display support for KVM guest
@ 2018-02-19 15:47   ` Farhan Ali
  0 siblings, 0 replies; 49+ messages in thread
From: Farhan Ali @ 2018-02-19 15:47 UTC (permalink / raw)
  To: linux-kernel, linux-s390, linux-fbdev
  Cc: geert, borntraeger, tomi.valkeinen, thuth, b.zolnierkie, alifm

The S390 architecture does not support any graphics hardware,
but with the latest support for Virtio GPU in Linux and Virtio
GPU emulation in QEMU, it's possible to enable graphics for
S390 using the Virtio GPU device.

To enable display we need to enable the Linux Virtual Terminal (VT)
layer for S390. But the VT subsystem initializes quite early
at boot so we need a dummy console driver till the Virtio GPU
driver is initialized and we can run the framebuffer console.

The framebuffer console over a Virtio GPU device can be run
in combination with the serial SCLP console (default on S390).
The SCLP console can still be accessed by management applications
(eg: via Libvirt's virsh console).

Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 arch/s390/kernel/setup.c      | 2 ++
 drivers/tty/Kconfig           | 2 +-
 drivers/video/console/Kconfig | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index a6a91f0..f98a0f3 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -221,6 +221,8 @@ static void __init conmode_default(void)
 		SET_CONSOLE_SCLP;
 #endif
 	}
+	if (IS_ENABLED(CONFIG_VT) && IS_ENABLED(CONFIG_DUMMY_CONSOLE))
+		conswitchp = &dummy_con;
 }
 
 #ifdef CONFIG_CRASH_DUMP
diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig
index b811442..5ca53fa 100644
--- a/drivers/tty/Kconfig
+++ b/drivers/tty/Kconfig
@@ -11,7 +11,7 @@ if TTY
 
 config VT
 	bool "Virtual terminal" if EXPERT
-	depends on !S390 && !UML
+	depends on !UML
 	select INPUT
 	default y
 	---help---
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index 0023b16..7aa721e 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -9,7 +9,7 @@ config VGA_CONSOLE
 	depends on !4xx && !PPC_8xx && !SPARC && !M68K && !PARISC && !FRV && \
 		!SUPERH && !BLACKFIN && !AVR32 && !MN10300 && !CRIS && \
 		(!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) && \
-		!ARM64 && !ARC && !MICROBLAZE && !OPENRISC
+		!ARM64 && !ARC && !MICROBLAZE && !OPENRISC && !S390
 	default y
 	help
 	  Saying Y here will allow you to use Linux in text mode through a
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
  2018-02-19 15:47   ` Farhan Ali
@ 2018-02-19 16:25     ` Thomas Huth
  -1 siblings, 0 replies; 49+ messages in thread
From: Thomas Huth @ 2018-02-19 16:25 UTC (permalink / raw)
  To: Farhan Ali, linux-kernel, linux-s390, linux-fbdev
  Cc: geert, borntraeger, tomi.valkeinen, b.zolnierkie

On 19.02.2018 16:47, Farhan Ali wrote:
> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
> "Graphics support" menu for S390. But if we enable VT layer for S390,
> we would also need to enable the dummy console. So let's remove the
> HAS_IOMEM dependency.
> 
> Move this dependency to sub menu items and console drivers that use
> io memory.
> 
> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
> ---
>  drivers/video/Kconfig         | 21 +++++++++++----------
>  drivers/video/console/Kconfig |  4 ++--
>  2 files changed, 13 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> index 3c20af9..8f10915 100644
> --- a/drivers/video/Kconfig
> +++ b/drivers/video/Kconfig
> @@ -3,7 +3,6 @@
>  #
>  
>  menu "Graphics support"
> -	depends on HAS_IOMEM
>  
>  config HAVE_FB_ATMEL
>  	bool
> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>  config SH_LCD_MIPI_DSI
>  	bool
>  
> -source "drivers/char/agp/Kconfig"
> +if HAS_IOMEM
> +	source "drivers/char/agp/Kconfig"
>  
> -source "drivers/gpu/vga/Kconfig"
> +	source "drivers/gpu/vga/Kconfig"
>  
> -source "drivers/gpu/host1x/Kconfig"
> -source "drivers/gpu/ipu-v3/Kconfig"
> +	source "drivers/gpu/host1x/Kconfig"
> +	source "drivers/gpu/ipu-v3/Kconfig"
>  
> -source "drivers/gpu/drm/Kconfig"
> +	source "drivers/gpu/drm/Kconfig"
>  
> -menu "Frame buffer Devices"
> -source "drivers/video/fbdev/Kconfig"
> -endmenu
> +	menu "Frame buffer Devices"
> +	source "drivers/video/fbdev/Kconfig"
> +	endmenu
>  
> -source "drivers/video/backlight/Kconfig"
> +        source "drivers/video/backlight/Kconfig"
> +endif
>  
>  config VGASTATE
>         tristate
> diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
> index 7f1f1fb..0023b16 100644
> --- a/drivers/video/console/Kconfig
> +++ b/drivers/video/console/Kconfig
> @@ -85,7 +85,7 @@ config MDA_CONSOLE
>  
>  config SGI_NEWPORT_CONSOLE
>          tristate "SGI Newport Console support"
> -        depends on SGI_IP22 
> +        depends on SGI_IP22 && HAS_IOMEM
>          select FONT_SUPPORT
>          help
>            Say Y here if you want the console on the Newport aka XL graphics
> @@ -153,7 +153,7 @@ config FRAMEBUFFER_CONSOLE_ROTATION
>  
>  config STI_CONSOLE
>          bool "STI text console"
> -        depends on PARISC
> +        depends on PARISC && HAS_IOMEM
>          select FONT_SUPPORT
>          default y
>          help
> 

Maybe config VGA_CONSOLE should depend on HAS_IOMEM, too? I think you
can hardly use a VGA card without IOMEM, can you?
Anyway, this approach now looks reasonable to me, so either way, feel
free to add my:

Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
@ 2018-02-19 16:25     ` Thomas Huth
  0 siblings, 0 replies; 49+ messages in thread
From: Thomas Huth @ 2018-02-19 16:25 UTC (permalink / raw)
  To: Farhan Ali, linux-kernel, linux-s390, linux-fbdev
  Cc: geert, borntraeger, tomi.valkeinen, b.zolnierkie

On 19.02.2018 16:47, Farhan Ali wrote:
> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
> "Graphics support" menu for S390. But if we enable VT layer for S390,
> we would also need to enable the dummy console. So let's remove the
> HAS_IOMEM dependency.
> 
> Move this dependency to sub menu items and console drivers that use
> io memory.
> 
> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
> ---
>  drivers/video/Kconfig         | 21 +++++++++++----------
>  drivers/video/console/Kconfig |  4 ++--
>  2 files changed, 13 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> index 3c20af9..8f10915 100644
> --- a/drivers/video/Kconfig
> +++ b/drivers/video/Kconfig
> @@ -3,7 +3,6 @@
>  #
>  
>  menu "Graphics support"
> -	depends on HAS_IOMEM
>  
>  config HAVE_FB_ATMEL
>  	bool
> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>  config SH_LCD_MIPI_DSI
>  	bool
>  
> -source "drivers/char/agp/Kconfig"
> +if HAS_IOMEM
> +	source "drivers/char/agp/Kconfig"
>  
> -source "drivers/gpu/vga/Kconfig"
> +	source "drivers/gpu/vga/Kconfig"
>  
> -source "drivers/gpu/host1x/Kconfig"
> -source "drivers/gpu/ipu-v3/Kconfig"
> +	source "drivers/gpu/host1x/Kconfig"
> +	source "drivers/gpu/ipu-v3/Kconfig"
>  
> -source "drivers/gpu/drm/Kconfig"
> +	source "drivers/gpu/drm/Kconfig"
>  
> -menu "Frame buffer Devices"
> -source "drivers/video/fbdev/Kconfig"
> -endmenu
> +	menu "Frame buffer Devices"
> +	source "drivers/video/fbdev/Kconfig"
> +	endmenu
>  
> -source "drivers/video/backlight/Kconfig"
> +        source "drivers/video/backlight/Kconfig"
> +endif
>  
>  config VGASTATE
>         tristate
> diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
> index 7f1f1fb..0023b16 100644
> --- a/drivers/video/console/Kconfig
> +++ b/drivers/video/console/Kconfig
> @@ -85,7 +85,7 @@ config MDA_CONSOLE
>  
>  config SGI_NEWPORT_CONSOLE
>          tristate "SGI Newport Console support"
> -        depends on SGI_IP22 
> +        depends on SGI_IP22 && HAS_IOMEM
>          select FONT_SUPPORT
>          help
>            Say Y here if you want the console on the Newport aka XL graphics
> @@ -153,7 +153,7 @@ config FRAMEBUFFER_CONSOLE_ROTATION
>  
>  config STI_CONSOLE
>          bool "STI text console"
> -        depends on PARISC
> +        depends on PARISC && HAS_IOMEM
>          select FONT_SUPPORT
>          default y
>          help
> 

Maybe config VGA_CONSOLE should depend on HAS_IOMEM, too? I think you
can hardly use a VGA card without IOMEM, can you?
Anyway, this approach now looks reasonable to me, so either way, feel
free to add my:

Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
  2018-02-19 16:25     ` Thomas Huth
@ 2018-02-19 16:38       ` Farhan Ali
  -1 siblings, 0 replies; 49+ messages in thread
From: Farhan Ali @ 2018-02-19 16:38 UTC (permalink / raw)
  To: Thomas Huth, linux-kernel, linux-s390, linux-fbdev
  Cc: geert, borntraeger, tomi.valkeinen, b.zolnierkie



On 02/19/2018 11:25 AM, Thomas Huth wrote:
> On 19.02.2018 16:47, Farhan Ali wrote:
>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
>> "Graphics support" menu for S390. But if we enable VT layer for S390,
>> we would also need to enable the dummy console. So let's remove the
>> HAS_IOMEM dependency.
>>
>> Move this dependency to sub menu items and console drivers that use
>> io memory.
>>
>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>> ---
>>   drivers/video/Kconfig         | 21 +++++++++++----------
>>   drivers/video/console/Kconfig |  4 ++--
>>   2 files changed, 13 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>> index 3c20af9..8f10915 100644
>> --- a/drivers/video/Kconfig
>> +++ b/drivers/video/Kconfig
>> @@ -3,7 +3,6 @@
>>   #
>>   
>>   menu "Graphics support"
>> -	depends on HAS_IOMEM
>>   
>>   config HAVE_FB_ATMEL
>>   	bool
>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>>   config SH_LCD_MIPI_DSI
>>   	bool
>>   
>> -source "drivers/char/agp/Kconfig"
>> +if HAS_IOMEM
>> +	source "drivers/char/agp/Kconfig"
>>   
>> -source "drivers/gpu/vga/Kconfig"
>> +	source "drivers/gpu/vga/Kconfig"
>>   
>> -source "drivers/gpu/host1x/Kconfig"
>> -source "drivers/gpu/ipu-v3/Kconfig"
>> +	source "drivers/gpu/host1x/Kconfig"
>> +	source "drivers/gpu/ipu-v3/Kconfig"
>>   
>> -source "drivers/gpu/drm/Kconfig"
>> +	source "drivers/gpu/drm/Kconfig"
>>   
>> -menu "Frame buffer Devices"
>> -source "drivers/video/fbdev/Kconfig"
>> -endmenu
>> +	menu "Frame buffer Devices"
>> +	source "drivers/video/fbdev/Kconfig"
>> +	endmenu
>>   
>> -source "drivers/video/backlight/Kconfig"
>> +        source "drivers/video/backlight/Kconfig"
>> +endif
>>   
>>   config VGASTATE
>>          tristate
>> diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
>> index 7f1f1fb..0023b16 100644
>> --- a/drivers/video/console/Kconfig
>> +++ b/drivers/video/console/Kconfig
>> @@ -85,7 +85,7 @@ config MDA_CONSOLE
>>   
>>   config SGI_NEWPORT_CONSOLE
>>           tristate "SGI Newport Console support"
>> -        depends on SGI_IP22
>> +        depends on SGI_IP22 && HAS_IOMEM
>>           select FONT_SUPPORT
>>           help
>>             Say Y here if you want the console on the Newport aka XL graphics
>> @@ -153,7 +153,7 @@ config FRAMEBUFFER_CONSOLE_ROTATION
>>   
>>   config STI_CONSOLE
>>           bool "STI text console"
>> -        depends on PARISC
>> +        depends on PARISC && HAS_IOMEM
>>           select FONT_SUPPORT
>>           default y
>>           help
>>
> 
> Maybe config VGA_CONSOLE should depend on HAS_IOMEM, too? I think you
> can hardly use a VGA card without IOMEM, can you?

True, you can't. And I did think of adding the dependency for VGA, but 
VGA already is fenced off by many (almost all) architectures and I 
wasn't sure if it would be necessary. But I can add it.

> Anyway, this approach now looks reasonable to me, so either way, feel
> free to add my:
> 
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> 

Thank you so much for reviewing. Appreciate your feedback :)

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
@ 2018-02-19 16:38       ` Farhan Ali
  0 siblings, 0 replies; 49+ messages in thread
From: Farhan Ali @ 2018-02-19 16:38 UTC (permalink / raw)
  To: Thomas Huth, linux-kernel, linux-s390, linux-fbdev
  Cc: geert, borntraeger, tomi.valkeinen, b.zolnierkie



On 02/19/2018 11:25 AM, Thomas Huth wrote:
> On 19.02.2018 16:47, Farhan Ali wrote:
>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
>> "Graphics support" menu for S390. But if we enable VT layer for S390,
>> we would also need to enable the dummy console. So let's remove the
>> HAS_IOMEM dependency.
>>
>> Move this dependency to sub menu items and console drivers that use
>> io memory.
>>
>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>> ---
>>   drivers/video/Kconfig         | 21 +++++++++++----------
>>   drivers/video/console/Kconfig |  4 ++--
>>   2 files changed, 13 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>> index 3c20af9..8f10915 100644
>> --- a/drivers/video/Kconfig
>> +++ b/drivers/video/Kconfig
>> @@ -3,7 +3,6 @@
>>   #
>>   
>>   menu "Graphics support"
>> -	depends on HAS_IOMEM
>>   
>>   config HAVE_FB_ATMEL
>>   	bool
>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>>   config SH_LCD_MIPI_DSI
>>   	bool
>>   
>> -source "drivers/char/agp/Kconfig"
>> +if HAS_IOMEM
>> +	source "drivers/char/agp/Kconfig"
>>   
>> -source "drivers/gpu/vga/Kconfig"
>> +	source "drivers/gpu/vga/Kconfig"
>>   
>> -source "drivers/gpu/host1x/Kconfig"
>> -source "drivers/gpu/ipu-v3/Kconfig"
>> +	source "drivers/gpu/host1x/Kconfig"
>> +	source "drivers/gpu/ipu-v3/Kconfig"
>>   
>> -source "drivers/gpu/drm/Kconfig"
>> +	source "drivers/gpu/drm/Kconfig"
>>   
>> -menu "Frame buffer Devices"
>> -source "drivers/video/fbdev/Kconfig"
>> -endmenu
>> +	menu "Frame buffer Devices"
>> +	source "drivers/video/fbdev/Kconfig"
>> +	endmenu
>>   
>> -source "drivers/video/backlight/Kconfig"
>> +        source "drivers/video/backlight/Kconfig"
>> +endif
>>   
>>   config VGASTATE
>>          tristate
>> diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
>> index 7f1f1fb..0023b16 100644
>> --- a/drivers/video/console/Kconfig
>> +++ b/drivers/video/console/Kconfig
>> @@ -85,7 +85,7 @@ config MDA_CONSOLE
>>   
>>   config SGI_NEWPORT_CONSOLE
>>           tristate "SGI Newport Console support"
>> -        depends on SGI_IP22
>> +        depends on SGI_IP22 && HAS_IOMEM
>>           select FONT_SUPPORT
>>           help
>>             Say Y here if you want the console on the Newport aka XL graphics
>> @@ -153,7 +153,7 @@ config FRAMEBUFFER_CONSOLE_ROTATION
>>   
>>   config STI_CONSOLE
>>           bool "STI text console"
>> -        depends on PARISC
>> +        depends on PARISC && HAS_IOMEM
>>           select FONT_SUPPORT
>>           default y
>>           help
>>
> 
> Maybe config VGA_CONSOLE should depend on HAS_IOMEM, too? I think you
> can hardly use a VGA card without IOMEM, can you?

True, you can't. And I did think of adding the dependency for VGA, but 
VGA already is fenced off by many (almost all) architectures and I 
wasn't sure if it would be necessary. But I can add it.

> Anyway, this approach now looks reasonable to me, so either way, feel
> free to add my:
> 
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> 

Thank you so much for reviewing. Appreciate your feedback :)

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 2/3] s390/char : Rename EBCDIC keymap variables
  2018-02-19 15:47   ` Farhan Ali
@ 2018-02-19 19:52     ` Thomas Huth
  -1 siblings, 0 replies; 49+ messages in thread
From: Thomas Huth @ 2018-02-19 19:52 UTC (permalink / raw)
  To: Farhan Ali, linux-kernel, linux-s390, linux-fbdev
  Cc: geert, borntraeger, tomi.valkeinen, b.zolnierkie

On 19.02.2018 16:47, Farhan Ali wrote:
> The Linux Virtual Terminal (VT) layer provides a default keymap
> which is compiled when VT layer is enabled. But at the same time
> we are also compiling the EBCDIC keymap and this causes the linker
> to complain.
> 
> So let's rename the EBCDIC keymap variables to prevent linker
> conflict.
> 
> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  drivers/s390/char/defkeymap.c | 66 ++++++++++++++++++++++---------------------
>  drivers/s390/char/keyboard.c  | 32 ++++++++++-----------
>  drivers/s390/char/keyboard.h  | 11 ++++++++
>  3 files changed, 61 insertions(+), 48 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 2/3] s390/char : Rename EBCDIC keymap variables
@ 2018-02-19 19:52     ` Thomas Huth
  0 siblings, 0 replies; 49+ messages in thread
From: Thomas Huth @ 2018-02-19 19:52 UTC (permalink / raw)
  To: Farhan Ali, linux-kernel, linux-s390, linux-fbdev
  Cc: geert, borntraeger, tomi.valkeinen, b.zolnierkie

On 19.02.2018 16:47, Farhan Ali wrote:
> The Linux Virtual Terminal (VT) layer provides a default keymap
> which is compiled when VT layer is enabled. But at the same time
> we are also compiling the EBCDIC keymap and this causes the linker
> to complain.
> 
> So let's rename the EBCDIC keymap variables to prevent linker
> conflict.
> 
> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  drivers/s390/char/defkeymap.c | 66 ++++++++++++++++++++++---------------------
>  drivers/s390/char/keyboard.c  | 32 ++++++++++-----------
>  drivers/s390/char/keyboard.h  | 11 ++++++++
>  3 files changed, 61 insertions(+), 48 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 3/3] s390/setup : enable display support for KVM guest
  2018-02-19 15:47   ` Farhan Ali
@ 2018-02-19 19:55     ` Thomas Huth
  -1 siblings, 0 replies; 49+ messages in thread
From: Thomas Huth @ 2018-02-19 19:55 UTC (permalink / raw)
  To: Farhan Ali, linux-kernel, linux-s390, linux-fbdev
  Cc: geert, borntraeger, tomi.valkeinen, b.zolnierkie

On 19.02.2018 16:47, Farhan Ali wrote:
> The S390 architecture does not support any graphics hardware,
> but with the latest support for Virtio GPU in Linux and Virtio
> GPU emulation in QEMU, it's possible to enable graphics for
> S390 using the Virtio GPU device.
> 
> To enable display we need to enable the Linux Virtual Terminal (VT)
> layer for S390. But the VT subsystem initializes quite early
> at boot so we need a dummy console driver till the Virtio GPU
> driver is initialized and we can run the framebuffer console.
> 
> The framebuffer console over a Virtio GPU device can be run
> in combination with the serial SCLP console (default on S390).
> The SCLP console can still be accessed by management applications
> (eg: via Libvirt's virsh console).
> 
> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  arch/s390/kernel/setup.c      | 2 ++
>  drivers/tty/Kconfig           | 2 +-
>  drivers/video/console/Kconfig | 2 +-
>  3 files changed, 4 insertions(+), 2 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 3/3] s390/setup : enable display support for KVM guest
@ 2018-02-19 19:55     ` Thomas Huth
  0 siblings, 0 replies; 49+ messages in thread
From: Thomas Huth @ 2018-02-19 19:55 UTC (permalink / raw)
  To: Farhan Ali, linux-kernel, linux-s390, linux-fbdev
  Cc: geert, borntraeger, tomi.valkeinen, b.zolnierkie

On 19.02.2018 16:47, Farhan Ali wrote:
> The S390 architecture does not support any graphics hardware,
> but with the latest support for Virtio GPU in Linux and Virtio
> GPU emulation in QEMU, it's possible to enable graphics for
> S390 using the Virtio GPU device.
> 
> To enable display we need to enable the Linux Virtual Terminal (VT)
> layer for S390. But the VT subsystem initializes quite early
> at boot so we need a dummy console driver till the Virtio GPU
> driver is initialized and we can run the framebuffer console.
> 
> The framebuffer console over a Virtio GPU device can be run
> in combination with the serial SCLP console (default on S390).
> The SCLP console can still be accessed by management applications
> (eg: via Libvirt's virsh console).
> 
> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  arch/s390/kernel/setup.c      | 2 ++
>  drivers/tty/Kconfig           | 2 +-
>  drivers/video/console/Kconfig | 2 +-
>  3 files changed, 4 insertions(+), 2 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 0/3] Enable CONFIG_VT support for S390
  2018-02-19 15:47 ` Farhan Ali
@ 2018-02-20  9:43   ` Christian Borntraeger
  -1 siblings, 0 replies; 49+ messages in thread
From: Christian Borntraeger @ 2018-02-20  9:43 UTC (permalink / raw)
  To: Farhan Ali, linux-kernel, linux-s390, linux-fbdev
  Cc: geert, tomi.valkeinen, thuth, b.zolnierkie

Added to my linux next tree to check for any fallout.


On 02/19/2018 04:47 PM, Farhan Ali wrote:
> Hi,
> 
> This series of patches add support for an additional tty
> and console for a S390 KVM guest using a virtio-gpu device[1].
> 
> Patch 1 enables the "Graphics support" menu which is
> needed to enable dummy console, since the VT layer needs it.
> The dependency is moved to sub menu items and console
> drivers now.
> 
> Patch 2 fixes few linker issues.
> 
> Patch 3 add support for enabling VT layer for S390.
> 
> 
> ChangeLog
> ---------
> v2 -> v3
>     - Move HAS_IOMEM dependency to sub menu items and console
>     drivers (patch 1)
> 
> v1 -> v2
> 
> v1 was posted under a different subject and here is a link to it:
> https://www.spinics.net/lists/linux-s390/msg18175.html
> 
>    - Combine patch 1 and 2 from v1 into one patch (patch 1).
>    - Additional patches to enable CONFIG_VT for S390.
> 
> 
> Thanks
> Farhan
> 
> 
> Farhan Ali (3):
>   Kconfig : Remove HAS_IOMEM dependency for Graphics support
>   s390/char : Rename EBCDIC keymap variables
>   s390/setup : enable display support for KVM guest
> 
>  arch/s390/kernel/setup.c      |  2 ++
>  drivers/s390/char/defkeymap.c | 66 ++++++++++++++++++++++---------------------
>  drivers/s390/char/keyboard.c  | 32 ++++++++++-----------
>  drivers/s390/char/keyboard.h  | 11 ++++++++
>  drivers/tty/Kconfig           |  2 +-
>  drivers/video/Kconfig         | 21 +++++++-------
>  drivers/video/console/Kconfig |  6 ++--
>  7 files changed, 78 insertions(+), 62 deletions(-)
> 

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 0/3] Enable CONFIG_VT support for S390
@ 2018-02-20  9:43   ` Christian Borntraeger
  0 siblings, 0 replies; 49+ messages in thread
From: Christian Borntraeger @ 2018-02-20  9:43 UTC (permalink / raw)
  To: Farhan Ali, linux-kernel, linux-s390, linux-fbdev
  Cc: geert, tomi.valkeinen, thuth, b.zolnierkie

Added to my linux next tree to check for any fallout.


On 02/19/2018 04:47 PM, Farhan Ali wrote:
> Hi,
> 
> This series of patches add support for an additional tty
> and console for a S390 KVM guest using a virtio-gpu device[1].
> 
> Patch 1 enables the "Graphics support" menu which is
> needed to enable dummy console, since the VT layer needs it.
> The dependency is moved to sub menu items and console
> drivers now.
> 
> Patch 2 fixes few linker issues.
> 
> Patch 3 add support for enabling VT layer for S390.
> 
> 
> ChangeLog
> ---------
> v2 -> v3
>     - Move HAS_IOMEM dependency to sub menu items and console
>     drivers (patch 1)
> 
> v1 -> v2
> 
> v1 was posted under a different subject and here is a link to it:
> https://www.spinics.net/lists/linux-s390/msg18175.html
> 
>    - Combine patch 1 and 2 from v1 into one patch (patch 1).
>    - Additional patches to enable CONFIG_VT for S390.
> 
> 
> Thanks
> Farhan
> 
> 
> Farhan Ali (3):
>   Kconfig : Remove HAS_IOMEM dependency for Graphics support
>   s390/char : Rename EBCDIC keymap variables
>   s390/setup : enable display support for KVM guest
> 
>  arch/s390/kernel/setup.c      |  2 ++
>  drivers/s390/char/defkeymap.c | 66 ++++++++++++++++++++++---------------------
>  drivers/s390/char/keyboard.c  | 32 ++++++++++-----------
>  drivers/s390/char/keyboard.h  | 11 ++++++++
>  drivers/tty/Kconfig           |  2 +-
>  drivers/video/Kconfig         | 21 +++++++-------
>  drivers/video/console/Kconfig |  6 ++--
>  7 files changed, 78 insertions(+), 62 deletions(-)
> 

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 0/3] Enable CONFIG_VT support for S390
  2018-02-20  9:43   ` Christian Borntraeger
  (?)
@ 2018-02-20 13:45   ` Farhan Ali
  -1 siblings, 0 replies; 49+ messages in thread
From: Farhan Ali @ 2018-02-20 13:45 UTC (permalink / raw)
  To: Christian Borntraeger, linux-kernel, linux-s390, linux-fbdev
  Cc: geert, tomi.valkeinen, thuth, b.zolnierkie



On 02/20/2018 04:43 AM, Christian Borntraeger wrote:
> Added to my linux next tree to check for any fallout.
> 
Thanks!

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
  2018-02-19 15:47   ` Farhan Ali
@ 2018-02-21  8:44     ` Christian Borntraeger
  -1 siblings, 0 replies; 49+ messages in thread
From: Christian Borntraeger @ 2018-02-21  8:44 UTC (permalink / raw)
  To: Farhan Ali, linux-kernel, linux-s390, linux-fbdev
  Cc: geert, tomi.valkeinen, thuth, b.zolnierkie



On 02/19/2018 04:47 PM, Farhan Ali wrote:
> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
> "Graphics support" menu for S390. But if we enable VT layer for S390,
> we would also need to enable the dummy console. So let's remove the
> HAS_IOMEM dependency.
> 
> Move this dependency to sub menu items and console drivers that use
> io memory.
> 
> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>

This patch is part of todays linux-next and so far no fallout was reported.
Shall I take that patch via the s390kvm tree (then I would like to have
an ack. Bart?) or is anybody on cc willing to take this?

Christian



> ---
>  drivers/video/Kconfig         | 21 +++++++++++----------
>  drivers/video/console/Kconfig |  4 ++--
>  2 files changed, 13 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> index 3c20af9..8f10915 100644
> --- a/drivers/video/Kconfig
> +++ b/drivers/video/Kconfig
> @@ -3,7 +3,6 @@
>  #
> 
>  menu "Graphics support"
> -	depends on HAS_IOMEM
> 
>  config HAVE_FB_ATMEL
>  	bool
> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>  config SH_LCD_MIPI_DSI
>  	bool
> 
> -source "drivers/char/agp/Kconfig"
> +if HAS_IOMEM
> +	source "drivers/char/agp/Kconfig"
> 
> -source "drivers/gpu/vga/Kconfig"
> +	source "drivers/gpu/vga/Kconfig"
> 
> -source "drivers/gpu/host1x/Kconfig"
> -source "drivers/gpu/ipu-v3/Kconfig"
> +	source "drivers/gpu/host1x/Kconfig"
> +	source "drivers/gpu/ipu-v3/Kconfig"
> 
> -source "drivers/gpu/drm/Kconfig"
> +	source "drivers/gpu/drm/Kconfig"
> 
> -menu "Frame buffer Devices"
> -source "drivers/video/fbdev/Kconfig"
> -endmenu
> +	menu "Frame buffer Devices"
> +	source "drivers/video/fbdev/Kconfig"
> +	endmenu
> 
> -source "drivers/video/backlight/Kconfig"
> +        source "drivers/video/backlight/Kconfig"
> +endif
> 
>  config VGASTATE
>         tristate
> diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
> index 7f1f1fb..0023b16 100644
> --- a/drivers/video/console/Kconfig
> +++ b/drivers/video/console/Kconfig
> @@ -85,7 +85,7 @@ config MDA_CONSOLE
> 
>  config SGI_NEWPORT_CONSOLE
>          tristate "SGI Newport Console support"
> -        depends on SGI_IP22 
> +        depends on SGI_IP22 && HAS_IOMEM
>          select FONT_SUPPORT
>          help
>            Say Y here if you want the console on the Newport aka XL graphics
> @@ -153,7 +153,7 @@ config FRAMEBUFFER_CONSOLE_ROTATION
> 
>  config STI_CONSOLE
>          bool "STI text console"
> -        depends on PARISC
> +        depends on PARISC && HAS_IOMEM
>          select FONT_SUPPORT
>          default y
>          help
> 

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
@ 2018-02-21  8:44     ` Christian Borntraeger
  0 siblings, 0 replies; 49+ messages in thread
From: Christian Borntraeger @ 2018-02-21  8:44 UTC (permalink / raw)
  To: Farhan Ali, linux-kernel, linux-s390, linux-fbdev
  Cc: geert, tomi.valkeinen, thuth, b.zolnierkie



On 02/19/2018 04:47 PM, Farhan Ali wrote:
> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
> "Graphics support" menu for S390. But if we enable VT layer for S390,
> we would also need to enable the dummy console. So let's remove the
> HAS_IOMEM dependency.
> 
> Move this dependency to sub menu items and console drivers that use
> io memory.
> 
> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>

This patch is part of todays linux-next and so far no fallout was reported.
Shall I take that patch via the s390kvm tree (then I would like to have
an ack. Bart?) or is anybody on cc willing to take this?

Christian



> ---
>  drivers/video/Kconfig         | 21 +++++++++++----------
>  drivers/video/console/Kconfig |  4 ++--
>  2 files changed, 13 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> index 3c20af9..8f10915 100644
> --- a/drivers/video/Kconfig
> +++ b/drivers/video/Kconfig
> @@ -3,7 +3,6 @@
>  #
> 
>  menu "Graphics support"
> -	depends on HAS_IOMEM
> 
>  config HAVE_FB_ATMEL
>  	bool
> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>  config SH_LCD_MIPI_DSI
>  	bool
> 
> -source "drivers/char/agp/Kconfig"
> +if HAS_IOMEM
> +	source "drivers/char/agp/Kconfig"
> 
> -source "drivers/gpu/vga/Kconfig"
> +	source "drivers/gpu/vga/Kconfig"
> 
> -source "drivers/gpu/host1x/Kconfig"
> -source "drivers/gpu/ipu-v3/Kconfig"
> +	source "drivers/gpu/host1x/Kconfig"
> +	source "drivers/gpu/ipu-v3/Kconfig"
> 
> -source "drivers/gpu/drm/Kconfig"
> +	source "drivers/gpu/drm/Kconfig"
> 
> -menu "Frame buffer Devices"
> -source "drivers/video/fbdev/Kconfig"
> -endmenu
> +	menu "Frame buffer Devices"
> +	source "drivers/video/fbdev/Kconfig"
> +	endmenu
> 
> -source "drivers/video/backlight/Kconfig"
> +        source "drivers/video/backlight/Kconfig"
> +endif
> 
>  config VGASTATE
>         tristate
> diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
> index 7f1f1fb..0023b16 100644
> --- a/drivers/video/console/Kconfig
> +++ b/drivers/video/console/Kconfig
> @@ -85,7 +85,7 @@ config MDA_CONSOLE
> 
>  config SGI_NEWPORT_CONSOLE
>          tristate "SGI Newport Console support"
> -        depends on SGI_IP22 
> +        depends on SGI_IP22 && HAS_IOMEM
>          select FONT_SUPPORT
>          help
>            Say Y here if you want the console on the Newport aka XL graphics
> @@ -153,7 +153,7 @@ config FRAMEBUFFER_CONSOLE_ROTATION
> 
>  config STI_CONSOLE
>          bool "STI text console"
> -        depends on PARISC
> +        depends on PARISC && HAS_IOMEM
>          select FONT_SUPPORT
>          default y
>          help
> 

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
  2018-02-19 16:38       ` Farhan Ali
@ 2018-02-21 10:05         ` Christian Borntraeger
  -1 siblings, 0 replies; 49+ messages in thread
From: Christian Borntraeger @ 2018-02-21 10:05 UTC (permalink / raw)
  To: Farhan Ali, Thomas Huth, linux-kernel, linux-s390, linux-fbdev
  Cc: geert, tomi.valkeinen, b.zolnierkie



On 02/19/2018 05:38 PM, Farhan Ali wrote:
> 
> 
> On 02/19/2018 11:25 AM, Thomas Huth wrote:
>> On 19.02.2018 16:47, Farhan Ali wrote:
>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
>>> we would also need to enable the dummy console. So let's remove the
>>> HAS_IOMEM dependency.
>>>
>>> Move this dependency to sub menu items and console drivers that use
>>> io memory.
>>>
>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>>> ---
>>>   drivers/video/Kconfig         | 21 +++++++++++----------
>>>   drivers/video/console/Kconfig |  4 ++--
>>>   2 files changed, 13 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>>> index 3c20af9..8f10915 100644
>>> --- a/drivers/video/Kconfig
>>> +++ b/drivers/video/Kconfig
>>> @@ -3,7 +3,6 @@
>>>   #
>>>     menu "Graphics support"
>>> -    depends on HAS_IOMEM
>>>     config HAVE_FB_ATMEL
>>>       bool
>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>>>   config SH_LCD_MIPI_DSI
>>>       bool
>>>   -source "drivers/char/agp/Kconfig"
>>> +if HAS_IOMEM
>>> +    source "drivers/char/agp/Kconfig"
>>>   -source "drivers/gpu/vga/Kconfig"
>>> +    source "drivers/gpu/vga/Kconfig"
>>>   -source "drivers/gpu/host1x/Kconfig"
>>> -source "drivers/gpu/ipu-v3/Kconfig"
>>> +    source "drivers/gpu/host1x/Kconfig"
>>> +    source "drivers/gpu/ipu-v3/Kconfig"
>>>   -source "drivers/gpu/drm/Kconfig"
>>> +    source "drivers/gpu/drm/Kconfig"


Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
work.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
@ 2018-02-21 10:05         ` Christian Borntraeger
  0 siblings, 0 replies; 49+ messages in thread
From: Christian Borntraeger @ 2018-02-21 10:05 UTC (permalink / raw)
  To: Farhan Ali, Thomas Huth, linux-kernel, linux-s390, linux-fbdev
  Cc: geert, tomi.valkeinen, b.zolnierkie



On 02/19/2018 05:38 PM, Farhan Ali wrote:
> 
> 
> On 02/19/2018 11:25 AM, Thomas Huth wrote:
>> On 19.02.2018 16:47, Farhan Ali wrote:
>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
>>> we would also need to enable the dummy console. So let's remove the
>>> HAS_IOMEM dependency.
>>>
>>> Move this dependency to sub menu items and console drivers that use
>>> io memory.
>>>
>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>>> ---
>>>   drivers/video/Kconfig         | 21 +++++++++++----------
>>>   drivers/video/console/Kconfig |  4 ++--
>>>   2 files changed, 13 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>>> index 3c20af9..8f10915 100644
>>> --- a/drivers/video/Kconfig
>>> +++ b/drivers/video/Kconfig
>>> @@ -3,7 +3,6 @@
>>>   #
>>>     menu "Graphics support"
>>> -    depends on HAS_IOMEM
>>>     config HAVE_FB_ATMEL
>>>       bool
>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>>>   config SH_LCD_MIPI_DSI
>>>       bool
>>>   -source "drivers/char/agp/Kconfig"
>>> +if HAS_IOMEM
>>> +    source "drivers/char/agp/Kconfig"
>>>   -source "drivers/gpu/vga/Kconfig"
>>> +    source "drivers/gpu/vga/Kconfig"
>>>   -source "drivers/gpu/host1x/Kconfig"
>>> -source "drivers/gpu/ipu-v3/Kconfig"
>>> +    source "drivers/gpu/host1x/Kconfig"
>>> +    source "drivers/gpu/ipu-v3/Kconfig"
>>>   -source "drivers/gpu/drm/Kconfig"
>>> +    source "drivers/gpu/drm/Kconfig"


Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
work.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
  2018-02-21 10:05         ` Christian Borntraeger
@ 2018-02-21 10:22           ` Christian Borntraeger
  -1 siblings, 0 replies; 49+ messages in thread
From: Christian Borntraeger @ 2018-02-21 10:22 UTC (permalink / raw)
  To: Farhan Ali, Thomas Huth, linux-kernel, linux-s390, linux-fbdev
  Cc: geert, tomi.valkeinen, b.zolnierkie



On 02/21/2018 11:05 AM, Christian Borntraeger wrote:
> 
> 
> On 02/19/2018 05:38 PM, Farhan Ali wrote:
>>
>>
>> On 02/19/2018 11:25 AM, Thomas Huth wrote:
>>> On 19.02.2018 16:47, Farhan Ali wrote:
>>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
>>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
>>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
>>>> we would also need to enable the dummy console. So let's remove the
>>>> HAS_IOMEM dependency.
>>>>
>>>> Move this dependency to sub menu items and console drivers that use
>>>> io memory.
>>>>
>>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>>>> ---
>>>>   drivers/video/Kconfig         | 21 +++++++++++----------
>>>>   drivers/video/console/Kconfig |  4 ++--
>>>>   2 files changed, 13 insertions(+), 12 deletions(-)
>>>>
>>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>>>> index 3c20af9..8f10915 100644
>>>> --- a/drivers/video/Kconfig
>>>> +++ b/drivers/video/Kconfig
>>>> @@ -3,7 +3,6 @@
>>>>   #
>>>>     menu "Graphics support"
>>>> -    depends on HAS_IOMEM
>>>>     config HAVE_FB_ATMEL
>>>>       bool
>>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>>>>   config SH_LCD_MIPI_DSI
>>>>       bool
>>>>   -source "drivers/char/agp/Kconfig"
>>>> +if HAS_IOMEM
>>>> +    source "drivers/char/agp/Kconfig"
>>>>   -source "drivers/gpu/vga/Kconfig"
>>>> +    source "drivers/gpu/vga/Kconfig"
>>>>   -source "drivers/gpu/host1x/Kconfig"
>>>> -source "drivers/gpu/ipu-v3/Kconfig"
>>>> +    source "drivers/gpu/host1x/Kconfig"
>>>> +    source "drivers/gpu/ipu-v3/Kconfig"
>>>>   -source "drivers/gpu/drm/Kconfig"
>>>> +    source "drivers/gpu/drm/Kconfig"
> 
> 
> Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
> work.
> 
Sorry my fault. I had CONFIG_PCI disabled.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
@ 2018-02-21 10:22           ` Christian Borntraeger
  0 siblings, 0 replies; 49+ messages in thread
From: Christian Borntraeger @ 2018-02-21 10:22 UTC (permalink / raw)
  To: Farhan Ali, Thomas Huth, linux-kernel, linux-s390, linux-fbdev
  Cc: geert, tomi.valkeinen, b.zolnierkie



On 02/21/2018 11:05 AM, Christian Borntraeger wrote:
> 
> 
> On 02/19/2018 05:38 PM, Farhan Ali wrote:
>>
>>
>> On 02/19/2018 11:25 AM, Thomas Huth wrote:
>>> On 19.02.2018 16:47, Farhan Ali wrote:
>>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
>>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
>>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
>>>> we would also need to enable the dummy console. So let's remove the
>>>> HAS_IOMEM dependency.
>>>>
>>>> Move this dependency to sub menu items and console drivers that use
>>>> io memory.
>>>>
>>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>>>> ---
>>>>   drivers/video/Kconfig         | 21 +++++++++++----------
>>>>   drivers/video/console/Kconfig |  4 ++--
>>>>   2 files changed, 13 insertions(+), 12 deletions(-)
>>>>
>>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>>>> index 3c20af9..8f10915 100644
>>>> --- a/drivers/video/Kconfig
>>>> +++ b/drivers/video/Kconfig
>>>> @@ -3,7 +3,6 @@
>>>>   #
>>>>     menu "Graphics support"
>>>> -    depends on HAS_IOMEM
>>>>     config HAVE_FB_ATMEL
>>>>       bool
>>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>>>>   config SH_LCD_MIPI_DSI
>>>>       bool
>>>>   -source "drivers/char/agp/Kconfig"
>>>> +if HAS_IOMEM
>>>> +    source "drivers/char/agp/Kconfig"
>>>>   -source "drivers/gpu/vga/Kconfig"
>>>> +    source "drivers/gpu/vga/Kconfig"
>>>>   -source "drivers/gpu/host1x/Kconfig"
>>>> -source "drivers/gpu/ipu-v3/Kconfig"
>>>> +    source "drivers/gpu/host1x/Kconfig"
>>>> +    source "drivers/gpu/ipu-v3/Kconfig"
>>>>   -source "drivers/gpu/drm/Kconfig"
>>>> +    source "drivers/gpu/drm/Kconfig"
> 
> 
> Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
> work.
> 
Sorry my fault. I had CONFIG_PCI disabled.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
  2018-02-21 10:22           ` Christian Borntraeger
@ 2018-02-21 10:32             ` Cornelia Huck
  -1 siblings, 0 replies; 49+ messages in thread
From: Cornelia Huck @ 2018-02-21 10:32 UTC (permalink / raw)
  To: Christian Borntraeger
  Cc: Farhan Ali, Thomas Huth, linux-kernel, linux-s390, linux-fbdev,
	geert, tomi.valkeinen, b.zolnierkie

On Wed, 21 Feb 2018 11:22:38 +0100
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> On 02/21/2018 11:05 AM, Christian Borntraeger wrote:
> > 
> > 
> > On 02/19/2018 05:38 PM, Farhan Ali wrote:  
> >>
> >>
> >> On 02/19/2018 11:25 AM, Thomas Huth wrote:  
> >>> On 19.02.2018 16:47, Farhan Ali wrote:  
> >>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
> >>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
> >>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
> >>>> we would also need to enable the dummy console. So let's remove the
> >>>> HAS_IOMEM dependency.
> >>>>
> >>>> Move this dependency to sub menu items and console drivers that use
> >>>> io memory.
> >>>>
> >>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
> >>>> ---
> >>>>   drivers/video/Kconfig         | 21 +++++++++++----------
> >>>>   drivers/video/console/Kconfig |  4 ++--
> >>>>   2 files changed, 13 insertions(+), 12 deletions(-)
> >>>>
> >>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> >>>> index 3c20af9..8f10915 100644
> >>>> --- a/drivers/video/Kconfig
> >>>> +++ b/drivers/video/Kconfig
> >>>> @@ -3,7 +3,6 @@
> >>>>   #
> >>>>     menu "Graphics support"
> >>>> -    depends on HAS_IOMEM
> >>>>     config HAVE_FB_ATMEL
> >>>>       bool
> >>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
> >>>>   config SH_LCD_MIPI_DSI
> >>>>       bool
> >>>>   -source "drivers/char/agp/Kconfig"
> >>>> +if HAS_IOMEM
> >>>> +    source "drivers/char/agp/Kconfig"
> >>>>   -source "drivers/gpu/vga/Kconfig"
> >>>> +    source "drivers/gpu/vga/Kconfig"
> >>>>   -source "drivers/gpu/host1x/Kconfig"
> >>>> -source "drivers/gpu/ipu-v3/Kconfig"
> >>>> +    source "drivers/gpu/host1x/Kconfig"
> >>>> +    source "drivers/gpu/ipu-v3/Kconfig"
> >>>>   -source "drivers/gpu/drm/Kconfig"
> >>>> +    source "drivers/gpu/drm/Kconfig"  
> > 
> > 
> > Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
> > work.
> >   
> Sorry my fault. I had CONFIG_PCI disabled.

That smells like the s390 HAS_IOMEM stuff needs more work -- I guess
that you want to enable a ccw virtio-gpu device, not a pci one, right?

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
@ 2018-02-21 10:32             ` Cornelia Huck
  0 siblings, 0 replies; 49+ messages in thread
From: Cornelia Huck @ 2018-02-21 10:32 UTC (permalink / raw)
  To: Christian Borntraeger
  Cc: Farhan Ali, Thomas Huth, linux-kernel, linux-s390, linux-fbdev,
	geert, tomi.valkeinen, b.zolnierkie

On Wed, 21 Feb 2018 11:22:38 +0100
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> On 02/21/2018 11:05 AM, Christian Borntraeger wrote:
> > 
> > 
> > On 02/19/2018 05:38 PM, Farhan Ali wrote:  
> >>
> >>
> >> On 02/19/2018 11:25 AM, Thomas Huth wrote:  
> >>> On 19.02.2018 16:47, Farhan Ali wrote:  
> >>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
> >>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
> >>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
> >>>> we would also need to enable the dummy console. So let's remove the
> >>>> HAS_IOMEM dependency.
> >>>>
> >>>> Move this dependency to sub menu items and console drivers that use
> >>>> io memory.
> >>>>
> >>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
> >>>> ---
> >>>>   drivers/video/Kconfig         | 21 +++++++++++----------
> >>>>   drivers/video/console/Kconfig |  4 ++--
> >>>>   2 files changed, 13 insertions(+), 12 deletions(-)
> >>>>
> >>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> >>>> index 3c20af9..8f10915 100644
> >>>> --- a/drivers/video/Kconfig
> >>>> +++ b/drivers/video/Kconfig
> >>>> @@ -3,7 +3,6 @@
> >>>>   #
> >>>>     menu "Graphics support"
> >>>> -    depends on HAS_IOMEM
> >>>>     config HAVE_FB_ATMEL
> >>>>       bool
> >>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
> >>>>   config SH_LCD_MIPI_DSI
> >>>>       bool
> >>>>   -source "drivers/char/agp/Kconfig"
> >>>> +if HAS_IOMEM
> >>>> +    source "drivers/char/agp/Kconfig"
> >>>>   -source "drivers/gpu/vga/Kconfig"
> >>>> +    source "drivers/gpu/vga/Kconfig"
> >>>>   -source "drivers/gpu/host1x/Kconfig"
> >>>> -source "drivers/gpu/ipu-v3/Kconfig"
> >>>> +    source "drivers/gpu/host1x/Kconfig"
> >>>> +    source "drivers/gpu/ipu-v3/Kconfig"
> >>>>   -source "drivers/gpu/drm/Kconfig"
> >>>> +    source "drivers/gpu/drm/Kconfig"  
> > 
> > 
> > Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
> > work.
> >   
> Sorry my fault. I had CONFIG_PCI disabled.

That smells like the s390 HAS_IOMEM stuff needs more work -- I guess
that you want to enable a ccw virtio-gpu device, not a pci one, right?

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
  2018-02-21 10:32             ` Cornelia Huck
@ 2018-02-21 11:09               ` Christian Borntraeger
  -1 siblings, 0 replies; 49+ messages in thread
From: Christian Borntraeger @ 2018-02-21 11:09 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: Farhan Ali, Thomas Huth, linux-kernel, linux-s390, linux-fbdev,
	geert, tomi.valkeinen, b.zolnierkie



On 02/21/2018 11:32 AM, Cornelia Huck wrote:
> On Wed, 21 Feb 2018 11:22:38 +0100
> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> 
>> On 02/21/2018 11:05 AM, Christian Borntraeger wrote:
>>>
>>>
>>> On 02/19/2018 05:38 PM, Farhan Ali wrote:  
>>>>
>>>>
>>>> On 02/19/2018 11:25 AM, Thomas Huth wrote:  
>>>>> On 19.02.2018 16:47, Farhan Ali wrote:  
>>>>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
>>>>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
>>>>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
>>>>>> we would also need to enable the dummy console. So let's remove the
>>>>>> HAS_IOMEM dependency.
>>>>>>
>>>>>> Move this dependency to sub menu items and console drivers that use
>>>>>> io memory.
>>>>>>
>>>>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>>>>>> ---
>>>>>>   drivers/video/Kconfig         | 21 +++++++++++----------
>>>>>>   drivers/video/console/Kconfig |  4 ++--
>>>>>>   2 files changed, 13 insertions(+), 12 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>>>>>> index 3c20af9..8f10915 100644
>>>>>> --- a/drivers/video/Kconfig
>>>>>> +++ b/drivers/video/Kconfig
>>>>>> @@ -3,7 +3,6 @@
>>>>>>   #
>>>>>>     menu "Graphics support"
>>>>>> -    depends on HAS_IOMEM
>>>>>>     config HAVE_FB_ATMEL
>>>>>>       bool
>>>>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>>>>>>   config SH_LCD_MIPI_DSI
>>>>>>       bool
>>>>>>   -source "drivers/char/agp/Kconfig"
>>>>>> +if HAS_IOMEM
>>>>>> +    source "drivers/char/agp/Kconfig"
>>>>>>   -source "drivers/gpu/vga/Kconfig"
>>>>>> +    source "drivers/gpu/vga/Kconfig"
>>>>>>   -source "drivers/gpu/host1x/Kconfig"
>>>>>> -source "drivers/gpu/ipu-v3/Kconfig"
>>>>>> +    source "drivers/gpu/host1x/Kconfig"
>>>>>> +    source "drivers/gpu/ipu-v3/Kconfig"
>>>>>>   -source "drivers/gpu/drm/Kconfig"
>>>>>> +    source "drivers/gpu/drm/Kconfig"  
>>>
>>>
>>> Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
>>> work.
>>>   
>> Sorry my fault. I had CONFIG_PCI disabled.
> 
> That smells like the s390 HAS_IOMEM stuff needs more work -- I guess
> that you want to enable a ccw virtio-gpu device, not a pci one, right?

It is a ccw virtio-gpu. But s390 has no IOMEM without CONFIG_PCI, so you cannot
select VIRTIO_GPU, which needs DRM, which need IOMEM.
In essence this patch is good enough to go forward and to build a sane .config
(Usually any s390 distro kernel should enable CONFIG_PCI).

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
@ 2018-02-21 11:09               ` Christian Borntraeger
  0 siblings, 0 replies; 49+ messages in thread
From: Christian Borntraeger @ 2018-02-21 11:09 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: Farhan Ali, Thomas Huth, linux-kernel, linux-s390, linux-fbdev,
	geert, tomi.valkeinen, b.zolnierkie



On 02/21/2018 11:32 AM, Cornelia Huck wrote:
> On Wed, 21 Feb 2018 11:22:38 +0100
> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> 
>> On 02/21/2018 11:05 AM, Christian Borntraeger wrote:
>>>
>>>
>>> On 02/19/2018 05:38 PM, Farhan Ali wrote:  
>>>>
>>>>
>>>> On 02/19/2018 11:25 AM, Thomas Huth wrote:  
>>>>> On 19.02.2018 16:47, Farhan Ali wrote:  
>>>>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
>>>>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
>>>>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
>>>>>> we would also need to enable the dummy console. So let's remove the
>>>>>> HAS_IOMEM dependency.
>>>>>>
>>>>>> Move this dependency to sub menu items and console drivers that use
>>>>>> io memory.
>>>>>>
>>>>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>>>>>> ---
>>>>>>   drivers/video/Kconfig         | 21 +++++++++++----------
>>>>>>   drivers/video/console/Kconfig |  4 ++--
>>>>>>   2 files changed, 13 insertions(+), 12 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>>>>>> index 3c20af9..8f10915 100644
>>>>>> --- a/drivers/video/Kconfig
>>>>>> +++ b/drivers/video/Kconfig
>>>>>> @@ -3,7 +3,6 @@
>>>>>>   #
>>>>>>     menu "Graphics support"
>>>>>> -    depends on HAS_IOMEM
>>>>>>     config HAVE_FB_ATMEL
>>>>>>       bool
>>>>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>>>>>>   config SH_LCD_MIPI_DSI
>>>>>>       bool
>>>>>>   -source "drivers/char/agp/Kconfig"
>>>>>> +if HAS_IOMEM
>>>>>> +    source "drivers/char/agp/Kconfig"
>>>>>>   -source "drivers/gpu/vga/Kconfig"
>>>>>> +    source "drivers/gpu/vga/Kconfig"
>>>>>>   -source "drivers/gpu/host1x/Kconfig"
>>>>>> -source "drivers/gpu/ipu-v3/Kconfig"
>>>>>> +    source "drivers/gpu/host1x/Kconfig"
>>>>>> +    source "drivers/gpu/ipu-v3/Kconfig"
>>>>>>   -source "drivers/gpu/drm/Kconfig"
>>>>>> +    source "drivers/gpu/drm/Kconfig"  
>>>
>>>
>>> Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
>>> work.
>>>   
>> Sorry my fault. I had CONFIG_PCI disabled.
> 
> That smells like the s390 HAS_IOMEM stuff needs more work -- I guess
> that you want to enable a ccw virtio-gpu device, not a pci one, right?

It is a ccw virtio-gpu. But s390 has no IOMEM without CONFIG_PCI, so you cannot
select VIRTIO_GPU, which needs DRM, which need IOMEM.
In essence this patch is good enough to go forward and to build a sane .config
(Usually any s390 distro kernel should enable CONFIG_PCI).

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
  2018-02-21 11:09               ` Christian Borntraeger
@ 2018-02-21 11:14                 ` Thomas Huth
  -1 siblings, 0 replies; 49+ messages in thread
From: Thomas Huth @ 2018-02-21 11:14 UTC (permalink / raw)
  To: Christian Borntraeger, Cornelia Huck
  Cc: Farhan Ali, linux-kernel, linux-s390, linux-fbdev, geert,
	tomi.valkeinen, b.zolnierkie

On 21.02.2018 12:09, Christian Borntraeger wrote:
> 
> 
> On 02/21/2018 11:32 AM, Cornelia Huck wrote:
>> On Wed, 21 Feb 2018 11:22:38 +0100
>> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
>>
>>> On 02/21/2018 11:05 AM, Christian Borntraeger wrote:
>>>>
>>>>
>>>> On 02/19/2018 05:38 PM, Farhan Ali wrote:  
>>>>>
>>>>>
>>>>> On 02/19/2018 11:25 AM, Thomas Huth wrote:  
>>>>>> On 19.02.2018 16:47, Farhan Ali wrote:  
>>>>>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
>>>>>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
>>>>>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
>>>>>>> we would also need to enable the dummy console. So let's remove the
>>>>>>> HAS_IOMEM dependency.
>>>>>>>
>>>>>>> Move this dependency to sub menu items and console drivers that use
>>>>>>> io memory.
>>>>>>>
>>>>>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>>>>>>> ---
>>>>>>>   drivers/video/Kconfig         | 21 +++++++++++----------
>>>>>>>   drivers/video/console/Kconfig |  4 ++--
>>>>>>>   2 files changed, 13 insertions(+), 12 deletions(-)
>>>>>>>
>>>>>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>>>>>>> index 3c20af9..8f10915 100644
>>>>>>> --- a/drivers/video/Kconfig
>>>>>>> +++ b/drivers/video/Kconfig
>>>>>>> @@ -3,7 +3,6 @@
>>>>>>>   #
>>>>>>>     menu "Graphics support"
>>>>>>> -    depends on HAS_IOMEM
>>>>>>>     config HAVE_FB_ATMEL
>>>>>>>       bool
>>>>>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>>>>>>>   config SH_LCD_MIPI_DSI
>>>>>>>       bool
>>>>>>>   -source "drivers/char/agp/Kconfig"
>>>>>>> +if HAS_IOMEM
>>>>>>> +    source "drivers/char/agp/Kconfig"
>>>>>>>   -source "drivers/gpu/vga/Kconfig"
>>>>>>> +    source "drivers/gpu/vga/Kconfig"
>>>>>>>   -source "drivers/gpu/host1x/Kconfig"
>>>>>>> -source "drivers/gpu/ipu-v3/Kconfig"
>>>>>>> +    source "drivers/gpu/host1x/Kconfig"
>>>>>>> +    source "drivers/gpu/ipu-v3/Kconfig"
>>>>>>>   -source "drivers/gpu/drm/Kconfig"
>>>>>>> +    source "drivers/gpu/drm/Kconfig"  
>>>>
>>>>
>>>> Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
>>>> work.
>>>>   
>>> Sorry my fault. I had CONFIG_PCI disabled.
>>
>> That smells like the s390 HAS_IOMEM stuff needs more work -- I guess
>> that you want to enable a ccw virtio-gpu device, not a pci one, right?
> 
> It is a ccw virtio-gpu. But s390 has no IOMEM without CONFIG_PCI, so you cannot
> select VIRTIO_GPU, which needs DRM, which need IOMEM.

So the 'source "drivers/gpu/drm/Kconfig"' should maybe rather reside
outside of the "if HAS_IOMEM" path? Or does it not compile anymore that way?

 Thomas

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
@ 2018-02-21 11:14                 ` Thomas Huth
  0 siblings, 0 replies; 49+ messages in thread
From: Thomas Huth @ 2018-02-21 11:14 UTC (permalink / raw)
  To: Christian Borntraeger, Cornelia Huck
  Cc: Farhan Ali, linux-kernel, linux-s390, linux-fbdev, geert,
	tomi.valkeinen, b.zolnierkie

On 21.02.2018 12:09, Christian Borntraeger wrote:
> 
> 
> On 02/21/2018 11:32 AM, Cornelia Huck wrote:
>> On Wed, 21 Feb 2018 11:22:38 +0100
>> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
>>
>>> On 02/21/2018 11:05 AM, Christian Borntraeger wrote:
>>>>
>>>>
>>>> On 02/19/2018 05:38 PM, Farhan Ali wrote:  
>>>>>
>>>>>
>>>>> On 02/19/2018 11:25 AM, Thomas Huth wrote:  
>>>>>> On 19.02.2018 16:47, Farhan Ali wrote:  
>>>>>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
>>>>>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
>>>>>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
>>>>>>> we would also need to enable the dummy console. So let's remove the
>>>>>>> HAS_IOMEM dependency.
>>>>>>>
>>>>>>> Move this dependency to sub menu items and console drivers that use
>>>>>>> io memory.
>>>>>>>
>>>>>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>>>>>>> ---
>>>>>>>   drivers/video/Kconfig         | 21 +++++++++++----------
>>>>>>>   drivers/video/console/Kconfig |  4 ++--
>>>>>>>   2 files changed, 13 insertions(+), 12 deletions(-)
>>>>>>>
>>>>>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>>>>>>> index 3c20af9..8f10915 100644
>>>>>>> --- a/drivers/video/Kconfig
>>>>>>> +++ b/drivers/video/Kconfig
>>>>>>> @@ -3,7 +3,6 @@
>>>>>>>   #
>>>>>>>     menu "Graphics support"
>>>>>>> -    depends on HAS_IOMEM
>>>>>>>     config HAVE_FB_ATMEL
>>>>>>>       bool
>>>>>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>>>>>>>   config SH_LCD_MIPI_DSI
>>>>>>>       bool
>>>>>>>   -source "drivers/char/agp/Kconfig"
>>>>>>> +if HAS_IOMEM
>>>>>>> +    source "drivers/char/agp/Kconfig"
>>>>>>>   -source "drivers/gpu/vga/Kconfig"
>>>>>>> +    source "drivers/gpu/vga/Kconfig"
>>>>>>>   -source "drivers/gpu/host1x/Kconfig"
>>>>>>> -source "drivers/gpu/ipu-v3/Kconfig"
>>>>>>> +    source "drivers/gpu/host1x/Kconfig"
>>>>>>> +    source "drivers/gpu/ipu-v3/Kconfig"
>>>>>>>   -source "drivers/gpu/drm/Kconfig"
>>>>>>> +    source "drivers/gpu/drm/Kconfig"  
>>>>
>>>>
>>>> Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
>>>> work.
>>>>   
>>> Sorry my fault. I had CONFIG_PCI disabled.
>>
>> That smells like the s390 HAS_IOMEM stuff needs more work -- I guess
>> that you want to enable a ccw virtio-gpu device, not a pci one, right?
> 
> It is a ccw virtio-gpu. But s390 has no IOMEM without CONFIG_PCI, so you cannot
> select VIRTIO_GPU, which needs DRM, which need IOMEM.

So the 'source "drivers/gpu/drm/Kconfig"' should maybe rather reside
outside of the "if HAS_IOMEM" path? Or does it not compile anymore that way?

 Thomas

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
  2018-02-21 11:14                 ` Thomas Huth
@ 2018-02-21 11:22                   ` Christian Borntraeger
  -1 siblings, 0 replies; 49+ messages in thread
From: Christian Borntraeger @ 2018-02-21 11:22 UTC (permalink / raw)
  To: Thomas Huth, Cornelia Huck
  Cc: Farhan Ali, linux-kernel, linux-s390, linux-fbdev, geert,
	tomi.valkeinen, b.zolnierkie



On 02/21/2018 12:14 PM, Thomas Huth wrote:
> On 21.02.2018 12:09, Christian Borntraeger wrote:
>>
>>
>> On 02/21/2018 11:32 AM, Cornelia Huck wrote:
>>> On Wed, 21 Feb 2018 11:22:38 +0100
>>> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
>>>
>>>> On 02/21/2018 11:05 AM, Christian Borntraeger wrote:
>>>>>
>>>>>
>>>>> On 02/19/2018 05:38 PM, Farhan Ali wrote:  
>>>>>>
>>>>>>
>>>>>> On 02/19/2018 11:25 AM, Thomas Huth wrote:  
>>>>>>> On 19.02.2018 16:47, Farhan Ali wrote:  
>>>>>>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
>>>>>>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
>>>>>>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
>>>>>>>> we would also need to enable the dummy console. So let's remove the
>>>>>>>> HAS_IOMEM dependency.
>>>>>>>>
>>>>>>>> Move this dependency to sub menu items and console drivers that use
>>>>>>>> io memory.
>>>>>>>>
>>>>>>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>>>>>>>> ---
>>>>>>>>   drivers/video/Kconfig         | 21 +++++++++++----------
>>>>>>>>   drivers/video/console/Kconfig |  4 ++--
>>>>>>>>   2 files changed, 13 insertions(+), 12 deletions(-)
>>>>>>>>
>>>>>>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>>>>>>>> index 3c20af9..8f10915 100644
>>>>>>>> --- a/drivers/video/Kconfig
>>>>>>>> +++ b/drivers/video/Kconfig
>>>>>>>> @@ -3,7 +3,6 @@
>>>>>>>>   #
>>>>>>>>     menu "Graphics support"
>>>>>>>> -    depends on HAS_IOMEM
>>>>>>>>     config HAVE_FB_ATMEL
>>>>>>>>       bool
>>>>>>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>>>>>>>>   config SH_LCD_MIPI_DSI
>>>>>>>>       bool
>>>>>>>>   -source "drivers/char/agp/Kconfig"
>>>>>>>> +if HAS_IOMEM
>>>>>>>> +    source "drivers/char/agp/Kconfig"
>>>>>>>>   -source "drivers/gpu/vga/Kconfig"
>>>>>>>> +    source "drivers/gpu/vga/Kconfig"
>>>>>>>>   -source "drivers/gpu/host1x/Kconfig"
>>>>>>>> -source "drivers/gpu/ipu-v3/Kconfig"
>>>>>>>> +    source "drivers/gpu/host1x/Kconfig"
>>>>>>>> +    source "drivers/gpu/ipu-v3/Kconfig"
>>>>>>>>   -source "drivers/gpu/drm/Kconfig"
>>>>>>>> +    source "drivers/gpu/drm/Kconfig"  
>>>>>
>>>>>
>>>>> Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
>>>>> work.
>>>>>   
>>>> Sorry my fault. I had CONFIG_PCI disabled.
>>>
>>> That smells like the s390 HAS_IOMEM stuff needs more work -- I guess
>>> that you want to enable a ccw virtio-gpu device, not a pci one, right?
>>
>> It is a ccw virtio-gpu. But s390 has no IOMEM without CONFIG_PCI, so you cannot
>> select VIRTIO_GPU, which needs DRM, which need IOMEM.
> 
> So the 'source "drivers/gpu/drm/Kconfig"' should maybe rather reside
> outside of the "if HAS_IOMEM" path? Or does it not compile anymore that way?

virtio-gpu depends on drm. So in essence it boils down to if you want virtio-gpu
you also need to enable PCI, even if the actual channel is ccw.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
@ 2018-02-21 11:22                   ` Christian Borntraeger
  0 siblings, 0 replies; 49+ messages in thread
From: Christian Borntraeger @ 2018-02-21 11:22 UTC (permalink / raw)
  To: Thomas Huth, Cornelia Huck
  Cc: Farhan Ali, linux-kernel, linux-s390, linux-fbdev, geert,
	tomi.valkeinen, b.zolnierkie



On 02/21/2018 12:14 PM, Thomas Huth wrote:
> On 21.02.2018 12:09, Christian Borntraeger wrote:
>>
>>
>> On 02/21/2018 11:32 AM, Cornelia Huck wrote:
>>> On Wed, 21 Feb 2018 11:22:38 +0100
>>> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
>>>
>>>> On 02/21/2018 11:05 AM, Christian Borntraeger wrote:
>>>>>
>>>>>
>>>>> On 02/19/2018 05:38 PM, Farhan Ali wrote:  
>>>>>>
>>>>>>
>>>>>> On 02/19/2018 11:25 AM, Thomas Huth wrote:  
>>>>>>> On 19.02.2018 16:47, Farhan Ali wrote:  
>>>>>>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
>>>>>>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
>>>>>>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
>>>>>>>> we would also need to enable the dummy console. So let's remove the
>>>>>>>> HAS_IOMEM dependency.
>>>>>>>>
>>>>>>>> Move this dependency to sub menu items and console drivers that use
>>>>>>>> io memory.
>>>>>>>>
>>>>>>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>>>>>>>> ---
>>>>>>>>   drivers/video/Kconfig         | 21 +++++++++++----------
>>>>>>>>   drivers/video/console/Kconfig |  4 ++--
>>>>>>>>   2 files changed, 13 insertions(+), 12 deletions(-)
>>>>>>>>
>>>>>>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>>>>>>>> index 3c20af9..8f10915 100644
>>>>>>>> --- a/drivers/video/Kconfig
>>>>>>>> +++ b/drivers/video/Kconfig
>>>>>>>> @@ -3,7 +3,6 @@
>>>>>>>>   #
>>>>>>>>     menu "Graphics support"
>>>>>>>> -    depends on HAS_IOMEM
>>>>>>>>     config HAVE_FB_ATMEL
>>>>>>>>       bool
>>>>>>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>>>>>>>>   config SH_LCD_MIPI_DSI
>>>>>>>>       bool
>>>>>>>>   -source "drivers/char/agp/Kconfig"
>>>>>>>> +if HAS_IOMEM
>>>>>>>> +    source "drivers/char/agp/Kconfig"
>>>>>>>>   -source "drivers/gpu/vga/Kconfig"
>>>>>>>> +    source "drivers/gpu/vga/Kconfig"
>>>>>>>>   -source "drivers/gpu/host1x/Kconfig"
>>>>>>>> -source "drivers/gpu/ipu-v3/Kconfig"
>>>>>>>> +    source "drivers/gpu/host1x/Kconfig"
>>>>>>>> +    source "drivers/gpu/ipu-v3/Kconfig"
>>>>>>>>   -source "drivers/gpu/drm/Kconfig"
>>>>>>>> +    source "drivers/gpu/drm/Kconfig"  
>>>>>
>>>>>
>>>>> Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
>>>>> work.
>>>>>   
>>>> Sorry my fault. I had CONFIG_PCI disabled.
>>>
>>> That smells like the s390 HAS_IOMEM stuff needs more work -- I guess
>>> that you want to enable a ccw virtio-gpu device, not a pci one, right?
>>
>> It is a ccw virtio-gpu. But s390 has no IOMEM without CONFIG_PCI, so you cannot
>> select VIRTIO_GPU, which needs DRM, which need IOMEM.
> 
> So the 'source "drivers/gpu/drm/Kconfig"' should maybe rather reside
> outside of the "if HAS_IOMEM" path? Or does it not compile anymore that way?

virtio-gpu depends on drm. So in essence it boils down to if you want virtio-gpu
you also need to enable PCI, even if the actual channel is ccw.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
  2018-02-21 11:14                 ` Thomas Huth
@ 2018-02-21 11:23                   ` Cornelia Huck
  -1 siblings, 0 replies; 49+ messages in thread
From: Cornelia Huck @ 2018-02-21 11:23 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Christian Borntraeger, Farhan Ali, linux-kernel, linux-s390,
	linux-fbdev, geert, tomi.valkeinen, b.zolnierkie

On Wed, 21 Feb 2018 12:14:36 +0100
Thomas Huth <thuth@redhat.com> wrote:

> On 21.02.2018 12:09, Christian Borntraeger wrote:
> > 
> > 
> > On 02/21/2018 11:32 AM, Cornelia Huck wrote:  
> >> On Wed, 21 Feb 2018 11:22:38 +0100
> >> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> >>  
> >>> On 02/21/2018 11:05 AM, Christian Borntraeger wrote:  
> >>>>
> >>>>
> >>>> On 02/19/2018 05:38 PM, Farhan Ali wrote:    
> >>>>>
> >>>>>
> >>>>> On 02/19/2018 11:25 AM, Thomas Huth wrote:    
> >>>>>> On 19.02.2018 16:47, Farhan Ali wrote:    
> >>>>>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
> >>>>>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
> >>>>>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
> >>>>>>> we would also need to enable the dummy console. So let's remove the
> >>>>>>> HAS_IOMEM dependency.
> >>>>>>>
> >>>>>>> Move this dependency to sub menu items and console drivers that use
> >>>>>>> io memory.
> >>>>>>>
> >>>>>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
> >>>>>>> ---
> >>>>>>>   drivers/video/Kconfig         | 21 +++++++++++----------
> >>>>>>>   drivers/video/console/Kconfig |  4 ++--
> >>>>>>>   2 files changed, 13 insertions(+), 12 deletions(-)
> >>>>>>>
> >>>>>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> >>>>>>> index 3c20af9..8f10915 100644
> >>>>>>> --- a/drivers/video/Kconfig
> >>>>>>> +++ b/drivers/video/Kconfig
> >>>>>>> @@ -3,7 +3,6 @@
> >>>>>>>   #
> >>>>>>>     menu "Graphics support"
> >>>>>>> -    depends on HAS_IOMEM
> >>>>>>>     config HAVE_FB_ATMEL
> >>>>>>>       bool
> >>>>>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
> >>>>>>>   config SH_LCD_MIPI_DSI
> >>>>>>>       bool
> >>>>>>>   -source "drivers/char/agp/Kconfig"
> >>>>>>> +if HAS_IOMEM
> >>>>>>> +    source "drivers/char/agp/Kconfig"
> >>>>>>>   -source "drivers/gpu/vga/Kconfig"
> >>>>>>> +    source "drivers/gpu/vga/Kconfig"
> >>>>>>>   -source "drivers/gpu/host1x/Kconfig"
> >>>>>>> -source "drivers/gpu/ipu-v3/Kconfig"
> >>>>>>> +    source "drivers/gpu/host1x/Kconfig"
> >>>>>>> +    source "drivers/gpu/ipu-v3/Kconfig"
> >>>>>>>   -source "drivers/gpu/drm/Kconfig"
> >>>>>>> +    source "drivers/gpu/drm/Kconfig"    
> >>>>
> >>>>
> >>>> Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
> >>>> work.
> >>>>     
> >>> Sorry my fault. I had CONFIG_PCI disabled.  
> >>
> >> That smells like the s390 HAS_IOMEM stuff needs more work -- I guess
> >> that you want to enable a ccw virtio-gpu device, not a pci one, right?  
> > 
> > It is a ccw virtio-gpu. But s390 has no IOMEM without CONFIG_PCI, so you cannot
> > select VIRTIO_GPU, which needs DRM, which need IOMEM.  
> 
> So the 'source "drivers/gpu/drm/Kconfig"' should maybe rather reside
> outside of the "if HAS_IOMEM" path? Or does it not compile anymore that way?

Alternatively, some of the IOMEM stuff could be moved out from under
the pci dependency on s390 (not sure what is needed and what actually
makes sense.)

This is good enough for now, but it would be nice to get this sorted
out later.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
@ 2018-02-21 11:23                   ` Cornelia Huck
  0 siblings, 0 replies; 49+ messages in thread
From: Cornelia Huck @ 2018-02-21 11:23 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Christian Borntraeger, Farhan Ali, linux-kernel, linux-s390,
	linux-fbdev, geert, tomi.valkeinen, b.zolnierkie

On Wed, 21 Feb 2018 12:14:36 +0100
Thomas Huth <thuth@redhat.com> wrote:

> On 21.02.2018 12:09, Christian Borntraeger wrote:
> > 
> > 
> > On 02/21/2018 11:32 AM, Cornelia Huck wrote:  
> >> On Wed, 21 Feb 2018 11:22:38 +0100
> >> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> >>  
> >>> On 02/21/2018 11:05 AM, Christian Borntraeger wrote:  
> >>>>
> >>>>
> >>>> On 02/19/2018 05:38 PM, Farhan Ali wrote:    
> >>>>>
> >>>>>
> >>>>> On 02/19/2018 11:25 AM, Thomas Huth wrote:    
> >>>>>> On 19.02.2018 16:47, Farhan Ali wrote:    
> >>>>>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
> >>>>>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
> >>>>>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
> >>>>>>> we would also need to enable the dummy console. So let's remove the
> >>>>>>> HAS_IOMEM dependency.
> >>>>>>>
> >>>>>>> Move this dependency to sub menu items and console drivers that use
> >>>>>>> io memory.
> >>>>>>>
> >>>>>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
> >>>>>>> ---
> >>>>>>>   drivers/video/Kconfig         | 21 +++++++++++----------
> >>>>>>>   drivers/video/console/Kconfig |  4 ++--
> >>>>>>>   2 files changed, 13 insertions(+), 12 deletions(-)
> >>>>>>>
> >>>>>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> >>>>>>> index 3c20af9..8f10915 100644
> >>>>>>> --- a/drivers/video/Kconfig
> >>>>>>> +++ b/drivers/video/Kconfig
> >>>>>>> @@ -3,7 +3,6 @@
> >>>>>>>   #
> >>>>>>>     menu "Graphics support"
> >>>>>>> -    depends on HAS_IOMEM
> >>>>>>>     config HAVE_FB_ATMEL
> >>>>>>>       bool
> >>>>>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
> >>>>>>>   config SH_LCD_MIPI_DSI
> >>>>>>>       bool
> >>>>>>>   -source "drivers/char/agp/Kconfig"
> >>>>>>> +if HAS_IOMEM
> >>>>>>> +    source "drivers/char/agp/Kconfig"
> >>>>>>>   -source "drivers/gpu/vga/Kconfig"
> >>>>>>> +    source "drivers/gpu/vga/Kconfig"
> >>>>>>>   -source "drivers/gpu/host1x/Kconfig"
> >>>>>>> -source "drivers/gpu/ipu-v3/Kconfig"
> >>>>>>> +    source "drivers/gpu/host1x/Kconfig"
> >>>>>>> +    source "drivers/gpu/ipu-v3/Kconfig"
> >>>>>>>   -source "drivers/gpu/drm/Kconfig"
> >>>>>>> +    source "drivers/gpu/drm/Kconfig"    
> >>>>
> >>>>
> >>>> Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
> >>>> work.
> >>>>     
> >>> Sorry my fault. I had CONFIG_PCI disabled.  
> >>
> >> That smells like the s390 HAS_IOMEM stuff needs more work -- I guess
> >> that you want to enable a ccw virtio-gpu device, not a pci one, right?  
> > 
> > It is a ccw virtio-gpu. But s390 has no IOMEM without CONFIG_PCI, so you cannot
> > select VIRTIO_GPU, which needs DRM, which need IOMEM.  
> 
> So the 'source "drivers/gpu/drm/Kconfig"' should maybe rather reside
> outside of the "if HAS_IOMEM" path? Or does it not compile anymore that way?

Alternatively, some of the IOMEM stuff could be moved out from under
the pci dependency on s390 (not sure what is needed and what actually
makes sense.)

This is good enough for now, but it would be nice to get this sorted
out later.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
  2018-02-21 11:22                   ` Christian Borntraeger
@ 2018-02-21 11:29                     ` Thomas Huth
  -1 siblings, 0 replies; 49+ messages in thread
From: Thomas Huth @ 2018-02-21 11:29 UTC (permalink / raw)
  To: Christian Borntraeger, Cornelia Huck
  Cc: Farhan Ali, linux-kernel, linux-s390, linux-fbdev, geert,
	tomi.valkeinen, b.zolnierkie

On 21.02.2018 12:22, Christian Borntraeger wrote:
> 
> 
> On 02/21/2018 12:14 PM, Thomas Huth wrote:
>> On 21.02.2018 12:09, Christian Borntraeger wrote:
>>>
>>>
>>> On 02/21/2018 11:32 AM, Cornelia Huck wrote:
>>>> On Wed, 21 Feb 2018 11:22:38 +0100
>>>> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
>>>>
>>>>> On 02/21/2018 11:05 AM, Christian Borntraeger wrote:
>>>>>>
>>>>>>
>>>>>> On 02/19/2018 05:38 PM, Farhan Ali wrote:  
>>>>>>>
>>>>>>>
>>>>>>> On 02/19/2018 11:25 AM, Thomas Huth wrote:  
>>>>>>>> On 19.02.2018 16:47, Farhan Ali wrote:  
>>>>>>>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
>>>>>>>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
>>>>>>>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
>>>>>>>>> we would also need to enable the dummy console. So let's remove the
>>>>>>>>> HAS_IOMEM dependency.
>>>>>>>>>
>>>>>>>>> Move this dependency to sub menu items and console drivers that use
>>>>>>>>> io memory.
>>>>>>>>>
>>>>>>>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>>>>>>>>> ---
>>>>>>>>>   drivers/video/Kconfig         | 21 +++++++++++----------
>>>>>>>>>   drivers/video/console/Kconfig |  4 ++--
>>>>>>>>>   2 files changed, 13 insertions(+), 12 deletions(-)
>>>>>>>>>
>>>>>>>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>>>>>>>>> index 3c20af9..8f10915 100644
>>>>>>>>> --- a/drivers/video/Kconfig
>>>>>>>>> +++ b/drivers/video/Kconfig
>>>>>>>>> @@ -3,7 +3,6 @@
>>>>>>>>>   #
>>>>>>>>>     menu "Graphics support"
>>>>>>>>> -    depends on HAS_IOMEM
>>>>>>>>>     config HAVE_FB_ATMEL
>>>>>>>>>       bool
>>>>>>>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>>>>>>>>>   config SH_LCD_MIPI_DSI
>>>>>>>>>       bool
>>>>>>>>>   -source "drivers/char/agp/Kconfig"
>>>>>>>>> +if HAS_IOMEM
>>>>>>>>> +    source "drivers/char/agp/Kconfig"
>>>>>>>>>   -source "drivers/gpu/vga/Kconfig"
>>>>>>>>> +    source "drivers/gpu/vga/Kconfig"
>>>>>>>>>   -source "drivers/gpu/host1x/Kconfig"
>>>>>>>>> -source "drivers/gpu/ipu-v3/Kconfig"
>>>>>>>>> +    source "drivers/gpu/host1x/Kconfig"
>>>>>>>>> +    source "drivers/gpu/ipu-v3/Kconfig"
>>>>>>>>>   -source "drivers/gpu/drm/Kconfig"
>>>>>>>>> +    source "drivers/gpu/drm/Kconfig"  
>>>>>>
>>>>>>
>>>>>> Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
>>>>>> work.
>>>>>>   
>>>>> Sorry my fault. I had CONFIG_PCI disabled.
>>>>
>>>> That smells like the s390 HAS_IOMEM stuff needs more work -- I guess
>>>> that you want to enable a ccw virtio-gpu device, not a pci one, right?
>>>
>>> It is a ccw virtio-gpu. But s390 has no IOMEM without CONFIG_PCI, so you cannot
>>> select VIRTIO_GPU, which needs DRM, which need IOMEM.
>>
>> So the 'source "drivers/gpu/drm/Kconfig"' should maybe rather reside
>> outside of the "if HAS_IOMEM" path? Or does it not compile anymore that way?
> 
> virtio-gpu depends on drm. So in essence it boils down to if you want virtio-gpu
> you also need to enable PCI, even if the actual channel is ccw.

But if you need to enable PCI to get IOMEM, I wonder why this patch here
is needed at all? The Graphics menu / VT dummy console should be
available in the config if IOMEM is enabled anyway?

 Thomas

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
@ 2018-02-21 11:29                     ` Thomas Huth
  0 siblings, 0 replies; 49+ messages in thread
From: Thomas Huth @ 2018-02-21 11:29 UTC (permalink / raw)
  To: Christian Borntraeger, Cornelia Huck
  Cc: Farhan Ali, linux-kernel, linux-s390, linux-fbdev, geert,
	tomi.valkeinen, b.zolnierkie

On 21.02.2018 12:22, Christian Borntraeger wrote:
> 
> 
> On 02/21/2018 12:14 PM, Thomas Huth wrote:
>> On 21.02.2018 12:09, Christian Borntraeger wrote:
>>>
>>>
>>> On 02/21/2018 11:32 AM, Cornelia Huck wrote:
>>>> On Wed, 21 Feb 2018 11:22:38 +0100
>>>> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
>>>>
>>>>> On 02/21/2018 11:05 AM, Christian Borntraeger wrote:
>>>>>>
>>>>>>
>>>>>> On 02/19/2018 05:38 PM, Farhan Ali wrote:  
>>>>>>>
>>>>>>>
>>>>>>> On 02/19/2018 11:25 AM, Thomas Huth wrote:  
>>>>>>>> On 19.02.2018 16:47, Farhan Ali wrote:  
>>>>>>>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
>>>>>>>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
>>>>>>>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
>>>>>>>>> we would also need to enable the dummy console. So let's remove the
>>>>>>>>> HAS_IOMEM dependency.
>>>>>>>>>
>>>>>>>>> Move this dependency to sub menu items and console drivers that use
>>>>>>>>> io memory.
>>>>>>>>>
>>>>>>>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>>>>>>>>> ---
>>>>>>>>>   drivers/video/Kconfig         | 21 +++++++++++----------
>>>>>>>>>   drivers/video/console/Kconfig |  4 ++--
>>>>>>>>>   2 files changed, 13 insertions(+), 12 deletions(-)
>>>>>>>>>
>>>>>>>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>>>>>>>>> index 3c20af9..8f10915 100644
>>>>>>>>> --- a/drivers/video/Kconfig
>>>>>>>>> +++ b/drivers/video/Kconfig
>>>>>>>>> @@ -3,7 +3,6 @@
>>>>>>>>>   #
>>>>>>>>>     menu "Graphics support"
>>>>>>>>> -    depends on HAS_IOMEM
>>>>>>>>>     config HAVE_FB_ATMEL
>>>>>>>>>       bool
>>>>>>>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>>>>>>>>>   config SH_LCD_MIPI_DSI
>>>>>>>>>       bool
>>>>>>>>>   -source "drivers/char/agp/Kconfig"
>>>>>>>>> +if HAS_IOMEM
>>>>>>>>> +    source "drivers/char/agp/Kconfig"
>>>>>>>>>   -source "drivers/gpu/vga/Kconfig"
>>>>>>>>> +    source "drivers/gpu/vga/Kconfig"
>>>>>>>>>   -source "drivers/gpu/host1x/Kconfig"
>>>>>>>>> -source "drivers/gpu/ipu-v3/Kconfig"
>>>>>>>>> +    source "drivers/gpu/host1x/Kconfig"
>>>>>>>>> +    source "drivers/gpu/ipu-v3/Kconfig"
>>>>>>>>>   -source "drivers/gpu/drm/Kconfig"
>>>>>>>>> +    source "drivers/gpu/drm/Kconfig"  
>>>>>>
>>>>>>
>>>>>> Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
>>>>>> work.
>>>>>>   
>>>>> Sorry my fault. I had CONFIG_PCI disabled.
>>>>
>>>> That smells like the s390 HAS_IOMEM stuff needs more work -- I guess
>>>> that you want to enable a ccw virtio-gpu device, not a pci one, right?
>>>
>>> It is a ccw virtio-gpu. But s390 has no IOMEM without CONFIG_PCI, so you cannot
>>> select VIRTIO_GPU, which needs DRM, which need IOMEM.
>>
>> So the 'source "drivers/gpu/drm/Kconfig"' should maybe rather reside
>> outside of the "if HAS_IOMEM" path? Or does it not compile anymore that way?
> 
> virtio-gpu depends on drm. So in essence it boils down to if you want virtio-gpu
> you also need to enable PCI, even if the actual channel is ccw.

But if you need to enable PCI to get IOMEM, I wonder why this patch here
is needed at all? The Graphics menu / VT dummy console should be
available in the config if IOMEM is enabled anyway?

 Thomas

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
  2018-02-21 11:29                     ` Thomas Huth
@ 2018-02-21 11:49                       ` Christian Borntraeger
  -1 siblings, 0 replies; 49+ messages in thread
From: Christian Borntraeger @ 2018-02-21 11:49 UTC (permalink / raw)
  To: Thomas Huth, Cornelia Huck
  Cc: Farhan Ali, linux-kernel, linux-s390, linux-fbdev, geert,
	tomi.valkeinen, b.zolnierkie



On 02/21/2018 12:29 PM, Thomas Huth wrote:
> On 21.02.2018 12:22, Christian Borntraeger wrote:
>>
>>
>> On 02/21/2018 12:14 PM, Thomas Huth wrote:
>>> On 21.02.2018 12:09, Christian Borntraeger wrote:
>>>>
>>>>
>>>> On 02/21/2018 11:32 AM, Cornelia Huck wrote:
>>>>> On Wed, 21 Feb 2018 11:22:38 +0100
>>>>> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
>>>>>
>>>>>> On 02/21/2018 11:05 AM, Christian Borntraeger wrote:
>>>>>>>
>>>>>>>
>>>>>>> On 02/19/2018 05:38 PM, Farhan Ali wrote:  
>>>>>>>>
>>>>>>>>
>>>>>>>> On 02/19/2018 11:25 AM, Thomas Huth wrote:  
>>>>>>>>> On 19.02.2018 16:47, Farhan Ali wrote:  
>>>>>>>>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
>>>>>>>>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
>>>>>>>>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
>>>>>>>>>> we would also need to enable the dummy console. So let's remove the
>>>>>>>>>> HAS_IOMEM dependency.
>>>>>>>>>>
>>>>>>>>>> Move this dependency to sub menu items and console drivers that use
>>>>>>>>>> io memory.
>>>>>>>>>>
>>>>>>>>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>>>>>>>>>> ---
>>>>>>>>>>   drivers/video/Kconfig         | 21 +++++++++++----------
>>>>>>>>>>   drivers/video/console/Kconfig |  4 ++--
>>>>>>>>>>   2 files changed, 13 insertions(+), 12 deletions(-)
>>>>>>>>>>
>>>>>>>>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>>>>>>>>>> index 3c20af9..8f10915 100644
>>>>>>>>>> --- a/drivers/video/Kconfig
>>>>>>>>>> +++ b/drivers/video/Kconfig
>>>>>>>>>> @@ -3,7 +3,6 @@
>>>>>>>>>>   #
>>>>>>>>>>     menu "Graphics support"
>>>>>>>>>> -    depends on HAS_IOMEM
>>>>>>>>>>     config HAVE_FB_ATMEL
>>>>>>>>>>       bool
>>>>>>>>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>>>>>>>>>>   config SH_LCD_MIPI_DSI
>>>>>>>>>>       bool
>>>>>>>>>>   -source "drivers/char/agp/Kconfig"
>>>>>>>>>> +if HAS_IOMEM
>>>>>>>>>> +    source "drivers/char/agp/Kconfig"
>>>>>>>>>>   -source "drivers/gpu/vga/Kconfig"
>>>>>>>>>> +    source "drivers/gpu/vga/Kconfig"
>>>>>>>>>>   -source "drivers/gpu/host1x/Kconfig"
>>>>>>>>>> -source "drivers/gpu/ipu-v3/Kconfig"
>>>>>>>>>> +    source "drivers/gpu/host1x/Kconfig"
>>>>>>>>>> +    source "drivers/gpu/ipu-v3/Kconfig"
>>>>>>>>>>   -source "drivers/gpu/drm/Kconfig"
>>>>>>>>>> +    source "drivers/gpu/drm/Kconfig"  
>>>>>>>
>>>>>>>
>>>>>>> Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
>>>>>>> work.
>>>>>>>   
>>>>>> Sorry my fault. I had CONFIG_PCI disabled.
>>>>>
>>>>> That smells like the s390 HAS_IOMEM stuff needs more work -- I guess
>>>>> that you want to enable a ccw virtio-gpu device, not a pci one, right?
>>>>
>>>> It is a ccw virtio-gpu. But s390 has no IOMEM without CONFIG_PCI, so you cannot
>>>> select VIRTIO_GPU, which needs DRM, which need IOMEM.
>>>
>>> So the 'source "drivers/gpu/drm/Kconfig"' should maybe rather reside
>>> outside of the "if HAS_IOMEM" path? Or does it not compile anymore that way?
>>
>> virtio-gpu depends on drm. So in essence it boils down to if you want virtio-gpu
>> you also need to enable PCI, even if the actual channel is ccw.
> 
> But if you need to enable PCI to get IOMEM, I wonder why this patch here
> is needed at all? The Graphics menu / VT dummy console should be
> available in the config if IOMEM is enabled anyway?

That is a good question. With CONFIG_PCI=y I can select virtio-gpu and dummy-console.
IIRC the issue was that with patch 3 we can have the situation where we have
CONFIG_VT = y and CONFIG_DUMMY_CONSOLE=n and this will crash early during boot as
conswitchp is NULL. This patches goal was to always enable dummy console even without
PCI, but it obviously fails to do so.

So what about allowing CONFIG_VT on s390 only if we have PCI?


diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig
index 84810075a6a0..1c7fe09d6f90 100644
--- a/drivers/tty/Kconfig
+++ b/drivers/tty/Kconfig
@@ -11,7 +11,7 @@ if TTY
 
 config VT
        bool "Virtual terminal" if EXPERT
-       depends on !UML
+       depends on !UML && (!S390 || PCI)
        select INPUT
        default y
        ---help---

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
@ 2018-02-21 11:49                       ` Christian Borntraeger
  0 siblings, 0 replies; 49+ messages in thread
From: Christian Borntraeger @ 2018-02-21 11:49 UTC (permalink / raw)
  To: Thomas Huth, Cornelia Huck
  Cc: Farhan Ali, linux-kernel, linux-s390, linux-fbdev, geert,
	tomi.valkeinen, b.zolnierkie



On 02/21/2018 12:29 PM, Thomas Huth wrote:
> On 21.02.2018 12:22, Christian Borntraeger wrote:
>>
>>
>> On 02/21/2018 12:14 PM, Thomas Huth wrote:
>>> On 21.02.2018 12:09, Christian Borntraeger wrote:
>>>>
>>>>
>>>> On 02/21/2018 11:32 AM, Cornelia Huck wrote:
>>>>> On Wed, 21 Feb 2018 11:22:38 +0100
>>>>> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
>>>>>
>>>>>> On 02/21/2018 11:05 AM, Christian Borntraeger wrote:
>>>>>>>
>>>>>>>
>>>>>>> On 02/19/2018 05:38 PM, Farhan Ali wrote:  
>>>>>>>>
>>>>>>>>
>>>>>>>> On 02/19/2018 11:25 AM, Thomas Huth wrote:  
>>>>>>>>> On 19.02.2018 16:47, Farhan Ali wrote:  
>>>>>>>>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
>>>>>>>>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
>>>>>>>>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
>>>>>>>>>> we would also need to enable the dummy console. So let's remove the
>>>>>>>>>> HAS_IOMEM dependency.
>>>>>>>>>>
>>>>>>>>>> Move this dependency to sub menu items and console drivers that use
>>>>>>>>>> io memory.
>>>>>>>>>>
>>>>>>>>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>>>>>>>>>> ---
>>>>>>>>>>   drivers/video/Kconfig         | 21 +++++++++++----------
>>>>>>>>>>   drivers/video/console/Kconfig |  4 ++--
>>>>>>>>>>   2 files changed, 13 insertions(+), 12 deletions(-)
>>>>>>>>>>
>>>>>>>>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>>>>>>>>>> index 3c20af9..8f10915 100644
>>>>>>>>>> --- a/drivers/video/Kconfig
>>>>>>>>>> +++ b/drivers/video/Kconfig
>>>>>>>>>> @@ -3,7 +3,6 @@
>>>>>>>>>>   #
>>>>>>>>>>     menu "Graphics support"
>>>>>>>>>> -    depends on HAS_IOMEM
>>>>>>>>>>     config HAVE_FB_ATMEL
>>>>>>>>>>       bool
>>>>>>>>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
>>>>>>>>>>   config SH_LCD_MIPI_DSI
>>>>>>>>>>       bool
>>>>>>>>>>   -source "drivers/char/agp/Kconfig"
>>>>>>>>>> +if HAS_IOMEM
>>>>>>>>>> +    source "drivers/char/agp/Kconfig"
>>>>>>>>>>   -source "drivers/gpu/vga/Kconfig"
>>>>>>>>>> +    source "drivers/gpu/vga/Kconfig"
>>>>>>>>>>   -source "drivers/gpu/host1x/Kconfig"
>>>>>>>>>> -source "drivers/gpu/ipu-v3/Kconfig"
>>>>>>>>>> +    source "drivers/gpu/host1x/Kconfig"
>>>>>>>>>> +    source "drivers/gpu/ipu-v3/Kconfig"
>>>>>>>>>>   -source "drivers/gpu/drm/Kconfig"
>>>>>>>>>> +    source "drivers/gpu/drm/Kconfig"  
>>>>>>>
>>>>>>>
>>>>>>> Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
>>>>>>> work.
>>>>>>>   
>>>>>> Sorry my fault. I had CONFIG_PCI disabled.
>>>>>
>>>>> That smells like the s390 HAS_IOMEM stuff needs more work -- I guess
>>>>> that you want to enable a ccw virtio-gpu device, not a pci one, right?
>>>>
>>>> It is a ccw virtio-gpu. But s390 has no IOMEM without CONFIG_PCI, so you cannot
>>>> select VIRTIO_GPU, which needs DRM, which need IOMEM.
>>>
>>> So the 'source "drivers/gpu/drm/Kconfig"' should maybe rather reside
>>> outside of the "if HAS_IOMEM" path? Or does it not compile anymore that way?
>>
>> virtio-gpu depends on drm. So in essence it boils down to if you want virtio-gpu
>> you also need to enable PCI, even if the actual channel is ccw.
> 
> But if you need to enable PCI to get IOMEM, I wonder why this patch here
> is needed at all? The Graphics menu / VT dummy console should be
> available in the config if IOMEM is enabled anyway?

That is a good question. With CONFIG_PCI=y I can select virtio-gpu and dummy-console.
IIRC the issue was that with patch 3 we can have the situation where we have
CONFIG_VT = y and CONFIG_DUMMY_CONSOLE=n and this will crash early during boot as
conswitchp is NULL. This patches goal was to always enable dummy console even without
PCI, but it obviously fails to do so.

So what about allowing CONFIG_VT on s390 only if we have PCI?


diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig
index 84810075a6a0..1c7fe09d6f90 100644
--- a/drivers/tty/Kconfig
+++ b/drivers/tty/Kconfig
@@ -11,7 +11,7 @@ if TTY
 
 config VT
        bool "Virtual terminal" if EXPERT
-       depends on !UML
+       depends on !UML && (!S390 || PCI)
        select INPUT
        default y
        ---help---

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
  2018-02-21  8:44     ` Christian Borntraeger
@ 2018-02-21 11:50       ` Bartlomiej Zolnierkiewicz
  -1 siblings, 0 replies; 49+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-02-21 11:50 UTC (permalink / raw)
  To: Christian Borntraeger
  Cc: Farhan Ali, linux-kernel, linux-s390, linux-fbdev, geert,
	tomi.valkeinen, thuth


On Wednesday, February 21, 2018 09:44:43 AM Christian Borntraeger wrote:
> 
> On 02/19/2018 04:47 PM, Farhan Ali wrote:
> > The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
> > added the HAS_IOMEM dependecy for "Graphics support". This disabled the
> > "Graphics support" menu for S390. But if we enable VT layer for S390,
> > we would also need to enable the dummy console. So let's remove the
> > HAS_IOMEM dependency.
> > 
> > Move this dependency to sub menu items and console drivers that use
> > io memory.
> > 
> > Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
> 
> This patch is part of todays linux-next and so far no fallout was reported.
> Shall I take that patch via the s390kvm tree (then I would like to have
> an ack. Bart?) or is anybody on cc willing to take this?

I would like to see two things changed before acking this patch:

- add missing HAS_IOMEM dependency to VGA_CONSOLE

- extend "if HAS_IOMEM" in drivers/video/Kconfig to cover config items
  previously covered by this dependency (it should start before config
  HAVE_FB_ATMEL and end after config HDMI)

> Christian
> 
> 
> 
> > ---
> >  drivers/video/Kconfig         | 21 +++++++++++----------
> >  drivers/video/console/Kconfig |  4 ++--
> >  2 files changed, 13 insertions(+), 12 deletions(-)
> > 
> > diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> > index 3c20af9..8f10915 100644
> > --- a/drivers/video/Kconfig
> > +++ b/drivers/video/Kconfig
> > @@ -3,7 +3,6 @@
> >  #
> > 
> >  menu "Graphics support"
> > -	depends on HAS_IOMEM
> > 
> >  config HAVE_FB_ATMEL
> >  	bool
> > @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
> >  config SH_LCD_MIPI_DSI
> >  	bool
> > 
> > -source "drivers/char/agp/Kconfig"
> > +if HAS_IOMEM
> > +	source "drivers/char/agp/Kconfig"
> > 
> > -source "drivers/gpu/vga/Kconfig"
> > +	source "drivers/gpu/vga/Kconfig"
> > 
> > -source "drivers/gpu/host1x/Kconfig"
> > -source "drivers/gpu/ipu-v3/Kconfig"
> > +	source "drivers/gpu/host1x/Kconfig"
> > +	source "drivers/gpu/ipu-v3/Kconfig"
> > 
> > -source "drivers/gpu/drm/Kconfig"
> > +	source "drivers/gpu/drm/Kconfig"
> > 
> > -menu "Frame buffer Devices"
> > -source "drivers/video/fbdev/Kconfig"
> > -endmenu
> > +	menu "Frame buffer Devices"
> > +	source "drivers/video/fbdev/Kconfig"
> > +	endmenu
> > 
> > -source "drivers/video/backlight/Kconfig"
> > +        source "drivers/video/backlight/Kconfig"
> > +endif
> > 
> >  config VGASTATE
> >         tristate
> > diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
> > index 7f1f1fb..0023b16 100644
> > --- a/drivers/video/console/Kconfig
> > +++ b/drivers/video/console/Kconfig
> > @@ -85,7 +85,7 @@ config MDA_CONSOLE
> > 
> >  config SGI_NEWPORT_CONSOLE
> >          tristate "SGI Newport Console support"
> > -        depends on SGI_IP22 
> > +        depends on SGI_IP22 && HAS_IOMEM
> >          select FONT_SUPPORT
> >          help
> >            Say Y here if you want the console on the Newport aka XL graphics
> > @@ -153,7 +153,7 @@ config FRAMEBUFFER_CONSOLE_ROTATION
> > 
> >  config STI_CONSOLE
> >          bool "STI text console"
> > -        depends on PARISC
> > +        depends on PARISC && HAS_IOMEM
> >          select FONT_SUPPORT
> >          default y
> >          help

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
@ 2018-02-21 11:50       ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 49+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-02-21 11:50 UTC (permalink / raw)
  To: Christian Borntraeger
  Cc: Farhan Ali, linux-kernel, linux-s390, linux-fbdev, geert,
	tomi.valkeinen, thuth


On Wednesday, February 21, 2018 09:44:43 AM Christian Borntraeger wrote:
> 
> On 02/19/2018 04:47 PM, Farhan Ali wrote:
> > The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
> > added the HAS_IOMEM dependecy for "Graphics support". This disabled the
> > "Graphics support" menu for S390. But if we enable VT layer for S390,
> > we would also need to enable the dummy console. So let's remove the
> > HAS_IOMEM dependency.
> > 
> > Move this dependency to sub menu items and console drivers that use
> > io memory.
> > 
> > Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
> 
> This patch is part of todays linux-next and so far no fallout was reported.
> Shall I take that patch via the s390kvm tree (then I would like to have
> an ack. Bart?) or is anybody on cc willing to take this?

I would like to see two things changed before acking this patch:

- add missing HAS_IOMEM dependency to VGA_CONSOLE

- extend "if HAS_IOMEM" in drivers/video/Kconfig to cover config items
  previously covered by this dependency (it should start before config
  HAVE_FB_ATMEL and end after config HDMI)

> Christian
> 
> 
> 
> > ---
> >  drivers/video/Kconfig         | 21 +++++++++++----------
> >  drivers/video/console/Kconfig |  4 ++--
> >  2 files changed, 13 insertions(+), 12 deletions(-)
> > 
> > diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> > index 3c20af9..8f10915 100644
> > --- a/drivers/video/Kconfig
> > +++ b/drivers/video/Kconfig
> > @@ -3,7 +3,6 @@
> >  #
> > 
> >  menu "Graphics support"
> > -	depends on HAS_IOMEM
> > 
> >  config HAVE_FB_ATMEL
> >  	bool
> > @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
> >  config SH_LCD_MIPI_DSI
> >  	bool
> > 
> > -source "drivers/char/agp/Kconfig"
> > +if HAS_IOMEM
> > +	source "drivers/char/agp/Kconfig"
> > 
> > -source "drivers/gpu/vga/Kconfig"
> > +	source "drivers/gpu/vga/Kconfig"
> > 
> > -source "drivers/gpu/host1x/Kconfig"
> > -source "drivers/gpu/ipu-v3/Kconfig"
> > +	source "drivers/gpu/host1x/Kconfig"
> > +	source "drivers/gpu/ipu-v3/Kconfig"
> > 
> > -source "drivers/gpu/drm/Kconfig"
> > +	source "drivers/gpu/drm/Kconfig"
> > 
> > -menu "Frame buffer Devices"
> > -source "drivers/video/fbdev/Kconfig"
> > -endmenu
> > +	menu "Frame buffer Devices"
> > +	source "drivers/video/fbdev/Kconfig"
> > +	endmenu
> > 
> > -source "drivers/video/backlight/Kconfig"
> > +        source "drivers/video/backlight/Kconfig"
> > +endif
> > 
> >  config VGASTATE
> >         tristate
> > diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
> > index 7f1f1fb..0023b16 100644
> > --- a/drivers/video/console/Kconfig
> > +++ b/drivers/video/console/Kconfig
> > @@ -85,7 +85,7 @@ config MDA_CONSOLE
> > 
> >  config SGI_NEWPORT_CONSOLE
> >          tristate "SGI Newport Console support"
> > -        depends on SGI_IP22 
> > +        depends on SGI_IP22 && HAS_IOMEM
> >          select FONT_SUPPORT
> >          help
> >            Say Y here if you want the console on the Newport aka XL graphics
> > @@ -153,7 +153,7 @@ config FRAMEBUFFER_CONSOLE_ROTATION
> > 
> >  config STI_CONSOLE
> >          bool "STI text console"
> > -        depends on PARISC
> > +        depends on PARISC && HAS_IOMEM
> >          select FONT_SUPPORT
> >          default y
> >          help

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
  2018-02-21 11:49                       ` Christian Borntraeger
@ 2018-02-21 12:07                         ` Cornelia Huck
  -1 siblings, 0 replies; 49+ messages in thread
From: Cornelia Huck @ 2018-02-21 12:07 UTC (permalink / raw)
  To: Christian Borntraeger
  Cc: Thomas Huth, Farhan Ali, linux-kernel, linux-s390, linux-fbdev,
	geert, tomi.valkeinen, b.zolnierkie

On Wed, 21 Feb 2018 12:49:35 +0100
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> On 02/21/2018 12:29 PM, Thomas Huth wrote:
> > On 21.02.2018 12:22, Christian Borntraeger wrote:  
> >>
> >>
> >> On 02/21/2018 12:14 PM, Thomas Huth wrote:  
> >>> On 21.02.2018 12:09, Christian Borntraeger wrote:  
> >>>>
> >>>>
> >>>> On 02/21/2018 11:32 AM, Cornelia Huck wrote:  
> >>>>> On Wed, 21 Feb 2018 11:22:38 +0100
> >>>>> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> >>>>>  
> >>>>>> On 02/21/2018 11:05 AM, Christian Borntraeger wrote:  
> >>>>>>>
> >>>>>>>
> >>>>>>> On 02/19/2018 05:38 PM, Farhan Ali wrote:    
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On 02/19/2018 11:25 AM, Thomas Huth wrote:    
> >>>>>>>>> On 19.02.2018 16:47, Farhan Ali wrote:    
> >>>>>>>>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
> >>>>>>>>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
> >>>>>>>>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
> >>>>>>>>>> we would also need to enable the dummy console. So let's remove the
> >>>>>>>>>> HAS_IOMEM dependency.
> >>>>>>>>>>
> >>>>>>>>>> Move this dependency to sub menu items and console drivers that use
> >>>>>>>>>> io memory.
> >>>>>>>>>>
> >>>>>>>>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
> >>>>>>>>>> ---
> >>>>>>>>>>   drivers/video/Kconfig         | 21 +++++++++++----------
> >>>>>>>>>>   drivers/video/console/Kconfig |  4 ++--
> >>>>>>>>>>   2 files changed, 13 insertions(+), 12 deletions(-)
> >>>>>>>>>>
> >>>>>>>>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> >>>>>>>>>> index 3c20af9..8f10915 100644
> >>>>>>>>>> --- a/drivers/video/Kconfig
> >>>>>>>>>> +++ b/drivers/video/Kconfig
> >>>>>>>>>> @@ -3,7 +3,6 @@
> >>>>>>>>>>   #
> >>>>>>>>>>     menu "Graphics support"
> >>>>>>>>>> -    depends on HAS_IOMEM
> >>>>>>>>>>     config HAVE_FB_ATMEL
> >>>>>>>>>>       bool
> >>>>>>>>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
> >>>>>>>>>>   config SH_LCD_MIPI_DSI
> >>>>>>>>>>       bool
> >>>>>>>>>>   -source "drivers/char/agp/Kconfig"
> >>>>>>>>>> +if HAS_IOMEM
> >>>>>>>>>> +    source "drivers/char/agp/Kconfig"
> >>>>>>>>>>   -source "drivers/gpu/vga/Kconfig"
> >>>>>>>>>> +    source "drivers/gpu/vga/Kconfig"
> >>>>>>>>>>   -source "drivers/gpu/host1x/Kconfig"
> >>>>>>>>>> -source "drivers/gpu/ipu-v3/Kconfig"
> >>>>>>>>>> +    source "drivers/gpu/host1x/Kconfig"
> >>>>>>>>>> +    source "drivers/gpu/ipu-v3/Kconfig"
> >>>>>>>>>>   -source "drivers/gpu/drm/Kconfig"
> >>>>>>>>>> +    source "drivers/gpu/drm/Kconfig"    
> >>>>>>>
> >>>>>>>
> >>>>>>> Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
> >>>>>>> work.
> >>>>>>>     
> >>>>>> Sorry my fault. I had CONFIG_PCI disabled.  
> >>>>>
> >>>>> That smells like the s390 HAS_IOMEM stuff needs more work -- I guess
> >>>>> that you want to enable a ccw virtio-gpu device, not a pci one, right?  
> >>>>
> >>>> It is a ccw virtio-gpu. But s390 has no IOMEM without CONFIG_PCI, so you cannot
> >>>> select VIRTIO_GPU, which needs DRM, which need IOMEM.  
> >>>
> >>> So the 'source "drivers/gpu/drm/Kconfig"' should maybe rather reside
> >>> outside of the "if HAS_IOMEM" path? Or does it not compile anymore that way?  
> >>
> >> virtio-gpu depends on drm. So in essence it boils down to if you want virtio-gpu
> >> you also need to enable PCI, even if the actual channel is ccw.  
> > 
> > But if you need to enable PCI to get IOMEM, I wonder why this patch here
> > is needed at all? The Graphics menu / VT dummy console should be
> > available in the config if IOMEM is enabled anyway?  
> 
> That is a good question. With CONFIG_PCI=y I can select virtio-gpu and dummy-console.
> IIRC the issue was that with patch 3 we can have the situation where we have
> CONFIG_VT = y and CONFIG_DUMMY_CONSOLE=n and this will crash early during boot as
> conswitchp is NULL. 

So in practice, CONFIG_VT depends on "there's a console available, even
if it's only the dummy one"?

> This patches goal was to always enable dummy console even without
> PCI, but it obviously fails to do so.

OTOH, the dummy console really should not depend on anything, as it is
only doing dummy things.

> 
> So what about allowing CONFIG_VT on s390 only if we have PCI?
> 
> 
> diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig
> index 84810075a6a0..1c7fe09d6f90 100644
> --- a/drivers/tty/Kconfig
> +++ b/drivers/tty/Kconfig
> @@ -11,7 +11,7 @@ if TTY
>  
>  config VT
>         bool "Virtual terminal" if EXPERT
> -       depends on !UML
> +       depends on !UML && (!S390 || PCI)
>         select INPUT
>         default y
>         ---help---
> 

Would cover your use case, but feels wrong to me... config dependencies
aren't fun :/

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
@ 2018-02-21 12:07                         ` Cornelia Huck
  0 siblings, 0 replies; 49+ messages in thread
From: Cornelia Huck @ 2018-02-21 12:07 UTC (permalink / raw)
  To: Christian Borntraeger
  Cc: Thomas Huth, Farhan Ali, linux-kernel, linux-s390, linux-fbdev,
	geert, tomi.valkeinen, b.zolnierkie

On Wed, 21 Feb 2018 12:49:35 +0100
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> On 02/21/2018 12:29 PM, Thomas Huth wrote:
> > On 21.02.2018 12:22, Christian Borntraeger wrote:  
> >>
> >>
> >> On 02/21/2018 12:14 PM, Thomas Huth wrote:  
> >>> On 21.02.2018 12:09, Christian Borntraeger wrote:  
> >>>>
> >>>>
> >>>> On 02/21/2018 11:32 AM, Cornelia Huck wrote:  
> >>>>> On Wed, 21 Feb 2018 11:22:38 +0100
> >>>>> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> >>>>>  
> >>>>>> On 02/21/2018 11:05 AM, Christian Borntraeger wrote:  
> >>>>>>>
> >>>>>>>
> >>>>>>> On 02/19/2018 05:38 PM, Farhan Ali wrote:    
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On 02/19/2018 11:25 AM, Thomas Huth wrote:    
> >>>>>>>>> On 19.02.2018 16:47, Farhan Ali wrote:    
> >>>>>>>>>> The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
> >>>>>>>>>> added the HAS_IOMEM dependecy for "Graphics support". This disabled the
> >>>>>>>>>> "Graphics support" menu for S390. But if we enable VT layer for S390,
> >>>>>>>>>> we would also need to enable the dummy console. So let's remove the
> >>>>>>>>>> HAS_IOMEM dependency.
> >>>>>>>>>>
> >>>>>>>>>> Move this dependency to sub menu items and console drivers that use
> >>>>>>>>>> io memory.
> >>>>>>>>>>
> >>>>>>>>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
> >>>>>>>>>> ---
> >>>>>>>>>>   drivers/video/Kconfig         | 21 +++++++++++----------
> >>>>>>>>>>   drivers/video/console/Kconfig |  4 ++--
> >>>>>>>>>>   2 files changed, 13 insertions(+), 12 deletions(-)
> >>>>>>>>>>
> >>>>>>>>>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> >>>>>>>>>> index 3c20af9..8f10915 100644
> >>>>>>>>>> --- a/drivers/video/Kconfig
> >>>>>>>>>> +++ b/drivers/video/Kconfig
> >>>>>>>>>> @@ -3,7 +3,6 @@
> >>>>>>>>>>   #
> >>>>>>>>>>     menu "Graphics support"
> >>>>>>>>>> -    depends on HAS_IOMEM
> >>>>>>>>>>     config HAVE_FB_ATMEL
> >>>>>>>>>>       bool
> >>>>>>>>>> @@ -11,20 +10,22 @@ config HAVE_FB_ATMEL
> >>>>>>>>>>   config SH_LCD_MIPI_DSI
> >>>>>>>>>>       bool
> >>>>>>>>>>   -source "drivers/char/agp/Kconfig"
> >>>>>>>>>> +if HAS_IOMEM
> >>>>>>>>>> +    source "drivers/char/agp/Kconfig"
> >>>>>>>>>>   -source "drivers/gpu/vga/Kconfig"
> >>>>>>>>>> +    source "drivers/gpu/vga/Kconfig"
> >>>>>>>>>>   -source "drivers/gpu/host1x/Kconfig"
> >>>>>>>>>> -source "drivers/gpu/ipu-v3/Kconfig"
> >>>>>>>>>> +    source "drivers/gpu/host1x/Kconfig"
> >>>>>>>>>> +    source "drivers/gpu/ipu-v3/Kconfig"
> >>>>>>>>>>   -source "drivers/gpu/drm/Kconfig"
> >>>>>>>>>> +    source "drivers/gpu/drm/Kconfig"    
> >>>>>>>
> >>>>>>>
> >>>>>>> Hmmm, looks like that this makes it impossible to select VIRTIO_GPU - need still more
> >>>>>>> work.
> >>>>>>>     
> >>>>>> Sorry my fault. I had CONFIG_PCI disabled.  
> >>>>>
> >>>>> That smells like the s390 HAS_IOMEM stuff needs more work -- I guess
> >>>>> that you want to enable a ccw virtio-gpu device, not a pci one, right?  
> >>>>
> >>>> It is a ccw virtio-gpu. But s390 has no IOMEM without CONFIG_PCI, so you cannot
> >>>> select VIRTIO_GPU, which needs DRM, which need IOMEM.  
> >>>
> >>> So the 'source "drivers/gpu/drm/Kconfig"' should maybe rather reside
> >>> outside of the "if HAS_IOMEM" path? Or does it not compile anymore that way?  
> >>
> >> virtio-gpu depends on drm. So in essence it boils down to if you want virtio-gpu
> >> you also need to enable PCI, even if the actual channel is ccw.  
> > 
> > But if you need to enable PCI to get IOMEM, I wonder why this patch here
> > is needed at all? The Graphics menu / VT dummy console should be
> > available in the config if IOMEM is enabled anyway?  
> 
> That is a good question. With CONFIG_PCI=y I can select virtio-gpu and dummy-console.
> IIRC the issue was that with patch 3 we can have the situation where we have
> CONFIG_VT = y and CONFIG_DUMMY_CONSOLE=n and this will crash early during boot as
> conswitchp is NULL. 

So in practice, CONFIG_VT depends on "there's a console available, even
if it's only the dummy one"?

> This patches goal was to always enable dummy console even without
> PCI, but it obviously fails to do so.

OTOH, the dummy console really should not depend on anything, as it is
only doing dummy things.

> 
> So what about allowing CONFIG_VT on s390 only if we have PCI?
> 
> 
> diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig
> index 84810075a6a0..1c7fe09d6f90 100644
> --- a/drivers/tty/Kconfig
> +++ b/drivers/tty/Kconfig
> @@ -11,7 +11,7 @@ if TTY
>  
>  config VT
>         bool "Virtual terminal" if EXPERT
> -       depends on !UML
> +       depends on !UML && (!S390 || PCI)
>         select INPUT
>         default y
>         ---help---
> 

Would cover your use case, but feels wrong to me... config dependencies
aren't fun :/

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
  2018-02-21 12:07                         ` Cornelia Huck
@ 2018-02-21 12:11                           ` Christian Borntraeger
  -1 siblings, 0 replies; 49+ messages in thread
From: Christian Borntraeger @ 2018-02-21 12:11 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: Thomas Huth, Farhan Ali, linux-kernel, linux-s390, linux-fbdev,
	geert, tomi.valkeinen, b.zolnierkie



On 02/21/2018 01:07 PM, Cornelia Huck wrote:
[...]
>>> But if you need to enable PCI to get IOMEM, I wonder why this patch here
>>> is needed at all? The Graphics menu / VT dummy console should be
>>> available in the config if IOMEM is enabled anyway?  
>>
>> That is a good question. With CONFIG_PCI=y I can select virtio-gpu and dummy-console.
>> IIRC the issue was that with patch 3 we can have the situation where we have
>> CONFIG_VT = y and CONFIG_DUMMY_CONSOLE=n and this will crash early during boot as
>> conswitchp is NULL. 
> 
> So in practice, CONFIG_VT depends on "there's a console available, even
> if it's only the dummy one"?

Yes. Maybe we should simple move dummy_console outside of drivers/video/console/Kconfig
into something that is always available.

> 
>> This patches goal was to always enable dummy console even without
>> PCI, but it obviously fails to do so.
> 
> OTOH, the dummy console really should not depend on anything, as it is
> only doing dummy things.
> 
>>
>> So what about allowing CONFIG_VT on s390 only if we have PCI?
>>
>>
>> diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig
>> index 84810075a6a0..1c7fe09d6f90 100644
>> --- a/drivers/tty/Kconfig
>> +++ b/drivers/tty/Kconfig
>> @@ -11,7 +11,7 @@ if TTY
>>  
>>  config VT
>>         bool "Virtual terminal" if EXPERT
>> -       depends on !UML
>> +       depends on !UML && (!S390 || PCI)
>>         select INPUT
>>         default y
>>         ---help---
>>
> 
> Would cover your use case, but feels wrong to me... config dependencies
> aren't fun :/
> 

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
@ 2018-02-21 12:11                           ` Christian Borntraeger
  0 siblings, 0 replies; 49+ messages in thread
From: Christian Borntraeger @ 2018-02-21 12:11 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: Thomas Huth, Farhan Ali, linux-kernel, linux-s390, linux-fbdev,
	geert, tomi.valkeinen, b.zolnierkie



On 02/21/2018 01:07 PM, Cornelia Huck wrote:
[...]
>>> But if you need to enable PCI to get IOMEM, I wonder why this patch here
>>> is needed at all? The Graphics menu / VT dummy console should be
>>> available in the config if IOMEM is enabled anyway?  
>>
>> That is a good question. With CONFIG_PCI=y I can select virtio-gpu and dummy-console.
>> IIRC the issue was that with patch 3 we can have the situation where we have
>> CONFIG_VT = y and CONFIG_DUMMY_CONSOLE=n and this will crash early during boot as
>> conswitchp is NULL. 
> 
> So in practice, CONFIG_VT depends on "there's a console available, even
> if it's only the dummy one"?

Yes. Maybe we should simple move dummy_console outside of drivers/video/console/Kconfig
into something that is always available.

> 
>> This patches goal was to always enable dummy console even without
>> PCI, but it obviously fails to do so.
> 
> OTOH, the dummy console really should not depend on anything, as it is
> only doing dummy things.
> 
>>
>> So what about allowing CONFIG_VT on s390 only if we have PCI?
>>
>>
>> diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig
>> index 84810075a6a0..1c7fe09d6f90 100644
>> --- a/drivers/tty/Kconfig
>> +++ b/drivers/tty/Kconfig
>> @@ -11,7 +11,7 @@ if TTY
>>  
>>  config VT
>>         bool "Virtual terminal" if EXPERT
>> -       depends on !UML
>> +       depends on !UML && (!S390 || PCI)
>>         select INPUT
>>         default y
>>         ---help---
>>
> 
> Would cover your use case, but feels wrong to me... config dependencies
> aren't fun :/
> 

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
  2018-02-21 12:11                           ` Christian Borntraeger
@ 2018-02-21 16:39                             ` Farhan Ali
  -1 siblings, 0 replies; 49+ messages in thread
From: Farhan Ali @ 2018-02-21 16:39 UTC (permalink / raw)
  To: Christian Borntraeger, Cornelia Huck
  Cc: Thomas Huth, linux-kernel, linux-s390, linux-fbdev, geert,
	tomi.valkeinen, b.zolnierkie



On 02/21/2018 07:11 AM, Christian Borntraeger wrote:
> 
> 
> On 02/21/2018 01:07 PM, Cornelia Huck wrote:
> [...]
>>>> But if you need to enable PCI to get IOMEM, I wonder why this patch here
>>>> is needed at all? The Graphics menu / VT dummy console should be
>>>> available in the config if IOMEM is enabled anyway?
>>>
>>> That is a good question. With CONFIG_PCI=y I can select virtio-gpu and dummy-console.
>>> IIRC the issue was that with patch 3 we can have the situation where we have
>>> CONFIG_VT = y and CONFIG_DUMMY_CONSOLE=n and this will crash early during boot as
>>> conswitchp is NULL.

Yes, VT layer initializes very early in the boot process and looks for a 
console. If it can't find any it will crash. I believe that was the 
whole point of having the dummy console.

>>
>> So in practice, CONFIG_VT depends on "there's a console available, even
>> if it's only the dummy one"?
> 
> Yes. Maybe we should simple move dummy_console outside of drivers/video/console/Kconfig
> into something that is always available.
> 

I agree, but where should it go? consoles are kinda tightly tied to 
video/Graphics Support.

>>
>>> This patches goal was to always enable dummy console even without
>>> PCI, but it obviously fails to do so.
>>
This patch should enable the dummy console even without PCI but we won't 
have DRM/Virtio GPU.

>> OTOH, the dummy console really should not depend on anything, as it is
>> only doing dummy things.
>>
>>>
>>> So what about allowing CONFIG_VT on s390 only if we have PCI?
>>>
>>>
>>> diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig
>>> index 84810075a6a0..1c7fe09d6f90 100644
>>> --- a/drivers/tty/Kconfig
>>> +++ b/drivers/tty/Kconfig
>>> @@ -11,7 +11,7 @@ if TTY
>>>   
>>>   config VT
>>>          bool "Virtual terminal" if EXPERT
>>> -       depends on !UML
>>> +       depends on !UML && (!S390 || PCI)
>>>          select INPUT
>>>          default y
>>>          ---help---
>>>
>>
>> Would cover your use case, but feels wrong to me... config dependencies
>> aren't fun :/
>>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
@ 2018-02-21 16:39                             ` Farhan Ali
  0 siblings, 0 replies; 49+ messages in thread
From: Farhan Ali @ 2018-02-21 16:39 UTC (permalink / raw)
  To: Christian Borntraeger, Cornelia Huck
  Cc: Thomas Huth, linux-kernel, linux-s390, linux-fbdev, geert,
	tomi.valkeinen, b.zolnierkie



On 02/21/2018 07:11 AM, Christian Borntraeger wrote:
> 
> 
> On 02/21/2018 01:07 PM, Cornelia Huck wrote:
> [...]
>>>> But if you need to enable PCI to get IOMEM, I wonder why this patch here
>>>> is needed at all? The Graphics menu / VT dummy console should be
>>>> available in the config if IOMEM is enabled anyway?
>>>
>>> That is a good question. With CONFIG_PCI=y I can select virtio-gpu and dummy-console.
>>> IIRC the issue was that with patch 3 we can have the situation where we have
>>> CONFIG_VT = y and CONFIG_DUMMY_CONSOLE=n and this will crash early during boot as
>>> conswitchp is NULL.

Yes, VT layer initializes very early in the boot process and looks for a 
console. If it can't find any it will crash. I believe that was the 
whole point of having the dummy console.

>>
>> So in practice, CONFIG_VT depends on "there's a console available, even
>> if it's only the dummy one"?
> 
> Yes. Maybe we should simple move dummy_console outside of drivers/video/console/Kconfig
> into something that is always available.
> 

I agree, but where should it go? consoles are kinda tightly tied to 
video/Graphics Support.

>>
>>> This patches goal was to always enable dummy console even without
>>> PCI, but it obviously fails to do so.
>>
This patch should enable the dummy console even without PCI but we won't 
have DRM/Virtio GPU.

>> OTOH, the dummy console really should not depend on anything, as it is
>> only doing dummy things.
>>
>>>
>>> So what about allowing CONFIG_VT on s390 only if we have PCI?
>>>
>>>
>>> diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig
>>> index 84810075a6a0..1c7fe09d6f90 100644
>>> --- a/drivers/tty/Kconfig
>>> +++ b/drivers/tty/Kconfig
>>> @@ -11,7 +11,7 @@ if TTY
>>>   
>>>   config VT
>>>          bool "Virtual terminal" if EXPERT
>>> -       depends on !UML
>>> +       depends on !UML && (!S390 || PCI)
>>>          select INPUT
>>>          default y
>>>          ---help---
>>>
>>
>> Would cover your use case, but feels wrong to me... config dependencies
>> aren't fun :/
>>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
  2018-02-21 16:39                             ` Farhan Ali
@ 2018-02-22  7:34                               ` Christian Borntraeger
  -1 siblings, 0 replies; 49+ messages in thread
From: Christian Borntraeger @ 2018-02-22  7:34 UTC (permalink / raw)
  To: Farhan Ali, Cornelia Huck
  Cc: Thomas Huth, linux-kernel, linux-s390, linux-fbdev, geert,
	tomi.valkeinen, b.zolnierkie



On 02/21/2018 05:39 PM, Farhan Ali wrote:
> 
> 
> On 02/21/2018 07:11 AM, Christian Borntraeger wrote:
>>
>>
>> On 02/21/2018 01:07 PM, Cornelia Huck wrote:
>> [...]
>>>>> But if you need to enable PCI to get IOMEM, I wonder why this patch here
>>>>> is needed at all? The Graphics menu / VT dummy console should be
>>>>> available in the config if IOMEM is enabled anyway?
>>>>
>>>> That is a good question. With CONFIG_PCI=y I can select virtio-gpu and dummy-console.
>>>> IIRC the issue was that with patch 3 we can have the situation where we have
>>>> CONFIG_VT = y and CONFIG_DUMMY_CONSOLE=n and this will crash early during boot as
>>>> conswitchp is NULL.
> 
> Yes, VT layer initializes very early in the boot process and looks for a console. If it can't find any it will crash. I believe that was the whole point of having the dummy console.
> 
>>>
>>> So in practice, CONFIG_VT depends on "there's a console available, even
>>> if it's only the dummy one"?
>>
>> Yes. Maybe we should simple move dummy_console outside of drivers/video/console/Kconfig
>> into something that is always available.
>>
> 
> I agree, but where should it go? consoles are kinda tightly tied to video/Graphics Support.
> 
>>>
>>>> This patches goal was to always enable dummy console even without
>>>> PCI, but it obviously fails to do so.
>>>
> This patch should enable the dummy console even without PCI but we won't have DRM/Virtio GPU.


All right. This patch then makes sure that VT does not crash since it guarantees
that DUMMY_CONSOLE is available. If the user want to have virtio-gpu it needs to
enable PCI due to the dependencies, but this is a different issue that we can fix
later.
So the patch is fine as long as you take care of these things

- add missing HAS_IOMEM dependency to VGA_CONSOLE

- extend "if HAS_IOMEM" in drivers/video/Kconfig to cover config items
  previously covered by this dependency (it should start before config
  HAVE_FB_ATMEL and end after config HDMI)

as requested by Bartlomiej 

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support
@ 2018-02-22  7:34                               ` Christian Borntraeger
  0 siblings, 0 replies; 49+ messages in thread
From: Christian Borntraeger @ 2018-02-22  7:34 UTC (permalink / raw)
  To: Farhan Ali, Cornelia Huck
  Cc: Thomas Huth, linux-kernel, linux-s390, linux-fbdev, geert,
	tomi.valkeinen, b.zolnierkie



On 02/21/2018 05:39 PM, Farhan Ali wrote:
> 
> 
> On 02/21/2018 07:11 AM, Christian Borntraeger wrote:
>>
>>
>> On 02/21/2018 01:07 PM, Cornelia Huck wrote:
>> [...]
>>>>> But if you need to enable PCI to get IOMEM, I wonder why this patch here
>>>>> is needed at all? The Graphics menu / VT dummy console should be
>>>>> available in the config if IOMEM is enabled anyway?
>>>>
>>>> That is a good question. With CONFIG_PCI=y I can select virtio-gpu and dummy-console.
>>>> IIRC the issue was that with patch 3 we can have the situation where we have
>>>> CONFIG_VT = y and CONFIG_DUMMY_CONSOLE=n and this will crash early during boot as
>>>> conswitchp is NULL.
> 
> Yes, VT layer initializes very early in the boot process and looks for a console. If it can't find any it will crash. I believe that was the whole point of having the dummy console.
> 
>>>
>>> So in practice, CONFIG_VT depends on "there's a console available, even
>>> if it's only the dummy one"?
>>
>> Yes. Maybe we should simple move dummy_console outside of drivers/video/console/Kconfig
>> into something that is always available.
>>
> 
> I agree, but where should it go? consoles are kinda tightly tied to video/Graphics Support.
> 
>>>
>>>> This patches goal was to always enable dummy console even without
>>>> PCI, but it obviously fails to do so.
>>>
> This patch should enable the dummy console even without PCI but we won't have DRM/Virtio GPU.


All right. This patch then makes sure that VT does not crash since it guarantees
that DUMMY_CONSOLE is available. If the user want to have virtio-gpu it needs to
enable PCI due to the dependencies, but this is a different issue that we can fix
later.
So the patch is fine as long as you take care of these things

- add missing HAS_IOMEM dependency to VGA_CONSOLE

- extend "if HAS_IOMEM" in drivers/video/Kconfig to cover config items
  previously covered by this dependency (it should start before config
  HAVE_FB_ATMEL and end after config HDMI)

as requested by Bartlomiej 

^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2018-02-22  7:34 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-19 15:47 [PATCH v3 0/3] Enable CONFIG_VT support for S390 Farhan Ali
2018-02-19 15:47 ` Farhan Ali
2018-02-19 15:47 ` [PATCH v3 1/3] Kconfig : Remove HAS_IOMEM dependency for Graphics support Farhan Ali
2018-02-19 15:47   ` Farhan Ali
2018-02-19 16:25   ` Thomas Huth
2018-02-19 16:25     ` Thomas Huth
2018-02-19 16:38     ` Farhan Ali
2018-02-19 16:38       ` Farhan Ali
2018-02-21 10:05       ` Christian Borntraeger
2018-02-21 10:05         ` Christian Borntraeger
2018-02-21 10:22         ` Christian Borntraeger
2018-02-21 10:22           ` Christian Borntraeger
2018-02-21 10:32           ` Cornelia Huck
2018-02-21 10:32             ` Cornelia Huck
2018-02-21 11:09             ` Christian Borntraeger
2018-02-21 11:09               ` Christian Borntraeger
2018-02-21 11:14               ` Thomas Huth
2018-02-21 11:14                 ` Thomas Huth
2018-02-21 11:22                 ` Christian Borntraeger
2018-02-21 11:22                   ` Christian Borntraeger
2018-02-21 11:29                   ` Thomas Huth
2018-02-21 11:29                     ` Thomas Huth
2018-02-21 11:49                     ` Christian Borntraeger
2018-02-21 11:49                       ` Christian Borntraeger
2018-02-21 12:07                       ` Cornelia Huck
2018-02-21 12:07                         ` Cornelia Huck
2018-02-21 12:11                         ` Christian Borntraeger
2018-02-21 12:11                           ` Christian Borntraeger
2018-02-21 16:39                           ` Farhan Ali
2018-02-21 16:39                             ` Farhan Ali
2018-02-22  7:34                             ` Christian Borntraeger
2018-02-22  7:34                               ` Christian Borntraeger
2018-02-21 11:23                 ` Cornelia Huck
2018-02-21 11:23                   ` Cornelia Huck
2018-02-21  8:44   ` Christian Borntraeger
2018-02-21  8:44     ` Christian Borntraeger
2018-02-21 11:50     ` Bartlomiej Zolnierkiewicz
2018-02-21 11:50       ` Bartlomiej Zolnierkiewicz
2018-02-19 15:47 ` [PATCH v3 2/3] s390/char : Rename EBCDIC keymap variables Farhan Ali
2018-02-19 15:47   ` Farhan Ali
2018-02-19 19:52   ` Thomas Huth
2018-02-19 19:52     ` Thomas Huth
2018-02-19 15:47 ` [PATCH v3 3/3] s390/setup : enable display support for KVM guest Farhan Ali
2018-02-19 15:47   ` Farhan Ali
2018-02-19 19:55   ` Thomas Huth
2018-02-19 19:55     ` Thomas Huth
2018-02-20  9:43 ` [PATCH v3 0/3] Enable CONFIG_VT support for S390 Christian Borntraeger
2018-02-20  9:43   ` Christian Borntraeger
2018-02-20 13:45   ` Farhan Ali

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.