ea066b15fa
* refs/heads/tmp-d88a616:
ANDROID: mm/filemap: Fix missing put_page() for speculative page fault
UPSTREAM: io_uring: ensure that io_init_req() passes in the right issue_flags
UPSTREAM: io_uring: ensure that io_init_req() passes in the right issue_flags
UPSTREAM: io_uring: add missing lock in io_get_file_fixed
UPSTREAM: io_uring: add missing lock in io_get_file_fixed
ANDROID: ABI: Update allowed list for QCOM
BACKPORT: iommu: Avoid races around device probe
UPSTREAM: io_uring/rw: remove leftover debug statement
UPSTREAM: io_uring/rw: ensure kiocb_end_write() is always called
UPSTREAM: io_uring: fix double poll leak on repolling
UPSTREAM: io_uring: Clean up a false-positive warning from GCC 9.3.0
UPSTREAM: io_uring/net: fix fast_iov assignment in io_setup_async_msg()
UPSTREAM: io_uring: io_kiocb_update_pos() should not touch file for non -1 offset
UPSTREAM: io_uring/rw: defer fsnotify calls to task context
UPSTREAM: io_uring: do not recalculate ppos unnecessarily
UPSTREAM: io_uring: update kiocb->ki_pos at execution time
UPSTREAM: io_uring: remove duplicated calls to io_kiocb_ppos
UPSTREAM: io_uring: ensure that cached task references are always put on exit
UPSTREAM: io_uring: fix CQ waiting timeout handling
UPSTREAM: io_uring: lock overflowing for IOPOLL
UPSTREAM: io_uring: check for valid register opcode earlier
UPSTREAM: io_uring: fix async accept on O_NONBLOCK sockets
UPSTREAM: io_uring: allow re-poll if we made progress
UPSTREAM: io_uring: support MSG_WAITALL for IORING_OP_SEND(MSG)
UPSTREAM: io_uring: add flag for disabling provided buffer recycling
UPSTREAM: io_uring: ensure recv and recvmsg handle MSG_WAITALL correctly
UPSTREAM: io_uring: improve send/recv error handling
UPSTREAM: io_uring: don't gate task_work run on TIF_NOTIFY_SIGNAL
UPSTREAM: io_uring/io-wq: only free worker if it was allocated for creation
UPSTREAM: io_uring/io-wq: free worker if task_work creation is canceled
UPSTREAM: io_uring: Fix unsigned 'res' comparison with zero in io_fixup_rw_res()
ANDROID: GKI: Enable ARM64_ERRATUM_2454944
ANDROID: dma-ops: Add restricted vendor hook
ANDROID: arm64: Work around Cortex-A510 erratum 2454944
ANDROID: mm/vmalloc: Add override for lazy vunmap
ANDROID: cpuidle-psci: Fix suspicious RCU usage
ANDROID: ABI: update allowed list for galaxy
FROMGIT: f2fs: add sysfs nodes to set last_age_weight
FROMGIT: f2fs: fix wrong calculation of block age
ANDROID: struct io_uring ABI preservation hack for 5.10.162 changes
ANDROID: fix up struct task_struct ABI change in 5.10.162
ANDROID: add flags variable back to struct proto_ops
UPSTREAM: io_uring: pass in EPOLL_URING_WAKE for eventfd signaling and wakeups
UPSTREAM: eventfd: provide a eventfd_signal_mask() helper
UPSTREAM: eventpoll: add EPOLL_URING_WAKE poll wakeup flag
UPSTREAM: Revert "proc: don't allow async path resolution of /proc/self components"
UPSTREAM: Revert "proc: don't allow async path resolution of /proc/thread-self components"
UPSTREAM: net: remove cmsg restriction from io_uring based send/recvmsg calls
UPSTREAM: task_work: unconditionally run task_work from get_signal()
UPSTREAM: signal: kill JOBCTL_TASK_WORK
UPSTREAM: io_uring: import 5.15-stable io_uring
UPSTREAM: task_work: add helper for more targeted task_work canceling
UPSTREAM: kernel: don't call do_exit() for PF_IO_WORKER threads
UPSTREAM: kernel: stop masking signals in create_io_thread()
UPSTREAM: x86/process: setup io_threads more like normal user space threads
UPSTREAM: arch: ensure parisc/powerpc handle PF_IO_WORKER in copy_thread()
UPSTREAM: arch: setup PF_IO_WORKER threads like PF_KTHREAD
UPSTREAM: entry/kvm: Exit to user mode when TIF_NOTIFY_SIGNAL is set
UPSTREAM: kernel: allow fork with TIF_NOTIFY_SIGNAL pending
UPSTREAM: coredump: Limit what can interrupt coredumps
UPSTREAM: kernel: remove checking for TIF_NOTIFY_SIGNAL
UPSTREAM: task_work: remove legacy TWA_SIGNAL path
UPSTREAM: alpha: fix TIF_NOTIFY_SIGNAL handling
UPSTREAM: ARC: unbork 5.11 bootup: fix snafu in _TIF_NOTIFY_SIGNAL handling
UPSTREAM: ia64: don't call handle_signal() unless there's actually a signal queued
UPSTREAM: sparc: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: riscv: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: nds32: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: ia64: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: h8300: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: c6x: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: alpha: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: xtensa: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: arm: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: microblaze: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: hexagon: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: csky: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: openrisc: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: sh: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: um: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: s390: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: mips: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: powerpc: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: parisc: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: nios32: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: m68k: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: arm64: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: arc: add support for TIF_NOTIFY_SIGNAL
UPSTREAM: x86: Wire up TIF_NOTIFY_SIGNAL
UPSTREAM: task_work: Use TIF_NOTIFY_SIGNAL if available
UPSTREAM: entry: Add support for TIF_NOTIFY_SIGNAL
UPSTREAM: fs: provide locked helper variant of close_fd_get_file()
UPSTREAM: file: Rename __close_fd_get_file close_fd_get_file
UPSTREAM: fs: make do_renameat2() take struct filename
UPSTREAM: signal: Add task_sigpending() helper
UPSTREAM: net: add accept helper not installing fd
UPSTREAM: net: provide __sys_shutdown_sock() that takes a socket
UPSTREAM: tools headers UAPI: Sync openat2.h with the kernel sources
UPSTREAM: fs: expose LOOKUP_CACHED through openat2() RESOLVE_CACHED
UPSTREAM: Make sure nd->path.mnt and nd->path.dentry are always valid pointers
UPSTREAM: fix handling of nd->depth on LOOKUP_CACHED failures in try_to_unlazy*
UPSTREAM: fs: add support for LOOKUP_CACHED
UPSTREAM: saner calling conventions for unlazy_child()
UPSTREAM: iov_iter: add helper to save iov_iter state
UPSTREAM: kernel: provide create_io_thread() helper
UPSTREAM: net: loopback: use NET_NAME_PREDICTABLE for name_assign_type
UPSTREAM: Bluetooth: L2CAP: Fix u8 overflow
UPSTREAM: HID: uclogic: Add HID_QUIRK_HIDINPUT_FORCE quirk
UPSTREAM: HID: ite: Enable QUIRK_TOUCHPAD_ON_OFF_REPORT on Acer Aspire Switch V 10
UPSTREAM: HID: ite: Enable QUIRK_TOUCHPAD_ON_OFF_REPORT on Acer Aspire Switch 10E
UPSTREAM: HID: ite: Add support for Acer S1002 keyboard-dock
UPSTREAM: igb: Initialize mailbox message for VF reset
UPSTREAM: xhci: Apply XHCI_RESET_TO_DEFAULT quirk to ADL-N
UPSTREAM: USB: serial: f81534: fix division by zero on line-speed change
UPSTREAM: USB: serial: f81232: fix division by zero on line-speed change
UPSTREAM: USB: serial: cp210x: add Kamstrup RF sniffer PIDs
UPSTREAM: USB: serial: option: add Quectel EM05-G modem
UPSTREAM: usb: gadget: uvc: Prevent buffer overflow in setup handler
BACKPORT: f2fs: do not allow to decompress files have FI_COMPRESS_RELEASED
BACKPORT: f2fs: handle decompress only post processing in softirq
BACKPORT: f2fs: introduce memory mode
BACKPORT: f2fs: allow compression for mmap files in compress_mode=user
UPSTREAM: iommu/iova: Fix alloc iova overflows issue
UPSTREAM: media: dvb-core: Fix UAF due to refcount races at releasing
ANDROID: GKI: Add Tuxera symbol list
UPSTREAM: usb: dwc3: gadget: Skip waiting for CMDACT cleared during endxfer
UPSTREAM: usb: dwc3: Increase DWC3 controller halt timeout
UPSTREAM: usb: dwc3: Remove DWC3 locking during gadget suspend/resume
UPSTREAM: usb: dwc3: Avoid unmapping USB requests if endxfer is not complete
UPSTREAM: usb: dwc3: gadget: Continue handling EP0 xfercomplete events
UPSTREAM: usb: dwc3: gadget: Synchronize IRQ between soft connect/disconnect
UPSTREAM: usb: dwc3: gadget: Force sending delayed status during soft disconnect
UPSTREAM: usb: dwc3: Do not service EP0 and conndone events if soft disconnected
UPSTREAM: efi: rt-wrapper: Add missing include
UPSTREAM: arm64: efi: Execute runtime services from a dedicated stack
ANDROID: cpu: correct dl_cpu_busy() calls
UPSTREAM: ALSA: pcm: Move rwsem lock inside snd_ctl_elem_read to prevent UAF
UPSTREAM: firmware: tegra: Reduce stack usage
UPSTREAM: scsi: bfa: Move a large struct from the stack onto the heap
ANDROID: mm: page_pinner: ensure do_div() arguments matches with respect to type
ANDROID: Revert "ANDROID: allmodconfig: disable WERROR"
FROMGIT: scsi: ufs: Modify Tactive time setting conditions
UPSTREAM: remoteproc: core: Fix rproc->firmware free in rproc_set_firmware()
UPSTREAM: usb: gadget: f_fs: Fix unbalanced spinlock in __ffs_ep0_queue_wait
UPSTREAM: usb: gadget: f_hid: fix f_hidg lifetime vs cdev
UPSTREAM: usb: gadget: f_hid: optional SETUP/SET_REPORT mode
ANDROID: GKI: add symbol list file for honor
ANDROID: add TEST_MAPPING for net/, include/net
BACKPORT: arm64/bpf: Remove 128MB limit for BPF JIT programs
ANDROID: usb: f_accessory: Check buffer size when initialised via composite
BACKPORT: mm: make minimum slab alignment a runtime property
BACKPORT: printk: stop including cache.h from printk.h
UPSTREAM: kasan: fix a missing header include of static_keys.h
BACKPORT: kasan: split kasan_*enabled() functions into a separate header
UPSTREAM: usb: gadget: f_fs: Ensure ep0req is dequeued before free_request
UPSTREAM: usb: gadget: f_fs: Prevent race during ffs_ep0_queue_wait
UPSTREAM: usb: dwc3: gadget: conditionally remove requests
UPSTREAM: usb: dwc3: ep0: Properly handle setup_packet_pending scenario in data stage
UPSTREAM: usb: dwc3: gadget: Fix IN endpoint max packet size allocation
UPSTREAM: usb: dwc3: gadget: Delay issuing End Transfer
UPSTREAM: usb: dwc3: gadget: Only End Transfer for ep0 data phase
UPSTREAM: usb: dwc3: ep0: Don't prepare beyond Setup stage
UPSTREAM: usb: dwc3: gadget: move cmd_endtransfer to extra function
UPSTREAM: usb: dwc3: gadget: ep_queue simplify isoc start condition
UPSTREAM: usb: dwc3: gadget: Skip reading GEVNTSIZn
UPSTREAM: usb: dwc3: gadget: Ignore Update Transfer cmd params
UPSTREAM: usb: dwc3: gadget: Skip checking Update Transfer status
UPSTREAM: pstore: Properly assign mem_type property
Linux 5.10.160
ASoC: ops: Correct bounds check for second channel on SX controls
nvme-pci: clear the prp2 field when not used
ASoC: cs42l51: Correct PGA Volume minimum value
can: mcba_usb: Fix termination command argument
can: sja1000: fix size of OCR_MODE_MASK define
pinctrl: meditatek: Startup with the IRQs disabled
libbpf: Use page size as max_entries when probing ring buffer map
ASoC: ops: Check bounds for second channel in snd_soc_put_volsw_sx()
ASoC: fsl_micfil: explicitly clear CHnF flags
ASoC: fsl_micfil: explicitly clear software reset bit
io_uring: add missing item types for splice request
fuse: always revalidate if exclusive create
nfp: fix use-after-free in area_cache_get()
vfs: fix copy_file_range() averts filesystem freeze protection
vfs: fix copy_file_range() regression in cross-fs copies
x86/smpboot: Move rcu_cpu_starting() earlier
ANDROID: usb: gadget: uvc: remove duplicate code in unbind
Linux 5.10.159
can: esd_usb: Allow REC and TEC to return to zero
macsec: add missing attribute validation for offload
net: mvneta: Fix an out of bounds check
ipv6: avoid use-after-free in ip6_fragment()
net: plip: don't call kfree_skb/dev_kfree_skb() under spin_lock_irq()
xen/netback: fix build warning
ethernet: aeroflex: fix potential skb leak in greth_init_rings()
tipc: call tipc_lxc_xmit without holding node_read_lock
net: dsa: sja1105: fix memory leak in sja1105_setup_devlink_regions()
ipv4: Fix incorrect route flushing when table ID 0 is used
ipv4: Fix incorrect route flushing when source address is deleted
tipc: Fix potential OOB in tipc_link_proto_rcv()
net: hisilicon: Fix potential use-after-free in hix5hd2_rx()
net: hisilicon: Fix potential use-after-free in hisi_femac_rx()
net: thunderx: Fix missing destroy_workqueue of nicvf_rx_mode_wq
ip_gre: do not report erspan version on GRE interface
net: stmmac: fix "snps,axi-config" node property parsing
nvme initialize core quirks before calling nvme_init_subsystem
NFC: nci: Bounds check struct nfc_target arrays
i40e: Disallow ip4 and ip6 l4_4_bytes
i40e: Fix for VF MAC address 0
i40e: Fix not setting default xps_cpus after reset
net: mvneta: Prevent out of bounds read in mvneta_config_rss()
xen-netfront: Fix NULL sring after live migration
net: encx24j600: Fix invalid logic in reading of MISTAT register
net: encx24j600: Add parentheses to fix precedence
mac802154: fix missing INIT_LIST_HEAD in ieee802154_if_add()
selftests: rtnetlink: correct xfrm policy rule in kci_test_ipsec_offload
net: dsa: ksz: Check return value
Bluetooth: Fix not cleanup led when bt_init fails
Bluetooth: 6LoWPAN: add missing hci_dev_put() in get_l2cap_conn()
vmxnet3: correctly report encapsulated LRO packet
af_unix: Get user_ns from in_skb in unix_diag_get_exact().
drm: bridge: dw_hdmi: fix preference of RGB modes over YUV420
igb: Allocate MSI-X vector when testing
e1000e: Fix TX dispatch condition
gpio: amd8111: Fix PCI device reference count leak
drm/bridge: ti-sn65dsi86: Fix output polarity setting bug
netfilter: ctnetlink: fix compilation warning after data race fixes in ct mark
ca8210: Fix crash by zero initializing data
ieee802154: cc2520: Fix error return code in cc2520_hw_init()
netfilter: nft_set_pipapo: Actually validate intervals in fields after the first one
rtc: mc146818-lib: fix signedness bug in mc146818_get_time()
rtc: mc146818-lib: fix locking in mc146818_set_time
rtc: cmos: Disable irq around direct invocation of cmos_interrupt()
mm/hugetlb: fix races when looking up a CONT-PTE/PMD size hugetlb page
can: af_can: fix NULL pointer dereference in can_rcv_filter
HID: core: fix shift-out-of-bounds in hid_report_raw_event
HID: hid-lg4ff: Add check for empty lbuf
HID: usbhid: Add ALWAYS_POLL quirk for some mice
drm/shmem-helper: Avoid vm_open error paths
drm/shmem-helper: Remove errant put in error path
drm/vmwgfx: Don't use screen objects when SEV is active
KVM: s390: vsie: Fix the initialization of the epoch extension (epdx) field
Bluetooth: Fix crash when replugging CSR fake controllers
Bluetooth: btusb: Add debug message for CSR controllers
mm/gup: fix gup_pud_range() for dax
memcg: fix possible use-after-free in memcg_write_event_control()
media: v4l2-dv-timings.c: fix too strict blanking sanity checks
Revert "ARM: dts: imx7: Fix NAND controller size-cells"
media: videobuf2-core: take mmap_lock in vb2_get_unmapped_area()
xen/netback: don't call kfree_skb() with interrupts disabled
xen/netback: do some code cleanup
xen/netback: Ensure protocol headers don't fall in the non-linear area
rtc: mc146818: Reduce spinlock section in mc146818_set_time()
rtc: cmos: Replace spin_lock_irqsave with spin_lock in hard IRQ
rtc: cmos: avoid UIP when reading alarm time
rtc: cmos: avoid UIP when writing alarm time
rtc: mc146818-lib: extract mc146818_avoid_UIP
rtc: mc146818-lib: fix RTC presence check
rtc: Check return value from mc146818_get_time()
rtc: mc146818-lib: change return values of mc146818_get_time()
rtc: cmos: remove stale REVISIT comments
rtc: mc146818: Dont test for bit 0-5 in Register D
rtc: mc146818: Detect and handle broken RTCs
rtc: mc146818: Prevent reading garbage
mm/khugepaged: invoke MMU notifiers in shmem/file collapse paths
mm/khugepaged: fix GUP-fast interaction by sending IPI
mm/khugepaged: take the right locks for page table retraction
net: usb: qmi_wwan: add u-blox 0x1342 composition
9p/xen: check logical size for buffer size
usb: dwc3: gadget: Disable GUSB2PHYCFG.SUSPHY for End Transfer
fbcon: Use kzalloc() in fbcon_prepare_logo()
regulator: twl6030: fix get status of twl6032 regulators
ASoC: soc-pcm: Add NULL check in BE reparenting
btrfs: send: avoid unaligned encoded writes when attempting to clone range
ALSA: seq: Fix function prototype mismatch in snd_seq_expand_var_event
regulator: slg51000: Wait after asserting CS pin
9p/fd: Use P9_HDRSZ for header size
ARM: dts: rockchip: disable arm_global_timer on rk3066 and rk3188
ASoC: wm8962: Wait for updated value of WM8962_CLOCKING1 register
ARM: 9266/1: mm: fix no-MMU ZERO_PAGE() implementation
ARM: 9251/1: perf: Fix stacktraces for tracepoint events in THUMB2 kernels
ARM: dts: rockchip: rk3188: fix lcdc1-rgb24 node name
arm64: dts: rockchip: fix ir-receiver node names
ARM: dts: rockchip: fix ir-receiver node names
arm: dts: rockchip: fix node name for hym8563 rtc
arm64: dts: rockchip: keep I2S1 disabled for GPIO function on ROCK Pi 4 series
Revert "mmc: sdhci: Fix voltage switch delay"
ANDROID: gki_defconfig: add CONFIG_FUNCTION_ERROR_INJECTION
Linux 5.10.158
ipc/sem: Fix dangling sem_array access in semtimedop race
v4l2: don't fall back to follow_pfn() if pin_user_pages_fast() fails
proc: proc_skip_spaces() shouldn't think it is working on C strings
proc: avoid integer type confusion in get_proc_long
block: unhash blkdev part inode when the part is deleted
Input: raydium_ts_i2c - fix memory leak in raydium_i2c_send()
char: tpm: Protect tpm_pm_suspend with locks
Revert "clocksource/drivers/riscv: Events are stopped during CPU suspend"
ACPI: HMAT: Fix initiator registration for single-initiator systems
ACPI: HMAT: remove unnecessary variable initialization
i2c: imx: Only DMA messages with I2C_M_DMA_SAFE flag set
i2c: npcm7xx: Fix error handling in npcm_i2c_init()
x86/pm: Add enumeration check before spec MSRs save/restore setup
x86/tsx: Add a feature bit for TSX control MSR support
Revert "tty: n_gsm: avoid call of sleeping functions from atomic context"
ipv4: Fix route deletion when nexthop info is not specified
ipv4: Handle attempt to delete multipath route when fib_info contains an nh reference
selftests: net: fix nexthop warning cleanup double ip typo
selftests: net: add delete nexthop route warning test
Kconfig.debug: provide a little extra FRAME_WARN leeway when KASAN is enabled
parisc: Increase FRAME_WARN to 2048 bytes on parisc
xtensa: increase size of gcc stack frame check
parisc: Increase size of gcc stack frame check
iommu/vt-d: Fix PCI device refcount leak in dmar_dev_scope_init()
iommu/vt-d: Fix PCI device refcount leak in has_external_pci()
pinctrl: single: Fix potential division by zero
ASoC: ops: Fix bounds check for _sx controls
io_uring: don't hold uring_lock when calling io_run_task_work*
tracing: Free buffers when a used dynamic event is removed
drm/i915: Never return 0 if not all requests retired
drm/amdgpu: temporarily disable broken Clang builds due to blown stack-frame
mmc: sdhci: Fix voltage switch delay
mmc: sdhci-sprd: Fix no reset data and command after voltage switch
mmc: sdhci-esdhc-imx: correct CQHCI exit halt state check
mmc: core: Fix ambiguous TRIM and DISCARD arg
mmc: mmc_test: Fix removal of debugfs file
net: stmmac: Set MAC's flow control register to reflect current settings
pinctrl: intel: Save and restore pins in "direct IRQ" mode
x86/bugs: Make sure MSR_SPEC_CTRL is updated properly upon resume from S3
nilfs2: fix NULL pointer dereference in nilfs_palloc_commit_free_entry()
tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep"
error-injection: Add prompt for function error injection
riscv: vdso: fix section overlapping under some conditions
net/mlx5: DR, Fix uninitialized var warning
hwmon: (coretemp) fix pci device refcount leak in nv1a_ram_new()
hwmon: (coretemp) Check for null before removing sysfs attrs
net: ethernet: renesas: ravb: Fix promiscuous mode after system resumed
sctp: fix memory leak in sctp_stream_outq_migrate()
packet: do not set TP_STATUS_CSUM_VALID on CHECKSUM_COMPLETE
net: tun: Fix use-after-free in tun_detach()
afs: Fix fileserver probe RTT handling
net: hsr: Fix potential use-after-free
tipc: re-fetch skb cb after tipc_msg_validate
dsa: lan9303: Correct stat name
net: ethernet: nixge: fix NULL dereference
net/9p: Fix a potential socket leak in p9_socket_open
net: net_netdev: Fix error handling in ntb_netdev_init_module()
net: phy: fix null-ptr-deref while probe() failed
wifi: mac8021: fix possible oob access in ieee80211_get_rate_duration
wifi: cfg80211: don't allow multi-BSSID in S1G
wifi: cfg80211: fix buffer overflow in elem comparison
aquantia: Do not purge addresses when setting the number of rings
qlcnic: fix sleep-in-atomic-context bugs caused by msleep
can: cc770: cc770_isa_probe(): add missing free_cc770dev()
can: sja1000_isa: sja1000_isa_probe(): add missing free_sja1000dev()
net/mlx5e: Fix use-after-free when reverting termination table
net/mlx5: Fix uninitialized variable bug in outlen_write()
e100: Fix possible use after free in e100_xmit_prepare
e100: switch from 'pci_' to 'dma_' API
iavf: Fix error handling in iavf_init_module()
iavf: remove redundant ret variable
fm10k: Fix error handling in fm10k_init_module()
i40e: Fix error handling in i40e_init_module()
ixgbevf: Fix resource leak in ixgbevf_init_module()
of: property: decrement node refcount in of_fwnode_get_reference_args()
bpf: Do not copy spin lock field from user in bpf_selem_alloc
hwmon: (ibmpex) Fix possible UAF when ibmpex_register_bmc() fails
hwmon: (i5500_temp) fix missing pci_disable_device()
hwmon: (ina3221) Fix shunt sum critical calculation
hwmon: (ltc2947) fix temperature scaling
libbpf: Handle size overflow for ringbuf mmap
ARM: at91: rm9200: fix usb device clock id
scripts/faddr2line: Fix regression in name resolution on ppc64le
bpf, perf: Use subprog name when reporting subprog ksymbol
iio: light: rpr0521: add missing Kconfig dependencies
iio: health: afe4404
: Fix oob read in afe4404_[read|write]_raw
iio: health: afe4403: Fix oob read in afe4403_read_raw
btrfs: qgroup: fix sleep from invalid context bug in btrfs_qgroup_inherit()
drm/amdgpu: Partially revert "drm/amdgpu: update drm_display_info correctly when the edid is read"
drm/amdgpu: update drm_display_info correctly when the edid is read
drm/display/dp_mst: Fix drm_dp_mst_add_affected_dsc_crtcs() return code
btrfs: move QUOTA_ENABLED check to rescan_should_stop from btrfs_qgroup_rescan_worker
spi: spi-imx: Fix spi_bus_clk if requested clock is higher than input clock
btrfs: free btrfs_path before copying inodes to userspace
btrfs: sink iterator parameter to btrfs_ioctl_logical_to_ino
Revert "xfrm: fix "disable_policy" on ipv4 early demux"
ANDROID: CRC ABI fixups in ip.h and ipv6.h
Linux 5.10.157
fuse: lock inode unconditionally in fuse_fallocate()
drm/i915: fix TLB invalidation for Gen12 video and compute engines
drm/amdgpu: always register an MMU notifier for userptr
drm/amd/dc/dce120: Fix audio register mapping, stop triggering KASAN
btrfs: sysfs: normalize the error handling branch in btrfs_init_sysfs()
btrfs: free btrfs_path before copying subvol info to userspace
btrfs: free btrfs_path before copying fspath to userspace
btrfs: free btrfs_path before copying root refs to userspace
genirq: Take the proposed affinity at face value if force==true
irqchip/gic-v3: Always trust the managed affinity provided by the core code
genirq: Always limit the affinity to online CPUs
genirq/msi: Shutdown managed interrupts with unsatifiable affinities
wifi: wilc1000: validate number of channels
wifi: wilc1000: validate length of IEEE80211_P2P_ATTR_CHANNEL_LIST attribute
wifi: wilc1000: validate length of IEEE80211_P2P_ATTR_OPER_CHANNEL attribute
wifi: wilc1000: validate pairwise and authentication suite offsets
dm integrity: clear the journal on suspend
dm integrity: flush the journal on suspend
gpu: host1x: Avoid trying to use GART on Tegra20
net: usb: qmi_wwan: add Telit 0x103a composition
tcp: configurable source port perturb table size
platform/x86: hp-wmi: Ignore Smart Experience App event
zonefs: fix zone report size in __zonefs_io_error()
platform/x86: acer-wmi: Enable SW_TABLET_MODE on Switch V 10 (SW5-017)
platform/x86: asus-wmi: add missing pci_dev_put() in asus_wmi_set_xusb2pr()
xen/platform-pci: add missing free_irq() in error path
xen-pciback: Allow setting PCI_MSIX_FLAGS_MASKALL too
Input: soc_button_array - add Acer Switch V 10 to dmi_use_low_level_irq[]
Input: soc_button_array - add use_low_level_irq module parameter
Input: goodix - try resetting the controller when no config is set
serial: 8250: 8250_omap: Avoid RS485 RTS glitch on ->set_termios()
ASoC: Intel: bytcht_es8316: Add quirk for the Nanote UMPC-01
Input: synaptics - switch touchpad on HP Laptop 15-da3001TU to RMI mode
binder: Gracefully handle BINDER_TYPE_FDA objects with num_fds=0
binder: Address corner cases in deferred copy and fixup
binder: fix pointer cast warning
binder: defer copies of pre-patched txn data
binder: read pre-translated fds from sender buffer
binder: avoid potential data leakage when copying txn
x86/ioremap: Fix page aligned size calculation in __ioremap_caller()
KVM: x86: remove exit_int_info warning in svm_handle_exit
KVM: x86: nSVM: leave nested mode on vCPU free
mm: vmscan: fix extreme overreclaim and swap floods
gcov: clang: fix the buffer overflow issue
nilfs2: fix nilfs_sufile_mark_dirty() not set segment usage as dirty
usb: dwc3: gadget: Clear ep descriptor last
usb: dwc3: gadget: Return -ESHUTDOWN on ep disable
usb: dwc3: gadget: conditionally remove requests
ceph: fix NULL pointer dereference for req->r_session
ceph: Use kcalloc for allocating multiple elements
ceph: fix possible NULL pointer dereference for req->r_session
ceph: put the requests/sessions when it fails to alloc memory
ceph: fix off by one bugs in unsafe_request_wait()
ceph: flush the mdlog before waiting on unsafe reqs
ceph: flush mdlog before umounting
ceph: make iterate_sessions a global symbol
ceph: make ceph_create_session_msg a global symbol
usb: cdns3: Add support for DRD CDNSP
mmc: sdhci-brcmstb: Fix SDHCI_RESET_ALL for CQHCI
mmc: sdhci-brcmstb: Enable Clock Gating to save power
mmc: sdhci-brcmstb: Re-organize flags
nios2: add FORCE for vmlinuz.gz
init/Kconfig: fix CC_HAS_ASM_GOTO_TIED_OUTPUT test with dash
iio: core: Fix entry not deleted when iio_register_sw_trigger_type() fails
iio: light: apds9960: fix wrong register for gesture gain
arm64: dts: rockchip: lower rk3399-puma-haikou SD controller clock frequency
ext4: fix use-after-free in ext4_ext_shift_extents
usb: dwc3: exynos: Fix remove() function
lib/vdso: use "grep -E" instead of "egrep"
net: enetc: preserve TX ring priority across reconfiguration
net: enetc: cache accesses to &priv->si->hw
net: enetc: manage ENETC_F_QBV in priv->active_offloads only when enabled
s390/crashdump: fix TOD programmable field size
net: thunderx: Fix the ACPI memory leak
nfc: st-nci: fix memory leaks in EVT_TRANSACTION
nfc: st-nci: fix incorrect validating logic in EVT_TRANSACTION
arcnet: fix potential memory leak in com20020_probe()
net: arcnet: Fix RESET flag handling
s390/dasd: fix no record found for raw_track_access
ipv4: Fix error return code in fib_table_insert()
dccp/tcp: Reset saddr on failure after inet6?_hash_connect().
netfilter: flowtable_offload: add missing locking
dma-buf: fix racing conflict of dma_heap_add()
bnx2x: fix pci device refcount leak in bnx2x_vf_is_pcie_pending()
regulator: twl6030: re-add TWL6032_SUBCLASS
NFC: nci: fix memory leak in nci_rx_data_packet()
net: sched: allow act_ct to be built without NF_NAT
sfc: fix potential memleak in __ef100_hard_start_xmit()
xfrm: Fix ignored return value in xfrm6_init()
tipc: check skb_linearize() return value in tipc_disc_rcv()
tipc: add an extra conn_get in tipc_conn_alloc
tipc: set con sock in tipc_conn_alloc
net/mlx5: Fix handling of entry refcount when command is not issued to FW
net/mlx5: Fix FW tracer timestamp calculation
netfilter: ipset: regression in ip_set_hash_ip.c
netfilter: ipset: Limit the maximal range of consecutive elements to add/delete
Drivers: hv: vmbus: fix possible memory leak in vmbus_device_register()
Drivers: hv: vmbus: fix double free in the error path of vmbus_add_channel_work()
macsec: Fix invalid error code set
nfp: add port from netdev validation for EEPROM access
nfp: fill splittable of devlink_port_attrs correctly
net: pch_gbe: fix pci device refcount leak while module exiting
net/qla3xxx: fix potential memleak in ql3xxx_send()
net/mlx4: Check retval of mlx4_bitmap_init
net: ethernet: mtk_eth_soc: fix error handling in mtk_open()
ARM: dts: imx6q-prti6q: Fix ref/tcxo-clock-frequency properties
ARM: mxs: fix memory leak in mxs_machine_init()
netfilter: conntrack: Fix data-races around ct mark
9p/fd: fix issue of list_del corruption in p9_fd_cancel()
net: pch_gbe: fix potential memleak in pch_gbe_tx_queue()
nfc/nci: fix race with opening and closing
rxrpc: Fix race between conn bundle lookup and bundle removal [ZDI-CAN-15975]
rxrpc: Use refcount_t rather than atomic_t
rxrpc: Allow list of in-use local UDP endpoints to be viewed in /proc
net: liquidio: simplify if expression
ARM: dts: at91: sam9g20ek: enable udc vbus gpio pinctrl
tee: optee: fix possible memory leak in optee_register_device()
bus: sunxi-rsb: Support atomic transfers
regulator: core: fix UAF in destroy_regulator()
spi: dw-dma: decrease reference count in dw_spi_dma_init_mfld()
regulator: core: fix kobject release warning and memory leak in regulator_register()
scsi: storvsc: Fix handling of srb_status and capacity change events
ASoC: soc-pcm: Don't zero TDM masks in __soc_pcm_open()
ASoC: sgtl5000: Reset the CHIP_CLK_CTRL reg on remove
ASoC: hdac_hda: fix hda pcm buffer overflow issue
ARM: dts: am335x-pcm-953: Define fixed regulators in root node
af_key: Fix send_acquire race with pfkey_register
xfrm: replay: Fix ESN wrap around for GSO
xfrm: fix "disable_policy" on ipv4 early demux
MIPS: pic32: treat port as signed integer
RISC-V: vdso: Do not add missing symbols to version section in linker script
arm64/syscall: Include asm/ptrace.h in syscall_wrapper header.
block, bfq: fix null pointer dereference in bfq_bio_bfqg()
drm: panel-orientation-quirks: Add quirk for Acer Switch V 10 (SW5-017)
scsi: scsi_debug: Make the READ CAPACITY response compliant with ZBC
scsi: ibmvfc: Avoid path failures during live migration
platform/x86: touchscreen_dmi: Add info for the RCA Cambio W101 v2 2-in-1
Revert "net: macsec: report real_dev features when HW offloading is enabled"
selftests/bpf: Add verifier test for release_reference()
spi: stm32: fix stm32_spi_prepare_mbr() that halves spi clk for every run
wifi: mac80211: Fix ack frame idr leak when mesh has no route
wifi: airo: do not assign -1 to unsigned char
audit: fix undefined behavior in bit shift for AUDIT_BIT
riscv: dts: sifive unleashed: Add PWM controlled LEDs
wifi: mac80211_hwsim: fix debugfs attribute ps with rc table support
wifi: mac80211: fix memory free error when registering wiphy fail
ceph: avoid putting the realm twice when decoding snaps fails
ceph: do not update snapshot context when there is no new snapshot
iio: pressure: ms5611: fixed value compensation bug
iio: ms5611: Simplify IO callback parameters
nvme-pci: add NVME_QUIRK_BOGUS_NID for Micron Nitro
nvme: add a bogus subsystem NQN quirk for Micron MTFDKBA2T0TFH
drm/display: Don't assume dual mode adaptors support i2c sub-addressing
bridge: switchdev: Fix memory leaks when changing VLAN protocol
bridge: switchdev: Notify about VLAN protocol changes
ata: libata-core: do not issue non-internal commands once EH is pending
ata: libata-scsi: simplify __ata_scsi_queuecmd()
scsi: scsi_transport_sas: Fix error handling in sas_phy_add()
ANDROID: abi preservation for fscrypt change in 5.10.154
Revert "serial: 8250: Let drivers request full 16550A feature probing"
Linux 5.10.156
Revert "net: broadcom: Fix BCMGENET Kconfig"
ntfs: check overflow when iterating ATTR_RECORDs
ntfs: fix out-of-bounds read in ntfs_attr_find()
ntfs: fix use-after-free in ntfs_attr_find()
mm: fs: initialize fsdata passed to write_begin/write_end interface
9p/trans_fd: always use O_NONBLOCK read/write
gfs2: Switch from strlcpy to strscpy
gfs2: Check sb_bsize_shift after reading superblock
9p: trans_fd/p9_conn_cancel: drop client lock earlier
kcm: close race conditions on sk_receive_queue
kcm: avoid potential race in kcm_tx_work
tcp: cdg: allow tcp_cdg_release() to be called multiple times
macvlan: enforce a consistent minimal mtu
uapi/linux/stddef.h: Add include guards
Input: i8042 - fix leaking of platform device on module removal
kprobes: Skip clearing aggrprobe's post_handler in kprobe-on-ftrace case
scsi: scsi_debug: Fix possible UAF in sdebug_add_host_helper()
scsi: target: tcm_loop: Fix possible name leak in tcm_loop_setup_hba_bus()
net: use struct_group to copy ip/ipv6 header addresses
stddef: Introduce struct_group() helper macro
usbnet: smsc95xx: Fix deadlock on runtime resume
ring-buffer: Include dropped pages in counting dirty patches
net: fix a concurrency bug in l2tp_tunnel_register()
nvme: ensure subsystem reset is single threaded
nvme: restrict management ioctls to admin
perf/x86/intel/pt: Fix sampling using single range output
misc/vmw_vmci: fix an infoleak in vmci_host_do_receive_datagram()
docs: update mediator contact information in CoC doc
mmc: sdhci-pci: Fix possible memory leak caused by missing pci_dev_put()
mmc: sdhci-pci-o2micro: fix card detect fail issue caused by CD# debounce timeout
mmc: core: properly select voltage range without power cycle
firmware: coreboot: Register bus in module init
iommu/vt-d: Set SRE bit only when hardware has SRS cap
scsi: zfcp: Fix double free of FSF request when qdio send fails
maccess: Fix writing offset in case of fault in strncpy_from_kernel_nofault()
Input: iforce - invert valid length check when fetching device IDs
serial: 8250_lpss: Configure DMA also w/o DMA filter
serial: 8250: Flush DMA Rx on RLSI
serial: 8250: Fall back to non-DMA Rx if IIR_RDI occurs
dm ioctl: fix misbehavior if list_versions races with module loading
iio: pressure: ms5611: changed hardcoded SPI speed to value limited
iio: adc: mp2629: fix potential array out of bound access
iio: adc: mp2629: fix wrong comparison of channel
iio: trigger: sysfs: fix possible memory leak in iio_sysfs_trig_init()
iio: adc: at91_adc: fix possible memory leak in at91_adc_allocate_trigger()
usb: typec: mux: Enter safe mode only when pins need to be reconfigured
usb: chipidea: fix deadlock in ci_otg_del_timer
usb: add NO_LPM quirk for Realforce 87U Keyboard
USB: serial: option: add Fibocom FM160 0x0111 composition
USB: serial: option: add u-blox LARA-L6 modem
USB: serial: option: add u-blox LARA-R6 00B modem
USB: serial: option: remove old LARA-R6 PID
USB: serial: option: add Sierra Wireless EM9191
USB: bcma: Make GPIO explicitly optional
speakup: fix a segfault caused by switching consoles
slimbus: stream: correct presence rate frequencies
Revert "usb: dwc3: disable USB core PHY management"
ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360
ALSA: hda/realtek: fix speakers for Samsung Galaxy Book Pro
ALSA: usb-audio: Drop snd_BUG_ON() from snd_usbmidi_output_open()
tracing: kprobe: Fix potential null-ptr-deref on trace_array in kprobe_event_gen_test_exit()
tracing: kprobe: Fix potential null-ptr-deref on trace_event_file in kprobe_event_gen_test_exit()
tracing: Fix wild-memory-access in register_synth_event()
tracing: Fix memory leak in test_gen_synth_cmd() and test_empty_synth_event()
tracing/ring-buffer: Have polling block on watermark
ring_buffer: Do not deactivate non-existant pages
ftrace: Fix null pointer dereference in ftrace_add_mod()
ftrace: Optimize the allocation for mcount entries
ftrace: Fix the possible incorrect kernel message
cifs: add check for returning value of SMB2_set_info_init
net: thunderbolt: Fix error handling in tbnet_init()
cifs: Fix wrong return value checking when GETFLAGS
net/x25: Fix skb leak in x25_lapb_receive_frame()
net: ag71xx: call phylink_disconnect_phy if ag71xx_hw_enable() fail in ag71xx_open()
cifs: add check for returning value of SMB2_close_init
platform/x86/intel: pmc: Don't unconditionally attach Intel PMC when virtualized
drbd: use after free in drbd_create_device()
net: ena: Fix error handling in ena_init()
net: ionic: Fix error handling in ionic_init_module()
xen/pcpu: fix possible memory leak in register_pcpu()
bnxt_en: Remove debugfs when pci_register_driver failed
net: caif: fix double disconnect client in chnl_net_open()
net: macvlan: Use built-in RCU list checking
mISDN: fix misuse of put_device() in mISDN_register_device()
net: liquidio: release resources when liquidio driver open failed
net: hinic: Fix error handling in hinic_module_init()
mISDN: fix possible memory leak in mISDN_dsp_element_register()
net: bgmac: Drop free_netdev() from bgmac_enet_remove()
bpf: Initialize same number of free nodes for each pcpu_freelist
ata: libata-transport: fix error handling in ata_tdev_add()
ata: libata-transport: fix error handling in ata_tlink_add()
ata: libata-transport: fix error handling in ata_tport_add()
ata: libata-transport: fix double ata_host_put() in ata_tport_add()
arm64: dts: imx8mn: Fix NAND controller size-cells
arm64: dts: imx8mm: Fix NAND controller size-cells
ARM: dts: imx7: Fix NAND controller size-cells
drm: Fix potential null-ptr-deref in drm_vblank_destroy_worker()
drm/drv: Fix potential memory leak in drm_dev_init()
drm/panel: simple: set bpc field for logic technologies displays
pinctrl: devicetree: fix null pointer dereferencing in pinctrl_dt_to_map
parport_pc: Avoid FIFO port location truncation
siox: fix possible memory leak in siox_device_add()
arm64: Fix bit-shifting UB in the MIDR_CPU_MODEL() macro
block: sed-opal: kmalloc the cmd/resp buffers
sctp: clear out_curr if all frag chunks of current msg are pruned
sctp: remove the unnecessary sinfo_stream check in sctp_prsctp_prune_unsent
ASoC: soc-utils: Remove __exit for snd_soc_util_exit()
bpf, test_run: Fix alignment problem in bpf_prog_test_run_skb()
tty: n_gsm: fix sleep-in-atomic-context bug in gsm_control_send
serial: imx: Add missing .thaw_noirq hook
serial: 8250: omap: Flush PM QOS work on remove
serial: 8250: omap: Fix unpaired pm_runtime_put_sync() in omap8250_remove()
serial: 8250_omap: remove wait loop from Errata i202 workaround
serial: 8250: omap: Fix missing PM runtime calls for omap8250_set_mctrl()
serial: 8250: Remove serial_rs485 sanitization from em485
ASoC: tas2764: Fix set_tdm_slot in case of single slot
ASoC: tas2770: Fix set_tdm_slot in case of single slot
ASoC: core: Fix use-after-free in snd_soc_exit()
spi: stm32: Print summary 'callbacks suppressed' message
drm/amdgpu: disable BACO on special BEIGE_GOBY card
drm/amd/pm: disable BACO entry/exit completely on several sienna cichlid cards
drm/amd/pm: Read BIF STRAP also for BACO check
drm/amd/pm: support power source switch on Sienna Cichlid
mmc: sdhci-esdhc-imx: use the correct host caps for MMC_CAP_8_BIT_DATA
spi: intel: Use correct mask for flash and protected regions
mtd: spi-nor: intel-spi: Disable write protection only if asked
ALSA: hda/realtek: fix speakers and micmute on HP 855 G8
ASoC: codecs: jz4725b: Fix spelling mistake "Sourc" -> "Source", "Routee" -> "Route"
Bluetooth: L2CAP: Fix l2cap_global_chan_by_psm
btrfs: remove pointless and double ulist frees in error paths of qgroup tests
drm/imx: imx-tve: Fix return type of imx_tve_connector_mode_valid
i2c: i801: add lis3lv02d's I2C address for Vostro 5568
i2c: tegra: Allocate DMA memory for DMA engine
NFSv4: Retry LOCK on OLD_STATEID during delegation return
drm/amd/display: Remove wrong pipe control lock
ASoC: rt1308-sdw: add the default value of some registers
selftests/intel_pstate: fix build for ARCH=x86_64
selftests/futex: fix build for clang
ASoC: codecs: jz4725b: fix capture selector naming
ASoC: codecs: jz4725b: use right control for Capture Volume
ASoC: codecs: jz4725b: fix reported volume for Master ctl
ASoC: codecs: jz4725b: add missed Line In power control bit
spi: intel: Fix the offset to get the 64K erase opcode
ASoC: wm8962: Add an event handler for TEMP_HP and TEMP_SPK
ASoC: mt6660: Keep the pm_runtime enables before component stuff in mt6660_i2c_probe
ASoC: wm8997: Revert "ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe"
ASoC: wm5110: Revert "ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe"
ASoC: wm5102: Revert "ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe"
ANDROID: fix up struct sk_buf ABI breakage
ANDROID: fix up CRC issue with struct tcp_sock
Revert "serial: 8250: Toggle IER bits on only after irq has been set up"
Linux 5.10.155
io_uring: kill goto error handling in io_sqpoll_wait_sq()
x86/cpu: Restore AMD's DE_CFG MSR after resume
mmc: sdhci-esdhc-imx: Convert the driver to DT-only
net: tun: call napi_schedule_prep() to ensure we own a napi
dmaengine: at_hdmac: Check return code of dma_async_device_register
dmaengine: at_hdmac: Fix impossible condition
dmaengine: at_hdmac: Don't allow CPU to reorder channel enable
dmaengine: at_hdmac: Fix completion of unissued descriptor in case of errors
dmaengine: at_hdmac: Fix descriptor handling when issuing it to hardware
dmaengine: at_hdmac: Fix concurrency over the active list
dmaengine: at_hdmac: Free the memset buf without holding the chan lock
dmaengine: at_hdmac: Fix concurrency over descriptor
dmaengine: at_hdmac: Fix concurrency problems by removing atc_complete_all()
dmaengine: at_hdmac: Protect atchan->status with the channel lock
dmaengine: at_hdmac: Do not call the complete callback on device_terminate_all
dmaengine: at_hdmac: Fix premature completion of desc in issue_pending
dmaengine: at_hdmac: Start transfer for cyclic channels in issue_pending
dmaengine: at_hdmac: Don't start transactions at tx_submit level
dmaengine: at_hdmac: Fix at_lli struct definition
cert host tools: Stop complaining about deprecated OpenSSL functions
can: j1939: j1939_send_one(): fix missing CAN header initialization
mm/memremap.c: map FS_DAX device memory as decrypted
udf: Fix a slab-out-of-bounds write bug in udf_find_entry()
mms: sdhci-esdhc-imx: Fix SDHCI_RESET_ALL for CQHCI
btrfs: selftests: fix wrong error check in btrfs_free_dummy_root()
platform/x86: hp_wmi: Fix rfkill causing soft blocked wifi
drm/i915/dmabuf: fix sg_table handling in map_dma_buf
nilfs2: fix use-after-free bug of ns_writer on remount
nilfs2: fix deadlock in nilfs_count_free_blocks()
ata: libata-scsi: fix SYNCHRONIZE CACHE (16) command failure
vmlinux.lds.h: Fix placement of '.data..decrypted' section
ALSA: usb-audio: Add DSD support for Accuphase DAC-60
ALSA: usb-audio: Add quirk entry for M-Audio Micro
ALSA: hda/realtek: Add Positivo C6300 model quirk
ALSA: hda: fix potential memleak in 'add_widget_node'
ALSA: hda/ca0132: add quirk for EVGA Z390 DARK
ALSA: hda/hdmi - enable runtime pm for more AMD display audio
mmc: sdhci-tegra: Fix SDHCI_RESET_ALL for CQHCI
mmc: sdhci_am654: Fix SDHCI_RESET_ALL for CQHCI
mmc: sdhci-of-arasan: Fix SDHCI_RESET_ALL for CQHCI
mmc: cqhci: Provide helper for resetting both SDHCI and CQHCI
MIPS: jump_label: Fix compat branch range check
arm64: efi: Fix handling of misaligned runtime regions and drop warning
riscv: fix reserved memory setup
riscv: Separate memory init from paging init
riscv: Enable CMA support
riscv: vdso: fix build with llvm
riscv: process: fix kernel info leakage
net: macvlan: fix memory leaks of macvlan_common_newlink
ethernet: tundra: free irq when alloc ring failed in tsi108_open()
net: mv643xx_eth: disable napi when init rxq or txq failed in mv643xx_eth_open()
ethernet: s2io: disable napi when start nic failed in s2io_card_up()
net: atlantic: macsec: clear encryption keys from the stack
net: phy: mscc: macsec: clear encryption keys when freeing a flow
cxgb4vf: shut down the adapter when t4vf_update_port_info() failed in cxgb4vf_open()
net: cxgb3_main: disable napi when bind qsets failed in cxgb_up()
net: cpsw: disable napi in cpsw_ndo_open()
net/mlx5e: E-Switch, Fix comparing termination table instance
net/mlx5: Allow async trigger completion execution on single CPU systems
net: nixge: disable napi when enable interrupts failed in nixge_open()
net: marvell: prestera: fix memory leak in prestera_rxtx_switch_init()
perf stat: Fix printing os->prefix in CSV metrics output
drivers: net: xgene: disable napi when register irq failed in xgene_enet_open()
dmaengine: mv_xor_v2: Fix a resource leak in mv_xor_v2_remove()
dmaengine: pxa_dma: use platform_get_irq_optional
tipc: fix the msg->req tlv len check in tipc_nl_compat_name_table_dump_header
net: broadcom: Fix BCMGENET Kconfig
net: stmmac: dwmac-meson8b: fix meson8b_devm_clk_prepare_enable()
can: af_can: fix NULL pointer dereference in can_rx_register()
ipv6: addrlabel: fix infoleak when sending struct ifaddrlblmsg to network
tcp: prohibit TCP_REPAIR_OPTIONS if data was already sent
drm/vc4: Fix missing platform_unregister_drivers() call in vc4_drm_register()
hamradio: fix issue of dev reference count leakage in bpq_device_event()
net: lapbether: fix issue of dev reference count leakage in lapbeth_device_event()
KVM: s390: pv: don't allow userspace to set the clock under PV
KVM: s390x: fix SCK locking
capabilities: fix undefined behavior in bit shift for CAP_TO_MASK
net: fman: Unregister ethernet device on removal
bnxt_en: fix potentially incorrect return value for ndo_rx_flow_steer
bnxt_en: Fix possible crash in bnxt_hwrm_set_coal()
net: tun: Fix memory leaks of napi_get_frags
macsec: clear encryption keys from the stack after setting up offload
macsec: fix detection of RXSCs when toggling offloading
macsec: fix secy->n_rx_sc accounting
macsec: delete new rxsc when offload fails
net: gso: fix panic on frag_list with mixed head alloc types
bpf: Fix wrong reg type conversion in release_reference()
bpf: Add helper macro bpf_for_each_reg_in_vstate
bpf: Support for pointers beyond pkt_end.
HID: hyperv: fix possible memory leak in mousevsc_probe()
bpftool: Fix NULL pointer dereference when pin {PROG, MAP, LINK} without FILE
bpf, sockmap: Fix the sk->sk_forward_alloc warning of sk_stream_kill_queues
wifi: cfg80211: fix memory leak in query_regdb_file()
wifi: cfg80211: silence a sparse RCU warning
phy: stm32: fix an error code in probe
hwspinlock: qcom: correct MMIO max register for newer SoCs
fuse: fix readdir cache race
ANDROID: gki_defconfig: remove CONFIG_INIT_STACK_ALL_ZERO=y
Revert "serial: 8250: Fix restoring termios speed after suspend"
Linux 5.10.154
ipc: remove memcg accounting for sops objects in do_semtimedop()
wifi: brcmfmac: Fix potential buffer overflow in brcmf_fweh_event_worker()
drm/i915/sdvo: Setup DDC fully before output init
drm/i915/sdvo: Filter out invalid outputs more sensibly
drm/rockchip: dsi: Force synchronous probe
ext4,f2fs: fix readahead of verity data
KVM: x86: emulator: update the emulation mode after CR0 write
KVM: x86: emulator: introduce emulator_recalc_and_set_mode
KVM: x86: emulator: em_sysexit should update ctxt->mode
KVM: x86: Mask off reserved bits in CPUID.80000001H
KVM: x86: Mask off reserved bits in CPUID.80000008H
KVM: x86: Mask off reserved bits in CPUID.8000001AH
KVM: x86: Mask off reserved bits in CPUID.80000006H
ext4: fix BUG_ON() when directory entry has invalid rec_len
ext4: fix warning in 'ext4_da_release_space'
parisc: Avoid printing the hardware path twice
parisc: Export iosapic_serial_irq() symbol for serial port driver
parisc: Make 8250_gsc driver dependend on CONFIG_PARISC
perf/x86/intel: Add Cooper Lake stepping to isolation_ucodes[]
perf/x86/intel: Fix pebs event constraints for ICL
efi: random: Use 'ACPI reclaim' memory for random seed
efi: random: reduce seed size to 32 bytes
fuse: add file_modified() to fallocate
capabilities: fix potential memleak on error path from vfs_getxattr_alloc()
tracing/histogram: Update document for KEYS_MAX size
tools/nolibc/string: Fix memcmp() implementation
kprobe: reverse kp->flags when arm_kprobe failed
tracing: kprobe: Fix memory leak in test_gen_kprobe/kretprobe_cmd()
tcp/udp: Make early_demux back namespacified.
ftrace: Fix use-after-free for dynamic ftrace_ops
btrfs: fix type of parameter generation in btrfs_get_dentry
coresight: cti: Fix hang in cti_disable_hw()
binder: fix UAF of alloc->vma in race with munmap()
memcg: enable accounting of ipc resources
mtd: rawnand: gpmi: Set WAIT_FOR_READY timeout based on program/erase times
tcp/udp: Fix memory leak in ipv6_renew_options().
fscrypt: fix keyring memory leak on mount failure
fscrypt: stop using keyrings subsystem for fscrypt_master_key
fscrypt: simplify master key locking
ALSA: usb-audio: Add quirks for MacroSilicon MS2100/MS2106 devices
block, bfq: protect 'bfqd->queued' by 'bfqd->lock'
Bluetooth: L2CAP: Fix attempting to access uninitialized memory
Bluetooth: L2CAP: Fix accepting connection request for invalid SPSM
i2c: piix4: Fix adapter not be removed in piix4_remove()
arm64: dts: juno: Add thermal critical trip points
firmware: arm_scmi: Make Rx chan_setup fail on memory errors
firmware: arm_scmi: Suppress the driver's bind attributes
ARM: dts: imx6qdl-gw59{10,13}: fix user pushbutton GPIO offset
efi/tpm: Pass correct address to memblock_reserve
i2c: xiic: Add platform module alias
drm/amdgpu: set vm_update_mode=0 as default for Sienna Cichlid in SRIOV case
HID: saitek: add madcatz variant of MMO7 mouse device ID
scsi: core: Restrict legal sdev_state transitions via sysfs
ACPI: APEI: Fix integer overflow in ghes_estatus_pool_init()
media: meson: vdec: fix possible refcount leak in vdec_probe()
media: dvb-frontends/drxk: initialize err to 0
media: cros-ec-cec: limit msg.len to CEC_MAX_MSG_SIZE
media: s5p_cec: limit msg.len to CEC_MAX_MSG_SIZE
media: rkisp1: Zero v4l2_subdev_format fields in when validating links
media: rkisp1: Initialize color space on resizer sink and source pads
s390/boot: add secure boot trailer
xhci-pci: Set runtime PM as default policy on all xHC 1.2 or later devices
mtd: parsers: bcm47xxpart: Fix halfblock reads
mtd: parsers: bcm47xxpart: print correct offset on read error
fbdev: stifb: Fall back to cfb_fillrect() on 32-bit HCRX cards
video/fbdev/stifb: Implement the stifb_fillrect() function
mmc: sdhci-pci-core: Disable ES for ASUS BIOS on Jasper Lake
mmc: sdhci-pci: Avoid comma separated statements
mmc: sdhci-esdhc-imx: Propagate ESDHC_FLAG_HS400* only on 8bit bus
drm/msm/hdmi: fix IRQ lifetime
drm/msm/hdmi: Remove spurious IRQF_ONESHOT flag
ipv6: fix WARNING in ip6_route_net_exit_late()
net, neigh: Fix null-ptr-deref in neigh_table_clear()
net: mdio: fix undefined behavior in bit shift for __mdiobus_register
Bluetooth: L2CAP: fix use-after-free in l2cap_conn_del()
Bluetooth: L2CAP: Fix use-after-free caused by l2cap_reassemble_sdu
btrfs: fix ulist leaks in error paths of qgroup self tests
btrfs: fix inode list leak during backref walking at find_parent_nodes()
btrfs: fix inode list leak during backref walking at resolve_indirect_refs()
isdn: mISDN: netjet: fix wrong check of device registration
mISDN: fix possible memory leak in mISDN_register_device()
rose: Fix NULL pointer dereference in rose_send_frame()
ipvs: fix WARNING in ip_vs_app_net_cleanup()
ipvs: fix WARNING in __ip_vs_cleanup_batch()
ipvs: use explicitly signed chars
netfilter: nf_tables: release flow rule object from commit path
net: tun: fix bugs for oversize packet when napi frags enabled
net: sched: Fix use after free in red_enqueue()
ata: pata_legacy: fix pdc20230_set_piomode()
net: fec: fix improper use of NETDEV_TX_BUSY
nfc: nfcmrvl: Fix potential memory leak in nfcmrvl_i2c_nci_send()
nfc: s3fwrn5: Fix potential memory leak in s3fwrn5_nci_send()
nfc: nxp-nci: Fix potential memory leak in nxp_nci_send()
NFC: nxp-nci: remove unnecessary labels
nfc: fdp: Fix potential memory leak in fdp_nci_send()
nfc: fdp: drop ftrace-like debugging messages
RDMA/qedr: clean up work queue on failure in qedr_alloc_resources()
RDMA/core: Fix null-ptr-deref in ib_core_cleanup()
net: dsa: Fix possible memory leaks in dsa_loop_init()
nfs4: Fix kmemleak when allocate slot failed
NFSv4.1: We must always send RECLAIM_COMPLETE after a reboot
NFSv4.1: Handle RECLAIM_COMPLETE trunking errors
NFSv4: Fix a potential state reclaim deadlock
IB/hfi1: Correctly move list in sc_disable()
RDMA/cma: Use output interface for net_dev check
KVM: x86: Add compat handler for KVM_X86_SET_MSR_FILTER
KVM: x86: Copy filter arg outside kvm_vm_ioctl_set_msr_filter()
KVM: x86: Protect the unused bits in MSR exiting flags
x86/topology: Fix duplicated core ID within a package
x86/topology: Fix multiple packages shown on a single-package system
x86/topology: Set cpu_die_id only if DIE_TYPE found
KVM: x86: Treat #DBs from the emulator as fault-like (code and DR7.GD=1)
KVM: x86: Trace re-injected exceptions
KVM: nVMX: Don't propagate vmcs12's PERF_GLOBAL_CTRL settings to vmcs02
KVM: nVMX: Pull KVM L0's desired controls directly from vmcs01
serial: ar933x: Deassert Transmit Enable on ->rs485_config()
serial: 8250: Let drivers request full 16550A feature probing
Linux 5.10.153
serial: Deassert Transmit Enable on probe in driver-specific way
serial: core: move RS485 configuration tasks from drivers into core
can: rcar_canfd: rcar_canfd_handle_global_receive(): fix IRQ storm on global FIFO receive
arm64/kexec: Test page size support with new TGRAN range values
arm64/mm: Fix __enable_mmu() for new TGRAN range values
scsi: sd: Revert "scsi: sd: Remove a local variable"
arm64: Add AMPERE1 to the Spectre-BHB affected list
net: enetc: survive memory pressure without crashing
net/mlx5: Fix crash during sync firmware reset
net/mlx5: Fix possible use-after-free in async command interface
net/mlx5e: Do not increment ESN when updating IPsec ESN state
nh: fix scope used to find saddr when adding non gw nh
net: ehea: fix possible memory leak in ehea_register_port()
openvswitch: switch from WARN to pr_warn
ALSA: aoa: Fix I2S device accounting
ALSA: aoa: i2sbus: fix possible memory leak in i2sbus_add_dev()
net: fec: limit register access on i.MX6UL
PM: domains: Fix handling of unavailable/disabled idle states
net: ksz884x: fix missing pci_disable_device() on error in pcidev_init()
i40e: Fix flow-type by setting GL_HASH_INSET registers
i40e: Fix VF hang when reset is triggered on another VF
i40e: Fix ethtool rx-flow-hash setting for X722
ipv6: ensure sane device mtu in tunnels
media: vivid: set num_in/outputs to 0 if not supported
media: videodev2.h: V4L2_DV_BT_BLANKING_HEIGHT should check 'interlaced'
media: v4l2-dv-timings: add sanity checks for blanking values
media: vivid: dev->bitmap_cap wasn't freed in all cases
media: vivid: s_fbuf: add more sanity checks
PM: hibernate: Allow hybrid sleep to work with s2idle
can: mcp251x: mcp251x_can_probe(): add missing unregister_candev() in error path
can: mscan: mpc5xxx: mpc5xxx_can_probe(): add missing put_clock() in error path
tcp: fix indefinite deferral of RTO with SACK reneging
tcp: fix a signed-integer-overflow bug in tcp_add_backlog()
tcp: minor optimization in tcp_add_backlog()
net: lantiq_etop: don't free skb when returning NETDEV_TX_BUSY
net: fix UAF issue in nfqnl_nf_hook_drop() when ops_init() failed
kcm: annotate data-races around kcm->rx_wait
kcm: annotate data-races around kcm->rx_psock
atlantic: fix deadlock at aq_nic_stop
amd-xgbe: add the bit rate quirk for Molex cables
amd-xgbe: fix the SFP compliance codes check for DAC cables
x86/unwind/orc: Fix unreliable stack dump with gcov
net: hinic: fix the issue of double release MBOX callback of VF
net: hinic: fix the issue of CMDQ memory leaks
net: hinic: fix memory leak when reading function table
net: hinic: fix incorrect assignment issue in hinic_set_interrupt_cfg()
net: netsec: fix error handling in netsec_register_mdio()
tipc: fix a null-ptr-deref in tipc_topsrv_accept
perf/x86/intel/lbr: Use setup_clear_cpu_cap() instead of clear_cpu_cap()
ALSA: ac97: fix possible memory leak in snd_ac97_dev_register()
ASoC: qcom: lpass-cpu: Mark HDMI TX parity register as volatile
arc: iounmap() arg is volatile
ASoC: qcom: lpass-cpu: mark HDMI TX registers as volatile
drm/msm: Fix return type of mdp4_lvds_connector_mode_valid
media: v4l2: Fix v4l2_i2c_subdev_set_name function documentation
net: ieee802154: fix error return code in dgram_bind()
mm,hugetlb: take hugetlb_lock before decrementing h->resv_huge_pages
mm/memory: add non-anonymous page check in the copy_present_page()
xen/gntdev: Prevent leaking grants
Xen/gntdev: don't ignore kernel unmapping error
s390/pci: add missing EX_TABLE entries to __pcistg_mio_inuser()/__pcilg_mio_inuser()
s390/futex: add missing EX_TABLE entry to __futex_atomic_op()
perf auxtrace: Fix address filter symbol name match for modules
kernfs: fix use-after-free in __kernfs_remove
counter: microchip-tcb-capture: Handle Signal1 read and Synapse
mmc: core: Fix kernel panic when remove non-standard SDIO card
mmc: sdhci_am654: 'select', not 'depends' REGMAP_MMIO
drm/msm/dp: fix IRQ lifetime
drm/msm/hdmi: fix memory corruption with too many bridges
drm/msm/dsi: fix memory corruption with too many bridges
scsi: qla2xxx: Use transport-defined speed mask for supported_speeds
mac802154: Fix LQI recording
exec: Copy oldsighand->action under spin-lock
fs/binfmt_elf: Fix memory leak in load_elf_binary()
fbdev: smscufx: Fix several use-after-free bugs
iio: temperature: ltc2983: allocate iio channels once
iio: light: tsl2583: Fix module unloading
tools: iio: iio_utils: fix digit calculation
xhci: Remove device endpoints from bandwidth list when freeing the device
xhci: Add quirk to reset host back to default state at shutdown
mtd: rawnand: marvell: Use correct logic for nand-keep-config
usb: xhci: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
usb: bdc: change state when port disconnected
usb: dwc3: gadget: Don't set IMI for no_interrupt
usb: dwc3: gadget: Stop processing more requests on IMI
USB: add RESET_RESUME quirk for NVIDIA Jetson devices in RCM
ALSA: rme9652: use explicitly signed char
ALSA: au88x0: use explicitly signed char
ALSA: Use del_timer_sync() before freeing timer
can: kvaser_usb: Fix possible completions during init_completion
can: j1939: transport: j1939_session_skb_drop_old(): spin_unlock_irqrestore() before kfree_skb()
Linux 5.10.152
udp: Update reuse->has_conns under reuseport_lock.
mm: /proc/pid/smaps_rollup: fix no vma's null-deref
blk-wbt: fix that 'rwb->wc' is always set to 1 in wbt_init()
mmc: core: Add SD card quirk for broken discard
Makefile.debug: re-enable debug info for .S files
x86/Kconfig: Drop check for -mabi=ms for CONFIG_EFI_STUB
ACPI: video: Force backlight native for more TongFang devices
hv_netvsc: Fix race between VF offering and VF association message from host
perf/x86/intel/pt: Relax address filter validation
riscv: topology: fix default topology reporting
arm64: topology: move store_cpu_topology() to shared code
arm64: dts: qcom: sc7180-trogdor: Fixup modem memory region
fcntl: fix potential deadlocks for &fown_struct.lock
fcntl: make F_GETOWN(EX) return 0 on dead owner task
perf: Skip and warn on unknown format 'configN' attrs
perf pmu: Validate raw event with sysfs exported format bits
riscv: always honor the CONFIG_CMDLINE_FORCE when parsing dtb
riscv: Add machine name to kernel boot log and stack dump output
mmc: sdhci-tegra: Use actual clock rate for SW tuning correction
xen/gntdev: Accommodate VMA splitting
xen: assume XENFEAT_gnttab_map_avail_bits being set for pv guests
tracing: Do not free snapshot if tracer is on cmdline
tracing: Simplify conditional compilation code in tracing_set_tracer()
dmaengine: mxs: use platform_driver_register
dmaengine: mxs-dma: Remove the unused .id_table
drm/virtio: Use appropriate atomic state in virtio_gpu_plane_cleanup_fb()
iommu/vt-d: Clean up si_domain in the init_dmars() error path
iommu/vt-d: Allow NVS regions in arch_rmrr_sanity_check()
net: phy: dp83822: disable MDI crossover status change interrupt
net: sched: fix race condition in qdisc_graft()
net: hns: fix possible memory leak in hnae_ae_register()
sfc: include vport_id in filter spec hash and equal()
net: sched: sfb: fix null pointer access issue when sfb_init() fails
net: sched: delete duplicate cleanup of backlog and qlen
net: sched: cake: fix null pointer access issue when cake_init() fails
nvme-hwmon: kmalloc the NVME SMART log buffer
nvme-hwmon: consistently ignore errors from nvme_hwmon_init
nvme-hwmon: Return error code when registration fails
nvme-hwmon: rework to avoid devm allocation
ionic: catch NULL pointer issue on reconfig
net: hsr: avoid possible NULL deref in skb_clone()
cifs: Fix xid leak in cifs_ses_add_channel()
cifs: Fix xid leak in cifs_flock()
cifs: Fix xid leak in cifs_copy_file_range()
net: phy: dp83867: Extend RX strap quirk for SGMII mode
net/atm: fix proc_mpc_write incorrect return value
sfc: Change VF mac via PF as first preference if available.
HID: magicmouse: Do not set BTN_MOUSE on double report
i40e: Fix DMA mappings leak
tipc: fix an information leak in tipc_topsrv_kern_subscr
tipc: Fix recognition of trial period
ACPI: extlog: Handle multiple records
btrfs: fix processing of delayed tree block refs during backref walking
btrfs: fix processing of delayed data refs during backref walking
r8152: add PID for the Lenovo OneLink+ Dock
arm64: errata: Remove AES hwcap for COMPAT tasks
blk-wbt: call rq_qos_add() after wb_normal is initialized
block: wbt: Remove unnecessary invoking of wbt_update_limits in wbt_init
media: venus: dec: Handle the case where find_format fails
media: mceusb: set timeout to at least timeout provided
KVM: arm64: vgic: Fix exit condition in scan_its_table()
kvm: Add support for arch compat vm ioctls
cpufreq: qcom: fix memory leak in error path
ata: ahci: Match EM_MAX_SLOTS with SATA_PMP_MAX_PORTS
ata: ahci-imx: Fix MODULE_ALIAS
hwmon/coretemp: Handle large core ID value
x86/microcode/AMD: Apply the patch early on every logical thread
i2c: qcom-cci: Fix ordering of pm_runtime_xx and i2c_add_adapter
cpufreq: qcom: fix writes in read-only memory region
selinux: enable use of both GFP_KERNEL and GFP_ATOMIC in convert_context()
ocfs2: fix BUG when iput after ocfs2_mknod fails
ocfs2: clear dinode links count in case of error
Linux 5.10.151
kbuild: Add skip_encoding_btf_enum64 option to pahole
kbuild: Unify options for BTF generation for vmlinux and modules
kbuild: skip per-CPU BTF generation for pahole v1.18-v1.21
kbuild: Quote OBJCOPY var to avoid a pahole call break the build
bpf: Generate BTF_KIND_FLOAT when linking vmlinux
Linux 5.10.150
Revert "drm/amdgpu: make sure to init common IP before gmc"
gcov: support GCC 12.1 and newer compilers
f2fs: fix wrong condition to trigger background checkpoint correctly
thermal: intel_powerclamp: Use first online CPU as control_cpu
inet: fully convert sk->sk_rx_dst to RCU rules
ext4: continue to expand file system when the target size doesn't reach
Revert "drm/amdgpu: use dirty framebuffer helper"
Revert "drm/amdgpu: move nbio sdma_doorbell_range() into sdma code for vega"
net/ieee802154: don't warn zero-sized raw_sendmsg()
Revert "net/ieee802154: reject zero-sized raw_sendmsg()"
net: ieee802154: return -EINVAL for unknown addr type
mm: hugetlb: fix UAF in hugetlb_handle_userfault
io_uring/af_unix: defer registered files gc to io_uring release
io_uring: correct pinned_vm accounting
arm64: topology: fix possible overflow in amu_fie_setup()
perf intel-pt: Fix segfault in intel_pt_print_info() with uClibc
clk: bcm2835: Make peripheral PLLC critical
usb: idmouse: fix an uninit-value in idmouse_open
nvmet-tcp: add bounds check on Transfer Tag
nvme: copy firmware_rev on each init
staging: rtl8723bs: fix a potential memory leak in rtw_init_cmd_priv()
Revert "usb: storage: Add quirk for Samsung Fit flash"
usb: musb: Fix musb_gadget.c rxstate overflow bug
usb: host: xhci: Fix potential memory leak in xhci_alloc_stream_info()
md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d
HID: roccat: Fix use-after-free in roccat_read()
soundwire: intel: fix error handling on dai registration issues
soundwire: cadence: Don't overwrite msg->buf during write commands
bcache: fix set_at_max_writeback_rate() for multiple attached devices
ata: libahci_platform: Sanity check the DT child nodes number
blk-throttle: prevent overflow while calculating wait time
staging: vt6655: fix potential memory leak
power: supply: adp5061: fix out-of-bounds read in adp5061_get_chg_type()
nbd: Fix hung when signal interrupts nbd_start_device_ioctl()
scsi: 3w-9xxx: Avoid disabling device if failing to enable it
usb: host: xhci-plat: suspend/resume clks for brcm
usb: host: xhci-plat: suspend and resume clocks
clk: zynqmp: pll: rectify rate rounding in zynqmp_pll_round_rate
media: cx88: Fix a null-ptr-deref bug in buffer_prepare()
clk: zynqmp: Fix stack-out-of-bounds in strncpy`
btrfs: scrub: try to fix super block errors
arm64: dts: imx8mq-librem5: Add bq25895 as max17055's power supply
kselftest/arm64: Fix validatation termination record after EXTRA_CONTEXT
ARM: dts: imx6sx: add missing properties for sram
ARM: dts: imx6sll: add missing properties for sram
ARM: dts: imx6sl: add missing properties for sram
ARM: dts: imx6qp: add missing properties for sram
ARM: dts: imx6dl: add missing properties for sram
ARM: dts: imx6q: add missing properties for sram
ARM: dts: imx7d-sdb: config the max pressure for tsc2046
drm/amd/display: Remove interface for periodic interrupt 1
drm/dp: Don't rewrite link config when setting phy test pattern
mmc: sdhci-msm: add compatible string check for sdm670
drm/meson: explicitly remove aggregate driver at module unload time
drm/amdgpu: fix initial connector audio value
ASoC: SOF: pci: Change DMI match info to support all Chrome platforms
platform/x86: msi-laptop: Change DMI match / alias strings to fix module autoloading
platform/chrome: cros_ec: Notify the PM of wake events during resume
drm: panel-orientation-quirks: Add quirk for Anbernic Win600
drm/vc4: vec: Fix timings for VEC modes
drm: bridge: dw_hdmi: only trigger hotplug event on link change
udmabuf: Set ubuf->sg = NULL if the creation of sg table fails
drm/amd/display: fix overflow on MIN_I64 definition
gpu: lontium-lt9611: Fix NULL pointer dereference in lt9611_connector_init()
drm: Prevent drm_copy_field() to attempt copying a NULL pointer
drm: Use size_t type for len variable in drm_copy_field()
drm/nouveau/nouveau_bo: fix potential memory leak in nouveau_bo_alloc()
r8152: Rate limit overflow messages
Bluetooth: L2CAP: Fix user-after-free
net: If sock is dead don't access sock's sk_wq in sk_stream_wait_memory
wifi: rt2x00: correctly set BBP register 86 for MT7620
wifi: rt2x00: set SoC wmac clock register
wifi: rt2x00: set VGC gain for both chains of MT7620
wifi: rt2x00: set correct TX_SW_CFG1 MAC register for MT7620
wifi: rt2x00: don't run Rt5592 IQ calibration on MT7620
can: bcm: check the result of can_send() in bcm_can_tx()
Bluetooth: hci_sysfs: Fix attempting to call device_add multiple times
Bluetooth: L2CAP: initialize delayed works at l2cap_chan_create()
regulator: core: Prevent integer underflow
wifi: brcmfmac: fix use-after-free bug in brcmf_netdev_start_xmit()
xfrm: Update ipcomp_scratches with NULL when freed
wifi: ath9k: avoid uninit memory read in ath9k_htc_rx_msg()
tcp: annotate data-race around tcp_md5sig_pool_populated
openvswitch: Fix overreporting of drops in dropwatch
openvswitch: Fix double reporting of drops in dropwatch
bpftool: Clear errno after libcap's checks
wifi: brcmfmac: fix invalid address access when enabling SCAN log level
NFSD: fix use-after-free on source server when doing inter-server copy
NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data
x86/entry: Work around Clang __bdos() bug
thermal: intel_powerclamp: Use get_cpu() instead of smp_processor_id() to avoid crash
powercap: intel_rapl: fix UBSAN shift-out-of-bounds issue
MIPS: BCM47XX: Cast memcmp() of function to (void *)
ACPI: video: Add Toshiba Satellite/Portege Z830 quirk
rcu-tasks: Convert RCU_LOCKDEP_WARN() to WARN_ONCE()
rcu: Back off upon fill_page_cache_func() allocation failure
selftest: tpm2: Add Client.__del__() to close /dev/tpm* handle
f2fs: fix to account FS_CP_DATA_IO correctly
f2fs: fix to avoid REQ_TIME and CP_TIME collision
f2fs: fix race condition on setting FI_NO_EXTENT flag
ACPI: APEI: do not add task_work to kernel thread to avoid memory leak
thermal/drivers/qcom/tsens-v0_1: Fix MSM8939 fourth sensor hw_id
crypto: cavium - prevent integer overflow loading firmware
crypto: marvell/octeontx - prevent integer overflows
kbuild: rpm-pkg: fix breakage when V=1 is used
kbuild: remove the target in signal traps when interrupted
tracing: kprobe: Make gen test module work in arm and riscv
tracing: kprobe: Fix kprobe event gen test module on exit
iommu/iova: Fix module config properly
crypto: qat - fix DMA transfer direction
crypto: qat - use pre-allocated buffers in datapath
crypto: qat - fix use of 'dma_map_single'
crypto: inside-secure - Change swab to swab32
crypto: ccp - Release dma channels before dmaengine unrgister
crypto: akcipher - default implementation for setting a private key
iommu/omap: Fix buffer overflow in debugfs
cgroup/cpuset: Enable update_tasks_cpumask() on top_cpuset
hwrng: imx-rngc - Moving IRQ handler registering after imx_rngc_irq_mask_clear()
crypto: hisilicon/zip - fix mismatch in get/set sgl_sge_nr
crypto: sahara - don't sleep when in softirq
powerpc: Fix SPE Power ISA properties for e500v1 platforms
powerpc/64s: Fix GENERIC_CPU build flags for PPC970 / G5
x86/hyperv: Fix 'struct hv_enlightened_vmcs' definition
powerpc/powernv: add missing of_node_put() in opal_export_attrs()
powerpc/pci_dn: Add missing of_node_put()
powerpc/sysdev/fsl_msi: Add missing of_node_put()
powerpc/math_emu/efp: Include module.h
mailbox: bcm-ferxrm-mailbox: Fix error check for dma_map_sg
clk: ast2600: BCLK comes from EPLL
clk: ti: dra7-atl: Fix reference leak in of_dra7_atl_clk_probe
clk: bcm2835: fix bcm2835_clock_rate_from_divisor declaration
clk: baikal-t1: Add SATA internal ref clock buffer
clk: baikal-t1: Add shared xGMAC ref/ptp clocks internal parent
clk: baikal-t1: Fix invalid xGMAC PTP clock divider
clk: vc5: Fix 5P49V6901 outputs disabling when enabling FOD
spmi: pmic-arb: correct duplicate APID to PPID mapping logic
dmaengine: ioat: stop mod_timer from resurrecting deleted timer in __cleanup()
clk: mediatek: mt8183: mfgcfg: Propagate rate changes to parent
mfd: sm501: Add check for platform_driver_register()
mfd: fsl-imx25: Fix check for platform_get_irq() errors
mfd: lp8788: Fix an error handling path in lp8788_irq_init() and lp8788_irq_init()
mfd: lp8788: Fix an error handling path in lp8788_probe()
mfd: fsl-imx25: Fix an error handling path in mx25_tsadc_setup_irq()
mfd: intel_soc_pmic: Fix an error handling path in intel_soc_pmic_i2c_probe()
fsi: core: Check error number after calling ida_simple_get
clk: qcom: apss-ipq6018: mark apcs_alias0_core_clk as critical
scsi: iscsi: iscsi_tcp: Fix null-ptr-deref while calling getpeername()
scsi: libsas: Fix use-after-free bug in smp_execute_task_sg()
serial: 8250: Fix restoring termios speed after suspend
firmware: google: Test spinlock on panic path to avoid lockups
staging: vt6655: fix some erroneous memory clean-up loops
phy: qualcomm: call clk_disable_unprepare in the error handling
tty: serial: fsl_lpuart: disable dma rx/tx use flags in lpuart_dma_shutdown
serial: 8250: Toggle IER bits on only after irq has been set up
serial: 8250: Add an empty line and remove some useless {}
drivers: serial: jsm: fix some leaks in probe
usb: gadget: function: fix dangling pnp_string in f_printer.c
xhci: Don't show warning for reinit on known broken suspend
IB: Set IOVA/LENGTH on IB_MR in core/uverbs layers
RDMA/cm: Use SLID in the work completion as the DLID in responder side
md/raid5: Ensure stripe_fill happens on non-read IO with journal
md: Replace snprintf with scnprintf
mtd: rawnand: meson: fix bit map use in meson_nfc_ecc_correct()
ata: fix ata_id_has_dipm()
ata: fix ata_id_has_ncq_autosense()
ata: fix ata_id_has_devslp()
ata: fix ata_id_sense_reporting_enabled() and ata_id_has_sense_reporting()
RDMA/siw: Always consume all skbuf data in sk_data_ready() upcall.
mtd: rawnand: fsl_elbc: Fix none ECC mode
mtd: devices: docg3: check the return value of devm_ioremap() in the probe
dyndbg: drop EXPORTed dynamic_debug_exec_queries
dyndbg: let query-modname override actual module name
dyndbg: fix module.dyndbg handling
dyndbg: fix static_branch manipulation
dmaengine: hisilicon: Add multi-thread support for a DMA channel
dmaengine: hisilicon: Fix CQ head update
dmaengine: hisilicon: Disable channels when unregister hisi_dma
fpga: prevent integer overflow in dfl_feature_ioctl_set_irq()
misc: ocxl: fix possible refcount leak in afu_ioctl()
RDMA/rxe: Fix the error caused by qp->sk
RDMA/rxe: Fix "kernel NULL pointer dereference" error
media: xilinx: vipp: Fix refcount leak in xvip_graph_dma_init
media: meson: vdec: add missing clk_disable_unprepare on error in vdec_hevc_start()
tty: xilinx_uartps: Fix the ignore_status
media: exynos4-is: fimc-is: Add of_node_put() when breaking out of loop
HSI: omap_ssi_port: Fix dma_map_sg error check
HSI: omap_ssi: Fix refcount leak in ssi_probe
clk: tegra20: Fix refcount leak in tegra20_clock_init
clk: tegra: Fix refcount leak in tegra114_clock_init
clk: tegra: Fix refcount leak in tegra210_clock_init
clk: sprd: Hold reference returned by of_get_parent()
clk: berlin: Add of_node_put() for of_get_parent()
clk: qoriq: Hold reference returned by of_get_parent()
clk: oxnas: Hold reference returned by of_get_parent()
clk: meson: Hold reference returned by of_get_parent()
usb: common: debug: Check non-standard control requests
usb: common: move function's kerneldoc next to its definition
usb: common: add function to get interval expressed in us unit
usb: common: Parse for USB SSP genXxY
usb: ch9: Add USB 3.2 SSP attributes
iio: ABI: Fix wrong format of differential capacitance channel ABI.
iio: inkern: only release the device node when done with it
iio: adc: at91-sama5d2_adc: disable/prepare buffer on suspend/resume
iio: adc: at91-sama5d2_adc: lock around oversampling and sample freq
iio: adc: at91-sama5d2_adc: check return status for pressure and touch
iio: adc: at91-sama5d2_adc: fix AT91_SAMA5D2_MR_TRACKTIM_MAX
ARM: dts: exynos: fix polarity of VBUS GPIO of Origen
arm64: ftrace: fix module PLTs with mcount
ARM: Drop CMDLINE_* dependency on ATAGS
ARM: dts: exynos: correct s5k6a3 reset polarity on Midas family
soc/tegra: fuse: Drop Kconfig dependency on TEGRA20_APB_DMA
ia64: export memory_add_physaddr_to_nid to fix cxl build error
ARM: dts: kirkwood: lsxl: remove first ethernet port
ARM: dts: kirkwood: lsxl: fix serial line
ARM: dts: turris-omnia: Fix mpp26 pin name and comment
soc: qcom: smem_state: Add refcounting for the 'state->of_node'
soc: qcom: smsm: Fix refcount leak bugs in qcom_smsm_probe()
memory: of: Fix refcount leak bug in of_lpddr3_get_ddr_timings()
memory: of: Fix refcount leak bug in of_get_ddr_timings()
memory: pl353-smc: Fix refcount leak bug in pl353_smc_probe()
ALSA: hda/hdmi: Don't skip notification handling during PM operation
ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe
ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe
ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe
ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe
mmc: wmt-sdmmc: Fix an error handling path in wmt_mci_probe()
ALSA: dmaengine: increment buffer pointer atomically
ASoC: da7219: Fix an error handling path in da7219_register_dai_clks()
drm/msm/dp: correct 1.62G link rate at dp_catalog_ctrl_config_msa()
drm/msm/dpu: index dpu_kms->hw_vbif using vbif_idx
ASoC: eureka-tlv320: Hold reference returned from of_find_xxx API
mmc: au1xmmc: Fix an error handling path in au1xmmc_probe()
drm/omap: dss: Fix refcount leak bugs
ALSA: hda: beep: Simplify keep-power-at-enable behavior
ASoC: rsnd: Add check for rsnd_mod_power_on
drm/bridge: megachips: Fix a null pointer dereference bug
drm: fix drm_mipi_dbi build errors
platform/x86: msi-laptop: Fix resource cleanup
platform/x86: msi-laptop: Fix old-ec check for backlight registering
ASoC: tas2764: Fix mute/unmute
ASoC: tas2764: Drop conflicting set_bias_level power setting
ASoC: tas2764: Allow mono streams
platform/chrome: fix memory corruption in ioctl
platform/chrome: fix double-free in chromeos_laptop_prepare()
drm:pl111: Add of_node_put() when breaking out of for_each_available_child_of_node()
drm/dp_mst: fix drm_dp_dpcd_read return value checks
drm/bridge: parade-ps8640: Fix regulator supply order
drm/mipi-dsi: Detach devices when removing the host
drm/bridge: Avoid uninitialized variable warning
drm: bridge: adv7511: fix CEC power down control register offset
net: mvpp2: fix mvpp2 debugfs leak
once: add DO_ONCE_SLOW() for sleepable contexts
net/ieee802154: reject zero-sized raw_sendmsg()
bnx2x: fix potential memory leak in bnx2x_tpa_stop()
net: rds: don't hold sock lock when cancelling work from rds_tcp_reset_callbacks()
spi: Ensure that sg_table won't be used after being freed
tcp: fix tcp_cwnd_validate() to not forget is_cwnd_limited
sctp: handle the error returned from sctp_auth_asoc_init_active_key
mISDN: fix use-after-free bugs in l1oip timer handlers
vhost/vsock: Use kvmalloc/kvfree for larger packets.
wifi: rtl8xxxu: Fix AIFS written to REG_EDCA_*_PARAM
spi: s3c64xx: Fix large transfers with DMA
netfilter: nft_fib: Fix for rpath check with VRF devices
Bluetooth: hci_core: Fix not handling link timeouts propertly
i2c: mlxbf: support lock mechanism
spi/omap100k:Fix PM disable depth imbalance in omap1_spi100k_probe
spi: dw: Fix PM disable depth imbalance in dw_spi_bt1_probe
x86/cpu: Include the header of init_ia32_feat_ctl()'s prototype
x86/microcode/AMD: Track patch allocation size explicitly
wifi: ath11k: fix number of VHT beamformee spatial streams
Bluetooth: hci_{ldisc,serdev}: check percpu_init_rwsem() failure
bpf: Ensure correct locking around vulnerable function find_vpid()
net: fs_enet: Fix wrong check in do_pd_setup
wifi: rtl8xxxu: Remove copy-paste leftover in gen2_update_rate_mask
wifi: rtl8xxxu: gen2: Fix mistake in path B IQ calibration
bpf: btf: fix truncated last_member_type_id in btf_struct_resolve
spi: meson-spicc: do not rely on busy flag in pow2 clk ops
wifi: rtl8xxxu: Fix skb misuse in TX queue selection
spi: qup: add missing clk_disable_unprepare on error in spi_qup_pm_resume_runtime()
spi: qup: add missing clk_disable_unprepare on error in spi_qup_resume()
selftests/xsk: Avoid use-after-free on ctx
wifi: rtl8xxxu: tighten bounds checking in rtl8xxxu_read_efuse()
Bluetooth: btusb: mediatek: fix WMT failure during runtime suspend
Bluetooth: btusb: fix excessive stack usage
Bluetooth: btusb: Fine-tune mt7663 mechanism.
x86/resctrl: Fix to restore to original value when re-enabling hardware prefetch register
spi: mt7621: Fix an error message in mt7621_spi_probe()
bpftool: Fix a wrong type cast in btf_dumper_int
wifi: mac80211: allow bw change during channel switch in mesh
leds: lm3601x: Don't use mutex after it was destroyed
wifi: ath10k: add peer map clean up for peer delete in ath10k_sta_state()
nfsd: Fix a memory leak in an error handling path
objtool: Preserve special st_shndx indexes in elf_update_symbol
ARM: 9247/1: mm: set readonly for MT_MEMORY_RO with ARM_LPAE
ARM: 9244/1: dump: Fix wrong pg_level in walk_pmd()
MIPS: SGI-IP27: Fix platform-device leak in bridge_platform_create()
MIPS: SGI-IP27: Free some unused memory
sh: machvec: Use char[] for section boundaries
userfaultfd: open userfaultfds with O_RDONLY
selinux: use "grep -E" instead of "egrep"
smb3: must initialize two ACL struct fields to zero
drm/i915: Fix watermark calculations for gen12+ MC CCS modifier
drm/i915: Fix watermark calculations for gen12+ RC CCS modifier
drm/nouveau: fix a use-after-free in nouveau_gem_prime_import_sg_table()
drm/nouveau/kms/nv140-: Disable interlacing
staging: greybus: audio_helper: remove unused and wrong debugfs usage
KVM: VMX: Drop bits 31:16 when shoving exception error code into VMCS
KVM: nVMX: Unconditionally purge queued/injected events on nested "exit"
KVM: x86/emulator: Fix handing of POP SS to correctly set interruptibility
media: cedrus: Set the platform driver data earlier
efi: libstub: drop pointless get_memory_map() call
thunderbolt: Explicitly enable lane adapter hotplug events at startup
tracing: Disable interrupt or preemption before acquiring arch_spinlock_t
ring-buffer: Fix race between reset page and reading page
ring-buffer: Add ring_buffer_wake_waiters()
ring-buffer: Check pending waiters when doing wake ups as well
ring-buffer: Have the shortest_full queue be the shortest not longest
ring-buffer: Allow splice to read previous partially read pages
ftrace: Properly unset FTRACE_HASH_FL_MOD
livepatch: fix race between fork and KLP transition
ext4: update 'state->fc_regions_size' after successful memory allocation
ext4: fix potential memory leak in ext4_fc_record_regions()
ext4: fix potential memory leak in ext4_fc_record_modified_inode()
ext4: fix miss release buffer head in ext4_fc_write_inode
ext4: place buffer head allocation before handle start
ext4: ext4_read_bh_lock() should submit IO if the buffer isn't uptodate
ext4: don't increase iversion counter for ea_inodes
ext4: fix check for block being out of directory size
ext4: make ext4_lazyinit_thread freezable
ext4: fix null-ptr-deref in ext4_write_info
ext4: avoid crash when inline data creation follows DIO write
jbd2: add miss release buffer head in fc_do_one_pass()
jbd2: fix potential use-after-free in jbd2_fc_wait_bufs
jbd2: fix potential buffer head reference count leak
jbd2: wake up journal waiters in FIFO order, not LIFO
hardening: Remove Clang's enable flag for -ftrivial-auto-var-init=zero
hardening: Avoid harmless Clang option under CONFIG_INIT_STACK_ALL_ZERO
hardening: Clarify Kconfig text for auto-var-init
f2fs: fix to do sanity check on summary info
f2fs: fix to do sanity check on destination blkaddr during recovery
f2fs: increase the limit for reserve_root
btrfs: fix race between quota enable and quota rescan ioctl
fbdev: smscufx: Fix use-after-free in ufx_ops_open()
scsi: qedf: Populate sysfs attributes for vport
powerpc/boot: Explicitly disable usage of SPE instructions
powercap: intel_rapl: Use standard Energy Unit for SPR Dram RAPL domain
PCI: Sanitise firmware BAR assignments behind a PCI-PCI bridge
mm/mmap: undo ->mmap() when arch_validate_flags() fails
block: fix inflight statistics of part0
drm/udl: Restore display mode on resume
drm/virtio: Check whether transferred 2D BO is shmem
nvme-pci: set min_align_mask before calculating max_hw_sectors
UM: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK
riscv: Pass -mno-relax only on lld < 15.0.0
riscv: Make VM_WRITE imply VM_READ
riscv: Allow PROT_WRITE-only mmap()
parisc: fbdev/stifb: Align graphics memory size to 4MB
RISC-V: Make port I/O string accessors actually work
regulator: qcom_rpm: Fix circular deferral regression
hwmon: (gsc-hwmon) Call of_node_get() before of_find_xxx API
ASoC: wcd934x: fix order of Slimbus unprepare/disable
ASoC: wcd9335: fix order of Slimbus unprepare/disable
platform/chrome: cros_ec_proto: Update version on GET_NEXT_EVENT failure
quota: Check next/prev free block number after reading from quota file
HID: multitouch: Add memory barriers
fs: dlm: handle -EBUSY first in lock arg validation
fs: dlm: fix race between test_bit() and queue_work()
mmc: sdhci-sprd: Fix minimum clock limit
can: kvaser_usb_leaf: Fix CAN state after restart
can: kvaser_usb_leaf: Fix TX queue out of sync after restart
can: kvaser_usb_leaf: Fix overread with an invalid command
can: kvaser_usb: Fix use of uninitialized completion
usb: add quirks for Lenovo OneLink+ Dock
iio: pressure: dps310: Reset chip after timeout
iio: pressure: dps310: Refactor startup procedure
iio: adc: ad7923: fix channel readings for some variants
iio: ltc2497: Fix reading conversion results
iio: dac: ad5593r: Fix i2c read protocol requirements
cifs: Fix the error length of VALIDATE_NEGOTIATE_INFO message
cifs: destage dirty pages before re-reading them for cache=none
mtd: rawnand: atmel: Unmap streaming DMA mappings
ALSA: hda/realtek: Add Intel Reference SSID to support headset keys
ALSA: hda/realtek: Add quirk for ASUS GV601R laptop
ALSA: hda/realtek: Correct pin configs for ASUS G533Z
ALSA: hda/realtek: remove ALC289_FIXUP_DUAL_SPK for Dell 5530
ALSA: usb-audio: Fix NULL dererence at error path
ALSA: usb-audio: Fix potential memory leaks
ALSA: rawmidi: Drop register_mutex in snd_rawmidi_free()
ALSA: oss: Fix potential deadlock at unregistration
Conflicts:
drivers/hwtracing/coresight/coresight-cti-core.c
drivers/slimbus/stream.c
drivers/spmi/spmi-pmic-arb.c
Change-Id: I4edd41a5fa2e1fd39baa52869a2df9dd16b962bf
Signed-off-by: Srinivasarao Pathipati <quic_c_spathi@quicinc.com>
2106 lines
68 KiB
Makefile
2106 lines
68 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
VERSION = 5
|
|
PATCHLEVEL = 10
|
|
SUBLEVEL = 160
|
|
EXTRAVERSION =
|
|
NAME = Dare mighty things
|
|
|
|
# indicate that change "Kbuild: Support nested composite objects" is
|
|
# present in the kernel so that out-of-tree modules can act upon it
|
|
export KERNEL_SUPPORTS_NESTED_COMPOSITES := y
|
|
|
|
# *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
|
|
|
|
ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),)
|
|
quiet=silent_
|
|
endif
|
|
|
|
export quiet Q KBUILD_VERBOSE
|
|
|
|
# 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
|
|
|
|
abs_srctree := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
|
|
|
|
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
|
|
#
|
|
# This does not become effective immediately because MAKEFLAGS is re-parsed
|
|
# once after the Makefile is read. We need to invoke sub-make.
|
|
MAKEFLAGS += --include-dir=$(abs_srctree)
|
|
need-sub-make := 1
|
|
endif
|
|
|
|
this-makefile := $(lastword $(MAKEFILE_LIST))
|
|
|
|
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
|
|
|
|
# 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
|
|
|
|
# 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))
|
|
|
|
export KBUILD_CHECKSRC KBUILD_EXTMOD
|
|
|
|
extmod-prefix = $(if $(KBUILD_EXTMOD),$(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
|
|
|
|
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
|
|
old_version_h := include/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
|
|
no-sync-config-targets := $(no-dot-config-targets) %install kernelrelease \
|
|
image_name
|
|
single-targets := %.a %.i %.ko %.lds %.ll %.lst %.mod %.o %.s %.symtypes %/
|
|
|
|
config-build :=
|
|
mixed-build :=
|
|
need-config := 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-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 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 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 sh
|
|
ifeq ($(ARCH),sh64)
|
|
SRCARCH := sh
|
|
endif
|
|
|
|
KCONFIG_CONFIG ?= .config
|
|
export KCONFIG_CONFIG
|
|
|
|
# Default file for 'make defconfig'. This may be overridden by arch-Makefile.
|
|
export KBUILD_DEFCONFIG := defconfig
|
|
|
|
# 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),)
|
|
HOSTCC = clang
|
|
HOSTCXX = clang++
|
|
else
|
|
HOSTCC = gcc
|
|
HOSTCXX = g++
|
|
endif
|
|
|
|
KBUILD_USERHOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes \
|
|
-O2 -fomit-frame-pointer -std=gnu89
|
|
KBUILD_USERCFLAGS := $(KBUILD_USERHOSTCFLAGS) $(USERCFLAGS)
|
|
KBUILD_USERLDFLAGS := $(USERLDFLAGS)
|
|
|
|
KBUILD_HOSTCFLAGS := $(KBUILD_USERHOSTCFLAGS) $(HOST_LFS_CFLAGS) $(HOSTCFLAGS)
|
|
KBUILD_HOSTCXXFLAGS := -Wall -O2 $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS)
|
|
KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS) $(HOSTLDFLAGS)
|
|
KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) $(HOSTLDLIBS)
|
|
|
|
# Make variables (CC, etc...)
|
|
CPP = $(CC) -E
|
|
ifneq ($(LLVM),)
|
|
CC = clang
|
|
LD = ld.lld
|
|
AR = llvm-ar
|
|
NM = llvm-nm
|
|
OBJCOPY = llvm-objcopy
|
|
OBJDUMP = llvm-objdump
|
|
READELF = llvm-readelf
|
|
STRIP = llvm-strip
|
|
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
|
|
PAHOLE = pahole
|
|
RESOLVE_BTFIDS = $(objtree)/tools/bpf/resolve_btfids/resolve_btfids
|
|
LEX = flex
|
|
YACC = bison
|
|
AWK = awk
|
|
INSTALLKERNEL := installkernel
|
|
DEPMOD = depmod
|
|
PERL = perl
|
|
PYTHON = python
|
|
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 =
|
|
AFLAGS_MODULE =
|
|
LDFLAGS_MODULE =
|
|
CFLAGS_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/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=gnu89
|
|
KBUILD_CPPFLAGS := -D__KERNEL__
|
|
KBUILD_AFLAGS_KERNEL :=
|
|
KBUILD_CFLAGS_KERNEL :=
|
|
KBUILD_AFLAGS_MODULE := -DMODULE
|
|
KBUILD_CFLAGS_MODULE := -DMODULE
|
|
KBUILD_LDFLAGS_MODULE :=
|
|
KBUILD_LDFLAGS :=
|
|
CLANG_FLAGS :=
|
|
|
|
CC := scripts/basic/cc-wrapper $(CC)
|
|
|
|
export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC
|
|
export CPP AR NM STRIP OBJCOPY OBJDUMP READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL
|
|
export PERL PYTHON 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_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
|
|
export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
|
|
export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_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
|
|
$(Q)rm -f .tmp_quiet_recordmcount
|
|
|
|
PHONY += outputmakefile
|
|
# 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
|
|
outputmakefile:
|
|
ifdef building_out_of_srctree
|
|
$(Q)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
|
|
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
|
|
$(Q)test -e .gitignore || \
|
|
{ echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
|
|
endif
|
|
|
|
ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),)
|
|
ifneq ($(CROSS_COMPILE),)
|
|
CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%))
|
|
GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit))
|
|
CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE))
|
|
GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
|
|
endif
|
|
ifneq ($(GCC_TOOLCHAIN),)
|
|
CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN)
|
|
endif
|
|
ifneq ($(LLVM_IAS),1)
|
|
CLANG_FLAGS += -no-integrated-as
|
|
endif
|
|
CLANG_FLAGS += -Werror=unknown-warning-option
|
|
KBUILD_CFLAGS += $(CLANG_FLAGS)
|
|
KBUILD_AFLAGS += $(CLANG_FLAGS)
|
|
export CLANG_FLAGS
|
|
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 = $(shell $(CC) --version 2>/dev/null | head -n 1)
|
|
|
|
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 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
|
|
|
|
# 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 := init/ usr/
|
|
drivers-y := drivers/ sound/ techpack/
|
|
drivers-$(CONFIG_SAMPLES) += samples/
|
|
drivers-y += net/ virt/
|
|
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 \
|
|
$(call cc-option,-fno-tree-loop-im) \
|
|
$(call cc-disable-warning,maybe-uninitialized,)
|
|
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
|
|
|
|
ifdef CONFIG_CC_IS_GCC
|
|
RETPOLINE_CFLAGS := $(call cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register)
|
|
RETPOLINE_CFLAGS += $(call cc-option,-mindirect-branch-cs-prefix)
|
|
RETPOLINE_VDSO_CFLAGS := $(call cc-option,-mindirect-branch=thunk-inline -mindirect-branch-register)
|
|
endif
|
|
ifdef CONFIG_CC_IS_CLANG
|
|
RETPOLINE_CFLAGS := -mretpoline-external-thunk
|
|
RETPOLINE_VDSO_CFLAGS := -mretpoline
|
|
endif
|
|
|
|
ifdef CONFIG_RETHUNK
|
|
RETHUNK_CFLAGS := -mfunction-return=thunk-extern
|
|
RETPOLINE_CFLAGS += $(RETHUNK_CFLAGS)
|
|
endif
|
|
|
|
export RETPOLINE_CFLAGS
|
|
export RETPOLINE_VDSO_CFLAGS
|
|
|
|
include 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: $(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:
|
|
$(Q)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 += $(call cc-option,-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
|
|
else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3
|
|
KBUILD_CFLAGS += -O3
|
|
else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
|
KBUILD_CFLAGS += -Os
|
|
endif
|
|
|
|
# Tell gcc to never replace conditional load with a non-conditional one
|
|
KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0)
|
|
KBUILD_CFLAGS += $(call cc-option,-fno-allow-store-data-races)
|
|
|
|
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 += $(call cc-option,-fno-reorder-blocks,) \
|
|
$(call cc-option,-fno-ipa-cp-clone,) \
|
|
$(call cc-option,-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 += $(KBUILD_CFLAGS-y)
|
|
|
|
ifdef CONFIG_CC_IS_CLANG
|
|
KBUILD_CPPFLAGS += -Qunused-arguments
|
|
KBUILD_CFLAGS += -Wno-format-invalid-specifier
|
|
KBUILD_CFLAGS += -Wno-gnu
|
|
# CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the
|
|
# source of a reference will be _MergedGlobals and not on of the whitelisted names.
|
|
# See modpost pattern 2
|
|
KBUILD_CFLAGS += -mno-global-merge
|
|
else
|
|
|
|
# Warn about unmarked fall-throughs in switch statement.
|
|
# Disabled for clang while comment to attribute conversion happens and
|
|
# https://github.com/ClangBuiltLinux/linux/issues/636 is discussed.
|
|
KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough,)
|
|
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)
|
|
ifdef CONFIG_FRAME_POINTER
|
|
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
|
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.
|
|
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
|
|
|
|
DEBUG_CFLAGS :=
|
|
|
|
# Workaround for GCC versions < 5.0
|
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801
|
|
ifdef CONFIG_CC_IS_GCC
|
|
DEBUG_CFLAGS += $(call cc-ifversion, -lt, 0500, $(call cc-option, -fno-var-tracking-assignments))
|
|
endif
|
|
|
|
ifdef CONFIG_DEBUG_INFO
|
|
|
|
ifdef CONFIG_DEBUG_INFO_SPLIT
|
|
DEBUG_CFLAGS += -gsplit-dwarf
|
|
else
|
|
DEBUG_CFLAGS += -g
|
|
endif
|
|
|
|
ifeq ($(LLVM_IAS),1)
|
|
KBUILD_AFLAGS += -g
|
|
else
|
|
KBUILD_AFLAGS += -Wa,-gdwarf-2
|
|
endif
|
|
|
|
ifdef CONFIG_DEBUG_INFO_DWARF4
|
|
DEBUG_CFLAGS += -gdwarf-4
|
|
endif
|
|
|
|
ifdef CONFIG_DEBUG_INFO_REDUCED
|
|
DEBUG_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \
|
|
$(call cc-option,-fno-var-tracking)
|
|
endif
|
|
|
|
ifdef CONFIG_DEBUG_INFO_COMPRESSED
|
|
DEBUG_CFLAGS += -gz=zlib
|
|
KBUILD_AFLAGS += -gz=zlib
|
|
KBUILD_LDFLAGS += --compress-debug-sections=zlib
|
|
endif
|
|
|
|
endif # CONFIG_DEBUG_INFO
|
|
|
|
KBUILD_CFLAGS += $(DEBUG_CFLAGS)
|
|
export DEBUG_CFLAGS
|
|
|
|
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
|
|
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 += $(call cc-option, -fno-inline-functions-called-once)
|
|
endif
|
|
|
|
ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
|
|
KBUILD_CFLAGS_KERNEL += -ffunction-sections -fdata-sections
|
|
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)
|
|
# TODO(b/182572011): Revert 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
|
|
endif
|
|
|
|
ifdef CONFIG_LTO
|
|
KBUILD_CFLAGS += $(CC_FLAGS_LTO)
|
|
export CC_FLAGS_LTO
|
|
endif
|
|
|
|
ifdef CONFIG_CFI_CLANG
|
|
CC_FLAGS_CFI := -fsanitize=cfi \
|
|
-fsanitize-cfi-cross-dso \
|
|
-fno-sanitize-cfi-canonical-jump-tables \
|
|
-fno-sanitize-blacklist
|
|
|
|
ifdef CONFIG_CFI_PERMISSIVE
|
|
CC_FLAGS_CFI += -fsanitize-recover=cfi \
|
|
-fno-sanitize-trap=cfi
|
|
else
|
|
ifndef CONFIG_UBSAN_TRAP
|
|
CC_FLAGS_CFI += -ftrap-function=__ubsan_handle_cfi_check_fail_abort
|
|
endif
|
|
endif
|
|
|
|
# If LTO flags are filtered out, we must also filter out CFI.
|
|
CC_FLAGS_LTO += $(CC_FLAGS_CFI)
|
|
KBUILD_CFLAGS += $(CC_FLAGS_CFI)
|
|
export CC_FLAGS_CFI
|
|
endif
|
|
|
|
ifdef CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_32B
|
|
KBUILD_CFLAGS += -falign-functions=32
|
|
endif
|
|
|
|
# arch Makefile may override CC so keep this after arch Makefile is included
|
|
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
|
|
|
|
# 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
|
|
|
|
# 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, zero-length-bounds)
|
|
KBUILD_CFLAGS += $(call cc-disable-warning, array-bounds)
|
|
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
|
|
KBUILD_CFLAGS += $(call cc-disable-warning, maybe-uninitialized)
|
|
|
|
# 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
|
|
KBUILD_CFLAGS += $(call cc-option,-fconserve-stack)
|
|
|
|
# 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_KASAN) += scripts/Makefile.kasan
|
|
include-$(CONFIG_KCSAN) += scripts/Makefile.kcsan
|
|
include-$(CONFIG_UBSAN) += scripts/Makefile.ubsan
|
|
include-$(CONFIG_KCOV) += scripts/Makefile.kcov
|
|
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 and CFLAGS as the last assignments
|
|
KBUILD_CPPFLAGS += $(KCPPFLAGS)
|
|
KBUILD_AFLAGS += $(KAFLAGS)
|
|
KBUILD_CFLAGS += $(KCFLAGS)
|
|
|
|
KBUILD_LDFLAGS_MODULE += --build-id=sha1
|
|
LDFLAGS_vmlinux += --build-id=sha1
|
|
|
|
KBUILD_LDFLAGS += -z noexecstack
|
|
KBUILD_LDFLAGS += $(call ld-option,--no-warn-rwx-segments)
|
|
|
|
ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
|
|
LDFLAGS_vmlinux += $(call ld-option, -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
|
|
|
|
#
|
|
# INSTALL_MOD_STRIP, if defined, will cause modules to be
|
|
# stripped after they are installed. If INSTALL_MOD_STRIP is '1', then
|
|
# the default option --strip-debug will be used. Otherwise,
|
|
# INSTALL_MOD_STRIP value will be used as the options to the strip command.
|
|
|
|
ifdef INSTALL_MOD_STRIP
|
|
ifeq ($(INSTALL_MOD_STRIP),1)
|
|
mod_strip_cmd = $(STRIP) --strip-debug
|
|
else
|
|
mod_strip_cmd = $(STRIP) $(INSTALL_MOD_STRIP)
|
|
endif # INSTALL_MOD_STRIP=1
|
|
else
|
|
mod_strip_cmd = true
|
|
endif # INSTALL_MOD_STRIP
|
|
export mod_strip_cmd
|
|
|
|
# CONFIG_MODULE_COMPRESS, if defined, will cause module to be compressed
|
|
# after they are installed in agreement with CONFIG_MODULE_COMPRESS_GZIP
|
|
# or CONFIG_MODULE_COMPRESS_XZ.
|
|
|
|
mod_compress_cmd = true
|
|
ifdef CONFIG_MODULE_COMPRESS
|
|
ifdef CONFIG_MODULE_COMPRESS_GZIP
|
|
mod_compress_cmd = $(KGZIP) -n -f
|
|
endif # CONFIG_MODULE_COMPRESS_GZIP
|
|
ifdef CONFIG_MODULE_COMPRESS_XZ
|
|
mod_compress_cmd = $(XZ) -f
|
|
endif # CONFIG_MODULE_COMPRESS_XZ
|
|
endif # CONFIG_MODULE_COMPRESS
|
|
export mod_compress_cmd
|
|
|
|
ifdef CONFIG_MODULE_SIG_ALL
|
|
$(eval $(call config_filename,MODULE_SIG_KEY))
|
|
|
|
mod_sign_cmd = scripts/sign-file $(CONFIG_MODULE_SIG_HASH) $(MODULE_SIG_KEY_SRCPREFIX)$(CONFIG_MODULE_SIG_KEY) certs/signing_key.x509
|
|
else
|
|
mod_sign_cmd = true
|
|
endif
|
|
export mod_sign_cmd
|
|
|
|
HOST_LIBELF_LIBS = $(shell pkg-config libelf --libs 2>/dev/null || echo -lelf)
|
|
|
|
has_libelf := $(call try-run,\
|
|
echo "int main() {}" | \
|
|
$(HOSTCC) $(KBUILD_HOSTCFLAGS) -xc -o /dev/null $(KBUILD_HOSTLDFLAGS) $(HOST_LIBELF_LIBS) -,1,0)
|
|
|
|
ifdef CONFIG_STACK_VALIDATION
|
|
ifeq ($(has_libelf),1)
|
|
objtool_target := tools/objtool FORCE
|
|
else
|
|
SKIP_STACK_VALIDATION := 1
|
|
export SKIP_STACK_VALIDATION
|
|
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
|
|
|
|
ifdef CONFIG_BPF
|
|
ifdef CONFIG_DEBUG_INFO_BTF
|
|
ifeq ($(has_libelf),1)
|
|
resolve_btfids_target := tools/bpf/resolve_btfids FORCE
|
|
else
|
|
ERROR_RESOLVE_BTFIDS := 1
|
|
endif
|
|
endif # CONFIG_DEBUG_INFO_BTF
|
|
endif # CONFIG_BPF
|
|
|
|
PHONY += prepare0
|
|
|
|
export MODORDER := $(extmod-prefix)modules.order
|
|
export MODULES_NSDEPS := $(extmod-prefix)modules.nsdeps
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Kernel headers
|
|
|
|
PHONY += headers
|
|
|
|
techpack-dirs := $(shell find $(srctree)/techpack -maxdepth 1 -mindepth 1 -type d -not -name ".*")
|
|
techpack-dirs := $(subst $(srctree)/,,$(techpack-dirs))
|
|
|
|
#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 $(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/Kbuild),, \
|
|
$(error Headers not exportable for the $(SRCARCH) architecture))
|
|
endif
|
|
$(Q)$(MAKE) $(hdr-inst)=$(hdr-prefix)include/uapi
|
|
$(Q)$(MAKE) $(hdr-inst)=$(hdr-prefix)arch/$(SRCARCH)/include/uapi
|
|
$(Q)for d in $(techpack-dirs); do \
|
|
$(MAKE) $(hdr-inst)=$$d/include/uapi; \
|
|
done
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# 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),)
|
|
core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/ io_uring/
|
|
|
|
vmlinux-dirs := $(patsubst %/,%,$(filter %/, \
|
|
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
|
|
$(libs-y) $(libs-m)))
|
|
|
|
vmlinux-alldirs := $(sort $(vmlinux-dirs) Documentation \
|
|
$(patsubst %/,%,$(filter %/, $(core-) \
|
|
$(drivers-) $(libs-))))
|
|
|
|
build-dirs := $(vmlinux-dirs)
|
|
clean-dirs := $(vmlinux-alldirs)
|
|
|
|
subdir-modorder := $(addsuffix /modules.order, $(build-dirs))
|
|
|
|
# Externally visible symbols (used by link-vmlinux.sh)
|
|
KBUILD_VMLINUX_OBJS := $(head-y) $(patsubst %/,%/built-in.a, $(core-y))
|
|
KBUILD_VMLINUX_OBJS += $(addsuffix built-in.a, $(filter %/, $(libs-y)))
|
|
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
|
|
KBUILD_VMLINUX_OBJS += $(patsubst %/,%/built-in.a, $(drivers-y))
|
|
|
|
export KBUILD_VMLINUX_OBJS KBUILD_VMLINUX_LIBS
|
|
export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds
|
|
# used by scripts/Makefile.package
|
|
export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) LICENSES arch include scripts tools)
|
|
|
|
vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)
|
|
|
|
# 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: descend 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)
|
|
|
|
ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink)
|
|
|
|
# Final link of vmlinux with optional arch pass after final link
|
|
cmd_link-vmlinux = \
|
|
$(CONFIG_SHELL) $< "$(LD)" "$(KBUILD_LDFLAGS)" "$(LDFLAGS_vmlinux)"; \
|
|
$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
|
|
|
|
ifndef KBUILD_MIXED_TREE
|
|
vmlinux: scripts/link-vmlinux.sh autoksyms_recursive $(vmlinux-deps) FORCE
|
|
+$(call if_changed,link-vmlinux)
|
|
endif
|
|
|
|
targets := vmlinux
|
|
|
|
# The actual objects are generated when descending,
|
|
# make sure no implicit rule kicks in
|
|
$(sort $(vmlinux-deps) $(subdir-modorder)): descend ;
|
|
|
|
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/autoconf.h
|
|
|
|
prepare0: archprepare
|
|
$(Q)$(MAKE) $(build)=scripts/mod
|
|
$(Q)$(MAKE) $(build)=.
|
|
|
|
# All the preparing..
|
|
prepare: prepare0 prepare-objtool prepare-resolve_btfids
|
|
|
|
# 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
|
|
|
|
PHONY += prepare-objtool prepare-resolve_btfids
|
|
prepare-objtool: $(objtool_target)
|
|
ifeq ($(SKIP_STACK_VALIDATION),1)
|
|
ifdef CONFIG_FTRACE_MCOUNT_USE_OBJTOOL
|
|
@echo "error: Cannot generate __mcount_loc for CONFIG_DYNAMIC_FTRACE=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2
|
|
@false
|
|
endif
|
|
ifdef CONFIG_UNWINDER_ORC
|
|
@echo "error: Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2
|
|
@false
|
|
else
|
|
@echo "warning: Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2
|
|
endif
|
|
endif
|
|
|
|
prepare-resolve_btfids: $(resolve_btfids_target)
|
|
ifeq ($(ERROR_RESOLVE_BTFIDS),1)
|
|
@echo "error: Cannot resolve BTF IDs for CONFIG_DEBUG_INFO_BTF, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2
|
|
@false
|
|
endif
|
|
# 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
|
|
ifneq (,$(BUILD_NUMBER))
|
|
UTS_RELEASE=$(KERNELRELEASE)-ab$(BUILD_NUMBER)
|
|
else
|
|
UTS_RELEASE=$(KERNELRELEASE)
|
|
endif
|
|
define filechk_utsrelease.h
|
|
if [ `echo -n "$(UTS_RELEASE)" | wc -c ` -gt $(uts_len) ]; then \
|
|
echo '"$(UTS_RELEASE)" exceeds $(uts_len) characters' >&2; \
|
|
exit 1; \
|
|
fi; \
|
|
echo \#define UTS_RELEASE \"$(UTS_RELEASE)\"
|
|
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)))'
|
|
endef
|
|
|
|
$(version_h): PATCHLEVEL := $(if $(PATCHLEVEL), $(PATCHLEVEL), 0)
|
|
$(version_h): SUBLEVEL := $(if $(SUBLEVEL), $(SUBLEVEL), 0)
|
|
$(version_h): FORCE
|
|
$(call filechk,version.h)
|
|
$(Q)rm -f $(old_version_h)
|
|
|
|
include/generated/utsrelease.h: include/config/kernel.release FORCE
|
|
$(call filechk,utsrelease.h)
|
|
|
|
PHONY += headerdep
|
|
headerdep:
|
|
$(Q)find $(srctree)/include/ -name '*.h' | xargs --max-args 1 \
|
|
$(srctree)/scripts/headerdep.pl -I$(srctree)/include
|
|
|
|
# Deprecated. It is no-op now.
|
|
PHONY += headers_check
|
|
headers_check:
|
|
@:
|
|
$(Q)for d in $(techpack-dirs); do \
|
|
$(MAKE) $(hdr-inst)=$$d/include/uapi HDRCHECK=1; \
|
|
done
|
|
|
|
ifdef CONFIG_HEADERS_INSTALL
|
|
prepare: headers
|
|
endif
|
|
|
|
PHONY += scripts_unifdef
|
|
scripts_unifdef: scripts_basic
|
|
$(Q)$(MAKE) $(build)=scripts scripts/unifdef
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Kernel selftest
|
|
|
|
PHONY += kselftest
|
|
kselftest:
|
|
$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests
|
|
|
|
kselftest-%: 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
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# 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
|
|
#
|
|
# A module can be listed more than once in obj-m resulting in
|
|
# duplicate lines in modules.order files. Those are removed
|
|
# using awk while concatenating to the final file.
|
|
|
|
PHONY += modules
|
|
# if KBUILD_BUILTIN && !KBUILD_MIXED_TREE, depend on vmlinux
|
|
modules: $(if $(KBUILD_BUILTIN), $(if $(KBUILD_MIXED_TREE),,vmlinux))
|
|
modules: modules_check modules_prepare
|
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
|
|
|
PHONY += modules_check
|
|
modules_check: modules.order
|
|
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/modules-check.sh $<
|
|
|
|
cmd_modules_order = $(AWK) '!x[$$0]++' $(real-prereqs) > $@
|
|
|
|
modules.order: $(subdir-modorder) FORCE
|
|
$(call if_changed,modules_order)
|
|
|
|
targets += modules.order
|
|
|
|
# Target to prepare building external modules
|
|
PHONY += modules_prepare
|
|
modules_prepare: prepare
|
|
$(Q)$(MAKE) $(build)=scripts scripts/module.lds
|
|
|
|
# Target to install modules
|
|
PHONY += modules_install
|
|
modules_install: _modinst_ _modinst_post
|
|
|
|
PHONY += _modinst_
|
|
_modinst_:
|
|
@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)/
|
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
|
|
|
|
# This depmod is only for convenience to give the initial
|
|
# boot a modules.dep even before / is mounted read-write. However the
|
|
# boot script depmod is the master version.
|
|
PHONY += _modinst_post
|
|
_modinst_post: _modinst_
|
|
$(call cmd,depmod)
|
|
|
|
ifeq ($(CONFIG_MODULE_SIG), y)
|
|
PHONY += modules_sign
|
|
modules_sign:
|
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modsign
|
|
endif
|
|
|
|
else # CONFIG_MODULES
|
|
|
|
# Modules not configured
|
|
# ---------------------------------------------------------------------------
|
|
|
|
PHONY += modules modules_install
|
|
modules modules_install:
|
|
@echo >&2
|
|
@echo >&2 "The present kernel configuration has modules disabled."
|
|
@echo >&2 "Type 'make config' and enable loadable module support."
|
|
@echo >&2 "Then build a kernel with module support enabled."
|
|
@echo >&2
|
|
@exit 1
|
|
|
|
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
|
|
|
|
# Directories & files removed with 'make mrproper'
|
|
MRPROPER_FILES += include/config include/generated \
|
|
arch/$(SRCARCH)/include/generated .tmp_objdiff \
|
|
debian snap tar-install \
|
|
.config .config.old .version \
|
|
Module.symvers \
|
|
signing_key.pem signing_key.priv signing_key.x509 \
|
|
x509.genkey extra_certificates signing_key.x509.keyid \
|
|
signing_key.x509.signer vmlinux-gdb.py \
|
|
*.spec
|
|
|
|
# Directories & files removed with 'make distclean'
|
|
DISTCLEAN_FILES += tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
|
|
|
|
# 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)
|
|
|
|
# distclean
|
|
#
|
|
distclean: rm-files := $(wildcard $(DISTCLEAN_FILES))
|
|
|
|
PHONY += distclean
|
|
|
|
distclean: mrproper
|
|
$(call cmd,rmfiles)
|
|
@find $(srctree) $(RCS_FIND_IGNORE) \
|
|
\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
|
|
-o -name '*.bak' -o -name '#*#' -o -name '*%' \
|
|
-o -name 'core' \) \
|
|
-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 ''
|
|
@$(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)):'
|
|
@$(if $(archhelp),$(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 ' 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 $@
|
|
|
|
# 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.
|
|
#
|
|
# The following are the only valid targets when building external
|
|
# modules.
|
|
# make M=dir clean Delete all automatically generated files
|
|
# make M=dir modules Make all modules in specified dir
|
|
# make M=dir Same as 'make M=dir modules'
|
|
# make M=dir modules_install
|
|
# Install the modules built in the module directory
|
|
# Assumes install directory is already created
|
|
|
|
# We are always building only modules.
|
|
KBUILD_BUILTIN :=
|
|
KBUILD_MODULES := 1
|
|
|
|
build-dirs := $(KBUILD_EXTMOD)
|
|
PHONY += modules
|
|
modules: $(MODORDER)
|
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
|
|
|
$(MODORDER): descend
|
|
@:
|
|
|
|
PHONY += modules_install
|
|
modules_install: _emodinst_ _emodinst_post
|
|
|
|
install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra)
|
|
PHONY += _emodinst_
|
|
_emodinst_:
|
|
$(Q)mkdir -p $(MODLIB)/$(install-dir)
|
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
|
|
|
|
PHONY += _emodinst_post
|
|
_emodinst_post: _emodinst_
|
|
$(call cmd,depmod)
|
|
|
|
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 += 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 ''
|
|
|
|
# no-op for external module builds
|
|
PHONY += prepare modules_prepare
|
|
|
|
endif # KBUILD_EXTMOD
|
|
|
|
# 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 := $(sort $(patsubst %.ko,%.mod, $(MAKECMDGOALS)))
|
|
|
|
$(single-ko): single_modpost
|
|
@:
|
|
$(single-no-ko): descend
|
|
@:
|
|
|
|
ifeq ($(KBUILD_EXTMOD),)
|
|
# For the single build of in-tree modules, use a temporary file to avoid
|
|
# the situation of modules_install installing an invalid modules.order.
|
|
MODORDER := .modules.tmp
|
|
endif
|
|
|
|
PHONY += single_modpost
|
|
single_modpost: $(single-no-ko) modules_prepare
|
|
$(Q){ $(foreach m, $(single-ko), echo $(extmod-prefix)$m;) } > $(MODORDER)
|
|
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
|
|
|
KBUILD_MODULES := 1
|
|
|
|
export KBUILD_SINGLE_TARGETS := $(addprefix $(extmod-prefix), $(single-no-ko))
|
|
|
|
# trim unrelated directories
|
|
build-dirs := $(foreach d, $(build-dirs), \
|
|
$(if $(filter $(d)/%, $(KBUILD_SINGLE_TARGETS)), $(d)))
|
|
|
|
endif
|
|
|
|
ifndef CONFIG_MODULES
|
|
KBUILD_MODULES :=
|
|
endif
|
|
|
|
# Handle descending into subdirectories listed in $(build-dirs)
|
|
# 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 += descend $(build-dirs)
|
|
descend: $(build-dirs)
|
|
$(build-dirs): prepare
|
|
$(Q)$(MAKE) $(build)=$@ \
|
|
single-build=$(if $(filter-out $@/, $(filter $@/%, $(KBUILD_SINGLE_TARGETS))),1) \
|
|
$(if $(KBUILD_MIXED_TREE),,need-builtin=1) need-modorder=1
|
|
|
|
clean-dirs := $(addprefix _clean_, $(clean-dirs))
|
|
PHONY += $(clean-dirs) clean
|
|
$(clean-dirs):
|
|
$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
|
|
|
|
clean: $(clean-dirs)
|
|
$(call cmd,rmfiles)
|
|
@find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
|
|
\( -name '*.[aios]' -o -name '*.ko' -o -name '.*.cmd' \
|
|
-o -name '*.ko.*' \
|
|
-o -name '*.dtb' -o -name '*.dtb.S' -o -name '*.dt.yaml' \
|
|
-o -name '*.dwo' -o -name '*.lst' \
|
|
-o -name '*.su' -o -name '*.mod' \
|
|
-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.*' \
|
|
-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_VMLINUX_OBJS) $(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)
|
|
|
|
# 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/ $*
|
|
|
|
quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)))
|
|
cmd_rmfiles = rm -rf $(rm-files)
|
|
|
|
# Run depmod only if we have System.map and depmod is executable
|
|
quiet_cmd_depmod = DEPMOD $(KERNELRELEASE)
|
|
cmd_depmod = $(CONFIG_SHELL) $(srctree)/scripts/depmod.sh $(DEPMOD) \
|
|
$(KERNELRELEASE) $(mixed-build-prefix)
|
|
|
|
# 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)
|