Re: [PATCH v6 5/6] fbdev: Move framebuffer I/O helpers into <asm/fb.h>
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: "Thomas Zimmermann" <tzimmermann@xxxxxxx>, "kernel test robot" <lkp@xxxxxxxxx>, "Helge Deller" <deller@xxxxxx>, "Geert Uytterhoeven" <geert@xxxxxxxxxxxxxx>, "Javier Martinez Canillas" <javierm@xxxxxxxxxx>, "Daniel Vetter" <daniel@xxxxxxxx>, "Vineet Gupta" <vgupta@xxxxxxxxxx>, "Huacai Chen" <chenhuacai@xxxxxxxxxx>, "WANG Xuerui" <kernel@xxxxxxxxxx>, "David S . Miller" <davem@xxxxxxxxxxxxx>, "James E . J . Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, "Sam Ravnborg" <sam@xxxxxxxxxxxx>, suijingfeng@xxxxxxxxxxx
- Subject: Re: [PATCH v6 5/6] fbdev: Move framebuffer I/O helpers into <asm/fb.h>
- From: "Arnd Bergmann" <arnd@xxxxxxxx>
- Date: Wed, 10 May 2023 17:54:18 +0200
- Cc: oe-kbuild-all@xxxxxxxxxxxxxxx, Linux-Arch <linux-arch@xxxxxxxxxxxxxxx>, linux-fbdev@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-m68k@xxxxxxxxxxxxxxx, loongarch@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, linux-snps-arc@xxxxxxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
- Feedback-id: i56a14606:Fastmail
- In-reply-to: <49684d58-c19d-b147-5e9f-2ac526dd50f0@suse.de>
- References: <20230510110557.14343-6-tzimmermann@suse.de> <202305102136.eMjTSPwH-lkp@intel.com> <f6b2d541-d235-4e98-afcc-9137fb8afa35@app.fastmail.com> <49684d58-c19d-b147-5e9f-2ac526dd50f0@suse.de>
- User-agent: Cyrus-JMAP/3.9.0-alpha0-415-gf2b17fe6c3-fm-20230503.001-gf2b17fe6
On Wed, May 10, 2023, at 16:27, Thomas Zimmermann wrote:
> Am 10.05.23 um 16:15 schrieb Arnd Bergmann:
>> On Wed, May 10, 2023, at 16:03, kernel test robot wrote:
>> I think that's a preexisting bug and I have no idea what the
>> correct solution is. Looking for HD64461 shows it being used
>> both with inw/outw and readw/writew, so there is no way to have
>> the correct type. The sh __raw_readw() definition hides this bug,
>> but that is a problem with arch/sh and it probably hides others
>> as well.
>
> The constant HD64461_IOBASE is defined as integer at
>
>
> https://elixir.bootlin.com/linux/latest/source/arch/sh/include/asm/hd64461.h#L17
>
> but fb_readw() expects a volatile-void pointer. I guess we could add a
> cast somewhere to silence the problem. In the current upstream code,
> that appears to be done by sh's __raw_readw() internally:
>
>
> https://elixir.bootlin.com/linux/latest/source/arch/sh/include/asm/io.h#L35
Sure, that would make it build again, but that still doesn't make the
code correct, since it's completely unclear what base address the
HD64461_IOBASE is relative to. The hp6xx platform code only passes it
through inw()/outw(), which take an offset relative to sh_io_port_base,
but that is not initialized on hp6xx. I tried to find in the history
when it broke, apparently that was in 2007 commit 34a780a0afeb ("sh:
hp6xx pata_platform support."), which removed the custom inw/outw
implementations.
Arnd
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]