Merge tag 'tty-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 8 Aug 2022 18:31:40 +0000 (11:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 8 Aug 2022 18:31:40 +0000 (11:31 -0700)
Pull tty / serial driver updates from Greg KH:
 "Here is the big set of tty and serial driver changes for 6.0-rc1.

  It was delayed from last week as I wanted to make sure the last commit
  here got some good testing in linux-next and elsewhere as it seemed to
  show up only late in testing for some reason.

  Nothing major here, just lots of cleanups from Jiri and Ilpo to make
  the tty core cleaner (Jiri) and the rs485 code simpler to use (Ilpo).

  Also included in here is the obligatory n_gsm updates from Daniel
  Starke and lots of tiny driver updates and minor fixes and tweaks for
  other smaller serial drivers.

  All of these have been in linux-next for a while with no reported
  problems"

* tag 'tty-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (186 commits)
  tty: serial: qcom-geni-serial: Fix %lu -> %u in print statements
  tty: amiserial: Fix comment typo
  tty: serial: document uart_get_console()
  tty: serial: serial_core, reformat kernel-doc for functions
  Documentation: serial: link uart_ops properly
  Documentation: serial: move GPIO kernel-doc to the functions
  Documentation: serial: dedup kernel-doc for uart functions
  Documentation: serial: move uart_ops documentation to the struct
  dt-bindings: serial: snps-dw-apb-uart: Document Rockchip RV1126
  serial: mvebu-uart: uart2 error bits clearing
  tty: serial: fsl_lpuart: correct the count of break characters
  serial: stm32: make info structs static to avoid sparse warnings
  serial: fsl_lpuart: zero out parity bit in CS7 mode
  tty: serial: qcom-geni-serial: Fix get_clk_div_rate() which otherwise could return a sub-optimal clock rate.
  serial: 8250_bcm2835aux: Add missing clk_disable_unprepare()
  tty: vt: initialize unicode screen buffer
  serial: remove VR41XX serial driver
  serial: 8250: lpc18xx: Remove redundant sanity check for RS485 flags
  serial: 8250_dwlib: remove redundant sanity check for RS485 flags
  dt_bindings: rs485: Correct delay values
  ...

16 files changed:
1  2 
MAINTAINERS
drivers/of/fdt.c
drivers/tty/serial/8250/8250_core.c
drivers/tty/serial/8250/8250_dw.c
drivers/tty/serial/8250/8250_port.c
drivers/tty/serial/Kconfig
drivers/tty/serial/amba-pl011.c
drivers/tty/serial/mvebu-uart.c
drivers/tty/serial/qcom_geni_serial.c
drivers/tty/serial/samsung_tty.c
drivers/tty/serial/serial_core.c
drivers/tty/serial/stm32-usart.c
drivers/tty/tty_buffer.c
drivers/tty/vt/vt.c
drivers/video/fbdev/core/fbcon.c
include/linux/serial_core.h

diff --combined MAINTAINERS
@@@ -171,6 -171,7 +171,6 @@@ F: drivers/scsi/53c700
  
  6LOWPAN GENERIC (BTLE/IEEE 802.15.4)
  M:    Alexander Aring <alex.aring@gmail.com>
 -M:    Jukka Rissanen <jukka.rissanen@linux.intel.com>
  L:    linux-bluetooth@vger.kernel.org
  L:    linux-wpan@vger.kernel.org
  S:    Maintained
@@@ -241,11 -242,6 +241,11 @@@ F:       include/trace/events/9p.
  F:    include/uapi/linux/virtio_9p.h
  F:    net/9p/
  
 +A64FX DIAG DRIVER
 +M:    Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
 +S:    Supported
 +F:    drivers/soc/fujitsu/a64fx-diag.c
 +
  A8293 MEDIA DRIVER
  M:    Antti Palosaari <crope@iki.fi>
  L:    linux-media@vger.kernel.org
@@@ -284,37 -280,38 +284,37 @@@ S:      Maintaine
  F:    drivers/hwmon/abituguru3.c
  
  ACCES 104-DIO-48E GPIO DRIVER
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-gpio@vger.kernel.org
  S:    Maintained
  F:    drivers/gpio/gpio-104-dio-48e.c
  
  ACCES 104-IDI-48 GPIO DRIVER
 -M:    "William Breathitt Gray" <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-gpio@vger.kernel.org
  S:    Maintained
  F:    drivers/gpio/gpio-104-idi-48.c
  
  ACCES 104-IDIO-16 GPIO DRIVER
 -M:    "William Breathitt Gray" <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-gpio@vger.kernel.org
  S:    Maintained
  F:    drivers/gpio/gpio-104-idio-16.c
  
  ACCES 104-QUAD-8 DRIVER
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 -M:    Syed Nayyar Waris <syednwaris@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-iio@vger.kernel.org
  S:    Maintained
  F:    drivers/counter/104-quad-8.c
  
  ACCES PCI-IDIO-16 GPIO DRIVER
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-gpio@vger.kernel.org
  S:    Maintained
  F:    drivers/gpio/gpio-pci-idio-16.c
  
  ACCES PCIe-IDIO-24 GPIO DRIVER
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-gpio@vger.kernel.org
  S:    Maintained
  F:    drivers/gpio/gpio-pcie-idio-24.c
@@@ -429,7 -426,7 +429,7 @@@ F: drivers/acpi/*thermal
  ACPI VIOT DRIVER
  M:    Jean-Philippe Brucker <jean-philippe@linaro.org>
  L:    linux-acpi@vger.kernel.org
 -L:    iommu@lists.linux-foundation.org
 +L:    iommu@lists.linux.dev
  S:    Maintained
  F:    drivers/acpi/viot.c
  F:    include/linux/acpi_viot.h
@@@ -736,14 -733,6 +736,14 @@@ S:       Maintaine
  F:    Documentation/i2c/busses/i2c-ali1563.rst
  F:    drivers/i2c/busses/i2c-ali1563.c
  
 +ALIBABA ELASTIC RDMA DRIVER
 +M:    Cheng Xu <chengyou@linux.alibaba.com>
 +M:    Kai Shen <kaishen@linux.alibaba.com>
 +L:    linux-rdma@vger.kernel.org
 +S:    Supported
 +F:    drivers/infiniband/hw/erdma
 +F:    include/uapi/rdma/erdma-abi.h
 +
  ALIENWARE WMI DRIVER
  L:    Dell.Client.Kernel@dell.com
  S:    Maintained
@@@ -773,14 -762,6 +773,14 @@@ T:       git git://linuxtv.org/media_tree.gi
  F:    Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
  F:    drivers/media/platform/sunxi/sun4i-csi/
  
 +ALLWINNER A31 MIPI CSI-2 BRIDGE DRIVER
 +M:    Paul Kocialkowski <paul.kocialkowski@bootlin.com>
 +L:    linux-media@vger.kernel.org
 +S:    Maintained
 +T:    git git://linuxtv.org/media_tree.git
 +F:    Documentation/devicetree/bindings/media/allwinner,sun6i-a31-mipi-csi2.yaml
 +F:    drivers/media/platform/sunxi/sun6i-mipi-csi2/
 +
  ALLWINNER CPUFREQ DRIVER
  M:    Yangtao Li <tiny.windzz@gmail.com>
  L:    linux-pm@vger.kernel.org
@@@ -816,7 -797,7 +816,7 @@@ S: Maintaine
  F:    drivers/staging/media/sunxi/cedrus/
  
  ALPHA PORT
 -M:    Richard Henderson <rth@twiddle.net>
 +M:    Richard Henderson <richard.henderson@linaro.org>
  M:    Ivan Kokshaysky <ink@jurassic.park.msu.ru>
  M:    Matt Turner <mattst88@gmail.com>
  L:    linux-alpha@vger.kernel.org
@@@ -978,7 -959,7 +978,7 @@@ F: drivers/video/fbdev/geode
  AMD IOMMU (AMD-VI)
  M:    Joerg Roedel <joro@8bytes.org>
  R:    Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
 -L:    iommu@lists.linux-foundation.org
 +L:    iommu@lists.linux.dev
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
  F:    drivers/iommu/amd/
@@@ -1015,7 -996,7 +1015,7 @@@ AMD PMC DRIVE
  M:    Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
  L:    platform-driver-x86@vger.kernel.org
  S:    Maintained
 -F:    drivers/platform/x86/amd-pmc.*
 +F:    drivers/platform/x86/amd/pmc.c
  
  AMD HSMP DRIVER
  M:    Naveen Krishna Chatradhi <naveenkrishna.chatradhi@amd.com>
@@@ -1025,7 -1006,7 +1025,7 @@@ S:      Maintaine
  F:    Documentation/x86/amd_hsmp.rst
  F:    arch/x86/include/asm/amd_hsmp.h
  F:    arch/x86/include/uapi/asm/amd_hsmp.h
 -F:    drivers/platform/x86/amd_hsmp.c
 +F:    drivers/platform/x86/amd/hsmp.c
  
  AMD POWERPLAY AND SWSMU
  M:    Evan Quan <evan.quan@amd.com>
@@@ -1057,7 -1038,6 +1057,7 @@@ F:      arch/arm64/boot/dts/amd
  
  AMD XGBE DRIVER
  M:    Tom Lendacky <thomas.lendacky@amd.com>
 +M:    "Shyam Sundar S K" <Shyam-sundar.S-k@amd.com>
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    arch/arm64/boot/dts/amd/amd-seattle-xgbe*.dtsi
@@@ -1347,7 -1327,7 +1347,7 @@@ M:      Todd Kjos <tkjos@android.com
  M:    Martijn Coenen <maco@android.com>
  M:    Joel Fernandes <joel@joelfernandes.org>
  M:    Christian Brauner <christian@brauner.io>
 -M:    Hridya Valsaraju <hridya@google.com>
 +M:    Carlos Llamas <cmllamas@google.com>
  M:    Suren Baghdasaryan <surenb@google.com>
  L:    linux-kernel@vger.kernel.org
  S:    Supported
@@@ -1374,7 -1354,7 +1374,7 @@@ S:      Maintaine
  F:    sound/aoa/
  
  APEX EMBEDDED SYSTEMS STX104 IIO DRIVER
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-iio@vger.kernel.org
  S:    Maintained
  F:    drivers/iio/adc/stx104.c
@@@ -1488,13 -1468,6 +1488,13 @@@ S:    Supporte
  W:    http://www.aquantia.com
  F:    drivers/net/ethernet/aquantia/atlantic/aq_ptp*
  
 +AR0521 ON SEMICONDUCTOR CAMERA SENSOR DRIVER
 +M:    Krzysztof HaƂasa <khalasa@piap.pl>
 +L:    linux-media@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/media/i2c/onnn,ar0521.yaml
 +F:    drivers/media/i2c/ar0521.c
 +
  ARASAN NAND CONTROLLER DRIVER
  M:    Miquel Raynal <miquel.raynal@bootlin.com>
  M:    Naga Sureshkumar Relli <nagasure@xilinx.com>
@@@ -1547,7 -1520,7 +1547,7 @@@ F:      Documentation/devicetree/bindings/ar
  F:    Documentation/devicetree/bindings/arm/arm,vexpress-juno.yaml
  F:    Documentation/devicetree/bindings/auxdisplay/arm,versatile-lcd.yaml
  F:    Documentation/devicetree/bindings/clock/arm,syscon-icst.yaml
 -F:    Documentation/devicetree/bindings/i2c/i2c-versatile.txt
 +F:    Documentation/devicetree/bindings/i2c/arm,i2c-versatile.yaml
  F:    Documentation/devicetree/bindings/interrupt-controller/arm,versatile-fpga-irq.txt
  F:    Documentation/devicetree/bindings/mtd/mtd-physmap.yaml
  F:    arch/arm/boot/dts/arm-realview-*
@@@ -1850,7 -1823,6 +1850,7 @@@ ARM/APPLE MACHINE SUPPOR
  M:    Hector Martin <marcan@marcan.st>
  M:    Sven Peter <sven@svenpeter.dev>
  R:    Alyssa Rosenzweig <alyssa@rosenzweig.io>
 +L:    asahi@lists.linux.dev
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  W:    https://asahilinux.org
@@@ -1860,7 -1832,6 +1860,7 @@@ T:      git https://github.com/AsahiLinux/li
  F:    Documentation/devicetree/bindings/arm/apple.yaml
  F:    Documentation/devicetree/bindings/arm/apple/*
  F:    Documentation/devicetree/bindings/clock/apple,nco.yaml
 +F:    Documentation/devicetree/bindings/dma/apple,admac.yaml
  F:    Documentation/devicetree/bindings/i2c/apple,i2c.yaml
  F:    Documentation/devicetree/bindings/interrupt-controller/apple,*
  F:    Documentation/devicetree/bindings/iommu/apple,dart.yaml
@@@ -1874,7 -1845,6 +1874,7 @@@ F:      Documentation/devicetree/bindings/po
  F:    Documentation/devicetree/bindings/watchdog/apple,wdt.yaml
  F:    arch/arm64/boot/dts/apple/
  F:    drivers/clk/clk-apple-nco.c
 +F:    drivers/dma/apple-admac.c
  F:    drivers/i2c/busses/i2c-pasemi-core.c
  F:    drivers/i2c/busses/i2c-pasemi-platform.c
  F:    drivers/iommu/apple-dart.c
@@@ -1923,7 -1893,6 +1923,7 @@@ L:      linux-aspeed@lists.ozlabs.org (moder
  S:    Supported
  Q:    https://patchwork.ozlabs.org/project/linux-aspeed/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed.git
 +F:    Documentation/devicetree/bindings/arm/aspeed/
  F:    arch/arm/boot/dts/aspeed-*
  F:    arch/arm/mach-aspeed/
  N:    aspeed
@@@ -2012,9 -1981,11 +2012,9 @@@ L:     linux-arm-kernel@lists.infradead.or
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git
  F:    Documentation/ABI/testing/sysfs-bus-coresight-devices-*
 -F:    Documentation/devicetree/bindings/arm/coresight-cpu-debug.txt
 -F:    Documentation/devicetree/bindings/arm/coresight-cti.yaml
 -F:    Documentation/devicetree/bindings/arm/coresight.txt
 -F:    Documentation/devicetree/bindings/arm/ete.yaml
 -F:    Documentation/devicetree/bindings/arm/trbe.yaml
 +F:    Documentation/devicetree/bindings/arm/arm,coresight-*.yaml
 +F:    Documentation/devicetree/bindings/arm/arm,embedded-trace-extension.yaml
 +F:    Documentation/devicetree/bindings/arm/arm,trace-buffer-extension.yaml
  F:    Documentation/trace/coresight/*
  F:    drivers/hwtracing/coresight/*
  F:    include/dt-bindings/arm/coresight-cti-dt.h
@@@ -2169,13 -2140,11 +2169,13 @@@ M:   Jean-Marie Verdun <verdun@hpe.com
  M:    Nick Hawkins <nick.hawkins@hpe.com>
  S:    Maintained
  F:    Documentation/devicetree/bindings/arm/hpe,gxp.yaml
 +F:    Documentation/devicetree/bindings/spi/hpe,gxp-spi.yaml
  F:    Documentation/devicetree/bindings/timer/hpe,gxp-timer.yaml
  F:    arch/arm/boot/dts/hpe-bmc*
  F:    arch/arm/boot/dts/hpe-gxp*
  F:    arch/arm/mach-hpe/
  F:    drivers/clocksource/timer-gxp.c
 +F:    drivers/spi/spi-gxp.c
  F:    drivers/watchdog/gxp-wdt.c
  
  ARM/IGEP MACHINE SUPPORT
@@@ -2447,7 -2416,7 +2447,7 @@@ T:      git git://git.kernel.org/pub/scm/lin
  F:    Documentation/devicetree/bindings/arm/ste-*
  F:    Documentation/devicetree/bindings/arm/ux500.yaml
  F:    Documentation/devicetree/bindings/arm/ux500/
 -F:    Documentation/devicetree/bindings/i2c/i2c-nomadik.txt
 +F:    Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml
  F:    arch/arm/boot/dts/ste-*
  F:    arch/arm/mach-nomadik/
  F:    arch/arm/mach-ux500/
@@@ -2479,11 -2448,9 +2479,11 @@@ F:    Documentation/devicetree/bindings/*/
  F:    Documentation/devicetree/bindings/arm/npcm/*
  F:    arch/arm/boot/dts/nuvoton-npcm*
  F:    arch/arm/mach-npcm/
 +F:    arch/arm64/boot/dts/nuvoton/
  F:    drivers/*/*npcm*
  F:    drivers/*/*/*npcm*
  F:    include/dt-bindings/clock/nuvoton,npcm7xx-clock.h
 +F:    include/dt-bindings/clock/nuvoton,npcm845-clk.h
  
  ARM/NUVOTON WPCM450 ARCHITECTURE
  M:    Jonathan NeuschĂ€fer <j.neuschaefer@gmx.net>
@@@ -2500,7 -2467,6 +2500,7 @@@ ARM/NXP S32G ARCHITECTUR
  M:    Chester Lin <clin@suse.com>
  R:    Andreas FĂ€rber <afaerber@suse.de>
  R:    Matthias Brugger <mbrugger@suse.com>
 +R:    NXP S32 Linux Team <s32@nxp.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm64/boot/dts/freescale/s32g*.dts*
@@@ -2530,8 -2496,10 +2530,8 @@@ F:     drivers/power/reset/oxnas-restart.
  N:    oxnas
  
  ARM/PALM TREO SUPPORT
 -M:    Tomas Cech <sleep_walker@suse.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -S:    Maintained
 -W:    http://hackndev.com
 +S:    Orphan
  F:    arch/arm/mach-pxa/palmtreo.*
  
  ARM/PALMTX,PALMT5,PALMLD,PALMTE2,PALMTC SUPPORT
@@@ -2569,7 -2537,6 +2569,7 @@@ W:      http://www.armlinux.org.uk
  ARM/QUALCOMM SUPPORT
  M:    Andy Gross <agross@kernel.org>
  M:    Bjorn Andersson <bjorn.andersson@linaro.org>
 +R:    Konrad Dybcio <konrad.dybcio@somainline.org>
  L:    linux-arm-msm@vger.kernel.org
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git
@@@ -2620,7 -2587,7 +2620,7 @@@ L:      linux-unisoc@lists.infradead.org (mo
  S:    Maintained
  F:    Documentation/devicetree/bindings/arm/rda.yaml
  F:    Documentation/devicetree/bindings/gpio/gpio-rda.yaml
 -F:    Documentation/devicetree/bindings/interrupt-controller/rda,8810pl-intc.txt
 +F:    Documentation/devicetree/bindings/interrupt-controller/rda,8810pl-intc.yaml
  F:    Documentation/devicetree/bindings/serial/rda,8810pl-uart.yaml
  F:    Documentation/devicetree/bindings/timer/rda,8810pl-timer.yaml
  F:    arch/arm/boot/dts/rda8810pl-*
@@@ -2648,8 -2615,6 +2648,8 @@@ Q:      http://patchwork.kernel.org/project/
  C:    irc://irc.libera.chat/renesas-soc
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel.git next
  F:    Documentation/devicetree/bindings/arm/renesas.yaml
 +F:    Documentation/devicetree/bindings/hwinfo/renesas,prr.yaml
 +F:    Documentation/devicetree/bindings/soc/renesas/
  F:    arch/arm64/boot/dts/renesas/
  F:    drivers/soc/renesas/
  F:    include/linux/soc/renesas/
@@@ -2700,7 -2665,6 +2700,7 @@@ B:      mailto:linux-samsung-soc@vger.kernel
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git
  F:    Documentation/arm/samsung/
  F:    Documentation/devicetree/bindings/arm/samsung/
 +F:    Documentation/devicetree/bindings/hwinfo/samsung,*
  F:    Documentation/devicetree/bindings/power/pd-samsung.yaml
  F:    Documentation/devicetree/bindings/soc/samsung/
  F:    arch/arm/boot/dts/exynos*
@@@ -2750,7 -2714,6 +2750,7 @@@ M:      Sylwester Nawrocki <s.nawrocki@samsu
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    linux-media@vger.kernel.org
  S:    Maintained
 +F:    Documentation/devicetree/bindings/media/samsung,s5pv210-jpeg.yaml
  F:    drivers/media/platform/samsung/s5p-jpeg/
  
  ARM/SAMSUNG S5P SERIES Multi Format Codec (MFC) SUPPORT
@@@ -2770,7 -2733,6 +2770,7 @@@ Q:      http://patchwork.kernel.org/project/
  C:    irc://irc.libera.chat/renesas-soc
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel.git next
  F:    Documentation/devicetree/bindings/arm/renesas.yaml
 +F:    Documentation/devicetree/bindings/soc/renesas/
  F:    arch/arm/boot/dts/emev2*
  F:    arch/arm/boot/dts/gr-peach*
  F:    arch/arm/boot/dts/iwg20d-q7*
@@@ -2860,23 -2822,6 +2860,23 @@@ F:    drivers/clocksource/armv7m_systick.
  N:    stm32
  N:    stm
  
 +ARM/SUNPLUS SP7021 SOC SUPPORT
 +M:    Qin Jian <qinjian@cqplus1.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for mon-subscribers)
 +S:    Maintained
 +W:    https://sunplus-tibbo.atlassian.net/wiki/spaces/doc/overview
 +F:    Documentation/devicetree/bindings/arm/sunplus,sp7021.yaml
 +F:    Documentation/devicetree/bindings/clock/sunplus,sp7021-clkc.yaml
 +F:    Documentation/devicetree/bindings/interrupt-controller/sunplus,sp7021-intc.yaml
 +F:    Documentation/devicetree/bindings/reset/sunplus,reset.yaml
 +F:    arch/arm/boot/dts/sunplus-sp7021*.dts*
 +F:    arch/arm/configs/sp7021_*defconfig
 +F:    arch/arm/mach-sunplus/
 +F:    drivers/irqchip/irq-sp7021-intc.c
 +F:    drivers/reset/reset-sunplus.c
 +F:    include/dt-bindings/clock/sunplus,sp7021-clkc.h
 +F:    include/dt-bindings/reset/sunplus,sp7021-reset.h
 +
  ARM/Synaptics SoC support
  M:    Jisheng Zhang <jszhang@kernel.org>
  M:    Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
@@@ -2953,7 -2898,6 +2953,7 @@@ M:      Tero Kristo <kristo@kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Supported
  F:    Documentation/devicetree/bindings/arm/ti/k3.yaml
 +F:    Documentation/devicetree/bindings/hwinfo/ti,k3-socinfo.yaml
  F:    arch/arm64/boot/dts/ti/Makefile
  F:    arch/arm64/boot/dts/ti/k3-*
  F:    include/dt-bindings/pinctrl/k3.h
@@@ -3192,13 -3136,6 +3192,13 @@@ S:    Maintaine
  F:    Documentation/devicetree/bindings/media/aspeed-video.txt
  F:    drivers/media/platform/aspeed/
  
 +ASPEED USB UDC DRIVER
 +M:    Neal Liu <neal_liu@aspeedtech.com>
 +L:    linux-aspeed@lists.ozlabs.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/usb/aspeed,ast2600-udc.yaml
 +F:    drivers/usb/gadget/udc/aspeed_udc.c
 +
  ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS
  M:    Corentin Chary <corentin.chary@gmail.com>
  L:    acpi4asus-user@lists.sourceforge.net
@@@ -3501,7 -3438,7 +3501,7 @@@ W:      https://wireless.wiki.kernel.org/en/
  F:    drivers/net/wireless/broadcom/b43legacy/
  
  BACKLIGHT CLASS/SUBSYSTEM
 -M:    Lee Jones <lee.jones@linaro.org>
 +M:    Lee Jones <lee@kernel.org>
  M:    Daniel Thompson <daniel.thompson@linaro.org>
  M:    Jingoo Han <jingoohan1@gmail.com>
  L:    dri-devel@lists.freedesktop.org
@@@ -3603,6 -3540,7 +3603,6 @@@ F:      lib/bitmap.
  F:    lib/cpumask.c
  F:    lib/find_bit.c
  F:    lib/find_bit_benchmark.c
 -F:    lib/nodemask.c
  F:    lib/test_bitmap.c
  F:    tools/include/linux/bitmap.h
  F:    tools/include/linux/find.h
@@@ -3676,18 -3614,16 +3676,18 @@@ S:   Maintaine
  F:    Documentation/devicetree/bindings/iio/accel/bosch,bma400.yaml
  F:    drivers/iio/accel/bma400*
  
 -BPF (Safe dynamic programs and tools)
 +BPF [GENERAL] (Safe Dynamic Programs and Tools)
  M:    Alexei Starovoitov <ast@kernel.org>
  M:    Daniel Borkmann <daniel@iogearbox.net>
  M:    Andrii Nakryiko <andrii@kernel.org>
 -R:    Martin KaFai Lau <kafai@fb.com>
 -R:    Song Liu <songliubraving@fb.com>
 +R:    Martin KaFai Lau <martin.lau@linux.dev>
 +R:    Song Liu <song@kernel.org>
  R:    Yonghong Song <yhs@fb.com>
  R:    John Fastabend <john.fastabend@gmail.com>
  R:    KP Singh <kpsingh@kernel.org>
 -L:    netdev@vger.kernel.org
 +R:    Stanislav Fomichev <sdf@google.com>
 +R:    Hao Luo <haoluo@google.com>
 +R:    Jiri Olsa <jolsa@kernel.org>
  L:    bpf@vger.kernel.org
  S:    Supported
  W:    https://bpf.io/
@@@ -3719,17 -3655,21 +3719,17 @@@ F:   scripts/pahole-version.s
  F:    tools/bpf/
  F:    tools/lib/bpf/
  F:    tools/testing/selftests/bpf/
 -N:    bpf
 -K:    bpf
  
  BPF JIT for ARM
  M:    Shubham Bansal <illusionist.neo@gmail.com>
 -L:    netdev@vger.kernel.org
  L:    bpf@vger.kernel.org
 -S:    Maintained
 +S:    Odd Fixes
  F:    arch/arm/net/
  
  BPF JIT for ARM64
  M:    Daniel Borkmann <daniel@iogearbox.net>
  M:    Alexei Starovoitov <ast@kernel.org>
  M:    Zi Shen Lim <zlim.lnx@gmail.com>
 -L:    netdev@vger.kernel.org
  L:    bpf@vger.kernel.org
  S:    Supported
  F:    arch/arm64/net/
  BPF JIT for MIPS (32-BIT AND 64-BIT)
  M:    Johan Almbladh <johan.almbladh@anyfinetworks.com>
  M:    Paul Burton <paulburton@kernel.org>
 -L:    netdev@vger.kernel.org
  L:    bpf@vger.kernel.org
  S:    Maintained
  F:    arch/mips/net/
  
  BPF JIT for NFP NICs
  M:    Jakub Kicinski <kuba@kernel.org>
 -L:    netdev@vger.kernel.org
  L:    bpf@vger.kernel.org
 -S:    Supported
 +S:    Odd Fixes
  F:    drivers/net/ethernet/netronome/nfp/bpf/
  
  BPF JIT for POWERPC (32-BIT AND 64-BIT)
  M:    Naveen N. Rao <naveen.n.rao@linux.ibm.com>
 -L:    netdev@vger.kernel.org
 +M:    Michael Ellerman <mpe@ellerman.id.au>
  L:    bpf@vger.kernel.org
 -S:    Maintained
 +S:    Supported
  F:    arch/powerpc/net/
  
  BPF JIT for RISC-V (32-bit)
  M:    Luke Nelson <luke.r.nels@gmail.com>
  M:    Xi Wang <xi.wang@gmail.com>
 -L:    netdev@vger.kernel.org
  L:    bpf@vger.kernel.org
  S:    Maintained
  F:    arch/riscv/net/
@@@ -3764,6 -3707,7 +3764,6 @@@ X:      arch/riscv/net/bpf_jit_comp64.
  
  BPF JIT for RISC-V (64-bit)
  M:    Björn Töpel <bjorn@kernel.org>
 -L:    netdev@vger.kernel.org
  L:    bpf@vger.kernel.org
  S:    Maintained
  F:    arch/riscv/net/
@@@ -3773,80 -3717,36 +3773,80 @@@ BPF JIT for S39
  M:    Ilya Leoshkevich <iii@linux.ibm.com>
  M:    Heiko Carstens <hca@linux.ibm.com>
  M:    Vasily Gorbik <gor@linux.ibm.com>
 -L:    netdev@vger.kernel.org
  L:    bpf@vger.kernel.org
 -S:    Maintained
 +S:    Supported
  F:    arch/s390/net/
  X:    arch/s390/net/pnet.c
  
  BPF JIT for SPARC (32-BIT AND 64-BIT)
  M:    David S. Miller <davem@davemloft.net>
 -L:    netdev@vger.kernel.org
  L:    bpf@vger.kernel.org
 -S:    Maintained
 +S:    Odd Fixes
  F:    arch/sparc/net/
  
  BPF JIT for X86 32-BIT
  M:    Wang YanQing <udknight@gmail.com>
 -L:    netdev@vger.kernel.org
  L:    bpf@vger.kernel.org
 -S:    Maintained
 +S:    Odd Fixes
  F:    arch/x86/net/bpf_jit_comp32.c
  
  BPF JIT for X86 64-BIT
  M:    Alexei Starovoitov <ast@kernel.org>
  M:    Daniel Borkmann <daniel@iogearbox.net>
 -L:    netdev@vger.kernel.org
  L:    bpf@vger.kernel.org
  S:    Supported
  F:    arch/x86/net/
  X:    arch/x86/net/bpf_jit_comp32.c
  
 -BPF LSM (Security Audit and Enforcement using BPF)
 +BPF [CORE]
 +M:    Alexei Starovoitov <ast@kernel.org>
 +M:    Daniel Borkmann <daniel@iogearbox.net>
 +R:    John Fastabend <john.fastabend@gmail.com>
 +L:    bpf@vger.kernel.org
 +S:    Maintained
 +F:    kernel/bpf/verifier.c
 +F:    kernel/bpf/tnum.c
 +F:    kernel/bpf/core.c
 +F:    kernel/bpf/syscall.c
 +F:    kernel/bpf/dispatcher.c
 +F:    kernel/bpf/trampoline.c
 +F:    include/linux/bpf*
 +F:    include/linux/filter.h
 +
 +BPF [BTF]
 +M:    Martin KaFai Lau <martin.lau@linux.dev>
 +L:    bpf@vger.kernel.org
 +S:    Maintained
 +F:    kernel/bpf/btf.c
 +F:    include/linux/btf*
 +
 +BPF [TRACING]
 +M:    Song Liu <song@kernel.org>
 +R:    Jiri Olsa <jolsa@kernel.org>
 +L:    bpf@vger.kernel.org
 +S:    Maintained
 +F:    kernel/trace/bpf_trace.c
 +F:    kernel/bpf/stackmap.c
 +
 +BPF [NETWORKING] (tc BPF, sock_addr)
 +M:    Martin KaFai Lau <martin.lau@linux.dev>
 +M:    Daniel Borkmann <daniel@iogearbox.net>
 +R:    John Fastabend <john.fastabend@gmail.com>
 +L:    bpf@vger.kernel.org
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    net/core/filter.c
 +F:    net/sched/act_bpf.c
 +F:    net/sched/cls_bpf.c
 +
 +BPF [NETWORKING] (struct_ops, reuseport)
 +M:    Martin KaFai Lau <martin.lau@linux.dev>
 +L:    bpf@vger.kernel.org
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    kernel/bpf/bpf_struct*
 +
 +BPF [SECURITY & LSM] (Security Audit and Enforcement using BPF)
  M:    KP Singh <kpsingh@kernel.org>
  R:    Florent Revest <revest@chromium.org>
  R:    Brendan Jackman <jackmanb@chromium.org>
@@@ -3857,64 -3757,13 +3857,64 @@@ F:   include/linux/bpf_lsm.
  F:    kernel/bpf/bpf_lsm.c
  F:    security/bpf/
  
 -BPFTOOL
 +BPF [STORAGE & CGROUPS]
 +M:    Martin KaFai Lau <martin.lau@linux.dev>
 +L:    bpf@vger.kernel.org
 +S:    Maintained
 +F:    kernel/bpf/cgroup.c
 +F:    kernel/bpf/*storage.c
 +F:    kernel/bpf/bpf_lru*
 +
 +BPF [RINGBUF]
 +M:    Andrii Nakryiko <andrii@kernel.org>
 +L:    bpf@vger.kernel.org
 +S:    Maintained
 +F:    kernel/bpf/ringbuf.c
 +
 +BPF [ITERATOR]
 +M:    Yonghong Song <yhs@fb.com>
 +L:    bpf@vger.kernel.org
 +S:    Maintained
 +F:    kernel/bpf/*iter.c
 +
 +BPF [L7 FRAMEWORK] (sockmap)
 +M:    John Fastabend <john.fastabend@gmail.com>
 +M:    Jakub Sitnicki <jakub@cloudflare.com>
 +L:    netdev@vger.kernel.org
 +L:    bpf@vger.kernel.org
 +S:    Maintained
 +F:    include/linux/skmsg.h
 +F:    net/core/skmsg.c
 +F:    net/core/sock_map.c
 +F:    net/ipv4/tcp_bpf.c
 +F:    net/ipv4/udp_bpf.c
 +F:    net/unix/unix_bpf.c
 +
 +BPF [LIBRARY] (libbpf)
 +M:    Andrii Nakryiko <andrii@kernel.org>
 +L:    bpf@vger.kernel.org
 +S:    Maintained
 +F:    tools/lib/bpf/
 +
 +BPF [TOOLING] (bpftool)
  M:    Quentin Monnet <quentin@isovalent.com>
  L:    bpf@vger.kernel.org
  S:    Maintained
  F:    kernel/bpf/disasm.*
  F:    tools/bpf/bpftool/
  
 +BPF [SELFTESTS] (Test Runners & Infrastructure)
 +M:    Andrii Nakryiko <andrii@kernel.org>
 +R:    Mykola Lysenko <mykolal@fb.com>
 +L:    bpf@vger.kernel.org
 +S:    Maintained
 +F:    tools/testing/selftests/bpf/
 +
 +BPF [MISC]
 +L:    bpf@vger.kernel.org
 +S:    Odd Fixes
 +K:    (?:\b|_)bpf(?:\b|_)
 +
  BROADCOM B44 10/100 ETHERNET DRIVER
  M:    Michael Chan <michael.chan@broadcom.com>
  L:    netdev@vger.kernel.org
@@@ -3936,36 -3785,23 +3936,36 @@@ BROADCOM BCMBCA ARM ARCHITECTUR
  M:    William Zhang <william.zhang@broadcom.com>
  M:    Anand Gore <anand.gore@broadcom.com>
  M:    Kursad Oney <kursad.oney@broadcom.com>
 +M:    Florian Fainelli <f.fainelli@gmail.com>
  R:    Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  T:    git git://github.com/broadcom/stblinux.git
  F:    Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml
 -F:    arch/arm/boot/dts/bcm47622.dtsi
 -F:    arch/arm/boot/dts/bcm947622.dts
 +F:    arch/arm64/boot/dts/broadcom/bcmbca/*
  N:    bcmbca
  N:    bcm[9]?47622
 +N:    bcm[9]?4912
 +N:    bcm[9]?63138
 +N:    bcm[9]?63146
 +N:    bcm[9]?63148
 +N:    bcm[9]?63158
 +N:    bcm[9]?63178
 +N:    bcm[9]?6756
 +N:    bcm[9]?6813
 +N:    bcm[9]?6846
 +N:    bcm[9]?6855
 +N:    bcm[9]?6856
 +N:    bcm[9]?6858
 +N:    bcm[9]?6878
  
  BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE
 -M:    Nicolas Saenz Julienne <nsaenz@kernel.org>
 +M:    Florian Fainelli <f.fainelli@gmail.com>
  R:    Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
  L:    linux-rpi-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/nsaenz/linux-rpi.git
 +T:    git git://github.com/broadcom/stblinux.git
  F:    Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
  F:    drivers/pci/controller/pcie-brcmstb.c
  F:    drivers/staging/vc04_services
@@@ -4033,6 -3869,14 +4033,6 @@@ S:     Maintaine
  F:    arch/arm/boot/dts/bcm47189*
  F:    arch/arm/boot/dts/bcm53573*
  
 -BROADCOM BCM63XX ARM ARCHITECTURE
 -M:    Florian Fainelli <f.fainelli@gmail.com>
 -R:    Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
 -L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -S:    Maintained
 -T:    git git://github.com/broadcom/stblinux.git
 -N:    bcm63xx
 -
  BROADCOM BCM63XX/BCM33XX UDC DRIVER
  M:    Kevin Cernekee <cernekee@gmail.com>
  L:    linux-usb@vger.kernel.org
@@@ -4439,7 -4283,7 +4439,7 @@@ L:      linux-pm@vger.kernel.or
  L:    linux-samsung-soc@vger.kernel.org
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git
 -F:    Documentation/devicetree/bindings/devfreq/exynos-bus.txt
 +F:    Documentation/devicetree/bindings/interconnect/samsung,exynos-bus.yaml
  F:    drivers/devfreq/exynos-bus.c
  
  BUSLOGIC SCSI DRIVER
@@@ -4911,7 -4755,6 +4911,7 @@@ S:      Maintaine
  F:    Documentation/devicetree/bindings/sound/cirrus,cs*
  F:    include/dt-bindings/sound/cs*
  F:    sound/pci/hda/cs*
 +F:    sound/pci/hda/hda_cs_dsp_ctl.*
  F:    sound/soc/codecs/cs*
  
  CIRRUS LOGIC DSP FIRMWARE DRIVER
@@@ -5030,7 -4873,7 +5030,7 @@@ R:      Nick Desaulniers <ndesaulniers@googl
  L:    llvm@lists.linux.dev
  S:    Supported
  B:    https://github.com/ClangBuiltLinux/linux/issues
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/clang/features
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
  F:    include/linux/cfi.h
  F:    kernel/cfi.c
  
@@@ -5116,21 -4959,17 +5116,21 @@@ Q:   http://patchwork.kernel.org/project/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git
  F:    Documentation/devicetree/bindings/clock/
  F:    drivers/clk/
 +F:    include/dt-bindings/clock/
  F:    include/linux/clk-pr*
  F:    include/linux/clk/
  F:    include/linux/of_clk.h
  X:    drivers/clk/clkdev.c
  
 -COMMON INTERNET FILE SYSTEM CLIENT (CIFS)
 +COMMON INTERNET FILE SYSTEM CLIENT (CIFS and SMB3)
  M:    Steve French <sfrench@samba.org>
 +R:    Paulo Alcantara <pc@cjr.nz> (DFS, global name space)
 +R:    Ronnie Sahlberg <lsahlber@redhat.com> (directory leases, sparse files)
 +R:    Shyam Prasad N <sprasad@microsoft.com> (multichannel)
  L:    linux-cifs@vger.kernel.org
  L:    samba-technical@lists.samba.org (moderated for non-subscribers)
  S:    Supported
 -W:    http://linux-cifs.samba.org/
 +W:    https://wiki.samba.org/index.php/LinuxCIFS
  T:    git git://git.samba.org/sfrench/cifs-2.6.git
  F:    Documentation/admin-guide/cifs/
  F:    fs/cifs/
@@@ -5170,7 -5009,7 +5170,7 @@@ COMPUTE EXPRESS LINK (CXL
  M:    Alison Schofield <alison.schofield@intel.com>
  M:    Vishal Verma <vishal.l.verma@intel.com>
  M:    Ira Weiny <ira.weiny@intel.com>
 -M:    Ben Widawsky <ben.widawsky@intel.com>
 +M:    Ben Widawsky <bwidawsk@kernel.org>
  M:    Dan Williams <dan.j.williams@intel.com>
  L:    linux-cxl@vger.kernel.org
  S:    Maintained
@@@ -5200,7 -5039,6 +5200,7 @@@ F:      include/linux/console
  
  CONTEXT TRACKING
  M:    Frederic Weisbecker <frederic@kernel.org>
 +M:    "Paul E. McKenney" <paulmck@kernel.org>
  S:    Maintained
  F:    kernel/context_tracking.c
  F:    include/linux/context_tracking*
@@@ -5276,10 -5114,10 +5276,10 @@@ F:   Documentation/hwmon/corsair-psu.rs
  F:    drivers/hwmon/corsair-psu.c
  
  COUNTER SUBSYSTEM
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-iio@vger.kernel.org
  S:    Maintained
 -T:    git git@gitlab.com:vilhelmgray/counter.git
 +T:    git https://git.linaro.org/people/william.gray/counter.git
  F:    Documentation/ABI/testing/sysfs-bus-counter
  F:    Documentation/driver-api/generic-counter.rst
  F:    drivers/counter/
@@@ -5523,7 -5361,7 +5523,7 @@@ W:      http://www.chelsio.co
  F:    drivers/net/ethernet/chelsio/cxgb3/
  
  CXGB3 ISCSI DRIVER (CXGB3I)
 -M:    Karen Xie <kxie@chelsio.com>
 +M:    Varun Prakash <varun@chelsio.com>
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  W:    http://www.chelsio.com
@@@ -5555,7 -5393,7 +5555,7 @@@ W:      http://www.chelsio.co
  F:    drivers/net/ethernet/chelsio/cxgb4/
  
  CXGB4 ISCSI DRIVER (CXGB4I)
 -M:    Karen Xie <kxie@chelsio.com>
 +M:    Varun Prakash <varun@chelsio.com>
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  W:    http://www.chelsio.com
@@@ -5671,7 -5509,7 +5671,7 @@@ L:      linux-mm@kvack.or
  S:    Maintained
  F:    Documentation/ABI/testing/sysfs-kernel-mm-damon
  F:    Documentation/admin-guide/mm/damon/
 -F:    Documentation/vm/damon/
 +F:    Documentation/mm/damon/
  F:    include/linux/damon.h
  F:    include/trace/events/damon.h
  F:    mm/damon/
@@@ -5926,7 -5764,6 +5926,7 @@@ L:      linux-pm@vger.kernel.or
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git
  F:    Documentation/devicetree/bindings/devfreq/
 +F:    Documentation/devicetree/bindings/interconnect/mediatek,cci.yaml
  F:    drivers/devfreq/
  F:    include/linux/devfreq.h
  F:    include/trace/events/devfreq.h
@@@ -6001,7 -5838,6 +6001,7 @@@ W:      http://www.dialog-semiconductor.com/
  F:    Documentation/devicetree/bindings/input/da90??-onkey.txt
  F:    Documentation/devicetree/bindings/input/dlg,da72??.txt
  F:    Documentation/devicetree/bindings/mfd/da90*.txt
 +F:    Documentation/devicetree/bindings/mfd/da90*.yaml
  F:    Documentation/devicetree/bindings/regulator/dlg,da9*.yaml
  F:    Documentation/devicetree/bindings/regulator/da92*.txt
  F:    Documentation/devicetree/bindings/regulator/slg51000.txt
@@@ -6040,7 -5876,7 +6040,7 @@@ F:      include/sound/da[79]*.
  F:    sound/soc/codecs/da[79]*.[ch]
  
  DIAMOND SYSTEMS GPIO-MM GPIO DRIVER
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-gpio@vger.kernel.org
  S:    Maintained
  F:    drivers/gpio/gpio-gpio-mm.c
@@@ -6117,7 -5953,6 +6117,7 @@@ T:      git git://git.kernel.org/pub/scm/lin
  F:    Documentation/devicetree/bindings/dma/
  F:    Documentation/driver-api/dmaengine/
  F:    drivers/dma/
 +F:    include/dt-bindings/dma/
  F:    include/linux/dma/
  F:    include/linux/dmaengine.h
  F:    include/linux/of_dma.h
@@@ -6126,7 -5961,7 +6126,7 @@@ DMA MAPPING HELPER
  M:    Christoph Hellwig <hch@lst.de>
  M:    Marek Szyprowski <m.szyprowski@samsung.com>
  R:    Robin Murphy <robin.murphy@arm.com>
 -L:    iommu@lists.linux-foundation.org
 +L:    iommu@lists.linux.dev
  S:    Supported
  W:    http://git.infradead.org/users/hch/dma-mapping.git
  T:    git git://git.infradead.org/users/hch/dma-mapping.git
@@@ -6138,7 -5973,7 +6138,7 @@@ F:      kernel/dma
  
  DMA MAPPING BENCHMARK
  M:    Xiang Chen <chenxiang66@hisilicon.com>
 -L:    iommu@lists.linux-foundation.org
 +L:    iommu@lists.linux.dev
  F:    kernel/dma/map_benchmark.c
  F:    tools/testing/selftests/dma/
  
@@@ -6288,6 -6123,14 +6288,6 @@@ F:     Documentation/networking/device_driv
  F:    drivers/net/ethernet/freescale/dpaa2/dpaa2-switch*
  F:    drivers/net/ethernet/freescale/dpaa2/dpsw*
  
 -DPT_I2O SCSI RAID DRIVER
 -M:    Adaptec OEM Raid Solutions <aacraid@microsemi.com>
 -L:    linux-scsi@vger.kernel.org
 -S:    Maintained
 -W:    http://www.adaptec.com/
 -F:    drivers/scsi/dpt*
 -F:    drivers/scsi/dpt/
 -
  DRBD DRIVER
  M:    Philipp Reisner <philipp.reisner@linbit.com>
  M:    Lars Ellenberg <lars.ellenberg@linbit.com>
@@@ -6383,13 -6226,6 +6383,13 @@@ S:    Maintaine
  F:    Documentation/devicetree/bindings/display/bridge/chipone,icn6211.yaml
  F:    drivers/gpu/drm/bridge/chipone-icn6211.c
  
 +DRM DRIVER FOR EBBG FT8719 PANEL
 +M:    Joel Selvaraj <jo@jsfamily.in>
 +S:    Maintained
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
 +F:    Documentation/devicetree/bindings/display/panel/ebbg,ft8719.yaml
 +F:    drivers/gpu/drm/panel/panel-ebbg-ft8719.c
 +
  DRM DRIVER FOR FARADAY TVE200 TV ENCODER
  M:    Linus Walleij <linus.walleij@linaro.org>
  S:    Maintained
@@@ -6448,12 -6284,6 +6448,12 @@@ S:    Orphan / Obsolet
  F:    drivers/gpu/drm/i810/
  F:    include/uapi/drm/i810_drm.h
  
 +DRM DRIVER FOR LOGICVC DISPLAY CONTROLLER
 +M:    Paul Kocialkowski <paul.kocialkowski@bootlin.com>
 +S:    Supported
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
 +F:    drivers/gpu/drm/logicvc/
 +
  DRM DRIVER FOR LVDS PANELS
  M:    Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  L:    dri-devel@lists.freedesktop.org
@@@ -6630,17 -6460,12 +6630,17 @@@ S:   Orphan / Obsolet
  F:    drivers/gpu/drm/savage/
  F:    include/uapi/drm/savage_drm.h
  
 -DRM DRIVER FOR SIMPLE FRAMEBUFFERS
 +DRM DRIVER FOR FIRMWARE FRAMEBUFFERS
  M:    Thomas Zimmermann <tzimmermann@suse.de>
 +M:    Javier Martinez Canillas <javierm@redhat.com>
  L:    dri-devel@lists.freedesktop.org
  S:    Maintained
  T:    git git://anongit.freedesktop.org/drm/drm-misc
 +F:    drivers/gpu/drm/drm_aperture.c
  F:    drivers/gpu/drm/tiny/simpledrm.c
 +F:    drivers/video/aperture.c
 +F:    include/drm/drm_aperture.h
 +F:    include/linux/aperture.h
  
  DRM DRIVER FOR SIS VIDEO CARDS
  S:    Orphan / Obsolete
@@@ -6678,12 -6503,6 +6678,12 @@@ DRM DRIVER FOR TDFX VIDEO CARD
  S:    Orphan / Obsolete
  F:    drivers/gpu/drm/tdfx/
  
 +DRM DRIVER FOR TI DLPC3433 MIPI DSI TO DMD BRIDGE
 +M:    Jagan Teki <jagan@amarulasolutions.com>
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/display/bridge/ti,dlpc3433.yaml
 +F:    drivers/gpu/drm/bridge/ti-dlpc3433.c
 +
  DRM DRIVER FOR TI SN65DSI86 BRIDGE CHIP
  R:    Douglas Anderson <dianders@chromium.org>
  F:    Documentation/devicetree/bindings/display/bridge/ti,sn65dsi86.yaml
@@@ -6813,6 -6632,7 +6813,6 @@@ F:      drivers/gpu/drm/bridge
  
  DRM DRIVERS FOR EXYNOS
  M:    Inki Dae <inki.dae@samsung.com>
 -M:    Joonyoung Shim <jy0922.shim@samsung.com>
  M:    Seung-Woo Kim <sw0312.kim@samsung.com>
  M:    Kyungmin Park <kyungmin.park@samsung.com>
  L:    dri-devel@lists.freedesktop.org
@@@ -6841,16 -6661,6 +6841,16 @@@ F:    Documentation/devicetree/bindings/di
  F:    drivers/gpu/drm/imx/
  F:    drivers/gpu/ipu-v3/
  
 +DRM DRIVERS FOR FREESCALE IMX BRIDGE
 +M:    Liu Ying <victor.liu@nxp.com>
 +L:    dri-devel@lists.freedesktop.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-ldb.yaml
 +F:    Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pixel-combiner.yaml
 +F:    Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pixel-link.yaml
 +F:    Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pxl2dpi.yaml
 +F:    drivers/gpu/drm/bridge/imx/
 +
  DRM DRIVERS FOR GMA500 (Poulsbo, Moorestown and derivative chipsets)
  M:    Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
  L:    dri-devel@lists.freedesktop.org
@@@ -6895,7 -6705,6 +6895,7 @@@ L:      linux-mediatek@lists.infradead.org (
  S:    Supported
  F:    Documentation/devicetree/bindings/display/mediatek/
  F:    drivers/gpu/drm/mediatek/
 +F:    drivers/phy/mediatek/phy-mtk-dp.c
  F:    drivers/phy/mediatek/phy-mtk-hdmi*
  F:    drivers/phy/mediatek/phy-mtk-mipi*
  
@@@ -6905,7 -6714,7 +6905,7 @@@ L:      dri-devel@lists.freedesktop.or
  L:    linux-tegra@vger.kernel.org
  S:    Supported
  T:    git git://anongit.freedesktop.org/tegra/linux.git
 -F:    Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt
 +F:    Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.yaml
  F:    Documentation/devicetree/bindings/gpu/host1x/
  F:    drivers/gpu/drm/tegra/
  F:    drivers/gpu/host1x/
@@@ -6982,7 -6791,6 +6982,7 @@@ F:      drivers/gpu/drm/omapdrm
  
  DRM DRIVERS FOR V3D
  M:    Emma Anholt <emma@anholt.net>
 +M:    Melissa Wen <mwen@igalia.com>
  S:    Supported
  T:    git git://anongit.freedesktop.org/drm/drm-misc
  F:    Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
@@@ -7494,13 -7302,6 +7494,13 @@@ L:    netdev@vger.kernel.or
  S:    Maintained
  F:    drivers/net/ethernet/ibm/ehea/
  
 +ELM327 CAN NETWORK DRIVER
 +M:    Max Staudt <max@enpas.org>
 +L:    linux-can@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/networking/device_drivers/can/can327.rst
 +F:    drivers/net/can/can327.c
 +
  EM28XX VIDEO4LINUX DRIVER
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  L:    linux-media@vger.kernel.org
@@@ -7511,7 -7312,7 +7511,7 @@@ F:      Documentation/admin-guide/media/em28
  F:    drivers/media/usb/em28xx/
  
  EMBEDDED LINUX
 -M:    Matt Mackall <mpm@selenic.com>
 +M:    Olivia Mackall <olivia@selenic.com>
  M:    David Woodhouse <dwmw2@infradead.org>
  L:    linux-embedded@vger.kernel.org
  S:    Maintained
@@@ -7593,8 -7394,6 +7593,8 @@@ F:      include/video/s1d13xxxfb.
  EROFS FILE SYSTEM
  M:    Gao Xiang <xiang@kernel.org>
  M:    Chao Yu <chao@kernel.org>
 +R:    Yue Hu <huyue2@coolpad.com>
 +R:    Jeffle Xu <jefflexu@linux.alibaba.com>
  L:    linux-erofs@lists.ozlabs.org
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
@@@ -7608,13 -7407,6 +7608,13 @@@ S:    Maintaine
  F:    include/linux/errseq.h
  F:    lib/errseq.c
  
 +ESD CAN/USB DRIVERS
 +M:    Frank Jungclaus <frank.jungclaus@esd.eu>
 +R:    socketcan@esd.eu
 +L:    linux-can@vger.kernel.org
 +S:    Maintained
 +F:    drivers/net/can/usb/esd_usb.c
 +
  ET131X NETWORK DRIVER
  M:    Mark Einon <mark.einon@gmail.com>
  S:    Odd Fixes
@@@ -7690,7 -7482,6 +7690,7 @@@ M:      Namjae Jeon <linkinjeon@kernel.org
  M:    Sungjong Seo <sj1557.seo@samsung.com>
  L:    linux-fsdevel@vger.kernel.org
  S:    Maintained
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat.git
  F:    fs/exfat/
  
  EXT2 FILE SYSTEM
@@@ -7766,7 -7557,7 +7766,7 @@@ F:      drivers/gpu/drm/exynos/exynos_dp
  
  EXYNOS SYSMMU (IOMMU) driver
  M:    Marek Szyprowski <m.szyprowski@samsung.com>
 -L:    iommu@lists.linux-foundation.org
 +L:    iommu@lists.linux.dev
  S:    Maintained
  F:    drivers/iommu/exynos-iommu.c
  
@@@ -7891,6 -7682,9 +7891,6 @@@ F:      include/linux/fs.
  F:    include/linux/fs_types.h
  F:    include/uapi/linux/fs.h
  F:    include/uapi/linux/openat2.h
 -X:    fs/io-wq.c
 -X:    fs/io-wq.h
 -X:    fs/io_uring.c
  
  FINTEK F75375S HARDWARE MONITOR AND FAN CONTROLLER DRIVER
  M:    Riku Voipio <riku.voipio@iki.fi>
@@@ -7989,7 -7783,6 +7989,7 @@@ FORTIFY_SOURC
  M:    Kees Cook <keescook@chromium.org>
  L:    linux-hardening@vger.kernel.org
  S:    Supported
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
  F:    include/linux/fortify-string.h
  F:    lib/test_fortify/*
  F:    scripts/test_fortify.sh
@@@ -8022,21 -7815,6 +8022,21 @@@ F:    Documentation/fpga
  F:    drivers/fpga/
  F:    include/linux/fpga/
  
 +INTEL MAX10 BMC SECURE UPDATES
 +M:    Russ Weight <russell.h.weight@intel.com>
 +L:    linux-fpga@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/ABI/testing/sysfs-driver-intel-m10-bmc-sec-update
 +F:    drivers/fpga/intel-m10-bmc-sec-update.c
 +
 +MICROCHIP POLARFIRE FPGA DRIVERS
 +M:    Conor Dooley <conor.dooley@microchip.com>
 +R:    Ivan Bornyakov <i.bornyakov@metrotek.ru>
 +L:    linux-fpga@vger.kernel.org
 +S:    Supported
 +F:    Documentation/devicetree/bindings/fpga/microchip,mpf-spi-fpga-mgr.yaml
 +F:    drivers/fpga/microchip-spi.c
 +
  FPU EMULATOR
  M:    Bill Metzenthen <billm@melbpc.org.au>
  S:    Maintained
@@@ -8142,6 -7920,7 +8142,6 @@@ L:      linux-fbdev@vger.kernel.or
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    drivers/video/fbdev/imxfb.c
 -F:    include/linux/platform_data/video-imxfb.h
  
  FREESCALE IMX DDR PMU DRIVER
  M:    Frank Li <Frank.li@nxp.com>
@@@ -8446,7 -8225,6 +8446,7 @@@ GCC PLUGIN
  M:    Kees Cook <keescook@chromium.org>
  L:    linux-hardening@vger.kernel.org
  S:    Maintained
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
  F:    Documentation/kbuild/gcc-plugins.rst
  F:    scripts/Makefile.gcc-plugins
  F:    scripts/gcc-plugins/
@@@ -8538,7 -8316,6 +8538,7 @@@ Q:      https://patchwork.kernel.org/project
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git
  F:    Documentation/devicetree/bindings/phy/
  F:    drivers/phy/
 +F:    include/dt-bindings/phy/
  F:    include/linux/phy/
  
  GENERIC PINCTRL I2C DEMULTIPLEXER DRIVER
@@@ -8702,7 -8479,6 +8702,7 @@@ F:      Documentation/devicetree/bindings/gp
  F:    Documentation/driver-api/gpio/
  F:    drivers/gpio/
  F:    include/asm-generic/gpio.h
 +F:    include/dt-bindings/gpio/
  F:    include/linux/gpio.h
  F:    include/linux/gpio/
  F:    include/linux/of_gpio.h
@@@ -8892,7 -8668,6 +8892,7 @@@ L:      linux-media@vger.kernel.or
  L:    linux-rockchip@lists.infradead.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml
 +F:    Documentation/devicetree/bindings/media/rockchip,rk3568-vepu.yaml
  F:    Documentation/devicetree/bindings/media/rockchip-vpu.yaml
  F:    drivers/staging/media/hantro/
  
@@@ -8919,7 -8694,7 +8919,7 @@@ F:      include/trace/events/hwmon*.
  K:    (devm_)?hwmon_device_(un)?register(|_with_groups|_with_info)
  
  HARDWARE RANDOM NUMBER GENERATOR CORE
 -M:    Matt Mackall <mpm@selenic.com>
 +M:    Olivia Mackall <olivia@selenic.com>
  M:    Herbert Xu <herbert@gondor.apana.org.au>
  L:    linux-crypto@vger.kernel.org
  S:    Odd fixes
@@@ -9169,31 -8944,16 +9169,31 @@@ F:   Documentation/admin-guide/perf/hisi-
  F:    Documentation/admin-guide/perf/hisi-pmu.rst
  F:    drivers/perf/hisilicon
  
 -HISILICON QM AND ZIP Controller DRIVER
 +HISILICON HNS3 PMU DRIVER
 +M:    Guangbin Huang <huangguangbin2@huawei.com>
 +S:    Supported
 +F:    Documentation/admin-guide/perf/hns3-pmu.rst
 +F:    drivers/perf/hisilicon/hns3_pmu.c
 +
 +HISILICON QM DRIVER
 +M:    Weili Qian <qianweili@huawei.com>
  M:    Zhou Wang <wangzhou1@hisilicon.com>
  L:    linux-crypto@vger.kernel.org
  S:    Maintained
 -F:    Documentation/ABI/testing/debugfs-hisi-zip
 +F:    drivers/crypto/hisilicon/Kconfig
 +F:    drivers/crypto/hisilicon/Makefile
  F:    drivers/crypto/hisilicon/qm.c
  F:    drivers/crypto/hisilicon/sgl.c
 -F:    drivers/crypto/hisilicon/zip/
  F:    include/linux/hisi_acc_qm.h
  
 +HISILICON ZIP Controller DRIVER
 +M:    Yang Shen <shenyang39@huawei.com>
 +M:    Zhou Wang <wangzhou1@hisilicon.com>
 +L:    linux-crypto@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/ABI/testing/debugfs-hisi-zip
 +F:    drivers/crypto/hisilicon/zip/
 +
  HISILICON ROCE DRIVER
  M:    Wenpeng Liang <liangwenpeng@huawei.com>
  M:    Weihang Li <liweihang@huawei.com>
@@@ -9256,7 -9016,7 +9256,7 @@@ HMM - Heterogeneous Memory Managemen
  M:    JĂ©rĂŽme Glisse <jglisse@redhat.com>
  L:    linux-mm@kvack.org
  S:    Maintained
 -F:    Documentation/vm/hmm.rst
 +F:    Documentation/mm/hmm.rst
  F:    include/linux/hmm*
  F:    lib/test_hmm*
  F:    mm/hmm*
@@@ -9354,8 -9114,8 +9354,8 @@@ L:      linux-mm@kvack.or
  S:    Maintained
  F:    Documentation/ABI/testing/sysfs-kernel-mm-hugepages
  F:    Documentation/admin-guide/mm/hugetlbpage.rst
 -F:    Documentation/vm/hugetlbfs_reserv.rst
 -F:    Documentation/vm/vmemmap_dedup.rst
 +F:    Documentation/mm/hugetlbfs_reserv.rst
 +F:    Documentation/mm/vmemmap_dedup.rst
  F:    fs/hugetlbfs/
  F:    include/linux/hugetlb.h
  F:    mm/hugetlb.c
@@@ -9372,7 -9132,6 +9372,7 @@@ F:      drivers/media/platform/st/sti/hv
  
  HWPOISON MEMORY FAILURE HANDLING
  M:    Naoya Horiguchi <naoya.horiguchi@nec.com>
 +R:    Miaohe Lin <linmiaohe@huawei.com>
  L:    linux-mm@kvack.org
  S:    Maintained
  F:    mm/hwpoison-inject.c
@@@ -9421,7 -9180,6 +9421,7 @@@ S:      Supporte
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git
  F:    Documentation/ABI/stable/sysfs-bus-vmbus
  F:    Documentation/ABI/testing/debugfs-hyperv
 +F:    Documentation/virt/hyperv
  F:    Documentation/networking/device_drivers/ethernet/microsoft/netvsc.rst
  F:    arch/arm64/hyperv
  F:    arch/arm64/include/asm/hyperv-tlfs.h
@@@ -9767,7 -9525,6 +9767,7 @@@ F:      drivers/input/misc/ideapad_slidebar.
  
  IDMAPPED MOUNTS
  M:    Christian Brauner <brauner@kernel.org>
 +M:    Seth Forshee <sforshee@kernel.org>
  L:    linux-fsdevel@vger.kernel.org
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git
@@@ -9860,7 -9617,6 +9860,7 @@@ F:      Documentation/ABI/testing/sysfs-bus-
  F:    Documentation/devicetree/bindings/iio/
  F:    drivers/iio/
  F:    drivers/staging/iio/
 +F:    include/dt-bindings/iio/
  F:    include/linux/iio/
  F:    tools/iio/
  
@@@ -10053,21 -9809,11 +10053,21 @@@ L: linux-fbdev@vger.kernel.or
  S:    Maintained
  F:    drivers/video/fbdev/i810/
  
 +INTEL 8255 GPIO DRIVER
 +M:    William Breathitt Gray <william.gray@linaro.org>
 +L:    linux-gpio@vger.kernel.org
 +S:    Maintained
 +F:    drivers/gpio/gpio-i8255.c
 +F:    drivers/gpio/gpio-i8255.h
 +
  INTEL ASoC DRIVERS
  M:    Cezary Rojewski <cezary.rojewski@intel.com>
  M:    Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
  M:    Liam Girdwood <liam.r.girdwood@linux.intel.com>
 -M:    Jie Yang <yang.jie@linux.intel.com>
 +M:    Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
 +M:    Bard Liao <yung-chuan.liao@linux.intel.com>
 +M:    Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
 +M:    Kai Vehmanen <kai.vehmanen@linux.intel.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
  S:    Supported
  F:    sound/soc/intel/
@@@ -10196,8 -9942,7 +10196,8 @@@ S:    Supporte
  Q:    https://patchwork.kernel.org/project/linux-dmaengine/list/
  F:    drivers/dma/ioat*
  
 -INTEL IADX DRIVER
 +INTEL IDXD DRIVER
 +M:    Fenghua Yu <fenghua.yu@intel.com>
  M:    Dave Jiang <dave.jiang@intel.com>
  L:    dmaengine@vger.kernel.org
  S:    Supported
@@@ -10231,10 -9976,11 +10231,10 @@@ F: drivers/hid/intel-ish-hid
  INTEL IOMMU (VT-d)
  M:    David Woodhouse <dwmw2@infradead.org>
  M:    Lu Baolu <baolu.lu@linux.intel.com>
 -L:    iommu@lists.linux-foundation.org
 +L:    iommu@lists.linux.dev
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
  F:    drivers/iommu/intel/
 -F:    include/linux/intel-iommu.h
  F:    include/linux/intel-svm.h
  
  INTEL IOP-ADMA DMA DRIVER
@@@ -10390,7 -10136,7 +10390,7 @@@ F:   drivers/gpio/gpio-*cove.
  
  INTEL PMIC MULTIFUNCTION DEVICE DRIVERS
  M:    Andy Shevchenko <andy@kernel.org>
 -S:    Maintained
 +S:    Supported
  F:    drivers/mfd/intel_soc_pmic*
  F:    include/linux/mfd/intel_soc_pmic*
  
@@@ -10606,21 -10352,10 +10606,21 @@@ T:        git git://git.kernel.org/pub/scm/fs/
  F:    fs/iomap/
  F:    include/linux/iomap.h
  
 -IOMMU DRIVERS
 +IOMMU DMA-API LAYER
 +M:    Robin Murphy <robin.murphy@arm.com>
 +L:    iommu@lists.linux.dev
 +S:    Maintained
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
 +F:    drivers/iommu/dma-iommu.c
 +F:    drivers/iommu/iova.c
 +F:    include/linux/dma-iommu.h
 +F:    include/linux/iova.h
 +
 +IOMMU SUBSYSTEM
  M:    Joerg Roedel <joro@8bytes.org>
  M:    Will Deacon <will@kernel.org>
 -L:    iommu@lists.linux-foundation.org
 +R:    Robin Murphy <robin.murphy@arm.com>
 +L:    iommu@lists.linux.dev
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
  F:    Documentation/devicetree/bindings/iommu/
@@@ -10645,7 -10380,9 +10645,7 @@@ L:   io-uring@vger.kernel.or
  S:    Maintained
  T:    git git://git.kernel.dk/linux-block
  T:    git git://git.kernel.dk/liburing
 -F:    fs/io-wq.c
 -F:    fs/io-wq.h
 -F:    fs/io_uring.c
 +F:    io_uring/
  F:    include/linux/io_uring.h
  F:    include/uapi/linux/io_uring.h
  F:    tools/io_uring/
@@@ -10714,7 -10451,7 +10714,7 @@@ F:   Documentation/devicetree/bindings/in
  F:    drivers/irqchip/
  
  ISA
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  S:    Maintained
  F:    Documentation/driver-api/isa.rst
  F:    drivers/base/isa.c
@@@ -11005,17 -10742,6 +11005,17 @@@ F: scripts/mk
  F:    scripts/mod/
  F:    scripts/package/
  
 +KERNEL HARDENING (not covered by other areas)
 +M:    Kees Cook <keescook@chromium.org>
 +L:    linux-hardening@vger.kernel.org
 +S:    Supported
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
 +F:    include/linux/overflow.h
 +F:    include/linux/randomize_kstack.h
 +F:    mm/usercopy.c
 +K:    \b(add|choose)_random_kstack_offset\b
 +K:    \b__check_(object_size|heap_object)\b
 +
  KERNEL JANITORS
  L:    kernel-janitors@vger.kernel.org
  S:    Odd Fixes
@@@ -11068,7 -10794,6 +11068,7 @@@ F:   fs/smbfs_common
  
  KERNEL UNIT TESTING FRAMEWORK (KUnit)
  M:    Brendan Higgins <brendanhiggins@google.com>
 +M:    David Gow <davidgow@google.com>
  L:    linux-kselftest@vger.kernel.org
  L:    kunit-dev@googlegroups.com
  S:    Maintained
@@@ -11107,7 -10832,6 +11107,7 @@@ M:   Marc Zyngier <maz@kernel.org
  R:    James Morse <james.morse@arm.com>
  R:    Alexandru Elisei <alexandru.elisei@arm.com>
  R:    Suzuki K Poulose <suzuki.poulose@arm.com>
 +R:    Oliver Upton <oliver.upton@linux.dev>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    kvmarm@lists.cs.columbia.edu (moderated for non-subscribers)
  S:    Maintained
@@@ -11174,51 -10898,28 +11174,51 @@@ F:        tools/testing/selftests/kvm/*/s390x
  F:    tools/testing/selftests/kvm/s390x/
  
  KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86)
 +M:    Sean Christopherson <seanjc@google.com>
  M:    Paolo Bonzini <pbonzini@redhat.com>
 -R:    Sean Christopherson <seanjc@google.com>
 -R:    Vitaly Kuznetsov <vkuznets@redhat.com>
 -R:    Wanpeng Li <wanpengli@tencent.com>
 -R:    Jim Mattson <jmattson@google.com>
 -R:    Joerg Roedel <joro@8bytes.org>
  L:    kvm@vger.kernel.org
  S:    Supported
 -W:    http://www.linux-kvm.org
  T:    git git://git.kernel.org/pub/scm/virt/kvm/kvm.git
  F:    arch/x86/include/asm/kvm*
 -F:    arch/x86/include/asm/pvclock-abi.h
  F:    arch/x86/include/asm/svm.h
  F:    arch/x86/include/asm/vmx*.h
  F:    arch/x86/include/uapi/asm/kvm*
  F:    arch/x86/include/uapi/asm/svm.h
  F:    arch/x86/include/uapi/asm/vmx.h
 -F:    arch/x86/kernel/kvm.c
 -F:    arch/x86/kernel/kvmclock.c
  F:    arch/x86/kvm/
  F:    arch/x86/kvm/*/
  
 +KVM PARAVIRT (KVM/paravirt)
 +M:    Paolo Bonzini <pbonzini@redhat.com>
 +R:    Wanpeng Li <wanpengli@tencent.com>
 +R:    Vitaly Kuznetsov <vkuznets@redhat.com>
 +L:    kvm@vger.kernel.org
 +S:    Supported
 +T:    git git://git.kernel.org/pub/scm/virt/kvm/kvm.git
 +F:    arch/x86/kernel/kvm.c
 +F:    arch/x86/kernel/kvmclock.c
 +F:    arch/x86/include/asm/pvclock-abi.h
 +F:    include/linux/kvm_para.h
 +F:    include/uapi/linux/kvm_para.h
 +F:    include/uapi/asm-generic/kvm_para.h
 +F:    include/asm-generic/kvm_para.h
 +F:    arch/um/include/asm/kvm_para.h
 +F:    arch/x86/include/asm/kvm_para.h
 +F:    arch/x86/include/uapi/asm/kvm_para.h
 +
 +KVM X86 HYPER-V (KVM/hyper-v)
 +M:    Vitaly Kuznetsov <vkuznets@redhat.com>
 +M:    Sean Christopherson <seanjc@google.com>
 +M:    Paolo Bonzini <pbonzini@redhat.com>
 +L:    kvm@vger.kernel.org
 +S:    Supported
 +T:    git git://git.kernel.org/pub/scm/virt/kvm/kvm.git
 +F:    arch/x86/kvm/hyperv.*
 +F:    arch/x86/kvm/kvm_onhyperv.*
 +F:    arch/x86/kvm/svm/hyperv.*
 +F:    arch/x86/kvm/svm/svm_onhyperv.*
 +F:    arch/x86/kvm/vmx/evmcs.*
 +
  KERNFS
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  M:    Tejun Heo <tj@kernel.org>
@@@ -11397,6 -11098,20 +11397,6 @@@ S:  Maintaine
  F:    include/net/l3mdev.h
  F:    net/l3mdev
  
 -L7 BPF FRAMEWORK
 -M:    John Fastabend <john.fastabend@gmail.com>
 -M:    Daniel Borkmann <daniel@iogearbox.net>
 -M:    Jakub Sitnicki <jakub@cloudflare.com>
 -L:    netdev@vger.kernel.org
 -L:    bpf@vger.kernel.org
 -S:    Maintained
 -F:    include/linux/skmsg.h
 -F:    net/core/skmsg.c
 -F:    net/core/sock_map.c
 -F:    net/ipv4/tcp_bpf.c
 -F:    net/ipv4/udp_bpf.c
 -F:    net/unix/unix_bpf.c
 -
  LANDLOCK SECURITY MODULE
  M:    MickaĂ«l SalaĂŒn <mic@digikod.net>
  L:    linux-security-module@vger.kernel.org
@@@ -11631,8 -11346,8 +11631,8 @@@ F:   drivers/macintosh
  
  LINUX FOR POWERPC (32-BIT AND 64-BIT)
  M:    Michael Ellerman <mpe@ellerman.id.au>
 -R:    Benjamin Herrenschmidt <benh@kernel.crashing.org>
 -R:    Paul Mackerras <paulus@samba.org>
 +R:    Nicholas Piggin <npiggin@gmail.com>
 +R:    Christophe Leroy <christophe.leroy@csgroup.eu>
  L:    linuxppc-dev@lists.ozlabs.org
  S:    Supported
  W:    https://github.com/linuxppc/wiki/wiki
@@@ -11827,7 -11542,7 +11827,7 @@@ F:   drivers/media/usb/dvb-usb-v2/lmedm04
  LOADPIN SECURITY MODULE
  M:    Kees Cook <keescook@chromium.org>
  S:    Supported
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git lsm/loadpin
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
  F:    Documentation/admin-guide/LSM/LoadPin.rst
  F:    security/loadpin/
  
@@@ -11876,7 -11591,6 +11876,7 @@@ F:   drivers/gpu/drm/bridge/lontium-lt891
  LOONGARCH
  M:    Huacai Chen <chenhuacai@kernel.org>
  R:    WANG Xuerui <kernel@xen0n.name>
 +L:    loongarch@lists.linux.dev
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git
  F:    arch/loongarch/
@@@ -12415,6 -12129,7 +12415,6 @@@ F:   Documentation/devicetree/bindings/*/
  F:    Documentation/devicetree/bindings/*/maxim,max77693.yaml
  F:    Documentation/devicetree/bindings/*/maxim,max77843.yaml
  F:    Documentation/devicetree/bindings/clock/maxim,max77686.txt
 -F:    Documentation/devicetree/bindings/mfd/max77693.txt
  F:    drivers/*/*max77843.c
  F:    drivers/*/max14577*.c
  F:    drivers/*/max77686*.c
@@@ -12490,7 -12205,7 +12490,7 @@@ F:   drivers/net/ieee802154/mcr20a.
  F:    drivers/net/ieee802154/mcr20a.h
  
  MEASUREMENT COMPUTING CIO-DAC IIO DRIVER
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-iio@vger.kernel.org
  S:    Maintained
  F:    drivers/iio/dac/cio-dac.c
@@@ -12731,7 -12446,6 +12731,7 @@@ F:   Documentation/driver-api/media
  F:    Documentation/userspace-api/media/
  F:    drivers/media/
  F:    drivers/staging/media/
 +F:    include/dt-bindings/media/
  F:    include/linux/platform_data/media/
  F:    include/media/
  F:    include/uapi/linux/dvb/
@@@ -12789,7 -12503,7 +12789,7 @@@ F:   drivers/i2c/busses/i2c-mt65xx.
  
  MEDIATEK IOMMU DRIVER
  M:    Yong Wu <yong.wu@mediatek.com>
 -L:    iommu@lists.linux-foundation.org
 +L:    iommu@lists.linux.dev
  L:    linux-mediatek@lists.infradead.org (moderated for non-subscribers)
  S:    Supported
  F:    Documentation/devicetree/bindings/iommu/mediatek*
@@@ -12814,7 -12528,6 +12814,7 @@@ F:   drivers/media/platform/mediatek/vpu
  MEDIATEK MEDIA DRIVER
  M:    Tiffany Lin <tiffany.lin@mediatek.com>
  M:    Andrew-CT Chen <andrew-ct.chen@mediatek.com>
 +M:    Yunfei Dong <yunfei.dong@mediatek.com>
  S:    Supported
  F:    Documentation/devicetree/bindings/media/mediatek,vcodec*.yaml
  F:    Documentation/devicetree/bindings/media/mediatek-vpu.txt
@@@ -13133,10 -12846,10 +13133,10 @@@ M:        Andrew Morton <akpm@linux-foundation
  L:    linux-mm@kvack.org
  S:    Maintained
  W:    http://www.linux-mm.org
 -T:    quilt https://ozlabs.org/~akpm/mmotm/
 -T:    quilt https://ozlabs.org/~akpm/mmots/
 -T:    git git://github.com/hnaz/linux-mm.git
 +T:    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
 +T:    quilt git://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new
  F:    include/linux/gfp.h
 +F:    include/linux/gfp_types.h
  F:    include/linux/memory_hotplug.h
  F:    include/linux/mm.h
  F:    include/linux/mmzone.h
@@@ -13145,18 -12858,6 +13145,18 @@@ F: include/linux/vmalloc.
  F:    mm/
  F:    tools/testing/selftests/vm/
  
 +MEMORY HOT(UN)PLUG
 +M:    David Hildenbrand <david@redhat.com>
 +M:    Oscar Salvador <osalvador@suse.de>
 +L:    linux-mm@kvack.org
 +S:    Maintained
 +F:    Documentation/admin-guide/mm/memory-hotplug.rst
 +F:    Documentation/core-api/memory-hotplug.rst
 +F:    drivers/base/memory.c
 +F:    include/linux/memory_hotplug.h
 +F:    mm/memory_hotplug.c
 +F:    tools/testing/selftests/memory-hotplug/
 +
  MEMORY TECHNOLOGY DEVICES (MTD)
  M:    Miquel Raynal <miquel.raynal@bootlin.com>
  M:    Richard Weinberger <richard@nod.at>
@@@ -13350,7 -13051,6 +13350,7 @@@ M:   UNGLinuxDriver@microchip.co
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
 +F:    Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml
  F:    drivers/net/dsa/microchip/*
  F:    include/linux/platform_data/microchip-ksz.h
  F:    net/dsa/tag_ksz.c
@@@ -13410,14 -13110,6 +13410,14 @@@ S: Supporte
  F:    Documentation/devicetree/bindings/mtd/atmel-nand.txt
  F:    drivers/mtd/nand/raw/atmel/*
  
 +MICROCHIP OTPC DRIVER
 +M:    Claudiu Beznea <claudiu.beznea@microchip.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Supported
 +F:    Documentation/devicetree/bindings/nvmem/microchip,sama7g5-otpc.yaml
 +F:    drivers/nvmem/microchip-otpc.c
 +F:    include/dt-bindings/nvmem/microchip,sama7g5-otpc.h
 +
  MICROCHIP PWM DRIVER
  M:    Claudiu Beznea <claudiu.beznea@microchip.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -13494,12 -13186,6 +13494,12 @@@ F: drivers/scsi/smartpqi/smartpqi*.[ch
  F:    include/linux/cciss*.h
  F:    include/uapi/linux/cciss*.h
  
 +MICROSOFT SURFACE AGGREGATOR TABLET-MODE SWITCH
 +M:    Maximilian Luz <luzmaximilian@gmail.com>
 +L:    platform-driver-x86@vger.kernel.org
 +S:    Maintained
 +F:    drivers/platform/surface/surface_aggregator_tabletsw.c
 +
  MICROSOFT SURFACE BATTERY AND AC DRIVERS
  M:    Maximilian Luz <luzmaximilian@gmail.com>
  L:    linux-pm@vger.kernel.org
@@@ -13571,12 -13257,6 +13571,12 @@@ F: include/linux/surface_acpi_notify.
  F:    include/linux/surface_aggregator/
  F:    include/uapi/linux/surface_aggregator/
  
 +MICROSOFT SURFACE SYSTEM AGGREGATOR HUB DRIVER
 +M:    Maximilian Luz <luzmaximilian@gmail.com>
 +L:    platform-driver-x86@vger.kernel.org
 +S:    Maintained
 +F:    drivers/platform/surface/surface_aggregator_hub.c
 +
  MICROTEK X6 SCANNER
  M:    Oliver Neukum <oliver@neukum.org>
  S:    Maintained
@@@ -13617,7 -13297,6 +13617,7 @@@ F:   Documentation/devicetree/bindings/mi
  F:    Documentation/mips/
  F:    arch/mips/
  F:    drivers/platform/mips/
 +F:    include/dt-bindings/mips/
  
  MIPS BOSTON DEVELOPMENT BOARD
  M:    Paul Burton <paulburton@kernel.org>
@@@ -13887,7 -13566,7 +13887,7 @@@ F:   Documentation/devicetree/bindings/me
  F:    drivers/media/i2c/mt9v111.c
  
  MULTIFUNCTION DEVICES (MFD)
 -M:    Lee Jones <lee.jones@linaro.org>
 +M:    Lee Jones <lee@kernel.org>
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git
  F:    Documentation/devicetree/bindings/mfd/
@@@ -14035,11 -13714,12 +14035,11 @@@ L:        netdev@vger.kernel.or
  S:    Maintained
  F:    net/sched/sch_netem.c
  
 -NETERION 10GbE DRIVERS (s2io/vxge)
 +NETERION 10GbE DRIVERS (s2io)
  M:    Jon Mason <jdmason@kudzu.us>
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    Documentation/networking/device_drivers/ethernet/neterion/s2io.rst
 -F:    Documentation/networking/device_drivers/ethernet/neterion/vxge.rst
  F:    drivers/net/ethernet/neterion/
  
  NETFILTER
@@@ -14274,6 -13954,7 +14274,6 @@@ F:   net/ipv6/tcp*.
  NETWORKING [TLS]
  M:    Boris Pismenny <borisp@nvidia.com>
  M:    John Fastabend <john.fastabend@gmail.com>
 -M:    Daniel Borkmann <daniel@iogearbox.net>
  M:    Jakub Kicinski <kuba@kernel.org>
  L:    netdev@vger.kernel.org
  S:    Maintained
@@@ -14524,8 -14205,7 +14524,8 @@@ S:   Supporte
  W:    http://git.infradead.org/nvme.git
  T:    git://git.infradead.org/nvme.git
  F:    drivers/nvme/host/
 -F:    include/linux/nvme.h
 +F:    drivers/nvme/common/
 +F:    include/linux/nvme*
  F:    include/uapi/linux/nvme_ioctl.h
  
  NVM EXPRESS FC TRANSPORT DRIVERS
@@@ -14565,8 -14245,7 +14565,8 @@@ S:   Maintaine
  F:    drivers/net/phy/nxp-c45-tja11xx.c
  
  NXP FSPI DRIVER
 -M:    Ashish Kumar <ashish.kumar@nxp.com>
 +M:    Han Xu <han.xu@nxp.com>
 +M:    Haibo Chen <haibo.chen@nxp.com>
  R:    Yogesh Gaur <yogeshgaur.83@gmail.com>
  L:    linux-spi@vger.kernel.org
  S:    Maintained
@@@ -14584,7 -14263,7 +14584,7 @@@ F:   drivers/iio/gyro/fxas21002c_i2c.
  F:    drivers/iio/gyro/fxas21002c_spi.c
  
  NXP i.MX CLOCK DRIVERS
 -M:    Abel Vesa <abel.vesa@nxp.com>
 +M:    Abel Vesa <abelvesa@kernel.org>
  L:    linux-clk@vger.kernel.org
  L:    linux-imx@nxp.com
  S:    Maintained
@@@ -14672,8 -14351,9 +14672,8 @@@ F:   Documentation/devicetree/bindings/so
  F:    sound/soc/codecs/tfa989x.c
  
  NXP-NCI NFC DRIVER
 -R:    Charles Gorand <charles.gorand@effinnov.com>
  L:    linux-nfc@lists.01.org (subscribers-only)
 -S:    Supported
 +S:    Orphan
  F:    Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml
  F:    drivers/nfc/nxp-nci
  
@@@ -15041,7 -14721,6 +15041,7 @@@ M:   Daniel Scally <djrscally@gmail.com
  L:    linux-media@vger.kernel.org
  S:    Maintained
  T:    git git://linuxtv.org/media_tree.git
 +F:    Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml
  F:    drivers/media/i2c/ov5693.c
  
  OMNIVISION OV5695 SENSOR DRIVER
@@@ -15116,13 -14795,6 +15116,13 @@@ S: Maintaine
  T:    git git://linuxtv.org/media_tree.git
  F:    drivers/media/i2c/ov9734.c
  
 +ONBOARD USB HUB DRIVER
 +M:    Matthias Kaehlcke <mka@chromium.org>
 +L:    linux-usb@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-hub
 +F:    drivers/usb/misc/onboard_usb_hub.c
 +
  ONENAND FLASH DRIVER
  M:    Kyungmin Park <kyungmin.park@samsung.com>
  L:    linux-mtd@lists.infradead.org
@@@ -15199,7 -14871,6 +15199,7 @@@ F:   include/dt-bindings
  
  OPENCOMPUTE PTP CLOCK DRIVER
  M:    Jonathan Lemon <jonathan.lemon@gmail.com>
 +M:    Vadim Fedorenko <vadfed@fb.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/ptp/ptp_ocp.c
@@@ -15209,7 -14880,7 +15209,7 @@@ M:   Peter Korsgaard <peter@korsgaard.com
  M:    Andrew Lunn <andrew@lunn.ch>
  L:    linux-i2c@vger.kernel.org
  S:    Maintained
 -F:    Documentation/devicetree/bindings/i2c/i2c-ocores.txt
 +F:    Documentation/devicetree/bindings/i2c/opencores,i2c-ocores.yaml
  F:    Documentation/i2c/busses/i2c-ocores.rst
  F:    drivers/i2c/busses/i2c-ocores.c
  F:    include/linux/platform_data/i2c-ocores.h
@@@ -15354,7 -15025,7 +15354,7 @@@ M:   Pasha Tatashin <pasha.tatashin@solee
  M:    Andrew Morton <akpm@linux-foundation.org>
  L:    linux-mm@kvack.org
  S:    Maintained
 -F:    Documentation/vm/page_table_check.rst
 +F:    Documentation/mm/page_table_check.rst
  F:    include/linux/page_table_check.h
  F:    mm/page_table_check.c
  
@@@ -15880,14 -15551,6 +15880,14 @@@ L: linux-pci@vger.kernel.or
  S:    Maintained
  F:    drivers/pci/controller/dwc/*spear*
  
 +PCI DRIVER FOR XILINX VERSAL CPM
 +M:    Bharat Kumar Gogada <bharat.kumar.gogada@amd.com>
 +M:    Michal Simek <michal.simek@amd.com>
 +L:    linux-pci@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml
 +F:    drivers/pci/controller/pcie-xilinx-cpm.c
 +
  PCMCIA SUBSYSTEM
  M:    Dominik Brodowski <linux@dominikbrodowski.net>
  S:    Odd Fixes
@@@ -16068,7 -15731,7 +16068,7 @@@ PIN CONTROLLER - FREESCAL
  M:    Dong Aisheng <aisheng.dong@nxp.com>
  M:    Fabio Estevam <festevam@gmail.com>
  M:    Shawn Guo <shawnguo@kernel.org>
 -M:    Stefan Agner <stefan@agner.ch>
 +M:    Jacky Bai <ping.bai@nxp.com>
  R:    Pengutronix Kernel Team <kernel@pengutronix.de>
  L:    linux-gpio@vger.kernel.org
  S:    Maintained
@@@ -16078,7 -15741,7 +16078,7 @@@ F:   drivers/pinctrl/freescale
  PIN CONTROLLER - INTEL
  M:    Mika Westerberg <mika.westerberg@linux.intel.com>
  M:    Andy Shevchenko <andy@kernel.org>
 -S:    Maintained
 +S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel.git
  F:    drivers/pinctrl/intel/
  
@@@ -16172,6 -15835,14 +16172,6 @@@ S:  Maintaine
  F:    Documentation/devicetree/bindings/iio/chemical/plantower,pms7003.yaml
  F:    drivers/iio/chemical/pms7003.c
  
 -PLATFORM FEATURE INFRASTRUCTURE
 -M:    Juergen Gross <jgross@suse.com>
 -S:    Maintained
 -F:    arch/*/include/asm/platform-feature.h
 -F:    include/asm-generic/platform-feature.h
 -F:    include/linux/platform-feature.h
 -F:    kernel/platform-feature.c
 -
  PLDMFW LIBRARY
  M:    Jacob Keller <jacob.e.keller@intel.com>
  S:    Maintained
@@@ -16536,17 -16207,17 +16536,17 @@@ F:        drivers/media/rc/pwm-ir-tx.
  PWM SUBSYSTEM
  M:    Thierry Reding <thierry.reding@gmail.com>
  R:    Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
 -M:    Lee Jones <lee.jones@linaro.org>
  L:    linux-pwm@vger.kernel.org
  S:    Maintained
  Q:    https://patchwork.ozlabs.org/project/linux-pwm/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm.git
 -F:    Documentation/devicetree/bindings/gpio/gpio-mvebu.txt
 +F:    Documentation/devicetree/bindings/gpio/gpio-mvebu.yaml
  F:    Documentation/devicetree/bindings/pwm/
  F:    Documentation/driver-api/pwm.rst
  F:    drivers/gpio/gpio-mvebu.c
  F:    drivers/pwm/
  F:    drivers/video/backlight/pwm_bl.c
 +F:    include/dt-bindings/pwm/
  F:    include/linux/pwm.h
  F:    include/linux/pwm_backlight.h
  K:    pwm_(config|apply_state|ops)
@@@ -16592,12 -16263,9 +16592,12 @@@ F: drivers/crypto/qat
  
  QCOM AUDIO (ASoC) DRIVERS
  M:    Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
 -M:    Banajit Goswami <bgoswami@codeaurora.org>
 +M:    Banajit Goswami <bgoswami@quicinc.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
  S:    Supported
 +F:    include/dt-bindings/sound/qcom,wcd9335.h
 +F:    sound/soc/codecs/lpass-rx-macro.*
 +F:    sound/soc/codecs/lpass-tx-macro.*
  F:    sound/soc/codecs/lpass-va-macro.c
  F:    sound/soc/codecs/lpass-wsa-macro.*
  F:    sound/soc/codecs/msm8916-wcd-analog.c
@@@ -16605,9 -16273,7 +16605,9 @@@ F:   sound/soc/codecs/msm8916-wcd-digital
  F:    sound/soc/codecs/wcd9335.*
  F:    sound/soc/codecs/wcd934x.c
  F:    sound/soc/codecs/wcd-clsh-v2.*
 +F:    sound/soc/codecs/wcd-mbhc-v2.*
  F:    sound/soc/codecs/wsa881x.c
 +F:    sound/soc/codecs/wsa883x.c
  F:    sound/soc/qcom/
  
  QCOM EMBEDDED USB DEBUGGER (EUD)
@@@ -16824,7 -16490,7 +16824,7 @@@ F:   Documentation/devicetree/bindings/op
  F:    drivers/cpufreq/qcom-cpufreq-nvmem.c
  
  QUALCOMM CRYPTO DRIVERS
 -M:    Thara Gopinath <thara.gopinath@linaro.org>
 +M:    Thara Gopinath <thara.gopinath@gmail.com>
  L:    linux-crypto@vger.kernel.org
  L:    linux-arm-msm@vger.kernel.org
  S:    Maintained
@@@ -16876,16 -16542,9 +16876,16 @@@ S: Maintaine
  F:    Documentation/devicetree/bindings/i2c/i2c-qcom-cci.txt
  F:    drivers/i2c/busses/i2c-qcom-cci.c
  
 +QUALCOMM INTERCONNECT BWMON DRIVER
 +M:    Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
 +L:    linux-arm-msm@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
 +F:    drivers/soc/qcom/icc-bwmon.c
 +
  QUALCOMM IOMMU
  M:    Rob Clark <robdclark@gmail.com>
 -L:    iommu@lists.linux-foundation.org
 +L:    iommu@lists.linux.dev
  L:    linux-arm-msm@vger.kernel.org
  S:    Maintained
  F:    drivers/iommu/arm/arm-smmu/qcom_iommu.c
@@@ -16941,7 -16600,7 +16941,7 @@@ F:   include/linux/if_rmnet.
  
  QUALCOMM TSENS THERMAL DRIVER
  M:    Amit Kucheria <amitk@kernel.org>
 -M:    Thara Gopinath <thara.gopinath@linaro.org>
 +M:    Thara Gopinath <thara.gopinath@gmail.com>
  L:    linux-pm@vger.kernel.org
  L:    linux-arm-msm@vger.kernel.org
  S:    Maintained
@@@ -17398,19 -17057,6 +17398,19 @@@ S: Supporte
  F:    Documentation/devicetree/bindings/iio/adc/renesas,rzg2l-adc.yaml
  F:    drivers/iio/adc/rzg2l_adc.c
  
 +RENESAS RZ/N1 A5PSW SWITCH DRIVER
 +M:    ClĂ©ment LĂ©ger <clement.leger@bootlin.com>
 +L:    linux-renesas-soc@vger.kernel.org
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml
 +F:    Documentation/devicetree/bindings/net/pcs/renesas,rzn1-miic.yaml
 +F:    drivers/net/dsa/rzn1_a5psw*
 +F:    drivers/net/pcs/pcs-rzn1-miic.c
 +F:    include/dt-bindings/net/pcs-rzn1-miic.h
 +F:    include/linux/pcs-rzn1-miic.h
 +F:    net/dsa/tag_rzn1_a5psw.c
 +
  RENESAS RZ/N1 RTC CONTROLLER DRIVER
  M:    Miquel Raynal <miquel.raynal@bootlin.com>
  L:    linux-rtc@vger.kernel.org
@@@ -17509,18 -17155,13 +17509,18 @@@ N:        risc
  K:    riscv
  
  RISC-V/MICROCHIP POLARFIRE SOC SUPPORT
 -M:    Lewis Hanly <lewis.hanly@microchip.com>
  M:    Conor Dooley <conor.dooley@microchip.com>
 +M:    Daire McNamara <daire.mcnamara@microchip.com>
  L:    linux-riscv@lists.infradead.org
  S:    Supported
  F:    arch/riscv/boot/dts/microchip/
 +F:    drivers/char/hw_random/mpfs-rng.c
 +F:    drivers/clk/microchip/clk-mpfs.c
  F:    drivers/mailbox/mailbox-mpfs.c
 +F:    drivers/pci/controller/pcie-microchip-host.c
  F:    drivers/soc/microchip/
 +F:    drivers/spi/spi-microchip-core.c
 +F:    drivers/usb/musb/mpfs.c
  F:    include/soc/microchip/mpfs.h
  
  RNBD BLOCK DRIVERS
@@@ -17812,7 -17453,7 +17812,7 @@@ M:   Jason Herne <jjherne@linux.ibm.com
  L:    linux-s390@vger.kernel.org
  S:    Supported
  W:    http://www.ibm.com/developerworks/linux/linux390/
 -F:    Documentation/s390/vfio-ap.rst
 +F:    Documentation/s390/vfio-ap*
  F:    drivers/s390/crypto/vfio_ap*
  
  S390 VFIO-CCW DRIVER
@@@ -17832,7 -17473,6 +17832,7 @@@ M:   Eric Farman <farman@linux.ibm.com
  L:    linux-s390@vger.kernel.org
  L:    kvm@vger.kernel.org
  S:    Supported
 +F:    arch/s390/kvm/pci*
  F:    drivers/vfio/pci/vfio_pci_zdev.c
  F:    include/uapi/linux/vfio_zdev.h
  
@@@ -18217,7 -17857,7 +18217,7 @@@ M:   Kees Cook <keescook@chromium.org
  R:    Andy Lutomirski <luto@amacapital.net>
  R:    Will Drewry <wad@chromium.org>
  S:    Supported
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git seccomp
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/seccomp
  F:    Documentation/userspace-api/seccomp_filter.rst
  F:    include/linux/seccomp.h
  F:    include/uapi/linux/seccomp.h
@@@ -18288,13 -17928,12 +18288,13 @@@ S:        Supporte
  F:    Documentation/admin-guide/security-bugs.rst
  
  SECURITY SUBSYSTEM
 +M:    Paul Moore <paul@paul-moore.com>
  M:    James Morris <jmorris@namei.org>
  M:    "Serge E. Hallyn" <serge@hallyn.com>
  L:    linux-security-module@vger.kernel.org (suggested Cc:)
  S:    Supported
  W:    http://kernsec.org/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm.git
  F:    security/
  X:    security/selinux/
  
@@@ -18397,7 -18036,6 +18397,7 @@@ SFF/SFP/SFP+ MODULE SUPPOR
  M:    Russell King <linux@armlinux.org.uk>
  L:    netdev@vger.kernel.org
  S:    Maintained
 +F:    Documentation/devicetree/bindings/net/sff,sfp.yaml
  F:    drivers/net/phy/phylink.c
  F:    drivers/net/phy/sfp*
  F:    include/linux/mdio/mdio-i2c.h
@@@ -18419,7 -18057,6 +18419,7 @@@ F:   drivers/misc/sgi-xp
  
  SHARED MEMORY COMMUNICATIONS (SMC) SOCKETS
  M:    Karsten Graul <kgraul@linux.ibm.com>
 +M:    Wenjia Zhang <wenjia@linux.ibm.com>
  L:    linux-s390@vger.kernel.org
  S:    Supported
  W:    http://www.ibm.com/developerworks/linux/linux390/
@@@ -18684,12 -18321,6 +18684,12 @@@ T: git git://git.kernel.org/pub/scm/lin
  F:    include/linux/sl?b*.h
  F:    mm/sl?b*
  
 +SLCAN CAN NETWORK DRIVER
 +M:    Dario Binacchi <dario.binacchi@amarulasolutions.com>
 +L:    linux-can@vger.kernel.org
 +S:    Maintained
 +F:    drivers/net/can/slcan/
 +
  SLEEPABLE READ-COPY UPDATE (SRCU)
  M:    Lai Jiangshan <jiangshanlai@gmail.com>
  M:    "Paul E. McKenney" <paulmck@kernel.org>
@@@ -18861,7 -18492,6 +18861,7 @@@ SOFTWARE RAID (Multiple Disks) SUPPOR
  M:    Song Liu <song@kernel.org>
  L:    linux-raid@vger.kernel.org
  S:    Supported
 +Q:    https://patchwork.kernel.org/project/linux-raid/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/song/md.git
  F:    drivers/md/Kconfig
  F:    drivers/md/Makefile
@@@ -19059,10 -18689,8 +19059,10 @@@ F: sound/soc
  SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS
  M:    Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
  M:    Liam Girdwood <lgirdwood@gmail.com>
 +M:    Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
 +M:    Bard Liao <yung-chuan.liao@linux.intel.com>
  M:    Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
 -M:    Kai Vehmanen <kai.vehmanen@linux.intel.com>
 +R:    Kai Vehmanen <kai.vehmanen@linux.intel.com>
  M:    Daniel Baluta <daniel.baluta@nxp.com>
  L:    sound-open-firmware@alsa-project.org (moderated for non-subscribers)
  S:    Supported
@@@ -19151,7 -18779,7 +19151,7 @@@ F:   drivers/pinctrl/spear
  
  SPI NOR SUBSYSTEM
  M:    Tudor Ambarus <tudor.ambarus@microchip.com>
 -M:    Pratyush Yadav <p.yadav@ti.com>
 +M:    Pratyush Yadav <pratyush@kernel.org>
  R:    Michael Walle <michael@walle.cc>
  L:    linux-mtd@lists.infradead.org
  S:    Maintained
@@@ -19311,7 -18939,6 +19311,7 @@@ F:   drivers/staging/olpc_dcon
  STAGING - REALTEK RTL8188EU DRIVERS
  M:    Larry Finger <Larry.Finger@lwfinger.net>
  M:    Phillip Potter <phil@philpotter.co.uk>
 +R:    Pavel Skripkin <paskripkin@gmail.com>
  S:    Supported
  F:    drivers/staging/r8188eu/
  
@@@ -19542,7 -19169,7 +19542,7 @@@ F:   arch/x86/boot/video
  
  SWIOTLB SUBSYSTEM
  M:    Christoph Hellwig <hch@infradead.org>
 -L:    iommu@lists.linux-foundation.org
 +L:    iommu@lists.linux.dev
  S:    Supported
  W:    http://git.infradead.org/users/hch/dma-mapping.git
  T:    git git://git.infradead.org/users/hch/dma-mapping.git
@@@ -19622,8 -19249,9 +19622,9 @@@ F:   Documentation/devicetree/bindings/gp
  F:    drivers/gpio/gpio-creg-snps.c
  
  SYNOPSYS DESIGNWARE 8250 UART DRIVER
+ M:    Ilpo JĂ€rvinen <ilpo.jarvinen@linux.intel.com>
  R:    Andy Shevchenko <andriy.shevchenko@linux.intel.com>
- S:    Maintained
+ S:    Supported
  F:    drivers/tty/serial/8250/8250_dw.c
  F:    drivers/tty/serial/8250/8250_dwlib.*
  F:    drivers/tty/serial/8250/8250_lpss.c
@@@ -19704,7 -19332,7 +19705,7 @@@ S:   Maintaine
  F:    drivers/mmc/host/sdhci-pci-dwc-mshc.c
  
  SYSTEM CONFIGURATION (SYSCON)
 -M:    Lee Jones <lee.jones@linaro.org>
 +M:    Lee Jones <lee@kernel.org>
  M:    Arnd Bergmann <arnd@arndb.de>
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git
@@@ -20022,7 -19650,7 +20023,7 @@@ M:   Sowjanya Komatineni <skomatineni@nvi
  L:    linux-media@vger.kernel.org
  L:    linux-tegra@vger.kernel.org
  S:    Maintained
 -F:    Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt
 +F:    Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.yaml
  F:    drivers/staging/media/tegra-video/
  
  TEGRA XUSB PADCTL DRIVER
@@@ -20145,7 -19773,6 +20146,7 @@@ F:   Documentation/ABI/testing/sysfs-clas
  F:    Documentation/devicetree/bindings/thermal/
  F:    Documentation/driver-api/thermal/
  F:    drivers/thermal/
 +F:    include/dt-bindings/thermal/
  F:    include/linux/cpu_cooling.h
  F:    include/linux/thermal.h
  F:    include/uapi/linux/thermal.h
@@@ -20620,7 -20247,7 +20621,7 @@@ F:   tools/tracing/rtla
  
  TRADITIONAL CHINESE DOCUMENTATION
  M:    Hu Haowen <src.res@email.cn>
 -L:    linux-doc-tw-discuss@lists.sourceforge.net
 +L:    linux-doc-tw-discuss@lists.sourceforge.net (moderated for non-subscribers)
  S:    Maintained
  W:    https://github.com/srcres258/linux-doc
  T:    git git://github.com/srcres258/linux-doc.git doc-zh-tw
@@@ -20740,13 -20367,6 +20741,13 @@@ F: Documentation/filesystems/ubifs-auth
  F:    Documentation/filesystems/ubifs.rst
  F:    fs/ubifs/
  
 +UBLK USERSPACE BLOCK DRIVER
 +M:    Ming Lei <ming.lei@redhat.com>
 +L:    linux-block@vger.kernel.org
 +S:    Maintained
 +F:    drivers/block/ublk_drv.c
 +F:    include/uapi/linux/ublk_cmd.h
 +
  UCLINUX (M68KNOMMU AND COLDFIRE)
  M:    Greg Ungerer <gerg@linux-m68k.org>
  L:    linux-m68k@lists.linux-m68k.org
@@@ -20835,13 -20455,6 +20836,13 @@@ L: linux-mediatek@lists.infradead.org (
  S:    Maintained
  F:    drivers/ufs/host/ufs-mediatek*
  
 +UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER RENESAS HOOKS
 +M:    Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
 +L:    linux-renesas-soc@vger.kernel.org
 +L:    linux-scsi@vger.kernel.org
 +S:    Maintained
 +F:    drivers/ufs/host/ufs-renesas.c
 +
  UNSORTED BLOCK IMAGES (UBI)
  M:    Richard Weinberger <richard@nod.at>
  L:    linux-mtd@lists.infradead.org
@@@ -21102,7 -20715,6 +21103,7 @@@ T:   git git://git.kernel.org/pub/scm/lin
  F:    Documentation/devicetree/bindings/usb/
  F:    Documentation/usb/
  F:    drivers/usb/
 +F:    include/dt-bindings/usb/
  F:    include/linux/usb.h
  F:    include/linux/usb/
  
@@@ -21282,7 -20894,6 +21283,7 @@@ M:   OGAWA Hirofumi <hirofumi@mail.parkne
  S:    Maintained
  F:    Documentation/filesystems/vfat.rst
  F:    fs/fat/
 +F:    tools/testing/selftests/filesystems/fat/
  
  VFIO DRIVER
  M:    Alex Williamson <alex.williamson@redhat.com>
@@@ -21458,7 -21069,6 +21459,7 @@@ M:   Jason Wang <jasowang@redhat.com
  L:    virtualization@lists.linux-foundation.org
  S:    Maintained
  F:    Documentation/ABI/testing/sysfs-bus-vdpa
 +F:    Documentation/ABI/testing/sysfs-class-vduse
  F:    Documentation/devicetree/bindings/virtio/
  F:    drivers/block/virtio_blk.c
  F:    drivers/crypto/virtio/
@@@ -21639,10 -21249,12 +21640,10 @@@ M:        Martyn Welch <martyn@welchs.me.uk
  M:    Manohar Vanga <manohar.vanga@gmail.com>
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  L:    linux-kernel@vger.kernel.org
 -S:    Maintained
 +S:    Odd fixes
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
  F:    Documentation/driver-api/vme.rst
  F:    drivers/staging/vme_user/
 -F:    drivers/vme/
 -F:    include/linux/vme*
  
  VM SOCKETS (AF_VSOCK)
  M:    Stefano Garzarella <sgarzare@redhat.com>
@@@ -21825,13 -21437,6 +21826,13 @@@ L: linux-input@vger.kernel.or
  S:    Maintained
  F:    drivers/input/tablet/wacom_serial4.c
  
 +WANGXUN ETHERNET DRIVER
 +M:    Jiawen Wu <jiawenwu@trustnetic.com>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/networking/device_drivers/ethernet/wangxun/txgbe.rst
 +F:    drivers/net/ethernet/wangxun/
 +
  WATCHDOG DEVICE DRIVERS
  M:    Wim Van Sebroeck <wim@linux-watchdog.org>
  M:    Guenter Roeck <linux@roeck-us.net>
@@@ -21875,13 -21480,13 +21876,13 @@@ S:        Maintaine
  F:    drivers/media/rc/winbond-cir.c
  
  WINSYSTEMS EBC-C384 WATCHDOG DRIVER
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-watchdog@vger.kernel.org
  S:    Maintained
  F:    drivers/watchdog/ebc-c384_wdt.c
  
  WINSYSTEMS WS16C48 GPIO DRIVER
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-gpio@vger.kernel.org
  S:    Maintained
  F:    drivers/gpio/gpio-ws16c48.c
@@@ -22148,7 -21753,8 +22149,7 @@@ F:   include/uapi/linux/if_xdp.
  F:    include/uapi/linux/xdp_diag.h
  F:    include/net/netns/xdp.h
  F:    net/xdp/
 -F:    samples/bpf/xdpsock*
 -F:    tools/lib/bpf/xsk*
 +F:    tools/testing/selftests/bpf/*xsk*
  
  XEN BLOCK SUBSYSTEM
  M:    Roger Pau MonnĂ© <roger.pau@citrix.com>
@@@ -22238,7 -21844,7 +22239,7 @@@ XEN SWIOTLB SUBSYSTE
  M:    Juergen Gross <jgross@suse.com>
  M:    Stefano Stabellini <sstabellini@kernel.org>
  L:    xen-devel@lists.xenproject.org (moderated for non-subscribers)
 -L:    iommu@lists.linux-foundation.org
 +L:    iommu@lists.linux.dev
  S:    Supported
  F:    arch/x86/xen/*swiotlb*
  F:    drivers/xen/*swiotlb*
@@@ -22388,7 -21994,7 +22389,7 @@@ F:   include/linux/yam.
  YAMA SECURITY MODULE
  M:    Kees Cook <keescook@chromium.org>
  S:    Supported
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git yama/tip
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
  F:    Documentation/admin-guide/LSM/Yama.rst
  F:    security/yama/
  
@@@ -22502,7 -22108,7 +22503,7 @@@ M:   Nitin Gupta <ngupta@vflare.org
  R:    Sergey Senozhatsky <senozhatsky@chromium.org>
  L:    linux-mm@kvack.org
  S:    Maintained
 -F:    Documentation/vm/zsmalloc.rst
 +F:    Documentation/mm/zsmalloc.rst
  F:    include/linux/zsmalloc.h
  F:    mm/zsmalloc.c
  
diff --combined drivers/of/fdt.c
@@@ -246,7 -246,7 +246,7 @@@ static int populate_node(const void *bl
        }
  
        *pnp = np;
 -      return true;
 +      return 0;
  }
  
  static void reverse_nodes(struct device_node *parent)
@@@ -477,8 -477,8 +477,8 @@@ void *initial_boot_params __ro_after_in
  
  static u32 of_fdt_crc32;
  
 -static int __init early_init_dt_reserve_memory_arch(phys_addr_t base,
 -                                      phys_addr_t size, bool nomap)
 +static int __init early_init_dt_reserve_memory(phys_addr_t base,
 +                                             phys_addr_t size, bool nomap)
  {
        if (nomap) {
                /*
@@@ -525,15 -525,15 +525,15 @@@ static int __init __reserved_mem_reserv
                size = dt_mem_next_cell(dt_root_size_cells, &prop);
  
                if (size &&
 -                  early_init_dt_reserve_memory_arch(base, size, nomap) == 0) {
 +                  early_init_dt_reserve_memory(base, size, nomap) == 0) {
                        pr_debug("Reserved memory: reserved region for node '%s': base %pa, size %lu MiB\n",
                                uname, &base, (unsigned long)(size / SZ_1M));
                        if (!nomap)
 -                              kmemleak_alloc_phys(base, size, 0, 0);
 +                              kmemleak_alloc_phys(base, size, 0);
                }
                else
 -                      pr_info("Reserved memory: failed to reserve memory for node '%s': base %pa, size %lu MiB\n",
 -                              uname, &base, (unsigned long)(size / SZ_1M));
 +                      pr_err("Reserved memory: failed to reserve memory for node '%s': base %pa, size %lu MiB\n",
 +                             uname, &base, (unsigned long)(size / SZ_1M));
  
                len -= t_len;
                if (first) {
@@@ -644,7 -644,7 +644,7 @@@ void __init early_init_fdt_scan_reserve
                fdt_get_mem_rsv(initial_boot_params, n, &base, &size);
                if (!size)
                        break;
 -              early_init_dt_reserve_memory_arch(base, size, false);
 +              memblock_reserve(base, size);
        }
  
        fdt_scan_reserved_mem();
@@@ -661,8 -661,9 +661,8 @@@ void __init early_init_fdt_reserve_self
                return;
  
        /* Reserve the dtb region */
 -      early_init_dt_reserve_memory_arch(__pa(initial_boot_params),
 -                                        fdt_totalsize(initial_boot_params),
 -                                        false);
 +      memblock_reserve(__pa(initial_boot_params),
 +                       fdt_totalsize(initial_boot_params));
  }
  
  /**
@@@ -1024,6 -1025,7 +1024,7 @@@ int __init early_init_dt_scan_chosen_st
        int l;
        const struct earlycon_id *match;
        const void *fdt = initial_boot_params;
+       int ret;
  
        offset = fdt_path_offset(fdt, "/chosen");
        if (offset < 0)
                if (fdt_node_check_compatible(fdt, offset, match->compatible))
                        continue;
  
-               if (of_setup_earlycon(match, offset, options) == 0)
+               ret = of_setup_earlycon(match, offset, options);
+               if (!ret || ret == -EALREADY)
                        return 0;
        }
        return -ENODEV;
@@@ -23,7 -23,6 +23,7 @@@
  #include <linux/sysrq.h>
  #include <linux/delay.h>
  #include <linux/platform_device.h>
 +#include <linux/pm_runtime.h>
  #include <linux/tty.h>
  #include <linux/ratelimit.h>
  #include <linux/tty_flip.h>
@@@ -277,8 -276,7 +277,7 @@@ static void serial8250_backup_timeout(s
         * the "Diva" UART used on the management processor on many HP
         * ia64 and parisc boxes.
         */
-       lsr = serial_in(up, UART_LSR);
-       up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS;
+       lsr = serial_lsr_in(up);
        if ((iir & UART_IIR_NO_INT) && (up->ier & UART_IER_THRI) &&
            (!uart_circ_empty(&up->port.state->xmit) || up->port.x_char) &&
            (lsr & UART_LSR_THRE)) {
@@@ -560,9 -558,6 +559,9 @@@ serial8250_register_ports(struct uart_d
  
                up->port.dev = dev;
  
 +              if (uart_console_enabled(&up->port))
 +                      pm_runtime_get_sync(up->port.dev);
 +
                serial8250_apply_quirks(up);
                uart_add_one_port(drv, &up->port);
        }
@@@ -1008,9 -1003,11 +1007,11 @@@ int serial8250_register_8250_port(cons
                uart->port.throttle     = up->port.throttle;
                uart->port.unthrottle   = up->port.unthrottle;
                uart->port.rs485_config = up->port.rs485_config;
+               uart->port.rs485_supported = up->port.rs485_supported;
                uart->port.rs485        = up->port.rs485;
                uart->rs485_start_tx    = up->rs485_start_tx;
                uart->rs485_stop_tx     = up->rs485_stop_tx;
+               uart->lsr_save_mask     = up->lsr_save_mask;
                uart->dma               = up->dma;
  
                /* Take tx_loadsz from fifosize if it wasn't set separately */
                        ret = 0;
                }
  
+               if (!uart->lsr_save_mask)
+                       uart->lsr_save_mask = LSR_SAVE_FLAGS;   /* Use default LSR mask */
                /* Initialise interrupt backoff work if required */
                if (up->overrun_backoff_time_ms > 0) {
                        uart->overrun_backoff_time_ms =
@@@ -9,26 -9,27 +9,27 @@@
   * LCR is written whilst busy.  If it is, then a busy detect interrupt is
   * raised, the LCR needs to be rewritten and the uart status register read.
   */
+ #include <linux/acpi.h>
+ #include <linux/clk.h>
  #include <linux/delay.h>
  #include <linux/device.h>
  #include <linux/io.h>
  #include <linux/mod_devicetable.h>
  #include <linux/module.h>
- #include <linux/serial_8250.h>
- #include <linux/serial_reg.h>
+ #include <linux/notifier.h>
  #include <linux/of.h>
  #include <linux/platform_device.h>
+ #include <linux/pm_runtime.h>
  #include <linux/property.h>
- #include <linux/workqueue.h>
- #include <linux/notifier.h>
- #include <linux/slab.h>
- #include <linux/acpi.h>
- #include <linux/clk.h>
  #include <linux/reset.h>
- #include <linux/pm_runtime.h>
+ #include <linux/slab.h>
+ #include <linux/workqueue.h>
  
  #include <asm/byteorder.h>
  
+ #include <linux/serial_8250.h>
+ #include <linux/serial_reg.h>
  #include "8250_dwlib.h"
  
  /* Offsets for the DesignWare specific registers */
@@@ -47,7 -48,7 +48,7 @@@
  #define RZN1_UART_xDMACR_DMA_EN               BIT(0)
  #define RZN1_UART_xDMACR_1_WORD_BURST (0 << 1)
  #define RZN1_UART_xDMACR_4_WORD_BURST (1 << 1)
 -#define RZN1_UART_xDMACR_8_WORD_BURST (3 << 1)
 +#define RZN1_UART_xDMACR_8_WORD_BURST (2 << 1)
  #define RZN1_UART_xDMACR_BLK_SZ(x)    ((x) << 3)
  
  /* Quirks */
@@@ -82,8 -83,21 +83,21 @@@ static inline int dw8250_modify_msr(str
  static void dw8250_force_idle(struct uart_port *p)
  {
        struct uart_8250_port *up = up_to_u8250p(p);
+       unsigned int lsr;
  
        serial8250_clear_and_reinit_fifos(up);
+       /*
+        * With PSLVERR_RESP_EN parameter set to 1, the device generates an
+        * error response when an attempt to read an empty RBR with FIFO
+        * enabled.
+        */
+       if (up->fcr & UART_FCR_ENABLE_FIFO) {
+               lsr = p->serial_in(p, UART_LSR);
+               if (!(lsr & UART_LSR_DR))
+                       return;
+       }
        (void)p->serial_in(p, UART_RX);
  }
  
@@@ -122,12 -136,15 +136,15 @@@ static void dw8250_check_lcr(struct uar
  /* Returns once the transmitter is empty or we run out of retries */
  static void dw8250_tx_wait_empty(struct uart_port *p)
  {
+       struct uart_8250_port *up = up_to_u8250p(p);
        unsigned int tries = 20000;
        unsigned int delay_threshold = tries - 1000;
        unsigned int lsr;
  
        while (tries--) {
                lsr = readb (p->membase + (UART_LSR << p->regshift));
+               up->lsr_saved_flags |= lsr & up->lsr_save_mask;
                if (lsr & UART_LSR_TEMT)
                        break;
  
        }
  }
  
- static void dw8250_serial_out38x(struct uart_port *p, int offset, int value)
+ static void dw8250_serial_out(struct uart_port *p, int offset, int value)
  {
        struct dw8250_data *d = to_dw8250_data(p->private_data);
  
-       /* Allow the TX to drain before we reconfigure */
-       if (offset == UART_LCR)
-               dw8250_tx_wait_empty(p);
        writeb(value, p->membase + (offset << p->regshift));
  
        if (offset == UART_LCR && !d->uart_16550_compatible)
                dw8250_check_lcr(p, value);
  }
  
- static void dw8250_serial_out(struct uart_port *p, int offset, int value)
+ static void dw8250_serial_out38x(struct uart_port *p, int offset, int value)
  {
-       struct dw8250_data *d = to_dw8250_data(p->private_data);
-       writeb(value, p->membase + (offset << p->regshift));
+       /* Allow the TX to drain before we reconfigure */
+       if (offset == UART_LCR)
+               dw8250_tx_wait_empty(p);
  
-       if (offset == UART_LCR && !d->uart_16550_compatible)
-               dw8250_check_lcr(p, value);
+       dw8250_serial_out(p, offset, value);
  }
  
  static unsigned int dw8250_serial_in(struct uart_port *p, int offset)
@@@ -253,7 -264,7 +264,7 @@@ static int dw8250_handle_irq(struct uar
         */
        if (!up->dma && rx_timeout) {
                spin_lock_irqsave(&p->lock, flags);
-               status = p->serial_in(p, UART_LSR);
+               status = serial_lsr_in(up);
  
                if (!(status & (UART_LSR_DR | UART_LSR_BI)))
                        (void) p->serial_in(p, UART_RX);
  
        /* Manually stop the Rx DMA transfer when acting as flow controller */
        if (quirks & DW_UART_QUIRK_IS_DMA_FC && up->dma && up->dma->rx_running && rx_timeout) {
-               status = p->serial_in(p, UART_LSR);
+               spin_lock_irqsave(&p->lock, flags);
+               status = serial_lsr_in(up);
+               spin_unlock_irqrestore(&p->lock, flags);
                if (status & (UART_LSR_DR | UART_LSR_BI)) {
                        dw8250_writel_ext(p, RZN1_UART_RDMACR, 0);
                        dw8250_writel_ext(p, DW_UART_DMASA, 1);
@@@ -688,7 -702,6 +702,6 @@@ static int dw8250_remove(struct platfor
        return 0;
  }
  
- #ifdef CONFIG_PM_SLEEP
  static int dw8250_suspend(struct device *dev)
  {
        struct dw8250_data *data = dev_get_drvdata(dev);
@@@ -706,9 -719,7 +719,7 @@@ static int dw8250_resume(struct device 
  
        return 0;
  }
- #endif /* CONFIG_PM_SLEEP */
  
- #ifdef CONFIG_PM
  static int dw8250_runtime_suspend(struct device *dev)
  {
        struct dw8250_data *data = dev_get_drvdata(dev);
@@@ -730,11 -741,10 +741,10 @@@ static int dw8250_runtime_resume(struc
  
        return 0;
  }
- #endif
  
  static const struct dev_pm_ops dw8250_pm_ops = {
-       SET_SYSTEM_SLEEP_PM_OPS(dw8250_suspend, dw8250_resume)
-       SET_RUNTIME_PM_OPS(dw8250_runtime_suspend, dw8250_runtime_resume, NULL)
+       SYSTEM_SLEEP_PM_OPS(dw8250_suspend, dw8250_resume)
+       RUNTIME_PM_OPS(dw8250_runtime_suspend, dw8250_runtime_resume, NULL)
  };
  
  static const struct dw8250_platform_data dw8250_dw_apb = {
@@@ -773,18 -783,18 +783,18 @@@ static const struct of_device_id dw8250
  MODULE_DEVICE_TABLE(of, dw8250_of_match);
  
  static const struct acpi_device_id dw8250_acpi_match[] = {
 -      { "INT33C4", 0 },
 -      { "INT33C5", 0 },
 -      { "INT3434", 0 },
 -      { "INT3435", 0 },
 -      { "80860F0A", 0 },
 -      { "8086228A", 0 },
 -      { "APMC0D08", 0},
 -      { "AMD0020", 0 },
 -      { "AMDI0020", 0 },
 -      { "AMDI0022", 0 },
 -      { "BRCM2032", 0 },
 -      { "HISI0031", 0 },
 +      { "80860F0A", (kernel_ulong_t)&dw8250_dw_apb },
 +      { "8086228A", (kernel_ulong_t)&dw8250_dw_apb },
 +      { "AMD0020", (kernel_ulong_t)&dw8250_dw_apb },
 +      { "AMDI0020", (kernel_ulong_t)&dw8250_dw_apb },
 +      { "AMDI0022", (kernel_ulong_t)&dw8250_dw_apb },
 +      { "APMC0D08", (kernel_ulong_t)&dw8250_dw_apb},
 +      { "BRCM2032", (kernel_ulong_t)&dw8250_dw_apb },
 +      { "HISI0031", (kernel_ulong_t)&dw8250_dw_apb },
 +      { "INT33C4", (kernel_ulong_t)&dw8250_dw_apb },
 +      { "INT33C5", (kernel_ulong_t)&dw8250_dw_apb },
 +      { "INT3434", (kernel_ulong_t)&dw8250_dw_apb },
 +      { "INT3435", (kernel_ulong_t)&dw8250_dw_apb },
        { },
  };
  MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match);
  static struct platform_driver dw8250_platform_driver = {
        .driver = {
                .name           = "dw-apb-uart",
-               .pm             = &dw8250_pm_ops,
+               .pm             = pm_ptr(&dw8250_pm_ops),
                .of_match_table = dw8250_of_match,
                .acpi_match_table = dw8250_acpi_match,
        },
@@@ -50,8 -50,6 +50,6 @@@
  #define DEBUG_AUTOCONF(fmt...)        do { } while (0)
  #endif
  
- #define BOTH_EMPTY    (UART_LSR_TEMT | UART_LSR_THRE)
  /*
   * Here we define the default xmit fifo size used for each type of UART.
   */
@@@ -336,27 -334,29 +334,29 @@@ static void default_serial_dl_write(str
  
  #ifdef CONFIG_SERIAL_8250_RT288X
  
+ #define UART_REG_UNMAPPED     -1
  /* Au1x00/RT288x UART hardware has a weird register layout */
  static const s8 au_io_in_map[8] = {
-        0,     /* UART_RX  */
-        2,     /* UART_IER */
-        3,     /* UART_IIR */
-        5,     /* UART_LCR */
-        6,     /* UART_MCR */
-        7,     /* UART_LSR */
-        8,     /* UART_MSR */
-       -1,     /* UART_SCR (unmapped) */
+       [UART_RX]       = 0,
+       [UART_IER]      = 2,
+       [UART_IIR]      = 3,
+       [UART_LCR]      = 5,
+       [UART_MCR]      = 6,
+       [UART_LSR]      = 7,
+       [UART_MSR]      = 8,
+       [UART_SCR]      = UART_REG_UNMAPPED,
  };
  
  static const s8 au_io_out_map[8] = {
-        1,     /* UART_TX  */
-        2,     /* UART_IER */
-        4,     /* UART_FCR */
-        5,     /* UART_LCR */
-        6,     /* UART_MCR */
-       -1,     /* UART_LSR (unmapped) */
-       -1,     /* UART_MSR (unmapped) */
-       -1,     /* UART_SCR (unmapped) */
+       [UART_TX]       = 1,
+       [UART_IER]      = 2,
+       [UART_FCR]      = 4,
+       [UART_LCR]      = 5,
+       [UART_MCR]      = 6,
+       [UART_LSR]      = UART_REG_UNMAPPED,
+       [UART_MSR]      = UART_REG_UNMAPPED,
+       [UART_SCR]      = UART_REG_UNMAPPED,
  };
  
  unsigned int au_serial_in(struct uart_port *p, int offset)
        if (offset >= ARRAY_SIZE(au_io_in_map))
                return UINT_MAX;
        offset = au_io_in_map[offset];
-       if (offset < 0)
+       if (offset == UART_REG_UNMAPPED)
                return UINT_MAX;
        return __raw_readl(p->membase + (offset << p->regshift));
  }
@@@ -374,7 -374,7 +374,7 @@@ void au_serial_out(struct uart_port *p
        if (offset >= ARRAY_SIZE(au_io_out_map))
                return;
        offset = au_io_out_map[offset];
-       if (offset < 0)
+       if (offset == UART_REG_UNMAPPED)
                return;
        __raw_writel(value, p->membase + (offset << p->regshift));
  }
@@@ -647,6 -647,14 +647,14 @@@ void serial8250_em485_destroy(struct ua
  }
  EXPORT_SYMBOL_GPL(serial8250_em485_destroy);
  
+ struct serial_rs485 serial8250_em485_supported = {
+       .flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | SER_RS485_RTS_AFTER_SEND |
+                SER_RS485_TERMINATE_BUS | SER_RS485_RX_DURING_TX,
+       .delay_rts_before_send = 1,
+       .delay_rts_after_send = 1,
+ };
+ EXPORT_SYMBOL_GPL(serial8250_em485_supported);
  /**
   * serial8250_em485_config() - generic ->rs485_config() callback
   * @port: uart port
   * if the uart is incapable of driving RTS as a Transmit Enable signal in
   * hardware, relying on software emulation instead.
   */
- int serial8250_em485_config(struct uart_port *port, struct serial_rs485 *rs485)
+ int serial8250_em485_config(struct uart_port *port, struct ktermios *termios,
+                           struct serial_rs485 *rs485)
  {
        struct uart_8250_port *up = up_to_u8250p(port);
  
                rs485->flags &= ~SER_RS485_RTS_AFTER_SEND;
        }
  
-       /* clamp the delays to [0, 100ms] */
-       rs485->delay_rts_before_send = min(rs485->delay_rts_before_send, 100U);
-       rs485->delay_rts_after_send  = min(rs485->delay_rts_after_send, 100U);
-       memset(rs485->padding, 0, sizeof(rs485->padding));
-       port->rs485 = *rs485;
-       gpiod_set_value(port->rs485_term_gpio,
-                       rs485->flags & SER_RS485_TERMINATE_BUS);
        /*
         * Both serial8250_em485_init() and serial8250_em485_destroy()
         * are idempotent.
         */
-       if (rs485->flags & SER_RS485_ENABLED) {
-               int ret = serial8250_em485_init(up);
-               if (ret) {
-                       rs485->flags &= ~SER_RS485_ENABLED;
-                       port->rs485.flags &= ~SER_RS485_ENABLED;
-               }
-               return ret;
-       }
+       if (rs485->flags & SER_RS485_ENABLED)
+               return serial8250_em485_init(up);
  
        serial8250_em485_destroy(up);
        return 0;
@@@ -849,7 -841,7 +841,7 @@@ static int size_fifo(struct uart_8250_p
        serial_out(up, UART_LCR, UART_LCR_CONF_MODE_A);
        old_dl = serial_dl_read(up);
        serial_dl_write(up, 0x0001);
-       serial_out(up, UART_LCR, 0x03);
+       serial_out(up, UART_LCR, UART_LCR_WLEN8);
        for (count = 0; count < 256; count++)
                serial_out(up, UART_TX, count);
        mdelay(20);/* FIXME - schedule_timeout */
@@@ -1503,18 -1495,12 +1495,12 @@@ static void __stop_tx_rs485(struct uart
        }
  }
  
- static inline void __do_stop_tx(struct uart_8250_port *p)
- {
-       if (serial8250_clear_THRI(p))
-               serial8250_rpm_put_tx(p);
- }
  static inline void __stop_tx(struct uart_8250_port *p)
  {
        struct uart_8250_em485 *em485 = p->em485;
  
        if (em485) {
-               unsigned char lsr = serial_in(p, UART_LSR);
+               u16 lsr = serial_lsr_in(p);
                u64 stop_delay = 0;
  
                p->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS;
                if (!(lsr & UART_LSR_THRE))
                        return;
                /*
-                * To provide required timeing and allow FIFO transfer,
+                * To provide required timing and allow FIFO transfer,
                 * __stop_tx_rs485() must be called only when both FIFO and
                 * shift register are empty. The device driver should either
                 * enable interrupt on TEMT or set UART_CAP_NOTEMT that will
  
                __stop_tx_rs485(p, stop_delay);
        }
-       __do_stop_tx(p);
+       if (serial8250_clear_THRI(p))
+               serial8250_rpm_put_tx(p);
  }
  
  static void serial8250_stop_tx(struct uart_port *port)
@@@ -1573,10 -1561,8 +1561,8 @@@ static inline void __start_tx(struct ua
  
        if (serial8250_set_THRI(up)) {
                if (up->bugs & UART_BUG_TXEN) {
-                       unsigned char lsr;
+                       u16 lsr = serial_lsr_in(up);
  
-                       lsr = serial_in(up, UART_LSR);
-                       up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS;
                        if (lsr & UART_LSR_THRE)
                                serial8250_tx_chars(up);
                }
@@@ -1616,7 -1602,8 +1602,8 @@@ void serial8250_em485_start_tx(struct u
  }
  EXPORT_SYMBOL_GPL(serial8250_em485_start_tx);
  
- static inline void start_tx_rs485(struct uart_port *port)
+ /* Returns false, if start_tx_timer was setup to defer TX start */
+ static bool start_tx_rs485(struct uart_port *port)
  {
        struct uart_8250_port *up = up_to_u8250p(port);
        struct uart_8250_em485 *em485 = up->em485;
                        em485->active_timer = &em485->start_tx_timer;
                        start_hrtimer_ms(&em485->start_tx_timer,
                                         up->port.rs485.delay_rts_before_send);
-                       return;
+                       return false;
                }
        }
  
-       __start_tx(port);
+       return true;
  }
  
  static enum hrtimer_restart serial8250_em485_handle_start_tx(struct hrtimer *t)
@@@ -1678,14 -1665,12 +1665,12 @@@ static void serial8250_start_tx(struct 
  
        serial8250_rpm_get_tx(up);
  
-       if (em485 &&
-           em485->active_timer == &em485->start_tx_timer)
-               return;
-       if (em485)
-               start_tx_rs485(port);
-       else
-               __start_tx(port);
+       if (em485) {
+               if ((em485->active_timer == &em485->start_tx_timer) ||
+                   !start_tx_rs485(port))
+                       return;
+       }
+       __start_tx(port);
  }
  
  static void serial8250_throttle(struct uart_port *port)
@@@ -1729,7 -1714,7 +1714,7 @@@ static void serial8250_enable_ms(struc
        serial8250_rpm_put(up);
  }
  
- void serial8250_read_char(struct uart_8250_port *up, unsigned char lsr)
+ void serial8250_read_char(struct uart_8250_port *up, u16 lsr)
  {
        struct uart_port *port = &up->port;
        unsigned char ch;
  EXPORT_SYMBOL_GPL(serial8250_read_char);
  
  /*
-  * serial8250_rx_chars: processes according to the passed in LSR
-  * value, and returns the remaining LSR bits not handled
-  * by this Rx routine.
+  * serial8250_rx_chars - Read characters. The first LSR value must be passed in.
+  *
+  * Returns LSR bits. The caller should rely only on non-Rx related LSR bits
+  * (such as THRE) because the LSR value might come from an already consumed
+  * character.
   */
- unsigned char serial8250_rx_chars(struct uart_8250_port *up, unsigned char lsr)
+ u16 serial8250_rx_chars(struct uart_8250_port *up, u16 lsr)
  {
        struct uart_port *port = &up->port;
        int max_count = 256;
@@@ -1852,7 -1839,7 +1839,7 @@@ void serial8250_tx_chars(struct uart_82
                if (uart_circ_empty(xmit))
                        break;
                if ((up->capabilities & UART_CAP_HFIFO) &&
-                   (serial_in(up, UART_LSR) & BOTH_EMPTY) != BOTH_EMPTY)
+                   !uart_lsr_tx_empty(serial_in(up, UART_LSR)))
                        break;
                /* The BCM2835 MINI UART THRE bit is really a not-full bit. */
                if ((up->capabilities & UART_CAP_MINI) &&
@@@ -1916,17 -1903,17 +1903,17 @@@ static bool handle_rx_dma(struct uart_8
   */
  int serial8250_handle_irq(struct uart_port *port, unsigned int iir)
  {
-       unsigned char status;
        struct uart_8250_port *up = up_to_u8250p(port);
        bool skip_rx = false;
        unsigned long flags;
+       u16 status;
  
        if (iir & UART_IIR_NO_INT)
                return 0;
  
        spin_lock_irqsave(&port->lock, flags);
  
-       status = serial_port_in(port, UART_LSR);
+       status = serial_lsr_in(up);
  
        /*
         * If port is stopped and there are no error conditions in the
        if ((status & UART_LSR_THRE) && (up->ier & UART_IER_THRI)) {
                if (!up->dma || up->dma->tx_err)
                        serial8250_tx_chars(up);
 -              else
 +              else if (!up->dma->tx_running)
                        __stop_tx(up);
        }
  
@@@ -2002,18 -1989,17 +1989,17 @@@ static unsigned int serial8250_tx_empty
  {
        struct uart_8250_port *up = up_to_u8250p(port);
        unsigned long flags;
-       unsigned int lsr;
+       u16 lsr;
  
        serial8250_rpm_get(up);
  
        spin_lock_irqsave(&port->lock, flags);
-       lsr = serial_port_in(port, UART_LSR);
-       up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS;
+       lsr = serial_lsr_in(up);
        spin_unlock_irqrestore(&port->lock, flags);
  
        serial8250_rpm_put(up);
  
-       return (lsr & BOTH_EMPTY) == BOTH_EMPTY ? TIOCSER_TEMT : 0;
+       return uart_lsr_tx_empty(lsr) ? TIOCSER_TEMT : 0;
  }
  
  unsigned int serial8250_do_get_mctrl(struct uart_port *port)
@@@ -2084,9 -2070,7 +2070,7 @@@ static void wait_for_lsr(struct uart_82
  
        /* Wait up to 10ms for the character(s) to be sent. */
        for (;;) {
-               status = serial_in(up, UART_LSR);
-               up->lsr_saved_flags |= status & LSR_SAVE_FLAGS;
+               status = serial_lsr_in(up);
  
                if ((status & bits) == bits)
                        break;
@@@ -2128,8 -2112,8 +2112,8 @@@ static void wait_for_xmitr(struct uart_
  static int serial8250_get_poll_char(struct uart_port *port)
  {
        struct uart_8250_port *up = up_to_u8250p(port);
-       unsigned char lsr;
        int status;
+       u16 lsr;
  
        serial8250_rpm_get(up);
  
@@@ -2163,7 -2147,7 +2147,7 @@@ static void serial8250_put_poll_char(st
        else
                serial_port_out(port, UART_IER, 0);
  
-       wait_for_xmitr(up, BOTH_EMPTY);
+       wait_for_xmitr(up, UART_LSR_BOTH_EMPTY);
        /*
         *      Send the character out.
         */
         *      Finally, wait for transmitter to become empty
         *      and restore the IER
         */
-       wait_for_xmitr(up, BOTH_EMPTY);
+       wait_for_xmitr(up, UART_LSR_BOTH_EMPTY);
        serial_port_out(port, UART_IER, ier);
        serial8250_rpm_put(up);
  }
@@@ -2184,8 -2168,9 +2168,9 @@@ int serial8250_do_startup(struct uart_p
  {
        struct uart_8250_port *up = up_to_u8250p(port);
        unsigned long flags;
-       unsigned char lsr, iir;
+       unsigned char iir;
        int retval;
+       u16 lsr;
  
        if (!port->fifosize)
                port->fifosize = uart_config[port->type].fifo_size;
@@@ -2810,7 -2795,7 +2795,7 @@@ serial8250_do_set_termios(struct uart_p
                port->read_status_mask |= UART_LSR_BI;
  
        /*
-        * Characteres to ignore
+        * Characters to ignore
         */
        port->ignore_status_mask = 0;
        if (termios->c_iflag & IGNPAR)
@@@ -2975,10 -2960,8 +2960,10 @@@ static int serial8250_request_std_resou
        case UPIO_MEM32BE:
        case UPIO_MEM16:
        case UPIO_MEM:
 -              if (!port->mapbase)
 +              if (!port->mapbase) {
 +                      ret = -EINVAL;
                        break;
 +              }
  
                if (!request_mem_region(port->mapbase, size, "serial")) {
                        ret = -EBUSY;
@@@ -3203,7 -3186,7 +3188,7 @@@ static void serial8250_config_port(stru
                autoconfig(up);
  
        if (port->rs485.flags & SER_RS485_ENABLED)
-               port->rs485_config(port, &port->rs485);
+               uart_rs485_config(port);
  
        /* if access method is AU, it is a 16550 with a quirk */
        if (port->type == PORT_16550A && port->iotype == UPIO_AU)
@@@ -3445,7 -3428,7 +3430,7 @@@ void serial8250_console_write(struct ua
         *      Finally, wait for transmitter to become empty
         *      and restore the IER
         */
-       wait_for_xmitr(up, BOTH_EMPTY);
+       wait_for_xmitr(up, UART_LSR_BOTH_EMPTY);
  
        if (em485) {
                mdelay(port->rs485.delay_rts_after_send);
@@@ -324,6 -324,7 +324,7 @@@ config SERIAL_MAX310
        depends on SPI_MASTER
        select SERIAL_CORE
        select REGMAP_SPI if SPI_MASTER
+       select REGMAP_I2C if I2C
        help
          This selects support for an advanced UART from Maxim (Dallas).
          Supported ICs are MAX3107, MAX3108, MAX3109, MAX14830.
@@@ -889,23 -890,6 +890,6 @@@ config SERIAL_TXX9_STDSERIA
        bool "TX39XX/49XX SIO act as standard serial"
        depends on !SERIAL_8250 && SERIAL_TXX9
  
- config SERIAL_VR41XX
-       tristate "NEC VR4100 series Serial Interface Unit support"
-       depends on CPU_VR41XX
-       select SERIAL_CORE
-       help
-         If you have a NEC VR4100 series processor and you want to use
-         Serial Interface Unit(SIU) or Debug Serial Interface Unit(DSIU)
-         (not include VR4111/VR4121 DSIU), say Y.  Otherwise, say N.
- config SERIAL_VR41XX_CONSOLE
-       bool "Enable NEC VR4100 series Serial Interface Unit console"
-       depends on SERIAL_VR41XX=y
-       select SERIAL_CORE_CONSOLE
-       help
-         If you have a NEC VR4100 series processor and you want to use
-         a console on a serial port, say Y.  Otherwise, say N.
  config SERIAL_JSM
        tristate "Digi International NEO and Classic PCI Support"
        depends on PCI
@@@ -1099,8 -1083,8 +1083,8 @@@ config SERIAL_TIMBERDAL
  config SERIAL_BCM63XX
        tristate "Broadcom BCM63xx/BCM33xx UART support"
        select SERIAL_CORE
 -      depends on ARCH_BCM4908 || ARCH_BCM_63XX || BCM63XX || BMIPS_GENERIC || COMPILE_TEST
 -      default ARCH_BCM4908 || ARCH_BCM_63XX || BCM63XX || BMIPS_GENERIC
 +      depends on ARCH_BCM4908 || ARCH_BCMBCA || BCM63XX || BMIPS_GENERIC || COMPILE_TEST
 +      default ARCH_BCM4908 || ARCH_BCMBCA || BCM63XX || BMIPS_GENERIC
        help
          This enables the driver for the onchip UART core found on
          the following chipsets:
@@@ -1367,15 -1367,6 +1367,15 @@@ static void pl011_stop_rx(struct uart_p
        pl011_dma_rx_stop(uap);
  }
  
 +static void pl011_throttle_rx(struct uart_port *port)
 +{
 +      unsigned long flags;
 +
 +      spin_lock_irqsave(&port->lock, flags);
 +      pl011_stop_rx(port);
 +      spin_unlock_irqrestore(&port->lock, flags);
 +}
 +
  static void pl011_enable_ms(struct uart_port *port)
  {
        struct uart_amba_port *uap =
@@@ -1797,10 -1788,9 +1797,10 @@@ static int pl011_allocate_irq(struct ua
   */
  static void pl011_enable_interrupts(struct uart_amba_port *uap)
  {
 +      unsigned long flags;
        unsigned int i;
  
 -      spin_lock_irq(&uap->port.lock);
 +      spin_lock_irqsave(&uap->port.lock, flags);
  
        /* Clear out any spuriously appearing RX interrupts */
        pl011_write(UART011_RTIS | UART011_RXIS, uap, REG_ICR);
        if (!pl011_dma_rx_running(uap))
                uap->im |= UART011_RXIM;
        pl011_write(uap->im, uap, REG_IMSC);
 -      spin_unlock_irq(&uap->port.lock);
 +      spin_unlock_irqrestore(&uap->port.lock, flags);
 +}
 +
 +static void pl011_unthrottle_rx(struct uart_port *port)
 +{
 +      struct uart_amba_port *uap = container_of(port, struct uart_amba_port, port);
 +
 +      pl011_enable_interrupts(uap);
  }
  
  static int pl011_startup(struct uart_port *port)
@@@ -2214,7 -2197,7 +2214,7 @@@ static int pl011_verify_port(struct uar
        return ret;
  }
  
- static int pl011_rs485_config(struct uart_port *port,
+ static int pl011_rs485_config(struct uart_port *port, struct ktermios *termios,
                              struct serial_rs485 *rs485)
  {
        struct uart_amba_port *uap =
@@@ -2242,8 -2225,6 +2242,8 @@@ static const struct uart_ops amba_pl011
        .stop_tx        = pl011_stop_tx,
        .start_tx       = pl011_start_tx,
        .stop_rx        = pl011_stop_rx,
 +      .throttle       = pl011_throttle_rx,
 +      .unthrottle     = pl011_unthrottle_rx,
        .enable_ms      = pl011_enable_ms,
        .break_ctl      = pl011_break_ctl,
        .startup        = pl011_startup,
@@@ -2700,17 -2681,12 +2700,12 @@@ static int pl011_find_free_port(void
  static int pl011_get_rs485_mode(struct uart_amba_port *uap)
  {
        struct uart_port *port = &uap->port;
-       struct serial_rs485 *rs485 = &port->rs485;
        int ret;
  
        ret = uart_get_rs485_mode(port);
        if (ret)
                return ret;
  
-       /* clamp the delays to [0, 100ms] */
-       rs485->delay_rts_before_send = min(rs485->delay_rts_before_send, 100U);
-       rs485->delay_rts_after_send = min(rs485->delay_rts_after_send, 100U);
        return 0;
  }
  
@@@ -2770,6 -2746,13 +2765,13 @@@ static int pl011_register_port(struct u
        return ret;
  }
  
+ static const struct serial_rs485 pl011_rs485_supported = {
+       .flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | SER_RS485_RTS_AFTER_SEND |
+                SER_RS485_RX_DURING_TX,
+       .delay_rts_before_send = 1,
+       .delay_rts_after_send = 1,
+ };
  static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
  {
        struct uart_amba_port *uap;
        uap->port.irq = dev->irq[0];
        uap->port.ops = &amba_pl011_pops;
        uap->port.rs485_config = pl011_rs485_config;
+       uap->port.rs485_supported = pl011_rs485_supported;
        snprintf(uap->type, sizeof(uap->type), "PL011 rev%u", amba_rev(dev));
  
        ret = pl011_setup_port(&dev->dev, uap, &dev->res, portnr);
@@@ -265,6 -265,7 +265,7 @@@ static void mvebu_uart_rx_chars(struct 
        struct tty_port *tport = &port->state->port;
        unsigned char ch = 0;
        char flag = 0;
+       int ret;
  
        do {
                if (status & STAT_RX_RDY(port)) {
                                port->icount.parity++;
                }
  
+               /*
+                * For UART2, error bits are not cleared on buffer read.
+                * This causes interrupt loop and system hang.
+                */
+               if (IS_EXTENDED(port) && (status & STAT_BRK_ERR)) {
+                       ret = readl(port->membase + UART_STAT);
+                       ret |= STAT_BRK_ERR;
+                       writel(ret, port->membase + UART_STAT);
+               }
                if (status & STAT_BRK_DET) {
                        port->icount.brk++;
                        status &= ~(STAT_FRM_ERR | STAT_PAR_ERR);
@@@ -470,14 -481,14 +481,14 @@@ static void mvebu_uart_shutdown(struct 
        }
  }
  
 -static int mvebu_uart_baud_rate_set(struct uart_port *port, unsigned int baud)
 +static unsigned int mvebu_uart_baud_rate_set(struct uart_port *port, unsigned int baud)
  {
        unsigned int d_divisor, m_divisor;
        unsigned long flags;
        u32 brdv, osamp;
  
        if (!port->uartclk)
 -              return -EOPNOTSUPP;
 +              return 0;
  
        /*
         * The baudrate is derived from the UART clock thanks to divisors:
                        (m_divisor << 16) | (m_divisor << 24);
        writel(osamp, port->membase + UART_OSAMP);
  
 -      return 0;
 +      return DIV_ROUND_CLOSEST(port->uartclk, d_divisor * m_divisor);
  }
  
  static void mvebu_uart_set_termios(struct uart_port *port,
        max_baud = port->uartclk / 80;
  
        baud = uart_get_baud_rate(port, termios, old, min_baud, max_baud);
 -      if (mvebu_uart_baud_rate_set(port, baud)) {
 -              /* No clock available, baudrate cannot be changed */
 -              if (old)
 -                      baud = uart_get_baud_rate(port, old, NULL,
 -                                                min_baud, max_baud);
 -      } else {
 -              tty_termios_encode_baud_rate(termios, baud, baud);
 -              uart_update_timeout(port, termios->c_cflag, baud);
 -      }
 +      baud = mvebu_uart_baud_rate_set(port, baud);
 +
 +      /* In case baudrate cannot be changed, report previous old value */
 +      if (baud == 0 && old)
 +              baud = tty_termios_baud_rate(old);
  
        /* Only the following flag changes are supported */
        if (old) {
                termios->c_cflag |= CS8;
        }
  
 +      if (baud != 0) {
 +              tty_termios_encode_baud_rate(termios, baud, baud);
 +              uart_update_timeout(port, termios->c_cflag, baud);
 +      }
 +
        spin_unlock_irqrestore(&port->lock, flags);
  }
  
@@@ -1,9 -1,6 +1,9 @@@
  // SPDX-License-Identifier: GPL-2.0
  // Copyright (c) 2017-2018, The Linux foundation. All rights reserved.
  
 +/* Disable MMIO tracing to prevent excessive logging of unwanted MMIO traces */
 +#define __DISABLE_TRACE_MMIO__
 +
  #include <linux/clk.h>
  #include <linux/console.h>
  #include <linux/io.h>
@@@ -943,52 -940,63 +943,63 @@@ static int qcom_geni_serial_startup(str
        return 0;
  }
  
- static unsigned long get_clk_div_rate(struct clk *clk, unsigned int baud,
-                       unsigned int sampling_rate, unsigned int *clk_div)
+ static unsigned long find_clk_rate_in_tol(struct clk *clk, unsigned int desired_clk,
+                       unsigned int *clk_div, unsigned int percent_tol)
  {
-       unsigned long ser_clk;
-       unsigned long desired_clk;
-       unsigned long freq, prev;
+       unsigned long freq;
        unsigned long div, maxdiv;
-       int64_t mult;
-       desired_clk = baud * sampling_rate;
-       if (!desired_clk) {
-               pr_err("%s: Invalid frequency\n", __func__);
-               return 0;
-       }
+       u64 mult;
+       unsigned long offset, abs_tol, achieved;
  
+       abs_tol = div_u64((u64)desired_clk * percent_tol, 100);
        maxdiv = CLK_DIV_MSK >> CLK_DIV_SHFT;
-       prev = 0;
-       for (div = 1; div <= maxdiv; div++) {
-               mult = div * desired_clk;
-               if (mult > ULONG_MAX)
+       div = 1;
+       while (div <= maxdiv) {
+               mult = (u64)div * desired_clk;
+               if (mult != (unsigned long)mult)
                        break;
  
-               freq = clk_round_rate(clk, (unsigned long)mult);
-               if (!(freq % desired_clk)) {
-                       ser_clk = freq;
-                       break;
-               }
+               offset = div * abs_tol;
+               freq = clk_round_rate(clk, mult - offset);
  
-               if (!prev)
-                       ser_clk = freq;
-               else if (prev == freq)
+               /* Can only get lower if we're done */
+               if (freq < mult - offset)
                        break;
  
-               prev = freq;
-       }
+               /*
+                * Re-calculate div in case rounding skipped rates but we
+                * ended up at a good one, then check for a match.
+                */
+               div = DIV_ROUND_CLOSEST(freq, desired_clk);
+               achieved = DIV_ROUND_CLOSEST(freq, div);
+               if (achieved <= desired_clk + abs_tol &&
+                   achieved >= desired_clk - abs_tol) {
+                       *clk_div = div;
+                       return freq;
+               }
  
-       if (!ser_clk) {
-               pr_err("%s: Can't find matching DFS entry for baud %d\n",
-                                                               __func__, baud);
-               return ser_clk;
+               div = DIV_ROUND_UP(freq, desired_clk);
        }
  
-       *clk_div = ser_clk / desired_clk;
-       if (!(*clk_div))
-               *clk_div = 1;
+       return 0;
+ }
+ static unsigned long get_clk_div_rate(struct clk *clk, unsigned int baud,
+                       unsigned int sampling_rate, unsigned int *clk_div)
+ {
+       unsigned long ser_clk;
+       unsigned long desired_clk;
+       desired_clk = baud * sampling_rate;
+       if (!desired_clk)
+               return 0;
+       /*
+        * try to find a clock rate within 2% tolerance, then within 5%
+        */
+       ser_clk = find_clk_rate_in_tol(clk, desired_clk, clk_div, 2);
+       if (!ser_clk)
+               ser_clk = find_clk_rate_in_tol(clk, desired_clk, clk_div, 5);
  
        return ser_clk;
  }
@@@ -1023,8 -1031,15 +1034,15 @@@ static void qcom_geni_serial_set_termio
  
        clk_rate = get_clk_div_rate(port->se.clk, baud,
                sampling_rate, &clk_div);
-       if (!clk_rate)
+       if (!clk_rate) {
+               dev_err(port->se.dev,
+                       "Couldn't find suitable clock rate for %u\n",
+                       baud * sampling_rate);
                goto out_restart_rx;
+       }
+       dev_dbg(port->se.dev, "desired_rate-%u, clk_rate-%lu, clk_div-%u\n",
+                       baud * sampling_rate, clk_rate, clk_div);
  
        uport->uartclk = clk_rate;
        dev_pm_opp_set_rate(uport->dev, clk_rate);
  #define S3C24XX_SERIAL_MAJOR  204
  #define S3C24XX_SERIAL_MINOR  64
  
+ #ifdef CONFIG_ARM64
+ #define UART_NR                       12
+ #else
+ #define UART_NR                       CONFIG_SERIAL_SAMSUNG_UARTS
+ #endif
  #define S3C24XX_TX_PIO                        1
  #define S3C24XX_TX_DMA                        2
  #define S3C24XX_RX_PIO                        1
@@@ -87,7 -93,7 +93,7 @@@ struct s3c24xx_uart_info 
  struct s3c24xx_serial_drv_data {
        const struct s3c24xx_uart_info  info;
        const struct s3c2410_uartcfg    def_cfg;
-       const unsigned int              fifosize[CONFIG_SERIAL_SAMSUNG_UARTS];
+       const unsigned int              fifosize[UART_NR];
  };
  
  struct s3c24xx_uart_dma {
@@@ -377,7 -383,8 +383,7 @@@ static void enable_tx_dma(struct s3c24x
        /* Enable tx dma mode */
        ucon = rd_regl(port, S3C2410_UCON);
        ucon &= ~(S3C64XX_UCON_TXBURST_MASK | S3C64XX_UCON_TXMODE_MASK);
 -      ucon |= (dma_get_cache_alignment() >= 16) ?
 -              S3C64XX_UCON_TXBURST_16 : S3C64XX_UCON_TXBURST_1;
 +      ucon |= S3C64XX_UCON_TXBURST_1;
        ucon |= S3C64XX_UCON_TXMODE_DMA;
        wr_regl(port,  S3C2410_UCON, ucon);
  
@@@ -673,7 -680,7 +679,7 @@@ static void enable_rx_dma(struct s3c24x
                        S3C64XX_UCON_DMASUS_EN |
                        S3C64XX_UCON_TIMEOUT_EN |
                        S3C64XX_UCON_RXMODE_MASK);
 -      ucon |= S3C64XX_UCON_RXBURST_16 |
 +      ucon |= S3C64XX_UCON_RXBURST_1 |
                        0xf << S3C64XX_UCON_TIMEOUT_SHIFT |
                        S3C64XX_UCON_EMPTYINT_EN |
                        S3C64XX_UCON_TIMEOUT_EN |
@@@ -1011,6 -1018,7 +1017,7 @@@ static unsigned int s3c24xx_serial_get_
  static void s3c24xx_serial_set_mctrl(struct uart_port *port, unsigned int mctrl)
  {
        unsigned int umcon = rd_regl(port, S3C2410_UMCON);
+       unsigned int ucon = rd_regl(port, S3C2410_UCON);
  
        if (mctrl & TIOCM_RTS)
                umcon |= S3C2410_UMCOM_RTS_LOW;
                umcon &= ~S3C2410_UMCOM_RTS_LOW;
  
        wr_regl(port, S3C2410_UMCON, umcon);
+       if (mctrl & TIOCM_LOOP)
+               ucon |= S3C2410_UCON_LOOPBACK;
+       else
+               ucon &= ~S3C2410_UCON_LOOPBACK;
+       wr_regl(port, S3C2410_UCON, ucon);
  }
  
  static void s3c24xx_serial_break_ctl(struct uart_port *port, int break_state)
@@@ -1801,67 -1816,27 +1815,27 @@@ static const struct uart_ops apple_s5l_
  static struct uart_driver s3c24xx_uart_drv = {
        .owner          = THIS_MODULE,
        .driver_name    = "s3c2410_serial",
-       .nr             = CONFIG_SERIAL_SAMSUNG_UARTS,
+       .nr             = UART_NR,
        .cons           = S3C24XX_SERIAL_CONSOLE,
        .dev_name       = S3C24XX_SERIAL_NAME,
        .major          = S3C24XX_SERIAL_MAJOR,
        .minor          = S3C24XX_SERIAL_MINOR,
  };
  
- #define __PORT_LOCK_UNLOCKED(i) \
-       __SPIN_LOCK_UNLOCKED(s3c24xx_serial_ports[i].port.lock)
- static struct s3c24xx_uart_port
- s3c24xx_serial_ports[CONFIG_SERIAL_SAMSUNG_UARTS] = {
-       [0] = {
-               .port = {
-                       .lock           = __PORT_LOCK_UNLOCKED(0),
-                       .iotype         = UPIO_MEM,
-                       .uartclk        = 0,
-                       .fifosize       = 16,
-                       .ops            = &s3c24xx_serial_ops,
-                       .flags          = UPF_BOOT_AUTOCONF,
-                       .line           = 0,
-               }
-       },
-       [1] = {
-               .port = {
-                       .lock           = __PORT_LOCK_UNLOCKED(1),
-                       .iotype         = UPIO_MEM,
-                       .uartclk        = 0,
-                       .fifosize       = 16,
-                       .ops            = &s3c24xx_serial_ops,
-                       .flags          = UPF_BOOT_AUTOCONF,
-                       .line           = 1,
-               }
-       },
- #if CONFIG_SERIAL_SAMSUNG_UARTS > 2
-       [2] = {
-               .port = {
-                       .lock           = __PORT_LOCK_UNLOCKED(2),
-                       .iotype         = UPIO_MEM,
-                       .uartclk        = 0,
-                       .fifosize       = 16,
-                       .ops            = &s3c24xx_serial_ops,
-                       .flags          = UPF_BOOT_AUTOCONF,
-                       .line           = 2,
-               }
-       },
- #endif
- #if CONFIG_SERIAL_SAMSUNG_UARTS > 3
-       [3] = {
-               .port = {
-                       .lock           = __PORT_LOCK_UNLOCKED(3),
-                       .iotype         = UPIO_MEM,
-                       .uartclk        = 0,
-                       .fifosize       = 16,
-                       .ops            = &s3c24xx_serial_ops,
-                       .flags          = UPF_BOOT_AUTOCONF,
-                       .line           = 3,
-               }
-       }
- #endif
- };
- #undef __PORT_LOCK_UNLOCKED
+ static struct s3c24xx_uart_port s3c24xx_serial_ports[UART_NR];
+ static void s3c24xx_serial_init_port_default(int index) {
+       struct uart_port *port = &s3c24xx_serial_ports[index].port;
+       spin_lock_init(&port->lock);
+       port->iotype = UPIO_MEM;
+       port->uartclk = 0;
+       port->fifosize = 16;
+       port->ops = &s3c24xx_serial_ops;
+       port->flags = UPF_BOOT_AUTOCONF;
+       port->line = index;
+ }
  
  /* s3c24xx_serial_resetport
   *
@@@ -2177,6 -2152,8 +2151,8 @@@ static int s3c24xx_serial_probe(struct 
        }
        ourport = &s3c24xx_serial_ports[index];
  
+       s3c24xx_serial_init_port_default(index);
        ourport->drv_data = s3c24xx_get_driver_data(pdev);
        if (!ourport->drv_data) {
                dev_err(&pdev->dev, "could not find driver data\n");
@@@ -2575,7 -2552,7 +2551,7 @@@ s3c24xx_serial_console_setup(struct con
  
        /* is this a valid port */
  
-       if (co->index == -1 || co->index >= CONFIG_SERIAL_SAMSUNG_UARTS)
+       if (co->index == -1 || co->index >= UART_NR)
                co->index = 0;
  
        port = &s3c24xx_serial_ports[co->index].port;
@@@ -97,9 -97,16 +97,16 @@@ static inline struct uart_port *uart_po
        return state->uart_port;
  }
  
- /*
-  * This routine is used by the interrupt handler to schedule processing in
-  * the software interrupt portion of the driver.
+ /**
+  * uart_write_wakeup - schedule write processing
+  * @port: port to be processed
+  *
+  * This routine is used by the interrupt handler to schedule processing in the
+  * software interrupt portion of the driver. A driver is expected to call this
+  * function when the number of characters in the transmit buffer have dropped
+  * below a threshold.
+  *
+  * Locking: @port->lock should be held
   */
  void uart_write_wakeup(struct uart_port *port)
  {
@@@ -327,13 -334,16 +334,16 @@@ static void uart_shutdown(struct tty_st
  }
  
  /**
-  *    uart_update_timeout - update per-port FIFO timeout.
-  *    @port:  uart_port structure describing the port
-  *    @cflag: termios cflag value
-  *    @baud:  speed of the port
+  * uart_update_timeout - update per-port frame timing information
+  * @port: uart_port structure describing the port
+  * @cflag: termios cflag value
+  * @baud: speed of the port
   *
-  *    Set the port FIFO timeout value.  The @cflag value should
-  *    reflect the actual hardware settings.
+  * Set the @port frame timing information from which the FIFO timeout value is
+  * derived. The @cflag value should reflect the actual hardware settings as
+  * number of bits, parity, stop bits and baud rate is taken into account here.
+  *
+  * Locking: caller is expected to take @port->lock
   */
  void
  uart_update_timeout(struct uart_port *port, unsigned int cflag,
        u64 frame_time;
  
        frame_time = (u64)size * NSEC_PER_SEC;
-       size *= port->fifosize;
-       /*
-        * Figure the timeout to send the above number of bits.
-        * Add .02 seconds of slop
-        */
-       port->timeout = (HZ * size) / baud + HZ/50;
        port->frame_time = DIV64_U64_ROUND_UP(frame_time, baud);
  }
  EXPORT_SYMBOL(uart_update_timeout);
  
  /**
-  *    uart_get_baud_rate - return baud rate for a particular port
-  *    @port: uart_port structure describing the port in question.
-  *    @termios: desired termios settings.
-  *    @old: old termios (or NULL)
-  *    @min: minimum acceptable baud rate
-  *    @max: maximum acceptable baud rate
+  * uart_get_baud_rate - return baud rate for a particular port
+  * @port: uart_port structure describing the port in question.
+  * @termios: desired termios settings
+  * @old: old termios (or %NULL)
+  * @min: minimum acceptable baud rate
+  * @max: maximum acceptable baud rate
+  *
+  * Decode the termios structure into a numeric baud rate, taking account of the
+  * magic 38400 baud rate (with spd_* flags), and mapping the %B0 rate to 9600
+  * baud.
   *
-  *    Decode the termios structure into a numeric baud rate,
-  *    taking account of the magic 38400 baud rate (with spd_*
-  *    flags), and mapping the %B0 rate to 9600 baud.
+  * If the new baud rate is invalid, try the @old termios setting. If it's still
+  * invalid, we try 9600 baud.
   *
-  *    If the new baud rate is invalid, try the old termios setting.
-  *    If it's still invalid, we try 9600 baud.
+  * The @termios structure is updated to reflect the baud rate we're actually
+  * going to be using. Don't do this for the case where B0 is requested ("hang
+  * up").
   *
-  *    Update the @termios structure to reflect the baud rate
-  *    we're actually going to be using. Don't do this for the case
-  *    where B0 is requested ("hang up").
+  * Locking: caller dependent
   */
  unsigned int
  uart_get_baud_rate(struct uart_port *port, struct ktermios *termios,
  EXPORT_SYMBOL(uart_get_baud_rate);
  
  /**
-  *    uart_get_divisor - return uart clock divisor
-  *    @port: uart_port structure describing the port.
-  *    @baud: desired baud rate
+  * uart_get_divisor - return uart clock divisor
+  * @port: uart_port structure describing the port
+  * @baud: desired baud rate
+  *
+  * Calculate the divisor (baud_base / baud) for the specified @baud,
+  * appropriately rounded.
   *
-  *    Calculate the uart clock divisor for the port.
+  * If 38400 baud and custom divisor is selected, return the custom divisor
+  * instead.
+  *
+  * Locking: caller dependent
   */
  unsigned int
  uart_get_divisor(struct uart_port *port, unsigned int baud)
@@@ -1023,10 -1034,10 +1034,10 @@@ static int uart_set_info_user(struct tt
  }
  
  /**
-  *    uart_get_lsr_info       -       get line status register info
-  *    @tty: tty associated with the UART
-  *    @state: UART being queried
-  *    @value: returned modem value
+  * uart_get_lsr_info - get line status register info
+  * @tty: tty associated with the UART
+  * @state: UART being queried
+  * @value: returned modem value
   */
  static int uart_get_lsr_info(struct tty_struct *tty,
                        struct uart_state *state, unsigned int __user *value)
@@@ -1276,6 -1287,126 +1287,126 @@@ static int uart_get_icount(struct tty_s
        return 0;
  }
  
+ #define SER_RS485_LEGACY_FLAGS        (SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | \
+                                SER_RS485_RTS_AFTER_SEND | SER_RS485_RX_DURING_TX | \
+                                SER_RS485_TERMINATE_BUS)
+ static int uart_check_rs485_flags(struct uart_port *port, struct serial_rs485 *rs485)
+ {
+       u32 flags = rs485->flags;
+       /* Don't return -EINVAL for unsupported legacy flags */
+       flags &= ~SER_RS485_LEGACY_FLAGS;
+       /*
+        * For any bit outside of the legacy ones that is not supported by
+        * the driver, return -EINVAL.
+        */
+       if (flags & ~port->rs485_supported.flags)
+               return -EINVAL;
+       /* Asking for address w/o addressing mode? */
+       if (!(rs485->flags & SER_RS485_ADDRB) &&
+           (rs485->flags & (SER_RS485_ADDR_RECV|SER_RS485_ADDR_DEST)))
+               return -EINVAL;
+       /* Address given but not enabled? */
+       if (!(rs485->flags & SER_RS485_ADDR_RECV) && rs485->addr_recv)
+               return -EINVAL;
+       if (!(rs485->flags & SER_RS485_ADDR_DEST) && rs485->addr_dest)
+               return -EINVAL;
+       return 0;
+ }
+ static void uart_sanitize_serial_rs485_delays(struct uart_port *port,
+                                             struct serial_rs485 *rs485)
+ {
+       if (!port->rs485_supported.delay_rts_before_send) {
+               if (rs485->delay_rts_before_send) {
+                       dev_warn_ratelimited(port->dev,
+                               "%s (%d): RTS delay before sending not supported\n",
+                               port->name, port->line);
+               }
+               rs485->delay_rts_before_send = 0;
+       } else if (rs485->delay_rts_before_send > RS485_MAX_RTS_DELAY) {
+               rs485->delay_rts_before_send = RS485_MAX_RTS_DELAY;
+               dev_warn_ratelimited(port->dev,
+                       "%s (%d): RTS delay before sending clamped to %u ms\n",
+                       port->name, port->line, rs485->delay_rts_before_send);
+       }
+       if (!port->rs485_supported.delay_rts_after_send) {
+               if (rs485->delay_rts_after_send) {
+                       dev_warn_ratelimited(port->dev,
+                               "%s (%d): RTS delay after sending not supported\n",
+                               port->name, port->line);
+               }
+               rs485->delay_rts_after_send = 0;
+       } else if (rs485->delay_rts_after_send > RS485_MAX_RTS_DELAY) {
+               rs485->delay_rts_after_send = RS485_MAX_RTS_DELAY;
+               dev_warn_ratelimited(port->dev,
+                       "%s (%d): RTS delay after sending clamped to %u ms\n",
+                       port->name, port->line, rs485->delay_rts_after_send);
+       }
+ }
+ static void uart_sanitize_serial_rs485(struct uart_port *port, struct serial_rs485 *rs485)
+ {
+       u32 supported_flags = port->rs485_supported.flags;
+       if (!(rs485->flags & SER_RS485_ENABLED)) {
+               memset(rs485, 0, sizeof(*rs485));
+               return;
+       }
+       /* Pick sane settings if the user hasn't */
+       if ((supported_flags & (SER_RS485_RTS_ON_SEND|SER_RS485_RTS_AFTER_SEND)) &&
+           !(rs485->flags & SER_RS485_RTS_ON_SEND) ==
+           !(rs485->flags & SER_RS485_RTS_AFTER_SEND)) {
+               dev_warn_ratelimited(port->dev,
+                       "%s (%d): invalid RTS setting, using RTS_ON_SEND instead\n",
+                       port->name, port->line);
+               rs485->flags |= SER_RS485_RTS_ON_SEND;
+               rs485->flags &= ~SER_RS485_RTS_AFTER_SEND;
+               supported_flags |= SER_RS485_RTS_ON_SEND|SER_RS485_RTS_AFTER_SEND;
+       }
+       rs485->flags &= supported_flags;
+       uart_sanitize_serial_rs485_delays(port, rs485);
+       /* Return clean padding area to userspace */
+       memset(rs485->padding0, 0, sizeof(rs485->padding0));
+       memset(rs485->padding1, 0, sizeof(rs485->padding1));
+ }
+ static void uart_set_rs485_termination(struct uart_port *port,
+                                      const struct serial_rs485 *rs485)
+ {
+       if (!(rs485->flags & SER_RS485_ENABLED))
+               return;
+       gpiod_set_value_cansleep(port->rs485_term_gpio,
+                                !!(rs485->flags & SER_RS485_TERMINATE_BUS));
+ }
+ int uart_rs485_config(struct uart_port *port)
+ {
+       struct serial_rs485 *rs485 = &port->rs485;
+       int ret;
+       uart_sanitize_serial_rs485(port, rs485);
+       uart_set_rs485_termination(port, rs485);
+       ret = port->rs485_config(port, NULL, rs485);
+       if (ret)
+               memset(rs485, 0, sizeof(*rs485));
+       return ret;
+ }
+ EXPORT_SYMBOL_GPL(uart_rs485_config);
  static int uart_get_rs485_config(struct uart_port *port,
                         struct serial_rs485 __user *rs485)
  {
        return 0;
  }
  
- static int uart_set_rs485_config(struct uart_port *port,
+ static int uart_set_rs485_config(struct tty_struct *tty, struct uart_port *port,
                         struct serial_rs485 __user *rs485_user)
  {
        struct serial_rs485 rs485;
        if (copy_from_user(&rs485, rs485_user, sizeof(*rs485_user)))
                return -EFAULT;
  
-       /* pick sane settings if the user hasn't */
-       if (!(rs485.flags & SER_RS485_RTS_ON_SEND) ==
-           !(rs485.flags & SER_RS485_RTS_AFTER_SEND)) {
-               dev_warn_ratelimited(port->dev,
-                       "%s (%d): invalid RTS setting, using RTS_ON_SEND instead\n",
-                       port->name, port->line);
-               rs485.flags |= SER_RS485_RTS_ON_SEND;
-               rs485.flags &= ~SER_RS485_RTS_AFTER_SEND;
-       }
-       if (rs485.delay_rts_before_send > RS485_MAX_RTS_DELAY) {
-               rs485.delay_rts_before_send = RS485_MAX_RTS_DELAY;
-               dev_warn_ratelimited(port->dev,
-                       "%s (%d): RTS delay before sending clamped to %u ms\n",
-                       port->name, port->line, rs485.delay_rts_before_send);
-       }
-       if (rs485.delay_rts_after_send > RS485_MAX_RTS_DELAY) {
-               rs485.delay_rts_after_send = RS485_MAX_RTS_DELAY;
-               dev_warn_ratelimited(port->dev,
-                       "%s (%d): RTS delay after sending clamped to %u ms\n",
-                       port->name, port->line, rs485.delay_rts_after_send);
-       }
-       /* Return clean padding area to userspace */
-       memset(rs485.padding, 0, sizeof(rs485.padding));
+       ret = uart_check_rs485_flags(port, &rs485);
+       if (ret)
+               return ret;
+       uart_sanitize_serial_rs485(port, &rs485);
+       uart_set_rs485_termination(port, &rs485);
  
        spin_lock_irqsave(&port->lock, flags);
-       ret = port->rs485_config(port, &rs485);
+       ret = port->rs485_config(port, &tty->termios, &rs485);
        if (!ret)
                port->rs485 = rs485;
        spin_unlock_irqrestore(&port->lock, flags);
@@@ -1441,6 -1552,10 +1552,10 @@@ uart_ioctl(struct tty_struct *tty, unsi
        if (ret != -ENOIOCTLCMD)
                goto out;
  
+       /* rs485_config requires more locking than others */
+       if (cmd == TIOCGRS485)
+               down_write(&tty->termios_rwsem);
        mutex_lock(&port->mutex);
        uport = uart_port_check(state);
  
                break;
  
        case TIOCSRS485:
-               ret = uart_set_rs485_config(uport, uarg);
+               ret = uart_set_rs485_config(tty, uport, uarg);
                break;
  
        case TIOCSISO7816:
        }
  out_up:
        mutex_unlock(&port->mutex);
+       if (cmd == TIOCGRS485)
+               up_write(&tty->termios_rwsem);
  out:
        return ret;
  }
@@@ -1628,7 -1745,7 +1745,7 @@@ static void uart_wait_until_sent(struc
  {
        struct uart_state *state = tty->driver_data;
        struct uart_port *port;
-       unsigned long char_time, expire;
+       unsigned long char_time, expire, fifo_timeout;
  
        port = uart_port_ref(state);
        if (!port)
                 * amount of time to send the entire FIFO, it probably won't
                 * ever clear.  This assumes the UART isn't doing flow
                 * control, which is currently the case.  Hence, if it ever
-                * takes longer than port->timeout, this is probably due to a
+                * takes longer than FIFO timeout, this is probably due to a
                 * UART bug of some kind.  So, we clamp the timeout parameter at
-                * 2*port->timeout.
+                * 2 * FIFO timeout.
                 */
-               if (timeout == 0 || timeout > 2 * port->timeout)
-                       timeout = 2 * port->timeout;
+               fifo_timeout = uart_fifo_timeout(port);
+               if (timeout == 0 || timeout > 2 * fifo_timeout)
+                       timeout = 2 * fifo_timeout;
        }
  
        expire = jiffies + timeout;
@@@ -1941,6 -2059,11 +2059,6 @@@ static int uart_proc_show(struct seq_fi
  }
  #endif
  
 -static inline bool uart_console_enabled(struct uart_port *port)
 -{
 -      return uart_console(port) && (port->cons->flags & CON_ENABLED);
 -}
 -
  static void uart_port_spin_lock_init(struct uart_port *port)
  {
        spin_lock_init(&port->lock);
  
  #if defined(CONFIG_SERIAL_CORE_CONSOLE) || defined(CONFIG_CONSOLE_POLL)
  /**
-  *    uart_console_write - write a console message to a serial port
-  *    @port: the port to write the message
-  *    @s: array of characters
-  *    @count: number of characters in string to write
-  *    @putchar: function to write character to port
+  * uart_console_write - write a console message to a serial port
+  * @port: the port to write the message
+  * @s: array of characters
+  * @count: number of characters in string to write
+  * @putchar: function to write character to port
   */
  void uart_console_write(struct uart_port *port, const char *s,
                        unsigned int count,
  }
  EXPORT_SYMBOL_GPL(uart_console_write);
  
- /*
-  *    Check whether an invalid uart number has been specified, and
-  *    if so, search for the first available port that does have
-  *    console support.
+ /**
+  * uart_get_console - get uart port for console
+  * @ports: ports to search in
+  * @nr: number of @ports
+  * @co: console to search for
+  * Returns: uart_port for the console @co
+  *
+  * Check whether an invalid uart number has been specified (as @co->index), and
+  * if so, search for the first available port that does have console support.
   */
  struct uart_port * __init
  uart_get_console(struct uart_port *ports, int nr, struct console *co)
  }
  
  /**
-  *    uart_parse_earlycon - Parse earlycon options
-  *    @p:       ptr to 2nd field (ie., just beyond '<name>,')
-  *    @iotype:  ptr for decoded iotype (out)
-  *    @addr:    ptr for decoded mapbase/iobase (out)
-  *    @options: ptr for <options> field; NULL if not present (out)
-  *
-  *    Decodes earlycon kernel command line parameters of the form
-  *       earlycon=<name>,io|mmio|mmio16|mmio32|mmio32be|mmio32native,<addr>,<options>
-  *       console=<name>,io|mmio|mmio16|mmio32|mmio32be|mmio32native,<addr>,<options>
+  * uart_parse_earlycon - Parse earlycon options
+  * @p:             ptr to 2nd field (ie., just beyond '<name>,')
+  * @iotype:  ptr for decoded iotype (out)
+  * @addr:    ptr for decoded mapbase/iobase (out)
+  * @options: ptr for <options> field; %NULL if not present (out)
   *
-  *    The optional form
+  * Decodes earlycon kernel command line parameters of the form:
+  *  * earlycon=<name>,io|mmio|mmio16|mmio32|mmio32be|mmio32native,<addr>,<options>
+  *  * console=<name>,io|mmio|mmio16|mmio32|mmio32be|mmio32native,<addr>,<options>
   *
-  *       earlycon=<name>,0x<addr>,<options>
-  *       console=<name>,0x<addr>,<options>
+  * The optional form:
+  *  * earlycon=<name>,0x<addr>,<options>
+  *  * console=<name>,0x<addr>,<options>
   *
-  *    is also accepted; the returned @iotype will be UPIO_MEM.
+  * is also accepted; the returned @iotype will be %UPIO_MEM.
   *
-  *    Returns 0 on success or -EINVAL on failure
+  * Returns: 0 on success or -%EINVAL on failure
   */
  int uart_parse_earlycon(char *p, unsigned char *iotype, resource_size_t *addr,
                        char **options)
  EXPORT_SYMBOL_GPL(uart_parse_earlycon);
  
  /**
-  *    uart_parse_options - Parse serial port baud/parity/bits/flow control.
-  *    @options: pointer to option string
-  *    @baud: pointer to an 'int' variable for the baud rate.
-  *    @parity: pointer to an 'int' variable for the parity.
-  *    @bits: pointer to an 'int' variable for the number of data bits.
-  *    @flow: pointer to an 'int' variable for the flow control character.
+  * uart_parse_options - Parse serial port baud/parity/bits/flow control.
+  * @options: pointer to option string
+  * @baud: pointer to an 'int' variable for the baud rate.
+  * @parity: pointer to an 'int' variable for the parity.
+  * @bits: pointer to an 'int' variable for the number of data bits.
+  * @flow: pointer to an 'int' variable for the flow control character.
   *
-  *    uart_parse_options decodes a string containing the serial console
-  *    options.  The format of the string is <baud><parity><bits><flow>,
-  *    eg: 115200n8r
+  * uart_parse_options() decodes a string containing the serial console
+  * options. The format of the string is <baud><parity><bits><flow>,
+  * eg: 115200n8r
   */
  void
  uart_parse_options(const char *options, int *baud, int *parity,
  EXPORT_SYMBOL_GPL(uart_parse_options);
  
  /**
-  *    uart_set_options - setup the serial console parameters
-  *    @port: pointer to the serial ports uart_port structure
-  *    @co: console pointer
-  *    @baud: baud rate
-  *    @parity: parity character - 'n' (none), 'o' (odd), 'e' (even)
-  *    @bits: number of data bits
-  *    @flow: flow control character - 'r' (rts)
+  * uart_set_options - setup the serial console parameters
+  * @port: pointer to the serial ports uart_port structure
+  * @co: console pointer
+  * @baud: baud rate
+  * @parity: parity character - 'n' (none), 'o' (odd), 'e' (even)
+  * @bits: number of data bits
+  * @flow: flow control character - 'r' (rts)
   */
  int
  uart_set_options(struct uart_port *port, struct console *co,
@@@ -2577,17 -2704,19 +2699,19 @@@ static const struct tty_port_operation
  };
  
  /**
-  *    uart_register_driver - register a driver with the uart core layer
-  *    @drv: low level driver structure
+  * uart_register_driver - register a driver with the uart core layer
+  * @drv: low level driver structure
+  *
+  * Register a uart driver with the core driver. We in turn register with the
+  * tty layer, and initialise the core driver per-port state.
   *
-  *    Register a uart driver with the core driver.  We in turn register
-  *    with the tty layer, and initialise the core driver per-port state.
+  * We have a proc file in /proc/tty/driver which is named after the normal
+  * driver.
   *
-  *    We have a proc file in /proc/tty/driver which is named after the
-  *    normal driver.
+  * @drv->port should be %NULL, and the per-port structures should be registered
+  * using uart_add_one_port() after this call has succeeded.
   *
-  *    drv->port should be NULL, and the per-port structures should be
-  *    registered using uart_add_one_port after this call has succeeded.
+  * Locking: none, Interrupts: enabled
   */
  int uart_register_driver(struct uart_driver *drv)
  {
  EXPORT_SYMBOL(uart_register_driver);
  
  /**
-  *    uart_unregister_driver - remove a driver from the uart core layer
-  *    @drv: low level driver structure
+  * uart_unregister_driver - remove a driver from the uart core layer
+  * @drv: low level driver structure
   *
-  *    Remove all references to a driver from the core driver.  The low
-  *    level driver must have removed all its ports via the
-  *    uart_remove_one_port() if it registered them with uart_add_one_port().
-  *    (ie, drv->port == NULL)
+  * Remove all references to a driver from the core driver. The low level
+  * driver must have removed all its ports via the uart_remove_one_port() if it
+  * registered them with uart_add_one_port(). (I.e. @drv->port is %NULL.)
+  *
+  * Locking: none, Interrupts: enabled
   */
  void uart_unregister_driver(struct uart_driver *drv)
  {
@@@ -2906,16 -3036,15 +3031,15 @@@ static const struct attribute_group tty
  };
  
  /**
-  *    uart_add_one_port - attach a driver-defined port structure
-  *    @drv: pointer to the uart low level driver structure for this port
-  *    @uport: uart port structure to use for this port.
+  * uart_add_one_port - attach a driver-defined port structure
+  * @drv: pointer to the uart low level driver structure for this port
+  * @uport: uart port structure to use for this port.
   *
-  *    Context: task context, might sleep
+  * Context: task context, might sleep
   *
-  *    This allows the driver to register its own uart_port structure
-  *    with the core driver.  The main purpose is to allow the low
-  *    level uart drivers to expand uart_port, rather than having yet
-  *    more levels of structures.
+  * This allows the driver @drv to register its own uart_port structure with the
+  * core driver. The main purpose is to allow the low level uart drivers to
+  * expand uart_port, rather than having yet more levels of structures.
   */
  int uart_add_one_port(struct uart_driver *drv, struct uart_port *uport)
  {
  EXPORT_SYMBOL(uart_add_one_port);
  
  /**
-  *    uart_remove_one_port - detach a driver defined port structure
-  *    @drv: pointer to the uart low level driver structure for this port
-  *    @uport: uart port structure for this port
+  * uart_remove_one_port - detach a driver defined port structure
+  * @drv: pointer to the uart low level driver structure for this port
+  * @uport: uart port structure for this port
   *
-  *    Context: task context, might sleep
+  * Context: task context, might sleep
   *
-  *    This unhooks (and hangs up) the specified port structure from the
-  *    core driver.  No further calls will be made to the low-level code
-  *    for this port.
+  * This unhooks (and hangs up) the specified port structure from the core
+  * driver. No further calls will be made to the low-level code for this port.
   */
  int uart_remove_one_port(struct uart_driver *drv, struct uart_port *uport)
  {
  }
  EXPORT_SYMBOL(uart_remove_one_port);
  
- /*
-  *    Are the two ports equivalent?
+ /**
+  * uart_match_port - are the two ports equivalent?
+  * @port1: first port
+  * @port2: second port
+  *
+  * This utility function can be used to determine whether two uart_port
+  * structures describe the same port.
   */
  bool uart_match_port(const struct uart_port *port1,
                const struct uart_port *port2)
  EXPORT_SYMBOL(uart_match_port);
  
  /**
-  *    uart_handle_dcd_change - handle a change of carrier detect state
-  *    @uport: uart_port structure for the open port
-  *    @status: new carrier detect status, nonzero if active
+  * uart_handle_dcd_change - handle a change of carrier detect state
+  * @uport: uart_port structure for the open port
+  * @status: new carrier detect status, nonzero if active
   *
-  *    Caller must hold uport->lock
+  * Caller must hold uport->lock.
   */
  void uart_handle_dcd_change(struct uart_port *uport, unsigned int status)
  {
  EXPORT_SYMBOL_GPL(uart_handle_dcd_change);
  
  /**
-  *    uart_handle_cts_change - handle a change of clear-to-send state
-  *    @uport: uart_port structure for the open port
-  *    @status: new clear to send status, nonzero if active
+  * uart_handle_cts_change - handle a change of clear-to-send state
+  * @uport: uart_port structure for the open port
+  * @status: new clear to send status, nonzero if active
   *
-  *    Caller must hold uport->lock
+  * Caller must hold uport->lock.
   */
  void uart_handle_cts_change(struct uart_port *uport, unsigned int status)
  {
@@@ -3229,15 -3362,15 +3357,15 @@@ static void uart_sysrq_on(struct work_s
  static DECLARE_WORK(sysrq_enable_work, uart_sysrq_on);
  
  /**
-  *    uart_try_toggle_sysrq - Enables SysRq from serial line
-  *    @port: uart_port structure where char(s) after BREAK met
-  *    @ch: new character in the sequence after received BREAK
+  * uart_try_toggle_sysrq - Enables SysRq from serial line
+  * @port: uart_port structure where char(s) after BREAK met
+  * @ch: new character in the sequence after received BREAK
   *
-  *    Enables magic SysRq when the required sequence is met on port
-  *    (see CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE).
+  * Enables magic SysRq when the required sequence is met on port
+  * (see CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE).
   *
-  *    Returns false if @ch is out of enabling sequence and should be
-  *    handled some other way, true if @ch was consumed.
+  * Returns: %false if @ch is out of enabling sequence and should be
+  * handled some other way, %true if @ch was consumed.
   */
  bool uart_try_toggle_sysrq(struct uart_port *port, unsigned int ch)
  {
@@@ -3289,6 -3422,8 +3417,8 @@@ int uart_get_rs485_mode(struct uart_por
                rs485conf->delay_rts_after_send = 0;
        }
  
+       uart_sanitize_serial_rs485_delays(port, rs485conf);
        /*
         * Clear full-duplex and enabled flags, set RTS polarity to active high
         * to get to a defined state with the following properties:
                port->rs485_term_gpio = NULL;
                return dev_err_probe(dev, ret, "Cannot get rs485-term-gpios\n");
        }
+       if (port->rs485_term_gpio)
+               port->rs485_supported.flags |= SER_RS485_TERMINATE_BUS;
  
        return 0;
  }
  EXPORT_SYMBOL_GPL(uart_get_rs485_mode);
  
+ /* Compile-time assertions for serial_rs485 layout */
+ static_assert(offsetof(struct serial_rs485, padding) ==
+               (offsetof(struct serial_rs485, delay_rts_after_send) + sizeof(__u32)));
+ static_assert(offsetof(struct serial_rs485, padding1) ==
+             offsetof(struct serial_rs485, padding[1]));
+ static_assert((offsetof(struct serial_rs485, padding[4]) + sizeof(__u32)) ==
+             sizeof(struct serial_rs485));
  MODULE_DESCRIPTION("Serial driver core");
  MODULE_LICENSE("GPL");
  #include "serial_mctrl_gpio.h"
  #include "stm32-usart.h"
  
+ /* Register offsets */
+ static struct stm32_usart_info stm32f4_info = {
+       .ofs = {
+               .isr    = 0x00,
+               .rdr    = 0x04,
+               .tdr    = 0x04,
+               .brr    = 0x08,
+               .cr1    = 0x0c,
+               .cr2    = 0x10,
+               .cr3    = 0x14,
+               .gtpr   = 0x18,
+               .rtor   = UNDEF_REG,
+               .rqr    = UNDEF_REG,
+               .icr    = UNDEF_REG,
+       },
+       .cfg = {
+               .uart_enable_bit = 13,
+               .has_7bits_data = false,
+               .fifosize = 1,
+       }
+ };
+ static struct stm32_usart_info stm32f7_info = {
+       .ofs = {
+               .cr1    = 0x00,
+               .cr2    = 0x04,
+               .cr3    = 0x08,
+               .brr    = 0x0c,
+               .gtpr   = 0x10,
+               .rtor   = 0x14,
+               .rqr    = 0x18,
+               .isr    = 0x1c,
+               .icr    = 0x20,
+               .rdr    = 0x24,
+               .tdr    = 0x28,
+       },
+       .cfg = {
+               .uart_enable_bit = 0,
+               .has_7bits_data = true,
+               .has_swap = true,
+               .fifosize = 1,
+       }
+ };
+ static struct stm32_usart_info stm32h7_info = {
+       .ofs = {
+               .cr1    = 0x00,
+               .cr2    = 0x04,
+               .cr3    = 0x08,
+               .brr    = 0x0c,
+               .gtpr   = 0x10,
+               .rtor   = 0x14,
+               .rqr    = 0x18,
+               .isr    = 0x1c,
+               .icr    = 0x20,
+               .rdr    = 0x24,
+               .tdr    = 0x28,
+       },
+       .cfg = {
+               .uart_enable_bit = 0,
+               .has_7bits_data = true,
+               .has_swap = true,
+               .has_wakeup = true,
+               .has_fifo = true,
+               .fifosize = 16,
+       }
+ };
  static void stm32_usart_stop_tx(struct uart_port *port);
  static void stm32_usart_transmit_chars(struct uart_port *port);
  static void __maybe_unused stm32_usart_console_putchar(struct uart_port *port, unsigned char ch);
@@@ -72,8 -141,6 +141,8 @@@ static void stm32_usart_config_reg_rs48
        *cr3 |= USART_CR3_DEM;
        over8 = *cr1 & USART_CR1_OVER8;
  
 +      *cr1 &= ~(USART_CR1_DEDT_MASK | USART_CR1_DEAT_MASK);
 +
        if (over8)
                rs485_deat_dedt = delay_ADE * baud * 8;
        else
        *cr1 |= rs485_deat_dedt;
  }
  
- static int stm32_usart_config_rs485(struct uart_port *port,
+ static int stm32_usart_config_rs485(struct uart_port *port, struct ktermios *termios,
                                    struct serial_rs485 *rs485conf)
  {
        struct stm32_port *stm32_port = to_stm32_port(port);
@@@ -1377,6 -1444,13 +1446,13 @@@ static void stm32_usart_deinit_port(str
        clk_disable_unprepare(stm32port->clk);
  }
  
+ static const struct serial_rs485 stm32_rs485_supported = {
+       .flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | SER_RS485_RTS_AFTER_SEND |
+                SER_RS485_RX_DURING_TX,
+       .delay_rts_before_send = 1,
+       .delay_rts_after_send = 1,
+ };
  static int stm32_usart_init_port(struct stm32_port *stm32port,
                                 struct platform_device *pdev)
  {
        port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_STM32_CONSOLE);
        port->irq = irq;
        port->rs485_config = stm32_usart_config_rs485;
+       port->rs485_supported = stm32_rs485_supported;
  
        ret = stm32_usart_init_rs485(port, pdev);
        if (ret)
diff --combined drivers/tty/tty_buffer.c
@@@ -5,6 -5,7 +5,7 @@@
  
  #include <linux/types.h>
  #include <linux/errno.h>
+ #include <linux/minmax.h>
  #include <linux/tty.h>
  #include <linux/tty_driver.h>
  #include <linux/tty_flip.h>
@@@ -104,6 -105,7 +105,7 @@@ static void tty_buffer_reset(struct tty
        p->size = size;
        p->next = NULL;
        p->commit = 0;
+       p->lookahead = 0;
        p->read = 0;
        p->flags = 0;
  }
@@@ -234,6 -236,7 +236,7 @@@ void tty_buffer_flush(struct tty_struc
                buf->head = next;
        }
        buf->head->read = buf->head->commit;
+       buf->head->lookahead = buf->head->read;
  
        if (ld && ld->ops->flush_buffer)
                ld->ops->flush_buffer(tty);
@@@ -276,13 -279,15 +279,15 @@@ static int __tty_buffer_request_room(st
                if (n != NULL) {
                        n->flags = flags;
                        buf->tail = n;
-                       /* paired w/ acquire in flush_to_ldisc(); ensures
-                        * flush_to_ldisc() sees buffer data.
+                       /*
+                        * Paired w/ acquire in flush_to_ldisc() and lookahead_bufs()
+                        * ensures they see all buffer data.
                         */
                        smp_store_release(&b->commit, b->used);
-                       /* paired w/ acquire in flush_to_ldisc(); ensures the
-                        * latest commit value can be read before the head is
-                        * advanced to the next buffer
+                       /*
+                        * Paired w/ acquire in flush_to_ldisc() and lookahead_bufs()
+                        * ensures the latest commit value can be read before the head
+                        * is advanced to the next buffer.
                         */
                        smp_store_release(&b->next, n);
                } else if (change)
@@@ -459,6 -464,40 +464,40 @@@ int tty_ldisc_receive_buf(struct tty_ld
  }
  EXPORT_SYMBOL_GPL(tty_ldisc_receive_buf);
  
+ static void lookahead_bufs(struct tty_port *port, struct tty_buffer *head)
+ {
+       head->lookahead = max(head->lookahead, head->read);
+       while (head) {
+               struct tty_buffer *next;
+               unsigned char *p, *f = NULL;
+               unsigned int count;
+               /*
+                * Paired w/ release in __tty_buffer_request_room();
+                * ensures commit value read is not stale if the head
+                * is advancing to the next buffer.
+                */
+               next = smp_load_acquire(&head->next);
+               /*
+                * Paired w/ release in __tty_buffer_request_room() or in
+                * tty_buffer_flush(); ensures we see the committed buffer data.
+                */
+               count = smp_load_acquire(&head->commit) - head->lookahead;
+               if (!count) {
+                       head = next;
+                       continue;
+               }
+               p = char_buf_ptr(head, head->lookahead);
+               if (~head->flags & TTYB_NORMAL)
+                       f = flag_buf_ptr(head, head->lookahead);
+               port->client_ops->lookahead_buf(port, p, f, count);
+               head->lookahead += count;
+       }
+ }
  static int
  receive_buf(struct tty_port *port, struct tty_buffer *head, int count)
  {
@@@ -496,7 -535,7 +535,7 @@@ static void flush_to_ldisc(struct work_
        while (1) {
                struct tty_buffer *head = buf->head;
                struct tty_buffer *next;
-               int count;
+               int count, rcvd;
  
                /* Ldisc or user is trying to gain exclusive access */
                if (atomic_read(&buf->priority))
                        continue;
                }
  
-               count = receive_buf(port, head, count);
-               if (!count)
+               rcvd = receive_buf(port, head, count);
+               head->read += rcvd;
+               if (rcvd < count)
+                       lookahead_bufs(port, head);
+               if (!rcvd)
                        break;
-               head->read += count;
  
                if (need_resched())
                        cond_resched();
  
  }
  
 +static inline void tty_flip_buffer_commit(struct tty_buffer *tail)
 +{
 +      /*
 +       * Paired w/ acquire in flush_to_ldisc(); ensures flush_to_ldisc() sees
 +       * buffer data.
 +       */
 +      smp_store_release(&tail->commit, tail->used);
 +}
 +
  /**
   * tty_flip_buffer_push               -       push terminal buffers
   * @port: tty port to push
@@@ -555,42 -587,15 +596,42 @@@ void tty_flip_buffer_push(struct tty_po
  {
        struct tty_bufhead *buf = &port->buf;
  
 -      /*
 -       * Paired w/ acquire in flush_to_ldisc(); ensures flush_to_ldisc() sees
 -       * buffer data.
 -       */
 -      smp_store_release(&buf->tail->commit, buf->tail->used);
 +      tty_flip_buffer_commit(buf->tail);
        queue_work(system_unbound_wq, &buf->work);
  }
  EXPORT_SYMBOL(tty_flip_buffer_push);
  
 +/**
 + * tty_insert_flip_string_and_push_buffer - add characters to the tty buffer and
 + *    push
 + * @port: tty port
 + * @chars: characters
 + * @size: size
 + *
 + * The function combines tty_insert_flip_string() and tty_flip_buffer_push()
 + * with the exception of properly holding the @port->lock.
 + *
 + * To be used only internally (by pty currently).
 + *
 + * Returns: the number added.
 + */
 +int tty_insert_flip_string_and_push_buffer(struct tty_port *port,
 +              const unsigned char *chars, size_t size)
 +{
 +      struct tty_bufhead *buf = &port->buf;
 +      unsigned long flags;
 +
 +      spin_lock_irqsave(&port->lock, flags);
 +      size = tty_insert_flip_string(port, chars, size);
 +      if (size)
 +              tty_flip_buffer_commit(buf->tail);
 +      spin_unlock_irqrestore(&port->lock, flags);
 +
 +      queue_work(system_unbound_wq, &buf->work);
 +
 +      return size;
 +}
 +
  /**
   * tty_buffer_init            -       prepare a tty buffer structure
   * @port: tty port to initialise
diff --combined drivers/tty/vt/vt.c
@@@ -344,7 -344,7 +344,7 @@@ static struct uni_screen *vc_uniscr_all
        /* allocate everything in one go */
        memsize = cols * rows * sizeof(char32_t);
        memsize += rows * sizeof(char32_t *);
-       p = vmalloc(memsize);
+       p = vzalloc(memsize);
        if (!p)
                return NULL;
  
@@@ -855,7 -855,7 +855,7 @@@ static void delete_char(struct vc_data 
        unsigned short *p = (unsigned short *) vc->vc_pos;
  
        vc_uniscr_delete(vc, nr);
 -      scr_memcpyw(p, p + nr, (vc->vc_cols - vc->state.x - nr) * 2);
 +      scr_memmovew(p, p + nr, (vc->vc_cols - vc->state.x - nr) * 2);
        scr_memsetw(p + vc->vc_cols - vc->state.x - nr, vc->vc_video_erase_char,
                        nr * 2);
        vc->vc_need_wrap = 0;
@@@ -1063,10 -1063,10 +1063,10 @@@ static void visual_init(struct vc_data 
        __module_get(vc->vc_sw->owner);
        vc->vc_num = num;
        vc->vc_display_fg = &master_display_fg;
-       if (vc->vc_uni_pagedir_loc)
+       if (vc->uni_pagedict_loc)
                con_free_unimap(vc);
-       vc->vc_uni_pagedir_loc = &vc->vc_uni_pagedir;
-       vc->vc_uni_pagedir = NULL;
+       vc->uni_pagedict_loc = &vc->uni_pagedict;
+       vc->uni_pagedict = NULL;
        vc->vc_hi_font_mask = 0;
        vc->vc_complement_mask = 0;
        vc->vc_can_do_color = 0;
@@@ -1136,7 -1136,7 +1136,7 @@@ int vc_allocate(unsigned int currcons)  
  
        visual_init(vc, currcons, 1);
  
-       if (!*vc->vc_uni_pagedir_loc)
+       if (!*vc->uni_pagedict_loc)
                con_set_default_unimap(vc);
  
        err = -EINVAL;
@@@ -3939,7 -3939,7 +3939,7 @@@ static ssize_t show_bind(struct device 
        bind = con_is_bound(con->con);
        console_unlock();
  
-       return snprintf(buf, PAGE_SIZE, "%i\n", bind);
+       return sysfs_emit(buf, "%i\n", bind);
  }
  
  static ssize_t show_name(struct device *dev, struct device_attribute *attr,
  {
        struct con_driver *con = dev_get_drvdata(dev);
  
-       return snprintf(buf, PAGE_SIZE, "%s %s\n",
+       return sysfs_emit(buf, "%s %s\n",
                        (con->flag & CON_DRIVER_FLAG_MODULE) ? "(M)" : "(S)",
                         con->desc);
  
@@@ -4741,7 -4741,7 +4741,7 @@@ u32 screen_glyph_unicode(const struct v
  
        if (uniscr)
                return uniscr->lines[n / vc->vc_cols][n % vc->vc_cols];
-       return inverse_translate(vc, screen_glyph(vc, n * 2), 1);
+       return inverse_translate(vc, screen_glyph(vc, n * 2), true);
  }
  EXPORT_SYMBOL_GPL(screen_glyph_unicode);
  
@@@ -125,8 -125,8 +125,8 @@@ static int logo_lines
     enums.  */
  static int logo_shown = FBCON_LOGO_CANSHOW;
  /* console mappings */
 -static int first_fb_vc;
 -static int last_fb_vc = MAX_NR_CONSOLES - 1;
 +static unsigned int first_fb_vc;
 +static unsigned int last_fb_vc = MAX_NR_CONSOLES - 1;
  static int fbcon_is_default = 1; 
  static int primary_device = -1;
  static int fbcon_has_console_bind;
@@@ -440,12 -440,10 +440,12 @@@ static int __init fb_console_setup(cha
                        options += 3;
                        if (*options)
                                first_fb_vc = simple_strtoul(options, &options, 10) - 1;
 -                      if (first_fb_vc < 0)
 +                      if (first_fb_vc >= MAX_NR_CONSOLES)
                                first_fb_vc = 0;
                        if (*options++ == '-')
                                last_fb_vc = simple_strtoul(options, &options, 10) - 1;
 +                      if (last_fb_vc < first_fb_vc || last_fb_vc >= MAX_NR_CONSOLES)
 +                              last_fb_vc = MAX_NR_CONSOLES - 1;
                        fbcon_is_default = 0; 
                        continue;
                }
@@@ -1060,9 -1058,9 +1060,9 @@@ static void fbcon_init(struct vc_data *
                        vc->vc_complement_mask <<= 1;
        }
  
-       if (!*svc->vc_uni_pagedir_loc)
+       if (!*svc->uni_pagedict_loc)
                con_set_default_unimap(svc);
-       if (!*vc->vc_uni_pagedir_loc)
+       if (!*vc->uni_pagedict_loc)
                con_copy_unimap(vc, svc);
  
        ops = info->fbcon_par;
@@@ -1384,9 -1382,9 +1384,9 @@@ static void fbcon_set_disp(struct fb_in
                        vc->vc_complement_mask <<= 1;
        }
  
-       if (!*svc->vc_uni_pagedir_loc)
+       if (!*svc->uni_pagedict_loc)
                con_set_default_unimap(svc);
-       if (!*vc->vc_uni_pagedir_loc)
+       if (!*vc->uni_pagedict_loc)
                con_copy_unimap(vc, svc);
  
        cols = FBCON_SWAP(ops->rotate, info->var.xres, info->var.yres);
@@@ -1760,6 -1758,8 +1760,6 @@@ static bool fbcon_scroll(struct vc_dat
        case SM_UP:
                if (count > vc->vc_rows)        /* Maximum realistic size */
                        count = vc->vc_rows;
 -              if (logo_shown >= 0)
 -                      goto redraw_up;
                switch (fb_scrollmode(p)) {
                case SCROLL_MOVE:
                        fbcon_redraw_blit(vc, info, p, t, b - t - count,
        case SM_DOWN:
                if (count > vc->vc_rows)        /* Maximum realistic size */
                        count = vc->vc_rows;
 -              if (logo_shown >= 0)
 -                      goto redraw_down;
                switch (fb_scrollmode(p)) {
                case SCROLL_MOVE:
                        fbcon_redraw_blit(vc, info, p, b - 1, b - t - count,
@@@ -2180,6 -2182,7 +2180,6 @@@ static int fbcon_switch(struct vc_data 
        if (logo_shown == FBCON_LOGO_DRAW) {
  
                logo_shown = fg_console;
 -              /* This is protected above by initmem_freed */
                fb_show_logo(info, ops->rotate);
                update_region(vc,
                              vc->vc_origin + vc->vc_size_row * vc->vc_top,
@@@ -2466,11 -2469,6 +2466,11 @@@ static int fbcon_set_font(struct vc_dat
        if (charcount != 256 && charcount != 512)
                return -EINVAL;
  
 +      /* font bigger than screen resolution ? */
 +      if (w > FBCON_SWAP(info->var.rotate, info->var.xres, info->var.yres) ||
 +          h > FBCON_SWAP(info->var.rotate, info->var.yres, info->var.xres))
 +              return -EINVAL;
 +
        /* Make sure drawing engine can handle the font */
        if (!(info->pixmap.blit_x & (1 << (font->width - 1))) ||
            !(info->pixmap.blit_y & (1 << (font->height - 1))))
@@@ -2733,34 -2731,6 +2733,34 @@@ void fbcon_update_vcs(struct fb_info *i
  }
  EXPORT_SYMBOL(fbcon_update_vcs);
  
 +/* let fbcon check if it supports a new screen resolution */
 +int fbcon_modechange_possible(struct fb_info *info, struct fb_var_screeninfo *var)
 +{
 +      struct fbcon_ops *ops = info->fbcon_par;
 +      struct vc_data *vc;
 +      unsigned int i;
 +
 +      WARN_CONSOLE_UNLOCKED();
 +
 +      if (!ops)
 +              return 0;
 +
 +      /* prevent setting a screen size which is smaller than font size */
 +      for (i = first_fb_vc; i <= last_fb_vc; i++) {
 +              vc = vc_cons[i].d;
 +              if (!vc || vc->vc_mode != KD_TEXT ||
 +                         fbcon_info_from_console(i) != info)
 +                      continue;
 +
 +              if (vc->vc_font.width  > FBCON_SWAP(var->rotate, var->xres, var->yres) ||
 +                  vc->vc_font.height > FBCON_SWAP(var->rotate, var->yres, var->xres))
 +                      return -EINVAL;
 +      }
 +
 +      return 0;
 +}
 +EXPORT_SYMBOL_GPL(fbcon_modechange_possible);
 +
  int fbcon_mode_deleted(struct fb_info *info,
                       struct fb_videomode *mode)
  {
@@@ -31,9 -31,336 +31,336 @@@ struct serial_struct
  struct device;
  struct gpio_desc;
  
- /*
+ /**
+  * struct uart_ops -- interface between serial_core and the driver
+  *
   * This structure describes all the operations that can be done on the
-  * physical hardware.  See Documentation/driver-api/serial/driver.rst for details.
+  * physical hardware.
+  *
+  * @tx_empty: ``unsigned int ()(struct uart_port *port)``
+  *
+  *    This function tests whether the transmitter fifo and shifter for the
+  *    @port is empty. If it is empty, this function should return
+  *    %TIOCSER_TEMT, otherwise return 0. If the port does not support this
+  *    operation, then it should return %TIOCSER_TEMT.
+  *
+  *    Locking: none.
+  *    Interrupts: caller dependent.
+  *    This call must not sleep
+  *
+  * @set_mctrl: ``void ()(struct uart_port *port, unsigned int mctrl)``
+  *
+  *    This function sets the modem control lines for @port to the state
+  *    described by @mctrl. The relevant bits of @mctrl are:
+  *
+  *            - %TIOCM_RTS    RTS signal.
+  *            - %TIOCM_DTR    DTR signal.
+  *            - %TIOCM_OUT1   OUT1 signal.
+  *            - %TIOCM_OUT2   OUT2 signal.
+  *            - %TIOCM_LOOP   Set the port into loopback mode.
+  *
+  *    If the appropriate bit is set, the signal should be driven
+  *    active.  If the bit is clear, the signal should be driven
+  *    inactive.
+  *
+  *    Locking: @port->lock taken.
+  *    Interrupts: locally disabled.
+  *    This call must not sleep
+  *
+  * @get_mctrl: ``unsigned int ()(struct uart_port *port)``
+  *
+  *    Returns the current state of modem control inputs of @port. The state
+  *    of the outputs should not be returned, since the core keeps track of
+  *    their state. The state information should include:
+  *
+  *            - %TIOCM_CAR    state of DCD signal
+  *            - %TIOCM_CTS    state of CTS signal
+  *            - %TIOCM_DSR    state of DSR signal
+  *            - %TIOCM_RI     state of RI signal
+  *
+  *    The bit is set if the signal is currently driven active.  If
+  *    the port does not support CTS, DCD or DSR, the driver should
+  *    indicate that the signal is permanently active. If RI is
+  *    not available, the signal should not be indicated as active.
+  *
+  *    Locking: @port->lock taken.
+  *    Interrupts: locally disabled.
+  *    This call must not sleep
+  *
+  * @stop_tx: ``void ()(struct uart_port *port)``
+  *
+  *    Stop transmitting characters. This might be due to the CTS line
+  *    becoming inactive or the tty layer indicating we want to stop
+  *    transmission due to an %XOFF character.
+  *
+  *    The driver should stop transmitting characters as soon as possible.
+  *
+  *    Locking: @port->lock taken.
+  *    Interrupts: locally disabled.
+  *    This call must not sleep
+  *
+  * @start_tx: ``void ()(struct uart_port *port)``
+  *
+  *    Start transmitting characters.
+  *
+  *    Locking: @port->lock taken.
+  *    Interrupts: locally disabled.
+  *    This call must not sleep
+  *
+  * @throttle: ``void ()(struct uart_port *port)``
+  *
+  *    Notify the serial driver that input buffers for the line discipline are
+  *    close to full, and it should somehow signal that no more characters
+  *    should be sent to the serial port.
+  *    This will be called only if hardware assisted flow control is enabled.
+  *
+  *    Locking: serialized with @unthrottle() and termios modification by the
+  *    tty layer.
+  *
+  * @unthrottle: ``void ()(struct uart_port *port)``
+  *
+  *    Notify the serial driver that characters can now be sent to the serial
+  *    port without fear of overrunning the input buffers of the line
+  *    disciplines.
+  *
+  *    This will be called only if hardware assisted flow control is enabled.
+  *
+  *    Locking: serialized with @throttle() and termios modification by the
+  *    tty layer.
+  *
+  * @send_xchar: ``void ()(struct uart_port *port, char ch)``
+  *
+  *    Transmit a high priority character, even if the port is stopped. This
+  *    is used to implement XON/XOFF flow control and tcflow(). If the serial
+  *    driver does not implement this function, the tty core will append the
+  *    character to the circular buffer and then call start_tx() / stop_tx()
+  *    to flush the data out.
+  *
+  *    Do not transmit if @ch == '\0' (%__DISABLED_CHAR).
+  *
+  *    Locking: none.
+  *    Interrupts: caller dependent.
+  *
+  * @stop_rx: ``void ()(struct uart_port *port)``
+  *
+  *    Stop receiving characters; the @port is in the process of being closed.
+  *
+  *    Locking: @port->lock taken.
+  *    Interrupts: locally disabled.
+  *    This call must not sleep
+  *
+  * @enable_ms: ``void ()(struct uart_port *port)``
+  *
+  *    Enable the modem status interrupts.
+  *
+  *    This method may be called multiple times. Modem status interrupts
+  *    should be disabled when the @shutdown() method is called.
+  *
+  *    Locking: @port->lock taken.
+  *    Interrupts: locally disabled.
+  *    This call must not sleep
+  *
+  * @break_ctl: ``void ()(struct uart_port *port, int ctl)``
+  *
+  *    Control the transmission of a break signal. If @ctl is nonzero, the
+  *    break signal should be transmitted. The signal should be terminated
+  *    when another call is made with a zero @ctl.
+  *
+  *    Locking: caller holds tty_port->mutex
+  *
+  * @startup: ``int ()(struct uart_port *port)``
+  *
+  *    Grab any interrupt resources and initialise any low level driver state.
+  *    Enable the port for reception. It should not activate RTS nor DTR;
+  *    this will be done via a separate call to @set_mctrl().
+  *
+  *    This method will only be called when the port is initially opened.
+  *
+  *    Locking: port_sem taken.
+  *    Interrupts: globally disabled.
+  *
+  * @shutdown: ``void ()(struct uart_port *port)``
+  *
+  *    Disable the @port, disable any break condition that may be in effect,
+  *    and free any interrupt resources. It should not disable RTS nor DTR;
+  *    this will have already been done via a separate call to @set_mctrl().
+  *
+  *    Drivers must not access @port->state once this call has completed.
+  *
+  *    This method will only be called when there are no more users of this
+  *    @port.
+  *
+  *    Locking: port_sem taken.
+  *    Interrupts: caller dependent.
+  *
+  * @flush_buffer: ``void ()(struct uart_port *port)``
+  *
+  *    Flush any write buffers, reset any DMA state and stop any ongoing DMA
+  *    transfers.
+  *
+  *    This will be called whenever the @port->state->xmit circular buffer is
+  *    cleared.
+  *
+  *    Locking: @port->lock taken.
+  *    Interrupts: locally disabled.
+  *    This call must not sleep
+  *
+  * @set_termios: ``void ()(struct uart_port *port, struct ktermios *new,
+  *                    struct ktermios *old)``
+  *
+  *    Change the @port parameters, including word length, parity, stop bits.
+  *    Update @port->read_status_mask and @port->ignore_status_mask to
+  *    indicate the types of events we are interested in receiving. Relevant
+  *    ktermios::c_cflag bits are:
+  *
+  *    - %CSIZE - word size
+  *    - %CSTOPB - 2 stop bits
+  *    - %PARENB - parity enable
+  *    - %PARODD - odd parity (when %PARENB is in force)
+  *    - %ADDRB - address bit (changed through uart_port::rs485_config()).
+  *    - %CREAD - enable reception of characters (if not set, still receive
+  *      characters from the port, but throw them away).
+  *    - %CRTSCTS - if set, enable CTS status change reporting.
+  *    - %CLOCAL - if not set, enable modem status change reporting.
+  *
+  *    Relevant ktermios::c_iflag bits are:
+  *
+  *    - %INPCK - enable frame and parity error events to be passed to the TTY
+  *      layer.
+  *    - %BRKINT / %PARMRK - both of these enable break events to be passed to
+  *      the TTY layer.
+  *    - %IGNPAR - ignore parity and framing errors.
+  *    - %IGNBRK - ignore break errors. If %IGNPAR is also set, ignore overrun
+  *      errors as well.
+  *
+  *    The interaction of the ktermios::c_iflag bits is as follows (parity
+  *    error given as an example):
+  *
+  *    ============ ======= ======= =========================================
+  *    Parity error INPCK   IGNPAR
+  *    ============ ======= ======= =========================================
+  *    n/a          0       n/a     character received, marked as %TTY_NORMAL
+  *    None         1       n/a     character received, marked as %TTY_NORMAL
+  *    Yes          1       0       character received, marked as %TTY_PARITY
+  *    Yes          1       1       character discarded
+  *    ============ ======= ======= =========================================
+  *
+  *    Other flags may be used (eg, xon/xoff characters) if your hardware
+  *    supports hardware "soft" flow control.
+  *
+  *    Locking: caller holds tty_port->mutex
+  *    Interrupts: caller dependent.
+  *    This call must not sleep
+  *
+  * @set_ldisc: ``void ()(struct uart_port *port, struct ktermios *termios)``
+  *
+  *    Notifier for discipline change. See
+  *    Documentation/driver-api/tty/tty_ldisc.rst.
+  *
+  *    Locking: caller holds tty_port->mutex
+  *
+  * @pm: ``void ()(struct uart_port *port, unsigned int state,
+  *             unsigned int oldstate)``
+  *
+  *    Perform any power management related activities on the specified @port.
+  *    @state indicates the new state (defined by enum uart_pm_state),
+  *    @oldstate indicates the previous state.
+  *
+  *    This function should not be used to grab any resources.
+  *
+  *    This will be called when the @port is initially opened and finally
+  *    closed, except when the @port is also the system console. This will
+  *    occur even if %CONFIG_PM is not set.
+  *
+  *    Locking: none.
+  *    Interrupts: caller dependent.
+  *
+  * @type: ``const char *()(struct uart_port *port)``
+  *
+  *    Return a pointer to a string constant describing the specified @port,
+  *    or return %NULL, in which case the string 'unknown' is substituted.
+  *
+  *    Locking: none.
+  *    Interrupts: caller dependent.
+  *
+  * @release_port: ``void ()(struct uart_port *port)``
+  *
+  *    Release any memory and IO region resources currently in use by the
+  *    @port.
+  *
+  *    Locking: none.
+  *    Interrupts: caller dependent.
+  *
+  * @request_port: ``int ()(struct uart_port *port)``
+  *
+  *    Request any memory and IO region resources required by the port. If any
+  *    fail, no resources should be registered when this function returns, and
+  *    it should return -%EBUSY on failure.
+  *
+  *    Locking: none.
+  *    Interrupts: caller dependent.
+  *
+  * @config_port: ``void ()(struct uart_port *port, int type)``
+  *
+  *    Perform any autoconfiguration steps required for the @port. @type
+  *    contains a bit mask of the required configuration. %UART_CONFIG_TYPE
+  *    indicates that the port requires detection and identification.
+  *    @port->type should be set to the type found, or %PORT_UNKNOWN if no
+  *    port was detected.
+  *
+  *    %UART_CONFIG_IRQ indicates autoconfiguration of the interrupt signal,
+  *    which should be probed using standard kernel autoprobing techniques.
+  *    This is not necessary on platforms where ports have interrupts
+  *    internally hard wired (eg, system on a chip implementations).
+  *
+  *    Locking: none.
+  *    Interrupts: caller dependent.
+  *
+  * @verify_port: ``int ()(struct uart_port *port,
+  *                    struct serial_struct *serinfo)``
+  *
+  *    Verify the new serial port information contained within @serinfo is
+  *    suitable for this port type.
+  *
+  *    Locking: none.
+  *    Interrupts: caller dependent.
+  *
+  * @ioctl: ``int ()(struct uart_port *port, unsigned int cmd,
+  *            unsigned long arg)``
+  *
+  *    Perform any port specific IOCTLs. IOCTL commands must be defined using
+  *    the standard numbering system found in <asm/ioctl.h>.
+  *
+  *    Locking: none.
+  *    Interrupts: caller dependent.
+  *
+  * @poll_init: ``int ()(struct uart_port *port)``
+  *
+  *    Called by kgdb to perform the minimal hardware initialization needed to
+  *    support @poll_put_char() and @poll_get_char(). Unlike @startup(), this
+  *    should not request interrupts.
+  *
+  *    Locking: %tty_mutex and tty_port->mutex taken.
+  *    Interrupts: n/a.
+  *
+  * @poll_put_char: ``void ()(struct uart_port *port, unsigned char ch)``
+  *
+  *    Called by kgdb to write a single character @ch directly to the serial
+  *    @port. It can and should block until there is space in the TX FIFO.
+  *
+  *    Locking: none.
+  *    Interrupts: caller dependent.
+  *    This call must not sleep
+  *
+  * @poll_get_char: ``int ()(struct uart_port *port)``
+  *
+  *    Called by kgdb to read a single character directly from the serial
+  *    port. If data is available, it should be returned; otherwise the
+  *    function should return %NO_POLL_CHAR immediately.
+  *
+  *    Locking: none.
+  *    Interrupts: caller dependent.
+  *    This call must not sleep
   */
  struct uart_ops {
        unsigned int    (*tx_empty)(struct uart_port *);
        void            (*set_ldisc)(struct uart_port *, struct ktermios *);
        void            (*pm)(struct uart_port *, unsigned int state,
                              unsigned int oldstate);
-       /*
-        * Return a string describing the type of the port
-        */
        const char      *(*type)(struct uart_port *);
-       /*
-        * Release IO and memory resources used by the port.
-        * This includes iounmap if necessary.
-        */
        void            (*release_port)(struct uart_port *);
-       /*
-        * Request IO and memory resources used by the port.
-        * This includes iomapping the port if necessary.
-        */
        int             (*request_port)(struct uart_port *);
        void            (*config_port)(struct uart_port *, int);
        int             (*verify_port)(struct uart_port *, struct serial_struct *);
@@@ -133,6 -446,7 +446,7 @@@ struct uart_port 
                                      unsigned int old);
        void                    (*handle_break)(struct uart_port *);
        int                     (*rs485_config)(struct uart_port *,
+                                               struct ktermios *termios,
                                                struct serial_rs485 *rs485);
        int                     (*iso7816_config)(struct uart_port *,
                                                  struct serial_iso7816 *iso7816);
  
        int                     hw_stopped;             /* sw-assisted CTS flow state */
        unsigned int            mctrl;                  /* current modem ctrl settings */
-       unsigned int            timeout;                /* character-based timeout */
        unsigned int            frame_time;             /* frame timing in ns */
        unsigned int            type;                   /* port type */
        const struct uart_ops   *ops;
        struct attribute_group  *attr_group;            /* port specific attributes */
        const struct attribute_group **tty_groups;      /* all attributes (serial core use only) */
        struct serial_rs485     rs485;
+       struct serial_rs485     rs485_supported;        /* Supported mask for serial_rs485 */
        struct gpio_desc        *rs485_term_gpio;       /* enable RS485 bus termination */
        struct serial_iso7816   iso7816;
        void                    *private_data;          /* generic platform data pointer */
@@@ -334,10 -648,23 +648,23 @@@ unsigned int uart_get_baud_rate(struct 
                                unsigned int max);
  unsigned int uart_get_divisor(struct uart_port *port, unsigned int baud);
  
+ /*
+  * Calculates FIFO drain time.
+  */
+ static inline unsigned long uart_fifo_timeout(struct uart_port *port)
+ {
+       u64 fifo_timeout = (u64)READ_ONCE(port->frame_time) * port->fifosize;
+       /* Add .02 seconds of slop */
+       fifo_timeout += 20 * NSEC_PER_MSEC;
+       return max(nsecs_to_jiffies(fifo_timeout), 1UL);
+ }
  /* Base timer interval for polling */
  static inline int uart_poll_timeout(struct uart_port *port)
  {
-       int timeout = port->timeout;
+       int timeout = uart_fifo_timeout(port);
  
        return timeout > 6 ? (timeout / 2 - 2) : 1;
  }
@@@ -390,11 -717,6 +717,11 @@@ static const bool earlycon_acpi_spcr_en
  static inline int setup_earlycon(char *buf) { return 0; }
  #endif
  
 +static inline bool uart_console_enabled(struct uart_port *port)
 +{
 +      return uart_console(port) && (port->cons->flags & CON_ENABLED);
 +}
 +
  struct uart_port *uart_get_console(struct uart_port *ports, int nr,
                                   struct console *c);
  int uart_parse_earlycon(char *p, unsigned char *iotype, resource_size_t *addr,
@@@ -598,4 -920,5 +925,5 @@@ static inline int uart_handle_break(str
                                         !((cflag) & CLOCAL))
  
  int uart_get_rs485_mode(struct uart_port *port);
+ int uart_rs485_config(struct uart_port *port);
  #endif /* LINUX_SERIAL_CORE_H */