From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37CA733F368 for ; Mon, 3 Aug 2026 16:09:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785773362; cv=none; b=lGhlVKI5Y9JibaPzpz3QEmoKSqyeFNsOhxEWKze2wFW8tChiWSN61dGrHYA/msc6AEtWUGBUCQR00Fm6831Gw4R0QKk/lOE9MVn8KmL+MGC0b28FooNBkauwdU6jKt8HKYpCzZMh5zMJPf8mZJvK51E0p9A2e3IE3eSHlluq/kE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785773362; c=relaxed/simple; bh=/jikEh0ap5JVvxcrd8r/3UoXZQlm/E+GShUrYZzsWAo=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=InKqlCEucB6kEu0+GRdQxtNjaNJUWyv++xO6R3Ilc/EpZicAmU284Ta0f+oNqGBImJhG2tBNZPDlhNv3425KRQKDnm7XjTgMuSKtldGxRGlPQ8rnK9j+hZujuELvNwfAzSYBRYLsWxGg4js6RBgIDdhmtrGNuSt9UB7aLGmExf8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QMtvuD/w; arc=none smtp.client-ip=209.85.216.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QMtvuD/w" Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-385b78b4f9bso167830a91.2 for ; Mon, 03 Aug 2026 09:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785773360; x=1786378160; darn=vger.kernel.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:content-type:from:to:cc :subject:date:message-id:reply-to:content-type; bh=/jikEh0ap5JVvxcrd8r/3UoXZQlm/E+GShUrYZzsWAo=; b=QMtvuD/wob2dSh0WbFi6qNZDHSqeGRxecXjIVSgPcCuTInQLpkMtYJG1VNEQulD6xk LCjVi2knCk9twBkjjrUo1yrp51CTayaa6X0s3QrLqpOtq5Qz6rGg2xBPzLQp7knPQZT3 EM40H99XQN32p+yru0gsJw0iyd4rQAVlkz0JGgwKqQUGRzrU3wESKd9Gzt8rk3H0AuoY Hhjugat0ou9oolzbEUdAnrhOXoN17r/X1P0Mcr+kI7hgc+E5MfKUVNmznWnT9FR3me24 uAaMfvsDKPcwpG5UDgbvKvr9dbeswCDYsy5cUJEGl8pMeJVCWfwX4pvbl/AJtWyJxrFd MRDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785773360; x=1786378160; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:content-type:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=/jikEh0ap5JVvxcrd8r/3UoXZQlm/E+GShUrYZzsWAo=; b=ODfXh0z9vxKyaG2lkdB3VekFvMBK7Qf4ZJ1uITkUnxHgKEYm9e9Dd1HgnvxsVU5b9B Mfdv/Lsd3fy5RNcES8OBfwaz91zVC58eDQqpDbc/069ftZeI+h//Kz7JfUOw3CyX8XPA xbPTWZjhA7iyBOpW2gEHrkgSC0q6rhiOBIzvv2wmPI51kmByWMt/QE6DHeRgGxe9AMni NPFuD0y3R/2WHpVz9g1meUcJE4p+ot6ust7TVv9AKn7luVyQOelwUgupNVvJRj0zhfBf 2X2EP25b6MZI5k12k+F/wmIjiSM1VWUTYzB0DzTqYVREBjaVhP0MMDBb1yOa1w411agr 1e9g== X-Forwarded-Encrypted: i=1; AHgh+RpMNexlfii9Oz62xPMk3pudqm46D634X7GjfyRZpQEOrD0sx/IvKJ/MII14ytfeRmc0PnJr/9+uhOOezUk=@vger.kernel.org X-Gm-Message-State: AOJu0Yxxq65obL05wo0U/l4oi674WLB2nz8L4sBwDztqqlT8Mg3rpBtE eWOQsSwjoLloTg0rwCBe/14ABaea5Q54SpTcBz5iM+XSpu4/TdD19niM X-Gm-Gg: AR+sD12uY7FEHttELvoMGz1TOkFBQvx6i+b3FjbRC3wdVe6yyp/FxRGGdsB6zsvNXq4 RAb85D+eaDHL77ghbGcIdGJ0hDZGm02uqiJRc7XxWv2AeUhQh9218paoU+D6287VyzRy8iitjKv w6C0MXUjJ7TJuktufD8ACvBtw0Z6IZhdK/yoGK1mtc+vBmvc0FLidWIyAIWkNKDSEicGpEre9Eh Xa8DqM7sCWapXi7UIJR+NGEIk2NBdS3Jx2s4OXdVzRzfzR4URdPX0yugjqbGUvQQsDIPgcFMtSy ujtxV/RQv5rfmc2F58GhSCeKhM0VbQ0dp0Px4zDUICpEgiBlHuWpl+xwbQcSEfycpxMVN/Dommk iMzQkv3gE4p8dIh49cgJP+ch4xlAXOuLNgkfCU8iw8fPon1rZ46VbQevZMFpG7oVrhENHsTbPAi cwk/zLZQ0FomHF2ciIipb6ATBqTbWKuhxGGPza1taPb+QgB28r3Z9JJYaJxUu7pyyl2zKl0HUfE SqJG4tYE7c= X-Received: by 2002:a17:90b:562e:b0:36d:b30b:14ed with SMTP id 98e67ed59e1d1-38fbc4ad251mr13589275a91.2.1785773360472; Mon, 03 Aug 2026 09:09:20 -0700 (PDT) Received: from smtpclient.apple ([23.247.139.92]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-38febfdae78sm43066a91.4.2026.08.03.09.09.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Aug 2026 09:09:19 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.8\)) Subject: Re: [PATCH RFC v3 0/7] mfd: ls2kbmc: multiple fixes for this driver From: Miao Wang In-Reply-To: Date: Tue, 4 Aug 2026 00:09:02 +0800 Cc: Binbin Zhou , Chong Qiao , Lee Jones , Corey Minyard , Linus Walleij , Bartosz Golaszewski , Xi Ruoyao , WANG Xuerui , Yinbo Zhu , Jiaxun Yang , mfd@lists.linux.dev, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, openipmi-developer@lists.sourceforge.net Content-Transfer-Encoding: quoted-printable Message-Id: <94FDE4B9-CE06-4596-9965-25A70E5A2E3F@gmail.com> References: <20260710-ls2kbmc-mod-v3-0-ef718636e78e@gmail.com> <8FCFD614-FEA4-475C-9E0C-50E075B49453@gmail.com> <64E79496-E66E-45A0-B1D6-DB5466C35D46@gmail.com> To: Huacai Chen X-Mailer: Apple Mail (2.3826.700.81.1.8) Hi, > 2026=E5=B9=B48=E6=9C=883=E6=97=A5 21:45=EF=BC=8CHuacai Chen = =E5=86=99=E9=81=93=EF=BC=9A >=20 > On Fri, Jul 31, 2026 at 4:24=E2=80=AFPM Miao Wang = wrote: >>=20 >> Hi, >>=20 >>> 2026=E5=B9=B47=E6=9C=8831=E6=97=A5 16:07=EF=BC=8CHuacai Chen = =E5=86=99=E9=81=93=EF=BC=9A >>>=20 >>> On Fri, Jul 24, 2026 at 5:28=E2=80=AFPM Miao Wang = wrote: >>>>=20 >>>> Hi, >>>>=20 >>>>> 2026=E5=B9=B47=E6=9C=8824=E6=97=A5 16:55=EF=BC=8CHuacai Chen = =E5=86=99=E9=81=93=EF=BC=9A >>>>>=20 >>>>> Hi, Miao, >>>>>=20 >>>>> On Fri, Jul 10, 2026 at 1:24=E2=80=AFAM Miao Wang via B4 Relay >>>>> wrote: >>>>>>=20 >>>>>> 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. >>>>>>=20 >>>>>> 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. >>>>>>=20 >>>>>> 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. >>>>>=20 >>>>> BMC core, IPMI and simpledrm display are usually (if not always) >>>>> supposed to work as early as possible. >>>>=20 >>>> 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. >>=20 >> 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? >=20 > 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=