From: Finn Thain <hidden> Date: 2020-02-02 02:38:20
A few minor patches are needed to more easily boot a MIPS Magnum build
under 'qemu-system-mips64el -M magnum'. This series fixes a build failure
in the g364fb driver and modifies jazz_defconfig for use with QEMU.
Note that QEMU's dp8393x implementation has bugs, one of which prevents
the Linux jazzsonic driver from probing the chip. I have fixed the bugs
that I know of in a series of patches at,
https://github.com/fthain/qemu/commits/sonic
Finn Thain (3):
fbdev/g364fb: Fix build failure
mips/jazz: Remove redundant settings and shrink jazz_defconfig
mips/jazz: Update jazz_defconfig for MIPS Magnum
arch/mips/configs/jazz_defconfig | 267 ++-----------------------------
drivers/video/fbdev/g364fb.c | 29 +---
2 files changed, 15 insertions(+), 281 deletions(-)
--
2.24.1
From: Finn Thain <hidden> Date: 2020-02-02 02:38:27
This patch resolves these compiler errors and warnings --
CC drivers/video/fbdev/g364fb.o
drivers/video/fbdev/g364fb.c: In function 'g364fb_cursor':
drivers/video/fbdev/g364fb.c:137:9: error: 'x' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:9: note: each undeclared identifier is reported only once for each function it appears in
drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontwidth' [-Werror=implicit-function-declaration]
drivers/video/fbdev/g364fb.c:137:23: error: 'p' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:38: error: 'y' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontheight' [-Werror=implicit-function-declaration]
drivers/video/fbdev/g364fb.c: In function 'g364fb_init':
drivers/video/fbdev/g364fb.c:233:24: error: 'fbvar' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:234:24: error: 'xres' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:201:14: warning: unused variable 'j' [-Wunused-variable]
drivers/video/fbdev/g364fb.c:197:25: warning: unused variable 'pal_ptr' [-Wunused-variable]
The MIPS Magnum framebuffer console now works when tested in QEMU.
Cc: Bartlomiej Zolnierkiewicz <redacted>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Finn Thain <redacted>
---
drivers/video/fbdev/g364fb.c | 29 +++--------------------------
1 file changed, 3 insertions(+), 26 deletions(-)
@@ -230,8 +207,8 @@ int __init g364fb_init(void)*/*(unsignedshort*)(CURS_PAT_REG+14*64)=0xffff;*(unsignedshort*)(CURS_PAT_REG+15*64)=0xffff;-fb_var.xres_virtual=fbvar.xres;-fb_fix.line_length=(xres/8)*fb_var.bits_per_pixel;+fb_var.xres_virtual=fb_var.xres;+fb_fix.line_length=fb_var.xres_virtual*fb_var.bits_per_pixel/8;fb_fix.smem_start=0x40000000;/* physical address *//* get size of video memory; this is special for the JAZZ hardware */mem=(r4030_read_reg32(JAZZ_R4030_CONFIG)>>8)&3;
From: Philippe Mathieu-Daudé <hidden> Date: 2020-02-05 18:02:25
On Sun, Feb 2, 2020 at 3:41 AM Finn Thain [off-list ref] wrote:
This patch resolves these compiler errors and warnings --
CC drivers/video/fbdev/g364fb.o
drivers/video/fbdev/g364fb.c: In function 'g364fb_cursor':
drivers/video/fbdev/g364fb.c:137:9: error: 'x' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:9: note: each undeclared identifier is reported only once for each function it appears in
drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontwidth' [-Werror=implicit-function-declaration]
drivers/video/fbdev/g364fb.c:137:23: error: 'p' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:38: error: 'y' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontheight' [-Werror=implicit-function-declaration]
drivers/video/fbdev/g364fb.c: In function 'g364fb_init':
drivers/video/fbdev/g364fb.c:233:24: error: 'fbvar' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:234:24: error: 'xres' undeclared (first use in this function)
18 years unnoticed...
drivers/video/fbdev/g364fb.c:201:14: warning: unused variable 'j' [-Wunused-variable]
drivers/video/fbdev/g364fb.c:197:25: warning: unused variable 'pal_ptr' [-Wunused-variable]
The MIPS Magnum framebuffer console now works when tested in QEMU.
Cc: Bartlomiej Zolnierkiewicz <redacted>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
@@ -230,8 +207,8 @@ int __init g364fb_init(void)*/*(unsignedshort*)(CURS_PAT_REG+14*64)=0xffff;*(unsignedshort*)(CURS_PAT_REG+15*64)=0xffff;-fb_var.xres_virtual=fbvar.xres;-fb_fix.line_length=(xres/8)*fb_var.bits_per_pixel;+fb_var.xres_virtual=fb_var.xres;+fb_fix.line_length=fb_var.xres_virtual*fb_var.bits_per_pixel/8;fb_fix.smem_start=0x40000000;/* physical address *//* get size of video memory; this is special for the JAZZ hardware */mem=(r4030_read_reg32(JAZZ_R4030_CONFIG)>>8)&3;--
On Sun, Feb 2, 2020 at 3:41 AM Finn Thain [off-list ref] wrote:
quoted
This patch resolves these compiler errors and warnings --
CC drivers/video/fbdev/g364fb.o
drivers/video/fbdev/g364fb.c: In function 'g364fb_cursor':
drivers/video/fbdev/g364fb.c:137:9: error: 'x' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:9: note: each undeclared identifier is reported only once for each function it appears in
drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontwidth' [-Werror=implicit-function-declaration]
drivers/video/fbdev/g364fb.c:137:23: error: 'p' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:38: error: 'y' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontheight' [-Werror=implicit-function-declaration]
drivers/video/fbdev/g364fb.c: In function 'g364fb_init':
drivers/video/fbdev/g364fb.c:233:24: error: 'fbvar' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:234:24: error: 'xres' undeclared (first use in this function)
18 years unnoticed...
quoted
drivers/video/fbdev/g364fb.c:201:14: warning: unused variable 'j' [-Wunused-variable]
drivers/video/fbdev/g364fb.c:197:25: warning: unused variable 'pal_ptr' [-Wunused-variable]
The MIPS Magnum framebuffer console now works when tested in QEMU.
Cc: Bartlomiej Zolnierkiewicz <redacted>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Note, you need to rebase your series due to:
commit 8a48ac339398f21282985bff16552447d41dcfb2
Author: Jani Nikula [off-list ref]
Date: Tue Dec 3 18:38:50 2019 +0200
video: constify fb ops across all drivers
From: Finn Thain <hidden> Date: 2020-02-05 22:17:49
On Wed, 5 Feb 2020, Philippe Mathieu-Daudé wrote:
On Sun, Feb 2, 2020 at 3:41 AM Finn Thain [off-list ref] wrote:
quoted
This patch resolves these compiler errors and warnings --
CC drivers/video/fbdev/g364fb.o
drivers/video/fbdev/g364fb.c: In function 'g364fb_cursor':
drivers/video/fbdev/g364fb.c:137:9: error: 'x' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:9: note: each undeclared identifier is reported only once for each function it appears in
drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontwidth' [-Werror=implicit-function-declaration]
drivers/video/fbdev/g364fb.c:137:23: error: 'p' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:38: error: 'y' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontheight' [-Werror=implicit-function-declaration]
drivers/video/fbdev/g364fb.c: In function 'g364fb_init':
drivers/video/fbdev/g364fb.c:233:24: error: 'fbvar' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:234:24: error: 'xres' undeclared (first use in this function)
18 years unnoticed...
More likely, it was noticed by those without the skills or time to get it
fixed upstream.
Those with the hardware skills and platform knowledge to be affected by an
obscure bug aren't necessarily also capable of fixing a kernel bug,
sending a patch upstream and getting it past code review.
Getting a patch into the Linux kernel is itself a lot of work, unless
you've had years of experience with that constantly changing process
(which varies significantly between subsystems).
Kernel developers are only human and do accidentally introduce breakage in
their work (as contributors) while ironically (as reviewers) they raise
the bar for random fixes from users not versed in the 10000+ lines of
Documentation/process/*.rst
Broken code does not mean zero potential users or zero frustrated users
yet I often hear kernel developers disingenuously claim that it does.
They have an incentive to make that claim and often there's no-one reading
the mailing lists to push back.
quoted
drivers/video/fbdev/g364fb.c:201:14: warning: unused variable 'j' [-Wunused-variable]
drivers/video/fbdev/g364fb.c:197:25: warning: unused variable 'pal_ptr' [-Wunused-variable]
The MIPS Magnum framebuffer console now works when tested in QEMU.
Cc: Bartlomiej Zolnierkiewicz <redacted>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
I think the driver was broken before that point. I didn't compile it, but
it seems that "xres" still has no declaration.
BTW, is it wise to cite a sha-1 that doesn't exist in mainline?
$ git show b30e6e183a728923267
fatal: ambiguous argument 'b30e6e183a728923267': unknown revision or path
not in the working tree.
I'd prefer to use a tag like this,
References: https://git.kernel.org/tglx/history/c/b30e6e183a728923267
FWIW, if you search for "tglx.history" in git log, you can find other
stuff, like "Histroy Tree:" [sic] and "History-tree:". I don't know what
the canonical form is.
The same commit introduced the changes in g364fb_cursor(), which was
implemented previous to v2.4.0 so it is hard to follow from there.
Nobody complains during 18 years so I doubt anyone care that
g364fb_cursor() is removed.
Right. The .fb_cursor method is optional (not all framebuffers have a
hardware cursor).
And by removing it, you improve the kernel quality, so:
Reviewed-by: Philippe Mathieu-Daudé <redacted>
(Maybe remove the unhelpful 'Fixes' tag).
In the past I've seen other reviewers of other patches say the same thing
("Please remove Fixes: Linux 2.6.12-rc2"). I don't know why.
I used that tag because it indicates that the patch can be backported at
least as far as the stated commit. Certainly the bug exists in Linux
2.6.12-rc2, so the "Fixes" tag is meaningful in that sense.
@@ -230,8 +207,8 @@ int __init g364fb_init(void)*/*(unsignedshort*)(CURS_PAT_REG+14*64)=0xffff;*(unsignedshort*)(CURS_PAT_REG+15*64)=0xffff;-fb_var.xres_virtual=fbvar.xres;-fb_fix.line_length=(xres/8)*fb_var.bits_per_pixel;+fb_var.xres_virtual=fb_var.xres;+fb_fix.line_length=fb_var.xres_virtual*fb_var.bits_per_pixel/8;fb_fix.smem_start=0x40000000;/* physical address *//* get size of video memory; this is special for the JAZZ hardware */mem=(r4030_read_reg32(JAZZ_R4030_CONFIG)>>8)&3;--
From: Finn Thain <hidden> Date: 2020-02-05 22:18:27
On Wed, 5 Feb 2020, Philippe Mathieu-Daudé wrote:
Note, you need to rebase your series due to:
commit 8a48ac339398f21282985bff16552447d41dcfb2
Author: Jani Nikula [off-list ref]
Date: Tue Dec 3 18:38:50 2019 +0200
video: constify fb ops across all drivers
On Sun, Feb 2, 2020 at 3:41 AM Finn Thain [off-list ref] wrote:
quoted
This patch resolves these compiler errors and warnings --
CC drivers/video/fbdev/g364fb.o
drivers/video/fbdev/g364fb.c: In function 'g364fb_cursor':
drivers/video/fbdev/g364fb.c:137:9: error: 'x' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:9: note: each undeclared identifier is reported only once for each function it appears in
drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontwidth' [-Werror=implicit-function-declaration]
drivers/video/fbdev/g364fb.c:137:23: error: 'p' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:38: error: 'y' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontheight' [-Werror=implicit-function-declaration]
drivers/video/fbdev/g364fb.c: In function 'g364fb_init':
drivers/video/fbdev/g364fb.c:233:24: error: 'fbvar' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:234:24: error: 'xres' undeclared (first use in this function)
18 years unnoticed...
More likely, it was noticed by those without the skills or time to get it
fixed upstream.
Those with the hardware skills and platform knowledge to be affected by an
obscure bug aren't necessarily also capable of fixing a kernel bug,
sending a patch upstream and getting it past code review.
Getting a patch into the Linux kernel is itself a lot of work, unless
you've had years of experience with that constantly changing process
(which varies significantly between subsystems).
I see, I'm not custom to kernel workflow.
Kernel developers are only human and do accidentally introduce breakage in
their work (as contributors) while ironically (as reviewers) they raise
the bar for random fixes from users not versed in the 10000+ lines of
Documentation/process/*.rst
Broken code does not mean zero potential users or zero frustrated users
yet I often hear kernel developers disingenuously claim that it does.
They have an incentive to make that claim and often there's no-one reading
the mailing lists to push back.
But broken code is also bad example of code. The removed code is still
buried in the git tree.
quoted
quoted
drivers/video/fbdev/g364fb.c:201:14: warning: unused variable 'j' [-Wunused-variable]
drivers/video/fbdev/g364fb.c:197:25: warning: unused variable 'pal_ptr' [-Wunused-variable]
The MIPS Magnum framebuffer console now works when tested in QEMU.
Cc: Bartlomiej Zolnierkiewicz <redacted>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
I think the driver was broken before that point. I didn't compile it, but
it seems that "xres" still has no declaration.
BTW, is it wise to cite a sha-1 that doesn't exist in mainline?
I didn't want to suggest referencing an external sha1, but rather the full link.
Anyway I later figured out your reference isn't incorrect, this code
was really added in commit 1da177e4c3f4.
Maybe you can use:
Fixes: 1da177e4c3f4 (code modified earlier during v2.5.17-v2.5.19)
Anyway I'm bike-shedding, whichever reference you choose will be fine, even
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
$ git show b30e6e183a728923267
fatal: ambiguous argument 'b30e6e183a728923267': unknown revision or path
not in the working tree.
I'd prefer to use a tag like this,
References: https://git.kernel.org/tglx/history/c/b30e6e183a728923267
FWIW, if you search for "tglx.history" in git log, you can find other
stuff, like "Histroy Tree:" [sic] and "History-tree:". I don't know what
the canonical form is.
quoted
The same commit introduced the changes in g364fb_cursor(), which was
implemented previous to v2.4.0 so it is hard to follow from there.
Nobody complains during 18 years so I doubt anyone care that
g364fb_cursor() is removed.
Right. The .fb_cursor method is optional (not all framebuffers have a
hardware cursor).
In the past I've seen other reviewers of other patches say the same thing
("Please remove Fixes: Linux 2.6.12-rc2"). I don't know why.
I used that tag because it indicates that the patch can be backported at
least as far as the stated commit. Certainly the bug exists in Linux
2.6.12-rc2, so the "Fixes" tag is meaningful in that sense.
@@ -230,8 +207,8 @@ int __init g364fb_init(void)*/*(unsignedshort*)(CURS_PAT_REG+14*64)=0xffff;*(unsignedshort*)(CURS_PAT_REG+15*64)=0xffff;-fb_var.xres_virtual=fbvar.xres;-fb_fix.line_length=(xres/8)*fb_var.bits_per_pixel;+fb_var.xres_virtual=fb_var.xres;+fb_fix.line_length=fb_var.xres_virtual*fb_var.bits_per_pixel/8;fb_fix.smem_start=0x40000000;/* physical address *//* get size of video memory; this is special for the JAZZ hardware */mem=(r4030_read_reg32(JAZZ_R4030_CONFIG)>>8)&3;--
From: Finn Thain <hidden> Date: 2020-02-07 00:10:29
On Fri, 7 Feb 2020, Philippe Mathieu-Daudé wrote:
On Wed, Feb 5, 2020 at 11:18 PM Finn Thain [off-list ref] wrote:
quoted
On Wed, 5 Feb 2020, Philippe Mathieu-Daudé wrote:
quoted
On Sun, Feb 2, 2020 at 3:41 AM Finn Thain [off-list ref] wrote:
quoted
This patch resolves these compiler errors and warnings --
CC drivers/video/fbdev/g364fb.o
drivers/video/fbdev/g364fb.c: In function 'g364fb_cursor':
drivers/video/fbdev/g364fb.c:137:9: error: 'x' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:9: note: each undeclared identifier is reported only once for each function it appears in
drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontwidth' [-Werror=implicit-function-declaration]
drivers/video/fbdev/g364fb.c:137:23: error: 'p' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:38: error: 'y' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontheight' [-Werror=implicit-function-declaration]
drivers/video/fbdev/g364fb.c: In function 'g364fb_init':
drivers/video/fbdev/g364fb.c:233:24: error: 'fbvar' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:234:24: error: 'xres' undeclared (first use in this function)
18 years unnoticed...
More likely, it was noticed by those without the skills or time to get
it fixed upstream.
Those with the hardware skills and platform knowledge to be affected
by an obscure bug aren't necessarily also capable of fixing a kernel
bug, sending a patch upstream and getting it past code review.
Getting a patch into the Linux kernel is itself a lot of work, unless
you've had years of experience with that constantly changing process
(which varies significantly between subsystems).
I see, I'm not custom to kernel workflow.
quoted
Kernel developers are only human and do accidentally introduce
breakage in their work (as contributors) while ironically (as
reviewers) they raise the bar for random fixes from users not versed
in the 10000+ lines of Documentation/process/*.rst
Broken code does not mean zero potential users or zero frustrated
users yet I often hear kernel developers disingenuously claim that it
does. They have an incentive to make that claim and often there's
no-one reading the mailing lists to push back.
But broken code is also bad example of code. The removed code is still
buried in the git tree.
Some bugs may never be noticed and yet everyone assumes that they are
present (hence "defence in depth" and all of the complexity that entails).
My complaint was really about broken code being used as a rationale to
remove additional code (whatever its quality).
For example, some maintainers would say, "18 years unnoticed... don't stop
at g364fb_cursor(), remove the entire driver".