From: Miao Wang <shankerwangmiao@gmail.com>
To: Huacai Chen <chenhuacai@kernel.org>
Cc: Binbin Zhou <zhoubinbin@loongson.cn>,
Chong Qiao <qiaochong@loongson.cn>, Lee Jones <lee@kernel.org>,
Corey Minyard <corey@minyard.net>,
Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Xi Ruoyao <xry111@xry111.site>, WANG Xuerui <kernel@xen0n.name>,
Yinbo Zhu <zhuyinbo@loongson.cn>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
mfd@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-gpio@vger.kernel.org,
openipmi-developer@lists.sourceforge.net
Subject: Re: [PATCH RFC v3 0/7] mfd: ls2kbmc: multiple fixes for this driver
Date: Tue, 4 Aug 2026 00:09:02 +0800 [thread overview]
Message-ID: <94FDE4B9-CE06-4596-9965-25A70E5A2E3F@gmail.com> (raw)
In-Reply-To: <CAAhV-H6EN3K_QCd6pJ755PH7t5uUS0g-+BbRKjWr7oq7vX9ZTA@mail.gmail.com>
Hi,
> 2026年8月3日 21:45,Huacai Chen <chenhuacai@kernel.org> 写道:
>
> On Fri, Jul 31, 2026 at 4:24 PM Miao Wang <shankerwangmiao@gmail.com> wrote:
>>
>> Hi,
>>
>>> 2026年7月31日 16:07,Huacai Chen <chenhuacai@kernel.org> 写道:
>>>
>>> On Fri, Jul 24, 2026 at 5:28 PM Miao Wang <shankerwangmiao@gmail.com> wrote:
>>>>
>>>> Hi,
>>>>
>>>>> 2026年7月24日 16:55,Huacai Chen <chenhuacai@kernel.org> 写道:
>>>>>
>>>>> Hi, Miao,
>>>>>
>>>>> On Fri, Jul 10, 2026 at 1:24 AM Miao Wang via B4 Relay
>>>>> <devnull+shankerwangmiao.gmail.com@kernel.org> wrote:
>>>>>>
>>>>>> Previously, the driver has been introduced to support the Loongson 2K
>>>>>> BMC running on the Loongson Servers, which is essential to prevent
>>>>>> the system from hanging when the BMC is being reset and the default
>>>>>> efi-framebuffer is being used. However, there are some drawbacks in the
>>>>>> driver.
>>>>>>
>>>>>> Firstly, the driver tries to read and write to the connected PCI-E host
>>>>>> controller registers, assuming that the BMC is connected to LS7A PCI-E
>>>>>> host controller. This assumption should be true for real products, but
>>>>>> to prevent from accidentally reading and writing to the wrong PCI-E host
>>>>>> controller, this driver should be modified to check this before
>>>>>> accessing the registers.
>>>>>>
>>>>>> Secondly, the driver uses non-exported functions to tell the vt
>>>>>> subsystem to redraw the screen, preventing the driver from being
>>>>>> compiling as a module. This can be fixed by using the exported
>>>>>> functions instead.
>>>>> You can replace the redraw function, but I don't think it is necessary
>>>>> to make the bmc driver modular.
>>>>>
>>>>> BMC core, IPMI and simpledrm display are usually (if not always)
>>>>> supposed to work as early as possible.
>>>>
>>>> I believe that it should be the user's decision to choose whether to
>>>> compile a module into the kernel or as a module and it would be better
>>>> if we can provide the possibilities for the user to choose from.
>>>> Additionally, I don't think these modules are supposed to work that
>>>> early. The mfd module provide two functions, the display and the ipmi
>>>> device. In the aspect of graphical display, without this module, the
>>>> user can still see the output during booting on their monitors, since
>>>> efifb is working, providing a basic display function. In the aspect of
>>>> the ipmi device, I don't think the lack of such device will influence
>>>> the boot of the system, since it is a common practice to compile ipmi
>>>> device drivers as modules on other architectures. As a result, neither
>>>> of the two functions are required to be loaded that early and it is
>>>> reasonable to at lease leave the choice to compile it as a module
>>>> to the user.
>>> Flexibility is not always useful, if a config doesn't provide good
>>> effect, then it just increases complexity and makes maintenance more
>>> difficult.
>>
>> I should emphasize that to allow this driver to be a module, there is
>> no such increase on maintenance. Moreover, not all loongarch machines
>> are requiring this driver. Especially only a part of the server models
>> are quipped with this BMC. Comparing with other architectures, the
>> driver for BMC are normally compiled as a module, such as mgag200 for
>> iLO from HPE and iDRAC from DELL, hibmc_drm for Kunpeng server from
>> Huawei. None of these BMC drivers requiring to be compiled into the
>> kernel. I cannot see there is any reason keeping the driver from being
>> allowed to be compiled as a module. I also do not think it will bring
>> any significant maintenance burden. Implementing correct cleanup code
>> should be necessary instead of burden.
> Can we split into two series, one fix bugs and the others make bmc modular?
>
> Otherwise I don't think we can reach a consensus in the near future.
I accept different opinions on design trade-offs. However, I don't think
you have provided enough excuses to remain this driver as built-in,
since I believe normally in kernel, most non-core drivers are all able
to be compiled as a module. I also provided some examples from devices
with similar functions. As a result, I'll not split this series before
there is indeed a strong reason against allowing this driver to be
compiled as a module or we may have a great benefit if we force this
module to be compiled built-in.
Cheers,
Miao Wang
next prev parent reply other threads:[~2026-08-03 16:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 17:24 Miao Wang via B4 Relay
2026-07-09 17:24 ` [PATCH RFC v3 1/7] mfd: ls2kbmc: Make a copy when parsing mode string Miao Wang via B4 Relay
2026-07-23 11:29 ` Lee Jones
2026-07-23 12:02 ` Miao Wang
2026-07-23 12:14 ` Miao Wang
2026-07-23 13:10 ` Lee Jones
2026-07-09 17:24 ` [PATCH RFC v3 2/7] mfd: ls2kbmc: Sanity check for the connected pci port Miao Wang via B4 Relay
2026-07-09 17:24 ` [PATCH RFC v3 3/7] mfd: ls2kbmc: Redraw using exported functions Miao Wang via B4 Relay
2026-07-09 17:24 ` [PATCH RFC v3 4/7] mfd: ls2kbmc: Cancel the work queue on removal Miao Wang via B4 Relay
2026-07-09 17:24 ` [PATCH RFC v3 5/7] ipmi: ls2k: Relax the dependency to its mfd driver Miao Wang via B4 Relay
2026-07-09 17:24 ` [PATCH RFC v3 6/7] mfd: ls2kbmc: Able to be compiled as a module Miao Wang via B4 Relay
2026-07-09 17:24 ` [PATCH RFC v3 7/7] mfd: ls2kbmc: Capture the reset event of BMC through GPIO Miao Wang via B4 Relay
2026-07-24 8:55 ` [PATCH RFC v3 0/7] mfd: ls2kbmc: multiple fixes for this driver Huacai Chen
2026-07-24 9:27 ` Miao Wang
2026-07-31 8:07 ` Huacai Chen
2026-07-31 8:24 ` Miao Wang
2026-08-03 13:45 ` Huacai Chen
2026-08-03 16:09 ` Miao Wang [this message]
2026-08-04 14:33 ` Huacai Chen
2026-08-04 19:08 ` Miao Wang
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=94FDE4B9-CE06-4596-9965-25A70E5A2E3F@gmail.com \
--to=shankerwangmiao@gmail.com \
--cc=brgl@kernel.org \
--cc=chenhuacai@kernel.org \
--cc=corey@minyard.net \
--cc=jiaxun.yang@flygoat.com \
--cc=kernel@xen0n.name \
--cc=lee@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mfd@lists.linux.dev \
--cc=openipmi-developer@lists.sourceforge.net \
--cc=qiaochong@loongson.cn \
--cc=xry111@xry111.site \
--cc=zhoubinbin@loongson.cn \
--cc=zhuyinbo@loongson.cn \
/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®