android_kernel_samsung_sm8650/Makefile
jianzhou 63bb445b95 Merge keystone/android14-6.1-keystone-qcom-release.6.1.20 (2be6a1c) into msm-pineapple
* refs/heads/tmp-2be6a1c:
  ANDROID: mm: add get_page_owner_handle function
  ANDROID: mm: add get_each_object_track function
  ANDROID: mm: Export get_slabinfo
  ANDROID: mm: Export page_ext_[get|put]
  ANDROID: mm: Export si_swapinfo
  ANDROID: mm: Export vmalloc_nr_pages
  ANDROID: mm: Export pcpu_nr_pages
  ANDROID: dma-buf: add dma_buf_get_each function
  ANDROID: abi_gki_aarch64_qcom: Update symbol list
  Revert "HID: core: Provide new max_buffer_size attribute to over-ride the default"
  Revert "HID: uhid: Over-ride the default maximum data buffer value with our own"
  Revert "ANDROID: sound: usb: Add vendor hooks for connect & disconnect"
  Revert "ANDROID: usb: host: export additional xhci symbols for ring management"
  Revert "ANDROID: sound: usb: Export symbols for endpoint management"
  ANDROID: abi_gki_aarch64_qcom: Sort list
  ANDROID: of: of_reserved_mem: Increase limit for reserved_mem regions
  ANDROID: update the db845c symbol list
  ANDROID: Update the .stg file due to internal io_uring changes
  Revert "netfilter: ctnetlink: make event listener tracking global"
  Revert "PCI: loongson: Prevent LS7A MRRS increases"
  Revert "PCI: loongson: Add more devices that need MRRS quirk"
  ANDROID: remove CONFIG_NET_CLS_TCINDEX from gki_defconfig
  ANDROID: GKI: Enable USB C DP alternate mode support
  ANDROID: abi_gki_aarch64_qcom: Add USB offload symbols
  ANDROID: sound: usb: Add vendor hooks for connect & disconnect
  ANDROID: sound: usb: Export symbols for endpoint management
  ANDROID: usb: host: export additional xhci symbols for ring management
  ANDROID: ABI: Update QCOM symbol list
  FROMGIT: f2fs: remove entire rb_entry sharing
  FROMGIT: f2fs: factor out discard_cmd usage from general rb_tree use
  FROMGIT: f2fs: factor out victim_entry usage from general rb_tree use
  UPSTREAM: loop: Fix use-after-free issues
  ANDROID: fuse-bpf: Correctly put backing files
  ANDROID: Revert "psi: allow unprivileged users with CAP_SYS_RESOURCE to write psi files"
  ANDROID: gic: Add vendor hook for gic-v3 resume
  ANDROID: abi_gki_aarch64_qcom: add system_freezable_power_efficient_wq
  ANDROID: GKI: arm64: Enable KMI strict mode
  ANDROID: GKI: QCOM: Remove stale symbols
  FROMGIT: usb: dwc3: gadget: Add 1ms delay after end transfer command without IOC
  Linux 6.1.20
  UML: define RUNTIME_DISCARD_EXIT
  Revert "bpf, test_run: fix &xdp_frame misplacement for LIVE_FRAMES"
  filelocks: use mount idmapping for setlease permission check
  drm/amd/display: adjust MALL size available for DCN32 and DCN321
  drm/amd/display: Allow subvp on vactive pipes that are 2560x1440@60
  media: rc: gpio-ir-recv: add remove function
  media: ov5640: Fix analogue gain control
  scripts: handle BrokenPipeError for python scripts
  PCI: Add SolidRun vendor ID
  macintosh: windfarm: Use unsigned type for 1-bit bitfields
  alpha: fix R_ALPHA_LITERAL reloc for large modules
  powerpc/kcsan: Exclude udelay to prevent recursive instrumentation
  powerpc/64: Move paca allocation to early_setup()
  powerpc/64: Fix task_cpu in early boot when booting non-zero cpuid
  powerpc/bpf/32: Only set a stack frame when necessary
  clk: renesas: rcar-gen3: Disable R-Car H3 ES1.*
  powerpc/iommu: fix memory leak with using debugfs_lookup()
  powerpc/64: Don't recurse irq replay
  MIPS: Fix a compilation issue
  tpm/eventlog: Don't abort tpm_read_log on faulty ACPI address
  watch_queue: fix IOC_WATCH_QUEUE_SET_SIZE alloc error paths
  drm/msm/adreno: fix runtime PM imbalance at unbind
  adreno: Shutdown the GPU properly
  drm/amdgpu/soc21: Add video cap query support for VCN_4_0_4
  drm/amdgpu/soc21: don't expose AV1 if VCN0 is harvested
  ext4: Fix deadlock during directory rename
  drm/amdgpu: fix return value check in kfd
  RISC-V: Don't check text_mutex during stop_machine
  riscv: Use READ_ONCE_NOCHECK in imprecise unwinding stack mode
  erofs: Revert "erofs: fix kvcalloc() misuse with __GFP_NOFAIL"
  af_unix: fix struct pid leaks in OOB support
  net: dsa: mt7530: permit port 5 to work without port 6 on MT7621 SoC
  SUNRPC: Fix a server shutdown leak
  octeontx2-af: Unlock contexts in the queue context cache in case of fault detection
  net/smc: fix fallback failed while sendmsg with fastopen
  ethernet: ice: avoid gcc-9 integer overflow warning
  ice: Fix DSCP PFC TLV creation
  NFSD: Protect against filesystem freezing
  block: fix wrong mode for blkdev_put() from disk_scan_partitions()
  platform: x86: MLX_PLATFORM: select REGMAP instead of depending on it
  platform: mellanox: select REGMAP instead of depending on it
  netfilter: conntrack: adopt safer max chain length
  scsi: sd: Fix wrong zone_write_granularity value during revalidate
  scsi: megaraid_sas: Update max supported LD IDs to 240
  net: tls: fix device-offloaded sendpage straddling records
  net: ethernet: mtk_eth_soc: fix RX data corruption issue
  net: phy: smsc: fix link up detection in forced irq mode
  btf: fix resolving BTF_KIND_VAR after ARRAY, STRUCT, UNION, PTR
  bpf, test_run: fix &xdp_frame misplacement for LIVE_FRAMES
  btrfs: fix extent map logging bit not cleared for split maps after dropping range
  m68k: mm: Move initrd phys_to_virt handling after paging_init()
  netfilter: tproxy: fix deadlock due to missing BH disable
  netfilter: ctnetlink: revert to dumping mark regardless of event type
  bnxt_en: Avoid order-5 memory allocation for TPA data
  net: phylib: get rid of unnecessary locking
  net: stmmac: add to set device wake up flag when stmmac init phy
  drm/msm/dpu: clear DSPP reservations in rm release
  drm/msm/dpu: fix clocks settings for msm8998 SSPP blocks
  drm/msm/dpu: drop DPU_DIM_LAYER from MIXER_MSM8998_MASK
  drm/msm/dpu: fix len of sc7180 ctl blocks
  bpf, sockmap: Fix an infinite loop error when len is 0 in tcp_bpf_recvmsg_parser()
  ice: copy last block omitted in ice_get_module_eeprom()
  net: caif: Fix use-after-free in cfusbl_device_notify()
  net: lan78xx: fix accessing the LAN7800's internal phy specific registers from the MAC driver
  perf stat: Fix counting when initial delay configured
  net: use indirect calls helpers for sk_exit_memory_pressure()
  net: tls: fix possible race condition between do_tls_getsockopt_conf() and do_tls_setsockopt_conf()
  netfilter: nft_quota: copy content when cloning expression
  netfilter: nft_last: copy content when cloning expression
  selftests: nft_nat: ensuring the listening side is up before starting the client
  net: lan966x: Fix port police support using tc-matchall
  ila: do not generate empty messages in ila_xlat_nl_cmd_get_mapping()
  drm/msm/dpu: disable features unsupported by QCM2290
  tls: rx: fix return value for async crypto
  powerpc: dts: t1040rdb: fix compatible string for Rev A boards
  nfc: fdp: add null check of devm_kmalloc_array in fdp_nci_i2c_read_device_properties
  bgmac: fix *initial* chip reset to support BCM5358
  drm/msm/a5xx: fix context faults during ring switch
  drm/msm/a5xx: fix the emptyness check in the preempt code
  drm/msm/a5xx: fix highest bank bit for a530
  drm/msm/a5xx: fix setting of the CP_PREEMPT_ENABLE_LOCAL register
  drm/msm: Fix potential invalid ptr free
  drm/nouveau/kms/nv50: fix nv50_wndw_new_ prototype
  cifs: improve checking of DFS links over STATUS_OBJECT_NAME_INVALID
  ext4: Fix possible corruption when moving a directory
  scsi: core: Remove the /proc/scsi/${proc_name} directory earlier
  riscv: Add header include guards to insn.h
  block: fix scan partition for exclusively open device again
  block: Revert "block: Do not reread partition table on exclusively open device"
  drm/i915: Populate encoder->devdata for DSI on icl+
  drm/i915: Do panel VBT init early if the VBT declares an explicit panel type
  drm/i915: Introduce intel_panel_init_alloc()
  spi: intel: Check number of chip selects after reading the descriptor
  ipmi:ssif: Add a timer between request retries
  ipmi:ssif: Increase the message retry time
  ipmi:ssif: Remove rtc_us_timer
  Input: exc3000 - properly stop timer on shutdown
  bus: mhi: ep: Change state_lock to mutex
  bus: mhi: ep: Power up/down MHI stack during MHI RESET
  udf: Fix off-by-one error when discarding preallocation
  fs: dlm: fix race setting stop tx flag
  fs: dlm: be sure to call dlm_send_queue_flush()
  fs: dlm: use WARN_ON_ONCE() instead of WARN_ON()
  fs: dlm: fix use after free in midcomms commit
  fd: dlm: trace send/recv of dlm message and rcom
  fs: dlm: use packet in dlm_mhandle
  fs: dlm: remove send repeat remove handling
  fs: dlm: start midcomms before scand
  fs: dlm: add midcomms init/start functions
  fs: dlm: fix log of lowcomms vs midcomms
  KVM: VMX: Do _all_ initialization before exposing /dev/kvm to userspace
  KVM: x86: Move guts of kvm_arch_init() to standalone helper
  KVM: VMX: Don't bother disabling eVMCS static key on module exit
  KVM: VMX: Reset eVMCS controls in VP assist page during hardware disabling
  nfc: change order inside nfc_se_io error path
  HID: uhid: Over-ride the default maximum data buffer value with our own
  HID: core: Provide new max_buffer_size attribute to over-ride the default
  ext4: zero i_disksize when initializing the bootloader inode
  ext4: fix WARNING in ext4_update_inline_data
  ext4: move where set the MAY_INLINE_DATA flag is set
  ext4: fix another off-by-one fsmap error on 1k block filesystems
  ext4: fix RENAME_WHITEOUT handling for inline directories
  ext4: fix cgroup writeback accounting with fs-layer encryption
  staging: rtl8723bs: Pass correct parameters to cfg80211_get_bss()
  staging: rtl8723bs: Fix key-store index handling
  drm/connector: print max_requested_bpc in state debugfs
  drm/display: Don't block HDR_OUTPUT_METADATA on unknown EOTF
  drm/amdgpu: fix error checking in amdgpu_read_mm_registers for nv
  drm/amdgpu: fix error checking in amdgpu_read_mm_registers for soc21
  drm/amdgpu: fix error checking in amdgpu_read_mm_registers for soc15
  x86/CPU/AMD: Disable XSAVES on AMD family 0x17
  RISC-V: Stop emitting attributes
  fork: allow CLONE_NEWTIME in clone3 flags
  perf inject: Fix --buildid-all not to eat up MMAP2
  erofs: fix wrong kunmap when using LZMA on HIGHMEM platforms
  io_uring/uring_cmd: ensure that device supports IOPOLL
  btrfs: fix percent calculation for bg reclaim message
  btrfs: fix unnecessary increment of read error stat on write error
  fs: prevent out-of-bounds array speculation when closing a file descriptor
  ANDROID: remove CONFIG_NET_CLS_TCINDEX from gki_defconfig
  ANDROID: abi_gki_aarch64_qcom: update symbol list
  ANDROID: further fix incorrectly submitted KMI update
  ANDROID: fix incorrectly submitted KMI update
  ANDROID: ABI: Update QCOM symbol list
  ANDROID: thermal: vendor hook to disable thermal cooling stats
  ANDROID: GKI: 3/15/2023 KMI update
  ANDROID: GKI: Enable MGLRU by default
  Revert "Revert "sched/psi: Stop relying on timer_pending() for poll_work rescheduling""
  ANDROID: update db845c symbol list
  UPSTREAM: scsi: ufs: core: Simplify ufshcd_execute_start_stop()
  UPSTREAM: scsi: ufs: core: Rely on the block layer for setting RQF_PM
  UPSTREAM: scsi: ufs: mcq: Fix incorrectly set queue depth
  UPSTREAM: scsi: ufs: ufs-mediatek: Guard power management functions with CONFIG_PM
  UPSTREAM: scsi: ufs: core: Initialize devfreq synchronously
  UPSTREAM: scsi: ufs: Make the TC G210 driver dependent on CONFIG_OF
  UPSTREAM: scsi: ufs: core: Fix an error handling path in ufshcd_read_desc_param()
  UPSTREAM: scsi: ufs: core: Fix kernel-doc syntax
  UPSTREAM: scsi: ufs: core: Add hibernation callbacks
  UPSTREAM: scsi: ufs: core: Limit DMA alignment check
  UPSTREAM: scsi: ufs: ufs-qcom: Clear qunipro_g4_sel for HW version major 5
  UPSTREAM: scsi: ufs: qcom: fix platform_msi_domain_free_irqs() reference
  UPSTREAM: scsi: core: Extend struct scsi_exec_args
  UPSTREAM: scsi: core: Remove scsi_execute_req()/scsi_execute() functions
  UPSTREAM: scsi: cxlflash: Convert to scsi_execute_cmd()
  UPSTREAM: scsi: target: target_core_pscsi: Convert to scsi_execute_cmd()
  UPSTREAM: scsi: virtio_scsi: Convert to scsi_execute_cmd()
  UPSTREAM: scsi: sr: Convert to scsi_execute_cmd()
  UPSTREAM: scsi: ses: Convert to scsi_execute_cmd()
  UPSTREAM: scsi: zbc: Convert to scsi_execute_cmd()
  UPSTREAM: scsi: sd: Convert to scsi_execute_cmd()
  UPSTREAM: scsi: spi: Convert to scsi_execute_cmd()
  UPSTREAM: scsi: core: Convert to scsi_execute_cmd()
  UPSTREAM: scsi: scsi_dh: Convert to scsi_execute_cmd()
  UPSTREAM: scsi: ch: Convert to scsi_execute_cmd()
  UPSTREAM: scsi: hwmon: drivetemp: Convert to scsi_execute_cmd()
  UPSTREAM: scsi: ata: libata-scsi: Convert to scsi_execute_cmd()
  UPSTREAM: scsi: core: Add struct for args to execution functions
  UPSTREAM: scsi: core: Fix the scsi_device_put() might_sleep annotation
  UPSTREAM: scsi: core: scsi_error: Do not queue pointless abort workqueue functions
  ANDROID: scsi: ufs: Enable CONFIG_SCSI_UFS_VARIABLE_SG_ENTRY_SIZE if encryption is enabled
  FROMGIT: scsi: ufs: core: Enable DMA clustering
  FROMGIT: scsi: ufs: exynos: Fix the maximum segment size
  FROMGIT: scsi: ufs: ufs: Remove duplicate entry
  FROMGIT: scsi: ufs: qcom: Add MCQ ESI config vendor specific ops
  FROMGIT: scsi: ufs: core: mcq: Add Event Specific Interrupt enable and config functions
  FROMGIT: scsi: ufs: core: Add Event Specific Interrupt configuration vendor specific ops
  FROMGIT: scsi: ufs: core: mcq: Enable multi-circular queue
  FROMGIT: scsi: ufs: core: mcq: Add completion support in poll
  FROMGIT: scsi: ufs: mcq: Add completion support of a CQE
  FROMGIT: scsi: ufs: core: Prepare for completion in MCQ
  FROMGIT: scsi: ufs: core: mcq: Find hardware queue to queue request
  FROMGIT: scsi: ufs: core: Prepare ufshcd_send_command() for MCQ
  FROMGIT: scsi: ufs: core: mcq: Use shared tags for MCQ mode
  FROMGIT: scsi: ufs: core: mcq: Configure operation and runtime interface
  FROMGIT: scsi: ufs: core: mcq: Allocate memory for MCQ mode
  FROMGIT: scsi: ufs: core: mcq: Calculate queue depth
  FROMGIT: scsi: ufs: core: mcq: Configure resource regions
  FROMGIT: scsi: ufs: core: mcq: Add support to allocate multiple queues
  FROMGIT: scsi: ufs: core: Defer adding host to SCSI if MCQ is supported
  FROMGIT: scsi: ufs: core: Introduce multi-circular queue capability
  FROMGIT: scsi: ufs: core: Probe for EXT_IID support
  FROMGIT: scsi: core: Fix invisible definition compilation warning
  FROMGIT: scsi: ufs: core: bsg: Fix sometimes-uninitialized warnings
  FROMGIT: scsi: ufs: ufs-qcom: Add support for finding max gear on new platforms
  FROMGIT: scsi: ufs: ufs-qcom: Add support for reinitializing the UFS device
  FROMGIT: scsi: ufs: ufs-qcom: Factor out the logic finding the HS Gear
  FROMGIT: scsi: ufs: core: Add reinit_notify() callback
  FROMGIT: scsi: ufs: ufs-qcom: Fix the Qcom register name for offset 0xD0
  FROMGIT: scsi: ufs: ufs-qcom: Use dev_err_probe() for printing probe error
  FROMGIT: scsi: ufs: ufs-qcom: Use bitfields where appropriate
  FROMGIT: scsi: ufs: ufs-qcom: Remove unnecessary WARN_ON()
  FROMGIT: scsi: ufs: ufs-qcom: Remove unnecessary goto statements
  FROMGIT: scsi: ufs: ufs-unisoc: Add support for Unisoc UFS host controller
  FROMGIT: scsi: ufs: core: Remove ufshcd_map_desc_id_to_length()
  FROMGIT: scsi: ufs: core: Remove len parameter from ufshcd_set_active_icc_lvl()
  FROMGIT: scsi: ufs: core: Remove redundant desc_size variable from hba
  FROMGIT: scsi: ufs: core: Remove redundant wb check
  FROMGIT: scsi: ufs: core: Allow UFS host drivers to override the sg entry size
  FROMGIT: scsi: ufs: core: Pass the clock scaling timeout as an argument
  FROMGIT: scsi: ufs: core: Reduce the clock scaling latency
  FROMGIT: scsi: ufs: ufs-qcom: Use dev_err() where possible
  FROMGIT: scsi: ufs: ufs-qcom: Remove usage of dbg_print_en
  FROMGIT: scsi: ufs: ufs-qcom: Clean up dbg_register_dump
  FROMGIT: scsi: ufs: ufs-qcom: Drop unnecessary NULL checks
  FROMGIT: scsi: ufs: core: bsg: Add advanced RPMB support in ufs_bsg
  FROMGIT: scsi: ufs: core: Pass EHS length into ufshcd_prepare_req_desc_hdr()
  FROMGIT: scsi: ufs: core: Advanced RPMB detection
  FROMGIT: scsi: ufs: core: Remove check_upiu_size() from ufshcd.h
  FROMGIT: scsi: ufs: Fix a deadlock between PM and the SCSI error handler
  FROMGIT: scsi: ufs: Track system suspend / resume activity
  FROMGIT: scsi: core: Support failing requests while recovering
  FROMGIT: scsi: core: Change the return type of .eh_timed_out()
  ANDROID: Disable AF_RXRPC for allmodconfig.
  UPSTREAM: arm64: pass ESR_ELx to die() of cfi_handler
  UPSTREAM: block: Fix the blk_mq_destroy_queue() documentation
  ANDROID: KVM: arm64: pKVM module loading before deprivilege
  ANDROID: KVM: arm64: Move pKVM host deprivilege to device_initcall
  ANDROID: KVM: arm64: Cleanup useless declarations
  ANDROID: CONFIG_MODPROBE_PATH to toolbox's modprobe
  ANDROID: ABI: update symbol list for galaxy
  ANDROID: arm64: add vendor hooks for unusal abort cases
  ANDROID: arm64: add vendor hooks for kernel fault cases
  ANDROID: power: add vendor hooks for try_to_freeze fail
  ANDROID: softlockup: add vendor hook for a softlockup task
  ANDROID: bug: add vendor hook for bug trap
  ANDROID: update abi definition due to io_uring changes.
  UPSTREAM: Revert "blk-cgroup: dropping parent refcount after pd_free_fn() is done"
  UPSTREAM: Revert "blk-cgroup: synchronize pd_free_fn() from blkg_free_workfn() and blkcg_deactivate_policy()"
  Revert "kobject: modify kobject_get_path() to take a const *"
  Revert "wait: Return number of exclusive waiters awaken"
  Revert "sbitmap: Use single per-bitmap counting to wake up queued tags"
  Revert "sbitmap: correct wake_batch recalculation to avoid potential IO hung"
  Revert "sbitmap: Advance the queue index before waking up a queue"
  Revert "sbitmap: Try each queue to wake up at least one waiter"
  Revert "HID: retain initial quirks set up when creating HID devices"
  ANDROID: abi_gki_aarch64_qcom: Add vma apis
  ANDROID: KVM: arm64: Move hyp events in a hyp/ folder
  ANDROID: KVM: arm64: Allow single char for hyp tracing interface
  ANDROID: KVM: arm64: Hyp tracing polling to 100ms
  ANDROID: KVM: arm64: Fix nVHE enter/exit events
  ANDROID: KVM: arm64: Handle pipe buffer overflow for hyp tracing
  ANDROID: KVM: arm64: Flush hyp trace pipe when tracing stops
  ANDROID: ring-buffer: Fix ring_buffer_read_page for external writers
  ANDROID: KVM: arm64: Add trace_clock for nVHE tracing
  ANDROID: KVM: arm64: Add common "trace_pipe" file for hyp tracing
  ANDROID: KVM: arm64: Allow to reset hyp trace buffers
  ANDROID: KVM: arm64: Add common "trace" file for hyp tracing
  ANDROID: KVM: arm64: Add __pkvm_enable_tracing
  ANDROID: KVM: arm64: Empty buffer support for hyp tracing trace file
  ANDROID: KVM: arm64: Rename nVHE hyp event ELF sections
  Linux 6.1.19
  staging: rtl8192e: Remove call_usermodehelper starting RadioPower.sh
  staging: rtl8192e: Remove function ..dm_check_ac_dc_power calling a script
  wifi: cfg80211: Partial revert "wifi: cfg80211: Fix use after free for wext"
  tpm: disable hwrng for fTPM on some AMD designs
  Linux 6.1.18
  usb: gadget: uvc: fix missing mutex_unlock() if kstrtou8() fails
  arm64: Reset KASAN tag in copy_highpage with HW tags only
  arm64: mte: Fix/clarify the PG_mte_tagged semantics
  arm64: efi: Make efi_rt_lock a raw_spinlock
  io_uring/poll: allow some retries for poll triggering spuriously
  io_uring: fix two assignments in if conditions
  media: uvcvideo: Fix race condition with usb_kill_urb
  drm/i915: Fix system suspend without fbdev being initialized
  drm/i915/dp_mst: Add the MST topology state for modesetted CRTCs
  drm/display/dp_mst: Fix payload addition on a disconnected sink
  drm/display/dp_mst: Fix down message handling after a packet reception error
  drm/display/dp_mst: Fix down/up message handling after sink disconnect
  drm/display/dp_mst: Add drm_atomic_get_old_mst_topology_state()
  vDPA/ifcvf: allocate the adapter in dev_add()
  vDPA/ifcvf: manage ifcvf_hw in the mgmt_dev
  vDPA/ifcvf: ifcvf_request_irq works on ifcvf_hw
  vDPA/ifcvf: decouple config/dev IRQ requester and vectors allocator from the adapter
  vDPA/ifcvf: decouple vq irq requester from the adapter
  vDPA/ifcvf: decouple config IRQ releaser from the adapter
  vDPA/ifcvf: decouple vq IRQ releasers from the adapter
  vDPA/ifcvf: alloc the mgmt_dev before the adapter
  vDPA/ifcvf: decouple config space ops from the adapter
  vDPA/ifcvf: decouple hw features manipulators from the adapter
  x86/resctl: fix scheduler confusion with 'current'
  net: tls: avoid hanging tasks on the tx_lock
  soundwire: cadence: Drain the RX FIFO after an IO timeout
  soundwire: cadence: Remove wasted space in response_buf
  iommu: Attach device group to old domain in error path
  RDMA/cma: Distinguish between sockaddr_in and sockaddr_in6 by size
  phy: rockchip-typec: Fix unsigned comparison with less than zero
  PCI: pciehp: Add Qualcomm quirk for Command Completed erratum
  PCI: Add ACS quirk for Wangxun NICs
  PCI: loongson: Add more devices that need MRRS quirk
  kernel/fail_function: fix memory leak with using debugfs_lookup()
  drivers: base: dd: fix memory leak with using debugfs_lookup()
  drivers: base: component: fix memory leak with using debugfs_lookup()
  misc: vmw_balloon: fix memory leak with using debugfs_lookup()
  tty: pcn_uart: fix memory leak with using debugfs_lookup()
  PCI: Distribute available resources for root buses, too
  PCI: Take other bus devices into account when distributing resources
  PCI: Align extra resources for hotplug bridges properly
  usb: gadget: uvc: Make bSourceID read/write
  usb: uvc: Enumerate valid values for color matching
  USB: ene_usb6250: Allocate enough memory for full object
  usb: host: xhci: mvebu: Iterate over array indexes instead of using pointer math
  USB: gadget: pxa27x_udc: fix memory leak with using debugfs_lookup()
  USB: gadget: pxa25x_udc: fix memory leak with using debugfs_lookup()
  USB: gadget: lpc32xx_udc: fix memory leak with using debugfs_lookup()
  USB: gadget: bcm63xx_udc: fix memory leak with using debugfs_lookup()
  USB: gadget: gr_udc: fix memory leak with using debugfs_lookup()
  USB: isp1362: fix memory leak with using debugfs_lookup()
  USB: isp116x: fix memory leak with using debugfs_lookup()
  USB: fotg210: fix memory leak with using debugfs_lookup()
  USB: sl811: fix memory leak with using debugfs_lookup()
  USB: uhci: fix memory leak with using debugfs_lookup()
  USB: ULPI: fix memory leak with using debugfs_lookup()
  USB: chipidea: fix memory leak with using debugfs_lookup()
  USB: dwc3: fix memory leak with using debugfs_lookup()
  staging: pi433: fix memory leak with using debugfs_lookup()
  PCI: loongson: Prevent LS7A MRRS increases
  soundwire: bus_type: Avoid lockdep assert in sdw_drv_probe()
  media: uvcvideo: Add GUID for BGRA/X 8:8:8:8
  iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word()
  iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_status_word()
  bus: mhi: ep: Fix the debug message for MHI_PKT_TYPE_RESET_CHAN_CMD cmd
  tools/iio/iio_utils:fix memory leak
  mei: bus-fixup:upon error print return values of send and receive
  serial: sc16is7xx: setup GPIO controller later in probe
  tty: serial: fsl_lpuart: disable the CTS when send break signal
  tty: fix out-of-bounds access in tty_driver_lookup_tty()
  staging: emxx_udc: Add checks for dma_alloc_coherent()
  cacheinfo: Fix shared_cpu_map to handle shared caches at different levels
  USB: fix memory leak with using debugfs_lookup()
  media: uvcvideo: Silence memcpy() run-time false positive warnings
  media: uvcvideo: Quirk for autosuspend in Logitech B910 and C910
  media: uvcvideo: Handle errors from calls to usb_string
  media: uvcvideo: Handle cameras with invalid descriptors
  media: uvcvideo: Remove format descriptions
  PCI/ACPI: Account for _S0W of the target bridge in acpi_pci_bridge_d3()
  iommu/amd: Fix error handling for pdev_pri_ats_enable()
  IB/hfi1: Update RMT size calculation
  mfd: arizona: Use pm_runtime_resume_and_get() to prevent refcnt leak
  bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support
  firmware/efi sysfb_efi: Add quirk for Lenovo IdeaPad Duet 3
  kernel/printk/index.c: fix memory leak with using debugfs_lookup()
  tracing: Add NULL checks for buffer in ring_buffer_free_read_page()
  thermal: intel: BXT_PMIC: select REGMAP instead of depending on it
  thermal: intel: quark_dts: fix error pointer dereference
  ASoC: mediatek: mt8195: add missing initialization
  ASoC: zl38060 add gpiolib dependency
  nvme-fabrics: show well known discovery name
  nvme-tcp: don't access released socket during error recovery
  nvme: bring back auto-removal of deleted namespaces during sequential scan
  ASoC: apple: mca: Improve handling of unavailable DMA channels
  ASoC: apple: mca: Fix SERDES reset sequence
  ASoC: apple: mca: Fix final status read on SERDES reset
  ASoC: adau7118: don't disable regulators on device unbind
  loop: loop_set_status_from_info() check before assignment
  io_uring: fix size calculation when registering buf ring
  rtc: allow rtc_read_alarm without read_alarm callback
  scsi: mpi3mr: Use number of bits to manage bitmap sizes
  scsi: mpi3mr: Fix an issue found by KASAN
  scsi: ipr: Work around fortify-string warning
  genirq/ipi: Fix NULL pointer deref in irq_data_get_affinity_mask()
  rtc: sun6i: Always export the internal oscillator
  spi: tegra210-quad: Fix iterator outside loop
  vc_screen: modify vcs_size() handling in vcs_read()
  tcp: tcp_check_req() can be called from process context
  ARM: dts: spear320-hmi: correct STMPE GPIO compatible
  net: dsa: felix: fix internal MDIO controller resource length
  net: dsa: seville: ignore mscc-miim read errors from Lynx PCS
  net/sched: act_sample: fix action bind logic
  net/sched: act_mpls: fix action bind logic
  net/sched: act_pedit: fix action bind logic
  net/sched: transition act_pedit to rcu and percpu stats
  nfc: fix memory leak of se_io context in nfc_genl_se_io
  ext4: fix incorrect options show of original mount_opt and extend mount_opt2
  net/mlx5: Geneve, Fix handling of Geneve object id as error code
  net/mlx5e: Verify flow_source cap before using it
  net/mlx5: ECPF, wait for VF pages only after disabling host PFs
  mlx5: fix possible ptp queue fifo use-after-free
  mlx5: fix skb leak while fifo resync and push
  spi: tegra210-quad: Fix validate combined sequence
  9p/rdma: unmap receive dma buffer in rdma_request()/post_recv()
  9p/xen: fix connection sequence
  9p/xen: fix version parsing
  net: fix __dev_kfree_skb_any() vs drop monitor
  octeontx2-pf: Use correct struct reference in test condition
  sctp: add a refcnt in sctp_stream_priorities to avoid a nested loop
  net: sunhme: Fix region request
  octeontx2-pf: Recalculate UDP checksum for ptp 1-step sync packet
  ipv6: Add lwtunnel encap size of all siblings in nexthop calculation
  drm/i915: move a Kconfig symbol to unbreak the menu presentation
  ptp: vclock: use mutex to fix "sleep on atomic" bug
  netfilter: x_tables: fix percpu counter block leak on error path when creating new netns
  netfilter: ctnetlink: make event listener tracking global
  netfilter: xt_length: use skb len to match in length_mt6
  netfilter: ebtables: fix table blob use-after-free
  netfilter: ip6t_rpfilter: Fix regression with VRF interfaces
  netfilter: conntrack: fix rmmod double-free race
  netfilter: ctnetlink: fix possible refcount leak in ctnetlink_create_conntrack()
  watchdog: sbsa_wdog: Make sure the timeout programming is within the limits
  watchdog: pcwd_usb: Fix attempting to access uninitialized memory
  watchdog: Fix kmemleak in watchdog_cdev_register
  watchdog: at91sam9_wdt: use devm_request_irq to avoid missing free_irq() in error path
  watchdog: rzg2l_wdt: Handle TYPE-B reset for RZ/V2M
  watchdog: rzg2l_wdt: Issue a reset before we put the PM clocks
  f2fs: synchronize atomic write aborts
  um: virt-pci: properly remove PCI device from bus
  um: virtio_uml: move device breaking into workqueue
  um: virtio_uml: mark device as unregistered when breaking it
  um: virtio_uml: free command if adding to virtqueue failed
  x86: um: vdso: Add '%rcx' and '%r11' to the syscall clobber list
  netfilter: nf_tables: allow to fetch set elements when table has an owner
  ext4: don't show commit interval if it is zero
  ext4: use ext4_fc_tl_mem in fast-commit replay path
  soc: qcom: stats: Populate all subsystem debugfs files
  f2fs: fix to avoid potential memory corruption in __update_iostat_latency()
  ubi: ubi_wl_put_peb: Fix infinite loop when wear-leveling work failed
  ubi: Fix UAF wear-leveling entry in eraseblk_count_seq_show()
  ubi: fastmap: Fix missed fm_anchor PEB in wear-leveling after disabling fastmap
  ubifs: ubifs_releasepage: Remove ubifs_assert(0) to valid this process
  ubifs: ubifs_writepage: Mark page dirty after writing inode failed
  ubifs: dirty_cow_znode: Fix memleak in error handling path
  ubifs: Re-statistic cleaned znode count if commit failed
  ubi: Fix possible null-ptr-deref in ubi_free_volume()
  ubifs: Fix memory leak in alloc_wbufs()
  ubi: Fix unreferenced object reported by kmemleak in ubi_resize_volume()
  ubi: Fix use-after-free when volume resizing failed
  ubifs: Reserve one leb for each journal head while doing budget
  ubifs: do_rename: Fix wrong space budget when target inode's nlink > 1
  ubifs: Fix wrong dirty space budget for dirty inode
  ubifs: Rectify space budget for ubifs_xrename()
  ubifs: Rectify space budget for ubifs_symlink() if symlink is encrypted
  ubifs: Fix memory leak in ubifs_sysfs_init()
  ubifs: Fix build errors as symbol undefined
  ubi: ensure that VID header offset + VID header size <= alloc, size
  um: vector: Fix memory leak in vector_config
  f2fs: fix to abort atomic write only during do_exist()
  f2fs: allow set compression option of files without blocks
  fs: f2fs: initialize fsdata in pagecache_write()
  soc: mediatek: mtk-svs: Use pm_runtime_resume_and_get() in svs_init01()
  soc: mediatek: mtk-svs: reset svs when svs_resume() fail
  soc: mediatek: mtk-svs: restore default voltages when svs_init02() fail
  f2fs: clear atomic_write_task in f2fs_abort_atomic_write()
  f2fs: correct i_size change for atomic writes
  f2fs: introduce trace_f2fs_replace_atomic_write_block
  pwm: stm32-lp: fix the check on arr and cmp registers update
  pwm: sifive: Always let the first pwm_apply_state succeed
  soc: mediatek: mtk-svs: Enable the IRQ later
  memory: renesas-rpc-if: Move resource acquisition to .probe()
  memory: renesas-rpc-if: Split-off private data from struct rpcif
  soc: mediatek: mtk-pm-domains: Allow mt8186 ADSP default power on
  objtool: Fix memory leak in create_static_call_sections()
  f2fs: fix to avoid potential deadlock
  f2fs: don't rely on F2FS_MAP_* in f2fs_iomap_begin
  driver: soc: xilinx: fix memory leak in xlnx_add_cb_for_notify_event()
  fs/jfs: fix shift exponent db_agl2size negative
  auxdisplay: hd44780: Fix potential memory leak in hd44780_remove()
  net/sched: Retire tcindex classifier
  Linux 6.1.17
  Revert "blk-cgroup: dropping parent refcount after pd_free_fn() is done"
  Revert "blk-cgroup: synchronize pd_free_fn() from blkg_free_workfn() and blkcg_deactivate_policy()"
  ANDROID: ABI: update symbol list for galaxy
  ANDROID: Re-apply vendor hooks for information of blocked tasks
  ANDROID: ABI: Add missing symbols to QCOM list
  Linux 6.1.16
  net: avoid double iput when sock_alloc_file fails
  kbuild: Port silent mode detection to future gnu make.
  sbitmap: Try each queue to wake up at least one waiter
  wait: Return number of exclusive waiters awaken
  sbitmap: Advance the queue index before waking up a queue
  brd: use radix_tree_maybe_preload instead of radix_tree_preload
  qede: avoid uninitialized entries in coal_entry array
  drm/edid: fix parsing of 3D modes from HDMI VSDB
  drm/edid: fix AVI infoframe aspect ratio handling
  drm/gud: Fix UBSAN warning
  drm/i915: Don't use BAR mappings for ring buffers with LLC
  drm/i915: Don't use stolen memory for ring buffers with LLC
  drm/radeon: Fix eDP for single-display iMac11,2
  drm/i915/quirks: Add inverted backlight quirk for HP 14-r206nv
  drm/amd: Fix initialization for nbio 7.5.1
  vfio/type1: restore locked_vm
  vfio/type1: track locked_vm per dma
  vfio/type1: prevent underflow of locked_vm via exec()
  vfio/type1: exclude mdevs from VFIO_UPDATE_VADDR
  iommu/vt-d: Fix PASID directory pointer coherency
  iommu/vt-d: Avoid superfluous IOTLB tracking in lazy mode
  bus: mhi: ep: Save channel state locally during suspend and resume
  bus: mhi: ep: Move chan->lock to the start of processing queued ch ring
  bus: mhi: ep: Only send -ENOTCONN status if client driver is available
  PCI/DPC: Await readiness of secondary bus after reset
  PCI: Avoid FLR for AMD FCH AHCI adapters
  PCI: hotplug: Allow marking devices as disconnected during bind/unbind
  PCI: Unify delay handling for reset and resume
  PCI/PM: Observe reset delay irrespective of bridge_d3
  MIPS: DTS: CI20: fix otg power gpio
  riscv: ftrace: Reduce the detour code size to half
  riscv: ftrace: Remove wasted nops for !RISCV_ISA_C
  riscv, mm: Perform BPF exhandler fixup on page fault
  riscv: jump_label: Fixup unaligned arch_static_branch function
  riscv: mm: fix regression due to update_mmu_cache change
  riscv: Avoid enabling interrupts in die()
  RISC-V: add a spin_shadow_stack declaration
  scsi: ses: Fix slab-out-of-bounds in ses_intf_remove()
  scsi: ses: Fix possible desc_ptr out-of-bounds accesses
  scsi: ses: Fix possible addl_desc_ptr out-of-bounds accesses
  scsi: ses: Fix slab-out-of-bounds in ses_enclosure_data_process()
  scsi: ses: Don't attach if enclosure has no components
  scsi: qla2xxx: Remove increment of interface err cnt
  scsi: qla2xxx: Fix erroneous link down
  scsi: qla2xxx: Remove unintended flag clearing
  scsi: qla2xxx: Fix DMA-API call trace on NVMe LS requests
  scsi: qla2xxx: Check if port is online before sending ELS
  scsi: qla2xxx: Fix link failure in NPIV environment
  scsi: aacraid: Allocate cmd_priv with scsicmd
  iommu/amd: Improve page fault error reporting
  iommu/amd: Add a length limitation for the ivrs_acpihid command-line parameter
  tracing/eprobe: Fix to add filter on eprobe description in README file
  tools/bootconfig: fix single & used for logical condition
  ring-buffer: Handle race between rb_move_tail and rb_check_pages
  memory tier: release the new_memtier in find_create_memory_tier()
  ktest.pl: Add RUN_TIMEOUT option with default unlimited
  ktest.pl: Fix missing "end_monitor" when machine check fails
  kprobes: Fix to handle forcibly unoptimized kprobes on freeing_list
  ktest.pl: Give back console on Ctrt^C on monitor
  mm/thp: check and bail out if page in deferred queue already
  mm: memcontrol: deprecate charge moving
  docs: gdbmacros: print newest record
  remoteproc/mtk_scp: Move clk ops outside send_lock
  media: ipu3-cio2: Fix PM runtime usage_count in driver unbind
  mips: fix syscall_get_nr
  dax/kmem: Fix leak of memory-hotplug resources
  alpha: fix FEN fault handling
  mm/hwpoison: convert TTU_IGNORE_HWPOISON to TTU_HWPOISON
  panic: fix the panic_print NMI backtrace setting
  regulator: core: Use ktime_get_boottime() to determine how long a regulator was off
  ceph: update the time stamps and try to drop the suid/sgid
  rbd: avoid use-after-free in do_rbd_add() when rbd_dev_create() fails
  fuse: add inode/permission checks to fileattr_get/fileattr_set
  arm64: mm: hugetlb: Disable HUGETLB_PAGE_OPTIMIZE_VMEMMAP
  ARM: dts: exynos: correct TMU phandle in Odroid HC1
  ARM: dts: exynos: correct TMU phandle in Odroid XU
  ARM: dts: exynos: correct TMU phandle in Exynos5250
  ARM: dts: exynos: correct TMU phandle in Odroid XU3 family
  ARM: dts: exynos: correct TMU phandle in Exynos4
  ARM: dts: exynos: correct TMU phandle in Exynos4210
  ARM: dts: qcom: sdx55: Add Qcom SMMU-500 as the fallback for IOMMU node
  ARM: dts: qcom: sdx65: Add Qcom SMMU-500 as the fallback for IOMMU node
  hwmon: (nct6775) Fix incorrect parenthesization in nct6775_write_fan_div()
  hwmon: (peci/cputemp) Fix off-by-one in coretemp_label allocation
  dm flakey: fix a bug with 32-bit highmem systems
  dm flakey: don't corrupt the zero page
  dm cache: free background tracker's queued work in btracker_destroy
  dm flakey: fix logic when corrupting a bio
  thermal: intel: powerclamp: Fix cur_state for multi package system
  qede: fix interrupt coalescing configuration
  cpuidle: add ARCH_SUSPEND_POSSIBLE dependencies
  wifi: cfg80211: Set SSID if it is not already set
  wifi: cfg80211: Fix use after free for wext
  wifi: ath11k: allow system suspend to survive ath11k
  wifi: rtl8xxxu: Use a longer retry limit of 48
  wifi: rtw88: use RTW_FLAG_POWERON flag to prevent to power on/off twice
  dm: add cond_resched() to dm_wq_requeue_work()
  dm: add cond_resched() to dm_wq_work()
  dm: send just one event on resize, not two
  mtd: spi-nor: Fix shift-out-of-bounds in spi_nor_set_erase_type
  mtd: spi-nor: spansion: Consider reserved bits in CFR5 register
  mtd: spi-nor: sfdp: Fix index value for SCCR dwords
  cxl/pmem: Fix nvdimm registration races
  ext4: refuse to create ea block when umounted
  ext4: optimize ea_inode block expansion
  jbd2: fix data missing when reusing bh which is ready to be checkpointed
  ALSA: hda/realtek: Add quirk for HP EliteDesk 800 G6 Tower PC
  ALSA: ice1712: Do not left ice->gpio_mutex locked in aureon_add_controls()
  mm/damon/paddr: fix missing folio_put()
  crypto: qat - fix out-of-bounds read
  irqdomain: Fix domain registration race
  irqdomain: Fix mapping-creation race
  irqdomain: Refactor __irq_domain_alloc_irqs()
  irqdomain: Drop bogus fwspec-mapping error handling
  irqdomain: Look for existing mapping only once
  irqdomain: Fix disassociation race
  irqdomain: Fix association race
  selftests: seccomp: Fix incorrect kernel headers search path
  selftests: vm: Fix incorrect kernel headers search path
  selftests: dmabuf-heaps: Fix incorrect kernel headers search path
  selftests: drivers: Fix incorrect kernel headers search path
  selftests: futex: Fix incorrect kernel headers search path
  selftests: ipc: Fix incorrect kernel headers search path
  selftests: perf_events: Fix incorrect kernel headers search path
  selftests: mount_setattr: Fix incorrect kernel headers search path
  selftests: move_mount_set_group: Fix incorrect kernel headers search path
  selftests: rseq: Fix incorrect kernel headers search path
  selftests: sync: Fix incorrect kernel headers search path
  selftests: ptp: Fix incorrect kernel headers search path
  selftests: user_events: Fix incorrect kernel headers search path
  selftests: filesystems: Fix incorrect kernel headers search path
  selftests: gpio: Fix incorrect kernel headers search path
  selftests: media_tests: Fix incorrect kernel headers search path
  selftests: kcmp: Fix incorrect kernel headers search path
  selftests: membarrier: Fix incorrect kernel headers search path
  selftests: pidfd: Fix incorrect kernel headers search path
  selftests: clone3: Fix incorrect kernel headers search path
  selftests: arm64: Fix incorrect kernel headers search path
  selftests: pid_namespace: Fix incorrect kernel headers search path
  selftests: core: Fix incorrect kernel headers search path
  selftests: sched: Fix incorrect kernel headers search path
  selftests/ftrace: Fix eprobe syntax test case to check filter support
  selftests/powerpc: Fix incorrect kernel headers search path
  ima: Align ima_file_mmap() parameters with mmap_file LSM hook
  ima: fix error handling logic when file measurement failed
  brd: check for REQ_NOWAIT and set correct page allocation mask
  brd: return 0/-error from brd_insert_page()
  brd: mark as nowait compatible
  virt/sev-guest: Return -EIO if certificate buffer is not large enough
  Documentation/hw-vuln: Document the interaction between IBRS and STIBP
  x86/speculation: Allow enabling STIBP with legacy IBRS
  x86/microcode/AMD: Fix mixed steppings support
  x86/microcode/AMD: Add a @cpu parameter to the reloading functions
  x86/microcode/amd: Remove load_microcode_amd()'s bsp parameter
  x86/kprobes: Fix arch_check_optimized_kprobe check within optimized_kprobe range
  x86/kprobes: Fix __recover_optprobed_insn check optimizing logic
  x86/reboot: Disable SVM, not just VMX, when stopping CPUs
  x86/reboot: Disable virtualization in an emergency if SVM is supported
  x86/crash: Disable virt in core NMI crash handler to avoid double shootdown
  x86/virt: Force GIF=1 prior to disabling SVM (for reboot flows)
  selftests: x86: Fix incorrect kernel headers search path
  KVM: SVM: hyper-v: placate modpost section mismatch error
  KVM: SVM: Fix potential overflow in SEV's send|receive_update_data()
  KVM: x86: Inject #GP on x2APIC WRMSR that sets reserved bits 63:32
  KVM: x86: Inject #GP if WRMSR sets reserved bits in APIC Self-IPI
  KVM: SVM: Don't put/load AVIC when setting virtual APIC mode
  KVM: SVM: Process ICR on AVIC IPI delivery failure due to invalid target
  KVM: SVM: Flush the "current" TLB when activating AVIC
  KVM: x86: Don't inhibit APICv/AVIC if xAPIC ID mismatch is due to 32-bit ID
  KVM: x86: Don't inhibit APICv/AVIC on xAPIC ID "change" if APIC is disabled
  KVM: x86: Blindly get current x2APIC reg value on "nodecode write" traps
  KVM: x86: Purge "highest ISR" cache when updating APICv state
  KVM: Register /dev/kvm as the _very_ last thing during initialization
  KVM: VMX: Fix crash due to uninitialized current_vmcs
  KVM: Destroy target device if coalesced MMIO unregistration fails
  RDMA/siw: Fix user page pinning accounting
  md: don't update recovery_cp when curr_resync is ACTIVE
  udf: Fix file corruption when appending just after end of preallocated extent
  udf: Detect system inodes linked into directory hierarchy
  udf: Preserve link count of system files
  udf: Do not update file length for failed writes to inline files
  udf: Do not bother merging very long extents
  udf: Truncate added extents on failed expansion
  selftests/landlock: Test ptrace as much as possible with Yama
  selftests/landlock: Skip overlayfs tests when not supported
  fs/cramfs/inode.c: initialize file_ra_state
  ocfs2: fix non-auto defrag path not working issue
  ocfs2: fix defrag path triggering jbd2 ASSERT
  f2fs: fix kernel crash due to null io->bio
  f2fs: fix cgroup writeback accounting with fs-layer encryption
  f2fs: retry to update the inode page given data corruption
  f2fs: fix information leak in f2fs_move_inline_dirents()
  fs: dlm: send FIN ack back in right cases
  fs: dlm: move sending fin message into state change handling
  fs: dlm: don't set stop rx flag after node reset
  exfat: fix inode->i_blocks for non-512 byte sector size device
  exfat: redefine DIR_DELETED as the bad cluster number
  exfat: fix unexpected EOF while reading dir
  exfat: fix reporting fs error when reading dir beyond EOF
  fs: hfsplus: fix UAF issue in hfsplus_put_super
  hfs: fix missing hfs_bnode_get() in __hfs_bnode_create
  io_uring: mark task TASK_RUNNING before handling resume/task work
  ARM: dts: exynos: correct HDMI phy compatible in Exynos4
  torture: Fix hang during kthread shutdown phase
  ksmbd: fix possible memory leak in smb2_lock()
  ksmbd: do not allow the actual frame length to be smaller than the rfc1002 length
  ksmbd: fix wrong data area length for smb2 lock request
  locking/rwsem: Prevent non-first waiter from spinning in down_write() slowpath
  btrfs: hold block group refcount during async discard
  scsi: mpi3mr: Remove unnecessary memcpy() to alltgt_info->dmi
  scsi: mpi3mr: Fix issues in mpi3mr_get_all_tgt_info()
  scsi: mpi3mr: Fix missing mrioc->evtack_cmds initialization
  cifs: return a single-use cfid if we did not get a lease
  cifs: Check the lease context if we actually got a lease
  cifs: don't try to use rdma offload on encrypted connections
  cifs: split out smb3_use_rdma_offload() helper
  cifs: introduce cifs_io_parms in smb2_async_writev()
  cifs: fix mount on old smb servers
  cifs: Fix uninitialized memory reads for oparms.mode
  cifs: Fix uninitialized memory read in smb3_qfs_tcon()
  KVM: s390: disable migration mode when dirty tracking is disabled
  s390/kprobes: fix current_kprobe never cleared after kprobes reenter
  s390/kprobes: fix irq mask clobbering on kprobe reenter from post_handler
  s390: discard .interp section
  s390/extmem: return correct segment type in __segment_load()
  io_uring: fix fget leak when fs don't support nowait buffered read
  io_uring: remove MSG_NOSIGNAL from recvmsg
  io_uring/rsrc: disallow multi-source reg buffers
  io_uring: add reschedule point to handle_tw_list()
  io_uring: add a conditional reschedule to the IOPOLL cancelation loop
  io_uring: handle TIF_NOTIFY_RESUME when checking for task_work
  io_uring: use user visible tail in io_uring_poll()
  io_uring: Replace 0-length array with flexible array
  ipmi_ssif: Rename idle state and check
  ipmi:ssif: resend_msg() cannot fail
  ipmi: ipmb: Fix the MODULE_PARM_DESC associated to 'retry_time_ms'
  rtc: pm8xxx: fix set-alarm race
  block: be a bit more careful in checking for NULL bdev while polling
  block: clear bio->bi_bdev when putting a bio back in the cache
  block: don't allow multiple bios for IOCB_NOWAIT issue
  firmware: coreboot: framebuffer: Ignore reserved pixel color bits
  scsi: mpt3sas: Remove usage of dma_get_required_mask() API
  wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
  driver core: fw_devlink: Avoid spurious error message
  drm/shmem-helper: Revert accidental non-GPL export
  cifs: prevent data race in smb2_reconnect()
  nfsd: don't hand out delegation on setuid files being opened for write
  nfsd: zero out pointers after putting nfsd_files on COPY setup error
  dm cache: add cond_resched() to various workqueue loops
  dm thin: add cond_resched() to various workqueue loops
  drm/amd/display: Disable HUBP/DPP PG on DCN314 for now
  drm: panel-orientation-quirks: Add quirk for Lenovo IdeaPad Duet 3 10IGL5
  drm/amd/display: Enable P-state validation checks for DCN314
  HID: logitech-hidpp: Don't restart communication if not necessary
  scsi: ufs: core: Fix device management cmd timeout flow
  scsi: snic: Fix memory leak with using debugfs_lookup()
  drm/amd/display: Do not commit pipe when updating DRR
  pinctrl: at91: use devm_kasprintf() to avoid potential leaks
  hwmon: (nct6775) B650/B660/X670 ASUS boards support
  hwmon: (nct6775) Directly call ASUS ACPI WMI method
  hwmon: (coretemp) Simplify platform device handling
  gfs2: Improve gfs2_make_fs_rw error handling
  drm/amd/display: fix FCLK pstate change underflow
  Revert "drm/amdgpu: TA unload messages are not actually sent to psp when amdgpu is uninstalled"
  regulator: s5m8767: Bounds check id indexing into arrays
  regulator: max77802: Bounds check regulator id against opmode
  ASoC: kirkwood: Iterate over array indexes instead of using pointer math
  ASoC: soc-compress: Reposition and add pcm_mutex
  drm/msm/dpu: Add DSC hardware blocks to register snapshot
  docs/scripts/gdb: add necessary make scripts_gdb step
  habanalabs: fix bug in timestamps registration code
  habanalabs: extend fatal messages to contain PCI info
  drm/amd/display: Set hvm_enabled flag for S/G mode
  drm/drm_print: correct format problem
  drm: rcar-du: Fix setting a reserved bit in DPLLCR
  drm: rcar-du: Add quirk for H3 ES1.x pclk workaround
  drm/msm/dsi: Add missing check for alloc_ordered_workqueue
  HID: uclogic: Add support for XP-PEN Deco Pro MW
  HID: uclogic: Add support for XP-PEN Deco Pro SW
  HID: uclogic: Add battery quirk
  HID: uclogic: Add frame type quirk
  drm/amd/display: fix mapping to non-allocated address
  drm: amd: display: Fix memory leakage
  drm/amd: Avoid ASSERT for some message failures
  Revert "fbcon: don't lose the console font across generic->chip driver switch"
  scsi: lpfc: Fix use-after-free KFENCE violation during sysfs firmware write
  drm/amdkfd: Page aligned memory reserve size
  drm/amd: Avoid BUG() for case of SRIOV missing IP version
  drm/radeon: free iio for atombios when driver shutdown
  drm/amd/display: Defer DIG FIFO disable after VID stream enable
  drm/tiny: ili9486: Do not assume 8-bit only SPI controllers
  HID: Add Mapping for System Microphone Mute
  drm/omap: dsi: Fix excessive stack usage
  drm/amd/display: Fix potential null-deref in dm_resume
  drm/amd/display: Revert Reduce delay when sink device not able to ACK 00340h write
  drm/amd/display: Reduce expected sdp bandwidth for dcn321
  drm: panel-orientation-quirks: Add quirk for DynaBook K50
  drm: panel-orientation-quirks: Add quirk for Lenovo Yoga Tab 3 X90F
  scm: add user copy checks to put_cmsg()
  devlink: Fix TP_STRUCT_entry in trace of devlink health report
  s390/kfence: fix page fault reporting
  hv_netvsc: Check status in SEND_RNDIS_PKT completion message
  wifi: rtw89: debug: avoid invalid access on RTW89_DBG_SEL_MAC_30
  Bluetooth: btusb: Add VID:PID 13d3:3529 for Realtek RTL8821CE
  Bluetooth: btusb: Add new PID/VID 0489:e0f2 for MT7921
  Bluetooth: Fix issue with Actions Semi ATS2851 based devices
  PM: EM: fix memory leak with using debugfs_lookup()
  PM: domains: fix memory leak with using debugfs_lookup()
  time/debug: Fix memory leak with using debugfs_lookup()
  s390/idle: mark arch_cpu_idle() noinstr
  uaccess: Add minimum bounds check on kernel buffer size
  coda: Avoid partial allocation of sig_inputArgs
  net/mlx5: fw_tracer: Fix debug print
  ACPI: video: Fix Lenovo Ideapad Z570 DMI match
  wifi: mt76: dma: free rx_head in mt76_dma_rx_cleanup
  tools/power/x86/intel-speed-select: Add Emerald Rapid quirk
  gcc-plugins: drop -std=gnu++11 to fix GCC 13 build
  can: isotp: check CAN address family in isotp_bind()
  netfilter: nf_tables: NULL pointer dereference in nf_tables_updobj()
  s390/mm,ptdump: avoid Kasan vs Memcpy Real markers swapping
  m68k: Check syscall_trace_enter() return code
  net: bcmgenet: Add a check for oversized packets
  crypto: hisilicon: Wipe entire pool on error
  clocksource: Suspend the watchdog temporarily when high read latency detected
  thermal: intel: intel_pch: Add support for Wellsburg PCH
  bpf, docs: Fix modulo zero, division by zero, overflow, and underflow
  ACPI: Don't build ACPICA with '-Os'
  ice: add missing checks for PF vsi type
  ice: restrict PTP HW clock freq adjustments to 100, 000, 000 PPB
  inet: fix fast path in __inet_hash_connect()
  wifi: mt7601u: fix an integer underflow
  wifi: brcmfmac: ensure CLM version is null-terminated to prevent stack-out-of-bounds
  bpftool: Always disable stack protection for BPF objects
  x86/bugs: Reset speculation control settings on init
  timers: Prevent union confusion from unexpected restart_syscall()
  thermal: intel: Fix unsigned comparison with less than zero
  wifi: ath11k: debugfs: fix to work with multiple PCI devices
  rcu-tasks: Handle queue-shrink/callback-enqueue race condition
  rcu-tasks: Make rude RCU-Tasks work well with CPU hotplug
  srcu: Delegate work to the boot cpu if using SRCU_SIZE_SMALL
  rcu: Suppress smp_processor_id() complaint in synchronize_rcu_expedited_wait()
  rcu: Make RCU_LOCKDEP_WARN() avoid early lockdep checks
  wifi: brcmfmac: Fix potential stack-out-of-bounds in brcmf_c_preinit_dcmds()
  wifi: ath11k: fix monitor mode bringup crash
  wifi: ath9k: Fix use-after-free in ath9k_hif_usb_disconnect()
  perf/x86/intel/uncore: Add Meteor Lake support
  cpuidle: lib/bug: Disable rcu_is_watching() during WARN/BUG
  cpuidle: drivers: firmware: psci: Dont instrument suspend code
  x86/fpu: Don't set TIF_NEED_FPU_LOAD for PF_IO_WORKER threads
  cpuidle, intel_idle: Fix CPUIDLE_FLAG_INIT_XSTATE
  arm64: zynqmp: Enable hs termination flag for USB dwc3 controller
  btrfs: scrub: improve tree block error reporting
  trace/blktrace: fix memory leak with using debugfs_lookup()
  blk-cgroup: synchronize pd_free_fn() from blkg_free_workfn() and blkcg_deactivate_policy()
  blk-cgroup: dropping parent refcount after pd_free_fn() is done
  blk-iocost: fix divide by 0 error in calc_lcoefs()
  fs: Use CHECK_DATA_CORRUPTION() when kernel bugs are detected
  ARM: dts: exynos: Use Exynos5420 compatible for the MIPI video phy
  exit: Detect and fix irq disabled state in oops
  context_tracking: Fix noinstr vs KASAN
  udf: Define EFSCORRUPTED error code
  arm64: dts: qcom: msm8996: Add additional A2NoC clocks
  ARM: OMAP2+: omap4-common: Fix refcount leak bug
  rpmsg: glink: Release driver_override
  rpmsg: glink: Avoid infinite loop on intent for missing channel
  media: saa7134: Use video_unregister_device for radio_dev
  media: usb: siano: Fix use after free bugs caused by do_submit_urb
  media: i2c: ov7670: 0 instead of -EINVAL was returned
  media: atomisp: Only set default_run_mode on first open of a stream/asd
  media: rc: Fix use-after-free bugs caused by ene_tx_irqsim()
  media: drivers/media/v4l2-core/v4l2-h264 : add detection of null pointers
  media: amphion: correct the unspecified color space
  media: imx-jpeg: Apply clk_bulk api instead of operating specific clk
  media: hantro: Fix JPEG encoder ENUM_FRMSIZE on RK3399
  media: v4l2-jpeg: ignore the unknown APP14 marker
  media: v4l2-jpeg: correct the skip count in jpeg_parse_app14_data
  media: platform: mtk-mdp3: fix Kconfig dependencies
  media: platform: mtk-mdp3: remove unused VIDEO_MEDIATEK_VPU config
  media: camss: csiphy-3ph: avoid undefined behavior
  media: platform: mtk-mdp3: Fix return value check in mdp_probe()
  media: i2c: imx219: Fix binning for RAW8 capture
  media: i2c: imx219: Split common registers from mode tables
  media: i2c: ov772x: Fix memleak in ov772x_probe()
  media: mc: Get media_device directly from pad
  media: ov5640: Handle delays when no reset_gpio set
  media: ov5640: Fix soft reset sequence and timings
  media: ov5675: Fix memleak in ov5675_init_controls()
  media: ov2740: Fix memleak in ov2740_init_controls()
  media: max9286: Fix memleak in max9286_v4l2_register()
  builddeb: clean generated package content
  s390/vdso: Drop '-shared' from KBUILD_CFLAGS_64
  powerpc: Remove linker flag from KBUILD_AFLAGS
  media: imx: imx7-media-csi: fix missing clk_disable_unprepare() in imx7_csi_init()
  media: platform: ti: Add missing check for devm_regulator_get
  media: ti: cal: fix possible memory leak in cal_ctx_create()
  remoteproc: qcom_q6v5_mss: Use a carveout to authenticate modem headers
  Revert "remoteproc: qcom_q6v5_mss: map/unmap metadata region before/after use"
  IB/hfi1: Fix sdma.h tx->num_descs off-by-one errors
  IB/hfi1: Fix math bugs in hfi1_can_pin_pages()
  RDMA/rxe: Fix missing memory barriers in rxe_queue.h
  RDMA/rxe: cleanup some error handling in rxe_verbs.c
  iommu/vt-d: Allow to use flush-queue when first level is default
  iommu/vt-d: Fix error handling in sva enable/disable paths
  dmaengine: ptdma: check for null desc before calling pt_cmd_callback
  dmaengine: dw-axi-dmac: Do not dereference NULL structure
  dmaengine: sf-pdma: pdma_desc memory leak fix
  iommu/amd: Do not identity map v2 capable device when snp is enabled
  iommu: Fix error unwind in iommu_group_alloc()
  iw_cxgb4: Fix potential NULL dereference in c4iw_fill_res_cm_id_entry()
  PCI: qcom: Fix host-init error handling
  phy: rockchip-typec: fix tcphy_get_mode error case
  PCI: Fix dropping valid root bus resources with .end = zero
  dmaengine: dw-edma: Fix readq_ch() return value truncation
  usb: host: fsl-mph-dr-of: reuse device_set_of_node_from_dev
  mtd: mtdpart: Don't create platform device that'll never probe
  driver core: fw_devlink: Make cycle detection more robust
  driver core: fw_devlink: Improve check for fwnode with no device/driver
  driver core: fw_devlink: Consolidate device link flag computation
  driver core: fw_devlink: Allow marking a fwnode link as being part of a cycle
  driver core: fw_devlink: Don't purge child fwnode's consumer links
  driver core: fw_devlink: Add DL_FLAG_CYCLE support to device links
  tty: serial: imx: disable Ageing Timer interrupt request irq
  tty: serial: imx: Handle RS485 DE signal active high
  serial: fsl_lpuart: fix RS485 RTS polariy inverse issue
  RDMA/irdma: Cap MSIX used to online CPUs + 1
  usb: max-3421: Fix setting of I/O pins
  RDMA/cxgb4: Fix potential null-ptr-deref in pass_establish()
  power: supply: remove faulty cooling logic
  iommu/vt-d: Set No Execute Enable bit in PASID table entry
  iommu/dart: Fix apple_dart_device_group for PCI groups
  iommu: dart: Support >64 stream IDs
  iommu: dart: Add suspend/resume support
  PCI: mt7621: Delay phy ports initialization
  phy: mediatek: remove temporary variable @mask_
  usb: gadget: configfs: Restrict symlink creation is UDC already binded
  usb: musb: mediatek: don't unregister something that wasn't registered
  RDMA/cxgb4: add null-ptr-check after ip_dev_find()
  tty: serial: fsl_lpuart: Fix the wrong RXWATER setting for rx dma case
  usb: early: xhci-dbc: Fix a potential out-of-bound memory access
  fpga: microchip-spi: rewrite status polling in a time measurable way
  fpga: microchip-spi: move SPI I/O buffers out of stack
  dmaengine: dw-edma: Fix missing src/dst address of interleaved xfers
  fotg210-udc: Add missing completion handler
  firmware: dmi-sysfs: Fix null-ptr-deref in dmi_sysfs_register_handle
  drivers: base: transport_class: fix resource leak when transport_add_device() fails
  drivers: base: transport_class: fix possible memory leak
  driver core: location: Free struct acpi_pld_info *pld before return false
  driver core: fix resource leak in device_add()
  misc: fastrpc: Fix an error handling path in fastrpc_rpmsg_probe()
  misc/mei/hdcp: Use correct macros to initialize uuid_le
  mei: pxp: Use correct macros to initialize uuid_le
  VMCI: check context->notify_page after call to get_user_pages_fast() to avoid GPF
  firmware: stratix10-svc: fix error handle while alloc/add device failed
  firmware: stratix10-svc: add missing gen_pool_destroy() in stratix10_svc_drv_probe()
  applicom: Fix PCI device refcount leak in applicom_init()
  eeprom: idt_89hpesx: Fix error handling in idt_init()
  Revert "char: pcmcia: cm4000_cs: Replace mdelay with usleep_range in set_protocol"
  serial: tegra: Add missing clk_disable_unprepare() in tegra_uart_hw_init()
  tty: serial: fsl_lpuart: clear LPUART Status Register in lpuart32_shutdown()
  tty: serial: fsl_lpuart: disable Rx/Tx DMA in lpuart32_shutdown()
  hwtracing: hisi_ptt: Only add the supported devices to the filters list
  PCI: endpoint: pci-epf-vntb: Add epf_ntb_mw_bar_clear() num_mws kernel-doc
  PCI: endpoint: pci-epf-vntb: Clean up kernel_doc warning
  PCI: switchtec: Return -EFAULT for copy_to_user() errors
  PCI/IOV: Enlarge virtfn sysfs name buffer
  usb: typec: intel_pmc_mux: Don't leak the ACPI device reference count
  coresight: cti: Add PM runtime call in enable_store
  coresight: cti: Prevent negative values of enable count
  coresight: etm4x: Fix accesses to TRCSEQRSTEVR and TRCSEQSTR
  media: uvcvideo: Refactor power_line_frequency_controls_limited
  media: uvcvideo: Refactor uvc_ctrl_mappings_uvcXX
  media: uvcvideo: Implement mask for V4L2_CTRL_TYPE_MENU
  media: uvcvideo: Check for INACTIVE in uvc_ctrl_is_accessible()
  alpha/boot/tools/objstrip: fix the check for ELF header
  kobject: Fix slab-out-of-bounds in fill_kobj_path()
  kobject: modify kobject_get_path() to take a const *
  driver core: fix potential null-ptr-deref in device_add()
  soundwire: cadence: Don't overflow the command FIFOs
  i2c: designware: fix i2c_dw_clk_rate() return size to be u32
  usb: gadget: fusb300_udc: free irq on the error path in fusb300_probe()
  iio: light: tsl2563: Do not hardcode interrupt trigger type
  RDMA/hns: Fix refcount leak in hns_roce_mmap
  dmaengine: HISI_DMA should depend on ARCH_HISI
  RDMA/erdma: Fix refcount leak in erdma_mmap
  dmaengine: idxd: Set traffic class values in GRPCFG on DSA 2.0
  mfd: pcf50633-adc: Fix potential memleak in pcf50633_adc_async_read()
  mfd: cs5535: Don't build on UML
  objtool: add UACCESS exceptions for __tsan_volatile_read/write
  perf tests stat_all_metrics: Change true workload to sleep workload for system wide check
  printf: fix errname.c list
  perf record: Fix segfault with --overwrite and --max-size
  selftests: use printf instead of echo -ne
  selftests/ftrace: Fix bash specific "==" operator
  selftests: find echo binary to use -ne options
  sparc: allow PM configs for sparc32 COMPILE_TEST
  perf tools: Fix auto-complete on aarch64
  perf test bpf: Skip test if kernel-debuginfo is not present
  perf intel-pt: Do not try to queue auxtrace data on pipe
  perf inject: Use perf_data__read() for auxtrace
  tools/tracing/rtla: osnoise_hist: use total duration for average calculation
  leds: simatic-ipc-leds-gpio: Make sure we have the GPIO providing driver
  leds: is31fl319x: Wrap mutex_destroy() for devm_add_action_or_rest()
  leds: led-core: Fix refcount leak in of_led_get()
  perf llvm: Fix inadvertent file creation
  gfs2: jdata writepage fix
  cifs: use tcon allocation functions even for dummy tcon
  cifs: Fix warning and UAF when destroy the MR list
  cifs: Fix lost destroy smbd connection when MR allocate failed
  NFSD: copy the whole verifier in nfsd_copy_write_verifier
  nfsd: don't fsync nfsd_files on last close
  nfsd: fix courtesy client with deny mode handling in nfs4_upgrade_open
  NFSD: fix problems with cleanup on errors in nfsd4_copy
  nfsd: clean up potential nfsd_file refcount leaks in COPY codepath
  nfsd: fix race to check ls_layouts
  NFSD: fix leaked reference count of nfsd4_ssc_umount_item
  NFSD: enhance inter-server copy cleanup
  drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt()
  ALSA: hda/hdmi: Register with vga_switcheroo on Dual GPU Macbooks
  hid: bigben_probe(): validate report count
  HID: bigben: use spinlock to safely schedule workers
  HID: bigben_worker() remove unneeded check on report_field
  HID: bigben: use spinlock to protect concurrent accesses
  ASoC: soc-dapm.h: fixup warning struct snd_pcm_substream not declared
  spi: synquacer: Fix timeout handling in synquacer_spi_transfer_one()
  NFS: fix disabling of swap
  nfs4trace: fix state manager flag printing
  dm: remove flush_scheduled_work() during local_exit()
  ASoC: tlv320adcx140: fix 'ti,gpio-config' DT property init
  hwmon: (mlxreg-fan) Return zero speed for broken fan
  spi: bcm63xx-hsspi: Fix multi-bit mode setting
  HID: logitech-hidpp: Hard-code HID++ 1.0 fast scroll support
  drm/amd/display: don't call dc_interrupt_set() for disabled crtcs
  ASoC: codecs: lpass: fix incorrect mclk rate
  ASoC: codecs: lpass: register mclk after runtime pm
  ASoC: qcom: q6apm-dai: Add SNDRV_PCM_INFO_BATCH flag
  ASoC: qcom: q6apm-dai: fix race condition while updating the position pointer
  ASoC: qcom: q6apm-lpass-dai: unprepare stream if its already prepared
  HID: retain initial quirks set up when creating HID devices
  HID: multitouch: Add quirks for flipped axes
  scsi: aic94xx: Add missing check for dma_map_single()
  scsi: mpt3sas: Fix a memory leak
  drm/amdgpu: fix enum odm_combine_mode mismatch
  ALSA: hda: Fix the control element identification for multiple codecs
  hwmon: (ltc2945) Handle error case in ltc2945_value_store
  hwmon: (asus-ec-sensors) add missing mutex path
  regulator: tps65219: use generic set_bypass()
  ASoC: dt-bindings: meson: fix gx-card codec node regex
  ASoC: mchp-spdifrx: Fix uninitialized use of mr in mchp_spdifrx_hw_params()
  ASoC: rsnd: fixup #endif position
  regmap: apply reg_base and reg_downshift for single register ops
  dm: improve shrinker debug names
  ASoC: mchp-spdifrx: disable all interrupts in mchp_spdifrx_dai_remove()
  ASoC: mchp-spdifrx: fix controls that works with completion mechanism
  ASoC: mchp-spdifrx: fix return value in case completion times out
  ASoC: mchp-spdifrx: fix controls which rely on rsr register
  spi: dw_bt1: fix MUX_MMIO dependencies
  ASoC: topology: Properly access value coming from topology file
  gpio: vf610: connect GPIO label to dev name
  dt-bindings: display: mediatek: Fix the fallback for mediatek,mt8186-disp-ccorr
  ASoC: soc-compress.c: fixup private_data on snd_soc_new_compress()
  drm/mediatek: Clean dangling pointer on bind error path
  drm/mediatek: mtk_drm_crtc: Add checks for devm_kcalloc
  drm/mediatek: Drop unbalanced obj unref
  drm/mediatek: Use NULL instead of 0 for NULL pointer
  drm/mediatek: dsi: Reduce the time of dsi from LP11 to sending cmd
  drm/msm/dpu: set pdpu->is_rt_pipe early in dpu_plane_sspp_atomic_update()
  pinctrl: renesas: rzg2l: Fix configuring the GPIO pins as interrupts
  drm/tegra: firewall: Check for is_addr_reg existence in IMM check
  gpu: host1x: Don't skip assigning syncpoints to channels
  gpu: host1x: Fix mask for syncpoint increment register
  pinctrl: mediatek: Initialize variable *buf to zero
  pinctrl: mediatek: Initialize variable pullen and pullup to zero
  pinctrl: bcm2835: Remove of_node_put() in bcm2835_of_gpio_ranges_fallback()
  habanalabs: bugs fixes in timestamps buff alloc
  drm/msm/mdp5: Add check for kzalloc
  drm/msm/dpu: Add check for pstates
  drm/msm/dpu: Add check for cstate
  drm/msm: use strscpy instead of strncpy
  drm/msm/dpu: sc7180: add missing WB2 clock control
  scsi: ufs: exynos: Fix DMA alignment for PAGE_SIZE != 4096
  drm/msm/dsi: Allow 2 CTRLs on v2.5.0
  drm: exynos: dsi: Fix MIPI_DSI*_NO_* mode flags
  drm/mipi-dsi: Fix byte order of 16-bit DCS set/get brightness
  regulator: tps65219: use IS_ERR() to detect an error pointer
  drm/bridge: lt9611: pass a pointer to the of node
  drm/bridge: lt9611: fix clock calculation
  drm/bridge: lt9611: fix programming of video modes
  drm/bridge: lt9611: fix polarity programming
  drm/bridge: lt9611: fix HPD reenablement
  drm/bridge: lt9611: fix sleep mode setup
  drm/msm/dpu: Disallow unallocated resources to be returned
  drm/msm/gem: Add check for kmalloc
  drm/amdgpu: Use the sched from entity for amdgpu_cs trace
  ALSA: hda/ca0132: minor fix for allocation size
  drm/msm/adreno: Fix null ptr access in adreno_gpu_cleanup()
  drm/bridge: tc358767: Set default CLRSIPO count
  ASoC: fsl_sai: initialize is_dsp_mode flag
  scsi: qla2xxx: edif: Fix clang warning
  scsi: qla2xxx: Fix exchange oversubscription for management commands
  scsi: qla2xxx: Fix exchange oversubscription
  drm/panel-edp: fix name for IVO product id 854b
  drm/msm: clean event_thread->worker in case of an error
  drm/vc4: hdmi: Correct interlaced timings again
  drm/vc4: hvs: Fix colour order for xRGB1555 on HVS5
  drm/vc4: hvs: Correct interrupt masking bit assignment for HVS5
  drm/vc4: hvs: SCALER_DISPBKGND_AUTOHS is only valid on HVS4
  drm/vc4: hvs: Set AXI panic modes
  pinctrl: rockchip: Fix refcount leak in rockchip_pinctrl_parse_groups
  pinctrl: stm32: Fix refcount leak in stm32_pctrl_get_irq_domain
  pinctrl: qcom: pinctrl-msm8976: Correct function names for wcss pins
  drm/msm/hdmi: Add missing check for alloc_ordered_workqueue
  drm/msm/dpu: check for null return of devm_kzalloc() in dpu_writeback_init()
  hwmon: (ftsteutates) Fix scaling of measurements
  drm/vc4: drop all currently held locks if deadlock happens
  gpu: ipu-v3: common: Add of_node_put() for reference returned by of_graph_get_port_by_id()
  drm: tidss: Fix pixel format definition
  drm/vc4: dpi: Fix format mapping for RGB565
  drm/vkms: Fix null-ptr-deref in vkms_release()
  drm/vkms: Fix memory leak in vkms_init()
  drm/bridge: megachips: Fix error handling in i2c_register_driver()
  drm: mxsfb: DRM_MXSFB should depend on ARCH_MXS || ARCH_MXC
  drm: mxsfb: DRM_IMX_LCDIF should depend on ARCH_MXC
  drm/bridge: ti-sn65dsi83: Fix delay after reset deassert to match spec
  drm/fourcc: Add missing big-endian XRGB1555 and RGB565 formats
  drm: Fix potential null-ptr-deref due to drmm_mode_config_init()
  sefltests: netdevsim: wait for devlink instance after netns removal
  selftest: fib_tests: Always cleanup before exit
  net/mlx4_en: Introduce flexible array to silence overflow warning
  net: lan966x: Fix possible deadlock inside PTP
  net: bcmgenet: fix MoCA LED control
  l2tp: Avoid possible recursive deadlock in l2tp_tunnel_register()
  selftests/net: Interpret UDP_GRO cmsg data as an int value
  net/smc: fix application data exception
  net/smc: fix potential panic dues to unprotected smc_llc_srv_add_link()
  irqchip/irq-bcm7120-l2: Set IRQ_LEVEL for level triggered interrupts
  irqchip/irq-brcmstb-l2: Set IRQ_LEVEL for level triggered interrupts
  bpf: Fix global subprog context argument resolution logic
  LoongArch, bpf: Use 4 instructions for function address in JIT
  xsk: check IFF_UP earlier in Tx path
  can: esd_usb: Make use of can_change_state() and relocate checking skb for NULL
  can: esd_usb: Move mislocated storage of SJA1000_ECC_SEG bits in case of a bus error
  selftests/bpf: Fix xdp_do_redirect on s390x
  bpf: Zeroing allocated object from slab in bpf memory allocator
  wifi: mac80211: pass 'sta' to ieee80211_rx_data_set_sta()
  selftests/bpf: Fix map_kptr test.
  thermal/drivers/hisi: Drop second sensor hi3660
  tools/lib/thermal: Fix thermal_sampling_exit()
  wifi: mac80211: fix off-by-one link setting
  wifi: mac80211: avoid u32_encode_bits() warning
  wifi: mac80211: Don't translate MLD addresses for multicast
  wifi: mac80211: fix non-MLO station association
  wifi: mac80211: make rate u32 in sta_set_rate_info_rx()
  wifi: mac80211: move color collision detection report in a delayed work
  crypto: crypto4xx - Call dma_unmap_page when done
  crypto: octeontx2 - Fix objects shared between several modules
  ACPI: resource: Do IRQ override on all TongFang GMxRGxx
  ACPI: resource: Add IRQ overrides for MAINGEAR Vector Pro 2 models
  selftests/bpf: Fix out-of-srctree build
  wifi: mwifiex: fix loop iterator in mwifiex_update_ampdu_txwinsize()
  wifi: iwl4965: Add missing check for create_singlethread_workqueue()
  wifi: iwl3945: Add missing check for create_singlethread_workqueue
  clocksource/drivers/riscv: Patch riscv_clock_next_event() jump before first use
  RISC-V: time: initialize hrtimer based broadcast clock event device
  m68k: /proc/hardware should depend on PROC_FS
  crypto: rsa-pkcs1pad - Use akcipher_request_complete
  rds: rds_rm_zerocopy_callback() correct order for list_add_tail()
  xen/grant-dma-iommu: Implement a dummy probe_device() callback
  libbpf: Fix alen calculation in libbpf_nla_dump_errormsg()
  s390/ap: fix status returned by ap_qact()
  s390/ap: fix status returned by ap_aqic()
  s390: vfio-ap: tighten the NIB validity check
  net: ipa: generic command param fix
  Bluetooth: hci_qca: get wakeup status from serdev device handle
  Bluetooth: L2CAP: Fix potential user-after-free
  Bluetooth: hci_conn: Refactor hci_bind_bis() since it always succeeds
  cpufreq: davinci: Fix clk use after free
  OPP: fix error checking in opp_migrate_dentry()
  tap: tap_open(): correctly initialize socket uid
  tun: tun_chr_open(): correctly initialize socket uid
  net: add sock_init_data_uid()
  s390/boot: fix mem_detect extended area allocation
  s390/mem_detect: rely on diag260() if sclp_early_get_memsize() fails
  s390/boot: cleanup decompressor header files
  s390/vmem: fix empty page tables cleanup under KASAN
  s390/mem_detect: fix detect_memory() error handling
  irqchip/ti-sci: Fix refcount leak in ti_sci_intr_irq_domain_probe
  irqchip/irq-mvebu-gicp: Fix refcount leak in mvebu_gicp_probe
  irqchip/alpine-msi: Fix refcount leak in alpine_msix_init_domains
  irqchip: Fix refcount leak in platform_irqchip_probe
  net/mlx5: Enhance debug print in page allocation failure
  wifi: mt76: mt7921: fix error code of return in mt7921_acpi_read
  wifi: mt76: add memory barrier to SDIO queue kick
  wifi: mt76: mt7915: fix WED TxS reporting
  wifi: mt76: mt7915: fix memory leak in mt7915_mcu_exit
  wifi: mt76: mt7915: call mt7915_mcu_set_thermal_throttling() only after init_work
  bpftool: profile online CPUs instead of possible
  crypto: ccp - Flush the SEV-ES TMR memory before giving it to firmware
  selftests/bpf: Initialize tc in xdp_synproxy
  can: rcar_canfd: Fix R-Car V3U GAFLCFG field accesses
  kselftest/arm64: Fix enumeration of systems without 128 bit SME
  wifi: iwlwifi: mei: fix compilation errors in rfkill()
  s390/bpf: Add expoline to tail calls
  leds: led-class: Add missing put_device() to led_put()
  crypto: xts - Handle EBUSY correctly
  selftests/bpf: Fix vmtest static compilation error
  selftests/bpf: Use consistent build-id type for liburandom_read.so
  x86/microcode: Adjust late loading result reporting message
  x86/microcode: Check CPU capabilities after late microcode update correctly
  x86/microcode: Add a parameter to microcode_check() to store CPU capabilities
  powercap: fix possible name leak in powercap_register_zone()
  crypto: seqiv - Handle EBUSY correctly
  crypto: essiv - Handle EBUSY correctly
  crypto: ccp - Failure on re-initialization due to duplicate sysfs filename
  selftests/bpf: Fix build errors if CONFIG_NF_CONNTRACK=m
  ACPI: battery: Fix missing NUL-termination with large strings
  wifi: cfg80211: Fix extended KCK key length check in nl80211_set_rekey_data()
  wifi: ath11k: Fix memory leak in ath11k_peer_rx_frag_setup
  wifi: ath9k: Fix potential stack-out-of-bounds write in ath9k_wmi_rsp_callback()
  wifi: ath9k: hif_usb: clean up skbs if ath9k_hif_usb_rx_stream() fails
  wifi: ath9k: htc_hst: free skb in ath9k_htc_rx_msg() if there is no callback function
  thermal/drivers/imx_sc_thermal: Fix the loop condition
  thermal/drivers/imx_sc_thermal: Drop empty platform remove function
  wifi: orinoco: check return value of hermes_write_wordrec()
  wifi: rtl8xxxu: Fix memory leaks with RTL8723BU, RTL8192EU
  wifi: rtw89: Add missing check for alloc_workqueue
  wifi: rtw89: fix potential leak in rtw89_append_probe_req_ie()
  thermal/drivers/tsens: limit num_sensors to 9 for msm8939
  thermal/drivers/tsens: fix slope values for msm8939
  thermal/drivers/tsens: Sort out msm8976 vs msm8956 data
  thermal/drivers/tsens: Drop msm8976-specific defines
  x86/signal: Fix the value returned by strict_sas_size()
  s390/vfio-ap: fix an error handling path in vfio_ap_mdev_probe_queue()
  s390/early: fix sclp_early_sccb variable lifetime
  workqueue: Protects wq_unbound_cpumask with wq_pool_attach_mutex
  kselftest/arm64: Fix syscall-abi for systems without 128 bit SME
  arm64/cpufeature: Fix field sign for DIT hwcap detection
  selftests/xsk: print correct error codes when exiting
  selftests/xsk: print correct payload for packet dump
  ACPICA: nsrepair: handle cases without a return value correctly
  platform/chrome: cros_ec_typec: Update port DP VDO
  crypto: ccp - Avoid page allocation failure warning for SEV_GET_ID2
  lib/mpi: Fix buffer overrun when SG is too long
  rcu-tasks: Fix synchronize_rcu_tasks() VS zap_pid_ns_processes()
  rcu-tasks: Remove preemption disablement around srcu_read_[un]lock() calls
  rcu-tasks: Improve comments explaining tasks_rcu_exit_srcu purpose
  genirq: Fix the return type of kstat_cpu_irqs_sum()
  ACPICA: Drop port I/O validation for some regions
  crypto: x86/ghash - fix unaligned access in ghash_setkey()
  libbpf: Fix invalid return address register in s390
  wifi: wl3501_cs: don't call kfree_skb() under spin_lock_irqsave()
  wifi: libertas: cmdresp: don't call kfree_skb() under spin_lock_irqsave()
  wifi: libertas: main: don't call kfree_skb() under spin_lock_irqsave()
  wifi: libertas: if_usb: don't call kfree_skb() under spin_lock_irqsave()
  wifi: libertas_tf: don't call kfree_skb() under spin_lock_irqsave()
  wifi: brcmfmac: unmap dma buffer in brcmf_msgbuf_alloc_pktid()
  wifi: brcmfmac: fix potential memory leak in brcmf_netdev_start_xmit()
  wifi: wilc1000: add missing unregister_netdev() in wilc_netdev_ifc_init()
  wifi: wilc1000: fix potential memory leak in wilc_mac_xmit()
  wifi: ipw2200: fix memory leak in ipw_wdev_init()
  wifi: ipw2x00: don't call dev_kfree_skb() under spin_lock_irqsave()
  libbpf: Fix btf__align_of() by taking into account field offsets
  wifi: rtlwifi: Fix global-out-of-bounds bug in _rtl8812ae_phy_set_txpower_limit()
  wifi: rtw89: 8852c: rfk: correct DPK settings
  wifi: rtw89: 8852c: rfk: correct DACK setting
  wifi: rtl8xxxu: don't call dev_kfree_skb() under spin_lock_irqsave()
  wifi: libertas: fix memory leak in lbs_init_adapter()
  wifi: iwlegacy: common: don't call dev_kfree_skb() under spin_lock_irqsave()
  wifi: rtlwifi: rtl8723be: don't call kfree_skb() under spin_lock_irqsave()
  wifi: rtlwifi: rtl8188ee: don't call kfree_skb() under spin_lock_irqsave()
  wifi: rtlwifi: rtl8821ae: don't call kfree_skb() under spin_lock_irqsave()
  wifi: rsi: Fix memory leak in rsi_coex_attach()
  wifi: mt76: fix coverity uninit_use_in_call in mt76_connac2_reverse_frag0_hdr_trans()
  wifi: mt76: mt7915: fix unintended sign extension of mt7915_hw_queue_read()
  wifi: mt76: mt7915: drop always true condition of __mt7915_reg_addr()
  wifi: mt76: mt7915: check return value before accessing free_block_num
  wifi: mt76: mt7921s: fix slab-out-of-bounds access in sdio host
  wifi: mt76: mt7915: add missing of_node_put()
  block: use proper return value from bio_failfast()
  block: bio-integrity: Copy flags when bio_integrity_payload is cloned
  block: Fix io statistics for cgroup in throttle path
  block: sync mixed merged request's failfast with 1st bio's
  erofs: relinquish volume with mutex held
  arm64: dts: qcom: pmk8350: Use the correct PON compatible
  arm64: dts: qcom: pmk8350: Specify PBS register for PON
  block: ublk: check IO buffer based on flag need_get_data
  KEYS: asymmetric: Fix ECDSA use via keyctl uapi
  x86/perf/zhaoxin: Add stepping check for ZXC
  perf/x86/intel/ds: Fix the conversion from TSC to perf time
  sched/rt: pick_next_rt_entity(): check list_entry
  s390/dasd: Fix potential memleak in dasd_eckd_init()
  arm64: dts: qcom: msm8992-lg-bullhead: Enable regulators
  arm64: dts: qcom: msm8992-*: Fix up comments
  arm64: dts: qcom: msm8953: correct TLMM gpio-ranges
  arm64: dts: qcom: msm8992-lg-bullhead: Correct memory overlaps with the SMEM and MPSS memory regions
  arm64: dts: qcom: sm8450: drop incorrect cells from serial
  arm64: dts: qcom: sm8350: drop incorrect cells from serial
  arm64: dts: qcom: msm8996 switch from RPM_SMD_BB_CLK1 to RPM_SMD_XO_CLK_SRC
  arm64: dts: qcom: msm8996: support using GPLL0 as kryocc input
  blk-mq: correct stale comment of .get_budget
  blk-mq: Fix potential io hung for shared sbitmap per tagset
  blk-mq: wait on correct sbitmap_queue in blk_mq_mark_tag_wait
  blk-mq: remove stale comment for blk_mq_sched_mark_restart_hctx
  blk-mq: avoid sleep in blk_mq_alloc_request_hctx
  ARM: dts: stm32: Update part number NVMEM description on stm32mp131
  arm64: dts: mediatek: mt7986: Fix watchdog compatible
  arm64: dts: mediatek: mt8195: Fix watchdog compatible
  arm64: dts: mediatek: mt8186: Fix watchdog compatible
  arm64: dts: mediatek: mt7622: Add missing pwm-cells to pwm node
  arm64: dts: mt8186: Fix CPU map for single-cluster SoC
  arm64: dts: mt8192: Fix CPU map for single-cluster SoC
  arm64: dts: mt8195: Fix CPU map for single-cluster SoC
  sbitmap: correct wake_batch recalculation to avoid potential IO hung
  sbitmap: Use single per-bitmap counting to wake up queued tags
  sbitmap: remove redundant check in __sbitmap_queue_get_batch
  ARM: dts: imx7s: correct iomuxc gpr mux controller cells
  ublk_drv: don't probe partitions if the ubq daemon isn't trusted
  ublk_drv: remove nr_aborted_queues from ublk_device
  ARM: dts: sun8i: nanopi-duo2: Fix regulator GPIO reference
  arm64: dts: meson: bananapi-m5: switch VDDIO_C pin to OPEN_DRAIN
  arm64: dts: meson: radxa-zero: allow usb otg mode
  arm64: dts: renesas: beacon-renesom: Fix gpio expander reference
  locking/rwsem: Disable preemption in all down_read*() and up_read() code paths
  arm64: dts: amlogic: meson-sm1-odroid-hc4: fix active fan thermal trip
  arm64: dts: amlogic: meson-gxbb-kii-pro: fix led node name
  arm64: dts: amlogic: meson-gxl-s905d-phicomm-n1: fix led node name
  arm64: dts: amlogic: meson-sm1-bananapi-m5: fix adc keys node names
  arm64: dts: amlogic: meson-gx-libretech-pc: fix update button name
  arm64: dts: amlogic: meson-gxl: add missing unit address to eth-phy-mux node name
  arm64: dts: amlogic: meson-axg-jethome-jethub-j1xx: fix invalid rtc node name
  arm64: dts: amlogic: meson-gxl-s905w-jethome-jethub-j80: fix invalid rtc node name
  arm64: dts: amlogic: meson-gx: add missing unit address to rng node name
  arm64: dts: amlogic: meson-gxl-s905d-sml5442tw: drop invalid clock-names property
  arm64: dts: amlogic: meson-axg-jethome-jethub-j1xx: fix supply name of USB controller node
  arm64: dts: amlogic: meson-gx: add missing SCPI sensors compatible
  arm64: dts: amlogic: meson-axg: fix SCPI clock dvfs node name
  arm64: dts: amlogic: meson-gx: fix SCPI clock dvfs node name
  ARM: imx: Call ida_simple_remove() for ida_simple_get
  ARM: dts: exynos: correct wr-active property in Exynos3250 Rinato
  arm64: dts: ti: k3-j7200: Fix wakeup pinmux range
  ARM: s3c: fix s3c64xx_set_timer_source prototype
  ARM: bcm2835_defconfig: Enable the framebuffer
  arm64: dts: mediatek: mt8192: Mark scp_adsp clock as broken
  ARM: OMAP1: call platform_device_put() in error case in omap1_dm_timer_init()
  arm64: dts: meson: remove CPU opps below 1GHz for G12A boards
  arm64: dts: qcom: ipq8074: correct PCIe QMP PHY output clock names
  arm64: dts: qcom: ipq8074: fix Gen3 PCIe node
  arm64: dts: qcom: ipq8074: correct Gen2 PCIe ranges
  arm64: dts: qcom: ipq8074: fix Gen3 PCIe QMP PHY
  arm64: dts: qcom: ipq8074: fix Gen2 PCIe QMP PHY
  arm64: dts: qcom: ipq8074: correct USB3 QMP PHY-s clock output names
  arm64: dts: qcom: msm8992-bullhead: Disable dfps_data_mem
  arm64: dts: qcom: msm8992-bullhead: Fix cont_splash_mem size
  arm64: dts: msm8992-bullhead: add memory hole region
  arm64: tegra: Fix duplicate regulator on Jetson TX1
  arm64: dts: ti: k3-am62-main: Fix clocks for McSPI
  arm64: dts: ti: k3-am62: Enable SPI nodes at the board level
  cpuidle, intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE *again*
  arm64: dts: meson-gx: Fix the SCPI DVFS node name and unit address
  arm64: dts: meson-g12a: Fix internal Ethernet PHY unit name
  arm64: dts: meson-gx: Fix Ethernet MAC address unit name
  arm64: dts: meson-axg: jethub-j1xx: Fix MAC address node names
  arm64: dts: meson-gxl: jethub-j80: Fix Bluetooth MAC node name
  arm64: dts: meson-gxl: jethub-j80: Fix WiFi MAC address node
  arm64: dts: qcom: sc8280xp: Vote for CX in USB controllers
  arm64: dts: qcom: sc8280xp: correct SPMI bus address cells
  arm64: dts: qcom: sc7280: correct SPMI bus address cells
  arm64: dts: qcom: sc7180: correct SPMI bus address cells
  x86/acpi/boot: Do not register processors that cannot be onlined for x2APIC
  arm64: dts: qcom: sdm845-db845c: fix audio codec interrupt pin name
  arm64: dts: mediatek: mt8186: Fix systimer 13 MHz clock description
  arm64: dts: mediatek: mt8195: Fix systimer 13 MHz clock description
  arm64: dts: mediatek: mt8192: Fix systimer 13 MHz clock description
  arm64: dts: mediatek: mt8183: Fix systimer 13 MHz clock description
  arm64: dts: mediatek: mt8195: Add power domain to U3PHY1 T-PHY
  ARM: zynq: Fix refcount leak in zynq_early_slcr_init
  arm64: dts: imx8m: Align SoC unique ID node unit address
  arm64: dts: qcom: sm6125-seine: Clean up gpio-keys (volume down)
  arm64: dts: qcom: sm6125: Reorder HSUSB PHY clocks to match bindings
  arm64: dts: qcom: sm6350: Fix up the ramoops node
  arm64: dts: qcom: sm8150-kumano: Panel framebuffer is 2.5k instead of 4k
  arm64: dts: qcom: msm8996-tone: Fix USB taking 6 minutes to wake up
  arm64: dts: qcom: qcs404: use symbol names for PCIe resets
  ARM: OMAP2+: Fix memory leak in realtime_counter_init()
  ata: ahci: Revert "ata: ahci: Add Tiger Lake UP{3,4} AHCI controller"
  powerpc/mm: Rearrange if-else block to avoid clang warning
  HID: asus: use spinlock to safely schedule workers
  HID: asus: use spinlock to protect concurrent accesses
  Revert "ANDROID: disble the UID_SYS_STATS driver"
  Revert "exit: Remove profile_task_exit & profile_munmap"
  FROMGIT: pstore: Revert pmsg_lock back to a normal mutex
  ANDROID: ABI: Update allowed list for QCOM
  ANDROID: ABI: Add missing symbols to QCOM list
  fscrypt: support decrypting data from large folios
  fsverity: support verifying data from large folios
  fsverity.rst: update git repo URL for fsverity-utils
  ext4: allow verity with fs block size < PAGE_SIZE
  fs/buffer.c: support fsverity in block_read_full_folio()
  f2fs: simplify f2fs_readpage_limit()
  ext4: simplify ext4_readpage_limit()
  fsverity: support enabling with tree block size < PAGE_SIZE
  fsverity: support verification with tree block size < PAGE_SIZE
  fsverity: replace fsverity_hash_page() with fsverity_hash_block()
  fsverity: use EFBIG for file too large to enable verity
  fsverity: store log2(digest_size) precomputed
  fsverity: simplify Merkle tree readahead size calculation
  fsverity: use unsigned long for level_start
  fsverity: remove debug messages and CONFIG_FS_VERITY_DEBUG
  fsverity: pass pos and size to ->write_merkle_tree_block
  fsverity: optimize fsverity_cleanup_inode() on non-verity files
  fsverity: optimize fsverity_prepare_setattr() on non-verity files
  fsverity: optimize fsverity_file_open() on non-verity files
  fscrypt: clean up fscrypt_add_test_dummy_key()
  fs/super.c: stop calling fscrypt_destroy_keyring() from __put_super()
  f2fs: stop calling fscrypt_add_test_dummy_key()
  ext4: stop calling fscrypt_add_test_dummy_key()
  fscrypt: add the test dummy encryption key on-demand
  f2fs: drop unnecessary arg for f2fs_ioc_*()
  f2fs: Revert "f2fs: truncate blocks in batch in __complete_revoke_list()"
  f2fs: synchronize atomic write aborts
  f2fs: fix wrong segment count
  f2fs: replace si->sbi w/ sbi in stat_show()
  f2fs: export ipu policy in debugfs
  f2fs: make kobj_type structures constant
  f2fs: fix to do sanity check on extent cache correctly
  f2fs: add missing description for ipu_policy node
  f2fs: fix to set ipu policy
  f2fs: fix typos in comments
  f2fs: fix kernel crash due to null io->bio
  f2fs: use iostat_lat_type directly as a parameter in the iostat_update_and_unbind_ctx()
  f2fs: add sysfs nodes to set last_age_weight
  f2fs: fix f2fs_show_options to show nogc_merge mount option
  f2fs: fix cgroup writeback accounting with fs-layer encryption
  f2fs: fix wrong calculation of block age
  f2fs: fix to update age extent in f2fs_do_zero_range()
  f2fs: fix to update age extent correctly during truncation
  f2fs: fix to avoid potential memory corruption in __update_iostat_latency()
  f2fs: retry to update the inode page given data corruption
  f2fs: fix to handle F2FS_IOC_START_ATOMIC_REPLACE in f2fs_compat_ioctl()
  f2fs: clean up i_compress_flag and i_compress_level usage
  f2fs: reduce stack memory cost by using bitfield in struct f2fs_io_info
  f2fs: factor the read/write tracing logic into a helper
  f2fs: remove __has_curseg_space
  f2fs: refactor next blk selection
  f2fs: remove __allocate_new_section
  f2fs: refactor __allocate_new_segment
  f2fs: add a f2fs_curseg_valid_blocks helper
  f2fs: simplify do_checkpoint
  f2fs: remove __add_sum_entry
  f2fs: fix to abort atomic write only during do_exist()
  f2fs: allow set compression option of files without blocks
  f2fs: fix information leak in f2fs_move_inline_dirents()
  fs: f2fs: initialize fsdata in pagecache_write()
  f2fs: fix to check warm_data_age_threshold
  f2fs: return true if all cmd were issued or no cmd need to be issued for f2fs_issue_discard_timeout()
  f2fs: clarify compress level bit offset
  f2fs: fix to show discard_unit mount opt
  f2fs: fix to do sanity check on extent cache correctly
  f2fs: remove unneeded f2fs_cp_error() in f2fs_create_whiteout()
  f2fs: clear atomic_write_task in f2fs_abort_atomic_write()
  f2fs: introduce trace_f2fs_replace_atomic_write_block
  f2fs: introduce discard_io_aware_gran sysfs node
  f2fs: drop useless initializer and unneeded local variable
  f2fs: add iostat support for flush
  f2fs: support accounting iostat count and avg_bytes
  f2fs: convert discard_wake and gc_wake to bool type
  f2fs: convert to use MIN_DISCARD_GRANULARITY macro
  f2fs: merge f2fs_show_injection_info() into time_to_inject()
  f2fs: add a f2fs_ prefix to punch_hole() and expand_inode_data()
  f2fs: remove unnecessary blank lines
  f2fs: mark f2fs_init_compress_mempool w/ __init
  f2fs: judge whether discard_unit is section only when have CONFIG_BLK_DEV_ZONED
  f2fs: start freeing cluster pages from the unused number
  MAINTAINERS: Add f2fs's patchwork
  f2fs: deliver the accumulated 'issued' to __issue_discard_cmd_orderly()
  f2fs: avoid to check PG_error flag
  f2fs: add missing doc for fault injection sysfs
  f2fs: fix to avoid potential deadlock
  f2fs: introduce IS_F2FS_IPU_* macro
  f2fs: refactor the hole reporting and allocation logic in f2fs_map_blocks
  f2fs: factor out a f2fs_map_no_dnode
  f2fs: factor a f2fs_map_blocks_cached helper
  f2fs: remove the create argument to f2fs_map_blocks
  f2fs: remove f2fs_get_block
  docs: f2fs: fix html doc error
  f2fs: simplify __allocate_data_block
  f2fs: reflow prepare_write_begin
  f2fs: f2fs_do_map_lock
  f2fs: add a f2fs_get_block_locked helper
  f2fs: add a f2fs_lookup_extent_cache_block helper
  f2fs: split __submit_bio
  f2fs: rename F2FS_MAP_UNWRITTEN to F2FS_MAP_DELALLOC
  f2fs: decouple F2FS_MAP_ from buffer head flags
  f2fs: don't rely on F2FS_MAP_* in f2fs_iomap_begin
  f2fs: fix to call clear_page_private_reference in .{release,invalid}_folio
  f2fs: remove unused PAGE_PRIVATE_ATOMIC_WRITE
  f2fs: fix to support .migrate_folio for compressed inode
  f2fs: file: drop useless initializer in expand_inode_data()

 Conflicts:
	Documentation/devicetree/bindings
	Documentation/devicetree/bindings/display/mediatek/mediatek,ccorr.yaml
	Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml
	android/abi_gki_aarch64.stg
	drivers/hwtracing/coresight/coresight-cti-sysfs.c
	drivers/soc/qcom/qcom_stats.c
	drivers/ufs/host/ufs-qcom.c
	drivers/ufs/host/ufs-qcom.h

Change-Id: I6a2a516fd53a940d28d7f51b0b73f816b2a632fc
Upstream-Build: ks_qcom-android14-6.1-keystone-qcom-release@9839361 UKQ2.230328.002
Signed-off-by: jianzhou <quic_jianzhou@quicinc.com>
2023-04-04 00:15:30 -07:00

2242 lines
73 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 1
SUBLEVEL = 20
EXTRAVERSION =
NAME = Hurr durr I'ma ninja sloth
# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
# More info can be located in ./README
# Comments in this file are targeted only to the developer, do not
# expect to learn how to build the kernel reading this file.
$(if $(filter __%, $(MAKECMDGOALS)), \
$(error targets prefixed with '__' are only for internal use))
# That's our default target when none is given on the command line
PHONY := __all
__all:
# We are using a recursive build, so we need to do a little thinking
# to get the ordering right.
#
# Most importantly: sub-Makefiles should only ever modify files in
# their own directory. If in some directory we have a dependency on
# a file in another dir (which doesn't happen often, but it's often
# unavoidable when linking the built-in.a targets which finally
# turn into vmlinux), we will call a sub make in that other dir, and
# after that we are sure that everything which is in that other dir
# is now up to date.
#
# The only cases where we need to modify files which have global
# effects are thus separated out and done before the recursive
# descending is started. They are now explicitly listed as the
# prepare rule.
ifneq ($(sub_make_done),1)
# Do not use make's built-in rules and variables
# (this increases performance and avoids hard-to-debug behaviour)
MAKEFLAGS += -rR
# Avoid funny character set dependencies
unexport LC_ALL
LC_COLLATE=C
LC_NUMERIC=C
export LC_COLLATE LC_NUMERIC
# Avoid interference with shell env settings
unexport GREP_OPTIONS
# Beautify output
# ---------------------------------------------------------------------------
#
# Normally, we echo the whole command before executing it. By making
# that echo $($(quiet)$(cmd)), we now have the possibility to set
# $(quiet) to choose other forms of output instead, e.g.
#
# quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@
# cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
#
# If $(quiet) is empty, the whole command will be printed.
# If it is set to "quiet_", only the short version will be printed.
# If it is set to "silent_", nothing will be printed at all, since
# the variable $(silent_cmd_cc_o_c) doesn't exist.
#
# A simple variant is to prefix commands with $(Q) - that's useful
# for commands that shall be hidden in non-verbose mode.
#
# $(Q)ln $@ :<
#
# If KBUILD_VERBOSE equals 0 then the above command will be hidden.
# If KBUILD_VERBOSE equals 1 then the above command is displayed.
# If KBUILD_VERBOSE equals 2 then give the reason why each target is rebuilt.
#
# To put more focus on warnings, be less verbose as default
# Use 'make V=1' to see the full commands
ifeq ("$(origin V)", "command line")
KBUILD_VERBOSE = $(V)
endif
ifndef KBUILD_VERBOSE
KBUILD_VERBOSE = 0
endif
ifeq ($(KBUILD_VERBOSE),1)
quiet =
Q =
else
quiet=quiet_
Q = @
endif
# If the user is running make -s (silent mode), suppress echoing of
# commands
# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
ifeq ($(filter 3.%,$(MAKE_VERSION)),)
silence:=$(findstring s,$(firstword -$(MAKEFLAGS)))
else
silence:=$(findstring s,$(filter-out --%,$(MAKEFLAGS)))
endif
ifeq ($(silence),s)
quiet=silent_
KBUILD_VERBOSE = 0
endif
export quiet Q KBUILD_VERBOSE
# Call a source code checker (by default, "sparse") as part of the
# C compilation.
#
# Use 'make C=1' to enable checking of only re-compiled files.
# Use 'make C=2' to enable checking of *all* source files, regardless
# of whether they are re-compiled or not.
#
# See the file "Documentation/dev-tools/sparse.rst" for more details,
# including where to get the "sparse" utility.
ifeq ("$(origin C)", "command line")
KBUILD_CHECKSRC = $(C)
endif
ifndef KBUILD_CHECKSRC
KBUILD_CHECKSRC = 0
endif
export KBUILD_CHECKSRC
# Enable "clippy" (a linter) as part of the Rust compilation.
#
# Use 'make CLIPPY=1' to enable it.
ifeq ("$(origin CLIPPY)", "command line")
KBUILD_CLIPPY := $(CLIPPY)
endif
export KBUILD_CLIPPY
# Use make M=dir or set the environment variable KBUILD_EXTMOD to specify the
# directory of external module to build. Setting M= takes precedence.
ifeq ("$(origin M)", "command line")
KBUILD_EXTMOD := $(M)
endif
$(if $(word 2, $(KBUILD_EXTMOD)), \
$(error building multiple external modules is not supported))
$(foreach x, % :, $(if $(findstring $x, $(KBUILD_EXTMOD)), \
$(error module directory path cannot contain '$x')))
# Remove trailing slashes
ifneq ($(filter %/, $(KBUILD_EXTMOD)),)
KBUILD_EXTMOD := $(shell dirname $(KBUILD_EXTMOD).)
endif
export KBUILD_EXTMOD
# ANDROID: set up mixed-build support. mixed-build allows device kernel modules
# to be compiled against a GKI kernel. This approach still uses the headers and
# Kbuild from device kernel, so care must be taken to ensure that those headers match.
ifdef KBUILD_MIXED_TREE
# Need vmlinux.symvers for modpost and System.map for depmod, check whether they exist in KBUILD_MIXED_TREE
required_mixed_files=vmlinux.symvers System.map
$(if $(filter-out $(words $(required_mixed_files)), \
$(words $(wildcard $(add-prefix $(KBUILD_MIXED_TREE)/,$(required_mixed_files))))),,\
$(error KBUILD_MIXED_TREE=$(KBUILD_MIXED_TREE) doesn't contain $(required_mixed_files)))
endif
mixed-build-prefix = $(if $(KBUILD_MIXED_TREE),$(KBUILD_MIXED_TREE)/)
export KBUILD_MIXED_TREE
# This is a hack for kleaf to set mixed-build-prefix within the execution of a make rule, e.g.
# within __modinst_pre.
# TODO(b/205893923): Revert this hack once it is properly handled.
export mixed-build-prefix
# Kbuild will save output files in the current working directory.
# This does not need to match to the root of the kernel source tree.
#
# For example, you can do this:
#
# cd /dir/to/store/output/files; make -f /dir/to/kernel/source/Makefile
#
# If you want to save output files in a different location, there are
# two syntaxes to specify it.
#
# 1) O=
# Use "make O=dir/to/store/output/files/"
#
# 2) Set KBUILD_OUTPUT
# Set the environment variable KBUILD_OUTPUT to point to the output directory.
# export KBUILD_OUTPUT=dir/to/store/output/files/; make
#
# The O= assignment takes precedence over the KBUILD_OUTPUT environment
# variable.
# Do we want to change the working directory?
ifeq ("$(origin O)", "command line")
KBUILD_OUTPUT := $(O)
endif
ifneq ($(KBUILD_OUTPUT),)
# Make's built-in functions such as $(abspath ...), $(realpath ...) cannot
# expand a shell special character '~'. We use a somewhat tedious way here.
abs_objtree := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) && pwd)
$(if $(abs_objtree),, \
$(error failed to create output directory "$(KBUILD_OUTPUT)"))
# $(realpath ...) resolves symlinks
abs_objtree := $(realpath $(abs_objtree))
else
abs_objtree := $(CURDIR)
endif # ifneq ($(KBUILD_OUTPUT),)
ifeq ($(abs_objtree),$(CURDIR))
# Suppress "Entering directory ..." unless we are changing the work directory.
MAKEFLAGS += --no-print-directory
else
need-sub-make := 1
endif
this-makefile := $(lastword $(MAKEFILE_LIST))
abs_srctree := $(realpath $(dir $(this-makefile)))
ifneq ($(words $(subst :, ,$(abs_srctree))), 1)
$(error source directory cannot contain spaces or colons)
endif
ifneq ($(abs_srctree),$(abs_objtree))
# Look for make include files relative to root of kernel src
#
# --included-dir is added for backward compatibility, but you should not rely on
# it. Please add $(srctree)/ prefix to include Makefiles in the source tree.
MAKEFLAGS += --include-dir=$(abs_srctree)
endif
ifneq ($(filter 3.%,$(MAKE_VERSION)),)
# 'MAKEFLAGS += -rR' does not immediately become effective for GNU Make 3.x
# We need to invoke sub-make to avoid implicit rules in the top Makefile.
need-sub-make := 1
# Cancel implicit rules for this Makefile.
$(this-makefile): ;
endif
export abs_srctree abs_objtree
export sub_make_done := 1
ifeq ($(need-sub-make),1)
PHONY += $(MAKECMDGOALS) __sub-make
$(filter-out $(this-makefile), $(MAKECMDGOALS)) __all: __sub-make
@:
# Invoke a second make in the output directory, passing relevant variables
__sub-make:
$(Q)$(MAKE) -C $(abs_objtree) -f $(abs_srctree)/Makefile $(MAKECMDGOALS)
endif # need-sub-make
endif # sub_make_done
# We process the rest of the Makefile if this is the final invocation of make
ifeq ($(need-sub-make),)
# Do not print "Entering directory ...",
# but we want to display it when entering to the output directory
# so that IDEs/editors are able to understand relative filenames.
MAKEFLAGS += --no-print-directory
ifeq ($(abs_srctree),$(abs_objtree))
# building in the source tree
srctree := .
building_out_of_srctree :=
else
ifeq ($(abs_srctree)/,$(dir $(abs_objtree)))
# building in a subdirectory of the source tree
srctree := ..
else
srctree := $(abs_srctree)
endif
building_out_of_srctree := 1
endif
ifneq ($(KBUILD_ABS_SRCTREE),)
srctree := $(abs_srctree)
endif
objtree := .
VPATH := $(srctree)
export building_out_of_srctree srctree objtree VPATH
# To make sure we do not include .config for any of the *config targets
# catch them early, and hand them over to scripts/kconfig/Makefile
# It is allowed to specify more targets when calling make, including
# mixing *config targets and build targets.
# For example 'make oldconfig all'.
# Detect when mixed targets is specified, and make a second invocation
# of make so .config is not included in this case either (for *config).
version_h := include/generated/uapi/linux/version.h
clean-targets := %clean mrproper cleandocs
no-dot-config-targets := $(clean-targets) \
cscope gtags TAGS tags help% %docs check% coccicheck \
$(version_h) headers headers_% archheaders archscripts \
%asm-generic kernelversion %src-pkg dt_binding_check \
outputmakefile rustavailable rustfmt rustfmtcheck
# Installation targets should not require compiler. Unfortunately, vdso_install
# is an exception where build artifacts may be updated. This must be fixed.
no-compiler-targets := $(no-dot-config-targets) install dtbs_install \
headers_install modules_install kernelrelease image_name
no-sync-config-targets := $(no-dot-config-targets) %install kernelrelease \
image_name
single-targets := %.a %.i %.rsi %.ko %.lds %.ll %.lst %.mod %.o %.s %.symtypes %/
config-build :=
mixed-build :=
need-config := 1
need-compiler := 1
may-sync-config := 1
single-build :=
ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),)
ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
need-config :=
endif
endif
ifneq ($(filter $(no-compiler-targets), $(MAKECMDGOALS)),)
ifeq ($(filter-out $(no-compiler-targets), $(MAKECMDGOALS)),)
need-compiler :=
endif
endif
ifneq ($(filter $(no-sync-config-targets), $(MAKECMDGOALS)),)
ifeq ($(filter-out $(no-sync-config-targets), $(MAKECMDGOALS)),)
may-sync-config :=
endif
endif
ifneq ($(KBUILD_EXTMOD),)
may-sync-config :=
endif
ifeq ($(KBUILD_EXTMOD),)
ifneq ($(filter %config,$(MAKECMDGOALS)),)
config-build := 1
ifneq ($(words $(MAKECMDGOALS)),1)
mixed-build := 1
endif
endif
endif
# We cannot build single targets and the others at the same time
ifneq ($(filter $(single-targets), $(MAKECMDGOALS)),)
single-build := 1
ifneq ($(filter-out $(single-targets), $(MAKECMDGOALS)),)
mixed-build := 1
endif
endif
# For "make -j clean all", "make -j mrproper defconfig all", etc.
ifneq ($(filter $(clean-targets),$(MAKECMDGOALS)),)
ifneq ($(filter-out $(clean-targets),$(MAKECMDGOALS)),)
mixed-build := 1
endif
endif
# install and modules_install need also be processed one by one
ifneq ($(filter install,$(MAKECMDGOALS)),)
ifneq ($(filter modules_install,$(MAKECMDGOALS)),)
mixed-build := 1
endif
endif
ifdef mixed-build
# ===========================================================================
# We're called with mixed targets (*config and build targets).
# Handle them one by one.
PHONY += $(MAKECMDGOALS) __build_one_by_one
$(MAKECMDGOALS): __build_one_by_one
@:
__build_one_by_one:
$(Q)set -e; \
for i in $(MAKECMDGOALS); do \
$(MAKE) -f $(srctree)/Makefile $$i; \
done
else # !mixed-build
include $(srctree)/scripts/Kbuild.include
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
include $(srctree)/scripts/subarch.include
# Cross compiling and selecting different set of gcc/bin-utils
# ---------------------------------------------------------------------------
#
# When performing cross compilation for other architectures ARCH shall be set
# to the target architecture. (See arch/* for the possibilities).
# ARCH can be set during invocation of make:
# make ARCH=ia64
# Another way is to have ARCH set in the environment.
# The default ARCH is the host where make is executed.
# CROSS_COMPILE specify the prefix used for all executables used
# during compilation. Only gcc and related bin-utils executables
# are prefixed with $(CROSS_COMPILE).
# CROSS_COMPILE can be set on the command line
# make CROSS_COMPILE=ia64-linux-
# Alternatively CROSS_COMPILE can be set in the environment.
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
ARCH ?= $(SUBARCH)
# Architecture as present in compile.h
UTS_MACHINE := $(ARCH)
SRCARCH := $(ARCH)
# Additional ARCH settings for x86
ifeq ($(ARCH),i386)
SRCARCH := x86
endif
ifeq ($(ARCH),x86_64)
SRCARCH := x86
endif
# Additional ARCH settings for sparc
ifeq ($(ARCH),sparc32)
SRCARCH := sparc
endif
ifeq ($(ARCH),sparc64)
SRCARCH := sparc
endif
# Additional ARCH settings for parisc
ifeq ($(ARCH),parisc64)
SRCARCH := parisc
endif
export cross_compiling :=
ifneq ($(SRCARCH),$(SUBARCH))
cross_compiling := 1
endif
KCONFIG_CONFIG ?= .config
export KCONFIG_CONFIG
# SHELL used by kbuild
CONFIG_SHELL := sh
HOST_LFS_CFLAGS := $(shell getconf LFS_CFLAGS 2>/dev/null)
HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS 2>/dev/null)
HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null)
ifneq ($(LLVM),)
ifneq ($(filter %/,$(LLVM)),)
LLVM_PREFIX := $(LLVM)
else ifneq ($(filter -%,$(LLVM)),)
LLVM_SUFFIX := $(LLVM)
endif
HOSTCC = $(LLVM_PREFIX)clang$(LLVM_SUFFIX)
HOSTCXX = $(LLVM_PREFIX)clang++$(LLVM_SUFFIX)
else
HOSTCC = gcc
HOSTCXX = g++
endif
HOSTRUSTC = rustc
HOSTPKG_CONFIG = pkg-config
KBUILD_USERHOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes \
-O2 -fomit-frame-pointer -std=gnu11 \
-Wdeclaration-after-statement
KBUILD_USERCFLAGS := $(KBUILD_USERHOSTCFLAGS) $(USERCFLAGS)
KBUILD_USERLDFLAGS := $(USERLDFLAGS)
# These flags apply to all Rust code in the tree, including the kernel and
# host programs.
export rust_common_flags := --edition=2021 \
-Zbinary_dep_depinfo=y \
-Dunsafe_op_in_unsafe_fn -Drust_2018_idioms \
-Dunreachable_pub -Dnon_ascii_idents \
-Wmissing_docs \
-Drustdoc::missing_crate_level_docs \
-Dclippy::correctness -Dclippy::style \
-Dclippy::suspicious -Dclippy::complexity \
-Dclippy::perf \
-Dclippy::let_unit_value -Dclippy::mut_mut \
-Dclippy::needless_bitwise_bool \
-Dclippy::needless_continue \
-Wclippy::dbg_macro
KBUILD_HOSTCFLAGS := $(KBUILD_USERHOSTCFLAGS) $(HOST_LFS_CFLAGS) $(HOSTCFLAGS)
KBUILD_HOSTCXXFLAGS := -Wall -O2 $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS)
KBUILD_HOSTRUSTFLAGS := $(rust_common_flags) -O -Cstrip=debuginfo \
-Zallow-features= $(HOSTRUSTFLAGS)
KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS) $(HOSTLDFLAGS)
KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) $(HOSTLDLIBS)
# Make variables (CC, etc...)
CPP = $(CC) -E
ifneq ($(LLVM),)
CC = $(LLVM_PREFIX)clang$(LLVM_SUFFIX)
LD = $(LLVM_PREFIX)ld.lld$(LLVM_SUFFIX)
AR = $(LLVM_PREFIX)llvm-ar$(LLVM_SUFFIX)
NM = $(LLVM_PREFIX)llvm-nm$(LLVM_SUFFIX)
OBJCOPY = $(LLVM_PREFIX)llvm-objcopy$(LLVM_SUFFIX)
OBJDUMP = $(LLVM_PREFIX)llvm-objdump$(LLVM_SUFFIX)
READELF = $(LLVM_PREFIX)llvm-readelf$(LLVM_SUFFIX)
STRIP = $(LLVM_PREFIX)llvm-strip$(LLVM_SUFFIX)
else
CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)ld
AR = $(CROSS_COMPILE)ar
NM = $(CROSS_COMPILE)nm
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
READELF = $(CROSS_COMPILE)readelf
STRIP = $(CROSS_COMPILE)strip
endif
RUSTC = rustc
RUSTDOC = rustdoc
RUSTFMT = rustfmt
CLIPPY_DRIVER = clippy-driver
BINDGEN = bindgen
CARGO = cargo
PAHOLE = pahole
RESOLVE_BTFIDS = $(objtree)/tools/bpf/resolve_btfids/resolve_btfids
LEX = flex
YACC = bison
AWK = awk
INSTALLKERNEL := installkernel
DEPMOD = depmod
PERL = perl
PYTHON3 = python3
CHECK = sparse
BASH = bash
KGZIP = gzip
KBZIP2 = bzip2
KLZOP = lzop
LZMA = lzma
LZ4 = lz4
XZ = xz
ZSTD = zstd
PAHOLE_FLAGS = $(shell PAHOLE=$(PAHOLE) $(srctree)/scripts/pahole-flags.sh)
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
-Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF)
NOSTDINC_FLAGS :=
CFLAGS_MODULE =
RUSTFLAGS_MODULE =
AFLAGS_MODULE =
LDFLAGS_MODULE =
CFLAGS_KERNEL =
RUSTFLAGS_KERNEL =
AFLAGS_KERNEL =
LDFLAGS_vmlinux =
# Use USERINCLUDE when you must reference the UAPI directories only.
USERINCLUDE := \
-I$(srctree)/arch/$(SRCARCH)/include/uapi \
-I$(objtree)/arch/$(SRCARCH)/include/generated/uapi \
-I$(srctree)/include/uapi \
-I$(objtree)/include/generated/uapi \
-include $(srctree)/include/linux/compiler-version.h \
-include $(srctree)/include/linux/kconfig.h
# Use LINUXINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option
LINUXINCLUDE := \
-I$(srctree)/arch/$(SRCARCH)/include \
-I$(objtree)/arch/$(SRCARCH)/include/generated \
$(if $(building_out_of_srctree),-I$(srctree)/include) \
-I$(objtree)/include \
$(USERINCLUDE)
KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE
KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
-Werror=implicit-function-declaration -Werror=implicit-int \
-Werror=return-type -Wno-format-security \
-std=gnu11
KBUILD_CPPFLAGS := -D__KERNEL__
KBUILD_RUSTFLAGS := $(rust_common_flags) \
--target=$(objtree)/rust/target.json \
-Cpanic=abort -Cembed-bitcode=n -Clto=n \
-Cforce-unwind-tables=n -Ccodegen-units=1 \
-Csymbol-mangling-version=v0 \
-Crelocation-model=static \
-Zfunction-sections=n \
-Dclippy::float_arithmetic
KBUILD_AFLAGS_KERNEL :=
KBUILD_CFLAGS_KERNEL :=
KBUILD_RUSTFLAGS_KERNEL :=
KBUILD_AFLAGS_MODULE := -DMODULE
KBUILD_CFLAGS_MODULE := -DMODULE
KBUILD_RUSTFLAGS_MODULE := --cfg MODULE
KBUILD_LDFLAGS_MODULE :=
KBUILD_LDFLAGS :=
CLANG_FLAGS :=
ifeq ($(KBUILD_CLIPPY),1)
RUSTC_OR_CLIPPY_QUIET := CLIPPY
RUSTC_OR_CLIPPY = $(CLIPPY_DRIVER)
else
RUSTC_OR_CLIPPY_QUIET := RUSTC
RUSTC_OR_CLIPPY = $(RUSTC)
endif
ifdef RUST_LIB_SRC
export RUST_LIB_SRC
endif
# Allows the usage of unstable features in stable compilers.
export RUSTC_BOOTSTRAP := 1
export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC HOSTPKG_CONFIG
export RUSTC RUSTDOC RUSTFMT RUSTC_OR_CLIPPY_QUIET RUSTC_OR_CLIPPY BINDGEN CARGO
export HOSTRUSTC KBUILD_HOSTRUSTFLAGS
export CPP AR NM STRIP OBJCOPY OBJDUMP READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL
export PERL PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
export KGZIP KBZIP2 KLZOP LZMA LZ4 XZ ZSTD
export KBUILD_HOSTCXXFLAGS KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS LDFLAGS_MODULE
export KBUILD_USERCFLAGS KBUILD_USERLDFLAGS
export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS KBUILD_LDFLAGS
export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
export KBUILD_RUSTFLAGS RUSTFLAGS_KERNEL RUSTFLAGS_MODULE
export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_RUSTFLAGS_MODULE KBUILD_LDFLAGS_MODULE
export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL KBUILD_RUSTFLAGS_KERNEL
export PAHOLE_FLAGS
# Files to ignore in find ... statements
export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o \
-name CVS -o -name .pc -o -name .hg -o -name .git \) \
-prune -o
export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \
--exclude CVS --exclude .pc --exclude .hg --exclude .git
# ===========================================================================
# Rules shared between *config targets and build targets
# Basic helpers built in scripts/basic/
PHONY += scripts_basic
scripts_basic:
$(Q)$(MAKE) $(build)=scripts/basic
PHONY += outputmakefile
ifdef building_out_of_srctree
# Before starting out-of-tree build, make sure the source tree is clean.
# outputmakefile generates a Makefile in the output directory, if using a
# separate output directory. This allows convenient use of make in the
# output directory.
# At the same time when output Makefile generated, generate .gitignore to
# ignore whole output directory
quiet_cmd_makefile = GEN Makefile
cmd_makefile = { \
echo "\# Automatically generated by $(srctree)/Makefile: don't edit"; \
echo "include $(srctree)/Makefile"; \
} > Makefile
outputmakefile:
@if [ -f $(srctree)/.config -o \
-d $(srctree)/include/config -o \
-d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
echo >&2 "***"; \
echo >&2 "*** The source tree is not clean, please run 'make$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \
echo >&2 "*** in $(abs_srctree)";\
echo >&2 "***"; \
false; \
fi
$(Q)ln -fsn $(srctree) source
$(call cmd,makefile)
$(Q)test -e .gitignore || \
{ echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
endif
# The expansion should be delayed until arch/$(SRCARCH)/Makefile is included.
# Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile.
# CC_VERSION_TEXT is referenced from Kconfig (so it needs export),
# and from include/config/auto.conf.cmd to detect the compiler upgrade.
CC_VERSION_TEXT = $(subst $(pound),,$(shell LC_ALL=C $(CC) --version 2>/dev/null | head -n 1))
ifneq ($(findstring clang,$(CC_VERSION_TEXT)),)
include $(srctree)/scripts/Makefile.clang
endif
# Include this also for config targets because some architectures need
# cc-cross-prefix to determine CROSS_COMPILE.
ifdef need-compiler
include $(srctree)/scripts/Makefile.compiler
endif
ifdef config-build
# ===========================================================================
# *config targets only - make sure prerequisites are updated, and descend
# in scripts/kconfig to make the *config target
# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
# KBUILD_DEFCONFIG may point out an alternative default configuration
# used for 'make defconfig'
include $(srctree)/arch/$(SRCARCH)/Makefile
export KBUILD_DEFCONFIG KBUILD_KCONFIG CC_VERSION_TEXT
config: outputmakefile scripts_basic FORCE
$(Q)$(MAKE) $(build)=scripts/kconfig $@
%config: outputmakefile scripts_basic FORCE
$(Q)$(MAKE) $(build)=scripts/kconfig $@
else #!config-build
# ===========================================================================
# Build targets only - this includes vmlinux, arch specific targets, clean
# targets and others. In general all targets except *config targets.
# If building an external module we do not care about the all: rule
# but instead __all depend on modules
PHONY += all
ifeq ($(KBUILD_EXTMOD),)
__all: all
else
__all: modules
endif
targets :=
# Decide whether to build built-in, modular, or both.
# Normally, just do built-in.
KBUILD_MODULES :=
KBUILD_BUILTIN := 1
# If we have only "make modules", don't compile built-in objects.
ifeq ($(MAKECMDGOALS),modules)
KBUILD_BUILTIN :=
endif
# If we have "make <whatever> modules", compile modules
# in addition to whatever we do anyway.
# Just "make" or "make all" shall build modules as well
ifneq ($(filter all modules nsdeps %compile_commands.json clang-%,$(MAKECMDGOALS)),)
KBUILD_MODULES := 1
endif
ifeq ($(MAKECMDGOALS),)
KBUILD_MODULES := 1
endif
export KBUILD_MODULES KBUILD_BUILTIN
ifdef need-config
include include/config/auto.conf
endif
ifeq ($(KBUILD_EXTMOD),)
# Objects we will link into vmlinux / subdirs we need to visit
core-y :=
drivers-y :=
libs-y := lib/
endif # KBUILD_EXTMOD
ifndef KBUILD_MIXED_TREE
# The all: target is the default when no target is given on the
# command line.
# This allow a user to issue only 'make' to build a kernel including modules
# Defaults to vmlinux, but the arch makefile usually adds further targets
all: vmlinux
endif
CFLAGS_GCOV := -fprofile-arcs -ftest-coverage
ifdef CONFIG_CC_IS_GCC
CFLAGS_GCOV += -fno-tree-loop-im
endif
export CFLAGS_GCOV
# The arch Makefiles can override CC_FLAGS_FTRACE. We may also append it later.
ifdef CONFIG_FUNCTION_TRACER
CC_FLAGS_FTRACE := -pg
endif
include $(srctree)/arch/$(SRCARCH)/Makefile
ifdef need-config
ifdef may-sync-config
# Read in dependencies to all Kconfig* files, make sure to run syncconfig if
# changes are detected. This should be included after arch/$(SRCARCH)/Makefile
# because some architectures define CROSS_COMPILE there.
include include/config/auto.conf.cmd
$(KCONFIG_CONFIG):
@echo >&2 '***'
@echo >&2 '*** Configuration file "$@" not found!'
@echo >&2 '***'
@echo >&2 '*** Please run some configurator (e.g. "make oldconfig" or'
@echo >&2 '*** "make menuconfig" or "make xconfig").'
@echo >&2 '***'
@/bin/false
# The actual configuration files used during the build are stored in
# include/generated/ and include/config/. Update them if .config is newer than
# include/config/auto.conf (which mirrors .config).
#
# This exploits the 'multi-target pattern rule' trick.
# The syncconfig should be executed only once to make all the targets.
# (Note: use the grouped target '&:' when we bump to GNU Make 4.3)
#
# Do not use $(call cmd,...) here. That would suppress prompts from syncconfig,
# so you cannot notice that Kconfig is waiting for the user input.
%/config/auto.conf %/config/auto.conf.cmd %/generated/autoconf.h %/generated/rustc_cfg: $(KCONFIG_CONFIG)
$(Q)$(kecho) " SYNC $@"
$(Q)$(MAKE) -f $(srctree)/Makefile syncconfig
else # !may-sync-config
# External modules and some install targets need include/generated/autoconf.h
# and include/config/auto.conf but do not care if they are up-to-date.
# Use auto.conf to trigger the test
PHONY += include/config/auto.conf
include/config/auto.conf:
@test -e include/generated/autoconf.h -a -e $@ || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or $@ are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
endif # may-sync-config
endif # need-config
KBUILD_CFLAGS += -fno-delete-null-pointer-checks
KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,)
KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation)
KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
KBUILD_CFLAGS += -O2
KBUILD_RUSTFLAGS += -Copt-level=2
else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += -Os
KBUILD_RUSTFLAGS += -Copt-level=s
endif
# Always set `debug-assertions` and `overflow-checks` because their default
# depends on `opt-level` and `debug-assertions`, respectively.
KBUILD_RUSTFLAGS += -Cdebug-assertions=$(if $(CONFIG_RUST_DEBUG_ASSERTIONS),y,n)
KBUILD_RUSTFLAGS += -Coverflow-checks=$(if $(CONFIG_RUST_OVERFLOW_CHECKS),y,n)
# Tell gcc to never replace conditional load with a non-conditional one
ifdef CONFIG_CC_IS_GCC
# gcc-10 renamed --param=allow-store-data-races=0 to
# -fno-allow-store-data-races.
KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0)
KBUILD_CFLAGS += $(call cc-option,-fno-allow-store-data-races)
endif
ifdef CONFIG_READABLE_ASM
# Disable optimizations that make assembler listings hard to read.
# reorder blocks reorders the control in the function
# ipa clone creates specialized cloned functions
# partial inlining inlines only parts of functions
KBUILD_CFLAGS += -fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining
endif
ifneq ($(CONFIG_FRAME_WARN),0)
KBUILD_CFLAGS += -Wframe-larger-than=$(CONFIG_FRAME_WARN)
endif
stackp-flags-y := -fno-stack-protector
stackp-flags-$(CONFIG_STACKPROTECTOR) := -fstack-protector
stackp-flags-$(CONFIG_STACKPROTECTOR_STRONG) := -fstack-protector-strong
KBUILD_CFLAGS += $(stackp-flags-y)
KBUILD_CFLAGS-$(CONFIG_WERROR) += -Werror
KBUILD_CFLAGS-$(CONFIG_CC_NO_ARRAY_BOUNDS) += -Wno-array-bounds
KBUILD_RUSTFLAGS-$(CONFIG_WERROR) += -Dwarnings
KBUILD_RUSTFLAGS += $(KBUILD_RUSTFLAGS-y)
ifdef CONFIG_CC_IS_CLANG
KBUILD_CPPFLAGS += -Qunused-arguments
# The kernel builds with '-std=gnu11' so use of GNU extensions is acceptable.
KBUILD_CFLAGS += -Wno-gnu
else
# gcc inanely warns about local variables called 'main'
KBUILD_CFLAGS += -Wno-main
endif
# These warnings generated too much noise in a regular build.
# Use make W=1 to enable them (see scripts/Makefile.extrawarn)
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
# These result in bogus false positives
KBUILD_CFLAGS += $(call cc-disable-warning, dangling-pointer)
ifdef CONFIG_FRAME_POINTER
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
KBUILD_RUSTFLAGS += -Cforce-frame-pointers=y
else
# Some targets (ARM with Thumb2, for example), can't be built with frame
# pointers. For those, we don't have FUNCTION_TRACER automatically
# select FRAME_POINTER. However, FUNCTION_TRACER adds -pg, and this is
# incompatible with -fomit-frame-pointer with current GCC, so we don't use
# -fomit-frame-pointer with FUNCTION_TRACER.
# In the Rust target specification, "frame-pointer" is set explicitly
# to "may-omit".
ifndef CONFIG_FUNCTION_TRACER
KBUILD_CFLAGS += -fomit-frame-pointer
endif
endif
# Initialize all stack variables with a 0xAA pattern.
ifdef CONFIG_INIT_STACK_ALL_PATTERN
KBUILD_CFLAGS += -ftrivial-auto-var-init=pattern
endif
# Initialize all stack variables with a zero value.
ifdef CONFIG_INIT_STACK_ALL_ZERO
KBUILD_CFLAGS += -ftrivial-auto-var-init=zero
ifdef CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_ENABLER
# https://github.com/llvm/llvm-project/issues/44842
KBUILD_CFLAGS += -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
endif
endif
# While VLAs have been removed, GCC produces unreachable stack probes
# for the randomize_kstack_offset feature. Disable it for all compilers.
KBUILD_CFLAGS += $(call cc-option, -fno-stack-clash-protection)
# Clear used registers at func exit (to reduce data lifetime and ROP gadgets).
ifdef CONFIG_ZERO_CALL_USED_REGS
KBUILD_CFLAGS += -fzero-call-used-regs=used-gpr
endif
ifdef CONFIG_FUNCTION_TRACER
ifdef CONFIG_FTRACE_MCOUNT_USE_CC
CC_FLAGS_FTRACE += -mrecord-mcount
ifdef CONFIG_HAVE_NOP_MCOUNT
ifeq ($(call cc-option-yn, -mnop-mcount),y)
CC_FLAGS_FTRACE += -mnop-mcount
CC_FLAGS_USING += -DCC_USING_NOP_MCOUNT
endif
endif
endif
ifdef CONFIG_FTRACE_MCOUNT_USE_OBJTOOL
CC_FLAGS_USING += -DCC_USING_NOP_MCOUNT
endif
ifdef CONFIG_FTRACE_MCOUNT_USE_RECORDMCOUNT
ifdef CONFIG_HAVE_C_RECORDMCOUNT
BUILD_C_RECORDMCOUNT := y
export BUILD_C_RECORDMCOUNT
endif
endif
ifdef CONFIG_HAVE_FENTRY
# s390-linux-gnu-gcc did not support -mfentry until gcc-9.
ifeq ($(call cc-option-yn, -mfentry),y)
CC_FLAGS_FTRACE += -mfentry
CC_FLAGS_USING += -DCC_USING_FENTRY
endif
endif
export CC_FLAGS_FTRACE
KBUILD_CFLAGS += $(CC_FLAGS_FTRACE) $(CC_FLAGS_USING)
KBUILD_AFLAGS += $(CC_FLAGS_USING)
endif
# We trigger additional mismatches with less inlining
ifdef CONFIG_DEBUG_SECTION_MISMATCH
KBUILD_CFLAGS += -fno-inline-functions-called-once
endif
# `rustc`'s `-Zfunction-sections` applies to data too (as of 1.59.0).
ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
KBUILD_CFLAGS_KERNEL += -ffunction-sections -fdata-sections
KBUILD_RUSTFLAGS_KERNEL += -Zfunction-sections=y
LDFLAGS_vmlinux += --gc-sections
endif
ifdef CONFIG_SHADOW_CALL_STACK
CC_FLAGS_SCS := -fsanitize=shadow-call-stack
KBUILD_CFLAGS += $(CC_FLAGS_SCS)
export CC_FLAGS_SCS
endif
ifdef CONFIG_LTO_CLANG
ifdef CONFIG_LTO_CLANG_THIN
CC_FLAGS_LTO := -flto=thin -fsplit-lto-unit
KBUILD_LDFLAGS += --thinlto-cache-dir=$(extmod_prefix).thinlto-cache
else
CC_FLAGS_LTO := -flto
endif
ifeq ($(SRCARCH),x86)
# Workaround for compiler / linker bug
CC_FLAGS_LTO += -fvisibility=hidden
else
CC_FLAGS_LTO += -fvisibility=default
endif
# Limit inlining across translation units to reduce binary size
KBUILD_LDFLAGS += -mllvm -import-instr-limit=5
# Check for frame size exceeding threshold during prolog/epilog insertion
# when using lld < 13.0.0.
ifneq ($(CONFIG_FRAME_WARN),0)
ifeq ($(shell test $(CONFIG_LLD_VERSION) -lt 130000; echo $$?),0)
KBUILD_LDFLAGS += -plugin-opt=-warn-stack-size=$(CONFIG_FRAME_WARN)
endif
endif
endif
ifdef CONFIG_LTO
KBUILD_CFLAGS += -fno-lto $(CC_FLAGS_LTO)
KBUILD_AFLAGS += -fno-lto
export CC_FLAGS_LTO
endif
ifdef CONFIG_CFI_CLANG
CC_FLAGS_CFI := -fsanitize=kcfi
KBUILD_CFLAGS += $(CC_FLAGS_CFI)
export CC_FLAGS_CFI
endif
ifdef CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B
KBUILD_CFLAGS += -falign-functions=64
endif
# arch Makefile may override CC so keep this after arch Makefile is included
NOSTDINC_FLAGS += -nostdinc
# warn about C99 declaration after statement
KBUILD_CFLAGS += -Wdeclaration-after-statement
# Variable Length Arrays (VLAs) should not be used anywhere in the kernel
KBUILD_CFLAGS += -Wvla
# disable pointer signed / unsigned warnings in gcc 4.0
KBUILD_CFLAGS += -Wno-pointer-sign
# In order to make sure new function cast mismatches are not introduced
# in the kernel (to avoid tripping CFI checking), the kernel should be
# globally built with -Wcast-function-type.
KBUILD_CFLAGS += $(call cc-option, -Wcast-function-type)
# disable stringop warnings in gcc 8+
KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)
# We'll want to enable this eventually, but it's not going away for 5.7 at least
KBUILD_CFLAGS += $(call cc-disable-warning, stringop-overflow)
# Another good warning that we'll want to enable eventually
KBUILD_CFLAGS += $(call cc-disable-warning, restrict)
# Enabled with W=2, disabled by default as noisy
ifdef CONFIG_CC_IS_GCC
KBUILD_CFLAGS += -Wno-maybe-uninitialized
endif
# The allocators already balk at large sizes, so silence the compiler
# warnings for bounds checks involving those possible values. While
# -Wno-alloc-size-larger-than would normally be used here, earlier versions
# of gcc (<9.1) weirdly don't handle the option correctly when _other_
# warnings are produced (?!). Using -Walloc-size-larger-than=SIZE_MAX
# doesn't work (as it is documented to), silently resolving to "0" prior to
# version 9.1 (and producing an error more recently). Numeric values larger
# than PTRDIFF_MAX also don't work prior to version 9.1, which are silently
# ignored, continuing to default to PTRDIFF_MAX. So, left with no other
# choice, we must perform a versioned check to disable this warning.
# https://lore.kernel.org/lkml/20210824115859.187f272f@canb.auug.org.au
KBUILD_CFLAGS-$(call gcc-min-version, 90100) += -Wno-alloc-size-larger-than
KBUILD_CFLAGS += $(KBUILD_CFLAGS-y) $(CONFIG_CC_IMPLICIT_FALLTHROUGH)
# disable invalid "can't wrap" optimizations for signed / pointers
KBUILD_CFLAGS += -fno-strict-overflow
# Make sure -fstack-check isn't enabled (like gentoo apparently did)
KBUILD_CFLAGS += -fno-stack-check
# conserve stack if available
ifdef CONFIG_CC_IS_GCC
KBUILD_CFLAGS += -fconserve-stack
endif
# Prohibit date/time macros, which would make the build non-deterministic
KBUILD_CFLAGS += -Werror=date-time
# enforce correct pointer usage
KBUILD_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types)
# Require designated initializers for all marked structures
KBUILD_CFLAGS += $(call cc-option,-Werror=designated-init)
# change __FILE__ to the relative path from the srctree
KBUILD_CPPFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
# include additional Makefiles when needed
include-y := scripts/Makefile.extrawarn
include-$(CONFIG_DEBUG_INFO) += scripts/Makefile.debug
include-$(CONFIG_KASAN) += scripts/Makefile.kasan
include-$(CONFIG_KCSAN) += scripts/Makefile.kcsan
include-$(CONFIG_KMSAN) += scripts/Makefile.kmsan
include-$(CONFIG_UBSAN) += scripts/Makefile.ubsan
include-$(CONFIG_KCOV) += scripts/Makefile.kcov
include-$(CONFIG_RANDSTRUCT) += scripts/Makefile.randstruct
include-$(CONFIG_GCC_PLUGINS) += scripts/Makefile.gcc-plugins
include $(addprefix $(srctree)/, $(include-y))
# scripts/Makefile.gcc-plugins is intentionally included last.
# Do not add $(call cc-option,...) below this line. When you build the kernel
# from the clean source tree, the GCC plugins do not exist at this point.
# Add user supplied CPPFLAGS, AFLAGS, CFLAGS and RUSTFLAGS as the last assignments
KBUILD_CPPFLAGS += $(KCPPFLAGS)
KBUILD_AFLAGS += $(KAFLAGS)
KBUILD_CFLAGS += $(KCFLAGS)
KBUILD_RUSTFLAGS += $(KRUSTFLAGS)
KBUILD_LDFLAGS_MODULE += --build-id=sha1
LDFLAGS_vmlinux += --build-id=sha1
KBUILD_LDFLAGS += -z noexecstack
ifeq ($(CONFIG_LD_IS_BFD),y)
KBUILD_LDFLAGS += $(call ld-option,--no-warn-rwx-segments)
endif
ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
LDFLAGS_vmlinux += -X
endif
ifeq ($(CONFIG_RELR),y)
LDFLAGS_vmlinux += --pack-dyn-relocs=relr --use-android-relr-tags
endif
# We never want expected sections to be placed heuristically by the
# linker. All sections should be explicitly named in the linker script.
ifdef CONFIG_LD_ORPHAN_WARN
LDFLAGS_vmlinux += --orphan-handling=warn
endif
# Align the bit size of userspace programs with the kernel
KBUILD_USERCFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
KBUILD_USERLDFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
# make the checker run with the right architecture
CHECKFLAGS += --arch=$(ARCH)
# insure the checker run with the right endianness
CHECKFLAGS += $(if $(CONFIG_CPU_BIG_ENDIAN),-mbig-endian,-mlittle-endian)
# the checker needs the correct machine size
CHECKFLAGS += $(if $(CONFIG_64BIT),-m64,-m32)
# Default kernel image to build when no specific target is given.
# KBUILD_IMAGE may be overruled on the command line or
# set in the environment
# Also any assignments in arch/$(ARCH)/Makefile take precedence over
# this default value
export KBUILD_IMAGE ?= vmlinux
#
# INSTALL_PATH specifies where to place the updated kernel and system map
# images. Default is /boot, but you can set it to other values
export INSTALL_PATH ?= /boot
#
# INSTALL_DTBS_PATH specifies a prefix for relocations required by build roots.
# Like INSTALL_MOD_PATH, it isn't defined in the Makefile, but can be passed as
# an argument if needed. Otherwise it defaults to the kernel install path
#
export INSTALL_DTBS_PATH ?= $(INSTALL_PATH)/dtbs/$(KERNELRELEASE)
#
# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
# relocations required by build roots. This is not defined in the
# makefile but the argument can be passed to make if needed.
#
MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
export MODLIB
PHONY += prepare0
export extmod_prefix = $(if $(KBUILD_EXTMOD),$(KBUILD_EXTMOD)/)
export MODORDER := $(extmod_prefix)modules.order
export MODULES_NSDEPS := $(extmod_prefix)modules.nsdeps
# ---------------------------------------------------------------------------
# Kernel headers
PHONY += headers
#Default location for installed headers
ifeq ($(KBUILD_EXTMOD),)
PHONY += archheaders archscripts
hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj
headers: $(version_h) scripts_unifdef uapi-asm-generic archheaders archscripts
else
hdr-prefix = $(KBUILD_EXTMOD)/
hdr-inst := -f $(srctree)/scripts/Makefile.headersinst dst=$(KBUILD_EXTMOD)/usr/include objtree=$(objtree)/$(KBUILD_EXTMOD) obj
endif
export INSTALL_HDR_PATH = $(objtree)/$(hdr-prefix)usr
quiet_cmd_headers_install = INSTALL $(INSTALL_HDR_PATH)/include
cmd_headers_install = \
mkdir -p $(INSTALL_HDR_PATH); \
rsync -mrl --include='*/' --include='*\.h' --exclude='*' \
$(hdr-prefix)usr/include $(INSTALL_HDR_PATH);
PHONY += headers_install
headers_install: headers
$(call cmd,headers_install)
headers:
ifeq ($(KBUILD_EXTMOD),)
$(if $(filter um, $(SRCARCH)), $(error Headers not exportable for UML))
endif
$(Q)$(MAKE) $(hdr-inst)=$(hdr-prefix)include/uapi
$(Q)$(MAKE) $(hdr-inst)=$(hdr-prefix)arch/$(SRCARCH)/include/uapi
# ---------------------------------------------------------------------------
# Devicetree files
ifeq ($(KBUILD_EXTMOD),)
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/boot/dts/),)
dtstree := arch/$(SRCARCH)/boot/dts
endif
else # KBUILD_EXTMOD
# Devicetree source should live in $(KBUILD_EXTMOD)/arch/$(SRCARCH)/boot/dts/
# But it may live inside some other folder relative to KBUILD_EXTMOD, as specified
# by KBUILD_EXTMOD_DTS
KBUILD_EXTMOD_DTS = arch/$(SRCARCH)/boot/dts
ifneq ($(wildcard $(KBUILD_EXTMOD)/$(KBUILD_EXTMOD_DTS)/ $(srctree)/$(KBUILD_EXTMOD)/$(KBUILD_EXTMOD_DTS)/),)
dtstree := $(KBUILD_EXTMOD)/$(KBUILD_EXTMOD_DTS)
endif
endif
ifneq ($(dtstree),)
%.dtb: include/config/kernel.release scripts_dtc
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
PHONY += dtbs dtbs_install dtbs_check
dtbs: include/config/kernel.release scripts_dtc
$(Q)$(MAKE) $(build)=$(dtstree)
ifneq ($(filter dtbs_check, $(MAKECMDGOALS)),)
export CHECK_DTBS=y
dtbs: dt_binding_check
endif
dtbs_check: dtbs
dtbs_install:
$(Q)$(MAKE) $(dtbinst)=$(dtstree) dst=$(INSTALL_DTBS_PATH)
ifdef CONFIG_OF_EARLY_FLATTREE
all: dtbs
endif
endif
PHONY += scripts_dtc
scripts_dtc: scripts_basic
$(Q)$(MAKE) $(build)=scripts/dtc
ifneq ($(filter dt_binding_check, $(MAKECMDGOALS)),)
export CHECK_DT_BINDING=y
endif
PHONY += dt_binding_check
dt_binding_check: scripts_dtc
$(Q)$(MAKE) $(build)=Documentation/devicetree/bindings
ifeq ($(KBUILD_EXTMOD),)
build-dir := .
clean-dirs := $(sort . Documentation \
$(patsubst %/,%,$(filter %/, $(core-) \
$(drivers-) $(libs-))))
export ARCH_CORE := $(core-y)
export ARCH_LIB := $(filter %/, $(libs-y))
export ARCH_DRIVERS := $(drivers-y) $(drivers-m)
# Externally visible symbols (used by link-vmlinux.sh)
KBUILD_VMLINUX_OBJS := ./built-in.a
ifdef CONFIG_MODULES
KBUILD_VMLINUX_OBJS += $(patsubst %/, %/lib.a, $(filter %/, $(libs-y)))
KBUILD_VMLINUX_LIBS := $(filter-out %/, $(libs-y))
else
KBUILD_VMLINUX_LIBS := $(patsubst %/,%/lib.a, $(libs-y))
endif
export KBUILD_VMLINUX_LIBS
export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds
# Recurse until adjust_autoksyms.sh is satisfied
PHONY += autoksyms_recursive
ifdef CONFIG_TRIM_UNUSED_KSYMS
# For the kernel to actually contain only the needed exported symbols,
# we have to build modules as well to determine what those symbols are.
# (this can be evaluated only once include/config/auto.conf has been included)
KBUILD_MODULES := 1
autoksyms_recursive: $(build-dir) modules.order
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \
"$(MAKE) -f $(srctree)/Makefile autoksyms_recursive"
endif
autoksyms_h := $(if $(CONFIG_TRIM_UNUSED_KSYMS), include/generated/autoksyms.h)
quiet_cmd_autoksyms_h = GEN $@
cmd_autoksyms_h = mkdir -p $(dir $@); \
$(CONFIG_SHELL) $(srctree)/scripts/gen_autoksyms.sh $@
$(autoksyms_h):
$(call cmd,autoksyms_h)
# '$(AR) mPi' needs 'T' to workaround the bug of llvm-ar <= 14
quiet_cmd_ar_vmlinux.a = AR $@
cmd_ar_vmlinux.a = \
rm -f $@; \
$(AR) cDPrST $@ $(KBUILD_VMLINUX_OBJS); \
$(AR) mPiT $$($(AR) t $@ | sed -n 1p) $@ $$($(AR) t $@ | grep -F -f $(srctree)/scripts/head-object-list.txt)
targets += vmlinux.a
vmlinux.a: $(KBUILD_VMLINUX_OBJS) scripts/head-object-list.txt autoksyms_recursive FORCE
$(call if_changed,ar_vmlinux.a)
ifndef KBUILD_MIXED_TREE
PHONY += vmlinux_o
vmlinux_o: vmlinux.a $(KBUILD_VMLINUX_LIBS)
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.vmlinux_o
vmlinux.o modules.builtin.modinfo modules.builtin: vmlinux_o
@:
PHONY += vmlinux
# LDFLAGS_vmlinux in the top Makefile defines linker flags for the top vmlinux,
# not for decompressors. LDFLAGS_vmlinux in arch/*/boot/compressed/Makefile is
# unrelated; the decompressors just happen to have the same base name,
# arch/*/boot/compressed/vmlinux.
# Export LDFLAGS_vmlinux only to scripts/Makefile.vmlinux.
#
# _LDFLAGS_vmlinux is a workaround for the 'private export' bug:
# https://savannah.gnu.org/bugs/?61463
# For Make > 4.4, the following simple code will work:
# vmlinux: private export LDFLAGS_vmlinux := $(LDFLAGS_vmlinux)
vmlinux: private _LDFLAGS_vmlinux := $(LDFLAGS_vmlinux)
vmlinux: export LDFLAGS_vmlinux = $(_LDFLAGS_vmlinux)
vmlinux: vmlinux.o $(KBUILD_LDS) modpost
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.vmlinux
endif
# The actual objects are generated when descending,
# make sure no implicit rule kicks in
$(sort $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)): . ;
filechk_kernel.release = \
echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion \
$(srctree) $(BRANCH) $(KMI_GENERATION))"
# Store (new) KERNELRELEASE string in include/config/kernel.release
include/config/kernel.release: FORCE
$(call filechk,kernel.release)
# Additional helpers built in scripts/
# Carefully list dependencies so we do not try to build scripts twice
# in parallel
PHONY += scripts
scripts: scripts_basic scripts_dtc
$(Q)$(MAKE) $(build)=$(@)
# Things we need to do before we recursively start building the kernel
# or the modules are listed in "prepare".
# A multi level approach is used. prepareN is processed before prepareN-1.
# archprepare is used in arch Makefiles and when processed asm symlink,
# version.h and scripts_basic is processed / created.
PHONY += prepare archprepare
archprepare: outputmakefile archheaders archscripts scripts include/config/kernel.release \
asm-generic $(version_h) $(autoksyms_h) include/generated/utsrelease.h \
include/generated/compile.h include/generated/autoconf.h remove-stale-files
prepare0: archprepare
$(Q)$(MAKE) $(build)=scripts/mod
$(Q)$(MAKE) $(build)=. prepare
# All the preparing..
prepare: prepare0
ifdef CONFIG_RUST
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust_is_available.sh -v
$(Q)$(MAKE) $(build)=rust
endif
PHONY += remove-stale-files
remove-stale-files:
$(Q)$(srctree)/scripts/remove-stale-files
# Support for using generic headers in asm-generic
asm-generic := -f $(srctree)/scripts/Makefile.asm-generic obj
PHONY += asm-generic uapi-asm-generic
asm-generic: uapi-asm-generic
$(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/asm \
generic=include/asm-generic
uapi-asm-generic:
$(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/uapi/asm \
generic=include/uapi/asm-generic
# Generate some files
# ---------------------------------------------------------------------------
# KERNELRELEASE can change from a few different places, meaning version.h
# needs to be updated, so this check is forced on all builds
uts_len := 64
define filechk_utsrelease.h
if [ `echo -n "$(KERNELRELEASE)" | wc -c ` -gt $(uts_len) ]; then \
echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \
exit 1; \
fi; \
echo \#define UTS_RELEASE \"$(KERNELRELEASE)\"
endef
define filechk_version.h
if [ $(SUBLEVEL) -gt 255 ]; then \
echo \#define LINUX_VERSION_CODE $(shell \
expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + 255); \
else \
echo \#define LINUX_VERSION_CODE $(shell \
expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + $(SUBLEVEL)); \
fi; \
echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + \
((c) > 255 ? 255 : (c)))'; \
echo \#define LINUX_VERSION_MAJOR $(VERSION); \
echo \#define LINUX_VERSION_PATCHLEVEL $(PATCHLEVEL); \
echo \#define LINUX_VERSION_SUBLEVEL $(SUBLEVEL)
endef
$(version_h): PATCHLEVEL := $(or $(PATCHLEVEL), 0)
$(version_h): SUBLEVEL := $(or $(SUBLEVEL), 0)
$(version_h): FORCE
$(call filechk,version.h)
include/generated/utsrelease.h: include/config/kernel.release FORCE
$(call filechk,utsrelease.h)
filechk_compile.h = $(srctree)/scripts/mkcompile_h \
"$(UTS_MACHINE)" "$(CONFIG_CC_VERSION_TEXT)" "$(LD)"
include/generated/compile.h: FORCE
$(call filechk,compile.h)
PHONY += headerdep
headerdep:
$(Q)find $(srctree)/include/ -name '*.h' | xargs --max-args 1 \
$(srctree)/scripts/headerdep.pl -I$(srctree)/include
ifdef CONFIG_HEADERS_INSTALL
prepare: headers
endif
PHONY += scripts_unifdef
scripts_unifdef: scripts_basic
$(Q)$(MAKE) $(build)=scripts scripts/unifdef
# ---------------------------------------------------------------------------
# Install
# Many distributions have the custom install script, /sbin/installkernel.
# If DKMS is installed, 'make install' will eventually recurse back
# to this Makefile to build and install external modules.
# Cancel sub_make_done so that options such as M=, V=, etc. are parsed.
quiet_cmd_install = INSTALL $(INSTALL_PATH)
cmd_install = unset sub_make_done; $(srctree)/scripts/install.sh
# ---------------------------------------------------------------------------
# Tools
ifdef CONFIG_OBJTOOL
prepare: tools/objtool
endif
ifdef CONFIG_BPF
ifdef CONFIG_DEBUG_INFO_BTF
prepare: tools/bpf/resolve_btfids
endif
endif
PHONY += resolve_btfids_clean
resolve_btfids_O = $(abspath $(objtree))/tools/bpf/resolve_btfids
# tools/bpf/resolve_btfids directory might not exist
# in output directory, skip its clean in that case
resolve_btfids_clean:
ifneq ($(wildcard $(resolve_btfids_O)),)
$(Q)$(MAKE) -sC $(srctree)/tools/bpf/resolve_btfids O=$(resolve_btfids_O) clean
endif
# Clear a bunch of variables before executing the submake
ifeq ($(quiet),silent_)
tools_silent=s
endif
tools/: FORCE
$(Q)mkdir -p $(objtree)/tools
$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/
tools/%: FORCE
$(Q)mkdir -p $(objtree)/tools
$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/ $*
# ---------------------------------------------------------------------------
# Kernel selftest
PHONY += kselftest
kselftest: headers
$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests
kselftest-%: headers FORCE
$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests $*
PHONY += kselftest-merge
kselftest-merge:
$(if $(wildcard $(objtree)/.config),, $(error No .config exists, config your kernel first!))
$(Q)find $(srctree)/tools/testing/selftests -name config | \
xargs $(srctree)/scripts/kconfig/merge_config.sh -m $(objtree)/.config
$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
# ---------------------------------------------------------------------------
# Devicetree files
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/boot/dts/),)
# ANDROID: allow this to be overridden by the build environment. This allows
# one to compile a device tree that is located out-of-tree.
dtstree ?= arch/$(SRCARCH)/boot/dts
endif
ifneq ($(dtstree),)
%.dtb: dtbs_prepare
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
%.dtbo: dtbs_prepare
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
PHONY += dtbs dtbs_prepare dtbs_install dtbs_check
dtbs: dtbs_prepare
$(Q)$(MAKE) $(build)=$(dtstree)
# include/config/kernel.release is actually needed when installing DTBs because
# INSTALL_DTBS_PATH contains $(KERNELRELEASE). However, we do not want to make
# dtbs_install depend on it as dtbs_install may run as root.
dtbs_prepare: include/config/kernel.release scripts_dtc
ifneq ($(filter dtbs_check, $(MAKECMDGOALS)),)
export CHECK_DTBS=y
dtbs: dt_binding_check
endif
dtbs_check: dtbs
dtbs_install:
$(Q)$(MAKE) $(dtbinst)=$(dtstree) dst=$(INSTALL_DTBS_PATH)
ifdef CONFIG_OF_EARLY_FLATTREE
all: dtbs
endif
endif
PHONY += scripts_dtc
scripts_dtc: scripts_basic
$(Q)$(MAKE) $(build)=scripts/dtc
ifneq ($(filter dt_binding_check, $(MAKECMDGOALS)),)
export CHECK_DT_BINDING=y
endif
PHONY += dt_binding_check
dt_binding_check: scripts_dtc
$(Q)$(MAKE) $(build)=Documentation/devicetree/bindings
PHONY += dt_compatible_check
dt_compatible_check: dt_binding_check
$(Q)$(MAKE) $(build)=Documentation/devicetree/bindings $@
# ---------------------------------------------------------------------------
# Modules
ifdef CONFIG_MODULES
# By default, build modules as well
all: modules
# When we're building modules with modversions, we need to consider
# the built-in objects during the descend as well, in order to
# make sure the checksums are up to date before we record them.
ifdef CONFIG_MODVERSIONS
KBUILD_BUILTIN := 1
endif
# Build modules
#
# *.ko are usually independent of vmlinux, but CONFIG_DEBUG_INFOBTF_MODULES
# is an exception.
ifdef CONFIG_DEBUG_INFO_BTF_MODULES
KBUILD_BUILTIN := 1
modules: $(mixed-build-prefix)vmlinux
endif
modules: modules_prepare
# Target to prepare building external modules
modules_prepare: prepare
$(Q)$(MAKE) $(build)=scripts scripts/module.lds
export modules_sign_only :=
ifeq ($(CONFIG_MODULE_SIG),y)
PHONY += modules_sign
modules_sign: modules_install
@:
# modules_sign is a subset of modules_install.
# 'make modules_install modules_sign' is equivalent to 'make modules_install'.
ifeq ($(filter modules_install,$(MAKECMDGOALS)),)
modules_sign_only := y
endif
endif
modinst_pre :=
ifneq ($(filter modules_install,$(MAKECMDGOALS)),)
modinst_pre := __modinst_pre
endif
modules_install: $(modinst_pre)
PHONY += __modinst_pre
__modinst_pre:
@rm -rf $(MODLIB)/kernel
@rm -f $(MODLIB)/source
@mkdir -p $(MODLIB)/kernel
@ln -s $(abspath $(srctree)) $(MODLIB)/source
@if [ ! $(objtree) -ef $(MODLIB)/build ]; then \
rm -f $(MODLIB)/build ; \
ln -s $(CURDIR) $(MODLIB)/build ; \
fi
@sed 's:^:kernel/:' modules.order > $(MODLIB)/modules.order
@cp -f $(mixed-build-prefix)modules.builtin $(MODLIB)/
@cp -f $(or $(mixed-build-prefix),$(objtree)/)modules.builtin.modinfo $(MODLIB)/
endif # CONFIG_MODULES
###
# Cleaning is done on three levels.
# make clean Delete most generated files
# Leave enough to build external modules
# make mrproper Delete the current configuration, and all generated files
# make distclean Remove editor backup files, patch leftover files and the like
# Directories & files removed with 'make clean'
CLEAN_FILES += include/ksym vmlinux.symvers modules-only.symvers \
modules.builtin modules.builtin.modinfo modules.nsdeps \
compile_commands.json .thinlto-cache rust/test rust/doc \
.vmlinux.objs .vmlinux.export.c
# Directories & files removed with 'make mrproper'
MRPROPER_FILES += include/config include/generated \
arch/$(SRCARCH)/include/generated .objdiff \
debian snap tar-install \
.config .config.old .version \
Module.symvers \
certs/signing_key.pem \
certs/x509.genkey \
vmlinux-gdb.py \
*.spec \
rust/target.json rust/libmacros.so
# clean - Delete most, but leave enough to build external modules
#
clean: rm-files := $(CLEAN_FILES)
PHONY += archclean vmlinuxclean
vmlinuxclean:
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
$(Q)$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) clean)
clean: archclean vmlinuxclean resolve_btfids_clean
# mrproper - Delete all generated files, including .config
#
mrproper: rm-files := $(wildcard $(MRPROPER_FILES))
mrproper-dirs := $(addprefix _mrproper_,scripts)
PHONY += $(mrproper-dirs) mrproper
$(mrproper-dirs):
$(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@)
mrproper: clean $(mrproper-dirs)
$(call cmd,rmfiles)
@find . $(RCS_FIND_IGNORE) \
\( -name '*.rmeta' \) \
-type f -print | xargs rm -f
# distclean
#
PHONY += distclean
distclean: mrproper
@find . $(RCS_FIND_IGNORE) \
\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
-o -name '*.bak' -o -name '#*#' -o -name '*%' \
-o -name 'core' -o -name tags -o -name TAGS -o -name 'cscope*' \
-o -name GPATH -o -name GRTAGS -o -name GSYMS -o -name GTAGS \) \
-type f -print | xargs rm -f
# Packaging of the kernel to various formats
# ---------------------------------------------------------------------------
%src-pkg: FORCE
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.package $@
%pkg: include/config/kernel.release FORCE
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.package $@
# Brief documentation of the typical targets used
# ---------------------------------------------------------------------------
boards := $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*_defconfig)
boards := $(sort $(notdir $(boards)))
board-dirs := $(dir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*/*_defconfig))
board-dirs := $(sort $(notdir $(board-dirs:/=)))
PHONY += help
help:
@echo 'Cleaning targets:'
@echo ' clean - Remove most generated files but keep the config and'
@echo ' enough build support to build external modules'
@echo ' mrproper - Remove all generated files + config + various backup files'
@echo ' distclean - mrproper + remove editor backup and patch files'
@echo ''
@echo 'Configuration targets:'
@$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help
@echo ''
@echo 'Other generic targets:'
@echo ' all - Build all targets marked with [*]'
@echo '* vmlinux - Build the bare kernel'
@echo '* modules - Build all modules'
@echo ' modules_install - Install all modules to INSTALL_MOD_PATH (default: /)'
@echo ' dir/ - Build all files in dir and below'
@echo ' dir/file.[ois] - Build specified target only'
@echo ' dir/file.ll - Build the LLVM assembly file'
@echo ' (requires compiler support for LLVM assembly generation)'
@echo ' dir/file.lst - Build specified mixed source/assembly target only'
@echo ' (requires a recent binutils and recent build (System.map))'
@echo ' dir/file.ko - Build module including final link'
@echo ' modules_prepare - Set up for building external modules'
@echo ' tags/TAGS - Generate tags file for editors'
@echo ' cscope - Generate cscope index'
@echo ' gtags - Generate GNU GLOBAL index'
@echo ' kernelrelease - Output the release version string (use with make -s)'
@echo ' kernelversion - Output the version stored in Makefile (use with make -s)'
@echo ' image_name - Output the image name (use with make -s)'
@echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \
echo ' (default: $(INSTALL_HDR_PATH))'; \
echo ''
@echo 'Static analysers:'
@echo ' checkstack - Generate a list of stack hogs'
@echo ' versioncheck - Sanity check on version.h usage'
@echo ' includecheck - Check for duplicate included header files'
@echo ' export_report - List the usages of all exported symbols'
@echo ' headerdep - Detect inclusion cycles in headers'
@echo ' coccicheck - Check with Coccinelle'
@echo ' clang-analyzer - Check with clang static analyzer'
@echo ' clang-tidy - Check with clang-tidy'
@echo ''
@echo 'Tools:'
@echo ' nsdeps - Generate missing symbol namespace dependencies'
@echo ''
@echo 'Kernel selftest:'
@echo ' kselftest - Build and run kernel selftest'
@echo ' Build, install, and boot kernel before'
@echo ' running kselftest on it'
@echo ' Run as root for full coverage'
@echo ' kselftest-all - Build kernel selftest'
@echo ' kselftest-install - Build and install kernel selftest'
@echo ' kselftest-clean - Remove all generated kselftest files'
@echo ' kselftest-merge - Merge all the config dependencies of'
@echo ' kselftest to existing .config.'
@echo ''
@echo 'Rust targets:'
@echo ' rustavailable - Checks whether the Rust toolchain is'
@echo ' available and, if not, explains why.'
@echo ' rustfmt - Reformat all the Rust code in the kernel'
@echo ' rustfmtcheck - Checks if all the Rust code in the kernel'
@echo ' is formatted, printing a diff otherwise.'
@echo ' rustdoc - Generate Rust documentation'
@echo ' (requires kernel .config)'
@echo ' rusttest - Runs the Rust tests'
@echo ' (requires kernel .config; downloads external repos)'
@echo ' rust-analyzer - Generate rust-project.json rust-analyzer support file'
@echo ' (requires kernel .config)'
@echo ' dir/file.[os] - Build specified target only'
@echo ' dir/file.rsi - Build macro expanded source, similar to C preprocessing.'
@echo ' Run with RUSTFMT=n to skip reformatting if needed.'
@echo ' The output is not intended to be compilable.'
@echo ' dir/file.ll - Build the LLVM assembly file'
@echo ''
@$(if $(dtstree), \
echo 'Devicetree:'; \
echo '* dtbs - Build device tree blobs for enabled boards'; \
echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'; \
echo ' dt_binding_check - Validate device tree binding documents'; \
echo ' dtbs_check - Validate device tree source files';\
echo '')
@echo 'Userspace tools targets:'
@echo ' use "make tools/help"'
@echo ' or "cd tools; make help"'
@echo ''
@echo 'Kernel packaging:'
@$(MAKE) -f $(srctree)/scripts/Makefile.package help
@echo ''
@echo 'Documentation targets:'
@$(MAKE) -f $(srctree)/Documentation/Makefile dochelp
@echo ''
@echo 'Architecture specific targets ($(SRCARCH)):'
@$(or $(archhelp),\
echo ' No architecture specific help defined for $(SRCARCH)')
@echo ''
@$(if $(boards), \
$(foreach b, $(boards), \
printf " %-27s - Build for %s\\n" $(b) $(subst _defconfig,,$(b));) \
echo '')
@$(if $(board-dirs), \
$(foreach b, $(board-dirs), \
printf " %-16s - Show %s-specific targets\\n" help-$(b) $(b);) \
printf " %-16s - Show all of the above\\n" help-boards; \
echo '')
@echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
@echo ' make V=2 [targets] 2 => give reason for rebuild of target'
@echo ' make O=dir [targets] Locate all output files in "dir", including .config'
@echo ' make C=1 [targets] Check re-compiled c source with $$CHECK'
@echo ' (sparse by default)'
@echo ' make C=2 [targets] Force check of all c source with $$CHECK'
@echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections'
@echo ' make W=n [targets] Enable extra build checks, n=1,2,3 where'
@echo ' 1: warnings which may be relevant and do not occur too often'
@echo ' 2: warnings which occur quite often but may still be relevant'
@echo ' 3: more obscure warnings, can most likely be ignored'
@echo ' e: warnings are being treated as errors'
@echo ' Multiple levels can be combined with W=12 or W=123'
@echo ''
@echo 'Execute "make" or "make all" to build all targets marked with [*] '
@echo 'For further info see the ./README file'
help-board-dirs := $(addprefix help-,$(board-dirs))
help-boards: $(help-board-dirs)
boards-per-dir = $(sort $(notdir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/$*/*_defconfig)))
$(help-board-dirs): help-%:
@echo 'Architecture specific targets ($(SRCARCH) $*):'
@$(if $(boards-per-dir), \
$(foreach b, $(boards-per-dir), \
printf " %-24s - Build for %s\\n" $*/$(b) $(subst _defconfig,,$(b));) \
echo '')
# Documentation targets
# ---------------------------------------------------------------------------
DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \
linkcheckdocs dochelp refcheckdocs
PHONY += $(DOC_TARGETS)
$(DOC_TARGETS):
$(Q)$(MAKE) $(build)=Documentation $@
# Rust targets
# ---------------------------------------------------------------------------
# "Is Rust available?" target
PHONY += rustavailable
rustavailable:
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust_is_available.sh -v && echo "Rust is available!"
# Documentation target
#
# Using the singular to avoid running afoul of `no-dot-config-targets`.
PHONY += rustdoc
rustdoc: prepare
$(Q)$(MAKE) $(build)=rust $@
# Testing target
PHONY += rusttest
rusttest: prepare
$(Q)$(MAKE) $(build)=rust $@
# Formatting targets
PHONY += rustfmt rustfmtcheck
# We skip `rust/alloc` since we want to minimize the diff w.r.t. upstream.
#
# We match using absolute paths since `find` does not resolve them
# when matching, which is a problem when e.g. `srctree` is `..`.
# We `grep` afterwards in order to remove the directory entry itself.
rustfmt:
$(Q)find $(abs_srctree) -type f -name '*.rs' \
-o -path $(abs_srctree)/rust/alloc -prune \
-o -path $(abs_objtree)/rust/test -prune \
| grep -Fv $(abs_srctree)/rust/alloc \
| grep -Fv $(abs_objtree)/rust/test \
| grep -Fv generated \
| xargs $(RUSTFMT) $(rustfmt_flags)
rustfmtcheck: rustfmt_flags = --check
rustfmtcheck: rustfmt
# IDE support targets
PHONY += rust-analyzer
rust-analyzer:
$(Q)$(MAKE) $(build)=rust $@
# Misc
# ---------------------------------------------------------------------------
PHONY += scripts_gdb
scripts_gdb: prepare0
$(Q)$(MAKE) $(build)=scripts/gdb
$(Q)ln -fsn $(abspath $(srctree)/scripts/gdb/vmlinux-gdb.py)
ifdef CONFIG_GDB_SCRIPTS
all: scripts_gdb
endif
else # KBUILD_EXTMOD
###
# External module support.
# When building external modules the kernel used as basis is considered
# read-only, and no consistency checks are made and the make
# system is not used on the basis kernel. If updates are required
# in the basis kernel ordinary make commands (without M=...) must be used.
# We are always building only modules.
KBUILD_BUILTIN :=
KBUILD_MODULES := 1
build-dir := $(KBUILD_EXTMOD)
compile_commands.json: $(extmod_prefix)compile_commands.json
PHONY += compile_commands.json
clean-dirs := $(KBUILD_EXTMOD)
clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers $(KBUILD_EXTMOD)/modules.nsdeps \
$(KBUILD_EXTMOD)/compile_commands.json $(KBUILD_EXTMOD)/.thinlto-cache
PHONY += prepare
# now expand this into a simple variable to reduce the cost of shell evaluations
prepare: CC_VERSION_TEXT := $(CC_VERSION_TEXT)
prepare:
@if [ "$(CC_VERSION_TEXT)" != "$(CONFIG_CC_VERSION_TEXT)" ]; then \
echo >&2 "warning: the compiler differs from the one used to build the kernel"; \
echo >&2 " The kernel was built by: $(CONFIG_CC_VERSION_TEXT)"; \
echo >&2 " You are using: $(CC_VERSION_TEXT)"; \
fi
PHONY += help
help:
@echo ' Building external modules.'
@echo ' Syntax: make -C path/to/kernel/src M=$$PWD target'
@echo ''
@echo ' modules - default target, build the module(s)'
@echo ' modules_install - install the module'
@echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'
@echo ' (default: $(abspath $(INSTALL_HDR_PATH)))'
@echo ' clean - remove generated files in module directory only'
@echo ''
endif # KBUILD_EXTMOD
# ---------------------------------------------------------------------------
# Modules
PHONY += modules modules_install modules_prepare
ifdef CONFIG_MODULES
$(MODORDER): $(build-dir)
@:
# KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules.
# This is solely useful to speed up test compiles.
modules: modpost
ifneq ($(KBUILD_MODPOST_NOFINAL),1)
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modfinal
endif
PHONY += modules_check
modules_check: $(MODORDER)
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/modules-check.sh $<
quiet_cmd_depmod = DEPMOD $(MODLIB)
cmd_depmod = $(CONFIG_SHELL) $(srctree)/scripts/depmod.sh $(DEPMOD) \
$(KERNELRELEASE) $(mixed-build-prefix)
modules_install:
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
$(call cmd,depmod)
else # CONFIG_MODULES
# Modules not configured
# ---------------------------------------------------------------------------
modules modules_install:
@echo >&2 '***'
@echo >&2 '*** The present kernel configuration has modules disabled.'
@echo >&2 '*** To use the module feature, please run "make menuconfig" etc.'
@echo >&2 '*** to enable CONFIG_MODULES.'
@echo >&2 '***'
@exit 1
KBUILD_MODULES :=
endif # CONFIG_MODULES
PHONY += modpost
modpost: $(if $(single-build),, $(if $(KBUILD_MIXED_TREE),,$(if $(KBUILD_BUILTIN), vmlinux.o))) \
$(if $(KBUILD_MODULES), modules_check)
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
# Single targets
# ---------------------------------------------------------------------------
# To build individual files in subdirectories, you can do like this:
#
# make foo/bar/baz.s
#
# The supported suffixes for single-target are listed in 'single-targets'
#
# To build only under specific subdirectories, you can do like this:
#
# make foo/bar/baz/
ifdef single-build
# .ko is special because modpost is needed
single-ko := $(sort $(filter %.ko, $(MAKECMDGOALS)))
single-no-ko := $(filter-out $(single-ko), $(MAKECMDGOALS)) \
$(foreach x, o mod, $(patsubst %.ko, %.$x, $(single-ko)))
$(single-ko): single_modules
@:
$(single-no-ko): $(build-dir)
@:
# Remove MODORDER when done because it is not the real one.
PHONY += single_modules
single_modules: $(single-no-ko) modules_prepare
$(Q){ $(foreach m, $(single-ko), echo $(extmod_prefix)$m;) } > $(MODORDER)
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
ifneq ($(KBUILD_MODPOST_NOFINAL),1)
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modfinal
endif
$(Q)rm -f $(MODORDER)
single-goals := $(addprefix $(build-dir)/, $(single-no-ko))
KBUILD_MODULES := 1
endif
# Preset locale variables to speed up the build process. Limit locale
# tweaks to this spot to avoid wrong language settings when running
# make menuconfig etc.
# Error messages still appears in the original language
PHONY += $(build-dir)
$(build-dir): prepare
$(Q)$(MAKE) $(build)=$@ $(if $(KBUILD_MIXED_TREE),,need-builtin=1) need-modorder=1 $(single-goals)
clean-dirs := $(addprefix _clean_, $(clean-dirs))
PHONY += $(clean-dirs) clean
$(clean-dirs):
$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
clean: $(clean-dirs)
$(call cmd,rmfiles)
@find $(or $(KBUILD_EXTMOD), .) \
$(if $(filter-out arch/$(SRCARCH)/boot/dts, $(dtstree)), $(dtstree)) \
$(RCS_FIND_IGNORE) \
\( -name '*.[aios]' -o -name '*.rsi' -o -name '*.ko' -o -name '.*.cmd' \
-o -name '*.ko.*' \
-o -name '*.dtb' -o -name '*.dtbo' -o -name '*.dtb.S' -o -name '*.dt.yaml' \
-o -name '*.dwo' -o -name '*.lst' \
-o -name '*.su' -o -name '*.mod' -o -name '*.usyms' \
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
-o -name '*.lex.c' -o -name '*.tab.[ch]' \
-o -name '*.asn1.[ch]' \
-o -name '*.symtypes' -o -name 'modules.order' \
-o -name '.tmp_*' \
-o -name '*.c.[012]*.*' \
-o -name '*.ll' \
-o -name '*.gcno' \
-o -name '*.*.symversions' \) -type f -print | xargs rm -f
# Generate tags for editors
# ---------------------------------------------------------------------------
quiet_cmd_tags = GEN $@
cmd_tags = $(BASH) $(srctree)/scripts/tags.sh $@
tags TAGS cscope gtags: FORCE
$(call cmd,tags)
# Script to generate missing namespace dependencies
# ---------------------------------------------------------------------------
PHONY += nsdeps
nsdeps: export KBUILD_NSDEPS=1
nsdeps: modules
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/nsdeps
# Clang Tooling
# ---------------------------------------------------------------------------
quiet_cmd_gen_compile_commands = GEN $@
cmd_gen_compile_commands = $(PYTHON3) $< -a $(AR) -o $@ $(filter-out $<, $(real-prereqs))
$(extmod_prefix)compile_commands.json: scripts/clang-tools/gen_compile_commands.py \
$(if $(KBUILD_EXTMOD)$(KBUILD_MIXED_TREE),, vmlinux.a $(KBUILD_VMLINUX_LIBS)) \
$(if $(CONFIG_MODULES), $(MODORDER)) FORCE
$(call if_changed,gen_compile_commands)
targets += $(extmod_prefix)compile_commands.json
PHONY += clang-tidy clang-analyzer
ifdef CONFIG_CC_IS_CLANG
quiet_cmd_clang_tools = CHECK $<
cmd_clang_tools = $(PYTHON3) $(srctree)/scripts/clang-tools/run-clang-tools.py $@ $<
clang-tidy clang-analyzer: $(extmod_prefix)compile_commands.json
$(call cmd,clang_tools)
else
clang-tidy clang-analyzer:
@echo "$@ requires CC=clang" >&2
@false
endif
# Scripts to check various things for consistency
# ---------------------------------------------------------------------------
PHONY += includecheck versioncheck coccicheck export_report
includecheck:
find $(srctree)/* $(RCS_FIND_IGNORE) \
-name '*.[hcS]' -type f -print | sort \
| xargs $(PERL) -w $(srctree)/scripts/checkincludes.pl
versioncheck:
find $(srctree)/* $(RCS_FIND_IGNORE) \
-name '*.[hcS]' -type f -print | sort \
| xargs $(PERL) -w $(srctree)/scripts/checkversion.pl
coccicheck:
$(Q)$(BASH) $(srctree)/scripts/$@
export_report:
$(PERL) $(srctree)/scripts/export_report.pl
PHONY += checkstack kernelrelease kernelversion image_name
# UML needs a little special treatment here. It wants to use the host
# toolchain, so needs $(SUBARCH) passed to checkstack.pl. Everyone
# else wants $(ARCH), including people doing cross-builds, which means
# that $(SUBARCH) doesn't work here.
ifeq ($(ARCH), um)
CHECKSTACK_ARCH := $(SUBARCH)
else
CHECKSTACK_ARCH := $(ARCH)
endif
checkstack:
$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
$(PERL) $(srctree)/scripts/checkstack.pl $(CHECKSTACK_ARCH)
kernelrelease:
@echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion \
$(srctree) $(BRANCH) $(KMI_GENERATION))"
kernelversion:
@echo $(KERNELVERSION)
image_name:
@echo $(KBUILD_IMAGE)
quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)))
cmd_rmfiles = rm -rf $(rm-files)
# read saved command lines for existing targets
existing-targets := $(wildcard $(sort $(targets)))
-include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd)
endif # config-build
endif # mixed-build
endif # need-sub-make
PHONY += FORCE
FORCE:
# Declare the contents of the PHONY variable as phony. We keep that
# information in a variable so we can use it in if_changed and friends.
.PHONY: $(PHONY)