linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] video: fbdev: amifb: remove dead APUS support
       [not found] ` <b1cf967015c5beafa475aaa30d8e21a58caff870.camel@perches.com>
@ 2020-06-02 10:37   ` Bartlomiej Zolnierkiewicz
  2020-06-02 10:41     ` John Paul Adrian Glaubitz
  2020-06-15 20:35     ` Emil Velikov
  2020-06-02 10:38   ` [PATCH 2/2] video: fbdev: amifb: add FIXMEs about {put,get}_user() failures Bartlomiej Zolnierkiewicz
                     ` (2 subsequent siblings)
  3 siblings, 2 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-06-02 10:37 UTC (permalink / raw)
  To: linux-fbdev, dri-devel
  Cc: linux-kernel, linux-m68k, Al Viro, Geert Uytterhoeven


On 5/14/20 10:21 PM, Geert Uytterhoeven wrote:

> These #ifdefs are relics from APUS (Amiga Power-Up System), which
> added a PPC board.  APUS support was killed off a long time ago,
> when arch/ppc/ was still king, but these #ifdefs were missed, because
> they didn't test for CONFIG_APUS.

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/video/fbdev/amifb.c |   63 --------------------------------------------
 1 file changed, 63 deletions(-)

Index: b/drivers/video/fbdev/amifb.c
===================================================================
--- a/drivers/video/fbdev/amifb.c
+++ b/drivers/video/fbdev/amifb.c
@@ -576,14 +576,8 @@ static u_short maxfmode, chipset;
 #define modx(x, v)	((v) & ((x) - 1))
 
 /* if x1 is not a constant, this macro won't make real sense :-) */
-#ifdef __mc68000__
 #define DIVUL(x1, x2) ({int res; asm("divul %1,%2,%3": "=d" (res): \
 	"d" (x2), "d" ((long)((x1) / 0x100000000ULL)), "0" ((long)(x1))); res;})
-#else
-/* We know a bit about the numbers, so we can do it this way */
-#define DIVUL(x1, x2) ((((long)((unsigned long long)x1 >> 8) / x2) << 8) + \
-	((((long)((unsigned long long)x1 >> 8) % x2) << 8) / x2))
-#endif
 
 #define highw(x)	((u_long)(x)>>16 & 0xffff)
 #define loww(x)		((u_long)(x) & 0xffff)
@@ -1837,11 +1831,7 @@ static int ami_get_var_cursorinfo(struct
 				  const struct amifb_par *par)
 {
 	register u_short *lspr, *sspr;
-#ifdef __mc68000__
 	register u_long datawords asm ("d2");
-#else
-	register u_long datawords;
-#endif
 	register short delta;
 	register u_char color;
 	short height, width, bits, words;
@@ -1868,24 +1858,14 @@ static int ami_get_var_cursorinfo(struct
 		for (width = (short)var->width - 1; width >= 0; width--) {
 			if (bits == 0) {
 				bits = 16; --words;
-#ifdef __mc68000__
 				asm volatile ("movew %1@(%3:w:2),%0 ; swap %0 ; movew %1@+,%0"
 					: "=d" (datawords), "=a" (lspr) : "1" (lspr), "d" (delta));
-#else
-				datawords = (*(lspr + delta) << 16) | (*lspr++);
-#endif
 			}
 			--bits;
-#ifdef __mc68000__
 			asm volatile (
 				"clrb %0 ; swap %1 ; lslw #1,%1 ; roxlb #1,%0 ; "
 				"swap %1 ; lslw #1,%1 ; roxlb #1,%0"
 				: "=d" (color), "=d" (datawords) : "1" (datawords));
-#else
-			color = (((datawords >> 30) & 2)
-				 | ((datawords >> 15) & 1));
-			datawords <<= 1;
-#endif
 			put_user(color, data++);
 		}
 		if (bits > 0) {
@@ -1893,17 +1873,8 @@ static int ami_get_var_cursorinfo(struct
 		}
 		while (--words >= 0)
 			++lspr;
-#ifdef __mc68000__
 		asm volatile ("lea %0@(%4:w:2),%0 ; tstl %1 ; jeq 1f ; exg %0,%1\n1:"
 			: "=a" (lspr), "=a" (sspr) : "0" (lspr), "1" (sspr), "d" (delta));
-#else
-		lspr += delta;
-		if (sspr) {
-			u_short *tmp = lspr;
-			lspr = sspr;
-			sspr = tmp;
-		}
-#endif
 	}
 	return 0;
 }
@@ -1912,11 +1883,7 @@ static int ami_set_var_cursorinfo(struct
 				  u_char __user *data, struct amifb_par *par)
 {
 	register u_short *lspr, *sspr;
-#ifdef __mc68000__
 	register u_long datawords asm ("d2");
-#else
-	register u_long datawords;
-#endif
 	register short delta;
 	u_short fmode;
 	short height, width, bits, words;
@@ -1958,60 +1925,30 @@ static int ami_set_var_cursorinfo(struct
 			unsigned long tdata = 0;
 			get_user(tdata, data);
 			data++;
-#ifdef __mc68000__
 			asm volatile (
 				"lsrb #1,%2 ; roxlw #1,%0 ; swap %0 ; "
 				"lsrb #1,%2 ; roxlw #1,%0 ; swap %0"
 				: "=d" (datawords)
 				: "0" (datawords), "d" (tdata));
-#else
-			datawords = ((datawords << 1) & 0xfffefffe);
-			datawords |= tdata & 1;
-			datawords |= (tdata & 2) << (16 - 1);
-#endif
 			if (--bits == 0) {
 				bits = 16; --words;
-#ifdef __mc68000__
 				asm volatile ("swap %2 ; movew %2,%0@(%3:w:2) ; swap %2 ; movew %2,%0@+"
 					: "=a" (lspr) : "0" (lspr), "d" (datawords), "d" (delta));
-#else
-				*(lspr + delta) = (u_short) (datawords >> 16);
-				*lspr++ = (u_short) (datawords & 0xffff);
-#endif
 			}
 		}
 		if (bits < 16) {
 			--words;
-#ifdef __mc68000__
 			asm volatile (
 				"swap %2 ; lslw %4,%2 ; movew %2,%0@(%3:w:2) ; "
 				"swap %2 ; lslw %4,%2 ; movew %2,%0@+"
 				: "=a" (lspr) : "0" (lspr), "d" (datawords), "d" (delta), "d" (bits));
-#else
-			*(lspr + delta) = (u_short) (datawords >> (16 + bits));
-			*lspr++ = (u_short) ((datawords & 0x0000ffff) >> bits);
-#endif
 		}
 		while (--words >= 0) {
-#ifdef __mc68000__
 			asm volatile ("moveql #0,%%d0 ; movew %%d0,%0@(%2:w:2) ; movew %%d0,%0@+"
 				: "=a" (lspr) : "0" (lspr), "d" (delta) : "d0");
-#else
-			*(lspr + delta) = 0;
-			*lspr++ = 0;
-#endif
 		}
-#ifdef __mc68000__
 		asm volatile ("lea %0@(%4:w:2),%0 ; tstl %1 ; jeq 1f ; exg %0,%1\n1:"
 			: "=a" (lspr), "=a" (sspr) : "0" (lspr), "1" (sspr), "d" (delta));
-#else
-		lspr += delta;
-		if (sspr) {
-			u_short *tmp = lspr;
-			lspr = sspr;
-			sspr = tmp;
-		}
-#endif
 	}
 	par->crsr.height = var->height;
 	par->crsr.width = var->width;

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

* [PATCH 2/2] video: fbdev: amifb: add FIXMEs about {put,get}_user() failures
       [not found] ` <b1cf967015c5beafa475aaa30d8e21a58caff870.camel@perches.com>
  2020-06-02 10:37   ` [PATCH 1/2] video: fbdev: amifb: remove dead APUS support Bartlomiej Zolnierkiewicz
@ 2020-06-02 10:38   ` Bartlomiej Zolnierkiewicz
  2020-06-02 11:50   ` [PATCH v2 1/2] video: fbdev: amifb: add FIXME about dead APUS support Bartlomiej Zolnierkiewicz
  2020-06-02 11:52   ` [PATCH v2 2/2] video: fbdev: amifb: add FIXMEs about {put,get}_user() failures Bartlomiej Zolnierkiewicz
  3 siblings, 0 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-06-02 10:38 UTC (permalink / raw)
  To: linux-fbdev, dri-devel
  Cc: linux-kernel, linux-m68k, Al Viro, Geert Uytterhoeven

Since we lack the hardware (or proper emulator setup) for
testing needed changes add FIXMEs to document the issues
(so at least they are not forgotten).

Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/video/fbdev/amifb.c |    2 ++
 1 file changed, 2 insertions(+)

Index: b/drivers/video/fbdev/amifb.c
===================================================================
--- a/drivers/video/fbdev/amifb.c
+++ b/drivers/video/fbdev/amifb.c
@@ -1866,6 +1866,7 @@ static int ami_get_var_cursorinfo(struct
 				"clrb %0 ; swap %1 ; lslw #1,%1 ; roxlb #1,%0 ; "
 				"swap %1 ; lslw #1,%1 ; roxlb #1,%0"
 				: "=d" (color), "=d" (datawords) : "1" (datawords));
+			/* FIXME: check the return value + test the change */
 			put_user(color, data++);
 		}
 		if (bits > 0) {
@@ -1923,6 +1924,7 @@ static int ami_set_var_cursorinfo(struct
 		bits = 16; words = delta; datawords = 0;
 		for (width = (short)var->width - 1; width >= 0; width--) {
 			unsigned long tdata = 0;
+			/* FIXME: check the return value + test the change */
 			get_user(tdata, data);
 			data++;
 			asm volatile (

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

* Re: [PATCH 1/2] video: fbdev: amifb: remove dead APUS support
  2020-06-02 10:37   ` [PATCH 1/2] video: fbdev: amifb: remove dead APUS support Bartlomiej Zolnierkiewicz
@ 2020-06-02 10:41     ` John Paul Adrian Glaubitz
  2020-06-02 11:04       ` Geert Uytterhoeven
  2020-06-15 20:35     ` Emil Velikov
  1 sibling, 1 reply; 16+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-06-02 10:41 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz, linux-fbdev, dri-devel
  Cc: linux-kernel, linux-m68k, Al Viro, Geert Uytterhoeven

Hi Geert!

On 6/2/20 12:37 PM, Bartlomiej Zolnierkiewicz wrote:
> 
> On 5/14/20 10:21 PM, Geert Uytterhoeven wrote:
> 
>> These #ifdefs are relics from APUS (Amiga Power-Up System), which
>> added a PPC board.  APUS support was killed off a long time ago,
>> when arch/ppc/ was still king, but these #ifdefs were missed, because
>> they didn't test for CONFIG_APUS.
> 
> Reported-by: Al Viro <viro@zeniv.linux.org.uk>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---
>  drivers/video/fbdev/amifb.c |   63 --------------------------------------------
>  1 file changed, 63 deletions(-)

What do you mean with the sentence "when arch/ppc/ was still king"?

Does that mean - in the case we would re-add APUS support in the future, that
these particular changes would not be necessary?

I assume there could be new affordable PowerPC upgrade cards for the Amiga
in the future as the PowerPC cards are still sought after by the Amiga
community, so there is still demand for those on the market.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

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

* Re: [PATCH 1/2] video: fbdev: amifb: remove dead APUS support
  2020-06-02 10:41     ` John Paul Adrian Glaubitz
@ 2020-06-02 11:04       ` Geert Uytterhoeven
  2020-06-02 11:07         ` John Paul Adrian Glaubitz
  0 siblings, 1 reply; 16+ messages in thread
From: Geert Uytterhoeven @ 2020-06-02 11:04 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz
  Cc: Bartlomiej Zolnierkiewicz, Linux Fbdev development list,
	DRI Development, Linux Kernel Mailing List, linux-m68k, Al Viro

Hi Adrian,

On Tue, Jun 2, 2020 at 12:41 PM John Paul Adrian Glaubitz
<glaubitz@physik.fu-berlin.de> wrote:
> On 6/2/20 12:37 PM, Bartlomiej Zolnierkiewicz wrote:
> >> These #ifdefs are relics from APUS (Amiga Power-Up System), which
> >> added a PPC board.  APUS support was killed off a long time ago,
> >> when arch/ppc/ was still king, but these #ifdefs were missed, because
> >> they didn't test for CONFIG_APUS.
> >
> > Reported-by: Al Viro <viro@zeniv.linux.org.uk>
> > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> > ---
> >  drivers/video/fbdev/amifb.c |   63 --------------------------------------------
> >  1 file changed, 63 deletions(-)
>
> What do you mean with the sentence "when arch/ppc/ was still king"?

Ah, Bartl copied that from my email ;-)

There used to be APUS support under arch/ppc/.
Later, 32-bit arch/ppc/ and 64-bit arch/ppc64/ were merged in a new\
architecture port under arch/powerpc/, and the old ones were dropped.
APUS was never converted, and thus dropped.

> Does that mean - in the case we would re-add APUS support in the future, that
> these particular changes would not be necessary?

They would still be necessary, as PowerPC doesn't grok m68k instructions.
Alternatively, we could just drop the m68k inline asm, and retain the C
version instead?  I have no idea how big of a difference that would make
on m68k, using a more modern compiler than when the code was written
originally.

Note that all of this is used only for cursor handling, which I doubt is
actually used by any user space application. The only exception is the
DIVUL() macro, which is used once during initialization, thus also not
performance critical.

Gr{oetje,eeting}s,

                        Geert


--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

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

* Re: [PATCH 1/2] video: fbdev: amifb: remove dead APUS support
  2020-06-02 11:04       ` Geert Uytterhoeven
@ 2020-06-02 11:07         ` John Paul Adrian Glaubitz
  2020-06-02 11:27           ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 16+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-06-02 11:07 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Bartlomiej Zolnierkiewicz, Linux Fbdev development list,
	DRI Development, Linux Kernel Mailing List, linux-m68k, Al Viro

Hi!

On 6/2/20 1:04 PM, Geert Uytterhoeven wrote:
>> What do you mean with the sentence "when arch/ppc/ was still king"?
> 
> Ah, Bartl copied that from my email ;-)
> 
> There used to be APUS support under arch/ppc/.
> Later, 32-bit arch/ppc/ and 64-bit arch/ppc64/ were merged in a new\
> architecture port under arch/powerpc/, and the old ones were dropped.
> APUS was never converted, and thus dropped.

Ah, yes. Similar to the merge with x86.

>> Does that mean - in the case we would re-add APUS support in the future, that
>> these particular changes would not be necessary?
> 
> They would still be necessary, as PowerPC doesn't grok m68k instructions.
> Alternatively, we could just drop the m68k inline asm, and retain the C
> version instead?  I have no idea how big of a difference that would make
> on m68k, using a more modern compiler than when the code was written
> originally.

Hmm, no idea. I would keep the assembly for the time being. This was just
a question out of curiosity. We could still consider such a change if
someone should consider working on APUS support again.

> Note that all of this is used only for cursor handling, which I doubt is
> actually used by any user space application. The only exception is the
> DIVUL() macro, which is used once during initialization, thus also not
> performance critical.
I see, thanks.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

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

* Re: [PATCH 1/2] video: fbdev: amifb: remove dead APUS support
  2020-06-02 11:07         ` John Paul Adrian Glaubitz
@ 2020-06-02 11:27           ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-06-02 11:27 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz, Geert Uytterhoeven
  Cc: Linux Fbdev development list, DRI Development,
	Linux Kernel Mailing List, linux-m68k, Al Viro


On 6/2/20 1:07 PM, John Paul Adrian Glaubitz wrote:
> Hi!
> 
> On 6/2/20 1:04 PM, Geert Uytterhoeven wrote:
>>> What do you mean with the sentence "when arch/ppc/ was still king"?
>>
>> Ah, Bartl copied that from my email ;-)
>>
>> There used to be APUS support under arch/ppc/.
>> Later, 32-bit arch/ppc/ and 64-bit arch/ppc64/ were merged in a new\
>> architecture port under arch/powerpc/, and the old ones were dropped.
>> APUS was never converted, and thus dropped.
> 
> Ah, yes. Similar to the merge with x86.
> 
>>> Does that mean - in the case we would re-add APUS support in the future, that
>>> these particular changes would not be necessary?
>>
>> They would still be necessary, as PowerPC doesn't grok m68k instructions.
>> Alternatively, we could just drop the m68k inline asm, and retain the C
>> version instead?  I have no idea how big of a difference that would make
>> on m68k, using a more modern compiler than when the code was written
>> originally.
> 
> Hmm, no idea. I would keep the assembly for the time being. This was just
> a question out of curiosity. We could still consider such a change if
> someone should consider working on APUS support again.
> 
>> Note that all of this is used only for cursor handling, which I doubt is
>> actually used by any user space application. The only exception is the
>> DIVUL() macro, which is used once during initialization, thus also not
>> performance critical.
> I see, thanks.

Since the code in question is not performance critical it indeed seems to
be good idea to use C version. However it still would need be tested on
the hardware (or emulator at least) so for the time being I think that we
should just add another FIXME comment instead of doing real code changes..

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

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

* [PATCH v2 1/2] video: fbdev: amifb: add FIXME about dead APUS support
       [not found] ` <b1cf967015c5beafa475aaa30d8e21a58caff870.camel@perches.com>
  2020-06-02 10:37   ` [PATCH 1/2] video: fbdev: amifb: remove dead APUS support Bartlomiej Zolnierkiewicz
  2020-06-02 10:38   ` [PATCH 2/2] video: fbdev: amifb: add FIXMEs about {put,get}_user() failures Bartlomiej Zolnierkiewicz
@ 2020-06-02 11:50   ` Bartlomiej Zolnierkiewicz
  2020-06-02 12:03     ` Geert Uytterhoeven
  2020-06-02 11:52   ` [PATCH v2 2/2] video: fbdev: amifb: add FIXMEs about {put,get}_user() failures Bartlomiej Zolnierkiewicz
  3 siblings, 1 reply; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-06-02 11:50 UTC (permalink / raw)
  To: linux-fbdev, dri-devel
  Cc: linux-kernel, linux-m68k, Al Viro, Geert Uytterhoeven


On 5/14/20 10:21 PM, Geert Uytterhoeven wrote:

> These #ifdefs are relics from APUS (Amiga Power-Up System), which
> added a PPC board.  APUS support was killed off a long time ago,
> when arch/ppc/ was still king, but these #ifdefs were missed, because
> they didn't test for CONFIG_APUS.

Add FIXME about using the C code variants (APUS ones) in the future.

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
v2:
- added FIXME comment instead of removing the C code variants

 drivers/video/fbdev/amifb.c |    6 ++++++
 1 file changed, 6 insertions(+)

Index: b/drivers/video/fbdev/amifb.c
===================================================================
--- a/drivers/video/fbdev/amifb.c
+++ b/drivers/video/fbdev/amifb.c
@@ -575,6 +575,12 @@ static u_short maxfmode, chipset;
 #define downx(x, v)	((v) & -(x))
 #define modx(x, v)	((v) & ((x) - 1))
 
+/*
+ * FIXME: Use C variants of the code marked with #ifdef __mc68000__
+ * in the driver. It shouldn't negatively affect the performance and
+ * is required for APUS support (once it is re-added to the kernel).
+ * Needs to be tested on the hardware though..
+ */
 /* if x1 is not a constant, this macro won't make real sense :-) */
 #ifdef __mc68000__
 #define DIVUL(x1, x2) ({int res; asm("divul %1,%2,%3": "=d" (res): \

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

* [PATCH v2 2/2] video: fbdev: amifb: add FIXMEs about {put,get}_user() failures
       [not found] ` <b1cf967015c5beafa475aaa30d8e21a58caff870.camel@perches.com>
                     ` (2 preceding siblings ...)
  2020-06-02 11:50   ` [PATCH v2 1/2] video: fbdev: amifb: add FIXME about dead APUS support Bartlomiej Zolnierkiewicz
@ 2020-06-02 11:52   ` Bartlomiej Zolnierkiewicz
  2020-06-02 12:03     ` Geert Uytterhoeven
  3 siblings, 1 reply; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-06-02 11:52 UTC (permalink / raw)
  To: linux-fbdev, dri-devel
  Cc: linux-kernel, linux-m68k, Al Viro, Geert Uytterhoeven

Since we lack the hardware (or proper emulator setup) for
testing needed changes add FIXMEs to document the issues
(so at least they are not forgotten).

Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
v2:
- rebased on top of updated patch #1/2

 drivers/video/fbdev/amifb.c |    2 ++
 1 file changed, 2 insertions(+)

Index: b/drivers/video/fbdev/amifb.c
===================================================================
--- a/drivers/video/fbdev/amifb.c
+++ b/drivers/video/fbdev/amifb.c
@@ -1892,6 +1892,7 @@ static int ami_get_var_cursorinfo(struct
 				 | ((datawords >> 15) & 1));
 			datawords <<= 1;
 #endif
+			/* FIXME: check the return value + test the change */
 			put_user(color, data++);
 		}
 		if (bits > 0) {
@@ -1962,6 +1963,7 @@ static int ami_set_var_cursorinfo(struct
 		bits = 16; words = delta; datawords = 0;
 		for (width = (short)var->width - 1; width >= 0; width--) {
 			unsigned long tdata = 0;
+			/* FIXME: check the return value + test the change */
 			get_user(tdata, data);
 			data++;
 #ifdef __mc68000__

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

* Re: [PATCH v2 1/2] video: fbdev: amifb: add FIXME about dead APUS support
  2020-06-02 11:50   ` [PATCH v2 1/2] video: fbdev: amifb: add FIXME about dead APUS support Bartlomiej Zolnierkiewicz
@ 2020-06-02 12:03     ` Geert Uytterhoeven
  2020-06-02 16:12       ` Al Viro
  2020-07-10 14:23       ` Bartlomiej Zolnierkiewicz
  0 siblings, 2 replies; 16+ messages in thread
From: Geert Uytterhoeven @ 2020-06-02 12:03 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Linux Fbdev development list, DRI Development,
	Linux Kernel Mailing List, linux-m68k, Al Viro

On Tue, Jun 2, 2020 at 1:50 PM Bartlomiej Zolnierkiewicz
<b.zolnierkie@samsung.com> wrote:
> On 5/14/20 10:21 PM, Geert Uytterhoeven wrote:
> > These #ifdefs are relics from APUS (Amiga Power-Up System), which
> > added a PPC board.  APUS support was killed off a long time ago,
> > when arch/ppc/ was still king, but these #ifdefs were missed, because
> > they didn't test for CONFIG_APUS.
>
> Add FIXME about using the C code variants (APUS ones) in the future.
>
> Reported-by: Al Viro <viro@zeniv.linux.org.uk>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

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

* Re: [PATCH v2 2/2] video: fbdev: amifb: add FIXMEs about {put,get}_user() failures
  2020-06-02 11:52   ` [PATCH v2 2/2] video: fbdev: amifb: add FIXMEs about {put,get}_user() failures Bartlomiej Zolnierkiewicz
@ 2020-06-02 12:03     ` Geert Uytterhoeven
  2020-07-10 14:23       ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 16+ messages in thread
From: Geert Uytterhoeven @ 2020-06-02 12:03 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Linux Fbdev development list, DRI Development,
	Linux Kernel Mailing List, linux-m68k, Al Viro

On Tue, Jun 2, 2020 at 1:52 PM Bartlomiej Zolnierkiewicz
<b.zolnierkie@samsung.com> wrote:
> Since we lack the hardware (or proper emulator setup) for
> testing needed changes add FIXMEs to document the issues
> (so at least they are not forgotten).
>
> Cc: Al Viro <viro@zeniv.linux.org.uk>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

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

* Re: [PATCH v2 1/2] video: fbdev: amifb: add FIXME about dead APUS support
  2020-06-02 12:03     ` Geert Uytterhoeven
@ 2020-06-02 16:12       ` Al Viro
  2020-06-03  0:20         ` Finn Thain
  2020-07-10 14:23       ` Bartlomiej Zolnierkiewicz
  1 sibling, 1 reply; 16+ messages in thread
From: Al Viro @ 2020-06-02 16:12 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Bartlomiej Zolnierkiewicz, Linux Fbdev development list,
	DRI Development, Linux Kernel Mailing List, linux-m68k

On Tue, Jun 02, 2020 at 02:03:12PM +0200, Geert Uytterhoeven wrote:
> On Tue, Jun 2, 2020 at 1:50 PM Bartlomiej Zolnierkiewicz
> <b.zolnierkie@samsung.com> wrote:
> > On 5/14/20 10:21 PM, Geert Uytterhoeven wrote:
> > > These #ifdefs are relics from APUS (Amiga Power-Up System), which
> > > added a PPC board.  APUS support was killed off a long time ago,
> > > when arch/ppc/ was still king, but these #ifdefs were missed, because
> > > they didn't test for CONFIG_APUS.
> >
> > Add FIXME about using the C code variants (APUS ones) in the future.
> >
> > Reported-by: Al Viro <viro@zeniv.linux.org.uk>
> > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> 
> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

FWIW, has anyone managed to boot m68k linux kernel on e.g. FS-UAE?
I have done that on aranym (which is how I'd been doing all
testing for e.g. signal-related m68k patches) and I've seen
references to some out-of-tree qemu variant doing quadra, but
nothing for amiga emulators...

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

* Re: [PATCH v2 1/2] video: fbdev: amifb: add FIXME about dead APUS support
  2020-06-02 16:12       ` Al Viro
@ 2020-06-03  0:20         ` Finn Thain
  0 siblings, 0 replies; 16+ messages in thread
From: Finn Thain @ 2020-06-03  0:20 UTC (permalink / raw)
  To: Al Viro
  Cc: Geert Uytterhoeven, Bartlomiej Zolnierkiewicz,
	Linux Fbdev development list, DRI Development,
	Linux Kernel Mailing List, linux-m68k

On Tue, 2 Jun 2020, Al Viro wrote:

> I have done that on aranym (which is how I'd been doing all testing for 
> e.g. signal-related m68k patches) and I've seen references to some 
> out-of-tree qemu variant doing quadra, but nothing for amiga 
> emulators...
> 

Laurent Vivier's Quadra 800 emulation is no longer out of tree. It 
appeared in QEMU v4.2.0 and ethernet support was stabilized in QEMU 
v5.0.0.

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

* Re: [PATCH 1/2] video: fbdev: amifb: remove dead APUS support
  2020-06-02 10:37   ` [PATCH 1/2] video: fbdev: amifb: remove dead APUS support Bartlomiej Zolnierkiewicz
  2020-06-02 10:41     ` John Paul Adrian Glaubitz
@ 2020-06-15 20:35     ` Emil Velikov
  2020-06-15 21:26       ` Geert Uytterhoeven
  1 sibling, 1 reply; 16+ messages in thread
From: Emil Velikov @ 2020-06-15 20:35 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: linux-fbdev, ML dri-devel, linux-m68k, Geert Uytterhoeven,
	Linux-Kernel@Vger. Kernel. Org, Al Viro

Hi Bartlomiej,

On Tue, 2 Jun 2020 at 11:37, Bartlomiej Zolnierkiewicz
<b.zolnierkie@samsung.com> wrote:
>
>
> On 5/14/20 10:21 PM, Geert Uytterhoeven wrote:
>
> > These #ifdefs are relics from APUS (Amiga Power-Up System), which
> > added a PPC board.  APUS support was killed off a long time ago,
> > when arch/ppc/ was still king, but these #ifdefs were missed, because
> > they didn't test for CONFIG_APUS.
>
> Reported-by: Al Viro <viro@zeniv.linux.org.uk>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---
>  drivers/video/fbdev/amifb.c |   63 --------------------------------------------
>  1 file changed, 63 deletions(-)
>
A quick look through my checkout (drm-misc/next aka 5.8 ish), shows
multiple other places which check for the define.
And a single place where it's being set - the Makefile below.

Should those be addressed as well? Or perhaps they are and I've got an old tree.

HTH
Emil

$ git grep -c __mc68000__
arch/m68k/Makefile:1
drivers/block/floppy.c:2
drivers/ide/ide-probe.c:2
drivers/input/misc/hp_sdc_rtc.c:1
drivers/input/serio/hp_sdc.c:3
drivers/input/serio/hp_sdc_mlc.c:1
drivers/net/ethernet/i825xx/82596.c:8
drivers/tty/vt/keyboard.c:1
drivers/video/fbdev/amifb.c:11
include/linux/a.out.h:1
include/linux/hp_sdc.h:1
include/uapi/linux/a.out.h:1
lib/fonts/fonts.c:2
lib/mpi/longlong.h:1

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

* Re: [PATCH 1/2] video: fbdev: amifb: remove dead APUS support
  2020-06-15 20:35     ` Emil Velikov
@ 2020-06-15 21:26       ` Geert Uytterhoeven
  0 siblings, 0 replies; 16+ messages in thread
From: Geert Uytterhoeven @ 2020-06-15 21:26 UTC (permalink / raw)
  To: Emil Velikov
  Cc: Bartlomiej Zolnierkiewicz, linux-fbdev, ML dri-devel, linux-m68k,
	Linux-Kernel@Vger. Kernel. Org, Al Viro

Hi Emil,

On Mon, Jun 15, 2020 at 10:38 PM Emil Velikov <emil.l.velikov@gmail.com> wrote:
> On Tue, 2 Jun 2020 at 11:37, Bartlomiej Zolnierkiewicz
> <b.zolnierkie@samsung.com> wrote:
> > On 5/14/20 10:21 PM, Geert Uytterhoeven wrote:
> > > These #ifdefs are relics from APUS (Amiga Power-Up System), which
> > > added a PPC board.  APUS support was killed off a long time ago,
> > > when arch/ppc/ was still king, but these #ifdefs were missed, because
> > > they didn't test for CONFIG_APUS.
> >
> > Reported-by: Al Viro <viro@zeniv.linux.org.uk>
> > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> > ---
> >  drivers/video/fbdev/amifb.c |   63 --------------------------------------------
> >  1 file changed, 63 deletions(-)
> >
> A quick look through my checkout (drm-misc/next aka 5.8 ish), shows
> multiple other places which check for the define.
> And a single place where it's being set - the Makefile below.
>
> Should those be addressed as well? Or perhaps they are and I've got an old tree.

Only the above apply to APUS support.
All other below are probably legitimate.

> $ git grep -c __mc68000__
> arch/m68k/Makefile:1
> drivers/block/floppy.c:2
> drivers/ide/ide-probe.c:2
> drivers/input/misc/hp_sdc_rtc.c:1
> drivers/input/serio/hp_sdc.c:3
> drivers/input/serio/hp_sdc_mlc.c:1
> drivers/net/ethernet/i825xx/82596.c:8
> drivers/tty/vt/keyboard.c:1
> drivers/video/fbdev/amifb.c:11
> include/linux/a.out.h:1
> include/linux/hp_sdc.h:1
> include/uapi/linux/a.out.h:1
> lib/fonts/fonts.c:2
> lib/mpi/longlong.h:1

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

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

* Re: [PATCH v2 1/2] video: fbdev: amifb: add FIXME about dead APUS support
  2020-06-02 12:03     ` Geert Uytterhoeven
  2020-06-02 16:12       ` Al Viro
@ 2020-07-10 14:23       ` Bartlomiej Zolnierkiewicz
  1 sibling, 0 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-07-10 14:23 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux Fbdev development list, DRI Development,
	Linux Kernel Mailing List, linux-m68k, Al Viro


On 6/2/20 2:03 PM, Geert Uytterhoeven wrote:
> On Tue, Jun 2, 2020 at 1:50 PM Bartlomiej Zolnierkiewicz
> <b.zolnierkie@samsung.com> wrote:
>> On 5/14/20 10:21 PM, Geert Uytterhoeven wrote:
>>> These #ifdefs are relics from APUS (Amiga Power-Up System), which
>>> added a PPC board.  APUS support was killed off a long time ago,
>>> when arch/ppc/ was still king, but these #ifdefs were missed, because
>>> they didn't test for CONFIG_APUS.
>>
>> Add FIXME about using the C code variants (APUS ones) in the future.
>>
>> Reported-by: Al Viro <viro@zeniv.linux.org.uk>
>> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
>> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> 
> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

Applied to drm-misc-next tree.

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

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

* Re: [PATCH v2 2/2] video: fbdev: amifb: add FIXMEs about {put,get}_user() failures
  2020-06-02 12:03     ` Geert Uytterhoeven
@ 2020-07-10 14:23       ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-07-10 14:23 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux Fbdev development list, DRI Development,
	Linux Kernel Mailing List, linux-m68k, Al Viro



On 6/2/20 2:03 PM, Geert Uytterhoeven wrote:
> On Tue, Jun 2, 2020 at 1:52 PM Bartlomiej Zolnierkiewicz
> <b.zolnierkie@samsung.com> wrote:
>> Since we lack the hardware (or proper emulator setup) for
>> testing needed changes add FIXMEs to document the issues
>> (so at least they are not forgotten).
>>
>> Cc: Al Viro <viro@zeniv.linux.org.uk>
>> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
>> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> 
> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

Applied to drm-misc-next tree.

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

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

end of thread, other threads:[~2020-07-10 14:23 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200504232908eucas1p296927bc7c736ad924cefaea9a546459d@eucas1p2.samsung.com>
     [not found] ` <b1cf967015c5beafa475aaa30d8e21a58caff870.camel@perches.com>
2020-06-02 10:37   ` [PATCH 1/2] video: fbdev: amifb: remove dead APUS support Bartlomiej Zolnierkiewicz
2020-06-02 10:41     ` John Paul Adrian Glaubitz
2020-06-02 11:04       ` Geert Uytterhoeven
2020-06-02 11:07         ` John Paul Adrian Glaubitz
2020-06-02 11:27           ` Bartlomiej Zolnierkiewicz
2020-06-15 20:35     ` Emil Velikov
2020-06-15 21:26       ` Geert Uytterhoeven
2020-06-02 10:38   ` [PATCH 2/2] video: fbdev: amifb: add FIXMEs about {put,get}_user() failures Bartlomiej Zolnierkiewicz
2020-06-02 11:50   ` [PATCH v2 1/2] video: fbdev: amifb: add FIXME about dead APUS support Bartlomiej Zolnierkiewicz
2020-06-02 12:03     ` Geert Uytterhoeven
2020-06-02 16:12       ` Al Viro
2020-06-03  0:20         ` Finn Thain
2020-07-10 14:23       ` Bartlomiej Zolnierkiewicz
2020-06-02 11:52   ` [PATCH v2 2/2] video: fbdev: amifb: add FIXMEs about {put,get}_user() failures Bartlomiej Zolnierkiewicz
2020-06-02 12:03     ` Geert Uytterhoeven
2020-07-10 14:23       ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).