android_kernel_xiaomi_sm8350/scripts/gen_autoksyms.sh

83 lines
2.1 KiB
Bash
Raw Normal View History

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-only
# Create an autoksyms.h header file from the list of all module's needed symbols
# as recorded on the second line of *.mod files and the user-provided symbol
# whitelist.
set -e
output_file="$1"
# Use "make V=1" to debug this script.
case "$KBUILD_VERBOSE" in
*1*)
set -x
;;
esac
# We need access to CONFIG_ symbols
. include/config/auto.conf
ksym_wl=/dev/null
if [ -n "$CONFIG_UNUSED_KSYMS_WHITELIST" ]; then
for UNUSED_KSYMS_WHITELIST_FILE in $CONFIG_UNUSED_KSYMS_WHITELIST; do
# Use 'eval' to expand the whitelist path and
# check if it is relative
eval ksym_wl="$UNUSED_KSYMS_WHITELIST_FILE"
[ "${ksym_wl}" != "${ksym_wl#/}" ] ||
ksym_wl="$abs_srctree/$ksym_wl"
Merge android-5.4.26 (0d3cca0c) into msm-5.4 * refs/heads/tmp-0d3cca0c: UPSTREAM: driver core: Skip unnecessary work when device doesn't have sync_state() Linux 5.4.26 net/smc: cancel event worker during device removal net/smc: check for valid ib_client_data ipv6: restrict IPV6_ADDRFORM operation iommu/amd: Fix IOMMU AVIC not properly update the is_run bit in IRTE i2c: acpi: put device when verifying client fails iommu/vt-d: Ignore devices with out-of-spec domain number iommu/vt-d: Fix the wrong printing in RHSA parsing netfilter: nft_chain_nat: inet family is missing module ownership netfilter: nf_tables: dump NFTA_CHAIN_FLAGS attribute netfilter: nft_tunnel: add missing attribute validation for tunnels netfilter: nft_payload: add missing attribute validation for payload csum flags netfilter: cthelper: add missing attribute validation for cthelper perf bench futex-wake: Restore thread count default to online CPU count nl80211: add missing attribute validation for channel switch nl80211: add missing attribute validation for beacon report scanning nl80211: add missing attribute validation for critical protocol indication i2c: gpio: suppress error on probe defer iommu/vt-d: Fix RCU-list bugs in intel_iommu_init() driver code: clarify and fix platform device DMA mask allocation drm/i915/gvt: Fix unnecessary schedule timer when no vGPU exits pinctrl: core: Remove extra kref_get which blocks hogs being freed drm/i915/gvt: Fix dma-buf display blur issue on CFL virtio_ring: Fix mem leak with vring_new_virtqueue() pinctrl: imx: scu: Align imx sc msg structs to 4 pinctrl: meson-gxl: fix GPIOX sdio pins clk: imx8mn: Fix incorrect clock defines batman-adv: Don't schedule OGM for disabled interface iommu/vt-d: Fix a bug in intel_iommu_iova_to_phys() for huge page iommu/vt-d: Fix RCU list debugging warnings iommu/vt-d: dmar: replace WARN_TAINT with pr_warn + add_taint iommu/dma: Fix MSI reservation allocation x86/mce: Fix logic and comments around MSR_PPIN_CTL perf/amd/uncore: Replace manual sampling check with CAP_NO_INTERRUPT flag mt76: fix array overflow on receiving too many fragments for a packet i2c: designware-pci: Fix BUG_ON during device removal efi: Add a sanity check to efivar_store_raw() efi: Fix a race and a buffer overflow while reading efivars via sysfs x86/ioremap: Map EFI runtime services data as encrypted for SEV macintosh: windfarm: fix MODINFO regression fscrypt: don't evict dirty inodes after removing key blk-iocost: fix incorrect vtime comparison in iocg_is_idle() ipmi_si: Avoid spurious errors for optional IRQs s390/dasd: fix data corruption for thin provisioned devices fuse: fix stack use after return ARC: define __ALIGN_STR and __ALIGN symbols for ARC KVM: nVMX: avoid NULL pointer dereference with incorrect EVMCS GPAs KVM: x86: clear stale x86_emulate_ctxt->intercept value gfs2_atomic_open(): fix O_EXCL|O_CREAT handling on cold dcache cifs_atomic_open(): fix double-put on late allocation failure ktest: Add timeout for ssh sync testing pinctrl: falcon: fix syntax error mmc: sdhci-pci-gli: Enable MSI interrupt for GL975x drm/i915: Defer semaphore priority bumping to a workqueue drm/i915: be more solid in checking the alignment drm/amd/display: remove duplicated assignment to grph_obj_type workqueue: don't use wq_select_unbound_cpu() for bound works netfilter: x_tables: xt_mttg_seq_next should increase position index netfilter: xt_recent: recent_seq_next should increase position index netfilter: synproxy: synproxy_cpu_seq_next should increase position index netfilter: nf_conntrack: ct_cpu_seq_next should increase position index iommu/vt-d: quirk_ioat_snb_local_iommu: replace WARN_TAINT with pr_warn + add_taint virtio-blk: fix hw_queue stopped on arbitrary error iwlwifi: mvm: Do not require PHY_SKU NVM section for 3168 devices netfilter: nf_tables: fix infinite loop when expr is not available cgroup: Iterate tasks that did not finish do_exit() cgroup: cgroup_procs_next should increase position index net: phy: Avoid multiple suspends net: dsa: Don't instantiate phylink for CPU/DSA ports unless needed selftests/net/fib_tests: update addr_metric_test for peer route testing net/ipv6: remove the old peer route if change it to a new one net/ipv6: need update peer route when modify metric net: phy: fix MDIO bus PM PHY resuming net: phy: avoid clearing PHY interrupts twice in irq handler nfc: add missing attribute validation for vendor subcommand nfc: add missing attribute validation for deactivate target nfc: add missing attribute validation for SE API tipc: add missing attribute validation for MTU property team: add missing attribute validation for array index team: add missing attribute validation for port ifindex net: taprio: add missing attribute validation for txtime delay net: fq: add missing attribute validation for orphan mask macsec: add missing attribute validation for port can: add missing attribute validation for termination nl802154: add missing attribute validation for dev_type nl802154: add missing attribute validation fib: add missing attribute validation for tun_id devlink: validate length of region addr/len devlink: validate length of param values net: memcg: fix lockdep splat in inet_csk_accept() net: memcg: late association of sock to memcg cgroup: memcg: net: do not associate sock with unrelated cgroup bnxt_en: fix error handling when flashing from file bnxt_en: reinitialize IRQs when MTU is modified bonding/alb: make sure arp header is pulled before accessing it taprio: Fix sending packets without dequeueing them slip: make slhc_compress() more robust against malicious packets sfc: detach from cb_page in efx_copy_channel() r8152: check disconnect status after long sleep net: systemport: fix index check to avoid an array out of bounds access net: stmmac: dwmac1000: Disable ACS if enhanced descs are not used net: phy: bcm63xx: fix OOPS due to missing driver name net/packet: tpacket_rcv: do not increment ring index on drop net: nfc: fix bounds checking bugs on "pipe" net: macsec: update SCI upon MAC address change. netlink: Use netlink header as base to calculate bad attribute offset net/ipv6: use configured metric when add peer route net: hns3: fix a not link up issue when fibre port supports autoneg net: fec: validate the new settings in fec_enet_set_coalesce() net: dsa: mv88e6xxx: fix lockup on warm boot net: dsa: fix phylink_start()/phylink_stop() calls macvlan: add cond_resched() during multicast processing ipvlan: don't deref eth hdr before checking it's set ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast() ipvlan: do not add hardware address of master to its unicast filter list ipvlan: add cond_resched_rcu() while processing muticast backlog ipv6/addrconf: call ipv6_mc_up() for non-Ethernet interface inet_diag: return classid for all socket types gre: fix uninit-value in __iptunnel_pull_header cgroup, netclassid: periodically release file_lock on classid updating ALSA: hda/realtek - Fixed one of HP ALC671 platform Headset Mic supported ALSA: hda/realtek - Add Headset Mic supported for HP cPC ALSA: hda/realtek - More constifications virtio_balloon: Adjust label in virtballoon_probe ANDROID: GKI: Revert "mm: unexport free_reserved_area" ANDROID: Export functions to be used with dma_map_ops in modules ANDROID: GKI: add android_kabi.h ANDROID: GKI: update abi due to CONFIG_JUMP_LABEL being enabled ANDROID: GKI: enable CONFIG_JUMP_LABEL ANDROID: Add build.config.gki-debug.x86_64 ANDROID: update the abi signatures ANDROID: Add build.config.gki-debug.aarch64 Revert "ANDROID: drm: edid: add support for additional CEA extension blocks" Revert "ANDROID: drm: Parse Colorimetry data block from EDID" ANDROID: Add build.config files for ARM 32-bit ANDROID: Kconfig.gki: Add FRAME_VECTOR UPSTREAM: cgroup: Iterate tasks that did not finish do_exit() ANDROID: gki_defconfig: Enable more USB_CONFIGFS gadgets Revert "ANDROID: tty: serdev: Fix broken serial console input" ANDROID: serdev: restrict claim of platform devices ANDROID: Add TPM support and the vTPM proxy to Cuttlefish. FROMGIT: ASoC: sprd: Allow the MCDT driver to build into modules FROMGIT: thermal: sprd: Add Spreadtrum thermal driver support FROMGIT: dt-bindings: thermal: sprd: Add the Spreadtrum thermal documentation ANDROID: ABI update due to power supply patches being merged FROMGIT: pinctrl: sprd: Fix the kconfig warning FROMGIT: pinctrl: sprd: Allow the SPRD pinctrl driver building into a module FROMGIT: pinctrl: Export some needed symbols at module load time FROMGIT: power: reset: sc27xx: Allow the SC27XX poweroff driver building into a module FROMGIT: power: reset: sc27xx: Change to use cpu_down() FROMGIT: power: reset: sc27xx: Power off the external subsystems' connection FROMGIT: power: supply: sc27xx: Add POWER_SUPPLY_PROP_CHARGE_NOW attribute UPSTREAM: power: supply: sc27xx: Calibrate the resistance of coulomb counter UPSTREAM: dt-bindings: power: sc27xx: Add a new property to describe the real resistance of coulomb counter chip UPSTREAM: power: supply: sc27xx: Optimize the battery resistance with measuring temperature UPSTREAM: power: supply: core: Add battery internal resistance temperature table support UPSTREAM: dt-bindings: power: Introduce one property to describe the battery resistance with temperature changes ANDROID: abi_gki_aarch64_whitelist: update after whitelist changes ANDROID: update abi_gki_aarch64_cuttlefish_whitelist ANDROID: update abi_gki_aarch64_db845c_whitelist ANDROID: update abi due to interconnect changes UPSTREAM: interconnect: Handle memory allocation errors UPSTREAM: interconnect: Add basic tracepoints UPSTREAM: interconnect: Add a name to struct icc_path UPSTREAM: interconnect: Move internal structs into a separate file Linux 5.4.25 drm/virtio: module_param_named() requires linux/moduleparam.h csky: Implement copy_thread_tls block, bfq: remove ifdefs from around gets/puts of bfq groups block, bfq: get a ref to a group when adding it to a service tree efi: READ_ONCE rng seed size before munmap efi/x86: Handle by-ref arguments covering multiple pages in mixed mode efi/x86: Align GUIDs to their size in the mixed mode runtime wrapper powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems EDAC/synopsys: Do not print an error with back-to-back snprintf() calls bus: ti-sysc: Fix 1-wire reset quirk arm64: dts: meson: fix gxm-khadas-vim2 wifi dmaengine: coh901318: Fix a double lock bug in dma_tc_handle() dma-buf: free dmabuf->name in dma_buf_release() hwmon: (adt7462) Fix an error return in ADT7462_REG_VOLT() ARM: dts: imx7-colibri: Fix frequency for sd/mmc ARM: dts: dra7xx-clocks: Fixup IPU1 mux clock parent source ARM: dts: am437x-idk-evm: Fix incorrect OPP node names ARM: imx: build v7_cpu_resume() unconditionally IB/hfi1, qib: Ensure RCU is locked when accessing list RMDA/cm: Fix missing ib_cm_destroy_id() in ib_cm_insert_listen() regulator: stm32-vrefbuf: fix a possible overshoot when re-enabling RDMA/core: Fix protection fault in ib_mr_pool_destroy RDMA/iwcm: Fix iwcm work deallocation RDMA/siw: Fix failure handling during device creation RDMA/nldev: Fix crash when set a QP to a new counter but QPN is missing RDMA/rw: Fix error flow during RDMA context initialization Revert "RDMA/cma: Simplify rdma_resolve_addr() error flow" soc: imx-scu: Align imx sc msg structs to 4 firmware: imx: Align imx_sc_msg_req_cpu_start to 4 firmware: imx: scu-pd: Align imx sc msg structs to 4 firmware: imx: misc: Align imx sc msg structs to 4 arm64: dts: imx8qxp-mek: Remove unexisting Ethernet PHY ARM: dts: imx6: phycore-som: fix emmc supply phy: mapphone-mdm6600: Fix write timeouts with shorter GPIO toggle interval phy: mapphone-mdm6600: Fix timeouts by adding wake-up handling drm/i915/selftests: Fix return in assert_mmap_offset() drm/i915: Program MBUS with rmw during initialization drm/sun4i: de2/de3: Remove unsupported VI layer formats drm/sun4i: Fix DE2 VI layer format support drm/sun4i: Add separate DE3 VI layer formats drm: kirin: Revert "Fix for hikey620 display offset problem" drm/panfrost: Don't try to map on error faults spi: atmel-quadspi: fix possible MMIO window size overrun ASoC: dapm: Correct DAPM handling of active widgets during shutdown ASoC: Intel: Skylake: Fix available clock counter incrementation ASoC: pcm512x: Fix unbalanced regulator enable call in probe error path ASoC: pcm: Fix possible buffer overflow in dpcm state sysfs output powerpc/mm: Fix missing KUAP disable in flush_coherent_icache() powerpc: Convert flush_icache_range & friends to C powerpc: define helpers to get L1 icache sizes ASoC: intel: skl: Fix possible buffer overflow in debug outputs ASoC: intel: skl: Fix pin debug prints ASoC: SOF: Fix snd_sof_ipc_stream_posn() ASoC: topology: Fix memleak in soc_tplg_manifest_load() ASoC: topology: Fix memleak in soc_tplg_link_elems_load() drm/virtio: fix resource id creation race drm/virtio: make resource id workaround runtime switchable. spi: bcm63xx-hsspi: Really keep pll clk enabled ARM: dts: ls1021a: Restore MDIO compatible to gianfar arm64: dts: meson-sm1-sei610: add missing interrupt-names dm: fix congested_fn for request-based device dm zoned: Fix reference counter initial value of chunk works dm writecache: verify watermark during resume dm: report suspended device during destroy dm cache: fix a crash due to incorrect work item cancelling dm integrity: fix invalid table returned due to argument count mismatch dm integrity: fix a deadlock due to offloading to an incorrect workqueue dm integrity: fix recalculation when moving from journal mode to bitmap mode dmaengine: tegra-apb: Prevent race conditions of tasklet vs free list dmaengine: tegra-apb: Fix use-after-free dmaengine: imx-sdma: Fix the event id check to include RX event for UART6 dmaengine: imx-sdma: fix context cache s390/mm: fix panic in gup_fast on large pud s390/pci: Fix unexpected write combine on resource x86/pkeys: Manually set X86_FEATURE_OSPKE to preserve existing changes spi: spidev: Fix CS polarity if GPIO descriptors are used perf arm-spe: Fix endless record after being terminated perf cs-etm: Fix endless record after being terminated perf intel-bts: Fix endless record after being terminated perf intel-pt: Fix endless record after being terminated media: v4l2-mem2mem.c: fix broken links media: vicodec: process all 4 components for RGB32 formats media: mc-entity.c: use & to check pad flags, not == media: hantro: Fix broken media controller links vt: selection, push sel_lock up vt: selection, push console lock down vt: selection, close sel_buffer race serial: 8250_exar: add support for ACCES cards tty: serial: fsl_lpuart: free IDs allocated by IDA tty:serial:mvebu-uart:fix a wrong return arm: dts: dra76x: Fix mmc3 max-frequency arm64: dts: socfpga: agilex: Fix gmac compatible btrfs: fix RAID direct I/O reads with alternate csums fat: fix uninit-memory access for partial initialized inode mm, hotplug: fix page online with DEBUG_PAGEALLOC compiled but not enabled mm: fix possible PMD dirty bit lost in set_pmd_migration_entry() mm, numa: fix bad pmd by atomically check for pmd_trans_huge when marking page tables prot_numa vgacon: Fix a UAF in vgacon_invert_region usb: core: port: do error out if usb_autopm_get_interface() fails usb: core: hub: do error out if usb_autopm_get_interface() fails usb: core: hub: fix unhandled return by employing a void function usb: cdns3: gadget: toggle cycle bit before reset endpoint usb: cdns3: gadget: link trb should point to next request usb: dwc3: gadget: Update chain bit correctly when using sg list usb: quirks: add NO_LPM quirk for Logitech Screen Share usb: storage: Add quirk for Samsung Fit flash cifs: fix rename() by ensuring source handle opened with DELETE bit cifs: don't leak -EAGAIN for stat() during reconnect ALSA: hda/realtek - Enable the headset of ASUS B9450FA with ALC294 ALSA: hda/realtek - Fix silent output on Gigabyte X570 Aorus Master ALSA: hda/realtek - Add Headset Button supported for ThinkPad X1 ALSA: hda/realtek - Add Headset Mic supported binder: prevent UAF for binderfs devices II binder: prevent UAF for binderfs devices firmware: imx: scu: Ensure sequential TX selftests: forwarding: vxlan_bridge_1d: use more proper tos value arch/csky: fix some Kconfig typos csky: Fixup compile warning for three unimplemented syscalls csky: Fixup ftrace modify panic csky/smp: Fixup boot failed when CONFIG_SMP csky: Set regs->usp to kernel sp, when the exception is from kernel csky/mm: Fixup export invalid_pte_table symbol net: thunderx: workaround BGX TX Underflow issue x86/xen: Distribute switch variables for initialization ice: Don't tell the OS that link is going down nvme: Fix uninitialized-variable warning s390/qdio: fill SL with absolute addresses x86/boot/compressed: Don't declare __force_order in kaslr_64.c nvme-pci: Use single IRQ vector for old Apple models nvme/pci: Add sleep quirk for Samsung and Toshiba drives iommu/amd: Disable IOMMU on Stoney Ridge systems net/mlx5: DR, Fix matching on vport gvmi efi: Only print errors about failing to get certs if EFI vars are found s390: make 'install' not depend on vmlinux s390/cio: cio_ignore_proc_seq_next should increase position index watchdog: da9062: do not ping the hw during stop() net: ethernet: dm9000: Handle -EPROBE_DEFER in dm9000_parse_dt() net: ks8851-ml: Fix 16-bit IO operation net: ks8851-ml: Fix 16-bit data access net: ks8851-ml: Remove 8-bit bus accessors net: atlantic: check rpc result and wait for rpc address selftests: forwarding: vxlan_bridge_1d: fix tos value selftests: forwarding: use proto icmp for {gretap, ip6gretap}_mac testing drm/msm/dsi/pll: call vco set rate explicitly drm/msm/dsi: save pll state before dsi host is powered off scsi: megaraid_sas: silence a warning drm/modes: Allow DRM_MODE_ROTATE_0 when applying video mode parameters drm/modes: Make sure to parse valid rotation value from cmdline drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI drm/msm/mdp5: rate limit pp done timeout warnings habanalabs: patched cb equals user cb in device memset habanalabs: do not halt CoreSight during hard reset habanalabs: halt the engines before hard-reset usb: gadget: serial: fix Tx stall after buffer overflow usb: gadget: ffs: ffs_aio_cancel(): Save/restore IRQ flags usb: gadget: composite: Support more than 500mA MaxPower selftests: fix too long argument serial: ar933x_uart: set UART_CS_{RX,TX}_READY_ORIDE ALSA: hda: do not override bus codec_mask in link_get() blktrace: fix dereference after null check kprobes: Fix optimize_kprobe()/unoptimize_kprobe() cancellation logic kbuild: fix 'No such file or directory' warning when cleaning RDMA/core: Fix use of logical OR in get_new_pps RDMA/core: Fix pkey and port assignment in get_new_pps dm thin metadata: fix lockdep complaint net: stmmac: fix notifier registration net: dsa: bcm_sf2: Forcibly configure IMP port for 1Gb/sec ALSA: hda/realtek - Fix a regression for mute led on Lenovo Carbon X1 block, bfq: do not insert oom queue into position tree block, bfq: get extra ref to prevent a queue from being freed during a group move FROMGIT: kallsyms: unexport kallsyms_lookup_name() and kallsyms_on_each_symbol() FROMGIT: samples/hw_breakpoint: drop use of kallsyms_lookup_name() FROMGIT: samples/hw_breakpoint: drop HW_BREAKPOINT_R when reporting writes UPSTREAM: fscrypt: don't evict dirty inodes after removing key ANDROID: ABI/Whitelist: update whitelist of unisoc upstream code ANDROID: gki_defconfig: Enable CONFIG_VM_EVENT_COUNTERS ANDROID: gki_defconfig: Enable CONFIG_CLEANCACHE ANDROID: arm64: update the abi with the new gki_defconfig ANDROID: gki_defconfig: disable CONFIG_DEBUG_DEVRES ANDROID: Update the abi xml file ANDROID: GKI: arm64: reserve space in cpu_hwcaps and cpu_hwcap_keys arrays FROMGIT: power: supply: Allow charger manager can be built as a module ANDROID: arm64: gki_defconfig: disable CONFIG_DEBUG_PREEMPT ANDROID: iommu/iova: Fix to use __alloc_and_insert_iova_best_fit ANDROID: enable CONFIG_WATCHDOG_CORE=y ANDROID: kbuild: align UNUSED_KSYMS_WHITELIST with upstream FROMLIST: f2fs: fix wrong check on F2FS_IOC_FSSETXATTR ANDROID: gki_defconfig: enable CONFIG_TYPEC UPSTREAM: scsi: ufs: ufs-mediatek: add waiting time for reference clock UPSTREAM: scsi: ufs: introduce common function to disable host TX LCC UPSTREAM: scsi: ufs: ufs-mediatek: fix TX LCC disabling timing UPSTREAM: scsi: ufs: ufs-mediatek: gate ref-clk during Auto-Hibern8 UPSTREAM: scsi: ufs: fix Auto-Hibern8 error detection UPSTREAM: scsi: ufs: ufs-mediatek: support linkoff state during suspend UPSTREAM: scsi: ufs: ufs-mediatek: ensure UniPro is not powered down before linkup UPSTREAM: scsi: ufs: Move ufshcd_get_max_pwr_mode() to ufshcd_device_params_init() BACKPORT: scsi: ufs: Split ufshcd_probe_hba() based on its called flow FROMGIT: driver core: Reevaluate dev->links.need_for_probe as suppliers are added FROMGIT: driver core: Call sync_state() even if supplier has no consumers ANDROID: cpufreq: times: Remove per-UID time in state tracking Revert "ANDROID: proc: Add /proc/uid directory" Revert "ANDROID: cpufreq: Add time_in_state to /proc/uid directories" ANDROID: cpufreq: times: Remove /proc/uid_concurrent_{active,policy}_time ANDROID: drm: Add support for DP 1.4 Compliance edid corruption test Revert "ANDROID: drm: Add support for DP 1.4 Compliance edid corruption test" ANDROID: staging: ion: Add an in-kernel interface to request heap info. FROMLIST: lib: test_stackinit.c: XFAIL switch variable init tests UPSTREAM: scsi: ufs: Abort gating if clock on request is pending UPSTREAM: scsi: ufs: Fix irq return code UPSTREAM: scsi: ufs: Fix register dump caused sleep in atomic context UPSTREAM: scsi: ufs-qcom: Add reset control support for host controller UPSTREAM: scsi: ufs: Add device reset in link recovery path FROMGIT: scsi: ufs-qcom: Delay specific time before gate ref clk BACKPORT: FROMGIT: scsi: ufs: Add dev ref clock gating wait time support Revert "FROMLIST: scsi: ufs: Add dev ref clock gating wait time support" FROMGIT: scsi: ufs-qcom: Adjust bus bandwidth voting and unvoting Revert "FROMLIST: scsi: ufs-qcom: Adjust bus bandwidth voting and unvoting" ANDROID: CC_FLAGS_CFI add -fno-sanitize-blacklist Conflicts: Documentation/devicetree/bindings Documentation/devicetree/bindings/power/supply/battery.txt Documentation/devicetree/bindings/power/supply/sc27xx-fg.txt drivers/dma-buf/dma-buf.c drivers/interconnect/core.c drivers/interconnect/internal.h drivers/scsi/ufs/ufs-qcom.c drivers/scsi/ufs/ufs-qcom.h drivers/scsi/ufs/ufshcd.h drivers/thermal/Makefile drivers/usb/dwc3/gadget.c drivers/usb/gadget/composite.c drivers/usb/gadget/function/f_fs.c scripts/gen_autoksyms.sh Change-Id: Ic3227858328ceef3f34273428d1c4f81b78757b2 Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2020-05-19 15:26:51 -04:00
if [ ! -f "$ksym_wl" ] || [ ! -r "$ksym_wl" ]; then
echo "ERROR: '$ksym_wl' whitelist file not found" >&2
exit 1
fi
ksym_wls="$ksym_wls $ksym_wl"
done
fi
# Generate a new ksym list file with symbols needed by the current
# set of modules.
cat > "$output_file" << EOT
/*
* Automatically generated file; DO NOT EDIT.
*/
EOT
[ -f modules.order ] && modlist=modules.order || modlist=/dev/null
sed 's/ko$/mod/' $modlist |
xargs -n1 sed -n -e '2{s/ /\n/g;/^$/!p;}' -- |
cat - $ksym_wls |
sed 's/^#.*//;s/^ *//;/[[abi_symbol_list]]/g' |
sort -u |
sed -e 's/\(.*\)/#define __KSYM_\1 1/' >> "$output_file"
# Special case for modversions (see modpost.c)
if [ -n "$CONFIG_MODVERSIONS" ]; then
echo "#define __KSYM_module_layout 1" >> "$output_file"
fi
if [ -n "$CONFIG_UNUSED_KSYMS_WHITELIST_ONLY" ] && [ -f "vmlinux" ] ; then
syms_from_whitelist="$(mktemp)"
syms_from_vmlinux="$(mktemp)"
cat $ksym_wls |
sed 's/^#.*//;s/^ *//;/[[abi_symbol_list]]/g' |
sort -u > "$syms_from_whitelist"
$NM --defined-only vmlinux |
grep "__ksymtab_" |
sed 's/^.*__ksymtab_//' |
sort -u > "$syms_from_vmlinux"
# Forcefully unexport the symbols that are not declared in the whitelist
syms_to_unexport=$(comm -13 "$syms_from_whitelist" "$syms_from_vmlinux")
for sym_to_unexport in $syms_to_unexport; do
sed -i "/^#define __KSYM_${sym_to_unexport} 1/d" \
"$output_file"
done
rm -f "$syms_from_whitelist" "$syms_from_vmlinux"
fi