2016-10-03 09:07:56

by Jiri Slaby

[permalink] [raw]
Subject: [PATCH -resend 1/6] mdacon: align code in mda_detect properly

This is just a whitespace cleanup. The code was a mess having multiple
commands on one line like:
scr_writew(0xAA55, p); if (scr_readw(p) == 0xAA55) count++;

Indent that properly and make it nicer for reading.

Signed-off-by: Jiri Slaby <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: <[email protected]>
---
drivers/video/console/mdacon.c | 60 ++++++++++++++++++++++++------------------
1 file changed, 35 insertions(+), 25 deletions(-)

diff --git a/drivers/video/console/mdacon.c b/drivers/video/console/mdacon.c
index bacbb044d77c..64c2c5e8d00b 100644
--- a/drivers/video/console/mdacon.c
+++ b/drivers/video/console/mdacon.c
@@ -208,10 +208,17 @@ static int mda_detect(void)
p = (u16 *) mda_vram_base;
q = (u16 *) (mda_vram_base + 0x01000);

- p_save = scr_readw(p); q_save = scr_readw(q);
+ p_save = scr_readw(p);
+ q_save = scr_readw(q);
+
+ scr_writew(0xAA55, p);
+ if (scr_readw(p) == 0xAA55)
+ count++;
+
+ scr_writew(0x55AA, p);
+ if (scr_readw(p) == 0x55AA)
+ count++;

- scr_writew(0xAA55, p); if (scr_readw(p) == 0xAA55) count++;
- scr_writew(0x55AA, p); if (scr_readw(p) == 0x55AA) count++;
scr_writew(p_save, p);

if (count != 2) {
@@ -220,13 +227,18 @@ static int mda_detect(void)

/* check if we have 4K or 8K */

- scr_writew(0xA55A, q); scr_writew(0x0000, p);
- if (scr_readw(q) == 0xA55A) count++;
+ scr_writew(0xA55A, q);
+ scr_writew(0x0000, p);
+ if (scr_readw(q) == 0xA55A)
+ count++;

- scr_writew(0x5AA5, q); scr_writew(0x0000, p);
- if (scr_readw(q) == 0x5AA5) count++;
+ scr_writew(0x5AA5, q);
+ scr_writew(0x0000, p);
+ if (scr_readw(q) == 0x5AA5)
+ count++;

- scr_writew(p_save, p); scr_writew(q_save, q);
+ scr_writew(p_save, p);
+ scr_writew(q_save, q);

if (count == 4) {
mda_vram_len = 0x02000;
@@ -240,14 +252,12 @@ static int mda_detect(void)
/* Edward: These two mess `tests' mess up my cursor on bootup */

/* cursor low register */
- if (! test_mda_b(0x66, 0x0f)) {
+ if (!test_mda_b(0x66, 0x0f))
return 0;
- }

/* cursor low register */
- if (! test_mda_b(0x99, 0x0f)) {
+ if (!test_mda_b(0x99, 0x0f))
return 0;
- }
#endif

/* See if the card is a Hercules, by checking whether the vsync
@@ -257,25 +267,25 @@ static int mda_detect(void)

p_save = q_save = inb_p(mda_status_port) & MDA_STATUS_VSYNC;

- for (count=0; count < 50000 && p_save == q_save; count++) {
+ for (count = 0; count < 50000 && p_save == q_save; count++) {
q_save = inb(mda_status_port) & MDA_STATUS_VSYNC;
udelay(2);
}

if (p_save != q_save) {
switch (inb_p(mda_status_port) & 0x70) {
- case 0x10:
- mda_type = TYPE_HERCPLUS;
- mda_type_name = "HerculesPlus";
- break;
- case 0x50:
- mda_type = TYPE_HERCCOLOR;
- mda_type_name = "HerculesColor";
- break;
- default:
- mda_type = TYPE_HERC;
- mda_type_name = "Hercules";
- break;
+ case 0x10:
+ mda_type = TYPE_HERCPLUS;
+ mda_type_name = "HerculesPlus";
+ break;
+ case 0x50:
+ mda_type = TYPE_HERCCOLOR;
+ mda_type_name = "HerculesColor";
+ break;
+ default:
+ mda_type = TYPE_HERC;
+ mda_type_name = "Hercules";
+ break;
}
}

--
2.10.0


2016-10-03 09:07:46

by Jiri Slaby

[permalink] [raw]
Subject: [PATCH -resend 2/6] mdacon: make mda_vram_base u16 *

Given every user of mda_vram_base expects a pointer, let
mda_vram_base be a pointer to u16.

The offset calculation in mda_detect had to be adjusted by / 2 (due to
different pointer arithmetic now).

We introduce a cast to a value returned from VGA_MAP_MEM. But I will
change VGA_MAP_MEM to return a pointer later too. But vgacon needs a
similar change first.

Signed-off-by: Jiri Slaby <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: <[email protected]>
---
drivers/video/console/mdacon.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/video/console/mdacon.c b/drivers/video/console/mdacon.c
index 64c2c5e8d00b..814606bd26d1 100644
--- a/drivers/video/console/mdacon.c
+++ b/drivers/video/console/mdacon.c
@@ -48,7 +48,7 @@ static DEFINE_SPINLOCK(mda_lock);

/* description of the hardware layout */

-static unsigned long mda_vram_base; /* Base of video memory */
+static u16 *mda_vram_base; /* Base of video memory */
static unsigned long mda_vram_len; /* Size of video memory */
static unsigned int mda_num_columns; /* Number of text columns */
static unsigned int mda_num_lines; /* Number of text lines */
@@ -205,8 +205,8 @@ static int mda_detect(void)

/* do a memory check */

- p = (u16 *) mda_vram_base;
- q = (u16 *) (mda_vram_base + 0x01000);
+ p = mda_vram_base;
+ q = mda_vram_base + 0x01000 / 2;

p_save = scr_readw(p);
q_save = scr_readw(q);
@@ -323,7 +323,7 @@ static const char *mdacon_startup(void)
mda_num_lines = 25;

mda_vram_len = 0x01000;
- mda_vram_base = VGA_MAP_MEM(0xb0000, mda_vram_len);
+ mda_vram_base = (u16 *)VGA_MAP_MEM(0xb0000, mda_vram_len);

mda_index_port = 0x3b4;
mda_value_port = 0x3b5;
@@ -420,7 +420,7 @@ static void mdacon_invert_region(struct vc_data *c, u16 *p, int count)
}
}

-#define MDA_ADDR(x,y) ((u16 *) mda_vram_base + (y)*mda_num_columns + (x))
+#define MDA_ADDR(x, y) (mda_vram_base + (y)*mda_num_columns + (x))

static void mdacon_putc(struct vc_data *c, int ch, int y, int x)
{
@@ -463,7 +463,7 @@ static int mdacon_blank(struct vc_data *c, int blank, int mode_switch)
{
if (mda_type == TYPE_MDA) {
if (blank)
- scr_memsetw((void *)mda_vram_base,
+ scr_memsetw(mda_vram_base,
mda_convert_attr(c->vc_video_erase_char),
c->vc_screenbuf_size);
/* Tell console.c that it has to restore the screen itself */
--
2.10.0

2016-10-03 09:08:07

by Jiri Slaby

[permalink] [raw]
Subject: [PATCH -resend 3/6] mdacon: replace MDA_ADDR macro by inline function

MDA_ADDR is one of those macros which could be an inline function. So
convert MDA_ADDR to mda_addr.

Note that we take x and y as unsigned now. But they are absolute
coordinates, so this is no problem.

Signed-off-by: Jiri Slaby <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: <[email protected]>
---
drivers/video/console/mdacon.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/video/console/mdacon.c b/drivers/video/console/mdacon.c
index 814606bd26d1..24fe55134eb5 100644
--- a/drivers/video/console/mdacon.c
+++ b/drivers/video/console/mdacon.c
@@ -420,17 +420,20 @@ static void mdacon_invert_region(struct vc_data *c, u16 *p, int count)
}
}

-#define MDA_ADDR(x, y) (mda_vram_base + (y)*mda_num_columns + (x))
+static inline u16 *mda_addr(unsigned int x, unsigned int y)
+{
+ return mda_vram_base + y * mda_num_columns + x;
+}

static void mdacon_putc(struct vc_data *c, int ch, int y, int x)
{
- scr_writew(mda_convert_attr(ch), MDA_ADDR(x, y));
+ scr_writew(mda_convert_attr(ch), mda_addr(x, y));
}

static void mdacon_putcs(struct vc_data *c, const unsigned short *s,
int count, int y, int x)
{
- u16 *dest = MDA_ADDR(x, y);
+ u16 *dest = mda_addr(x, y);

for (; count > 0; count--) {
scr_writew(mda_convert_attr(scr_readw(s++)), dest++);
@@ -440,7 +443,7 @@ static void mdacon_putcs(struct vc_data *c, const unsigned short *s,
static void mdacon_clear(struct vc_data *c, int y, int x,
int height, int width)
{
- u16 *dest = MDA_ADDR(x, y);
+ u16 *dest = mda_addr(x, y);
u16 eattr = mda_convert_attr(c->vc_video_erase_char);

if (width <= 0 || height <= 0)
@@ -511,16 +514,16 @@ static int mdacon_scroll(struct vc_data *c, int t, int b, int dir, int lines)
switch (dir) {

case SM_UP:
- scr_memmovew(MDA_ADDR(0,t), MDA_ADDR(0,t+lines),
+ scr_memmovew(mda_addr(0, t), mda_addr(0, t + lines),
(b-t-lines)*mda_num_columns*2);
- scr_memsetw(MDA_ADDR(0,b-lines), eattr,
+ scr_memsetw(mda_addr(0, b - lines), eattr,
lines*mda_num_columns*2);
break;

case SM_DOWN:
- scr_memmovew(MDA_ADDR(0,t+lines), MDA_ADDR(0,t),
+ scr_memmovew(mda_addr(0, t + lines), mda_addr(0, t),
(b-t-lines)*mda_num_columns*2);
- scr_memsetw(MDA_ADDR(0,t), eattr, lines*mda_num_columns*2);
+ scr_memsetw(mda_addr(0, t), eattr, lines*mda_num_columns*2);
break;
}

--
2.10.0

2016-10-03 09:08:18

by Jiri Slaby

[permalink] [raw]
Subject: [PATCH -resend 4/6] mdacon: enable COMPILE_TEST build

It can be built even on systems without ISA. So enable compile testing
by specifying ISA || COMPILE_TEST.

Signed-off-by: Jiri Slaby <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: <[email protected]>
---
drivers/video/console/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index 38da6e299149..7e9e8be24134 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -48,7 +48,7 @@ config VGACON_SOFT_SCROLLBACK_SIZE
screenfuls of scrollback buffer

config MDA_CONSOLE
- depends on !M68K && !PARISC && ISA
+ depends on !M68K && !PARISC && (ISA || COMPILE_TEST)
tristate "MDA text console (dual-headed)"
---help---
Say Y here if you have an old MDA or monochrome Hercules graphics
--
2.10.0

2016-10-03 09:08:26

by Jiri Slaby

[permalink] [raw]
Subject: [PATCH -resend 6/6] frv, mn10300, s390, sh: remove empty vga.h

Provided the architectures do not need any special handling (they seem
not to support vga at all, actually), there is no need to have an
empty vga.h. Let them refer to the generic one instead.

Signed-off-by: Jiri Slaby <[email protected]>
Cc: David Howells <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Yoshinori Sato <[email protected]>
Cc: Rich Felker <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
arch/frv/include/asm/Kbuild | 1 +
arch/frv/include/asm/vga.h | 17 -----------------
arch/mn10300/include/asm/Kbuild | 1 +
arch/mn10300/include/asm/vga.h | 17 -----------------
arch/s390/include/asm/Kbuild | 1 +
arch/s390/include/asm/vga.h | 6 ------
arch/sh/include/asm/Kbuild | 1 +
arch/sh/include/asm/vga.h | 6 ------
8 files changed, 4 insertions(+), 46 deletions(-)
delete mode 100644 arch/frv/include/asm/vga.h
delete mode 100644 arch/mn10300/include/asm/vga.h
delete mode 100644 arch/s390/include/asm/vga.h
delete mode 100644 arch/sh/include/asm/vga.h

diff --git a/arch/frv/include/asm/Kbuild b/arch/frv/include/asm/Kbuild
index 1fa084cf1a43..d1a5c16a2e0f 100644
--- a/arch/frv/include/asm/Kbuild
+++ b/arch/frv/include/asm/Kbuild
@@ -7,4 +7,5 @@ generic-y += mcs_spinlock.h
generic-y += mm-arch-hooks.h
generic-y += preempt.h
generic-y += trace_clock.h
+generic-y += vga.h
generic-y += word-at-a-time.h
diff --git a/arch/frv/include/asm/vga.h b/arch/frv/include/asm/vga.h
deleted file mode 100644
index a702c800a229..000000000000
--- a/arch/frv/include/asm/vga.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* vga.h: VGA register stuff
- *
- * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells ([email protected])
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-#ifndef _ASM_VGA_H
-#define _ASM_VGA_H
-
-
-
-#endif /* _ASM_VGA_H */
diff --git a/arch/mn10300/include/asm/Kbuild b/arch/mn10300/include/asm/Kbuild
index 1c8dd0f5cd5d..ee06fceabde0 100644
--- a/arch/mn10300/include/asm/Kbuild
+++ b/arch/mn10300/include/asm/Kbuild
@@ -9,4 +9,5 @@ generic-y += mm-arch-hooks.h
generic-y += preempt.h
generic-y += sections.h
generic-y += trace_clock.h
+generic-y += vga.h
generic-y += word-at-a-time.h
diff --git a/arch/mn10300/include/asm/vga.h b/arch/mn10300/include/asm/vga.h
deleted file mode 100644
index 0163e50a3459..000000000000
--- a/arch/mn10300/include/asm/vga.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* MN10300 VGA register definitions
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells ([email protected])
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-
-#ifndef _ASM_VGA_H
-#define _ASM_VGA_H
-
-
-
-#endif /* _ASM_VGA_H */
diff --git a/arch/s390/include/asm/Kbuild b/arch/s390/include/asm/Kbuild
index 20f196b82a6e..fe3442827e61 100644
--- a/arch/s390/include/asm/Kbuild
+++ b/arch/s390/include/asm/Kbuild
@@ -7,4 +7,5 @@ generic-y += mcs_spinlock.h
generic-y += mm-arch-hooks.h
generic-y += preempt.h
generic-y += trace_clock.h
+generic-y += vga.h
generic-y += word-at-a-time.h
diff --git a/arch/s390/include/asm/vga.h b/arch/s390/include/asm/vga.h
deleted file mode 100644
index d375526c261f..000000000000
--- a/arch/s390/include/asm/vga.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ASM_S390_VGA_H
-#define _ASM_S390_VGA_H
-
-/* Avoid compile errors due to missing asm/vga.h */
-
-#endif /* _ASM_S390_VGA_H */
diff --git a/arch/sh/include/asm/Kbuild b/arch/sh/include/asm/Kbuild
index 751c3373a92c..5b8bfba7522d 100644
--- a/arch/sh/include/asm/Kbuild
+++ b/arch/sh/include/asm/Kbuild
@@ -38,4 +38,5 @@ generic-y += termbits.h
generic-y += termios.h
generic-y += trace_clock.h
generic-y += ucontext.h
+generic-y += vga.h
generic-y += xor.h
diff --git a/arch/sh/include/asm/vga.h b/arch/sh/include/asm/vga.h
deleted file mode 100644
index 06a5de8ace1a..000000000000
--- a/arch/sh/include/asm/vga.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __ASM_SH_VGA_H
-#define __ASM_SH_VGA_H
-
-/* Stupid drivers. */
-
-#endif /* __ASM_SH_VGA_H */
--
2.10.0

2016-10-03 09:08:45

by Jiri Slaby

[permalink] [raw]
Subject: [PATCH -resend 5/6] m32r, microblaze, x86, xtensa: use generic vga.h

What these architectures declare is the same as what can be found in
asm-generic/vga.h. So use that header instead.

Signed-off-by: Jiri Slaby <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Chris Zankel <[email protected]>
Cc: Max Filippov <[email protected]>
Cc: [email protected]
Cc: [email protected]
Acked-by (x86 part): Thomas Gleixner <[email protected]>
---
arch/m32r/include/asm/Kbuild | 1 +
arch/m32r/include/asm/vga.h | 20 --------------------
arch/microblaze/include/asm/Kbuild | 1 +
arch/microblaze/include/asm/vga.h | 1 -
arch/x86/include/asm/Kbuild | 1 +
arch/x86/include/asm/vga.h | 20 --------------------
arch/xtensa/include/asm/Kbuild | 1 +
arch/xtensa/include/asm/vga.h | 19 -------------------
8 files changed, 4 insertions(+), 60 deletions(-)
delete mode 100644 arch/m32r/include/asm/vga.h
delete mode 100644 arch/microblaze/include/asm/vga.h
delete mode 100644 arch/x86/include/asm/vga.h
delete mode 100644 arch/xtensa/include/asm/vga.h

diff --git a/arch/m32r/include/asm/Kbuild b/arch/m32r/include/asm/Kbuild
index 860e440611c9..dd07f8248656 100644
--- a/arch/m32r/include/asm/Kbuild
+++ b/arch/m32r/include/asm/Kbuild
@@ -10,4 +10,5 @@ generic-y += module.h
generic-y += preempt.h
generic-y += sections.h
generic-y += trace_clock.h
+generic-y += vga.h
generic-y += word-at-a-time.h
diff --git a/arch/m32r/include/asm/vga.h b/arch/m32r/include/asm/vga.h
deleted file mode 100644
index a1b63061c06f..000000000000
--- a/arch/m32r/include/asm/vga.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef _ASM_M32R_VGA_H
-#define _ASM_M32R_VGA_H
-
-/*
- * Access to VGA videoram
- *
- * (c) 1998 Martin Mares <[email protected]>
- */
-
-/*
- * On the PC, we can just recalculate addresses and then
- * access the videoram directly without any black magic.
- */
-
-#define VGA_MAP_MEM(x,s) (unsigned long)phys_to_virt(x)
-
-#define vga_readb(x) (*(x))
-#define vga_writeb(x,y) (*(y) = (x))
-
-#endif /* _ASM_M32R_VGA_H */
diff --git a/arch/microblaze/include/asm/Kbuild b/arch/microblaze/include/asm/Kbuild
index b0ae88c9fed9..be768a03e90d 100644
--- a/arch/microblaze/include/asm/Kbuild
+++ b/arch/microblaze/include/asm/Kbuild
@@ -10,4 +10,5 @@ generic-y += mm-arch-hooks.h
generic-y += preempt.h
generic-y += syscalls.h
generic-y += trace_clock.h
+generic-y += vga.h
generic-y += word-at-a-time.h
diff --git a/arch/microblaze/include/asm/vga.h b/arch/microblaze/include/asm/vga.h
deleted file mode 100644
index 89d82fd8fcf1..000000000000
--- a/arch/microblaze/include/asm/vga.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/vga.h>
diff --git a/arch/x86/include/asm/Kbuild b/arch/x86/include/asm/Kbuild
index 2cfed174e3c9..4f80b24e7a70 100644
--- a/arch/x86/include/asm/Kbuild
+++ b/arch/x86/include/asm/Kbuild
@@ -16,3 +16,4 @@ generic-y += dma-contiguous.h
generic-y += early_ioremap.h
generic-y += mcs_spinlock.h
generic-y += mm-arch-hooks.h
+generic-y += vga.h
diff --git a/arch/x86/include/asm/vga.h b/arch/x86/include/asm/vga.h
deleted file mode 100644
index c4b9dc2f67c5..000000000000
--- a/arch/x86/include/asm/vga.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Access to VGA videoram
- *
- * (c) 1998 Martin Mares <[email protected]>
- */
-
-#ifndef _ASM_X86_VGA_H
-#define _ASM_X86_VGA_H
-
-/*
- * On the PC, we can just recalculate addresses and then
- * access the videoram directly without any black magic.
- */
-
-#define VGA_MAP_MEM(x, s) (unsigned long)phys_to_virt(x)
-
-#define vga_readb(x) (*(x))
-#define vga_writeb(x, y) (*(y) = (x))
-
-#endif /* _ASM_X86_VGA_H */
diff --git a/arch/xtensa/include/asm/Kbuild b/arch/xtensa/include/asm/Kbuild
index 28cf4c5d65ef..a0213f52c6cd 100644
--- a/arch/xtensa/include/asm/Kbuild
+++ b/arch/xtensa/include/asm/Kbuild
@@ -29,5 +29,6 @@ generic-y += statfs.h
generic-y += termios.h
generic-y += topology.h
generic-y += trace_clock.h
+generic-y += vga.h
generic-y += word-at-a-time.h
generic-y += xor.h
diff --git a/arch/xtensa/include/asm/vga.h b/arch/xtensa/include/asm/vga.h
deleted file mode 100644
index 1fd8cab3a297..000000000000
--- a/arch/xtensa/include/asm/vga.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * include/asm-xtensa/vga.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_VGA_H
-#define _XTENSA_VGA_H
-
-#define VGA_MAP_MEM(x,s) (unsigned long)phys_to_virt(x)
-
-#define vga_readb(x) (*(x))
-#define vga_writeb(x,y) (*(y) = (x))
-
-#endif
--
2.10.0

2016-10-03 09:10:29

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH -resend 6/6] frv, mn10300, s390, sh: remove empty vga.h

On Mon, Oct 3, 2016 at 11:07 AM, Jiri Slaby <[email protected]> wrote:
> Provided the architectures do not need any special handling (they seem
> not to support vga at all, actually), there is no need to have an
> empty vga.h. Let them refer to the generic one instead.
>
> Signed-off-by: Jiri Slaby <[email protected]>
> Cc: David Howells <[email protected]>
> Cc: Martin Schwidefsky <[email protected]>
> Cc: Heiko Carstens <[email protected]>
> Cc: Yoshinori Sato <[email protected]>
> Cc: Rich Felker <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]

Acked-by: Geert Uytterhoeven <[email protected]>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2016-10-03 09:35:34

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH -resend 4/6] mdacon: enable COMPILE_TEST build

On Mon, Oct 3, 2016 at 11:07 AM, Jiri Slaby <[email protected]> wrote:
> It can be built even on systems without ISA. So enable compile testing
> by specifying ISA || COMPILE_TEST.
>
> Signed-off-by: Jiri Slaby <[email protected]>
> Cc: Tomi Valkeinen <[email protected]>
> Cc: <[email protected]>
> ---
> drivers/video/console/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
> index 38da6e299149..7e9e8be24134 100644
> --- a/drivers/video/console/Kconfig
> +++ b/drivers/video/console/Kconfig
> @@ -48,7 +48,7 @@ config VGACON_SOFT_SCROLLBACK_SIZE
> screenfuls of scrollback buffer
>
> config MDA_CONSOLE
> - depends on !M68K && !PARISC && ISA
> + depends on !M68K && !PARISC && (ISA || COMPILE_TEST)

My first thought was

depends on (!M68K && !PARISC && ISA) || COMPILE_TEST

but arch/m68k/include/asm/vga.h doesn't define VGA_MAP_MEM().
Adding #include <asm-generic/vga.h> at the end of arch/m68k/include/asm/vga.h
fixes that.

Do we want that?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2016-10-03 17:09:45

by Max Filippov

[permalink] [raw]
Subject: Re: [PATCH -resend 5/6] m32r, microblaze, x86, xtensa: use generic vga.h

On Mon, Oct 3, 2016 at 2:07 AM, Jiri Slaby <[email protected]> wrote:
> What these architectures declare is the same as what can be found in
> asm-generic/vga.h. So use that header instead.

For xtensa:
Acked-by: Max Filippov <[email protected]>

--
Thanks.
-- Max

2016-10-04 05:19:36

by Martin Schwidefsky

[permalink] [raw]
Subject: Re: [PATCH -resend 6/6] frv, mn10300, s390, sh: remove empty vga.h

On Mon, 3 Oct 2016 11:07:36 +0200
Jiri Slaby <[email protected]> wrote:

> Provided the architectures do not need any special handling (they seem
> not to support vga at all, actually), there is no need to have an
> empty vga.h. Let them refer to the generic one instead.
>
> Signed-off-by: Jiri Slaby <[email protected]>
> Cc: David Howells <[email protected]>
> Cc: Martin Schwidefsky <[email protected]>
> Cc: Heiko Carstens <[email protected]>
> Cc: Yoshinori Sato <[email protected]>
> Cc: Rich Felker <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]

Acked-by: Martin Schwidefsky <[email protected]>

--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.

2016-10-04 07:09:09

by Jiri Slaby

[permalink] [raw]
Subject: Re: [PATCH -resend 4/6] mdacon: enable COMPILE_TEST build

On 10/03/2016, 11:35 AM, Geert Uytterhoeven wrote:
>> - depends on !M68K && !PARISC && ISA
>> + depends on !M68K && !PARISC && (ISA || COMPILE_TEST)
>
> My first thought was
>
> depends on (!M68K && !PARISC && ISA) || COMPILE_TEST
>
> but arch/m68k/include/asm/vga.h doesn't define VGA_MAP_MEM().
> Adding #include <asm-generic/vga.h> at the end of arch/m68k/include/asm/vga.h
> fixes that.
>
> Do we want that?

The driver is not used much nowadays, so compile-testing on other
architectures is not worth it IMHO.

thanks,
--
js
suse labs