mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	Greg KH <gregkh@linuxfoundation.org>
Cc: Dave Penkler <dpenkler@gmail.com>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] staging: gpib: Fix i386 build issue
Date: Tue, 10 Dec 2024 16:56:39 -0800	[thread overview]
Message-ID: <2c6c7e9d-ca10-47a9-82a7-a2e26b1f51ef@roeck-us.net> (raw)
In-Reply-To: <CAMuHMdV2Nh6ZZ-0tW0dCt5OoBH5_OrcpON32X1YJBQYgF=eywA@mail.gmail.com>

On 12/10/24 01:02, Geert Uytterhoeven wrote:
> Hi Greg,
> 
> On Tue, Dec 10, 2024 at 9:39 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>> On Tue, Dec 10, 2024 at 08:52:08AM +0100, Geert Uytterhoeven wrote:
>>> On Mon, Dec 9, 2024 at 5:18 PM Guenter Roeck <linux@roeck-us.net> wrote:
>>>> The underlying problem is that the code uses a pointer to store the physical
>>>> address. That doesn't work if sizeof(pointer) < sizeof(physical address),
>>>> which affects systems with X86_PAE enabled. I have not seen the problem
>>>> anywhere else.
>>>
>>> I could reproduce the build issue on ARM, with CONFIG_ARM_LPAE=y,
>>> which is not enabled by allmodconfig.

I think it may actually also affect mips (CPU_MIPS32_R5_XPA) and arc
(ARC_HAS_PAE40).

>>
>> So does that mean this patch is incorrect?
> 
> Purely from an arch-agnostic LPAE PoV, it should be:
> 
>      depends on 64BIT || !PHYS_ADDR_T_64BIT
> 

Dave, would you mind submitting another version of your patch with the above
dependencies ?

> However, that assumes the driver actually works on 64-bit or non-x86.
> Perhaps people keep an old i386 to control their GPIB gear?
> 
> The drivers do not use ioremap(), but just cast the PCI resource
> addresses to void * pointers. No idea if that works on x86_64.

I did wonder about that as well, but unfortunately it isn't easy
to change, and would most definitely require testing on real hardware.

> It will probably crash spectacularly on non-x86...
> 

I'd guess so. However, that isn't something we can address here.
All we can make sure is that the code compiles.

Thanks,
Guenter


      reply	other threads:[~2024-12-11  0:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-04 16:21 Dave Penkler
2024-12-06 18:02 ` David Laight
2024-12-06 19:17   ` Guenter Roeck
2024-12-09 16:01 ` Geert Uytterhoeven
2024-12-09 16:12   ` Dave Penkler
2024-12-09 16:18   ` Guenter Roeck
2024-12-09 16:27     ` Geert Uytterhoeven
2024-12-09 16:35       ` Guenter Roeck
2024-12-10  7:52     ` Geert Uytterhoeven
2024-12-10  8:39       ` Greg KH
2024-12-10  9:02         ` Geert Uytterhoeven
2024-12-11  0:56           ` Guenter Roeck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2c6c7e9d-ca10-47a9-82a7-a2e26b1f51ef@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=dpenkler@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®