--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
-@@ -33,6 +33,7 @@
- #include <linux/pm_runtime.h>
+@@ -34,6 +34,7 @@
#include <linux/of.h>
#include <linux/pinctrl/consumer.h>
+ #include <linux/minmax.h>
+#include <linux/reset.h>
/*
* This macro is used to define some register default values.
-@@ -363,6 +364,7 @@ struct pl022 {
+@@ -364,6 +365,7 @@ struct pl022 {
resource_size_t phybase;
void __iomem *virtbase;
struct clk *clk;
struct spi_controller *host;
struct pl022_ssp_controller *host_info;
struct spi_transfer *cur_transfer;
-@@ -1930,6 +1932,19 @@ static int pl022_probe(struct amba_devic
+@@ -1927,6 +1929,19 @@ static int pl022_probe(struct amba_devic
goto err_no_clk;
}
/* Disable SSP */
writew((readw(SSP_CR1(pl022->virtbase)) & (~SSP_CR1_MASK_SSE)),
SSP_CR1(pl022->virtbase));
-@@ -1985,6 +2000,8 @@ static int pl022_probe(struct amba_devic
+@@ -1982,6 +1997,8 @@ static int pl022_probe(struct amba_devic
if (platform_info->enable_dma)
pl022_dma_remove(pl022);
err_no_irq:
--- a/drivers/mailbox/Kconfig
+++ b/drivers/mailbox/Kconfig
-@@ -295,4 +295,17 @@ config QCOM_IPCC
- acts as an interrupt controller for receiving interrupts from clients.
- Say Y here if you want to build this driver.
+@@ -390,4 +390,17 @@ config RISCV_SBI_MPXY_MBOX
+ or HS-mode hypervisor). Say Y here if you want to have this support.
+ If unsure say N.
+config STARFIVE_MBOX
+ tristate "Platform Starfive Mailbox"
endif
--- a/drivers/mailbox/Makefile
+++ b/drivers/mailbox/Makefile
-@@ -64,3 +64,7 @@ obj-$(CONFIG_SPRD_MBOX) += sprd-mailbox
- obj-$(CONFIG_QCOM_CPUCP_MBOX) += qcom-cpucp-mbox.o
+@@ -82,3 +82,7 @@ obj-$(CONFIG_CIX_MBOX) += cix-mailbox.o
+ obj-$(CONFIG_BCM74110_MAILBOX) += bcm74110-mailbox.o
- obj-$(CONFIG_QCOM_IPCC) += qcom-ipcc.o
+ obj-$(CONFIG_RISCV_SBI_MPXY_MBOX) += riscv-sbi-mpxy-mbox.o
+
+obj-$(CONFIG_STARFIVE_MBOX) += starfive_mailbox.o
+ccflags-$(CONFIG_STARFIVE_MBOX) := -Wno-error=missing-prototypes
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
-@@ -810,6 +810,8 @@ int serial8250_register_8250_port(const
- uart->dl_read = up->dl_read;
- if (up->dl_write)
- uart->dl_write = up->dl_write;
-+ if (up->probe)
-+ uart->probe = up->probe;
+@@ -804,6 +804,8 @@ int serial8250_register_8250_port(const
+ uart->dl_read = up->dl_read;
+ if (up->dl_write)
+ uart->dl_write = up->dl_write;
++ if (up->probe)
++ uart->probe = up->probe;
- if (uart->port.type != PORT_8250_CIR) {
- if (uart_console_registered(&uart->port))
+ /* Check the type (again)! It might have changed by the port.type assignment above. */
+ if (uart->port.type != PORT_8250_CIR) {
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
-@@ -594,6 +594,9 @@ static int dw8250_probe(struct platform_
+@@ -775,6 +775,9 @@ static int dw8250_probe(struct platform_
data->msr_mask_off |= UART_MSR_TERI;
}
if (data->clk == NULL)
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
-@@ -319,6 +319,14 @@ static const struct serial8250_config ua
+@@ -311,6 +311,14 @@ static const struct serial8250_config ua
.rxtrig_bytes = {1, 8, 16, 30},
.flags = UART_CAP_FIFO | UART_CAP_AFE,
},
};
/* Uart divisor latch read */
-@@ -1124,6 +1132,11 @@ static void autoconfig_16550a(struct uar
+@@ -1057,6 +1065,11 @@ static void autoconfig_16550a(struct uar
up->port.type = PORT_U6_16550A;
up->capabilities |= UART_CAP_AFE;
}
}
/*
-@@ -2774,7 +2787,6 @@ serial8250_do_set_termios(struct uart_po
- if (termios->c_cflag & CRTSCTS)
- up->mcr |= UART_MCR_AFE;
+@@ -2565,7 +2578,6 @@ static unsigned int serial8250_get_baud_
+ min = port->uartclk / 16 / UART_DIV_MAX;
+ max = (port->uartclk + tolerance) / 16;
}
-
/*
- * Update the per-port timeout.
- */
+ * Ask the core to calculate the divisor for us.
+ * Allow 1% tolerance at the upper limit so uart clks marginally
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -141,6 +141,7 @@ struct uart_8250_port {
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
-@@ -28,6 +28,7 @@
+@@ -27,6 +27,7 @@
+ #include <linux/io-64-nonatomic-lo-hi.h>
#include <linux/io-64-nonatomic-hi-lo.h>
#include <linux/sed-opal.h>
- #include <linux/pci-p2pdma.h>
+#include <linux/delay.h>
#include "trace.h"
#include "nvme.h"
-@@ -1156,6 +1157,15 @@ static inline int nvme_poll_cq(struct nv
+@@ -1368,6 +1369,15 @@ static inline bool nvme_poll_cq(struct n
{
- int found = 0;
+ bool found = false;
+ /*
+ * In some cases, such as udev trigger, cqe status may update
+ udelay(1);
+
while (nvme_cqe_pending(nvmeq)) {
- found++;
+ found = true;
/*
lib-y += memset.o
lib-y += memmove.o
ifeq ($(CONFIG_KASAN_GENERIC)$(CONFIG_KASAN_SW_TAGS),)
-@@ -16,6 +15,8 @@ lib-$(CONFIG_MMU) += uaccess.o
+@@ -15,6 +14,8 @@ endif
+ lib-$(CONFIG_MMU) += uaccess.o
lib-$(CONFIG_64BIT) += tishift.o
lib-$(CONFIG_RISCV_ISA_ZICBOZ) += clear_page.o
- lib-$(CONFIG_RISCV_ISA_ZBC) += crc32.o
+lib-y += string.o
+lib-y += memcpy_aligned.o
-
obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o
lib-$(CONFIG_RISCV_ISA_V) += xor.o
+ lib-$(CONFIG_RISCV_ISA_V) += riscv_v_helpers.o
--- a/arch/riscv/lib/memcpy.S
+++ /dev/null
@@ -1,110 +0,0 @@