android_kernel_motorola_sm6225/mm/vmstat.c
Michael Bestas 726f1d1d73
Merge tag 'MMI-S2SE32.28-28-4' of https://github.com/MotorolaMobilityLLC/kernel-msm into lineage-20
hawao push for android 12

* tag 'MMI-S2SE32.28-28-4' of https://github.com/MotorolaMobilityLLC/kernel-msm: (4348 commits)
  Hawaii+ OLED: sim1+sim2+sd fast plugGing cause phone hang
  kernel/config: hawao: usb: sim1+sim2+sd fast plugGing cause phone hang
  shmem becomes bigger and bigger when launch apps
  driver/power: Add debug logs
  Hawao: Fix NFC power consumption in sleep mode.
  devon:charger bring up
  lib/iov_iter: initialize "flags" in new pipe_buffer
  BACKPORT: dmabuf: fix use-after-free of dmabuf's file->f_inode
  kernel:add bc12 detect channel definition
  Revert "(CR): drm: mipi: Disable the MIPI DSI commands 0x2E and 0x3E"
  devon4g: camera flash bringup
  sctp: add param size validation for SCTP_PARAM_SET_PRIMARY
  sctp: validate chunk size in __rcv_asconf_lookup
  sctp: add size validation when walking chunks
  sctp: validate from_addr_param return
  aio: fix use-after-free due to missing POLLFREE handling
  aio: keep poll requests on waitqueue until completed
  signalfd: use wake_up_pollfree()
  binder: use wake_up_pollfree()
  wait: add wake_up_pollfree()
  FROMGIT: binder: fix test regression due to sender_euid change
  UPSTREAM: binder: use cred instead of task for getsecid
  BACKPORT: binder: use cred instead of task for selinux checks
  UPSTREAM: binder: use euid from cred instead of using task
  arm64/defconfig: add devon extra configs
  USB: gadget: bRequestType is a bitfield, not a enum
  USB: gadget: zero allocate endpoint 0 buffers
  USB: gadget: detect too-big endpoint 0 requests
  hawao: devconfig: enable CHACHA20 crypto configs
  rhode: devconfig: enable CHACHA20 crypto configs
  regulator: Force shutdown all regulators when system power off.
  arm64: defconfig: Flash compatible
  TZ: Distinguishes encrypted and unencrypted TZ logs interfaces.
  TZ: Fix build err
  Hawaii+OLED:remove CONFIG_QCOM_FSA4480_I2C
  defconfig: Disable SLAB_MERGE.
  arm64/config:Enable Zram writeback on hawao
  Enable LZ4 on Rhode4G and Hawao
  dts: rhode: remove CONFIG_QCOM_FSA4480_I2C
  mm: zram: fix build error when zram wb disabled
  mm : zram fix swapcached issue on Zram Writeback
  fs:proc:abort reclaim once process goes to foreground
  ip_gre: add validation for csum_start
  arm64/config:Enable Zram writeback on Rhode
  kernel:add charger termination definition
  rhode:kernel: add wt6670 get firmware num node
  kernel/config:hawao:remove FTS TP config to use module
  kernel/input:hawao:update to use TP module ko
  kernel: remove wt6670 isp macro definition for user version
  kernel/config:hawao: add new FTS config to fix build error
  input/touchscreen: add ft3519 source config
  input/ft3519: hawao touch driver bringup
  Revert "(CR) hawaii OLED: visionox ft3519 touch drvier bringup"
  kernel: add wt6670 macro definition to control i2c nack
  QC3P:add iio channel definition
  Rhode: define CONFIG_CAMERA_FLASH_PWM
  display: Modify LDO driver initialization voltage compatibility
  Hawao: NFC Bringup(4) - driver
  hawaii OLED: visionox ft3519 touch drvier bringup
  kernel: qc3p wt6760 isp download function
  kernel:add ADC_GPIO3_DIV3 adc channel
  display/config: Add LDO driver config into the kernel.
  display: Load the regulator driver directly into the kernel.
  kernel: use orderly_poweroff when usb plugged out
  tty:diag:Move tty_flip_buffer_push out of spinlock
  Revert "tty:revert the tty update from qcom for moto tty_diag driver"
  kernel:dwc3 delay extcon module registeration
  ANDROID: xt_quota2: set usersize in xt_match registration object
  ANDROID: xt_quota2: clear quota2_log message before sending
  ANDROID: xt_quota2: remove trailing junk which might have a digit in it
  arm/defconfig: add hawao extra config
  usb:diag:revert the f_diag update from qcom for moto tty_diag driver
  tty:revert the tty update from qcom for moto tty_diag driver
  Enable samsung NFC driver
  integrate samsung RN4V NFC driver
  Rhode4G: wide camera bring up
  kernel: add charger gki
  kernel: change spi gpio for i2c gpio for charger
  Remove gpio3 from reserve list for rhode4g
  arm/defconfig: add rhode extra config
  [PATCH] f2fs: flush data when enabling checkpoint back
  [PATCH] f2fs: flush data when enabling checkpoint back
  Revert "(CR) guamp: emmc add ffu"
  Removing debug config
  [PATCH] qseecom: Call INIT_WORK() before flush_work()
  guamp: emmc add ffu
  Caprip: modify the actuator noise reduction work flow.
  Caprip: modify the actuator noise reduction work flow.
  APP data lost after first R upgrade
  Porting of (CR) replace WARN with pr_debug for IPA api
  (CR) Make NCM driver compatible with windows
  disable CONFIG_SLUB_DEBUG for user builds
  disable CONFIG_DEBUG_PANIC_ON_OOM in userdebug builds
  Include inlinecrypt at config.gz to fix Q->R upgrade
  usb: add xhci-hw-lpm-disable dt property support
  kernel:ram overwritten by TZ logs to cause random panics
  Caprip: Add start/stop vibrating notification to actuator.
  arm64: defconfig: Actuator noise reduction.
  kernel: driver/vibrator: diff vol for long/short vib
  skip ipa assert for debug build (patch 2)
  skip ipa assert for debug build
  limit ion cache size
  Revert "(CR) power: Add wakeup source in battery historian logGing"
  power: print active wakeup source before suspend.
  alarmtimer: add debug to identify alarmtimers
  charger:driver:fix non power off issue for factory kill.
  arm64/defconfig: Capri: open nfc driver for Capri
  arm64/defconfig: disable debug fs on user build
  charger:support typec high 2A current at non-turbo product
  arm/defconfig: enable CONFIG_DEBUG_LIST on R
  soc: qcom: service-locator: enlarge timeout value
  arm/defconfig: Caprip: init kernel deconfig
  arm/defconfig: Capri: init kernel deconfig
  Revert "Revert "msm: media: uapi: Redefine NV12 format with different alignment""
  Revert "msm: media: uapi: Redefine NV12 format with different alignment"
  clear SDAM for new battery profile loading.
  disable DEBUG_PANIC_ON_OOM on 3G ram device
  driver:qg:enale QG_DEBUG_SOC.
  Charge: fix slab out of bounds risk
  charge: qc2.0 adapter charge slow
  charge: Handle QC2.0 charger vbus rise 12V
  BCL: Enable charge bcl feature
  arm: setup: support mem= memory limit
  arm: call idle notifiers in CPU idle
  charger:improve micro-b input current to 1.9A per HW
  Capri bring up
  kernel:distinguish type-c and microb cdp input setting
  disable SPLIT_RSS_COUNTING to fix zero RSS issue
  charger:add battery test mode support for cebu.
  spi: disable_depth > 0 when pm runtime get sync
  driver/spi: spi driver suspend changes
  kernel: panel_notifier: Add new panel notify event type
  mmc:host:sdhci:Fix host->claimer NULL pointer problem
  Change ION fill mark from 100M to 16M to reduce the Lost RAM
  arm/defconfig: cebu: init kernel deconfig
  NFC VEN pin startup and shutdown sequence
  disable watermark boost
  charge:Config DCP 2A charge current
  tune memory configs
  charger:limit typec high to medium when hvdcp disabled
  charger:support 2A dcp charger
  arm64/defconfig: enable external usb camera
  power: reset: Use warm reset for dload mode
  Update kernel config of userdebug on Guam/GuamP to improve performance
  charger:duplicated apsd detection at pmi632
  expose ssr_reason to ss_ramdump
  SD: print SD interrupt log
  charger:SW_ICL do not used at moto
  charger:factory image charGing soc over 75%
  usb audio: Let the usb sound card index from 1
  kernel:USB DRP connect debug accessory test
  charge: config: config batt NTC for bornr NA
  Kernel: add sys node for panel supplier
  gpu/drm: Create panelRegDA sysfs to expose panel's reg
  pwrkey: change printk level to output to console
  Reboot: trigger warm reset when receive hw_warmreset cmd
  disable CONFIG_DEBUG_CONSOLE_UNHASHED_POINTERS for sts test
  Revert (CR): power: smb5: Clear HDC AICL
  arm/defconfig: borneo:  init kernel deconfig
  guam serials: remove kernel config for PASR
  Revert "mm, vmstat: hide /proc/pagetypeinfo from normal users"
  arm/defconfig: guam: init kernel deconfig
  arm/defconfig: add 32bit debug config
  defconfig.mk: add arch specific debug
  enable psi for guam guamp
  Revert "defconfig: disable MEMCG for bengal 32"
  Fix QC rebase issue for dual role sysfs access issue
  ion: display ion total size in debufs node
  ion: dmabuf improve debugfs
  kernel:support huawei p10 5A cable
  bengal:Enable dual role usb interface
  smb5:Add dual role class support in smb5
  usb:Add dual role class support
  sdcardfs: don't depend on reserved_mb to check free space
  sdcardfs: check the free space before creating files
  sdcardfs: copy inode size while getting attributes
  remove nfc function for guam
  charger:allow APSD re-run at factory usb detection
  CONFIG_FPR_FPC disable for rebase fingerprint fix
  defconfig.mk: Don't force make defconfig
  gitignore: ignore dts link
  guamp: arm64/dtsi enable regulator_fixed_voltage
  power: Add wakeup source in battery historian logGing
  arm64/defconfig: enable softlockup panic for debug
  arm64/defconfig : enable NFC
  kernel:add OCP charger current limitation
  guam: add touch module support
  Revert "(CR): config: disable CONFIG_PANIC_ON_REFCOUNT_ERROR"
  arm64/defconfig: disable debug config
  config: disable CONFIG_PANIC_ON_REFCOUNT_ERROR
  arm64/configs: sm4250: Enable USB console
  tty: msm_geni_serial: Support the match() callback
  printk: Keep boot console on if enabled
  arm64/config: support UAS of usb storage
  arm64/defconfig: enable usbnet drivers
  usb:configfs:Set udc_name NULL if attach failed
  usb/dwc3: msm: Enable all Debug Logs
  gadget: bcdUSB version back to 2.0 when not SuperSpeed
  usb: configfs: synchronize the secure and udc_name state
  usb: configfs: skip unregister gadget in secure
  usb: gadget: f_mtp: Return error if count is negative
  usb: gadget: storage: Support READ_TOC for MacOS
  usb: configfs: Implement secure attribute
  usb: configfs: Reset the use_os_desc flag
  usb: mass_storage: Add support for SC_REBOOT
  usb: f_mtp: Handle OS descriptors only when bound
  config:remove unused smb1355 config
  guam: input add touch class support
  arm64/config: enable DIAG_OVER_TTY
  drivers: tty: add tty diag module
  char: diag: add write done sync function
  panel_notify: add api for touch state
  guam: defconfig: enable panel notifications
  video: Add panel_notifier framework
  drm: mipi: disable Elvss dim of HBM for MIPI DSI
  Add new macro MIPI_DSI_MSG_READ
  gpu/drm: Create sysfs to expose panel vendor infor
  drm: mipi: Disable the MIPI DSI commands 0x2E and 0x3E
  drm/dsi: Implement DCS set disp brightness 2bytes
  guam: input add drm support
  defconfig: bengal: enable pstore
  power: Add function to show active wakelocks
  power: suspend: Save snapshot of gpio, vreg when suspend
  PM/Suspend: Print wall time at suspend entry and exit
  - Do not unload prov TZ app.
  add system restart warm and panic mode
  printk: increase log buffer size to 2k
  qpnp-power-on: Print system timestamp on Power key event
  regulator: core: Add sysfs node for debug
  pinctrl: msm: Add sysfs node for debug
  watchdog_v2: export watchdog trigger
  pinctrl: pinctrl-msm: do not dump unallocated GPIOs
  of: conditional status property
  arm64/dt add kpanic modules
  kernel:moto charger/battery driver enable
  config:battery 10k ntc enable
  guamp: input add touch support
  input add touch support
  kernel:JK50 NTC 10K report wrong temp
  arm/defconfig: update debug option
  defconfig: enable CONFIG_MEMCG config
  defconfig: bengal: Add moto defconfigs
  msm-poweroff: Store restart reason
  power: pmic-voter: Export Interfaces
  Do not build moto config while building MSI
  kernel/config: Add Moto ext_config feature
  soc: qcom: kconfig opt to build moto dtbs
  msm: kgsl: Zap performance counters across context switches
  msm: kgsl: Add a sysfs node to control performance counter reads
  soc: qcom: socinfo: Add soc information for KhajeP and KhajeQ
  spi: spi-msm-geni: Put device to suspend if PM status is active
  cnss2: Handle event processing after shutdown
  cfg80211: Add support to advertize OCV support
  i2c: i2c-msm-v2: Set frequency parameters to INT and validate
  drivers: thermal: validate cdev sysfs state request before using it
  USB: f_fs: Fix disconnect check during ongoing IO
  msm: diag: fix copyright
  diag: Validate the dci client before sending dci packet
  drivers: soc: qcom: Initialize blocking notifier as per lockdep
  usb: gadget: u_audio: fix race condition on endpoint stop
  usb: gadget: u_audio: Free requests only after callback
  defconfig: Enable usb peripheral audio on SXR2130
  msm: ADSPRPC: Fix to avoid Use after free in fastrpc_init_process
  clk: qcom: vdd-level: Update the vdd level for CX on Khaje
  msm: ipa3: Fix to validate the NAT table entries during NAT table init
  msm: synx: fix copyright
  clk: qcom: gpucc: Update the vdd level for CX on Khaje
  diag: Ensure dci entry is valid before sending the packet
  usb: pd: Process request message as soon as it is received
  mmc: sdhci-msm: Update the MGPI SW check to avoid irq timeout
  msm: kgsl: Perform cache flush on the pages obtained using get_user_pages()
  dfc: reset tx queue
  clk: qcom: gpucc: Add support for higher frequency for Khaje
  msm: ipa3: fix to cleanup the dma allocation
  clk: qcom: vdd-level: Update the VDD levels for Bengal/Khaje
  include: qcom,rpm-smd-regulator.h: Add SUPER_TURBO corner
  usb: gadget: qdss: Don't clear debug_inface_enabled upon unbind
  msm: adsprpc: Handle UAF in fastrpc debugfs read
  usb: gadget: f_hid: Fix unbind issues
  usb: gadget: f_uvc: Fix unbind issues
  msm: synx: remove synx handle details from logging
  clocksource/drivers/arm_arch_timer: Correct fault programming of CNTKCTL_EL1.EVNTI
  mmc: sdhci-msm: Ensure SD card power isn't ON when card removed
  msm: kgsl: Fix gpuaddr_in_range() to check upper bound
  clk: qcom: clk-alpha-pll: Update the steps to slew the Lucid PLL
  spi: spi-msm-geni: Protect from register access in suspend state
  spi: spi-msm-geni: Keep device to suspend if PM call fails
  regulator: qcom_pm8008-regulator: Avoid deadlock in OCP handling
  usb: gadget: f_uac1: Add support for UAC1 function
  tzlog: update struct to get normal and fatal diag logs
  firmware: qcom: Remove garbage characters from qsee log
  firmware: qcom: add enlarged qsee log support
  firmware: qcom: encrypted tz and qsee log support
  input: misc: qcom-power-on: Add support to log KPDPWR status
  tzlog: update struct to get normal and fatal diag logs
  firmware: qcom: Remove garbage characters from qsee log
  firmware: qcom: add enlarged qsee log support
  firmware: qcom: encrypted tz and qsee log support
  fs: crypto: Maintain reference count for class keys
  usb: pd: always log when state machine work is queued
  leds: qti-tri-led: remove LED_KEEP_TRIGGER flag
  usb: pd: add usbpd_dbg() in pd_send_msg()
  diag: Update log and event mask code ranges
  usb: gadget: Clear string index for RMNET
  drivers: usb: enable SET_REPORT through EP0 feature
  clk: qcom: debugcc: Remove gcc_pcnoc_mpu_cfg_ahb_clk for QM215
  clk: qcom: debugcc: Remove im_sleep/xo_div4 for QM215
  af_unix: fix garbage collect vs MSG_PEEK
  net: split out functions related to registering inflight socket files
  uapi: sound: add bt external sink delay parameter
  mhi: core: Increase RDDM timeout to 350ms
  msm: npu: remove asynchronous network execution support
  usb: max-3421: Prevent corruption of freed memory
  mmc: host: Add recovery_finish crypto vops
  seq_file: disallow extremely large seq buffer allocations
  dfc: hold wakelock while powersave timer is running
  diag: Avoid possible out of bound access while sending masks
  diag: Sanitize non-hdlc pkt length against buffer capacity
  diag: Allow DCI packets to be copied separately
  msm: gsi: Stop Channel support when in Flow Control State
  msm: kgsl: Signal fence only if last fence refcount was not put
  media: v4l2: Allow ioctl type of "U" for video devices like usb camera
  msm: adsprpc: Handle UAF in process shell memory
  cnss2: Check if firmware asserts before power off for CBC
  usb: gadget: cdev: Add single packet and dynamic buffer support for Rx path
  net: qrtr: Use radix_tree_iter_delete to delete tx flow
  ipa: Null persistent pointers after free
  net: qrtr: Cleanup flow control during DEL proc
  qdss_bridge: handle usb write done event
  net: qrtr: Cleanup flow control during remote socket release
  leds: qpnp-flash-v2: Add support for dynamic torch current update
  thermal: Update copyright info for ADC_TM driver
  net: qrtr: Converting DEL_PROC command to BYE command
  defconfig: Enable SPMI TEMP ALARM driver for SPF targets
  msm: ipa3: Fix to NULL terminate the header pointer in proc header table
  usb: dwc3: Prevent deadlock when wakeup happens through pwr event irq
  thermal: Read raw values for ADC_TM calibration channels
  qdss_bridge: fix stuck issue when driver remove
  media: uvcvideo: Use cached memory for USB transfers
  defconfig: Enable Novatek NT36xxx Touch for tron target
  cnss2: Dump PCIE SOC scratch registers along with mhi reg dumps
  ANDROID: mm: use raw seqcount variants in vm_write_*
  msm: kgsl: Update the IFPC power up reglist
  msm: ipa3: Add wait queue for the adpl
  msm: ipa3: Fix to unlock mutex before return
  cnss2: Update bound checks for sbl reg dumps to SRAM mem range
  cnss2: Fix the pbl log sram start address for QCA6490
  defconfig: arm: msm: 8937-Turn on coresight configs
  arm: msm: Add support for coresight etr for 32 bit
  soc: qcom: memory_dump: Support ETB/ETR register dump
  defconfig: arm64: msm: 8937-Turn on coresight configs
  drivers: thermal: Update a variable type in QMI encode logic
  BACKPORT: dma-buf: Move dma_buf_release() from fops to dentry_ops
  power: smb1398-charger: Toggle UVLO for Slave CP on USB removal
  msm: npu: handle system shutdown/reboot event properly
  dma-mapping-fast: Fix iova address leak with non-zero scatterlist offset
  net: qrtr: Change error logging in callback
  defconfig: Enable PMIC related configs for MSM8937_32
  defconfig: Enable PMIC related configs for MSM8937_64
  defconfig: Enable Charger/LED/RTC configs for MSM8937_32go
  power: linear-charger: Report the correct battery status at SOC=0
  power: charger/fg: Add charger/fg/bms drivers for QM215
  defconfig: Enable ADC thermal and SPMI configs for SPF targets
  thermal: Modify qpnp_adc_tm driver for IIO framework
  thermal: qpnp-adc: Add snapshot of qpnp-adc-tm driver
  msm: ipa3: Queue nop desc again if it fails
  diag: Drop packets to avoid memory exhaustion
  msm-ipa: fix use-after-free of rt_tbl
  net: qualcomm: rmnet: enable support for cksumv3
  serial: msm_geni_serial: Avoid port pointer access for earlyconsole case
  rpmsg: glink: Change error logging to avoid throttling
  USB: gadget: f_uvc: Enable more controls for CT and PU
  serial: msm_geni_serial: Reduce stale delay added in stop_rx_sequencer
  msm: kgsl: Add timeline traces
  msm: kgsl: Add software timelines
  serial: msm_geni_serial: Reduce stale delay added in stop_rx_sequencer
  usb: f_mtp: Limit MTP Tx req length to 16k for ChipIdea
  fuse: give wakeup hints to the scheduler
  wait: add wake_up_sync()
  msm: ipa: Fix to free up all pending EOB pages
  msm: kgsl: Add the user API definition for timelines
  Add support for new HSP version
  usb: dwc3: dwc3-msm: optimize perf vote work
  i2c: i2c-qcom-geni: Change the high and low time for SCL
  net: qrtr: fix a kernel-infoleak in qrtr_recvmsg()
  tty: Fix ->session locking
  msm: ipa3: increasing the uC interrupt timeout value
  msm: kgsl: Fix out of bound write in adreno_profile_submit_time
  diag: Update log and event mask code ranges
  soc: qcom: Set QOS only to silver cluster
  dwc3-msm: Move override usb speed functionality outside edev check
  cnss2: Update board data file name for certain RF chip ID
  platform: qpnp-revid: Add REVID support for PM8010
  regulator: qcom_pm8008-regulator: add support for PMIC PM8010
  regulator: qcom_pm8008: allow multiple PM8008 instances with unique names
  block: pm: Fix possible unbalanced nr_pending
  usb: f_mtp: Don't handle OS descriptors from MTP driver
  power: supply: qpnp-smb5: specify different ICL for QC2 9V/12V level
  phy: msm: usb: Check VBUS state before accessing registers in suspend
  phy: msm: usb: Fail suspend if psy_type is USB or USB_CDP
  USB: phy: msm: Apply DP pulse for CDP during bootup from sm_work
  msm: adsprpc: Allocate buffer taking NULL byte into consideration
  clk: qcom: debugcc: Remove the gcc_camss_camnoc clocks
  fbdev: msm: Avoid runtime sus/res for DP/HDMI
  uapi: Add UAPI headers for slatecom_interface driver
  soc: qcom: smsm: Add wakeup capable flags to SMSM IRQ
  f2fs: don't sleep while grabing nat_tree_lock
  Ignore -106 error while opening channel
  byte-cntr: Don't write csr register when byte-cntr is disabled
  arm64: defconfig: Set qrtr wakeup for lito
  net: qrtr: Make wakeup timeout configurable
  mhi: core: Avoid race condition mhi channel prepare and M0 event
  msm: synx: acquire ref of synx handle in each function
  msm: ipa3: Fix to handle zero length frag skb packet
  cnss_utils: Update the copyright years of file to 2017, 2019-2021
  FM: mutex changes modified
  Revert "qseecom: Add shmbrdige to allocate memory"
  Revert "ANDROID: net: ipv4: sysfs_net_ipv4: Add sysfs-based knobs for controlling TCP window size"
  Revert "RFC: ANDROID: net: ipv4: sysfs_net_ipv4: Fix TCP window size controlling knobs"
  ANDROID: xt_qtaguid: fix UAF race
  coresight: byte-cntr: Add ETR status check in bypass notifier
  clk: qcom: debugcc: Remove the gcc_camss_camnoc clocks
  usb: f_fs: Avoid invalid pointer access in ffs_fs_get_tree
  serial: msm_geni_serial: Enable SW flow on in runtime suspend
  defconfig: msm: Enable RPM SMD cooling device driver for KHAJE
  defconfig: Enable CONFIG_ION_SYSTEM_HEAP for bengal
  f2fs: fix the periodic wakeups of discard thread
  f2fs: allow to change discard policy based on cached discard cmds
  coresight: byte-cnter: limit error log output
  coresight: byte-cnter: Add ETR status check in bypass notifier
  msm: synx: fix synx_release_core race condition
  irqchip: mpm: Add mpm mapping for Khaje
  f2fs: change to use rwsem for cp_mutex
  cnss2: Assert on FW memory allocation failure
  msm: kgsl: Keep the context alive until its fences signal
  soc: qcom: secure_buffer: Fix the parameter passing to dmac_flush_range
  cnss_utils: Increase unsafe channel max num for 6G
  clk: qcom: gpucc: Update voltage fmax table for GPU clock for KHAJE
  msm: ipa3: Enable hardbyte limit for WAN consumer pipe
  dma-mapping-fast: Fix sg-list length calculation in fast_smmu_unmap_sg()
  qseecom: Add shmbrdige to allocate memory
  msm: kgsl: Use worker to put refcount on mem entry
  usb: phy: qusb: Add wrapper function for phy reset
  usb: pd: Clear vdm_tx if SVDM message is sent on SOP'
  drivers: thermal: virtual-sensor: Add new virtual sensor for MSM8917
  defconfig: Enable CONFIG_ION_SYSTEM_HEAP for bengal
  futex: Handle faults correctly for PI futexes
  f2fs: fix the periodic wakeups of discard thread
  f2fs: allow to change discard policy based on cached discard cmds
  futex: Simplify fixup_pi_state_owner()
  futex: Provide and use pi_state_update_owner()
  usb: phy: Reset PHY while disabling dpdm regulator
  futex: Replace pointless printk in fixup_owner()
  soc: qcom: smem: Update size of legacy partition
  USB: diag: Add check for ctxt in usb_diag_request_size()
  driver: Fix compilation error with new sdclang 12
  msm: ipa3: Changes to check disconnect in progress while sending data
  msm: adsprpc: Protect maps using map mutex
  USB: f_diag: Report Max request size as 16k for ChipIdea
  defconfig: Enable thermal emergency poweroff delay
  mmc: sdhci-msm: Switch to required pad voltage for vbias bypass
  mmc: sdhci-msm: Add vbias bypass specific hw WA flag
  Revert "mmc: sdhci-msm: Add support to vote for vdd io parent regulator"
  defconfig: kona: Add CONFIG_AQFWD for RB5 board
  clk: qcom: gpucc-khaje: Remove NOM_L1 fmax corner
  mmc: sdhci: Avoid dumping registers when SD card removed
  FM: Fix for no sound issue in FM Audio
  usb: gadget: Do not disconnect unregistered dev
  HID: add HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE for Gamevice devices
  defconfig: kona: Make configs required to pass CTS tests mandatory
  UPSTREAM: HID: playstation: Add DualSense player LED support
  UPSTREAM: HID: playstation: Add microphone mute support for DualSense
  UPSTREAM: HID: playstation: Add initial DualSense lightbar support
  UPSTREAM: HID: playstation: Fix unused variable in ps_battery_get_property
  UPSTREAM: HID: playstation: Fix array size comparison (off-by-one)
  BACKPORT: HID: playstation: Report DualSense hardware and firmware version
  UPSTREAM: HID: playstation: Add DualSense accelerometer and gyroscope
  BACKPORT: HID: playstation: Add DualSense classic rumble support
  msm: adsprpc: Lock list before removing node
  msm: pcie: Add ASM2806 PCIe device and vendor id
  TREAM: HID: playstation: Track devices in list
  UPSTREAM: HID: playstation: Add DualSense touchpad support
  UPSTREAM: HID: playstation: Add DualSense battery support
  UPSTREAM: HID: playstation: Add DualSense Bluetooth support
  UPSTREAM: HID: playstation: Use DualSense MAC address as unique identifier
  defconfig: arm64: msm: Enable CTI_SAVE_DISABLE for SDM660
  UPSTREAM: HID: playstation: Initial DualSense USB support
  defconfig: Enable smb1394 driver for khaje
  coresight-tmc-etr: remove mem_lock when call usb_qdss_close
  soc: qcom: socinfo: Add support for kona iot soc-id
  defconfig: sdm660: Add defconfig changes for camera
  usb: f_qdss: Flush connect_work in qdss close
  clk: qcom: gpucc: Update the post div ops for GPUCC PLL for KHAJE
  clk: qcom: clk-alpha-pll: Update implementation for Zonda PLL
  coresight: tmc: fix spinlock bad magic/usb_qdss_close
  scsi: ufs-qcom: fix the issue of get wrong ufs clk status from sysfs node
  futex: Ensure the correct return value from futex_lock_pi()
  defconfig: arm: msm: Enable debugcc config for SDM439
  dt-bindings: Add gpr header required for AR on kona
  clk: qcom: gpucc: Update the post div ops for GPUCC PLL for KHAJE
  clk: qcom: clk-alpha-pll: Update implementation for Zonda PLL
  drivers: thermal: Add support for RPM SMD cooling device
  diag: Avoid reallocating if buffer supports hdlc max pkt size
  mhi: core: Fix find_last_bit() usage
  diag: Update log and event mask code ranges
  drivers: rpmh: Always bug_on() upon timeout in rpmh_write_batch()
  clk: qcom: mdss: Fix flicker issue at early boot of kernel
  drivers: can: mcp25xxfd: Remove return 0 for void function
  Revert "kbuild: force to build vmlinux if CONFIG_MODVERSION=y"
  msm: ipa3: Enabling the HOLB on USB consumer pipe for APQ target
  soc: qcom: dcc: Avoid dcc_sram_writel overflow
  qxr-stdalonevwr: changes for oracle mic bias
  soc: qcom: dcc: Avoid huge memory allcation
  defconfig: msm8937_64: Update the defconfigs
  soc: qcom: dcc: Use sscanf instead of strlcpy
  power: qpnp-qg: Fix a DT property name
  mmc: host: OTA upgrade scenario support for multi fs combination
  drivers: cpuidle: lpm-levels: Correct missing list initialize
  serial: msm_geni_serial: Reset UART error code to default during shutdown
  serial: msm_geni_serial: Add Workqueue to dump the registers
  cnss2: Add code to do PCIe L2 suspend during shutdown
  pinctrl: Update reserved gpio list for Khaje
  config: enable dcc driver
  soc: qcom: dcc: Add snapshot of qcom-dcc driver
  serial: msm_geni_serial: Bailout from suspend if RX data is pending
  diag: Update log and event mask code ranges
  usb: f_fs: Free descriptors in func_unbind
  clk: qcom: alpha-pll: Update Alpha PLL width for Zonda PLL
  usb: gadget: f_rndis: Add 'wceis' flag to indicate 'Wireless' RNDIS
  clk: qcom: khaje: Update clock changes for GCC/GPUCC/DISPCC
  clk: qcom: cpu: Add support to L2 PC latency for SDM429/39
  clk: qcom: cpu-sdm: Add cpu clock driver for SDM439
  dt-bindings: clock: Add support for CPUCC clock ids for SDM439
  clk: qcom: Add LPM Latency support for CPU clocks
  clk: qcom: clk-pll: Add support for SPM event in PLL
  serial: msm_geni_serial: Reduce wait for transfer delay
  usb: f_fs: Avoid use-after-free of ffs_data
  include: uapi: Add support for 128x32 alignment of NV12
  defconfig: Enable refgen regulator driver for khaje
  clk: qcom: rcg2: Force enable the RCG before update for GFX
  mhi: core: Notify all mhi client's for PCIe link down recovery
  power: smblite: Fix max_limit_ma for smblite
  msm: ipa3: Fix to prevent Integer Overflow
  dcc_v2: Control the cti trigger of each link list individually
  msm: kgsl: Fix memory leak for anonymous buffers
  defconfig: Enable remaining defconfigs
  clk: qcom: debugcc: Add cpucc debugcc support for SDM439
  clk: qcom: gcc: Correct the frequencies in freq_tbl for SDM439
  clk: qcom: gcc: Add GPLL6 fixed factor support for qm215
  cnss2: Add code to notify mhi about link down
  defconfig: disable per-cgroup pressure tracking
  defconfig: arm64: msm: Enable MSM_DEBUG_LAR_UNLOCK for msm8937
  defconfig: arm: msm: Enable MSM_DEBUG_LAR_UNLOCK for msm8937
  soc: mem_dump: Enable MSM_DEBUG_LAR_UNLOCK for MSM8937
  defconfig: sdm660: Add missing coresight configs
  From bbfaa7d36c1eb465f120f2a3dfe25c1fe022195d Mon Sep 17 00:00:00 2001 From: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Date: Thu, 7 Mar 2019 07:51:09 +0800 Subject: [PATCH] ASoC: dpcm: prevent snd_soc_dpcm use after free
  soc: qcom: Return correct error code when program_key fails fails
  msm: ADSPRPC: Fix deadlock during SSR
  soc: qcom: bam_dmux: Skip disconnect call on bootup
  usb: dwc3: Use pwr_evt_irq to wakeup if dp/dm directly connected to GIC
  BACKPORT: cgroup: make per-cgroup pressure stall tracking configurable
  usb: dwc3-msm: Enable pwr_evt_irq for wakeup after LPM is done
  power: qpnp-qg: Add support to clear soh upon first profile load
  msm: kgsl: Make sure gpu-speed-bin-vectors has the correct size
  msm: kgsl: Add multiple fuses based speed bin
  Change the subprocess argument to fix the build issue
  include: uapi: Add QBG UAPI headers
  defconfig: Enable AW2016 LED driver for khaje
  clk: qcom: gcc: Add halt check for MSS clocks for SDM660
  msm: adsprpc: Handle UAF in process shell memory
  msm: camera: Add gpio based flash driver support
  leds: aw2016: update breath sysfs node name
  Use environment variable to find unifdef tool
  kernel_headers: Explicitly run headers_install under 'sh'
  dt-bindings: msm: Add bindings for flash type
  clk: qcom: mmcc: Change halt to halt_voted for SDM660
  msm: kgsl: Keep private intact until last refcount is put
  clk: qcom: khaje: Update freq_tbl and pll configurations
  defconfig: Enable power delivery on Khaje
  coresight-tmc-etr: Fix deadlock issue while switching mode
  defconfig: Enable memory cgroup config
  leds: add initial driver for AW2016 LED device
  pinctrl: Update PINCTRL macro definition for Khaje
  input: touchscreen: nt36xxx: Add Chip id and firmware
  ANDROID: Incremental fs: Set credentials before reading/writing
  pinctrl: Add wakeup GPIO register and bit information for khaje
  defconfig: khaje: Enable khaje pinctrl
  pinctrl: msm: add range of reserved gpio for Khaje
  defconfig: disable debug configs
  ANDROID: Incremental fs: fix up attempt to copy structures with READ/WRITE_ONCE
  mmc: cqhci: Handle cqhci crypto configurations correctly
  disp: uapi: drm: Add fsc format modifier
  Revert "clk: qcom: Add enable_safe_config for gfx3d_clk_src"
  mhi: core: Prevent doorbell with invalid tre
  msm: adsprpc: Remove bad ioctl log
  pinctrl: qcom: Add support for Khaje SoC pin control
  dt-bindings: msm: Add bindings for flash type
  msm: ipa: Fix array out of bound and use after NULL check
  msm: ipa: Fix to check only reset IPA stats can have data as NULL
  msm: ipa: Fix pointer checked for NULL may be used
  msm: kgsl: Remove sysfs entries after releasing memory
  msm: kgsl: Remove debugfs directory inside lock
  leds: led-class: Retain the latest user brightness request
  leds: led-class: add support for max_brightness store
  mmc: core: Add at least 3 mclk cycle delay before next command after ACMD41
  FM: Reduce high scan time
  soc: qcom: Add check to handle out of bound access
  defconfig: Enable CONFIG_MSM_TZ_LOG for 8937-perf
  HID: make arrays usage and value to be the same
  md: dm-default-key: Override dun value for selected bios
  defconfig: khaje: Add support for clock controllers
  clk: qcom: debugcc: Add support for Debugcc for KHAJE
  fbdev: msm: Avoid race condition while iommu mapping from DSI flow
  md: dm-default-key: Fix IV with set_dun flag defined
  cnss2: Log SW_CTRL GPIO value if PCIe link training fails
  diag: Update log and event mask code ranges
  camera: smmu: fix for incorrect populated sids
  msm: npu: Use spinlock for ipc write to avoid context switch
  msm: kgsl: Fix nr_removed calculation while reducing pools
  Avoid fatal error if ICE registers are not defined
  rpmsg: qcom_smd: Return error if receive callback is not present
  clk: qcom: dispcc: Add support for dispcc driver for KHAJE
  phy-msm-usb: Add mutex for protecting msm_otg_reset
  wil6210: Drop unicast sub frame if part of a multicast amsdu
  clk: qcom: gpucc: Add Graphics Clock controller for KHAJE
  clk: qcom: gcc-khaje: Add GCC support for KHAJE
  dt-bindings: clock: gcc-khaje: Add support for USB3 MUX and BCR
  msm: ipa3: Fix to change the tag process timeout value in cleanup
  usb: dt-bindings: Add USB QMP PHY registers definition for Khaje
  power: supply: smb1398-charger: disable WIN_OV deglitch for SMB1394
  serial: msm_geni_serial: Add ioctl for sending uart error codes to BT host
  defconfig: Enable SDM429 configs
  mmc: cmdq_hci: Notify sdhci for enhanced strobe
  mmc: sdhci-msm: Skip PWRSAVE_DLL setting for sdcc minor verion 0x4D
  clk: qcom: Add enable_safe_config for gfx3d_clk_src
  fbdev: msm: Increment commit count during null commit
  msm: mdss: clear fences in ESD panel dead scenario
  defconfig: Add HSUSB PHY configurations to Khaje
  defconfig: Enable SDM429 configs
  diag: Add debug logs while reading masks into userspace
  tty: serial: msm: Add suspend resume support
  defconfig: Enable config CONFIG_UTS_NS for msm8937_32
  f_uac2: increase number of requests to 32 for UAC2
  defconfig: Enable SDM429 configs
  USB: dwc3: gadget: Queue data for 16 micro frames ahead in future
  USB: uvc: Fix video quality issues for streaming video over USB
  USB: dwc3: gadget: Increase TX fifo size for isochronous endpoint
  power: smb1398: Add support for SMB1394
  clk: qcom: mdss: fix blank / un-blank issue for DSI 12nm pll
  msm: camera: Add reset logic for snps phy
  msm: ipa: Fix considering prefetch buf size when mapping
  usb_bam: Set default BAM type as DWC3 if not specified
  dt-bindings: clock: Add support for KHAJE clock ids
  msm: drm: uapi: add rounded corner uapi
  USB: gadget: f_uvc: Enable required controls for CT and PU
  vidc_3x: Change to avoid unloading firmware
  msm: camera: Update SDM439 csiphy driver
  ipa: Remove overwrite copy
  Add support for new comanche 1.3 soc ID
  wil6210: check integrity of received AMSDU packets
  wil6210: Drop plaintext frames on secure network
  wil6210: AP should not forward eapol packets
  netfilter: nf_conntrack_h323: lost .data_len definition for Q.931/ipv6
  vidc_3x: Use static table governor for bus voting
  usb: f_qdss: Avoid wait_for_completion if qdss_disable is called
  msm: ipa2: free the skb
  defconfig: Enable ARCH_KHAJE
  msm: Add initial support for Khaje in Kconfig platform
  soc: qcom: socinfo: Add soc information for khaje
  defconfig: Enable config CONFIG_DEBUG_FS for msm8937_64
  clk: qcom: clk-alpha-pll: Add support for FSM legacy mode
  sysfs: ufs-qcom: Add sysfs entries for flashpvl
  scsi: ufs-qcom: Add one vendor specific sysfs group
  msm: ipa3: Fix to copy num of rules from user space
  defconfig: remove CONFIG_SECURITY_PERF_EVENTS_RESTRICT
  msm: kgsl: Fix snapshot collection for ib1
  input: qti-haptics: ensure valid pointer when calling kfree
  msm: kgsl: Avoid flooding kernel log with invalid ioctl errors
  rpmsg: qcom_smd: Add check for remote state in send api
  msm: kgsl: Flush mem workqueue and retry if failed to find SVM region
  msm: camera: Update csiphy data rate
  icnss2: Add support for MHI state info
  soc: qcom: ssr: Enable the irqs before powering up subsystems
  icnss2: Add new ipc context to log smp2p related logs
  diag: Update log and msg mask code ranges
  ARM: defconfig: Enable config for msm8937_32go
  usb: gadget: f_cdev: Fix use after free of port in f_cdev
  defconfig: arm64: Enable CONFIG_HID_NINTENDO for QM215
  defconfig: arm: Enable CONFIG_HID_NINTENDO for QM215
  defconfig: Enable config for msm8937_32
  fbdev: msm: Handle rotator init failure correctly
  tty: Fix ->pgrp locking in tiocspgrp()
  max31760: add support for additional registers
  Revert "ANDROID: security,perf: Allow further restriction of perf_event_open"
  USB: composite: Increase the IN endpoint buffer allocation
  USB: f_fs: Avoid NULL pointer dereference during epfile_io()
  USB: gadget: f_fs: Allocate extra buffer for IN endpoint
  USB: f_serial/f_acm: Increase the IN endpoint buffer allocation
  USB: f_fs: Increase the IN endpoint buffer allocation
  leds: qpnp-flash-v2: Add support to control flash ramp time
  msm: vidc_3x: Correct the arguments type to align with format string
  msm: vidc_3x: correct the flags set for bus mode
  defconfig: msm8937_32: Disable BUILD_ARM64_APPENDED_DTB_IMAGE flag
  defconfig: msm8937_64: Disable BUILD_ARM64_APPENDED_DTB_IMAGE flag
  soc: qcom: pil: Reuse carveout region for mdt header
  clk: qcom: gcc: Change rate max values for SDM439
  defconfig: msm8937_32go: Disable BUILD_ARM64_APPENDED_DTB_IMAGE flag
  qseecom: Update correct parameters before sending to smcinvoke
  msm: ADSPRPC: Add extra checks for Unsigned request
  msm: camera: QM215 delay during power up sequence
  config: enable rmnet_data, msm_rmnet_bam driver
  msm: kgsl: Add A504 GPU support for SDM429
  defconfig: Enable MSM8937 and SDM439 config
  defconfig: Enable SDM439 config
  defconfig: Enable MSM8937 and SDM439 config
  defconfig: Enable default-key driver for msm8937_32
  defconfig: Enable default-key driver for msm8937_64
  defconfig: Add Radio_IRIS related config parameter
  defconfig: Add Radio_IRIS related config parameter
  cnss2: Add CNSS_BUS_EVENT to report bus info
  cnss2: Add update_uevent API to notify CNSS event
  rpmsg: qcom_smd: Ensure ordering of channel info updates
  defconfig: Enable WCNSS configs
  soc: qcom: bam_dmux: Abort open/close cmd during SSR
  diag: Use valid data_source for a valid token
  Add support for new HSP version
  mmc: sdio: Retune sdio after resume
  diag: Copy length and buffer locally to send to userspace client
  diag: Update log mask code ranges
  config: enable new rmnet_data driver
  regulator: qpnp-lcdb: Add n_voltages property for LCDB regulators
  spi: spi-geni-qcom: Set IOEB for MHI on SPI RX only case
  diag: Prevent out of bound write while sending dci pkt to remote
  drivers: rpmsg: fix to avoid dump stack in rpm-smd driver
  msm: kgsl: Enable content protection for A505 GPU
  serial: msm_geni_serial: Bypass Flow control lines from termios
  defconfig: Enable config for msm8937_64
  iommu/arm-smmu: add option to enable halt/resume of SMMU
  config: enable new rmnet_data driver
  usb: gadget: Add snapshot of USB RMNET Function driver
  extcon: Initialize blocking notifier while registering
  clk: qcom: gcc: Add GCC driver node support for SDM429
  icnss: Avoid qmi register/unregister in case of qmi failure
  icnss2: Avoid qmi register/unregister in case of qmi failure
  tcp: adjust rto_base in retransmits_timed_out()
  tcp: retry more conservatively on local congestion
  tcp: create a helper to model exponential backoff
  tcp: always set retrans_stamp on recovery
  tcp: address problems caused by EDT misshaps
  cnss2: Add sysfs support for configuring qtimer sync interval
  iommu/arm-smmu: Allocate non-coherent memory for secure pagetables
  defconfig: msm: Enable dm-snapshot for msm8937_32go
  defconfig: msm: Enable dm-snapshot for msm8937_32
  defconfig: msm: Enable dm-snapshot for msm8937_64
  clk: qcom: clk-pll: Round off req_rate in determine rate
  include: uapi: Add charger specific headers for QM215
  clk: qcom: smd-rpm: Add RPM-SMD clock support for SDM429
  defconfig: Enable USB BAM and SMD configs
  mhi: dev: netdev: Set the mac header to 0 for skbs
  msm: adsprpc: overflow vulnerability by race condition in adsprpc driver
  defconfig: Enable USB BAM and SMD configs
  defconfig: Enable default-key driver for msm8937_32go
  signal: Avoid corrupting si_pid and si_uid in do_notify_parent
  defconfig: Enable MDSS PLL for msm8937
  defconfig: Initial defconfig files for MSM8937_64
  ice: add return value for functions where ICE is disabled
  cnss2: Check for BT Enable GPIO in QCA6390
  soc: qcom: Enable  MSM_TZ_SMMU msm8937
  usb: gadget: Setup DMA ops for OTG's gadget devices
  fbdev: msm: Enable mdss rotator driver
  defconfig: Enable MDSS PLL config for msm8937_32
  defconfig: Add Radio_IRIS related config parameter
  cnss2: Use unified API to get RDDM and recovery timeouts
  cnss2: Add new API to get QMI related timeouts
  cnss2: Add support to populate device memory information
  iommu: Update function for ARM_MSM_SECURE io pagetable type
  Don't use gpio_free() for output gpios
  clk: qcom: gcc: Add gcc-mdss driver node support for QM215
  RPMSG driver changes for FM in msm-4.19
  defconfig: Enable USB BAM configs
  defconfig: Initial defconfig files for MSM8937_32
  cnss2: Add CNSS wrapper function for msm_pcie_reg_dump()
  clk: qcom: gcc: Add GPLL3 derived frequencies for qm215
  iio: spmi-vadc: Add option to specify scale-fn-type in devicetree
  iio: adc: spmi-vadc: Add adc support for SPF targets
  cfg80211: Adjust 6 GHz frequency to channel conversion
  iommu: Do not set COHERENT flag for secure pagetable allocation
  soc: qcom: smp2p: Add proper retrigger detection
  drivers: soc: qcom: Fix compilation errors
  clk: qcom: mdss: Update VCO Clk enums for mdss-dsi-28lpm
  dt-bindings: clock: Add mdss-28nm-pll-clk for legacy targets
  drivers: soc: qcom: Add bam dmux smem state handling
  net: ethernet: Add snapshot of RMNET BAM driver
  scsi: ufs: Fix IOCTL error checking for input buffer
  clk: qcom: mdss: fix blank / unblank for DSI 28nm pll
  soc: qcom: Add support for MSM_TZ_SMMU
  iommu/arm-smmu: Do not write to slave side protected context banks
  net/sched: fix race between deactivation and dequeue for NOLOCK qdisc
  uio: msm_sharedmem: By pass failure for hyp_assign_phys
  defconfig: enable PSI config for MSM8937_32go
  spmi: spmi-pmic-arb-debug: replace ioremap_resource with ioremap
  qcom-geni-se: Avoid dumping of GENI registers in console
  dm verity: skip verity work on I/O errors when system is shutting down
  Return Immediately if failed to set to reset gpio state
  msm: adsprpc: Clean DMA handles maps in case of  error
  diag: Prevent possible out of bound copy to userspace
  ARM: decompressor: avoid speculative prefetch from protected regions
  power: smb5-lib: Fix race conditions for typec power role
  msm: mdss: update the DSI 12nm PHY programming sequence
  msm: mdss: update the power down sequence for DSI 12nm PHY
  msm: ice: Fix stack-out-of-bound erros on kasan builds
  clk: qcom: debugcc: Add cpucc debugcc support for QM215
  msm: ipa: Fix use-after-free in ipa3_alloc_counter_id
  msm: ipa: correct the pointer in idr for FnR stats counter
  fbdev: msm: update event callback function to perform ESD check
  ANDROID: xt_qtaguid: Remove tag_entry from process list on untag
  clk: qcom: mdss: update dsi 12nm clock driver
  msm: ipa: fix race condition on PM vote on sys pipes
  msm: ipa3: Fix to null pointer access
  radio: iris: Add snapshot of iris FM radio support
  defconfig: Add WCNSS related config parameter
  wcnss: Update pm wake api's for 4.19 kernel
  qtee_shmbridge: update copyright
  diag: Update event and log mask code ranges
  arm-smmu: add bitmap for secure context banks
  iommu/arm-smmu: override writel_relaxed in smmu global address space
  qseecom: Add flush_work based on flag
  icnss2: Add handler for SMMU faults
  wcnss: Add wcnss snapshot to msm-4.19
  mm: cma: Print correct request pages
  defconfig: Add clock controller support for QM215
  clk: qcom: cpu-sdm: Add cpu clock driver for SDM
  dt-bindings: iio: Add scale function for QM215 batt therm
  platform: msm: Add USB BAM support to ChipIdea/RMNET
  leds: vibrator: Add snapshot of vibrator driver
  tty: serial: msm_geni_serial: Resolve race btw stop rx and cancel rx
  msm: kgsl: Access map_count only if entry is successfully allocated
  tty: serial: msm_geni_serial: Fix timeout for Rx abort
  defconfig: Enable chipidea USB controller configs
  msm: sde: Update rotator OT settings for sdm660
  msm: mdss: dsi: set backlight handle to NULL in error case
  clk: qcom: mdss: Add check to read the gdsc status
  msm: npu: Don't send interrupt if command has been consumed
  msm: ipa: Send actual DL flt rule length to Q6
  sde: rotator: use shared lock while accessing vbif
  clk: qcom: clk-pll: Add support for HF PLL Ops
  clk: qcom: Add enable/disable to clk_regmap_mux_div_ops
  clk: qcom: Update parent map to use parent_map struct
  qseecom: Update the error val check
  ARM: qcom: add board config support for sdm439 and sdm429
  ARM: qcom: Add board config support for msm8937
  Set the default slot for Full Disk Encryption key to 31
  msm: ipa: Enable wdi3 API in ipa3 config
  iio: ch101: Return -ENODEV when get expander GPIO failed
  USB: EHCI: Add MSM Host Controller driver
  usb: gadget: Add snapshot of ChipIdea driver
  usb: phy: Add snapshot of PHY msm usb driver
  qdss_bridge: fix kfree issue
  rpmsg: glink: do not break from interrupt handler
  msm: kgsl: Set correct values for SMMU protect register for A3xx
  clk: qcom: clk-debug: Add support to dump GDSC registers
  usb: dwc3: gadget: Prevent double free scenario for cancelled_list
  diag: Enable graceful transfer of transport
  diag: Enable diag over rpmsg communication for adsp
  drivers: char: Fix compilation error for smd pkt driver
  defconfig: msm: Enable smd pkt driver for QM215/SDM429/439
  clk: qcom: mdss: update mdss-dsi-28lpm clk names
  rtc: rtc-pm8xxx: add support for PM8916 RTC
  msm: mdss: Fix race condition while iommu mapping from DSI flow
  defconfig: enable MDSS PLL config for MSM8937_32go
  msm: ipa: fix potential race condition ioctls
  dt-bindings: clock: Add support for CPUCC clock ids for QM215
  Add support for new versions for BT chip
  smcinvoke: Update the correct parameters and result from qseecom
  misc: add qrc ioctl functions
  misc: add qrc_core and qrc_uart
  diag: Sanitize the mempools with pool data size check
  socinfo: Add socinfo support for sdm450
  socinfo: Add socinfo support for msm8953
  ARM: qcom: Add board config support for sdm450
  ARM: qcom: Add board config support for msm8953
  usb: dwc3: Enable parkmode for Gen1 controllers
  msm: camera: Fix for HFR120 crash while
  msm: gsi: Using kzalloc instead of devm_kzalloc
  clk: qcom: debugcc: Add debugcc support for QM215
  clk: qcom: gcc: Add support for GCC clock driver
  usb: f_diag: Replace ERROR with pr_err
  clk: qcom: mdss: add dsi phy 12nm clock
  dt-bindings: clock: Add 12nm clock device tree bindings
  rpmsg: qcom_smd: Add NO_SUSPEND flag for smd edge irq
  rpmsg: qcom_smd: Read data of size equal to fifo size
  rpmsg: qcom_smd: Read data of size greater than fifo size
  rpmsg: qcom_smd: Add ipc logging for smd driver
  msm: kgsl: Change start variable type to int in kgsl_iommu_add_global
  rpmsg: smd: Signal the TX channel that smd driver read data
  rpmsg: qcom_smd: Add GET/SET signal support
  rpmsg: qcom_smd: increase bounce buffer size
  drivers: rpmsg: Add smd driver module at post core init
  kona_defconfig: Enable hidraw config
  usb: misc: nb7vpq904m: update suspend and resume function
  msm: kgsl: Use pid struct to find the process to reclaim
  mm: process_reclaim: pass pid struct instead of tgid
  msm: kgsl: Change vma->vm_file to shmem file
  mm: process_reclaim: skip target_vma
  iio: qcom-rradc: Update logic to monitor health of RRADC peripheral
  cfg80211: export regulatory_hint_user() API
  msm: mdss: update MDSS DSI ULPS configuration
  fbdev: msm: call pxl clk unprepare during suspend
  msm: mdss: add support to handle LP_RX_TO/BTA_TO errors for DSI 12nm PHY
  msm: mdss: perform DSI PHY s/w reset for 12nm PHY during unblank
  msm: mdss: update the MDSS DSI ULPS exit sequence
  msm: mdss: add support to program of HSTX drivers for DSI 12nm PHY
  msm: mdss: update DSI ULPS entry/exit sequence
  msm: mdss: add support for DSI 12nm PHY in DSI driver
  net: qrtr: Excessive logging casuing boot failure
  defconfig: msm: enable thermal efuse driver for kona iot
  drivers: thermal: qcom: Add driver to modify thermal zone based on efuse
  mmc: core: Set cqe_enabled flag correctly
  serial: msm_geni_serial: Fix false warning for reset failure
  Kconfig: enable default config of cpu freq qcom for msm8953
  msm: Add initial support for sdm450 Kconfig platform
  msm: Add initial support for msm8953 Kconfig platform
  Revert "cnss2: Dump mhi debug regs on receiving mhi WAKE event cb"
  msm: pcie: Restore BME for RC after link_down recovery on SBR
  msm: ADSPRPC: Substitute vfs check with flags
  icnss: Allow register/unregister driver execution in serial manner
  drivers: char: reset signal support for smd channels
  drivers: char: add stream like read support
  crypto: Fix possible stack out-of-bound error
  drivers: irqchip: qcom: Add MSM8953 pin data for MPM
  defconfig: Enable EXT4 configs
  drivers: iio: enable compile for TDK sensor
  power: smb2: Enable read/writing of Type-C Rp value
  usb: gadget: f_mass_storage: Remove runtime async resume
  drivers: iio: add Makefile and Kconfig for TDK chirp sensor
  backlight: qcom-wled: Add "qcom,sync-dly" device tree property
  usb: dwc3: Issue ENDTRANSFER cmd on ep0 unconditionally
  coresight: disable the path when enable source link fail
  qcom: fg-memif: correct timeout condition for memory grant
  power: qpnp-fg-gen3: Add a property to reset FG BCL device
  power_supply: Add FG_RESET_CLOCK property
  qseecom: Check error when allocating coherent buffer
  defconfig: Enable CPR Regulator for msm8937go
  diag: Acquire spinlock for list delete operation
  rpm-smd: Remove redundant spinlocks which are not required
  regulator: qpnp-lcdb: Disable step voltage ramp for PM8150L V3
  power: smb5-lib: Query POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN
  defconfig: Enable Incremental FS support for msm8937_32go
  media/dvb: Deregister dma buffers fom shmbridge
  msm: kgsl: Show max gpu temperature
  USB: pd: Add support for enabling PD2.0 only as source
  usb: gadget: Clear transfer started flag if endxfer cmd times out
  backlight: qcom-spmi-wled: Change the SYNC toggle sequence
  USB: pd: Restart host mode in high speed if no usb3 & dp concurrency
  defconfig: Initial defconfig files for MSM8937_32go
  TDK-Robotics-RB5 drivers source code files
  diag: Update event and log mask code latest range
  clk: qcom: smd-rpm: Add RPM-SMD clock support for QM215
  fs: crypto: Add support for legacy pfk based FBE
  fastrpc : fastrpc porting for kernel 4.19 SPF targets
  qdss_bridge: fix memory leak issue
  bindings: clock: qcom: Add support for clock IDs for QM215
  drivers: char: msm_smd_pkt: Return error in case driver is not ready
  kernel: driver: Added support msm_smd_pkt driver
  dt-bindings: clock: Add support for GCC clock ids for SDM429
  wigig_sensing: treat data ready as deep sleep exit when needed
  usb: dwc3: gadget: Replace dev with its parent sysdev in ep_disable
  usb: dwc3: gadget: Check controller status with endpoint enable/disable
  coresight: Make coresight functions as inline
  cnss2: WAR to trigger self-recovery for link recover callback
  net: qrtr: Excessive logging casuing boot failure
  pinctrl: Add support for msm8917 pinctrl
  pinctrl: Add support for msm8937 pinctrl
  msm: pcie : Extend link recovery for config space access failure
  cnss_prealloc: Add a 128kB to prealloc pool
  rpmsg: qcom_smd: allow smd create device if remote state is closing
  usb: pd: Add support to disable pps capability
  nl80211: add error messages to nl80211_parse_chandef()
  cnss2: Increase prealloc table to satisfy latest driver requirement
  power: smb5-lib: Add additional check to exit charge-termination WA
  cnss2: Dump mhi debug registers on receiving mhi WAKE event cb
  msm:ADSPRPC :Fix to avoid Use after free in fastrpc_internal_munmap
  qseecom: Add boundary checks between two subsequent fields
  diag: Read from USB without holding spinlock
  serial:msm_geni_serial: Handling the cts counter in uart driver
  arm64: fix bootloader_memory_limit
  usb: phy: qusb2: Update tune value for host mode
  coresight: cti: Solve boot up issue
  cnss2: retry mhi suspend in case packets are pending in MHI layer
  clk: qcom: mdss: Enable mdss 28lpm pll driver
  msm: pcie : Notify client driver on reading FF's
  msm: kgsl: Use pid struct to find the process to reclaim
  mm: process_reclaim: pass pid struct instead of tgid
  msm: kgsl: Change vma->vm_file to shmem file
  qcom: step-chg-jeita: Add support for jeita fcc scaling
  mm: process_reclaim: skip target_vma
  mhi: core: Check PCIe link status before accessing MHI registers
  power: qpnp-smb5: Add DT option to enable JEITA-ARB handling
  power: smb5-lib: Improve the charge-termination WA handling
  msm: pci: print PCIE LTSSM state at DRV suspend and resume
  msm: kgsl: Deregister gpu address on memdesc_sg_virt failure
  diag: Handle drops for diag over rpmsg
  diag: Enable diag over rpmsg communication for modem
  diag: Enable diag over rpmsg communication for wcnss
  usb: gadget: gsi: Ensure the doorbell is blocked before suspend
  drivers: irqchip: qcom: Add MSM8937 pin data for MPM
  ARM: qcom: Add board config support for qm215
  soc: qcom: socinfo: Add supprot for QM215 QRD soc-id
  soc: qcom: socinfo: Add support for msm8917 soc-id
  soc: qcom: socinfo: add support for sdm429 and sdm439
  soc: qcom: socinfo: Add support for msm8937 soc-id
  arm/arm64: Kconfig: Add support for qm215
  ARM: qcom: Add board config support for msm8917
  arm64: Kconfig: Add ARCH_SDM439 and ARCH_SDM429 support
  arm64: Kconfig: Add support for msm8937 on msm-4.9
  msm: adsprpc: null pointer check for sctx
  regulator: qpnp-lcdb: fix race between SC interrupt and lcdb enable
  msm: kgsl: Protect the memdesc->gpuaddr in SVM use cases
  msm: kgsl: Stop using memdesc->usermem
  net: sch_generic: fix the missing new qdisc assignment
  usb: gadget: composite: Add spinlock protection for usb string descriptor
  msm: kgsl: add condition to check gpuhtw_llc support
  icnss: Add code to send qdss mode and sysfs interface for qdss
  icnss: Add code to downdload qdss trace config
  leds: qpnp-flash-v2: Fix out-of-bound array access
  mm: skip speculative path for non-anonymous COW faults
  ARM: msm: Add board config support for 32 bit bengal apq iot
  cnss2: Add code to fix a print error in update timestamp api
  icnss2: change to avoid device crash if RF card is not present
  mmc: sdhci-msm: read this reg IPCAT_MINOR_MASK to sdhc host
  pci: msm: Add support for linkdown recovery on hot reset
  net: qrtr: print error case for qrtr receive
  spi: spi-geni-qcom: Calculate transfer timeout dynamically
  spi: spi-geni-qcom: Configure DFS index and clk before doing set rate
  cnss2: Add delay for pci link training retries
  Revert "msm: kgsl: Add GPUCC register dumps to A6xx GPU snapshot"
  cnss2: Add code to handle idle-restart failure gracefully
  icnss2: Clear SMP2P data during SSR
  Revert "msm: kgsl: Add GPUCC register dumps to A6xx GPU snapshot"
  net: qualcomm: rmnet: memset before sending genl response
  diag: Add support for querying diagid for wpss subsystem
  wil6210: add ability to help debug tx latency
  regulator: cpr: add snapshot of cpr-regulator driver
  scsi: ufshcd: Fix double release of hba
  walt: Add window rollover trace event
  msm: kgsl: Correct the refcount on current process PID
  USB: gadget: Add support for superspeed plus for UAC2 & UVC
  serial: msm_geni_serial: Perform Abort sequence for cancel failure
  serial: msm_geni_serial: Correct start rx sequence
  serial: msm_geni_serial: Pull RFR before stop_rx for uart
  Revert "nl80211: fix non-split wiphy information"
  qseecom: use legacy command for slateapp
  USB: f_uac2: Update terminal types as mic and speaker
  defconfig: kona: Enable USB UVC drivers
  usb: gadget: f_uvc: Fix video streaming quality issues
  usb: gadget: f_uvc: Fix crash on disconnect/connect during streaming
  msm: npu: Prevent unpaired power vote/unvote via sysfs node
  qdss_bridge: fix use-after-free is on cdev_put
  defconfig: set CONFIG_HZ = 250 for Bengal
  USB: uvc_video: Check for return value before halt bulk endpoint
  USB: configfs: Clear deactivation flag in configfs_composite_unbind()
  msm: ADSPRPC: Add check to avoid out of bound scenario
  uapi: ipa: Support uc header proc ctx for DSCP insertion
  usb: dwc3: core: Destroy ipc log context on remove
  msm: ipa: add check to see if pm client is not NULL
  cnss2: Fix KW issues for pointer check and variable init
  ANDROID: vfs: d_canonical_path for stacked FS
  msm: ipa3: Add change to increase timeout value
  defconfig: arm64: msm: enable CONFIG_RB5_GPIOS_ENABLE
  msm: driver: Add driver to enable RB5 GPIOs
  msm: ADSPRPC: Reset debug buffer allocation check flag
  power: smb1355: Extend minoff-time and dead-time for SMB1355
  defconfig: arm64: msm: enable CONFIG_RB5_FAN_CONTROLLER
  msm: fan: Add driver to control fan on RB5
  HID: qvr: Remove device pointer on disconnect
  usb: gadget: uvc: Update frame size as per frame type
  usb: gadget: f_uvc: Fix incorrect frame indexing
  usb: gadget: uvc: Add support for UVC 1.5
  usb: gadget: Add support for UVC function
  f2fs: prepare a waiter before entering io_schedule
  f2fs: fix deadlock between quota writes and checkpoint
  cnss2: Add api to get pci reg dump for hang data
  power: smb1398-charger: Toggle UVLO-config on USB removal and shutdown
  msm: ipa3: Add support PM api in ipav3
  fs: crypto: support IV_INO_LBLK_32 for legacy (V1) format
  msm: ipa3: Fix to unmap LOW LAT consumer pipe buffers
  msm: pcie: Dump PCIe registers for hang event
  trace: Fix race in trace_open and buffer resize call
  msm: ipa4: Add change to stop netdev
  msm: fbdev: dp: send video notiification after audio teardown
  msm: kgsl: Poll a6x crashdumper register memory for status
  usb: dwc3-msm: Rectify 64 bit dma address programming for GSI
  msm: ADSPRPC: Enable ram dumps collection
  f2fs: should avoid inode eviction in synchronous path
  i3c: i3c-master-qcom-geni: Add HW and FW version read support
  msm: ipa3: Add check to validate rule_cnt
  i3c: i3c-master-qcom-geni: Manage driver suspend in late PM stage
  net: qrtr: Use cyclic idr allocator for port assignment
  mmc: core: change judgement for card busy detection
  msm: ADSPRPC: Handle third party applications
  msm:ipa4: Fix race condition
  msm: kgsl: Check for gmu prealloc failure only in case of prealloc request
  msm: ipa: Use kvfree instead of kfree
  scsi : ufs-qcom: Add provision to set qcom specific supplies in LPM
  fbdev: msm: update fb_release sequence
  mhi: core: Increase RSC credit to 10
  HID: qvr: wake up after acknowledgment from viewer
  icnss: Update FW_INIT_DONE QMI indication with hang event params
  wil6210: add max_mcs attribute
  cnss2: Check link status before setting wlaon_pwr_ctrl registers
  defconfig: arm64: msm: Enable USB RMNET & RNDIS using IPA over BAM2BAM
  msm: kgsl: Add apb_pclk to the clock list and increase max clock count
  usb: gadget: Add snapshot of USB RMNET Function driver
  drivers: soc: qcom: Add usb bam changes
  usb: gadget: f_qc_rndis: Add RNDIS support using IPA over BAM2BAM
  serial: msm_geni_serial: Add enable/disable of dma irq bits
  serial: msm_geni_serial: Don't queue the rx dma buffer in stop rx
  msm: kgsl: Allow I/O coherency on imported buffers if we can
  drivers: phy: ufs: Remove the condition check to calibrate UFS Phy
  Reverting usb changes
  defconfig: Sync with Android-4.19 configs
  clk: qcom: gcc: Update the halt flags for clocks on SDM660
  power: qpnp-qg: Expose CHARGE_COUNTER_SHADOW power supply property
  cnss2: Check for BT Enable GPIO in QCA6490 & QCA6390
  icnss2: Avoid race between soc wake release threads
  icnss2: Add code for SSR dump collection feature for moselle
  nl80211: fix NL80211_ATTR_HE_6GHZ_CAPABILITY usage
  cfg80211: Indicate support 6GHz band in kernel
  cfg80211: treat 6 GHz channels as valid regardless of capability
  cfg80211: require HE capabilities for 6 GHz band
  cfg80211: reject HT/VHT capabilities on 6 GHz band
  cfg80211: add and expose HE 6 GHz band capabilities
  cfg80211: handle 6 GHz capability of new station
  ieee80211: add HE ext EIDs and 6 GHz capability defines
  ieee80211: add code to obtain and parse 6 GHz operation field
  cfg80211: add a helper to identify 6 GHz PSCs
  cfg80211: adapt to new channelization of the 6GHz band
  cfg80211: fix 6 GHz frequencies to kHz
  ieee80211: update HE IEs to D4.0 spec
  mac80211: update HE IEs to D3.3
  mac80211: update HE operation fields to D3.0
  ieee80211: remove redundant leading zeroes
  iwlwifi: split HE capabilities between AP and STA
  netlink: add ethernet address policy types
  netlink: add NLA_REJECT policy type
  wireless: align to draft 11ax D3.0
  mac80211: Add he_capa debugfs entry
  cfg80211: express channels with a KHz component
  cfg80211: Add support for 60GHz band channels 5 and 6
  cfg80211: apply same mandatory rate flags for 5GHz and 6GHz
  cfg80211: ibss: use 11a mandatory rates for 6GHz band operation
  clk: qcom: gpucc: Add support for new clock frequency for Lagoon
  soc: qcom: minidump: Change the way to locate log_buf
  qcom-cpufreq: Removing lmh-dcvs parsing in ready callback
  usb: dwc3: msm: allow suspend in host mode
  icnss2: Add support for host triggered recovery
  Bluetooth: Implement a minimum off-time for AON discharge issue
  defconfig: sdm660: Enable CONFIG_HID_NINTENDO for sdm660
  defconfig: For support api_30 kernel changes
  defconfig: Sync  with Android-4.19 configs
  defconfig: Disable CRYPTO_MD4 config
  defconfig: Enable VETH config
  msm:adsprpc: Prevent use after free in fastrpc_set_process_info
  Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple"
  Correct the FM port numbers for Chk 3.x
  net/ipv4: always honour route mtu during forwarding
  usb: dwc3: Ensure blocking_sync waits until host mode starts or stops
  usb: dwc3: gadget: Fix double add due to cleanup_cancelled_request
  ANDROID: fuse: Add support for d_canonical_path
  ANDROID: vfs: add d_canonical_path for stacked filesystem support
  clk: qcom: clk-debug: Add support for debug clock API's
  cfg80211: use same IR permissive rules for 6GHz band
  cfg80211: add 6GHz in code handling array with NUM_NL80211_BANDS entries
  cfg80211: extend ieee80211_operating_class_to_band() for 6GHz
  cfg80211: util: add 6GHz channel to freq conversion and vice versa
  cfg80211: add 6GHz UNII band definitions
  nl80211: add 6GHz band definition to enum nl80211_band
  ANDROID: Temporarily disable XFRM_USER_COMPAT filtering
  msm: ipa3: Add debug logs to check unregister netdev completion time
  Revert "clk: Evict unregistered clks from parent caches"
  ANDROID: GKI: Enable DEBUG_INFO_DWARF4
  timekeeping/vsyscall: Prevent math overflow in BOOTTIME update
  UPSTREAM: mm/sl[uo]b: export __kmalloc_track(_node)_caller
  BACKPORT: xfrm/compat: Translate 32-bit user_policy from sockptr
  BACKPORT: xfrm/compat: Add 32=>64-bit messages translator
  UPSTREAM: xfrm/compat: Attach xfrm dumps to 64=>32 bit translator
  UPSTREAM: xfrm/compat: Add 64=>32-bit messages translator
  BACKPORT: xfrm: Provide API to register translator module
  ANDROID: Publish uncompressed Image on aarch64
  FROMLIST: crypto: arm64/poly1305-neon - reorder PAC authentication with SP update
  UPSTREAM: crypto: arm64/chacha - fix chacha_4block_xor_neon() for big endian
  UPSTREAM: crypto: arm64/chacha - fix hchacha_block_neon() for big endian
  msm: ipa: fix the use-after-free on qmi framework in ssr scenario
  fscrypt: Handle support for v1 encryption policy
  ANDROID: GKI: update the ABI xml
  spi: spi_qsd: Add ipc logging for spi driver
  qbt_handler: Memset userspace struct to zero
  drivers: soc: qcom: Port bam dmux driver
  drivers: soc: qcom: Add bam dmux driver support
  msm: kgsl: Compare pid pointer instead of TGID for a new process
  power: qpnp-smb5: Update legacy cable detection logic in bootup
  spi: spi_qsd: Add Shared EE property check for spi
  soc: qcom: Correct the module description for llcc-orchid
  usb: dwc3: core: Add ipc logs when sg lists are used
  icnss2: Send power save enter/exit via SMP2P
  ANDROID: clang: update to 11.0.5
  FROMLIST: arm64: link with -z norelro regardless of CONFIG_RELOCATABLE
  defconfig: Enable CONFIG_LEGACY_ENERGY_MODEL_DT for sdm660
  scsi: ufs: Increase fDeviceInit flag poll time to 5sec
  msm: pcie: update with link power on check for user PCIe resume
  scsi: ufs: Fix ufshcd_hold dead loop issue if error recovery is handing
  defconfig: arm64: msm: enable CONFIG_FORCE_ALLOC_FROM_DMA_ZONE
  ANDROID: GKI: enable CONFIG_WIREGUARD
  UPSTREAM: wireguard: peerlookup: take lock before checking hash in replace operation
  UPSTREAM: wireguard: noise: take lock when removing handshake entry from table
  UPSTREAM: wireguard: queueing: make use of ip_tunnel_parse_protocol
  UPSTREAM: net: ip_tunnel: add header_ops for layer 3 devices
  UPSTREAM: wireguard: receive: account for napi_gro_receive never returning GRO_DROP
  UPSTREAM: wireguard: device: avoid circular netns references
  UPSTREAM: wireguard: noise: do not assign initiation time in if condition
  UPSTREAM: wireguard: noise: separate receive counter from send counter
  UPSTREAM: wireguard: queueing: preserve flow hash across packet scrubbing
  UPSTREAM: wireguard: noise: read preshared key while taking lock
  UPSTREAM: wireguard: selftests: use newer iproute2 for gcc-10
  UPSTREAM: wireguard: send/receive: use explicit unlikely branch instead of implicit coalescing
  UPSTREAM: wireguard: selftests: initalize ipv6 members to NULL to squelch clang warning
  UPSTREAM: wireguard: send/receive: cond_resched() when processing worker ringbuffers
  UPSTREAM: wireguard: socket: remove errant restriction on looping to self
  UPSTREAM: wireguard: selftests: use normal kernel stack size on ppc64
  UPSTREAM: wireguard: receive: use tunnel helpers for decapsulating ECN markings
  UPSTREAM: wireguard: queueing: cleanup ptr_ring in error path of packet_queue_init
  UPSTREAM: wireguard: send: remove errant newline from packet_encrypt_worker
  UPSTREAM: wireguard: noise: error out precomputed DH during handshake rather than config
  UPSTREAM: wireguard: receive: remove dead code from default packet type case
  UPSTREAM: wireguard: queueing: account for skb->protocol==0
  UPSTREAM: wireguard: selftests: remove duplicated include <sys/types.h>
  UPSTREAM: wireguard: socket: remove extra call to synchronize_net
  UPSTREAM: wireguard: send: account for mtu=0 devices
  UPSTREAM: wireguard: receive: reset last_under_load to zero
  UPSTREAM: wireguard: selftests: reduce complexity and fix make races
  UPSTREAM: wireguard: device: use icmp_ndo_send helper
  UPSTREAM: wireguard: selftests: tie socket waiting to target pid
  UPSTREAM: wireguard: selftests: ensure non-addition of peers with failed precomputation
  UPSTREAM: wireguard: noise: reject peers with low order public keys
  UPSTREAM: wireguard: allowedips: fix use-after-free in root_remove_peer_lists
  UPSTREAM: net: skbuff: disambiguate argument and member for skb_list_walk_safe helper
  UPSTREAM: net: introduce skb_list_walk_safe for skb segment walking
  UPSTREAM: wireguard: socket: mark skbs as not on list when receiving via gro
  UPSTREAM: wireguard: queueing: do not account for pfmemalloc when clearing skb header
  UPSTREAM: wireguard: selftests: remove ancient kernel compatibility code
  UPSTREAM: wireguard: allowedips: use kfree_rcu() instead of call_rcu()
  UPSTREAM: wireguard: main: remove unused include <linux/version.h>
  UPSTREAM: wireguard: global: fix spelling mistakes in comments
  UPSTREAM: wireguard: Kconfig: select parent dependency for crypto
  UPSTREAM: wireguard: selftests: import harness makefile for test suite
  UPSTREAM: net: WireGuard secure network tunnel
  UPSTREAM: timekeeping: Boot should be boottime for coarse ns accessor
  UPSTREAM: timekeeping: Add missing _ns functions for coarse accessors
  UPSTREAM: icmp: introduce helper for nat'd source address in network device context
  UPSTREAM: crypto: poly1305-x86_64 - Use XORL r32,32
  UPSTREAM: crypto: curve25519-x86_64 - Use XORL r32,32
  UPSTREAM: crypto: arm/poly1305 - Add prototype for poly1305_blocks_neon
  UPSTREAM: crypto: arm/curve25519 - include <linux/scatterlist.h>
  UPSTREAM: crypto: x86/curve25519 - Remove unused carry variables
  UPSTREAM: crypto: x86/chacha-sse3 - use unaligned loads for state array
  UPSTREAM: crypto: lib/chacha20poly1305 - Add missing function declaration
  UPSTREAM: crypto: arch/lib - limit simd usage to 4k chunks
  UPSTREAM: crypto: arm[64]/poly1305 - add artifact to .gitignore files
  UPSTREAM: crypto: x86/curve25519 - leave r12 as spare register
  UPSTREAM: crypto: x86/curve25519 - replace with formally verified implementation
  UPSTREAM: crypto: arm64/chacha - correctly walk through blocks
  UPSTREAM: crypto: x86/curve25519 - support assemblers with no adx support
  UPSTREAM: crypto: chacha20poly1305 - prevent integer overflow on large input
  UPSTREAM: crypto: Kconfig - allow tests to be disabled when manager is disabled
  UPSTREAM: crypto: arm/chacha - fix build failured when kernel mode NEON is disabled
  UPSTREAM: crypto: x86/poly1305 - emit does base conversion itself
  UPSTREAM: crypto: chacha20poly1305 - add back missing test vectors and test chunking
  UPSTREAM: crypto: x86/poly1305 - fix .gitignore typo
  UPSTREAM: crypto: curve25519 - Fix selftest build error
  UPSTREAM: crypto: {arm,arm64,mips}/poly1305 - remove redundant non-reduction from emit
  UPSTREAM: crypto: x86/poly1305 - wire up faster implementations for kernel
  UPSTREAM: crypto: x86/poly1305 - import unmodified cryptogams implementation
  UPSTREAM: crypto: poly1305 - add new 32 and 64-bit generic versions
  UPSTREAM: crypto: lib/curve25519 - re-add selftests
  UPSTREAM: crypto: arm/curve25519 - add arch-specific key generation function
  UPSTREAM: crypto: chacha - fix warning message in header file
  UPSTREAM: crypto: arch - conditionalize crypto api in arch glue for lib code
  UPSTREAM: crypto: lib/chacha20poly1305 - use chacha20_crypt()
  UPSTREAM: crypto: x86/chacha - only unregister algorithms if registered
  UPSTREAM: crypto: chacha_generic - remove unnecessary setkey() functions
  UPSTREAM: crypto: lib/chacha20poly1305 - reimplement crypt_from_sg() routine
  UPSTREAM: crypto: chacha20poly1305 - import construction and selftest from Zinc
  UPSTREAM: crypto: arm/curve25519 - wire up NEON implementation
  UPSTREAM: crypto: arm/curve25519 - import Bernstein and Schwabe's Curve25519 ARM implementation
  UPSTREAM: crypto: curve25519 - x86_64 library and KPP implementations
  UPSTREAM: crypto: lib/curve25519 - work around Clang stack spilling issue
  UPSTREAM: crypto: curve25519 - implement generic KPP driver
  UPSTREAM: crypto: curve25519 - add kpp selftest
  UPSTREAM: crypto: curve25519 - generic C library implementations
  UPSTREAM: crypto: blake2s - x86_64 SIMD implementation
  UPSTREAM: crypto: blake2s - implement generic shash driver
  UPSTREAM: crypto: testmgr - add test cases for Blake2s
  UPSTREAM: crypto: blake2s - generic C library implementation and selftest
  UPSTREAM: crypto: mips/poly1305 - incorporate OpenSSL/CRYPTOGAMS optimized implementation
  UPSTREAM: crypto: arm/poly1305 - incorporate OpenSSL/CRYPTOGAMS NEON implementation
  i3c: i3c-master-qcom-geni: Handle timeout for DMA FSM reset
  UPSTREAM: crypto: arm64/poly1305 - incorporate OpenSSL/CRYPTOGAMS NEON implementation
  i3c: i3c-master-qcom-geni: Save master device info to debug list
  UPSTREAM: crypto: x86/poly1305 - expose existing driver as poly1305 library
  UPSTREAM: crypto: x86/poly1305 - depend on generic library not generic shash
  UPSTREAM: crypto: poly1305 - expose init/update/final library interface
  UPSTREAM: crypto: x86/poly1305 - unify Poly1305 state struct with generic code
  UPSTREAM: crypto: poly1305 - move core routines into a separate library
  UPSTREAM: crypto: chacha - unexport chacha_generic routines
  UPSTREAM: crypto: mips/chacha - wire up accelerated 32r2 code from Zinc
  UPSTREAM: crypto: mips/chacha - import 32r2 ChaCha code from Zinc
  UPSTREAM: crypto: arm/chacha - expose ARM ChaCha routine as library function
  UPSTREAM: crypto: arm/chacha - remove dependency on generic ChaCha driver
  UPSTREAM: crypto: arm/chacha - import Eric Biggers's scalar accelerated ChaCha code
  UPSTREAM: crypto: arm64/chacha - expose arm64 ChaCha routine as library function
  UPSTREAM: crypto: arm64/chacha - depend on generic chacha library instead of crypto driver
  UPSTREAM: crypto: arm64/chacha - use combined SIMD/ALU routine for more speed
  UPSTREAM: crypto: arm64/chacha - optimize for arbitrary length inputs
  UPSTREAM: crypto: x86/chacha - expose SIMD ChaCha routine as library function
  UPSTREAM: crypto: x86/chacha - depend on generic chacha library instead of crypto driver
  UPSTREAM: crypto: chacha - move existing library code into lib/crypto
  UPSTREAM: crypto: lib - tidy up lib/crypto Kconfig and Makefile
  UPSTREAM: crypto: chacha - constify ctx and iv arguments
  UPSTREAM: crypto: x86/poly1305 - Clear key material from stack in SSE2 variant
  i3c: i3c-master-qcom-geni: Log error if DMA mode fails
  defcong: sdm660 : Adding support to IPA driver
  msm: ipa: Add ipa rm support for ipa_v2
  UPSTREAM: crypto: xchacha20 - fix comments for test vectors
  UPSTREAM: crypto: xchacha - add test vector from XChaCha20 draft RFC
  UPSTREAM: crypto: arm64/chacha - add XChaCha12 support
  UPSTREAM: crypto: arm64/chacha20 - refactor to allow varying number of rounds
  UPSTREAM: crypto: arm64/chacha20 - add XChaCha20 support
  UPSTREAM: crypto: x86/chacha - avoid sleeping under kernel_fpu_begin()
  UPSTREAM: crypto: x86/chacha - yield the FPU occasionally
  UPSTREAM: crypto: x86/chacha - add XChaCha12 support
  UPSTREAM: crypto: x86/chacha20 - refactor to allow varying number of rounds
  UPSTREAM: crypto: x86/chacha20 - add XChaCha20 support
  UPSTREAM: crypto: x86/chacha20 - Add a 4-block AVX-512VL variant
  UPSTREAM: crypto: x86/chacha20 - Add a 2-block AVX-512VL variant
  UPSTREAM: crypto: x86/chacha20 - Add a 8-block AVX-512VL variant
  UPSTREAM: crypto: x86/chacha20 - Add a 4-block AVX2 variant
  UPSTREAM: crypto: x86/chacha20 - Add a 2-block AVX2 variant
  UPSTREAM: crypto: x86/chacha20 - Use larger block functions more aggressively
  UPSTREAM: crypto: x86/chacha20 - Support partial lengths in 8-block AVX2 variant
  UPSTREAM: crypto: x86/chacha20 - Support partial lengths in 4-block SSSE3 variant
  UPSTREAM: crypto: x86/chacha20 - Support partial lengths in 1-block SSSE3 variant
  msm: ipa3: Add low-level IPA client support
  net: support __alloc_skb to always use GFP_DMA
  msm: ipa2: Add changes compatible to kernel-4.19
  msm: ipa2: Add change to fix ipa padding
  msm: ipa: Add Kconfig changes of IPA2 driver
  msm: ipa2: Add changes compatible to kernel-4.14
  i3c: i3c-master-qcom-geni: Fix DMA and FIFO mode timeout scenario
  ANDROID: GKI: Enable CONFIG_USB_ANNOUNCE_NEW_DEVICES
  msm: ipa: Add support of IPA2 driver
  scsi: ufs: reomove Rst_N pulling up action in ufshcd_resume()
  serial: msm_geni_serial: Add new UART IPC log file in DMA mode
  serial: msm_geni_serial: Add delay for rx invalid transfer
  msm_geni_serial: Add ioctl for adding new IPC log in uart
  msm: kgsl: Don't allow re-importing memory owned by KGSL
  serial: msm_geni_serial: memset RX buffer to Zero
  icnss2: Avoid race between SOC WAKE REQ/RESP
  ANDROID: GKI: Enable CONFIG_X86_X2APIC
  i3c: i3c-master-qcom-geni: Manage probe time resources
  fbdev: msm: disable cpu sync during dma_buf_map_attachment
  scsi: ufs: Add back a missing sanity check to ufshcd_read_desc_param()
  icnss: check SKIP_QMI test bit for exported qmi messages
  ANDROID: move builds to use gas prebuilts
  i3c: i3c-master-qcom-geni: Force the xfer mode as DMA mode
  msm: ipa3: Fix to use proper clock timer
  i3c: i3c-master-qcom-geni: Fix IBI and Hot join related issues
  msm: ipa3: Add change to not reset HOLB timer
  UPSTREAM: binder: fix UAF when releasing todo list
  cnss2: Add support for PCIE gen switch
  FROMLIST: arm64: vdso32: Allow ld.lld to properly link the VDSO
  mmc: core: Fix clk scaling when card max freq below 50MHz
  msm: ipa3: Send enable force clear only for producer pipe
  sched/tune: Fix improper accounting of tasks
  usb: dwc3: Stop active transfer on control endpoints
  Add support for block disk encryption
  mmc: host: Use right parameter for ext4 plus eMMC
  mmc: host: reprogram the key to cover the invalid config case
  Fix OTA issue with vts fixes for new fbe framework
  msm: kgsl: Remove dev_err() from fenced write loop
  uapi: sound: Fix compilation error
  defconfig: msm: Enable FS related configs for Android R
  net:sockev: hold file reference till the sock event is sent
  net_sched: Add flow control support to prio qdisc
  msm: camera: Fix for memory leak
  defconfig: kona: Enable dm-crypt driver
  soc: qcom: Fix memcpy operations in ramdump_read
  md: dm-default-key: Use system sector size for SDHCI devices
  defconfig: msm: Enable CONFIG_STATIC_USERMODEHELPER for bengal_32
  fdt: Update CRC check for rng-seed
  usb: phy: snps: Enable auto resume feature only in host mode
  msm: ipa: Fix rndis client disconnection gracefully
  icnss: reject idle restart if wlan driver unregistered
  soc: qcom: Add LLCC driver for Orchid
  icnss2: Decrement soc wake ref count
  fbdev: msm: remove mappings before iommu detach
  clk: qcom: mdss: Update dfps data struct for FB targets
  usb: pd: Register typec partner in case AAA is connected
  binder: update low_latency selection for binder transactions
  sched/walt: Improve the scheduler
  msm: kgsl: Use regulator_is_enabled api when gpu-quirk-cx-gdsc is defined
  icnss2: Send enter power save after driver suspend
  mmc: host: Update HS400 timing mode before performing tuning
  defconfig: Enable CONFIG_UTS_NS for sdm660
  trace: f2fs: Fix kasan slab-out-of-bounds
  ANDROID: use arm-linux-androidkernel- for CROSS_COMPILE_COMPAT
  ANDROID: build.config.common: enable LLVM=1
  NFC: Add support for core init command
  icnss2: Fix race condition during SOC wake req/release
  msm: kgsl: Don't wait for room in context queue when context is invalidated
  dt-bindings: msm: Add bindings for MP limit fuse support
  fbdev: msm: set smmu cb domain attached during probe
  defconfig: enable SDE rotator
  mm/Kconfig: forcing allocators to return ZONE_DMA32 memory
  power: smb5: Fix LPD flag for PMI632
  ANDROID: GKI: prevent removal of monitored symbols
  firmware: qcom: Fix hyp_log issue
  soc: qcom: Fix smcinvoke_obj->fd assignment
  drm: increase max limit of drm open count to 128
  scsi: ufs: Fix unexpected values get from ufshcd_read_desc_param()
  usb: gadget: Don't giveback request if ep command times out
  icnss2: Avoid calibration during SSR of WCN6750
  ANDROID: Refresh ABI.xmls with libabigail 1.8.0-98bbf30d
  edac: improve gold CPU cache way parsing
  msm: kgsl: Update clk_set_rate() sequence for bimc_gpu_clk
  scsi: ufs: Fix ufs power down/on specs violation in suspend/resume path
  defconfig: msm: Enable CONFIG_STATIC_USERMODEHELPER for bengal_32
  fdt: Update CRC check for rng-seed
  defconfig: Enable blk-crypto-fallback to handle sw crypto request
  md: dm-default-key: Use system sector size for SDHCI devices
  msm: sde: rotator: enable sde rotator
  msm: pcie: provide client the ability to control PCIe target_link_speed
  qcom: qpnp-fg-gen3: Continue fg_gen3_probe() when !DEBUG_FS
  dcc_v2: fix 1 write 1 read register configuration fail issue
  leds: qpnp-flash-v2: Acquire the bms_psy handle at runtime
  regulator: qpnp-labibb: Don't handle LAB_VREG_OK in TTW mode for pmi8998
  regulator: qpnp-labibb: Add sysfs class to enable/disable the irq
  regulator: qpnp-lcdb: Disable the SC irq only for PM660L V1.1 and below
  regulator: qpnp-lcdb: Add sysfs class to enable/disable the irq
  cnss2: Enable self-recovery only when host driver detects linkdown
  ANDROID: drop KERNEL_DIR setting in build.config.common
  cnss2: Release qmi handle after server exit
  UPSTREAM: driver core: Avoid deferred probe due to fw_devlink_pause/resume()
  UPSTREAM: driver core: Rename dev_links_info.defer_sync to defer_hook
  UPSTREAM: driver core: Don't do deferred probe in parallel with kernel_init thread
  msm: cvp: Avoid releasing non-existent ARP buffer
  cnss_utils: Update wlfw power save enter/exit qmi message
  msm: mink: Fix copy_to_user issue
  crypto: Fix possible stack out of bound error
  mhi: core: Extend mhi_device_get_sync_atomic() for panic cases
  cnss2: Log a message after assert/de-assert WLAN_EN GPIO
  cnss2: Assert when power on retry reaches maximum
  usb: dwc3: gadget: Properly handle failed kick_transfer
  f2fs: remove blk_plugging in block_operations
  power: smblite-lib: Reduce the ICL immediately when flash is active
  qseecom: Propagate correct return value from TZ
  mmc: Remove unused code
  ANDROID: Refresh ABI.xmls with libabigail 1.8.0-1dca710a
  irqchip: gic-v3: Add support to get pending irqs
  serial: msm_geni_serial: Don't use WARN_ON for console uart
  mmc: core: Fix issue of no clk scaling upon previous scaling failure
  power: smb1390: Fix taper condition for VPH configuration
  cnss2: Change to add prints on link down callback
  dm-crypt: Skip encryption if bio is fscrypto or blk-crypto encrypted
  power: smblite-lib/smb5-lib: Add partner registration for microusb otg
  clk: qcom: rpmh: Update new clocks support on LitoMagnus
  arm: dma-mapping.c: add cpu sync in map_sg and unmap_sg
  defconfig: Enable blk-crypto-fallback to handle sw crypto request
  dt-bindings: clock: qcom: Add support for RPMH clocks
  msm: ipa4: fix the unclock gsi IPA register access
  clk: qcom: Add BIMC logging support during kernel panic
  dt-bindings: clock: Add support for BIMC clock
  usb: core: Don't wait for completion of urbs
  msm: kgsl: Enable process reclaim for A610
  fuse: fix page dereference after free
  msm: media: uapi: Redefine NV12 format with different alignment
  sched/walt: Fix a potential accounting issue during window size change
  UPSTREAM: arm64: vdso: Build vDSO with -ffixed-x18
  mhi: core: Add checks for bhie offsets
  ANDROID: KMI symbol lists: migrate section name
  usb: phy: qusb: Set the voltage to regulator according to soc capacity
  cnss2: Collect shadow registers for RDDM scenario
  mm: slub: Add debugfs interface to capture slub allocs owner
  msm: kgsl: Don't skip gmufw preallocations during firmware read
  icnss2: Export API to host driver to exit power save
  msm: ipa: stay in NAPI mode when default pipe has low credits
  vidc_3x: Fix crash in user build
  msm: mink: Fix copy_to_user issue
  msm: ipa: update the iommu mapping for WDI rings
  mmc: Port changes for supporting SDIO functionality to 4.19 kernel
  ANDROID: ABI: refresh with latest libabigail 94f5d4ae
  ...

 Conflicts:
	.gitignore
	Documentation/arm64/tagged-address-abi.rst
	Makefile
	android/abi_gki_aarch64
	android/abi_gki_aarch64.xml
	android/abi_gki_aarch64_cuttlefish
	android/abi_gki_aarch64_qcom
	arch/Kconfig
	arch/arm/Kconfig
	arch/arm/configs/vendor/msm8937-perf_defconfig
	arch/arm/configs/vendor/msm8937_32go-perf_defconfig
	arch/arm/configs/vendor/msm8937_32go_defconfig
	arch/arm/configs/vendor/msm8937_defconfig
	arch/arm/crypto/curve25519-core.S
	arch/arm/crypto/poly1305-glue.c
	arch/arm64/Kconfig
	arch/arm64/boot/dts/vendor/bindings/bus/ti-sysc.txt
	arch/arm64/boot/dts/vendor/bindings/display/mediatek/mediatek,dpi.txt
	arch/arm64/boot/dts/vendor/bindings/iio/multiplexer/io-channel-mux.txt
	arch/arm64/boot/dts/vendor/bindings/net/fsl-fman.txt
	arch/arm64/boot/dts/vendor/bindings/sound/wm8994.txt
	arch/arm64/boot/dts/vendor/bindings/usb/dwc3.txt
	arch/arm64/configs/gki_defconfig
	arch/arm64/configs/vendor/bengal-perf_defconfig
	arch/arm64/configs/vendor/bengal_defconfig
	arch/arm64/configs/vendor/kona-perf_defconfig
	arch/arm64/configs/vendor/kona_defconfig
	arch/arm64/configs/vendor/lito-perf_defconfig
	arch/arm64/configs/vendor/lito_defconfig
	arch/arm64/configs/vendor/sdm660-perf_defconfig
	arch/arm64/configs/vendor/sdm660_defconfig
	arch/arm64/crypto/poly1305-glue.c
	arch/arm64/include/asm/alternative.h
	arch/arm64/include/asm/cpucaps.h
	arch/arm64/include/asm/cputype.h
	arch/arm64/include/asm/lse.h
	arch/arm64/include/asm/vdso/compat_barrier.h
	arch/arm64/include/asm/vdso/compat_gettimeofday.h
	arch/arm64/kernel/asm-offsets.c
	arch/arm64/kernel/cpu_errata.c
	arch/arm64/kernel/vdso.c
	arch/arm64/kernel/vdso/Makefile
	arch/arm64/kernel/vdso32/Makefile
	arch/arm64/mm/mmu.c
	arch/mips/crypto/Makefile
	arch/mips/crypto/poly1305-glue.c
	arch/mips/vdso/Makefile
	arch/x86/configs/gki_defconfig
	arch/x86/crypto/Makefile
	arch/x86/crypto/blake2s-glue.c
	arch/x86/crypto/poly1305_glue.c
	arch/x86/include/asm/vgtod.h
	arch/x86/kernel/cpu/common.c
	build.config.aarch64
	build.config.common
	build.config.gki_kasan
	build.config.x86_64
	crypto/Kconfig
	crypto/Makefile
	crypto/blake2s_generic.c
	crypto/testmgr.c
	crypto/testmgr.h
	drivers/android/binder_internal.h
	drivers/android/binderfs.c
	drivers/base/core.c
	drivers/base/power/wakeup_stats.c
	drivers/block/loop.c
	drivers/char/Kconfig
	drivers/char/adsprpc.c
	drivers/char/diag/diagfwd_peripheral.c
	drivers/char/random.c
	drivers/clk/qcom/clk-debug.c
	drivers/crypto/msm/qcedev.c
	drivers/devfreq/governor_gpubw_mon.c
	drivers/dma-buf/dma-buf.c
	drivers/firmware/qcom/tz_log.c
	drivers/gpu/drm/drm_connector.c
	drivers/gpu/drm/drm_mipi_dsi.c
	drivers/gpu/drm/drm_prime.c
	drivers/gpu/drm/virtio/virtgpu_ioctl.c
	drivers/gpu/msm/adreno_debugfs.c
	drivers/gpu/msm/kgsl.c
	drivers/gpu/msm/kgsl_device.h
	drivers/gpu/msm/kgsl_drawobj.c
	drivers/gpu/msm/kgsl_pool.c
	drivers/gpu/msm/kgsl_pwrctrl.c
	drivers/gpu/msm/kgsl_pwrctrl.h
	drivers/gpu/msm/kgsl_reclaim.c
	drivers/gpu/msm/kgsl_sharedmem.c
	drivers/gpu/msm/kgsl_timeline.c
	drivers/hid/hid-ids.h
	drivers/hid/hid-quirks.c
	drivers/hwtracing/coresight/coresight-etm-perf.c
	drivers/hwtracing/coresight/coresight-etm4x.c
	drivers/hwtracing/coresight/coresight-etm4x.h
	drivers/hwtracing/coresight/coresight-tmc-etr.c
	drivers/i2c/busses/i2c-qcom-geni.c
	drivers/md/dm-crypt.c
	drivers/md/dm-table.c
	drivers/md/dm-verity-target.c
	drivers/media/platform/msm/sde/rotator/sde_rotator_sync.c
	drivers/media/platform/msm/synx/synx.c
	drivers/media/platform/msm/synx/synx_debugfs.c
	drivers/media/platform/msm/synx/synx_util.c
	drivers/misc/Kconfig
	drivers/misc/Makefile
	drivers/misc/qseecom.c
	drivers/mmc/core/Kconfig
	drivers/mmc/core/block.c
	drivers/mmc/host/cqhci-crypto-qti.c
	drivers/mmc/host/sdhci-msm.c
	drivers/mmc/host/sdhci.c
	drivers/net/Kconfig
	drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
	drivers/net/wireguard/Makefile
	drivers/net/wireguard/allowedips.c
	drivers/net/wireguard/allowedips.h
	drivers/net/wireguard/device.c
	drivers/net/wireguard/device.h
	drivers/net/wireguard/main.c
	drivers/net/wireguard/peer.c
	drivers/net/wireguard/peer.h
	drivers/net/wireguard/queueing.c
	drivers/net/wireguard/queueing.h
	drivers/net/wireguard/ratelimiter.c
	drivers/net/wireguard/receive.c
	drivers/net/wireguard/selftest/allowedips.c
	drivers/net/wireguard/send.c
	drivers/net/wireguard/socket.c
	drivers/net/wireless/cnss2/pci.c
	drivers/net/wireless/mac80211_hwsim.c
	drivers/of/platform.c
	drivers/of/property.c
	drivers/pinctrl/qcom/pinctrl-khaje.c
	drivers/platform/msm/ipa/ipa_v3/ipa.c
	drivers/platform/msm/ipa/ipa_v3/ipa_client.c
	drivers/platform/msm/ipa/ipa_v3/ipa_qmi_service.c
	drivers/power/supply/power_supply_sysfs.c
	drivers/power/supply/qcom/Makefile
	drivers/power/supply/qcom/qg-reg.h
	drivers/power/supply/qcom/qpnp-qg.c
	drivers/power/supply/qcom/qpnp-smb5.c
	drivers/power/supply/qcom/smb1398-charger.c
	drivers/power/supply/qcom/smb5-lib.c
	drivers/scsi/ufs/ufshcd-crypto.c
	drivers/soc/qcom/crypto-qti-tz.c
	drivers/soc/qcom/icnss2/qmi.c
	drivers/soc/qcom/icnss_private.h
	drivers/soc/qcom/qmi_rmnet.c
	drivers/soc/qcom/qmi_rmnet_i.h
	drivers/soc/qcom/smcinvoke.c
	drivers/soc/qcom/socinfo.c
	drivers/soc/qcom/subsys-pil-tz.c
	drivers/spi/spi-geni-qcom.c
	drivers/staging/android/ion/ion.c
	drivers/tty/serial/msm_geni_serial.c
	drivers/usb/dwc3/dwc3-msm.c
	drivers/usb/dwc3/gadget.c
	drivers/usb/dwc3/gadget.h
	drivers/usb/gadget/composite.c
	drivers/usb/gadget/function/f_fs.c
	drivers/usb/gadget/function/f_hid.c
	drivers/usb/gadget/function/f_uac1.c
	drivers/usb/misc/ssusb-redriver-nb7vpq904m.c
	drivers/usb/musb/Kconfig
	drivers/usb/musb/mediatek.c
	drivers/usb/pd/policy_engine.c
	drivers/usb/phy/phy-msm-qusb.c
	drivers/usb/typec/bus.c
	drivers/usb/typec/mux.c
	drivers/video/fbdev/msm/mdss_sync.c
	fs/crypto/fscrypt_private.h
	fs/crypto/inline_crypt.c
	fs/crypto/keysetup.c
	fs/crypto/policy.c
	fs/ext4/dir.c
	fs/ext4/ext4.h
	fs/ext4/hash.c
	fs/ext4/namei.c
	fs/ext4/page-io.c
	fs/f2fs/super.c
	fs/incfs/data_mgmt.h
	fs/incfs/main.c
	fs/incfs/vfs.c
	include/crypto/blake2s.h
	include/crypto/chacha.h
	include/crypto/internal/blake2s.h
	include/crypto/internal/poly1305.h
	include/crypto/poly1305.h
	include/drm/drm_mipi_dsi.h
	include/linux/android_kabi.h
	include/linux/bits.h
	include/linux/diagchar.h
	include/linux/dma-buf.h
	include/linux/icmpv6.h
	include/linux/ipv6.h
	include/linux/page-flags-layout.h
	include/linux/power_supply.h
	include/linux/random.h
	include/linux/sched.h
	include/linux/usb/gadget.h
	include/net/icmp.h
	include/net/ndisc.h
	include/net/sock.h
	include/soc/qcom/icnss.h
	include/soc/qcom/socinfo.h
	include/trace/events/f2fs.h
	include/trace/events/random.h
	include/uapi/linux/android/binderfs.h
	include/uapi/linux/v4l2-controls.h
	include/uapi/linux/virtio_ids.h
	include/uapi/media/msm_camsensor_sdk.h
	include/uapi/media/msm_media_info.h
	include/vdso/bits.h
	include/vdso/datapage.h
	kernel/bpf/helpers.c
	kernel/cgroup/cgroup.c
	kernel/fork.c
	kernel/futex.c
	kernel/panic.c
	kernel/power/wakelock.c
	kernel/sched/core.c
	kernel/sched/cpufreq_schedutil.c
	kernel/sched/sched.h
	kernel/sched/topology.c
	kernel/sched/walt.h
	kernel/time/vsyscall.c
	lib/Kconfig.kasan
	lib/crypto/Kconfig
	lib/crypto/Makefile
	lib/crypto/blake2s-generic.c
	lib/crypto/blake2s-selftest.c
	lib/crypto/blake2s.c
	lib/crypto/poly1305-donna32.c
	lib/crypto/poly1305-donna64.c
	lib/crypto/poly1305.c
	lib/strnlen_user.c
	lib/test_meminit.c
	lib/test_stackinit.c
	mm/kasan/common.c
	mm/page_alloc.c
	mm/page_io.c
	net/core/filter.c
	net/ipv4/icmp.c
	net/ipv6/ip6_icmp.c
	net/sctp/input.c
	net/unix/scm.c
	net/wireless/core.c
	net/xfrm/xfrm_compat.c
	net/xfrm/xfrm_state.c
	net/xfrm/xfrm_user.c
	scripts/adjust_autoksyms.sh
	scripts/generate_initcall_order.pl
	scripts/setlocalversion
	scripts/tools-support-relr.sh
	security/Kconfig.hardening
	security/selinux/hooks.c
	security/selinux/include/classmap.h
	security/selinux/include/security.h
	security/selinux/nlmsgtab.c
	security/selinux/ss/mls.c
	security/selinux/ss/policydb.c
	security/selinux/ss/policydb.h
	security/selinux/ss/services.c
	tools/testing/selftests/wireguard/netns.sh
	tools/testing/selftests/wireguard/qemu/kernel.config

Change-Id: I5992ee11f94595fd75ea4cf60b15fe7eee0f28ad
2023-04-16 05:24:49 +03:00

2158 lines
52 KiB
C

/*
* linux/mm/vmstat.c
*
* Manages VM statistics
* Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
*
* zoned VM statistics
* Copyright (C) 2006 Silicon Graphics, Inc.,
* Christoph Lameter <christoph@lameter.com>
* Copyright (C) 2008-2014 Christoph Lameter
*/
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/cpu.h>
#include <linux/cpumask.h>
#include <linux/vmstat.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/debugfs.h>
#include <linux/sched.h>
#include <linux/math64.h>
#include <linux/writeback.h>
#include <linux/compaction.h>
#include <linux/mm_inline.h>
#include <linux/page_ext.h>
#include <linux/page_owner.h>
#include "internal.h"
#define NUMA_STATS_THRESHOLD (U16_MAX - 2)
#ifdef CONFIG_NUMA
int sysctl_vm_numa_stat = ENABLE_NUMA_STAT;
/* zero numa counters within a zone */
static void zero_zone_numa_counters(struct zone *zone)
{
int item, cpu;
for (item = 0; item < NR_VM_NUMA_STAT_ITEMS; item++) {
atomic_long_set(&zone->vm_numa_stat[item], 0);
for_each_online_cpu(cpu)
per_cpu_ptr(zone->pageset, cpu)->vm_numa_stat_diff[item]
= 0;
}
}
/* zero numa counters of all the populated zones */
static void zero_zones_numa_counters(void)
{
struct zone *zone;
for_each_populated_zone(zone)
zero_zone_numa_counters(zone);
}
/* zero global numa counters */
static void zero_global_numa_counters(void)
{
int item;
for (item = 0; item < NR_VM_NUMA_STAT_ITEMS; item++)
atomic_long_set(&vm_numa_stat[item], 0);
}
static void invalid_numa_statistics(void)
{
zero_zones_numa_counters();
zero_global_numa_counters();
}
static DEFINE_MUTEX(vm_numa_stat_lock);
int sysctl_vm_numa_stat_handler(struct ctl_table *table, int write,
void __user *buffer, size_t *length, loff_t *ppos)
{
int ret, oldval;
mutex_lock(&vm_numa_stat_lock);
if (write)
oldval = sysctl_vm_numa_stat;
ret = proc_dointvec_minmax(table, write, buffer, length, ppos);
if (ret || !write)
goto out;
if (oldval == sysctl_vm_numa_stat)
goto out;
else if (sysctl_vm_numa_stat == ENABLE_NUMA_STAT) {
static_branch_enable(&vm_numa_stat_key);
pr_info("enable numa statistics\n");
} else {
static_branch_disable(&vm_numa_stat_key);
invalid_numa_statistics();
pr_info("disable numa statistics, and clear numa counters\n");
}
out:
mutex_unlock(&vm_numa_stat_lock);
return ret;
}
#endif
#ifdef CONFIG_VM_EVENT_COUNTERS
DEFINE_PER_CPU(struct vm_event_state, vm_event_states) = {{0}};
EXPORT_PER_CPU_SYMBOL(vm_event_states);
static void sum_vm_events(unsigned long *ret)
{
int cpu;
int i;
memset(ret, 0, NR_VM_EVENT_ITEMS * sizeof(unsigned long));
for_each_online_cpu(cpu) {
struct vm_event_state *this = &per_cpu(vm_event_states, cpu);
for (i = 0; i < NR_VM_EVENT_ITEMS; i++)
ret[i] += this->event[i];
}
}
/*
* Accumulate the vm event counters across all CPUs.
* The result is unavoidably approximate - it can change
* during and after execution of this function.
*/
void all_vm_events(unsigned long *ret)
{
get_online_cpus();
sum_vm_events(ret);
put_online_cpus();
}
EXPORT_SYMBOL_GPL(all_vm_events);
/*
* Fold the foreign cpu events into our own.
*
* This is adding to the events on one processor
* but keeps the global counts constant.
*/
void vm_events_fold_cpu(int cpu)
{
struct vm_event_state *fold_state = &per_cpu(vm_event_states, cpu);
int i;
for (i = 0; i < NR_VM_EVENT_ITEMS; i++) {
count_vm_events(i, fold_state->event[i]);
fold_state->event[i] = 0;
}
}
#endif /* CONFIG_VM_EVENT_COUNTERS */
/*
* Manage combined zone based / global counters
*
* vm_stat contains the global counters
*/
atomic_long_t vm_zone_stat[NR_VM_ZONE_STAT_ITEMS] __cacheline_aligned_in_smp;
atomic_long_t vm_numa_stat[NR_VM_NUMA_STAT_ITEMS] __cacheline_aligned_in_smp;
atomic_long_t vm_node_stat[NR_VM_NODE_STAT_ITEMS] __cacheline_aligned_in_smp;
EXPORT_SYMBOL(vm_zone_stat);
EXPORT_SYMBOL(vm_numa_stat);
EXPORT_SYMBOL(vm_node_stat);
#ifdef CONFIG_SMP
int calculate_pressure_threshold(struct zone *zone)
{
int threshold;
int watermark_distance;
/*
* As vmstats are not up to date, there is drift between the estimated
* and real values. For high thresholds and a high number of CPUs, it
* is possible for the min watermark to be breached while the estimated
* value looks fine. The pressure threshold is a reduced value such
* that even the maximum amount of drift will not accidentally breach
* the min watermark
*/
watermark_distance = low_wmark_pages(zone) - min_wmark_pages(zone);
threshold = max(1, (int)(watermark_distance / num_online_cpus()));
/*
* Maximum threshold is 125
*/
threshold = min(125, threshold);
return threshold;
}
int calculate_normal_threshold(struct zone *zone)
{
int threshold;
int mem; /* memory in 128 MB units */
/*
* The threshold scales with the number of processors and the amount
* of memory per zone. More memory means that we can defer updates for
* longer, more processors could lead to more contention.
* fls() is used to have a cheap way of logarithmic scaling.
*
* Some sample thresholds:
*
* Threshold Processors (fls) Zonesize fls(mem+1)
* ------------------------------------------------------------------
* 8 1 1 0.9-1 GB 4
* 16 2 2 0.9-1 GB 4
* 20 2 2 1-2 GB 5
* 24 2 2 2-4 GB 6
* 28 2 2 4-8 GB 7
* 32 2 2 8-16 GB 8
* 4 2 2 <128M 1
* 30 4 3 2-4 GB 5
* 48 4 3 8-16 GB 8
* 32 8 4 1-2 GB 4
* 32 8 4 0.9-1GB 4
* 10 16 5 <128M 1
* 40 16 5 900M 4
* 70 64 7 2-4 GB 5
* 84 64 7 4-8 GB 6
* 108 512 9 4-8 GB 6
* 125 1024 10 8-16 GB 8
* 125 1024 10 16-32 GB 9
*/
mem = zone->managed_pages >> (27 - PAGE_SHIFT);
threshold = 2 * fls(num_online_cpus()) * (1 + fls(mem));
/*
* Maximum threshold is 125
*/
threshold = min(125, threshold);
return threshold;
}
/*
* Refresh the thresholds for each zone.
*/
void refresh_zone_stat_thresholds(void)
{
struct pglist_data *pgdat;
struct zone *zone;
int cpu;
int threshold;
/* Zero current pgdat thresholds */
for_each_online_pgdat(pgdat) {
for_each_online_cpu(cpu) {
per_cpu_ptr(pgdat->per_cpu_nodestats, cpu)->stat_threshold = 0;
}
}
for_each_populated_zone(zone) {
struct pglist_data *pgdat = zone->zone_pgdat;
unsigned long max_drift, tolerate_drift;
threshold = calculate_normal_threshold(zone);
for_each_online_cpu(cpu) {
int pgdat_threshold;
per_cpu_ptr(zone->pageset, cpu)->stat_threshold
= threshold;
/* Base nodestat threshold on the largest populated zone. */
pgdat_threshold = per_cpu_ptr(pgdat->per_cpu_nodestats, cpu)->stat_threshold;
per_cpu_ptr(pgdat->per_cpu_nodestats, cpu)->stat_threshold
= max(threshold, pgdat_threshold);
}
/*
* Only set percpu_drift_mark if there is a danger that
* NR_FREE_PAGES reports the low watermark is ok when in fact
* the min watermark could be breached by an allocation
*/
tolerate_drift = low_wmark_pages(zone) - min_wmark_pages(zone);
max_drift = num_online_cpus() * threshold;
if (max_drift > tolerate_drift)
zone->percpu_drift_mark = high_wmark_pages(zone) +
max_drift;
}
}
void set_pgdat_percpu_threshold(pg_data_t *pgdat,
int (*calculate_pressure)(struct zone *))
{
struct zone *zone;
int cpu;
int threshold;
int i;
for (i = 0; i < pgdat->nr_zones; i++) {
zone = &pgdat->node_zones[i];
if (!zone->percpu_drift_mark)
continue;
threshold = (*calculate_pressure)(zone);
for_each_online_cpu(cpu)
per_cpu_ptr(zone->pageset, cpu)->stat_threshold
= threshold;
}
}
/*
* For use when we know that interrupts are disabled,
* or when we know that preemption is disabled and that
* particular counter cannot be updated from interrupt context.
*/
void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item,
long delta)
{
struct per_cpu_pageset __percpu *pcp = zone->pageset;
s8 __percpu *p = pcp->vm_stat_diff + item;
long x;
long t;
x = delta + __this_cpu_read(*p);
t = __this_cpu_read(pcp->stat_threshold);
if (unlikely(x > t || x < -t)) {
zone_page_state_add(x, zone, item);
x = 0;
}
__this_cpu_write(*p, x);
}
EXPORT_SYMBOL(__mod_zone_page_state);
void __mod_node_page_state(struct pglist_data *pgdat, enum node_stat_item item,
long delta)
{
struct per_cpu_nodestat __percpu *pcp = pgdat->per_cpu_nodestats;
s8 __percpu *p = pcp->vm_node_stat_diff + item;
long x;
long t;
x = delta + __this_cpu_read(*p);
t = __this_cpu_read(pcp->stat_threshold);
if (unlikely(x > t || x < -t)) {
node_page_state_add(x, pgdat, item);
x = 0;
}
__this_cpu_write(*p, x);
}
EXPORT_SYMBOL(__mod_node_page_state);
/*
* Optimized increment and decrement functions.
*
* These are only for a single page and therefore can take a struct page *
* argument instead of struct zone *. This allows the inclusion of the code
* generated for page_zone(page) into the optimized functions.
*
* No overflow check is necessary and therefore the differential can be
* incremented or decremented in place which may allow the compilers to
* generate better code.
* The increment or decrement is known and therefore one boundary check can
* be omitted.
*
* NOTE: These functions are very performance sensitive. Change only
* with care.
*
* Some processors have inc/dec instructions that are atomic vs an interrupt.
* However, the code must first determine the differential location in a zone
* based on the processor number and then inc/dec the counter. There is no
* guarantee without disabling preemption that the processor will not change
* in between and therefore the atomicity vs. interrupt cannot be exploited
* in a useful way here.
*/
void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
{
struct per_cpu_pageset __percpu *pcp = zone->pageset;
s8 __percpu *p = pcp->vm_stat_diff + item;
s8 v, t;
v = __this_cpu_inc_return(*p);
t = __this_cpu_read(pcp->stat_threshold);
if (unlikely(v > t)) {
s8 overstep = t >> 1;
zone_page_state_add(v + overstep, zone, item);
__this_cpu_write(*p, -overstep);
}
}
void __inc_node_state(struct pglist_data *pgdat, enum node_stat_item item)
{
struct per_cpu_nodestat __percpu *pcp = pgdat->per_cpu_nodestats;
s8 __percpu *p = pcp->vm_node_stat_diff + item;
s8 v, t;
v = __this_cpu_inc_return(*p);
t = __this_cpu_read(pcp->stat_threshold);
if (unlikely(v > t)) {
s8 overstep = t >> 1;
node_page_state_add(v + overstep, pgdat, item);
__this_cpu_write(*p, -overstep);
}
}
void __inc_zone_page_state(struct page *page, enum zone_stat_item item)
{
__inc_zone_state(page_zone(page), item);
}
EXPORT_SYMBOL(__inc_zone_page_state);
void __inc_node_page_state(struct page *page, enum node_stat_item item)
{
__inc_node_state(page_pgdat(page), item);
}
EXPORT_SYMBOL(__inc_node_page_state);
void __dec_zone_state(struct zone *zone, enum zone_stat_item item)
{
struct per_cpu_pageset __percpu *pcp = zone->pageset;
s8 __percpu *p = pcp->vm_stat_diff + item;
s8 v, t;
v = __this_cpu_dec_return(*p);
t = __this_cpu_read(pcp->stat_threshold);
if (unlikely(v < - t)) {
s8 overstep = t >> 1;
zone_page_state_add(v - overstep, zone, item);
__this_cpu_write(*p, overstep);
}
}
void __dec_node_state(struct pglist_data *pgdat, enum node_stat_item item)
{
struct per_cpu_nodestat __percpu *pcp = pgdat->per_cpu_nodestats;
s8 __percpu *p = pcp->vm_node_stat_diff + item;
s8 v, t;
v = __this_cpu_dec_return(*p);
t = __this_cpu_read(pcp->stat_threshold);
if (unlikely(v < - t)) {
s8 overstep = t >> 1;
node_page_state_add(v - overstep, pgdat, item);
__this_cpu_write(*p, overstep);
}
}
void __dec_zone_page_state(struct page *page, enum zone_stat_item item)
{
__dec_zone_state(page_zone(page), item);
}
EXPORT_SYMBOL(__dec_zone_page_state);
void __dec_node_page_state(struct page *page, enum node_stat_item item)
{
__dec_node_state(page_pgdat(page), item);
}
EXPORT_SYMBOL(__dec_node_page_state);
#ifdef CONFIG_HAVE_CMPXCHG_LOCAL
/*
* If we have cmpxchg_local support then we do not need to incur the overhead
* that comes with local_irq_save/restore if we use this_cpu_cmpxchg.
*
* mod_state() modifies the zone counter state through atomic per cpu
* operations.
*
* Overstep mode specifies how overstep should handled:
* 0 No overstepping
* 1 Overstepping half of threshold
* -1 Overstepping minus half of threshold
*/
static inline void mod_zone_state(struct zone *zone,
enum zone_stat_item item, long delta, int overstep_mode)
{
struct per_cpu_pageset __percpu *pcp = zone->pageset;
s8 __percpu *p = pcp->vm_stat_diff + item;
long o, n, t, z;
do {
z = 0; /* overflow to zone counters */
/*
* The fetching of the stat_threshold is racy. We may apply
* a counter threshold to the wrong the cpu if we get
* rescheduled while executing here. However, the next
* counter update will apply the threshold again and
* therefore bring the counter under the threshold again.
*
* Most of the time the thresholds are the same anyways
* for all cpus in a zone.
*/
t = this_cpu_read(pcp->stat_threshold);
o = this_cpu_read(*p);
n = delta + o;
if (n > t || n < -t) {
int os = overstep_mode * (t >> 1) ;
/* Overflow must be added to zone counters */
z = n + os;
n = -os;
}
} while (this_cpu_cmpxchg(*p, o, n) != o);
if (z)
zone_page_state_add(z, zone, item);
}
void mod_zone_page_state(struct zone *zone, enum zone_stat_item item,
long delta)
{
mod_zone_state(zone, item, delta, 0);
}
EXPORT_SYMBOL(mod_zone_page_state);
void inc_zone_page_state(struct page *page, enum zone_stat_item item)
{
mod_zone_state(page_zone(page), item, 1, 1);
}
EXPORT_SYMBOL(inc_zone_page_state);
void dec_zone_page_state(struct page *page, enum zone_stat_item item)
{
mod_zone_state(page_zone(page), item, -1, -1);
}
EXPORT_SYMBOL(dec_zone_page_state);
static inline void mod_node_state(struct pglist_data *pgdat,
enum node_stat_item item, int delta, int overstep_mode)
{
struct per_cpu_nodestat __percpu *pcp = pgdat->per_cpu_nodestats;
s8 __percpu *p = pcp->vm_node_stat_diff + item;
long o, n, t, z;
do {
z = 0; /* overflow to node counters */
/*
* The fetching of the stat_threshold is racy. We may apply
* a counter threshold to the wrong the cpu if we get
* rescheduled while executing here. However, the next
* counter update will apply the threshold again and
* therefore bring the counter under the threshold again.
*
* Most of the time the thresholds are the same anyways
* for all cpus in a node.
*/
t = this_cpu_read(pcp->stat_threshold);
o = this_cpu_read(*p);
n = delta + o;
if (n > t || n < -t) {
int os = overstep_mode * (t >> 1) ;
/* Overflow must be added to node counters */
z = n + os;
n = -os;
}
} while (this_cpu_cmpxchg(*p, o, n) != o);
if (z)
node_page_state_add(z, pgdat, item);
}
void mod_node_page_state(struct pglist_data *pgdat, enum node_stat_item item,
long delta)
{
mod_node_state(pgdat, item, delta, 0);
}
EXPORT_SYMBOL(mod_node_page_state);
void inc_node_state(struct pglist_data *pgdat, enum node_stat_item item)
{
mod_node_state(pgdat, item, 1, 1);
}
void inc_node_page_state(struct page *page, enum node_stat_item item)
{
mod_node_state(page_pgdat(page), item, 1, 1);
}
EXPORT_SYMBOL(inc_node_page_state);
void dec_node_page_state(struct page *page, enum node_stat_item item)
{
mod_node_state(page_pgdat(page), item, -1, -1);
}
EXPORT_SYMBOL(dec_node_page_state);
#else
/*
* Use interrupt disable to serialize counter updates
*/
void mod_zone_page_state(struct zone *zone, enum zone_stat_item item,
long delta)
{
unsigned long flags;
local_irq_save(flags);
__mod_zone_page_state(zone, item, delta);
local_irq_restore(flags);
}
EXPORT_SYMBOL(mod_zone_page_state);
void inc_zone_page_state(struct page *page, enum zone_stat_item item)
{
unsigned long flags;
struct zone *zone;
zone = page_zone(page);
local_irq_save(flags);
__inc_zone_state(zone, item);
local_irq_restore(flags);
}
EXPORT_SYMBOL(inc_zone_page_state);
void dec_zone_page_state(struct page *page, enum zone_stat_item item)
{
unsigned long flags;
local_irq_save(flags);
__dec_zone_page_state(page, item);
local_irq_restore(flags);
}
EXPORT_SYMBOL(dec_zone_page_state);
void inc_node_state(struct pglist_data *pgdat, enum node_stat_item item)
{
unsigned long flags;
local_irq_save(flags);
__inc_node_state(pgdat, item);
local_irq_restore(flags);
}
EXPORT_SYMBOL(inc_node_state);
void mod_node_page_state(struct pglist_data *pgdat, enum node_stat_item item,
long delta)
{
unsigned long flags;
local_irq_save(flags);
__mod_node_page_state(pgdat, item, delta);
local_irq_restore(flags);
}
EXPORT_SYMBOL(mod_node_page_state);
void inc_node_page_state(struct page *page, enum node_stat_item item)
{
unsigned long flags;
struct pglist_data *pgdat;
pgdat = page_pgdat(page);
local_irq_save(flags);
__inc_node_state(pgdat, item);
local_irq_restore(flags);
}
EXPORT_SYMBOL(inc_node_page_state);
void dec_node_page_state(struct page *page, enum node_stat_item item)
{
unsigned long flags;
local_irq_save(flags);
__dec_node_page_state(page, item);
local_irq_restore(flags);
}
EXPORT_SYMBOL(dec_node_page_state);
#endif
/*
* Fold a differential into the global counters.
* Returns the number of counters updated.
*/
#ifdef CONFIG_NUMA
static int fold_diff(int *zone_diff, int *numa_diff, int *node_diff)
{
int i;
int changes = 0;
for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
if (zone_diff[i]) {
atomic_long_add(zone_diff[i], &vm_zone_stat[i]);
changes++;
}
for (i = 0; i < NR_VM_NUMA_STAT_ITEMS; i++)
if (numa_diff[i]) {
atomic_long_add(numa_diff[i], &vm_numa_stat[i]);
changes++;
}
for (i = 0; i < NR_VM_NODE_STAT_ITEMS; i++)
if (node_diff[i]) {
atomic_long_add(node_diff[i], &vm_node_stat[i]);
changes++;
}
return changes;
}
#else
static int fold_diff(int *zone_diff, int *node_diff)
{
int i;
int changes = 0;
for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
if (zone_diff[i]) {
atomic_long_add(zone_diff[i], &vm_zone_stat[i]);
changes++;
}
for (i = 0; i < NR_VM_NODE_STAT_ITEMS; i++)
if (node_diff[i]) {
atomic_long_add(node_diff[i], &vm_node_stat[i]);
changes++;
}
return changes;
}
#endif /* CONFIG_NUMA */
/*
* Update the zone counters for the current cpu.
*
* Note that refresh_cpu_vm_stats strives to only access
* node local memory. The per cpu pagesets on remote zones are placed
* in the memory local to the processor using that pageset. So the
* loop over all zones will access a series of cachelines local to
* the processor.
*
* The call to zone_page_state_add updates the cachelines with the
* statistics in the remote zone struct as well as the global cachelines
* with the global counters. These could cause remote node cache line
* bouncing and will have to be only done when necessary.
*
* The function returns the number of global counters updated.
*/
static int refresh_cpu_vm_stats(bool do_pagesets)
{
struct pglist_data *pgdat;
struct zone *zone;
int i;
int global_zone_diff[NR_VM_ZONE_STAT_ITEMS] = { 0, };
#ifdef CONFIG_NUMA
int global_numa_diff[NR_VM_NUMA_STAT_ITEMS] = { 0, };
#endif
int global_node_diff[NR_VM_NODE_STAT_ITEMS] = { 0, };
int changes = 0;
for_each_populated_zone(zone) {
struct per_cpu_pageset __percpu *p = zone->pageset;
for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++) {
int v;
v = this_cpu_xchg(p->vm_stat_diff[i], 0);
if (v) {
atomic_long_add(v, &zone->vm_stat[i]);
global_zone_diff[i] += v;
#ifdef CONFIG_NUMA
/* 3 seconds idle till flush */
__this_cpu_write(p->expire, 3);
#endif
}
}
#ifdef CONFIG_NUMA
for (i = 0; i < NR_VM_NUMA_STAT_ITEMS; i++) {
int v;
v = this_cpu_xchg(p->vm_numa_stat_diff[i], 0);
if (v) {
atomic_long_add(v, &zone->vm_numa_stat[i]);
global_numa_diff[i] += v;
__this_cpu_write(p->expire, 3);
}
}
if (do_pagesets) {
cond_resched();
/*
* Deal with draining the remote pageset of this
* processor
*
* Check if there are pages remaining in this pageset
* if not then there is nothing to expire.
*/
if (!__this_cpu_read(p->expire) ||
!__this_cpu_read(p->pcp.count))
continue;
/*
* We never drain zones local to this processor.
*/
if (zone_to_nid(zone) == numa_node_id()) {
__this_cpu_write(p->expire, 0);
continue;
}
if (__this_cpu_dec_return(p->expire))
continue;
if (__this_cpu_read(p->pcp.count)) {
drain_zone_pages(zone, this_cpu_ptr(&p->pcp));
changes++;
}
}
#endif
}
for_each_online_pgdat(pgdat) {
struct per_cpu_nodestat __percpu *p = pgdat->per_cpu_nodestats;
for (i = 0; i < NR_VM_NODE_STAT_ITEMS; i++) {
int v;
v = this_cpu_xchg(p->vm_node_stat_diff[i], 0);
if (v) {
atomic_long_add(v, &pgdat->vm_stat[i]);
global_node_diff[i] += v;
}
}
}
#ifdef CONFIG_NUMA
changes += fold_diff(global_zone_diff, global_numa_diff,
global_node_diff);
#else
changes += fold_diff(global_zone_diff, global_node_diff);
#endif
return changes;
}
/*
* Fold the data for an offline cpu into the global array.
* There cannot be any access by the offline cpu and therefore
* synchronization is simplified.
*/
void cpu_vm_stats_fold(int cpu)
{
struct pglist_data *pgdat;
struct zone *zone;
int i;
int global_zone_diff[NR_VM_ZONE_STAT_ITEMS] = { 0, };
#ifdef CONFIG_NUMA
int global_numa_diff[NR_VM_NUMA_STAT_ITEMS] = { 0, };
#endif
int global_node_diff[NR_VM_NODE_STAT_ITEMS] = { 0, };
for_each_populated_zone(zone) {
struct per_cpu_pageset *p;
p = per_cpu_ptr(zone->pageset, cpu);
for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
if (p->vm_stat_diff[i]) {
int v;
v = p->vm_stat_diff[i];
p->vm_stat_diff[i] = 0;
atomic_long_add(v, &zone->vm_stat[i]);
global_zone_diff[i] += v;
}
#ifdef CONFIG_NUMA
for (i = 0; i < NR_VM_NUMA_STAT_ITEMS; i++)
if (p->vm_numa_stat_diff[i]) {
int v;
v = p->vm_numa_stat_diff[i];
p->vm_numa_stat_diff[i] = 0;
atomic_long_add(v, &zone->vm_numa_stat[i]);
global_numa_diff[i] += v;
}
#endif
}
for_each_online_pgdat(pgdat) {
struct per_cpu_nodestat *p;
p = per_cpu_ptr(pgdat->per_cpu_nodestats, cpu);
for (i = 0; i < NR_VM_NODE_STAT_ITEMS; i++)
if (p->vm_node_stat_diff[i]) {
int v;
v = p->vm_node_stat_diff[i];
p->vm_node_stat_diff[i] = 0;
atomic_long_add(v, &pgdat->vm_stat[i]);
global_node_diff[i] += v;
}
}
#ifdef CONFIG_NUMA
fold_diff(global_zone_diff, global_numa_diff, global_node_diff);
#else
fold_diff(global_zone_diff, global_node_diff);
#endif
}
/*
* this is only called if !populated_zone(zone), which implies no other users of
* pset->vm_stat_diff[] exsist.
*/
void drain_zonestat(struct zone *zone, struct per_cpu_pageset *pset)
{
int i;
for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
if (pset->vm_stat_diff[i]) {
int v = pset->vm_stat_diff[i];
pset->vm_stat_diff[i] = 0;
atomic_long_add(v, &zone->vm_stat[i]);
atomic_long_add(v, &vm_zone_stat[i]);
}
#ifdef CONFIG_NUMA
for (i = 0; i < NR_VM_NUMA_STAT_ITEMS; i++)
if (pset->vm_numa_stat_diff[i]) {
int v = pset->vm_numa_stat_diff[i];
pset->vm_numa_stat_diff[i] = 0;
atomic_long_add(v, &zone->vm_numa_stat[i]);
atomic_long_add(v, &vm_numa_stat[i]);
}
#endif
}
#endif
#ifdef CONFIG_NUMA
void __inc_numa_state(struct zone *zone,
enum numa_stat_item item)
{
struct per_cpu_pageset __percpu *pcp = zone->pageset;
u16 __percpu *p = pcp->vm_numa_stat_diff + item;
u16 v;
v = __this_cpu_inc_return(*p);
if (unlikely(v > NUMA_STATS_THRESHOLD)) {
zone_numa_state_add(v, zone, item);
__this_cpu_write(*p, 0);
}
}
/*
* Determine the per node value of a stat item. This function
* is called frequently in a NUMA machine, so try to be as
* frugal as possible.
*/
unsigned long sum_zone_node_page_state(int node,
enum zone_stat_item item)
{
struct zone *zones = NODE_DATA(node)->node_zones;
int i;
unsigned long count = 0;
for (i = 0; i < MAX_NR_ZONES; i++)
count += zone_page_state(zones + i, item);
return count;
}
/*
* Determine the per node value of a numa stat item. To avoid deviation,
* the per cpu stat number in vm_numa_stat_diff[] is also included.
*/
unsigned long sum_zone_numa_state(int node,
enum numa_stat_item item)
{
struct zone *zones = NODE_DATA(node)->node_zones;
int i;
unsigned long count = 0;
for (i = 0; i < MAX_NR_ZONES; i++)
count += zone_numa_state_snapshot(zones + i, item);
return count;
}
/*
* Determine the per node value of a stat item.
*/
unsigned long node_page_state(struct pglist_data *pgdat,
enum node_stat_item item)
{
long x = atomic_long_read(&pgdat->vm_stat[item]);
#ifdef CONFIG_SMP
if (x < 0)
x = 0;
#endif
return x;
}
#endif
#ifdef CONFIG_COMPACTION
struct contig_page_info {
unsigned long free_pages;
unsigned long free_blocks_total;
unsigned long free_blocks_suitable;
};
/*
* Calculate the number of free pages in a zone, how many contiguous
* pages are free and how many are large enough to satisfy an allocation of
* the target size. Note that this function makes no attempt to estimate
* how many suitable free blocks there *might* be if MOVABLE pages were
* migrated. Calculating that is possible, but expensive and can be
* figured out from userspace
*/
static void fill_contig_page_info(struct zone *zone,
unsigned int suitable_order,
struct contig_page_info *info)
{
unsigned int order;
info->free_pages = 0;
info->free_blocks_total = 0;
info->free_blocks_suitable = 0;
for (order = 0; order < MAX_ORDER; order++) {
unsigned long blocks;
/* Count number of free blocks */
blocks = zone->free_area[order].nr_free;
info->free_blocks_total += blocks;
/* Count free base pages */
info->free_pages += blocks << order;
/* Count the suitable free blocks */
if (order >= suitable_order)
info->free_blocks_suitable += blocks <<
(order - suitable_order);
}
}
/*
* A fragmentation index only makes sense if an allocation of a requested
* size would fail. If that is true, the fragmentation index indicates
* whether external fragmentation or a lack of memory was the problem.
* The value can be used to determine if page reclaim or compaction
* should be used
*/
static int __fragmentation_index(unsigned int order, struct contig_page_info *info)
{
unsigned long requested = 1UL << order;
if (WARN_ON_ONCE(order >= MAX_ORDER))
return 0;
if (!info->free_blocks_total)
return 0;
/* Fragmentation index only makes sense when a request would fail */
if (info->free_blocks_suitable)
return -1000;
/*
* Index is between 0 and 1 so return within 3 decimal places
*
* 0 => allocation would fail due to lack of memory
* 1 => allocation would fail due to fragmentation
*/
return 1000 - div_u64( (1000+(div_u64(info->free_pages * 1000ULL, requested))), info->free_blocks_total);
}
/* Same as __fragmentation index but allocs contig_page_info on stack */
int fragmentation_index(struct zone *zone, unsigned int order)
{
struct contig_page_info info;
fill_contig_page_info(zone, order, &info);
return __fragmentation_index(order, &info);
}
#endif
#if defined(CONFIG_PROC_FS) || defined(CONFIG_SYSFS) || defined(CONFIG_NUMA)
#ifdef CONFIG_ZONE_DMA
#define TEXT_FOR_DMA(xx) xx "_dma",
#else
#define TEXT_FOR_DMA(xx)
#endif
#ifdef CONFIG_ZONE_DMA32
#define TEXT_FOR_DMA32(xx) xx "_dma32",
#else
#define TEXT_FOR_DMA32(xx)
#endif
#ifdef CONFIG_HIGHMEM
#define TEXT_FOR_HIGHMEM(xx) xx "_high",
#else
#define TEXT_FOR_HIGHMEM(xx)
#endif
#define TEXTS_FOR_ZONES(xx) TEXT_FOR_DMA(xx) TEXT_FOR_DMA32(xx) xx "_normal", \
TEXT_FOR_HIGHMEM(xx) xx "_movable",
const char * const vmstat_text[] = {
/* enum zone_stat_item countes */
"nr_free_pages",
"nr_zone_inactive_anon",
"nr_zone_active_anon",
"nr_zone_inactive_file",
"nr_zone_active_file",
"nr_zone_unevictable",
"nr_zone_write_pending",
"nr_mlock",
"nr_page_table_pages",
"nr_kernel_stack",
#if IS_ENABLED(CONFIG_SHADOW_CALL_STACK)
"nr_shadow_call_stack_bytes",
#endif
"nr_bounce",
#if IS_ENABLED(CONFIG_ZSMALLOC)
"nr_zspages",
#endif
"nr_free_cma",
/* enum numa_stat_item counters */
#ifdef CONFIG_NUMA
"numa_hit",
"numa_miss",
"numa_foreign",
"numa_interleave",
"numa_local",
"numa_other",
#endif
/* Node-based counters */
"nr_inactive_anon",
"nr_active_anon",
"nr_inactive_file",
"nr_active_file",
"nr_unevictable",
"nr_slab_reclaimable",
"nr_slab_unreclaimable",
"nr_isolated_anon",
"nr_isolated_file",
"workingset_refault",
"workingset_activate",
"workingset_restore",
"workingset_nodereclaim",
"nr_anon_pages",
"nr_mapped",
"nr_file_pages",
"nr_dirty",
"nr_writeback",
"nr_writeback_temp",
"nr_shmem",
"nr_shmem_hugepages",
"nr_shmem_pmdmapped",
"nr_anon_transparent_hugepages",
"nr_unstable",
"nr_vmscan_write",
"nr_vmscan_immediate_reclaim",
"nr_dirtied",
"nr_written",
"nr_kernel_misc_reclaimable",
"nr_unreclaimable_pages",
"nr_ion_heap",
"nr_ion_heap_pool",
"nr_gpu_heap",
/* enum writeback_stat_item counters */
"nr_dirty_threshold",
"nr_dirty_background_threshold",
#ifdef CONFIG_VM_EVENT_COUNTERS
/* enum vm_event_item counters */
"pgpgin",
"pgpgout",
"pgpgoutclean",
"pswpin",
"pswpout",
TEXTS_FOR_ZONES("pgalloc")
TEXTS_FOR_ZONES("allocstall")
TEXTS_FOR_ZONES("pgskip")
"pgfree",
"pgactivate",
"pgdeactivate",
"pglazyfree",
"pgfault",
"pgmajfault",
"pglazyfreed",
"pgrefill",
"pgsteal_kswapd",
"pgsteal_direct",
"pgscan_kswapd",
"pgscan_direct",
"pgscan_direct_throttle",
#ifdef CONFIG_NUMA
"zone_reclaim_failed",
#endif
"pginodesteal",
"slabs_scanned",
"kswapd_inodesteal",
"kswapd_low_wmark_hit_quickly",
"kswapd_high_wmark_hit_quickly",
"pageoutrun",
"pgrotated",
"drop_pagecache",
"drop_slab",
"oom_kill",
#ifdef CONFIG_NUMA_BALANCING
"numa_pte_updates",
"numa_huge_pte_updates",
"numa_hint_faults",
"numa_hint_faults_local",
"numa_pages_migrated",
#endif
#ifdef CONFIG_MIGRATION
"pgmigrate_success",
"pgmigrate_fail",
#endif
#ifdef CONFIG_COMPACTION
"compact_migrate_scanned",
"compact_free_scanned",
"compact_isolated",
"compact_stall",
"compact_fail",
"compact_success",
"compact_daemon_wake",
"compact_daemon_migrate_scanned",
"compact_daemon_free_scanned",
#endif
#ifdef CONFIG_HUGETLB_PAGE
"htlb_buddy_alloc_success",
"htlb_buddy_alloc_fail",
#endif
"unevictable_pgs_culled",
"unevictable_pgs_scanned",
"unevictable_pgs_rescued",
"unevictable_pgs_mlocked",
"unevictable_pgs_munlocked",
"unevictable_pgs_cleared",
"unevictable_pgs_stranded",
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
"thp_fault_alloc",
"thp_fault_fallback",
"thp_collapse_alloc",
"thp_collapse_alloc_failed",
"thp_file_alloc",
"thp_file_mapped",
"thp_split_page",
"thp_split_page_failed",
"thp_deferred_split_page",
"thp_split_pmd",
#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
"thp_split_pud",
#endif
"thp_zero_page_alloc",
"thp_zero_page_alloc_failed",
"thp_swpout",
"thp_swpout_fallback",
#endif
#ifdef CONFIG_MEMORY_BALLOON
"balloon_inflate",
"balloon_deflate",
#ifdef CONFIG_BALLOON_COMPACTION
"balloon_migrate",
#endif
#endif /* CONFIG_MEMORY_BALLOON */
#ifdef CONFIG_DEBUG_TLBFLUSH
"nr_tlb_remote_flush",
"nr_tlb_remote_flush_received",
"nr_tlb_local_flush_all",
"nr_tlb_local_flush_one",
#endif /* CONFIG_DEBUG_TLBFLUSH */
#ifdef CONFIG_DEBUG_VM_VMACACHE
"vmacache_find_calls",
"vmacache_find_hits",
#endif
#ifdef CONFIG_SWAP
"swap_ra",
"swap_ra_hit",
#endif
#ifdef CONFIG_SPECULATIVE_PAGE_FAULT
"speculative_pgfault_anon",
"speculative_pgfault_file",
#endif
#endif /* CONFIG_VM_EVENT_COUNTERS */
};
#endif /* CONFIG_PROC_FS || CONFIG_SYSFS || CONFIG_NUMA */
#if (defined(CONFIG_DEBUG_FS) && defined(CONFIG_COMPACTION)) || \
defined(CONFIG_PROC_FS)
static void *frag_start(struct seq_file *m, loff_t *pos)
{
pg_data_t *pgdat;
loff_t node = *pos;
for (pgdat = first_online_pgdat();
pgdat && node;
pgdat = next_online_pgdat(pgdat))
--node;
return pgdat;
}
static void *frag_next(struct seq_file *m, void *arg, loff_t *pos)
{
pg_data_t *pgdat = (pg_data_t *)arg;
(*pos)++;
return next_online_pgdat(pgdat);
}
static void frag_stop(struct seq_file *m, void *arg)
{
}
/*
* Walk zones in a node and print using a callback.
* If @assert_populated is true, only use callback for zones that are populated.
*/
static void walk_zones_in_node(struct seq_file *m, pg_data_t *pgdat,
bool assert_populated, bool nolock,
void (*print)(struct seq_file *m, pg_data_t *, struct zone *))
{
struct zone *zone;
struct zone *node_zones = pgdat->node_zones;
unsigned long flags;
for (zone = node_zones; zone - node_zones < MAX_NR_ZONES; ++zone) {
if (assert_populated && !populated_zone(zone))
continue;
if (!nolock)
spin_lock_irqsave(&zone->lock, flags);
print(m, pgdat, zone);
if (!nolock)
spin_unlock_irqrestore(&zone->lock, flags);
}
}
#endif
#ifdef CONFIG_PROC_FS
static void frag_show_print(struct seq_file *m, pg_data_t *pgdat,
struct zone *zone)
{
int order;
seq_printf(m, "Node %d, zone %8s ", pgdat->node_id, zone->name);
for (order = 0; order < MAX_ORDER; ++order)
seq_printf(m, "%6lu ", zone->free_area[order].nr_free);
seq_putc(m, '\n');
}
/*
* This walks the free areas for each zone.
*/
static int frag_show(struct seq_file *m, void *arg)
{
pg_data_t *pgdat = (pg_data_t *)arg;
walk_zones_in_node(m, pgdat, true, false, frag_show_print);
return 0;
}
static void pagetypeinfo_showfree_print(struct seq_file *m,
pg_data_t *pgdat, struct zone *zone)
{
int order, mtype;
for (mtype = 0; mtype < MIGRATE_TYPES; mtype++) {
seq_printf(m, "Node %4d, zone %8s, type %12s ",
pgdat->node_id,
zone->name,
migratetype_names[mtype]);
for (order = 0; order < MAX_ORDER; ++order) {
unsigned long freecount = 0;
struct free_area *area;
struct list_head *curr;
area = &(zone->free_area[order]);
list_for_each(curr, &area->free_list[mtype])
freecount++;
seq_printf(m, "%6lu ", freecount);
spin_unlock_irq(&zone->lock);
cond_resched();
spin_lock_irq(&zone->lock);
}
seq_putc(m, '\n');
}
}
/* Print out the free pages at each order for each migatetype */
static int pagetypeinfo_showfree(struct seq_file *m, void *arg)
{
int order;
pg_data_t *pgdat = (pg_data_t *)arg;
/* Print header */
seq_printf(m, "%-43s ", "Free pages count per migrate type at order");
for (order = 0; order < MAX_ORDER; ++order)
seq_printf(m, "%6d ", order);
seq_putc(m, '\n');
walk_zones_in_node(m, pgdat, true, false, pagetypeinfo_showfree_print);
return 0;
}
static void pagetypeinfo_showblockcount_print(struct seq_file *m,
pg_data_t *pgdat, struct zone *zone)
{
int mtype;
unsigned long pfn;
unsigned long start_pfn = zone->zone_start_pfn;
unsigned long end_pfn = zone_end_pfn(zone);
unsigned long count[MIGRATE_TYPES] = { 0, };
for (pfn = start_pfn; pfn < end_pfn; pfn += pageblock_nr_pages) {
struct page *page;
page = pfn_to_online_page(pfn);
if (!page)
continue;
/* Watch for unexpected holes punched in the memmap */
if (!memmap_valid_within(pfn, page, zone))
continue;
if (page_zone(page) != zone)
continue;
mtype = get_pageblock_migratetype(page);
if (mtype < MIGRATE_TYPES)
count[mtype]++;
}
/* Print counts */
seq_printf(m, "Node %d, zone %8s ", pgdat->node_id, zone->name);
for (mtype = 0; mtype < MIGRATE_TYPES; mtype++)
seq_printf(m, "%12lu ", count[mtype]);
seq_putc(m, '\n');
}
/* Print out the number of pageblocks for each migratetype */
static int pagetypeinfo_showblockcount(struct seq_file *m, void *arg)
{
int mtype;
pg_data_t *pgdat = (pg_data_t *)arg;
seq_printf(m, "\n%-23s", "Number of blocks type ");
for (mtype = 0; mtype < MIGRATE_TYPES; mtype++)
seq_printf(m, "%12s ", migratetype_names[mtype]);
seq_putc(m, '\n');
walk_zones_in_node(m, pgdat, true, false,
pagetypeinfo_showblockcount_print);
return 0;
}
/*
* Print out the number of pageblocks for each migratetype that contain pages
* of other types. This gives an indication of how well fallbacks are being
* contained by rmqueue_fallback(). It requires information from PAGE_OWNER
* to determine what is going on
*/
static void pagetypeinfo_showmixedcount(struct seq_file *m, pg_data_t *pgdat)
{
#ifdef CONFIG_PAGE_OWNER
int mtype;
if (!static_branch_unlikely(&page_owner_inited))
return;
drain_all_pages(NULL);
seq_printf(m, "\n%-23s", "Number of mixed blocks ");
for (mtype = 0; mtype < MIGRATE_TYPES; mtype++)
seq_printf(m, "%12s ", migratetype_names[mtype]);
seq_putc(m, '\n');
walk_zones_in_node(m, pgdat, true, true,
pagetypeinfo_showmixedcount_print);
#endif /* CONFIG_PAGE_OWNER */
}
/*
* This prints out statistics in relation to grouping pages by mobility.
* It is expensive to collect so do not constantly read the file.
*/
static int pagetypeinfo_show(struct seq_file *m, void *arg)
{
pg_data_t *pgdat = (pg_data_t *)arg;
/* check memoryless node */
if (!node_state(pgdat->node_id, N_MEMORY))
return 0;
seq_printf(m, "Page block order: %d\n", pageblock_order);
seq_printf(m, "Pages per block: %lu\n", pageblock_nr_pages);
seq_putc(m, '\n');
pagetypeinfo_showfree(m, pgdat);
pagetypeinfo_showblockcount(m, pgdat);
pagetypeinfo_showmixedcount(m, pgdat);
return 0;
}
static const struct seq_operations fragmentation_op = {
.start = frag_start,
.next = frag_next,
.stop = frag_stop,
.show = frag_show,
};
static const struct seq_operations pagetypeinfo_op = {
.start = frag_start,
.next = frag_next,
.stop = frag_stop,
.show = pagetypeinfo_show,
};
static bool is_zone_first_populated(pg_data_t *pgdat, struct zone *zone)
{
int zid;
for (zid = 0; zid < MAX_NR_ZONES; zid++) {
struct zone *compare = &pgdat->node_zones[zid];
if (populated_zone(compare))
return zone == compare;
}
return false;
}
static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
struct zone *zone)
{
int i;
seq_printf(m, "Node %d, zone %8s", pgdat->node_id, zone->name);
if (is_zone_first_populated(pgdat, zone)) {
seq_printf(m, "\n per-node stats");
for (i = 0; i < NR_VM_NODE_STAT_ITEMS; i++) {
/* Skip hidden vmstat items. */
if (*vmstat_text[i + NR_VM_ZONE_STAT_ITEMS +
NR_VM_NUMA_STAT_ITEMS] == '\0')
continue;
seq_printf(m, "\n %-12s %lu",
vmstat_text[i + NR_VM_ZONE_STAT_ITEMS +
NR_VM_NUMA_STAT_ITEMS],
node_page_state(pgdat, i));
}
}
seq_printf(m,
"\n pages free %lu"
"\n min %lu"
"\n low %lu"
"\n high %lu"
"\n spanned %lu"
"\n present %lu"
"\n managed %lu",
zone_page_state(zone, NR_FREE_PAGES),
min_wmark_pages(zone),
low_wmark_pages(zone),
high_wmark_pages(zone),
zone->spanned_pages,
zone->present_pages,
zone->managed_pages);
seq_printf(m,
"\n protection: (%ld",
zone->lowmem_reserve[0]);
for (i = 1; i < ARRAY_SIZE(zone->lowmem_reserve); i++)
seq_printf(m, ", %ld", zone->lowmem_reserve[i]);
seq_putc(m, ')');
/* If unpopulated, no other information is useful */
if (!populated_zone(zone)) {
seq_putc(m, '\n');
return;
}
for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
seq_printf(m, "\n %-12s %lu", vmstat_text[i],
zone_page_state(zone, i));
#ifdef CONFIG_NUMA
for (i = 0; i < NR_VM_NUMA_STAT_ITEMS; i++)
seq_printf(m, "\n %-12s %lu",
vmstat_text[i + NR_VM_ZONE_STAT_ITEMS],
zone_numa_state_snapshot(zone, i));
#endif
seq_printf(m, "\n pagesets");
for_each_online_cpu(i) {
struct per_cpu_pageset *pageset;
pageset = per_cpu_ptr(zone->pageset, i);
seq_printf(m,
"\n cpu: %i"
"\n count: %i"
"\n high: %i"
"\n batch: %i",
i,
pageset->pcp.count,
pageset->pcp.high,
pageset->pcp.batch);
#ifdef CONFIG_SMP
seq_printf(m, "\n vm stats threshold: %d",
pageset->stat_threshold);
#endif
}
seq_printf(m,
"\n node_unreclaimable: %u"
"\n start_pfn: %lu",
pgdat->kswapd_failures >= MAX_RECLAIM_RETRIES,
zone->zone_start_pfn);
seq_putc(m, '\n');
}
/*
* Output information about zones in @pgdat. All zones are printed regardless
* of whether they are populated or not: lowmem_reserve_ratio operates on the
* set of all zones and userspace would not be aware of such zones if they are
* suppressed here (zoneinfo displays the effect of lowmem_reserve_ratio).
*/
static int zoneinfo_show(struct seq_file *m, void *arg)
{
pg_data_t *pgdat = (pg_data_t *)arg;
walk_zones_in_node(m, pgdat, false, false, zoneinfo_show_print);
return 0;
}
static const struct seq_operations zoneinfo_op = {
.start = frag_start, /* iterate over all zones. The same as in
* fragmentation. */
.next = frag_next,
.stop = frag_stop,
.show = zoneinfo_show,
};
enum writeback_stat_item {
NR_DIRTY_THRESHOLD,
NR_DIRTY_BG_THRESHOLD,
NR_VM_WRITEBACK_STAT_ITEMS,
};
static void *vmstat_start(struct seq_file *m, loff_t *pos)
{
unsigned long *v;
int i, stat_items_size;
if (*pos >= ARRAY_SIZE(vmstat_text))
return NULL;
stat_items_size = NR_VM_ZONE_STAT_ITEMS * sizeof(unsigned long) +
NR_VM_NUMA_STAT_ITEMS * sizeof(unsigned long) +
NR_VM_NODE_STAT_ITEMS * sizeof(unsigned long) +
NR_VM_WRITEBACK_STAT_ITEMS * sizeof(unsigned long);
#ifdef CONFIG_VM_EVENT_COUNTERS
stat_items_size += sizeof(struct vm_event_state);
#endif
v = kmalloc(stat_items_size, GFP_KERNEL);
m->private = v;
if (!v)
return ERR_PTR(-ENOMEM);
for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
v[i] = global_zone_page_state(i);
v += NR_VM_ZONE_STAT_ITEMS;
#ifdef CONFIG_NUMA
for (i = 0; i < NR_VM_NUMA_STAT_ITEMS; i++)
v[i] = global_numa_state(i);
v += NR_VM_NUMA_STAT_ITEMS;
#endif
for (i = 0; i < NR_VM_NODE_STAT_ITEMS; i++)
v[i] = global_node_page_state(i);
v += NR_VM_NODE_STAT_ITEMS;
global_dirty_limits(v + NR_DIRTY_BG_THRESHOLD,
v + NR_DIRTY_THRESHOLD);
v += NR_VM_WRITEBACK_STAT_ITEMS;
#ifdef CONFIG_VM_EVENT_COUNTERS
all_vm_events(v);
v[PGPGIN] /= 2; /* sectors -> kbytes */
v[PGPGOUT] /= 2;
#endif
return (unsigned long *)m->private + *pos;
}
static void *vmstat_next(struct seq_file *m, void *arg, loff_t *pos)
{
(*pos)++;
//nr_gpu_heap is out-of-tree now so we don't want to export it.
if (*pos == NR_VM_ZONE_STAT_ITEMS + NR_VM_NUMA_STAT_ITEMS + NR_GPU_HEAP)
(*pos)++;
if (*pos >= ARRAY_SIZE(vmstat_text))
return NULL;
return (unsigned long *)m->private + *pos;
}
static int vmstat_show(struct seq_file *m, void *arg)
{
unsigned long *l = arg;
unsigned long off = l - (unsigned long *)m->private;
seq_puts(m, vmstat_text[off]);
seq_put_decimal_ull(m, " ", *l);
seq_putc(m, '\n');
return 0;
}
static void vmstat_stop(struct seq_file *m, void *arg)
{
kfree(m->private);
m->private = NULL;
}
static const struct seq_operations vmstat_op = {
.start = vmstat_start,
.next = vmstat_next,
.stop = vmstat_stop,
.show = vmstat_show,
};
#endif /* CONFIG_PROC_FS */
#ifdef CONFIG_SMP
static DEFINE_PER_CPU(struct delayed_work, vmstat_work);
int sysctl_stat_interval __read_mostly = HZ;
#ifdef CONFIG_PROC_FS
static void refresh_vm_stats(struct work_struct *work)
{
refresh_cpu_vm_stats(true);
}
int vmstat_refresh(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
long val;
int err;
int i;
/*
* The regular update, every sysctl_stat_interval, may come later
* than expected: leaving a significant amount in per_cpu buckets.
* This is particularly misleading when checking a quantity of HUGE
* pages, immediately after running a test. /proc/sys/vm/stat_refresh,
* which can equally be echo'ed to or cat'ted from (by root),
* can be used to update the stats just before reading them.
*
* Oh, and since global_zone_page_state() etc. are so careful to hide
* transiently negative values, report an error here if any of
* the stats is negative, so we know to go looking for imbalance.
*/
err = schedule_on_each_cpu(refresh_vm_stats);
if (err)
return err;
for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++) {
val = atomic_long_read(&vm_zone_stat[i]);
if (val < 0) {
pr_warn("%s: %s %ld\n",
__func__, vmstat_text[i], val);
err = -EINVAL;
}
}
#ifdef CONFIG_NUMA
for (i = 0; i < NR_VM_NUMA_STAT_ITEMS; i++) {
val = atomic_long_read(&vm_numa_stat[i]);
if (val < 0) {
pr_warn("%s: %s %ld\n",
__func__, vmstat_text[i + NR_VM_ZONE_STAT_ITEMS], val);
err = -EINVAL;
}
}
#endif
if (err)
return err;
if (write)
*ppos += *lenp;
else
*lenp = 0;
return 0;
}
#endif /* CONFIG_PROC_FS */
static void vmstat_update(struct work_struct *w)
{
if (refresh_cpu_vm_stats(true) && !cpu_isolated(smp_processor_id())) {
/*
* Counters were updated so we expect more updates
* to occur in the future. Keep on running the
* update worker thread.
*/
queue_delayed_work_on(smp_processor_id(), mm_percpu_wq,
this_cpu_ptr(&vmstat_work),
round_jiffies_relative(sysctl_stat_interval));
}
}
/*
* Switch off vmstat processing and then fold all the remaining differentials
* until the diffs stay at zero. The function is used by NOHZ and can only be
* invoked when tick processing is not active.
*/
/*
* Check if the diffs for a certain cpu indicate that
* an update is needed.
*/
static bool need_update(int cpu)
{
struct zone *zone;
for_each_populated_zone(zone) {
struct per_cpu_pageset *p = per_cpu_ptr(zone->pageset, cpu);
BUILD_BUG_ON(sizeof(p->vm_stat_diff[0]) != 1);
#ifdef CONFIG_NUMA
BUILD_BUG_ON(sizeof(p->vm_numa_stat_diff[0]) != 2);
#endif
/*
* The fast way of checking if there are any vmstat diffs.
*/
if (memchr_inv(p->vm_stat_diff, 0, NR_VM_ZONE_STAT_ITEMS *
sizeof(p->vm_stat_diff[0])))
return true;
#ifdef CONFIG_NUMA
if (memchr_inv(p->vm_numa_stat_diff, 0, NR_VM_NUMA_STAT_ITEMS *
sizeof(p->vm_numa_stat_diff[0])))
return true;
#endif
}
return false;
}
/*
* Switch off vmstat processing and then fold all the remaining differentials
* until the diffs stay at zero. The function is used by NOHZ and can only be
* invoked when tick processing is not active.
*/
void quiet_vmstat(void)
{
if (system_state != SYSTEM_RUNNING)
return;
if (!delayed_work_pending(this_cpu_ptr(&vmstat_work)))
return;
if (!need_update(smp_processor_id()))
return;
/*
* Just refresh counters and do not care about the pending delayed
* vmstat_update. It doesn't fire that often to matter and canceling
* it would be too expensive from this path.
* vmstat_shepherd will take care about that for us.
*/
refresh_cpu_vm_stats(false);
}
/*
* Shepherd worker thread that checks the
* differentials of processors that have their worker
* threads for vm statistics updates disabled because of
* inactivity.
*/
static void vmstat_shepherd(struct work_struct *w);
static DECLARE_DEFERRABLE_WORK(shepherd, vmstat_shepherd);
static void vmstat_shepherd(struct work_struct *w)
{
int cpu;
get_online_cpus();
/* Check processors whose vmstat worker threads have been disabled */
for_each_online_cpu(cpu) {
struct delayed_work *dw = &per_cpu(vmstat_work, cpu);
if (!delayed_work_pending(dw) && need_update(cpu) &&
!cpu_isolated(cpu))
queue_delayed_work_on(cpu, mm_percpu_wq, dw, 0);
}
put_online_cpus();
schedule_delayed_work(&shepherd,
round_jiffies_relative(sysctl_stat_interval));
}
static void __init start_shepherd_timer(void)
{
int cpu;
for_each_possible_cpu(cpu)
INIT_DEFERRABLE_WORK(per_cpu_ptr(&vmstat_work, cpu),
vmstat_update);
schedule_delayed_work(&shepherd,
round_jiffies_relative(sysctl_stat_interval));
}
static void __init init_cpu_node_state(void)
{
int node;
for_each_online_node(node) {
if (cpumask_weight(cpumask_of_node(node)) > 0)
node_set_state(node, N_CPU);
}
}
static int vmstat_cpu_online(unsigned int cpu)
{
refresh_zone_stat_thresholds();
node_set_state(cpu_to_node(cpu), N_CPU);
return 0;
}
static int vmstat_cpu_down_prep(unsigned int cpu)
{
cancel_delayed_work_sync(&per_cpu(vmstat_work, cpu));
return 0;
}
static int vmstat_cpu_dead(unsigned int cpu)
{
const struct cpumask *node_cpus;
int node;
node = cpu_to_node(cpu);
refresh_zone_stat_thresholds();
node_cpus = cpumask_of_node(node);
if (cpumask_weight(node_cpus) > 0)
return 0;
node_clear_state(node, N_CPU);
return 0;
}
#endif
struct workqueue_struct *mm_percpu_wq;
void __init init_mm_internals(void)
{
int ret __maybe_unused;
mm_percpu_wq = alloc_workqueue("mm_percpu_wq", WQ_MEM_RECLAIM, 0);
#ifdef CONFIG_SMP
ret = cpuhp_setup_state_nocalls(CPUHP_MM_VMSTAT_DEAD, "mm/vmstat:dead",
NULL, vmstat_cpu_dead);
if (ret < 0)
pr_err("vmstat: failed to register 'dead' hotplug state\n");
ret = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "mm/vmstat:online",
vmstat_cpu_online,
vmstat_cpu_down_prep);
if (ret < 0)
pr_err("vmstat: failed to register 'online' hotplug state\n");
get_online_cpus();
init_cpu_node_state();
put_online_cpus();
start_shepherd_timer();
#endif
#ifdef CONFIG_PROC_FS
proc_create_seq("buddyinfo", 0444, NULL, &fragmentation_op);
proc_create_seq("pagetypeinfo", 0444, NULL, &pagetypeinfo_op);
proc_create_seq("vmstat", 0444, NULL, &vmstat_op);
proc_create_seq("zoneinfo", 0444, NULL, &zoneinfo_op);
#endif
}
#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_COMPACTION)
/*
* Return an index indicating how much of the available free memory is
* unusable for an allocation of the requested size.
*/
static int unusable_free_index(unsigned int order,
struct contig_page_info *info)
{
/* No free memory is interpreted as all free memory is unusable */
if (info->free_pages == 0)
return 1000;
/*
* Index should be a value between 0 and 1. Return a value to 3
* decimal places.
*
* 0 => no fragmentation
* 1 => high fragmentation
*/
return div_u64((info->free_pages - (info->free_blocks_suitable << order)) * 1000ULL, info->free_pages);
}
static void unusable_show_print(struct seq_file *m,
pg_data_t *pgdat, struct zone *zone)
{
unsigned int order;
int index;
struct contig_page_info info;
seq_printf(m, "Node %d, zone %8s ",
pgdat->node_id,
zone->name);
for (order = 0; order < MAX_ORDER; ++order) {
fill_contig_page_info(zone, order, &info);
index = unusable_free_index(order, &info);
seq_printf(m, "%d.%03d ", index / 1000, index % 1000);
}
seq_putc(m, '\n');
}
/*
* Display unusable free space index
*
* The unusable free space index measures how much of the available free
* memory cannot be used to satisfy an allocation of a given size and is a
* value between 0 and 1. The higher the value, the more of free memory is
* unusable and by implication, the worse the external fragmentation is. This
* can be expressed as a percentage by multiplying by 100.
*/
static int unusable_show(struct seq_file *m, void *arg)
{
pg_data_t *pgdat = (pg_data_t *)arg;
/* check memoryless node */
if (!node_state(pgdat->node_id, N_MEMORY))
return 0;
walk_zones_in_node(m, pgdat, true, false, unusable_show_print);
return 0;
}
static const struct seq_operations unusable_op = {
.start = frag_start,
.next = frag_next,
.stop = frag_stop,
.show = unusable_show,
};
static int unusable_open(struct inode *inode, struct file *file)
{
return seq_open(file, &unusable_op);
}
static const struct file_operations unusable_file_ops = {
.open = unusable_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
};
static void extfrag_show_print(struct seq_file *m,
pg_data_t *pgdat, struct zone *zone)
{
unsigned int order;
int index;
/* Alloc on stack as interrupts are disabled for zone walk */
struct contig_page_info info;
seq_printf(m, "Node %d, zone %8s ",
pgdat->node_id,
zone->name);
for (order = 0; order < MAX_ORDER; ++order) {
fill_contig_page_info(zone, order, &info);
index = __fragmentation_index(order, &info);
seq_printf(m, "%d.%03d ", index / 1000, index % 1000);
}
seq_putc(m, '\n');
}
/*
* Display fragmentation index for orders that allocations would fail for
*/
static int extfrag_show(struct seq_file *m, void *arg)
{
pg_data_t *pgdat = (pg_data_t *)arg;
walk_zones_in_node(m, pgdat, true, false, extfrag_show_print);
return 0;
}
static const struct seq_operations extfrag_op = {
.start = frag_start,
.next = frag_next,
.stop = frag_stop,
.show = extfrag_show,
};
static int extfrag_open(struct inode *inode, struct file *file)
{
return seq_open(file, &extfrag_op);
}
static const struct file_operations extfrag_file_ops = {
.open = extfrag_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
};
static int __init extfrag_debug_init(void)
{
struct dentry *extfrag_debug_root;
extfrag_debug_root = debugfs_create_dir("extfrag", NULL);
if (!extfrag_debug_root)
return -ENOMEM;
if (!debugfs_create_file("unusable_index", 0444,
extfrag_debug_root, NULL, &unusable_file_ops))
goto fail;
if (!debugfs_create_file("extfrag_index", 0444,
extfrag_debug_root, NULL, &extfrag_file_ops))
goto fail;
return 0;
fail:
debugfs_remove_recursive(extfrag_debug_root);
return -ENOMEM;
}
module_init(extfrag_debug_init);
#endif