[PATCH v11 0/3] LoongArch: Add Loongson-2K BMC support

Binbin Zhou posted 3 patches 4 weeks ago
MAINTAINERS                      |   7 +
drivers/char/ipmi/Kconfig        |   7 +
drivers/char/ipmi/Makefile       |   1 +
drivers/char/ipmi/ipmi_si.h      |   7 +
drivers/char/ipmi/ipmi_si_intf.c |   4 +
drivers/char/ipmi/ipmi_si_ls2k.c | 189 +++++++++++
drivers/mfd/Kconfig              |  13 +
drivers/mfd/Makefile             |   2 +
drivers/mfd/ls2k-bmc-core.c      | 528 +++++++++++++++++++++++++++++++
9 files changed, 758 insertions(+)
create mode 100644 drivers/char/ipmi/ipmi_si_ls2k.c
create mode 100644 drivers/mfd/ls2k-bmc-core.c
[PATCH v11 0/3] LoongArch: Add Loongson-2K BMC support
Posted by Binbin Zhou 4 weeks ago
Hi all:

This patchset introduces the Loongson-2K BMC.

It is a PCIe device present on servers similar to the Loongson-3 CPUs.
And it is a multifunctional device (MFD), such as display as a sub-function
of it.

For IPMI, according to the existing design, we use software simulation to
implement the KCS interface registers: Stauts/Command/Data_Out/Data_In.

Also since both host side and BMC side read and write kcs status, we use
fifo pointer to ensure data consistency.

For the display, based on simpledrm, the resolution is read from a fixed
position in the BMC since the hardware does not support auto-detection
of the resolution. Of course, we will try to support multiple
resolutions later, through a vbios-like approach.

Especially, for the BMC reset function, since the display will be
disconnected when BMC reset, we made a special treatment of re-push.

Based on this, I will present it in four patches:
patch-1: BMC device PCI resource allocation.
patch-2: BMC reset function support
patch-3: IPMI implementation

Thanks.

-------
V11:
- Rebase on for-mfd-next branch.
Patch (2/3):
  - Rename ls2k_bmc_pdata_initial() to ls2k_bmc_init();
  - Rename ls2k_bmc_pdata to ls2k_bmc_ddata;
  - Use macros to replace magic numbers;
  - Simplify the ls2k_bmc_init() code by removing unnecessary goto statements.

Link to V10:
https://lore.kernel.org/all/cover.1755853480.git.zhoubinbin@loongson.cn/

V10:
Patch (2/3):
 - The PTR_ERR(NULL) is success. It should be "ret = -ENOMEM;".
    - https://lore.kernel.org/all/202508191519.uT5io1jk-lkp@intel.com/

Link to V9:
https://lore.kernel.org/all/cover.1754999365.git.zhoubinbin@loongson.cn/

V9:
Patch (2/3):
 - PCIE -> PCI-E in dev_err();
 - Separate the read from the write;

Link to V8:
https://lore.kernel.org/all/cover.1752548073.git.zhoubinbin@loongson.cn/

V8:
Patch (1/3):
 - Similar to as3711_subdevs, identify elements in ls2k_bmc_cells.

Patch (2/3):
 - Rename variables using usual names, such as `priv` -> `ddata`;
 - Use if statements instead of #ifery;
 - Rewrite the error message to ensure it is easy to understand;
 - ls2k_bmc_pdata_initial(dev, priv); -> ls2k_bmc_pdata_initial(priv);

Link to V7:
https://lore.kernel.org/all/cover.1751617911.git.zhoubinbin@loongson.cn/

V7:
Patch (1/3):
  - Fix build warning by lkp: Add depend on ACPI_GENERIC_GSI
    - https://lore.kernel.org/all/202507021011.sDAHGinj-lkp@intel.com/

Link to V6:
https://lore.kernel.org/all/cover.1750939357.git.zhoubinbin@loongson.cn/

V6:
- Add Acked-by tag from Corey, thanks;
Patch (1/3):
  - Fix build warning by lkp: Add depend on PCI
    - https://lore.kernel.org/all/202506210204.LVZc2VG2-lkp@intel.com/
    - https://lore.kernel.org/all/202506210231.ZWWNhofU-lkp@intel.com/
    - https://lore.kernel.org/all/202506210652.ipUFDU5B-lkp@intel.com/
    - https://lore.kernel.org/all/202506210343.XCHkzorp-lkp@intel.com/

Link to V5:
https://lore.kernel.org/all/cover.1750301674.git.zhoubinbin@loongson.cn/

V5:
Patch (1/3):
 - Rename ls2kbmc-mfd.c to ls2k-bmc-core.c;
 - Rename MFD_LS2K_BMC to MFD_LS2K_BMC_CORE and update its help text.
Patch (3/3):
 - Add an IPMI_LS2K config in the IPMI section that enables the IPMI
   interface and selects MFD_LS2K_BMC_CORE.

Link to V4:
https://lore.kernel.org/all/cover.1749731531.git.zhoubinbin@loongson.cn/

V4:
- Add Reviewed-by tag;
- Change the order of the patches.
Patch (1/3):
  - Fix build warning by lkp: Kconfig tristate -> bool
    - https://lore.kernel.org/all/202505312022.QmFmGE1F-lkp@intel.com/
 - Update commit message;
 - Move MFD_LS2K_BMC after MFD_INTEL_M10_BMC_PMCI in Kconfig and
   Makefile.
Patch (2/3):
  - Remove unnecessary newlines;
  - Rename ls2k_bmc_check_pcie_connected() to
    ls2k_bmc_pcie_is_connected();
  - Update comment message.
Patch (3/3):
  - Remove unnecessary newlines.

Link to V3:
https://lore.kernel.org/all/cover.1748505446.git.zhoubinbin@loongson.cn/

V3:
Patch (1/3):
 - Drop "MFD" in title and comment;
 - Fromatting code;
 - Add clearer comments.
Patch (2/3):
 - Rebase linux-ipmi/next tree;
 - Use readx()/writex() to read and write IPMI data instead of structure
   pointer references;
 - CONFIG_LOONGARCH -> MFD_LS2K_BMC;
 - Drop unused output.
Patch (3/3):
 - Inline the ls2k_bmc_gpio_reset_handler() function to ls2k_bmc_pdata_initial();
 - Add clearer comments.
 - Use proper multi-line commentary as per the Coding Style documentation;
 - Define all magic numbers.

Link to V2:
https://lore.kernel.org/all/cover.1747276047.git.zhoubinbin@loongson.cn/

V2:
- Drop ls2kdrm, use simpledrm instead.
Patch (1/3):
 - Use DEFINE_RES_MEM_NAMED/MFD_CELL_RES simplified code;
 - Add resolution fetching due to replacing the original display
   solution with simpledrm; 
 - Add aperture_remove_conflicting_devices() to avoid efifb
   conflict with simpledrm.
Patch (3/3):
 - This part of the function, moved from the original ls2kdrm to mfd;
 - Use set_console to implement the Re-push display function.

Link to V1:
https://lore.kernel.org/all/cover.1735550269.git.zhoubinbin@loongson.cn/

Binbin Zhou (3):
  mfd: ls2kbmc: Introduce Loongson-2K BMC core driver
  mfd: ls2kbmc: Add Loongson-2K BMC reset function support
  ipmi: Add Loongson-2K BMC support

 MAINTAINERS                      |   7 +
 drivers/char/ipmi/Kconfig        |   7 +
 drivers/char/ipmi/Makefile       |   1 +
 drivers/char/ipmi/ipmi_si.h      |   7 +
 drivers/char/ipmi/ipmi_si_intf.c |   4 +
 drivers/char/ipmi/ipmi_si_ls2k.c | 189 +++++++++++
 drivers/mfd/Kconfig              |  13 +
 drivers/mfd/Makefile             |   2 +
 drivers/mfd/ls2k-bmc-core.c      | 528 +++++++++++++++++++++++++++++++
 9 files changed, 758 insertions(+)
 create mode 100644 drivers/char/ipmi/ipmi_si_ls2k.c
 create mode 100644 drivers/mfd/ls2k-bmc-core.c


base-commit: a4eb677652a5da4d8e7271c0c0c8719c39f10e36
-- 
2.47.3
Re: (subset) [PATCH v11 0/3] LoongArch: Add Loongson-2K BMC support
Posted by Lee Jones 3 weeks ago
On Thu, 04 Sep 2025 20:35:04 +0800, Binbin Zhou wrote:
> This patchset introduces the Loongson-2K BMC.
> 
> It is a PCIe device present on servers similar to the Loongson-3 CPUs.
> And it is a multifunctional device (MFD), such as display as a sub-function
> of it.
> 
> For IPMI, according to the existing design, we use software simulation to
> implement the KCS interface registers: Stauts/Command/Data_Out/Data_In.
> 
> [...]

Applied, thanks!

[1/3] mfd: ls2kbmc: Introduce Loongson-2K BMC core driver
      commit: 67c2639e1fc1a07b45d216af659c0dd92a370c68
[2/3] mfd: ls2kbmc: Add Loongson-2K BMC reset function support
      commit: 2364ccc827e44064e9763f2ae2d1dcc5f945fdf3

--
Lee Jones [李琼斯]

Re: (subset) [PATCH v11 0/3] LoongArch: Add Loongson-2K BMC support
Posted by Binbin Zhou 3 weeks ago
Hi Lee:

On Thu, Sep 11, 2025 at 10:33 PM Lee Jones <lee@kernel.org> wrote:
>
> On Thu, 04 Sep 2025 20:35:04 +0800, Binbin Zhou wrote:
> > This patchset introduces the Loongson-2K BMC.
> >
> > It is a PCIe device present on servers similar to the Loongson-3 CPUs.
> > And it is a multifunctional device (MFD), such as display as a sub-function
> > of it.
> >
> > For IPMI, according to the existing design, we use software simulation to
> > implement the KCS interface registers: Stauts/Command/Data_Out/Data_In.
> >
> > [...]
>
> Applied, thanks!
>
> [1/3] mfd: ls2kbmc: Introduce Loongson-2K BMC core driver
>       commit: 67c2639e1fc1a07b45d216af659c0dd92a370c68
> [2/3] mfd: ls2kbmc: Add Loongson-2K BMC reset function support
>       commit: 2364ccc827e44064e9763f2ae2d1dcc5f945fdf3

Thanks for acknowledging my patchset.

I can't confirm why you didn't apply the IPMI patch, but this appears
to break the patchset's integrity, potentially causing missing Kconfig
dependencies (IPMI_LS2K select MFD_LS2K_BMC_CORE).

Additionally, as Corey previously explained[1], this patch can be
applied through your side.

[1]: https://lore.kernel.org/all/aFVtNAY4u2gDiLDS@mail.minyard.net/

>
> --
> Lee Jones [李琼斯]
>

--
Thanks.
Binbin
Re: (subset) [PATCH v11 0/3] LoongArch: Add Loongson-2K BMC support
Posted by Lee Jones 2 weeks, 2 days ago
On Fri, 12 Sep 2025, Binbin Zhou wrote:

> Hi Lee:
> 
> On Thu, Sep 11, 2025 at 10:33 PM Lee Jones <lee@kernel.org> wrote:
> >
> > On Thu, 04 Sep 2025 20:35:04 +0800, Binbin Zhou wrote:
> > > This patchset introduces the Loongson-2K BMC.
> > >
> > > It is a PCIe device present on servers similar to the Loongson-3 CPUs.
> > > And it is a multifunctional device (MFD), such as display as a sub-function
> > > of it.
> > >
> > > For IPMI, according to the existing design, we use software simulation to
> > > implement the KCS interface registers: Stauts/Command/Data_Out/Data_In.
> > >
> > > [...]
> >
> > Applied, thanks!
> >
> > [1/3] mfd: ls2kbmc: Introduce Loongson-2K BMC core driver
> >       commit: 67c2639e1fc1a07b45d216af659c0dd92a370c68
> > [2/3] mfd: ls2kbmc: Add Loongson-2K BMC reset function support
> >       commit: 2364ccc827e44064e9763f2ae2d1dcc5f945fdf3
> 
> Thanks for acknowledging my patchset.
> 
> I can't confirm why you didn't apply the IPMI patch, but this appears
> to break the patchset's integrity, potentially causing missing Kconfig
> dependencies (IPMI_LS2K select MFD_LS2K_BMC_CORE).

Pretty sure this doesn't break anything.

What build errors do you see as a result?

> Additionally, as Corey previously explained[1], this patch can be
> applied through your side.
> 
> [1]: https://lore.kernel.org/all/aFVtNAY4u2gDiLDS@mail.minyard.net/

We only apply cross-subsystem patch-sets to a single tree if there are
good reasons to do so.  In this instance, I can't see any reason why the
IPMI driver cannot go in via it's own repo.

-- 
Lee Jones [李琼斯]
Re: (subset) [PATCH v11 0/3] LoongArch: Add Loongson-2K BMC support
Posted by Binbin Zhou 2 weeks, 2 days ago
Hi Lee:

Thanks for your reply.

On Tue, Sep 16, 2025 at 4:40 PM Lee Jones <lee@kernel.org> wrote:
>
> On Fri, 12 Sep 2025, Binbin Zhou wrote:
>
> > Hi Lee:
> >
> > On Thu, Sep 11, 2025 at 10:33 PM Lee Jones <lee@kernel.org> wrote:
> > >
> > > On Thu, 04 Sep 2025 20:35:04 +0800, Binbin Zhou wrote:
> > > > This patchset introduces the Loongson-2K BMC.
> > > >
> > > > It is a PCIe device present on servers similar to the Loongson-3 CPUs.
> > > > And it is a multifunctional device (MFD), such as display as a sub-function
> > > > of it.
> > > >
> > > > For IPMI, according to the existing design, we use software simulation to
> > > > implement the KCS interface registers: Stauts/Command/Data_Out/Data_In.
> > > >
> > > > [...]
> > >
> > > Applied, thanks!
> > >
> > > [1/3] mfd: ls2kbmc: Introduce Loongson-2K BMC core driver
> > >       commit: 67c2639e1fc1a07b45d216af659c0dd92a370c68
> > > [2/3] mfd: ls2kbmc: Add Loongson-2K BMC reset function support
> > >       commit: 2364ccc827e44064e9763f2ae2d1dcc5f945fdf3
> >
> > Thanks for acknowledging my patchset.
> >
> > I can't confirm why you didn't apply the IPMI patch, but this appears
> > to break the patchset's integrity, potentially causing missing Kconfig
> > dependencies (IPMI_LS2K select MFD_LS2K_BMC_CORE).
>
> Pretty sure this doesn't break anything.
>
> What build errors do you see as a result?
>
> > Additionally, as Corey previously explained[1], this patch can be
> > applied through your side.
> >
> > [1]: https://lore.kernel.org/all/aFVtNAY4u2gDiLDS@mail.minyard.net/
>
> We only apply cross-subsystem patch-sets to a single tree if there are
> good reasons to do so.  In this instance, I can't see any reason why the
> IPMI driver cannot go in via it's own repo.

However, there still seems to be a text dependency issue. The IPMI
patch modifies the MAINTAINERS, which depends on the first patch.
If the entire series of patches cannot be merged together, does this
mean the IPMI patch can only be merged after the MFD patch has been
merged into the mainline?

>
> --
> Lee Jones [李琼斯]

-- 
Thanks.
Binbin
Re: (subset) [PATCH v11 0/3] LoongArch: Add Loongson-2K BMC support
Posted by Lee Jones 2 weeks, 2 days ago
On Tue, 16 Sep 2025, Binbin Zhou wrote:

> Hi Lee:
> 
> Thanks for your reply.
> 
> On Tue, Sep 16, 2025 at 4:40 PM Lee Jones <lee@kernel.org> wrote:
> >
> > On Fri, 12 Sep 2025, Binbin Zhou wrote:
> >
> > > Hi Lee:
> > >
> > > On Thu, Sep 11, 2025 at 10:33 PM Lee Jones <lee@kernel.org> wrote:
> > > >
> > > > On Thu, 04 Sep 2025 20:35:04 +0800, Binbin Zhou wrote:
> > > > > This patchset introduces the Loongson-2K BMC.
> > > > >
> > > > > It is a PCIe device present on servers similar to the Loongson-3 CPUs.
> > > > > And it is a multifunctional device (MFD), such as display as a sub-function
> > > > > of it.
> > > > >
> > > > > For IPMI, according to the existing design, we use software simulation to
> > > > > implement the KCS interface registers: Stauts/Command/Data_Out/Data_In.
> > > > >
> > > > > [...]
> > > >
> > > > Applied, thanks!
> > > >
> > > > [1/3] mfd: ls2kbmc: Introduce Loongson-2K BMC core driver
> > > >       commit: 67c2639e1fc1a07b45d216af659c0dd92a370c68
> > > > [2/3] mfd: ls2kbmc: Add Loongson-2K BMC reset function support
> > > >       commit: 2364ccc827e44064e9763f2ae2d1dcc5f945fdf3
> > >
> > > Thanks for acknowledging my patchset.
> > >
> > > I can't confirm why you didn't apply the IPMI patch, but this appears
> > > to break the patchset's integrity, potentially causing missing Kconfig
> > > dependencies (IPMI_LS2K select MFD_LS2K_BMC_CORE).
> >
> > Pretty sure this doesn't break anything.
> >
> > What build errors do you see as a result?
> >
> > > Additionally, as Corey previously explained[1], this patch can be
> > > applied through your side.
> > >
> > > [1]: https://lore.kernel.org/all/aFVtNAY4u2gDiLDS@mail.minyard.net/
> >
> > We only apply cross-subsystem patch-sets to a single tree if there are
> > good reasons to do so.  In this instance, I can't see any reason why the
> > IPMI driver cannot go in via it's own repo.
> 
> However, there still seems to be a text dependency issue. The IPMI
> patch modifies the MAINTAINERS, which depends on the first patch.
> If the entire series of patches cannot be merged together, does this
> mean the IPMI patch can only be merged after the MFD patch has been
> merged into the mainline?

No, not at all.  So long as all patches come together during the
merge-window, there is no issue.

-- 
Lee Jones [李琼斯]
Re: (subset) [PATCH v11 0/3] LoongArch: Add Loongson-2K BMC support
Posted by Binbin Zhou 2 weeks, 2 days ago
On Tue, Sep 16, 2025 at 6:14 PM Lee Jones <lee@kernel.org> wrote:
>
> On Tue, 16 Sep 2025, Binbin Zhou wrote:
>
> > Hi Lee:
> >
> > Thanks for your reply.
> >
> > On Tue, Sep 16, 2025 at 4:40 PM Lee Jones <lee@kernel.org> wrote:
> > >
> > > On Fri, 12 Sep 2025, Binbin Zhou wrote:
> > >
> > > > Hi Lee:
> > > >
> > > > On Thu, Sep 11, 2025 at 10:33 PM Lee Jones <lee@kernel.org> wrote:
> > > > >
> > > > > On Thu, 04 Sep 2025 20:35:04 +0800, Binbin Zhou wrote:
> > > > > > This patchset introduces the Loongson-2K BMC.
> > > > > >
> > > > > > It is a PCIe device present on servers similar to the Loongson-3 CPUs.
> > > > > > And it is a multifunctional device (MFD), such as display as a sub-function
> > > > > > of it.
> > > > > >
> > > > > > For IPMI, according to the existing design, we use software simulation to
> > > > > > implement the KCS interface registers: Stauts/Command/Data_Out/Data_In.
> > > > > >
> > > > > > [...]
> > > > >
> > > > > Applied, thanks!
> > > > >
> > > > > [1/3] mfd: ls2kbmc: Introduce Loongson-2K BMC core driver
> > > > >       commit: 67c2639e1fc1a07b45d216af659c0dd92a370c68
> > > > > [2/3] mfd: ls2kbmc: Add Loongson-2K BMC reset function support
> > > > >       commit: 2364ccc827e44064e9763f2ae2d1dcc5f945fdf3
> > > >
> > > > Thanks for acknowledging my patchset.
> > > >
> > > > I can't confirm why you didn't apply the IPMI patch, but this appears
> > > > to break the patchset's integrity, potentially causing missing Kconfig
> > > > dependencies (IPMI_LS2K select MFD_LS2K_BMC_CORE).
> > >
> > > Pretty sure this doesn't break anything.
> > >
> > > What build errors do you see as a result?
> > >
> > > > Additionally, as Corey previously explained[1], this patch can be
> > > > applied through your side.
> > > >
> > > > [1]: https://lore.kernel.org/all/aFVtNAY4u2gDiLDS@mail.minyard.net/
> > >
> > > We only apply cross-subsystem patch-sets to a single tree if there are
> > > good reasons to do so.  In this instance, I can't see any reason why the
> > > IPMI driver cannot go in via it's own repo.
> >
> > However, there still seems to be a text dependency issue. The IPMI
> > patch modifies the MAINTAINERS, which depends on the first patch.
> > If the entire series of patches cannot be merged together, does this
> > mean the IPMI patch can only be merged after the MFD patch has been
> > merged into the mainline?
>
> No, not at all.  So long as all patches come together during the
> merge-window, there is no issue.

OK, I see, thanks.

Hi Corey:

What do you think about it?

>
> --
> Lee Jones [李琼斯]

-- 
Thanks.
Binbin
Re: (subset) [PATCH v11 0/3] LoongArch: Add Loongson-2K BMC support
Posted by Corey Minyard 2 weeks, 2 days ago
On Tue, Sep 16, 2025 at 06:51:25PM +0800, Binbin Zhou wrote:
> On Tue, Sep 16, 2025 at 6:14 PM Lee Jones <lee@kernel.org> wrote:
> >
> > On Tue, 16 Sep 2025, Binbin Zhou wrote:
> >
> > > Hi Lee:
> > >
> > > Thanks for your reply.
> > >
> > > On Tue, Sep 16, 2025 at 4:40 PM Lee Jones <lee@kernel.org> wrote:
> > > >
> > > > On Fri, 12 Sep 2025, Binbin Zhou wrote:
> > > >
> > > > > Hi Lee:
> > > > >
> > > > > On Thu, Sep 11, 2025 at 10:33 PM Lee Jones <lee@kernel.org> wrote:
> > > > > >
> > > > > > On Thu, 04 Sep 2025 20:35:04 +0800, Binbin Zhou wrote:
> > > > > > > This patchset introduces the Loongson-2K BMC.
> > > > > > >
> > > > > > > It is a PCIe device present on servers similar to the Loongson-3 CPUs.
> > > > > > > And it is a multifunctional device (MFD), such as display as a sub-function
> > > > > > > of it.
> > > > > > >
> > > > > > > For IPMI, according to the existing design, we use software simulation to
> > > > > > > implement the KCS interface registers: Stauts/Command/Data_Out/Data_In.
> > > > > > >
> > > > > > > [...]
> > > > > >
> > > > > > Applied, thanks!
> > > > > >
> > > > > > [1/3] mfd: ls2kbmc: Introduce Loongson-2K BMC core driver
> > > > > >       commit: 67c2639e1fc1a07b45d216af659c0dd92a370c68
> > > > > > [2/3] mfd: ls2kbmc: Add Loongson-2K BMC reset function support
> > > > > >       commit: 2364ccc827e44064e9763f2ae2d1dcc5f945fdf3
> > > > >
> > > > > Thanks for acknowledging my patchset.
> > > > >
> > > > > I can't confirm why you didn't apply the IPMI patch, but this appears
> > > > > to break the patchset's integrity, potentially causing missing Kconfig
> > > > > dependencies (IPMI_LS2K select MFD_LS2K_BMC_CORE).
> > > >
> > > > Pretty sure this doesn't break anything.
> > > >
> > > > What build errors do you see as a result?
> > > >
> > > > > Additionally, as Corey previously explained[1], this patch can be
> > > > > applied through your side.
> > > > >
> > > > > [1]: https://lore.kernel.org/all/aFVtNAY4u2gDiLDS@mail.minyard.net/
> > > >
> > > > We only apply cross-subsystem patch-sets to a single tree if there are
> > > > good reasons to do so.  In this instance, I can't see any reason why the
> > > > IPMI driver cannot go in via it's own repo.
> > >
> > > However, there still seems to be a text dependency issue. The IPMI
> > > patch modifies the MAINTAINERS, which depends on the first patch.
> > > If the entire series of patches cannot be merged together, does this
> > > mean the IPMI patch can only be merged after the MFD patch has been
> > > merged into the mainline?
> >
> > No, not at all.  So long as all patches come together during the
> > merge-window, there is no issue.
> 
> OK, I see, thanks.
> 
> Hi Corey:
> 
> What do you think about it?

I thought my ack would be sufficient, but I've pulled this into my tree.
I can't apply the MAINTAINERS portion of this, but that can go in
later; you can send me a patch for that after the next kernel release.

I'll make a note to Linus that this depends on the MFD changes.

-corey

> 
> >
> > --
> > Lee Jones [李琼斯]
> 
> -- 
> Thanks.
> Binbin
Re: (subset) [PATCH v11 0/3] LoongArch: Add Loongson-2K BMC support
Posted by Lee Jones 2 weeks, 2 days ago
On Tue, 16 Sep 2025, Corey Minyard wrote:

> On Tue, Sep 16, 2025 at 06:51:25PM +0800, Binbin Zhou wrote:
> > On Tue, Sep 16, 2025 at 6:14 PM Lee Jones <lee@kernel.org> wrote:
> > >
> > > On Tue, 16 Sep 2025, Binbin Zhou wrote:
> > >
> > > > Hi Lee:
> > > >
> > > > Thanks for your reply.
> > > >
> > > > On Tue, Sep 16, 2025 at 4:40 PM Lee Jones <lee@kernel.org> wrote:
> > > > >
> > > > > On Fri, 12 Sep 2025, Binbin Zhou wrote:
> > > > >
> > > > > > Hi Lee:
> > > > > >
> > > > > > On Thu, Sep 11, 2025 at 10:33 PM Lee Jones <lee@kernel.org> wrote:
> > > > > > >
> > > > > > > On Thu, 04 Sep 2025 20:35:04 +0800, Binbin Zhou wrote:
> > > > > > > > This patchset introduces the Loongson-2K BMC.
> > > > > > > >
> > > > > > > > It is a PCIe device present on servers similar to the Loongson-3 CPUs.
> > > > > > > > And it is a multifunctional device (MFD), such as display as a sub-function
> > > > > > > > of it.
> > > > > > > >
> > > > > > > > For IPMI, according to the existing design, we use software simulation to
> > > > > > > > implement the KCS interface registers: Stauts/Command/Data_Out/Data_In.
> > > > > > > >
> > > > > > > > [...]
> > > > > > >
> > > > > > > Applied, thanks!
> > > > > > >
> > > > > > > [1/3] mfd: ls2kbmc: Introduce Loongson-2K BMC core driver
> > > > > > >       commit: 67c2639e1fc1a07b45d216af659c0dd92a370c68
> > > > > > > [2/3] mfd: ls2kbmc: Add Loongson-2K BMC reset function support
> > > > > > >       commit: 2364ccc827e44064e9763f2ae2d1dcc5f945fdf3
> > > > > >
> > > > > > Thanks for acknowledging my patchset.
> > > > > >
> > > > > > I can't confirm why you didn't apply the IPMI patch, but this appears
> > > > > > to break the patchset's integrity, potentially causing missing Kconfig
> > > > > > dependencies (IPMI_LS2K select MFD_LS2K_BMC_CORE).
> > > > >
> > > > > Pretty sure this doesn't break anything.
> > > > >
> > > > > What build errors do you see as a result?
> > > > >
> > > > > > Additionally, as Corey previously explained[1], this patch can be
> > > > > > applied through your side.
> > > > > >
> > > > > > [1]: https://lore.kernel.org/all/aFVtNAY4u2gDiLDS@mail.minyard.net/
> > > > >
> > > > > We only apply cross-subsystem patch-sets to a single tree if there are
> > > > > good reasons to do so.  In this instance, I can't see any reason why the
> > > > > IPMI driver cannot go in via it's own repo.
> > > >
> > > > However, there still seems to be a text dependency issue. The IPMI
> > > > patch modifies the MAINTAINERS, which depends on the first patch.
> > > > If the entire series of patches cannot be merged together, does this
> > > > mean the IPMI patch can only be merged after the MFD patch has been
> > > > merged into the mainline?
> > >
> > > No, not at all.  So long as all patches come together during the
> > > merge-window, there is no issue.
> > 
> > OK, I see, thanks.
> > 
> > Hi Corey:
> > 
> > What do you think about it?
> 
> I thought my ack would be sufficient, but I've pulled this into my tree.
> I can't apply the MAINTAINERS portion of this, but that can go in
> later; you can send me a patch for that after the next kernel release.
> 
> I'll make a note to Linus that this depends on the MFD changes.

Feel free to separate that from that patch and I'll happily apply it.

-- 
Lee Jones [李琼斯]
Re: (subset) [PATCH v11 0/3] LoongArch: Add Loongson-2K BMC support
Posted by Corey Minyard 2 weeks, 2 days ago
On Tue, Sep 16, 2025 at 05:08:45PM +0100, Lee Jones wrote:
> On Tue, 16 Sep 2025, Corey Minyard wrote:
> 
> > On Tue, Sep 16, 2025 at 06:51:25PM +0800, Binbin Zhou wrote:
> > > On Tue, Sep 16, 2025 at 6:14 PM Lee Jones <lee@kernel.org> wrote:
> > > >
> > > > On Tue, 16 Sep 2025, Binbin Zhou wrote:
> > > >
> > > > > Hi Lee:
> > > > >
> > > > > Thanks for your reply.
> > > > >
> > > > > On Tue, Sep 16, 2025 at 4:40 PM Lee Jones <lee@kernel.org> wrote:
> > > > > >
> > > > > > On Fri, 12 Sep 2025, Binbin Zhou wrote:
> > > > > >
> > > > > > > Hi Lee:
> > > > > > >
> > > > > > > On Thu, Sep 11, 2025 at 10:33 PM Lee Jones <lee@kernel.org> wrote:
> > > > > > > >
> > > > > > > > On Thu, 04 Sep 2025 20:35:04 +0800, Binbin Zhou wrote:
> > > > > > > > > This patchset introduces the Loongson-2K BMC.
> > > > > > > > >
> > > > > > > > > It is a PCIe device present on servers similar to the Loongson-3 CPUs.
> > > > > > > > > And it is a multifunctional device (MFD), such as display as a sub-function
> > > > > > > > > of it.
> > > > > > > > >
> > > > > > > > > For IPMI, according to the existing design, we use software simulation to
> > > > > > > > > implement the KCS interface registers: Stauts/Command/Data_Out/Data_In.
> > > > > > > > >
> > > > > > > > > [...]
> > > > > > > >
> > > > > > > > Applied, thanks!
> > > > > > > >
> > > > > > > > [1/3] mfd: ls2kbmc: Introduce Loongson-2K BMC core driver
> > > > > > > >       commit: 67c2639e1fc1a07b45d216af659c0dd92a370c68
> > > > > > > > [2/3] mfd: ls2kbmc: Add Loongson-2K BMC reset function support
> > > > > > > >       commit: 2364ccc827e44064e9763f2ae2d1dcc5f945fdf3
> > > > > > >
> > > > > > > Thanks for acknowledging my patchset.
> > > > > > >
> > > > > > > I can't confirm why you didn't apply the IPMI patch, but this appears
> > > > > > > to break the patchset's integrity, potentially causing missing Kconfig
> > > > > > > dependencies (IPMI_LS2K select MFD_LS2K_BMC_CORE).
> > > > > >
> > > > > > Pretty sure this doesn't break anything.
> > > > > >
> > > > > > What build errors do you see as a result?
> > > > > >
> > > > > > > Additionally, as Corey previously explained[1], this patch can be
> > > > > > > applied through your side.
> > > > > > >
> > > > > > > [1]: https://lore.kernel.org/all/aFVtNAY4u2gDiLDS@mail.minyard.net/
> > > > > >
> > > > > > We only apply cross-subsystem patch-sets to a single tree if there are
> > > > > > good reasons to do so.  In this instance, I can't see any reason why the
> > > > > > IPMI driver cannot go in via it's own repo.
> > > > >
> > > > > However, there still seems to be a text dependency issue. The IPMI
> > > > > patch modifies the MAINTAINERS, which depends on the first patch.
> > > > > If the entire series of patches cannot be merged together, does this
> > > > > mean the IPMI patch can only be merged after the MFD patch has been
> > > > > merged into the mainline?
> > > >
> > > > No, not at all.  So long as all patches come together during the
> > > > merge-window, there is no issue.
> > > 
> > > OK, I see, thanks.
> > > 
> > > Hi Corey:
> > > 
> > > What do you think about it?
> > 
> > I thought my ack would be sufficient, but I've pulled this into my tree.
> > I can't apply the MAINTAINERS portion of this, but that can go in
> > later; you can send me a patch for that after the next kernel release.
> > 
> > I'll make a note to Linus that this depends on the MFD changes.
> 
> Feel free to separate that from that patch and I'll happily apply it.

That's great, please do.  It's already separated out, and the rest
is in the next tree.

Thanks,

-corey

> 
> -- 
> Lee Jones [李琼斯]