Commit Graph
437 Commits
Author SHA1 Message Date
Bibo Mao cf56dcee94 crypto: virtio: Remove duplicated virtqueue_kick in virtio_crypto_skcipher_crypt_req
With function virtio_crypto_skcipher_crypt_req(), there is already
virtqueue_kick() call with spinlock held in function
__virtio_crypto_skcipher_do_req(). Remove duplicated virtqueue_kick()
function call here.

Fixes: d79b5d0bbf2e ("crypto: virtio - support crypto engine framework")
Cc: stable@vger.kernel.org
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20260113030556.3522533-3-maobibo@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:18 +08:00
Bibo Mao 181aef9b99 crypto: virtio: Add spinlock protection with virtqueue notification
When VM boots with one virtio-crypto PCI device and builtin backend,
run openssl benchmark command with multiple processes, such as
  openssl speed -evp aes-128-cbc -engine afalg  -seconds 10 -multi 32

openssl processes will hangup and there is error reported like this:
 virtio_crypto virtio0: dataq.0:id 3 is not a head!

It seems that the data virtqueue need protection when it is handled
for virtio done notification. If the spinlock protection is added
in virtcrypto_done_task(), openssl benchmark with multiple processes
works well.

Fixes: fed93fb62e05 ("crypto: virtio - Handle dataq logic with tasklet")
Cc: stable@vger.kernel.org
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20260113030556.3522533-2-maobibo@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:18 +08:00
Brian Masney 4fd65e99a7 clk: loongson1: convert from divider_round_rate() to divider_determine_rate()
The divider_round_rate() function is now deprecated, so let's migrate
to divider_determine_rate() instead so that this deprecated API can be
removed.

Note that when the main function itself was migrated to use
determine_rate, this was mistakenly converted to:

    req->rate = divider_round_rate(...)

This is invalid in the case when an error occurs since it can set the
rate to a negative value.

Fixes: bb40a2ef4fc9 ("clk: loongson1: convert from round_rate() to determine_rate()")
Reviewed-by: Keguang Zhang <keguang.zhang@gmail.com>
Tested-by: Keguang Zhang <keguang.zhang@gmail.com> # on LS1B & LS1C
Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:17 +08:00
tao89959 b8583f1a4c loongson: 2k1000: default defconfig not enable RT
Changelog: 2k1000 默认配置默认不使能RT
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:17 +08:00
tao89959 c8a87714ac loongson: watchdog: fix ping watchdog failed when watchdog close
Changelog: 修复loongson看门狗驱动当关闭时,无法喂狗的问题
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:17 +08:00
tao89959 8604389b03 drivers: watchdog: support setup watchdog timeout when close enable watchdog
Changelog: 看门狗驱动支持在关机调用看门狗时设置超时时间
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:17 +08:00
tao89959 45ccfb6664 loongson: 2k1000: dtsi: sata dma mask setup 64bit
Changelog: 2k1000 的sata的dma位数声明为64bit
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:17 +08:00
tao89959 83af579180 defconfig: 2k1000: enable spidev driver
Changelog: 2k1000 defconfig使能spidev
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:16 +08:00
tao89959 4dde2cee54 2k300: g2k03z0: core dtsi disable emmc clk stable
Changelog: g2k03z0核心板的emmc时钟取消时钟稳定延迟机制
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:16 +08:00
tao89959 b24cfe5860 dts: loongson: update format
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:16 +08:00
tao89959 04486e25a8 loongson: dts: enable yt8531 pll enable
Chnagelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:16 +08:00
tao89959 7d6aacdf8d net: phy: yt8531h: fix pll enable setup bug
Changelog: 修复yt8531h的pll设置失败问题
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:16 +08:00
tao89959 42fcf753ac Revert "net: phy: motor yt8531 add soft reset func"
This reverts commit 9d4f7df5bb4f327c46c340436487c5ea335e48b1.

Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:15 +08:00
tao89959 bf325c3f96 mmc: loongson: support setup clk stable delay time
Changelog: 龙芯mmc驱动支持设置时钟稳定的延时时间
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:15 +08:00
tao89959 ccce94639e net: phy: motor yt8531 add soft reset func
Changelog: yt8531添加 soft reset 函数
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:15 +08:00
tao89959 6d348e033d loongson: 2k1000: defconfig: enable numa
Changelog: 2k1000 配置使能numa
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:15 +08:00
tao89959 a5565c47ec loongson: 2k1000: dp: update spi0 node
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:15 +08:00
tao89959 dce6bf6c01 loongarch: numa: fix compile error
Changelog: 修复编译错误
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:14 +08:00
tao89959 b5202d7a7a loongson: 2k1000: defconfig: add watchdog support
Changelog: 2k1000添加看门狗编译支持
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:14 +08:00
tao89959 71b15acd63 loongson: 2k1000: dtsi: add wtd dts node
2k1000 dtsi添加看门狗节点

Changelog:
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:14 +08:00
tao89959 7c746d35e3 2k300: defconfig: add sd2078support
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:14 +08:00
tao89959 379c54c559 rtc: sd2078: add sd2078 rtc driver
Changelog: 添加sd2078 rtc驱动支持
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:14 +08:00
tao89959 76d8262350 loongson: 2k1000: dtsi: fix spi cells size
Changelog: 修复2k1000的spi的dts节点cells的属性
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:13 +08:00
tao89959 c08629e3b1 loongson: drivers: spi: fix spi bus freq error bug
Changelog: 修复loongson spi的总线频率错误的问题
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:13 +08:00
tao89959 0276e0d4ee loongson: 2k1000: defconfig: add gpio-fan enable
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:13 +08:00
tao89959 9ab0328ed4 loongson: 2k1000: dts: fix 2k1000 dp dts unused aliases
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:13 +08:00
tao89959 d4fe24e70a loongson: 2k1000: pinctrl: fix compile warning
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:12 +08:00
tao89959 a553b37120 loongson: 2k1000: 2k1000 pinctrl driver add new compatible
Changelog: 2k1000的引脚复用配置驱动添加新的compatible
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:12 +08:00
tao89959 3fea94d29b loongson: 2k1000: defconfig: add no dc defconfig
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:12 +08:00
tao89959 113e401007 loongson: 2k1000: defconfig: disable apb dma drivers
Changelog: 2k1000 defconfig 禁用 apb dma 驱动
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:12 +08:00
tao89959 671fe4879a loongson: 2k1000: defconfig: disable pca9555 irq enable
Changelog: 2k1000配置禁用pca95xx中断
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:11 +08:00
tao89959 1cd903920d loongson: 2k1000: sdio: add sdio desc
Changelog: 2k1000 dts添加sdio的描述
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:11 +08:00
tao89959 704dc7d41a loongson: 2k1000: dts: fix uart default as 4 line mode
Changelog: 2k1000 uart0默认为4线模式
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:11 +08:00
tao89959 eefb94b54d loongson: 2k1000: dts: fix otg compatible
Changelog: 修复2k1000dts otg无法使用的问题
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:11 +08:00
tao89959 51cc2f3e5a loongson: 2k1000: dts: fix gpio interrupt error
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:11 +08:00
tao89959 129b30cc4d loongson: 2k1000: dts: dma use new driver
Changelog: 2k1000dts使用新的dma驱动
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:10 +08:00
tao89959 b425f5b590 loongson: 2k1000: i2c: add clock desc
Changelog: 2k1000dts添加时钟描述
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:10 +08:00
tao89959 c6c04e3c05 loongson: 2k1000: dts: add aliases
Changelog: 2k1000的dts添加默认的aliases
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:10 +08:00
tao89959 f2dac8034e loongson: i2c: support multi bus clock generate mode
Changelog: 支持多种总线时钟生成模式
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:10 +08:00
tao89959 ddc84e010f loongson: i2c: support clock and bus freq from dts or acpi
Changelog: 龙芯i2c驱动支持输入时钟和总线时钟从dts或acpi获取
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:10 +08:00
tao89959 5b79993616 loongson: ls2kmci: disable redundant code about cd-gpio setup
Changelog: ls2kmci禁用多余的检测gpio的配置代码
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:09 +08:00
tao89959 530690a32b loongson: ls2kmci: delete multi debug info
Changelog: ls2kmci驱动删除重复调试信息
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:09 +08:00
tao89959 634f00fcb9 loongson: ls2kmci: fix deponds dma error option
Changelog: 修复ls2kmci依赖错误
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:09 +08:00
tao89959 05fd58fbf7 loongson: 2k1000: update pinmux config driver to support multi option
Changelog: 更新2k1000的配置库支持更多配置项
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:09 +08:00
maoxiaochuan d9c34db496 dt-bindings: clock: loongson2: Add Loongson-2K0300
compatible

Document the clock controller shipped in Loongson-2K0300 SoC, which
generates various clock signals for SoC peripherals. Differing from
previous generations of SoCs, LS2K0300 requires a 120MHz external clock
input.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Yanteng Si <siyanteng@cqsoftware.com.cn>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2026-02-04 19:13:11 +08:00
maoxiaochuan 0e8a323936 loongson_2k300_defconfig:Enable bh1750 and aht20 2026-02-04 19:12:03 +08:00
Binbin Zhou 3b38982760 LoongArch: dts: loongson-2k1000: Fix i2c-gpio node names
The binding wants the node to be named "i2c-number", but those are named
"i2c-gpio-number" instead.

Thus rename those to i2c-0, i2c-1 to adhere to the binding and suppress
dtbs_check warnings.

Cc: stable@vger.kernel.org
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:31 +08:00
Binbin Zhou e2bc887adb LoongArch: dts: loongson-2k2000: Add default interrupt controller address cells
Add missing address-cells 0 to the Local I/O, Extend I/O and PCH-PIC
Interrupt Controller node to silence W=1 warning:

  loongson-2k2000.dtsi:364.5-49: Warning (interrupt_map): /bus@10000000/pcie@1a000000/pcie@9,0:interrupt-map:
    Missing property '#address-cells' in node /bus@10000000/interrupt-controller@10000000, using 0 as fallback

Value '0' is correct because:
1. The LIO/EIO/PCH interrupt controller does not have children,
2. interrupt-map property (in PCI node) consists of five components and
   the fourth component "parent unit address", which size is defined by
   '#address-cells' of the node pointed to by the interrupt-parent
   component, is not used (=0)

Cc: stable@vger.kernel.org
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:31 +08:00
Binbin Zhou 9146be0084 LoongArch: dts: loongson-2k1000: Add default interrupt controller address cells
Add missing address-cells 0 to the Local I/O interrupt controller node
to silence W=1 warning:

  loongson-2k1000.dtsi:498.5-55: Warning (interrupt_map): /bus@10000000/pcie@1a000000/pcie@9,0:interrupt-map:
    Missing property '#address-cells' in node /bus@10000000/interrupt-controller@1fe01440, using 0 as fallback

Value '0' is correct because:
1. The Local I/O interrupt controller does not have children,
2. interrupt-map property (in PCI node) consists of five components and
   the fourth component "parent unit address", which size is defined by
   '#address-cells' of the node pointed to by the interrupt-parent
   component, is not used (=0)

Cc: stable@vger.kernel.org
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:31 +08:00
Binbin Zhou 416c8b3c72 LoongArch: dts: loongson-2k0500: Add default interrupt controller address cells
Add missing address-cells 0 to the Local I/O and Extend I/O interrupt
controller node to silence W=1 warning:

  loongson-2k0500.dtsi:513.5-51: Warning (interrupt_map): /bus@10000000/pcie@1a000000/pcie@0,0:interrupt-map:
    Missing property '#address-cells' in node /bus@10000000/interrupt-controller@1fe11600, using 0 as fallback

Value '0' is correct because:
1. The Local I/O & Extend I/O interrupt controller do not have children,
2. interrupt-map property (in PCI node) consists of five components and
   the fourth component "parent unit address", which size is defined by
   '#address-cells' of the node pointed to by the interrupt-parent
   component, is not used (=0)

Cc: stable@vger.kernel.org
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:31 +08:00