Merge android11-5.4.60 (8ae87ad
) into msm-5.4
* refs/heads/tmp-8ae87ad: Linux 5.4.60 drm/amd/display: dchubbub p-state warning during surface planes switch drm/amdgpu: Fix bug where DPM is not enabled after hibernate and resume drm: fix drm_dp_mst_port refcount leaks in drm_dp_mst_allocate_vcpi drm: Added orientation quirk for ASUS tablet model T103HAF drm/panfrost: Use kvfree() to free bo->sgts arm64: dts: marvell: espressobin: add ethernet alias khugepaged: retract_page_tables() remember to test exit sh: landisk: Add missing initialization of sh_io_port_base perf/x86/rapl: Fix missing psys sysfs attributes tools build feature: Quote CC and CXX for their arguments perf bench mem: Always memset source before memcpy ALSA: echoaudio: Fix potential Oops in snd_echo_resume() crypto: algif_aead - fix uninitialized ctx->init mfd: dln2: Run event handler loop under spinlock i2c: iproc: fix race between client unreg and isr test_kmod: avoid potential double free in trigger_config_run_type() fs/ufs: avoid potential u32 multiplication overflow fs/minix: remove expected error message in block_to_path() fs/minix: fix block limit check for V1 filesystems fs/minix: set s_maxbytes correctly nfs: Fix getxattr kernel panic and memory overflow net: qcom/emac: add missed clk_disable_unprepare in error path of emac_clks_phase1_init drm/vmwgfx: Fix two list_for_each loop exit tests drm/vmwgfx: Use correct vmw_legacy_display_unit pointer recordmcount: Fix build failure on non arm64 Input: sentelic - fix error return when fsp_reg_write fails x86/tsr: Fix tsc frequency enumeration bug on Lightning Mountain SoC md-cluster: Fix potential error pointer dereference in resize_bitmaps() watchdog: initialize device before misc_register nfs: nfs_file_write() should check for writeback errors scsi: lpfc: nvmet: Avoid hang / use-after-free again when destroying targetport openrisc: Fix oops caused when dumping stack libnvdimm/security: ensure sysfs poll thread woke up and fetch updated attr libnvdimm/security: fix a typo clk: bcm2835: Do not use prediv with bcm2711's PLLs ubifs: Fix wrong orphan node deletion in ubifs_jnl_update|rename nfs: ensure correct writeback errors are returned on close() i2c: rcar: avoid race when unregistering slave tools build feature: Use CC and CXX from parent pwm: bcm-iproc: handle clk_get_rate() return clk: clk-atlas6: fix return value check in atlas6_clk_init() clk: qcom: gcc-sdm660: Fix up gcc_mss_mnoc_bimc_axi_clk i2c: rcar: slave: only send STOP event when we have been addressed iommu/vt-d: Enforce PASID devTLB field mask clk: qcom: clk-alpha-pll: remove unused/incorrect PLL_CAL_VAL clk: qcom: gcc: fix sm8150 GPU and NPU clocks iommu/omap: Check for failure of a call to omap_iommu_dump_ctx selftests/powerpc: ptrace-pkey: Don't update expected UAMOR value selftests/powerpc: ptrace-pkey: Update the test to mark an invalid pkey correctly selftests/powerpc: ptrace-pkey: Rename variables to make it easier to follow code clk: actions: Fix h_clk for Actions S500 SoC dm rq: don't call blk_mq_queue_stopped() in dm_stop_queue() gpu: ipu-v3: image-convert: Wait for all EOFs before completing a tile gpu: ipu-v3: image-convert: Combine rotate/no-rotate irq handlers crypto: caam - Remove broken arc4 support mmc: renesas_sdhi_internal_dmac: clean up the code for dma complete RDMA/counter: Allow manually bind QPs with different pids to same counter RDMA/counter: Only bind user QPs in auto mode devres: keep both device name and resource name in pretty name crypto: af_alg - Fix regression on empty requests USB: serial: ftdi_sio: clean up receive processing USB: serial: ftdi_sio: make process-packet buffer unsigned selftests/bpf: test_progs use another shell exit on non-actions selftests/bpf: Test_progs indicate to shell on non-actions IB/uverbs: Set IOVA on IB MR in uverbs layer media: rockchip: rga: Only set output CSC mode for RGB input media: rockchip: rga: Introduce color fmt macros and refactor CSC mode logic RDMA/ipoib: Fix ABBA deadlock with ipoib_reap_ah() RDMA/ipoib: Return void from ipoib_ib_dev_stop() platform/chrome: cros_ec_ishtp: Fix a double-unlock issue mtd: rawnand: fsl_upm: Remove unused mtd var octeontx2-af: change (struct qmem)->entry_sz from u8 to u16 mfd: arizona: Ensure 32k clock is put on driver unbind and error crypto: algif_aead - Only wake up when ctx->more is zero pinctrl: ingenic: Properly detect GPIO direction when configured for IRQ orangefs: get rid of knob code... drm/imx: imx-ldb: Disable both channels for split mode in enc->disable() remoteproc: qcom_q6v5_mss: Validate modem blob firmware size before load remoteproc: qcom_q6v5_mss: Validate MBA firmware size before load remoteproc: qcom: q6v5: Update running state before requesting stop perf intel-pt: Fix duplicate branch after CBR perf intel-pt: Fix FUP packet state module: Correctly truncate sysfs sections output pseries: Fix 64 bit logical memory block panic ceph: handle zero-length feature mask in session messages ceph: set sec_context xattr on symlink creation watchdog: f71808e_wdt: clear watchdog timeout occurred flag watchdog: f71808e_wdt: remove use of wrong watchdog_info option watchdog: f71808e_wdt: indicate WDIOF_CARDRESET support in watchdog_info.options tracing: Move pipe reference to trace array instead of current_tracer tracing: Use trace_sched_process_free() instead of exit() for pid tracing tracing/hwlat: Honor the tracing_cpumask kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler ftrace: Setup correct FTRACE_FL_REGS flags for module mm/memory_hotplug: fix unpaired mem_hotplug_begin/done mm/page_counter.c: fix protection usage propagation ocfs2: change slot number type s16 to u16 khugepaged: collapse_pte_mapped_thp() protect the pmd lock khugepaged: collapse_pte_mapped_thp() flush the right range ext2: fix missing percpu_counter_inc MIPS: qi_lb60: Fix routing to audio amplifier MIPS: CPU#0 is not hotpluggable driver core: Avoid binding drivers to dead devices mac80211: fix misplaced while instead of if bcache: fix overflow in offset_to_stripe() bcache: allocate meta data pages as compound pages md/raid5: Fix Force reconstruct-write io stuck in degraded raid5 net/compat: Add missing sock updates for SCM_RIGHTS net: stmmac: dwmac1000: provide multicast filter fallback net: ethernet: stmmac: Disable hardware multicast filter media: vsp1: dl: Fix NULL pointer dereference on unbind pinctrl: ingenic: Enhance support for IRQ_TYPE_EDGE_BOTH powerpc: Fix circular dependency between percpu.h and mmu.h powerpc: Allow 4224 bytes of stack expansion for the signal frame powerpc/ptdump: Fix build failure in hashpagetable.c cifs: Fix leak when handling lease break for cached root fid xtensa: fix xtensa_pmu_setup prototype xtensa: add missing exclusive access state management iio: dac: ad5592r: fix unbalanced mutex unlocks in ad5592r_read_raw() dt-bindings: iio: io-channel-mux: Fix compatible string in example code arm64: perf: Correct the event index in sysfs btrfs: fix return value mixup in btrfs_get_extent btrfs: make sure SB_I_VERSION doesn't get unset by remount btrfs: fix memory leaks after failure to lookup checksums during inode logging btrfs: inode: fix NULL pointer dereference if inode doesn't need compression btrfs: only search for left_info if there is no right_info in try_merge_free_space btrfs: fix messages after changing compression level by remount btrfs: fix race between page release and a fast fsync btrfs: don't WARN if we abort a transaction with EROFS btrfs: sysfs: use NOFS for device creation btrfs: avoid possible signal interruption of btrfs_drop_snapshot() on relocation tree btrfs: add missing check for nocow and compression inode flags btrfs: relocation: review the call sites which can be interrupted by signal btrfs: move the chunk_mutex in btrfs_read_chunk_tree btrfs: open device without device_list_mutex btrfs: don't traverse into the seed devices in show_devname btrfs: remove no longer needed use of log_writers for the log root tree btrfs: stop incremening log_batch for the log root tree when syncing log btrfs: ref-verify: fix memory leak in add_block_entry btrfs: don't allocate anonymous block device for user invisible roots btrfs: free anon block device right after subvolume deletion btrfs: allow use of global block reserve for balance item deletion PCI: qcom: Add support for tx term offset for rev 2.1.0 PCI: qcom: Define some PARF params needed for ipq8064 SoC PCI: Add device even if driver attach failed PCI: Mark AMD Navi10 GPU rev 0x00 ATS as broken PCI: hotplug: ACPI: Fix context refcounting in acpiphp_grab_context() genirq/PM: Always unlock IRQ descriptor in rearm_wake_irq() genirq/affinity: Make affinity setting if activated opt-in smb3: warn on confusing error scenario with sec=krb5 ANDROID: ABI: FPSIMD save/restore using vendor_hooks ANDROID: vendor_hooks: FPSIMD save/restore by using vendor_hooks ANDROID: futex: Add vendor hook for wait queue ANDROID: sched: add vendor hooks to handle scheduling priority ANDROID: rwsem: Add vendor hook to the rw-semaphore ANDROID: binder: Add vendor hook to the binder FROMLIST: ufs: introduce a callback to get info of command completion ANDROID: scsi: ufs: export ufshcd_wb_ctrl func ANDROID: GKI: enable some USB_NET_ config options ANDROID: sched: add restrict vendor hook to modify task placement policy in EAS BACKPORT: kthread: Do not preempt current task if it is going to call schedule() ANDROID: GKI: enable CONFIG_USB_ROLE_SWITCH ANDROID: ABI: Update ABI after UFS error recovery patches BACKPORT: FROMGIT: scsi: ufs: Properly release resources if a task is aborted successfully BACKPORT: FROMGIT: scsi: ufs: Fix a race condition between error handler and runtime PM ops FROMGIT: scsi: ufs: Move dumps in IRQ handler to error handler BACKPORT: FROMGIT: scsi: ufs: Recover HBA runtime PM error in error handler BACKPORT: FROMGIT: scsi: ufs: Fix concurrency of error handler and other error recovery paths BACKPORT: FROMGIT: scsi: ufs: Add some debug information to ufshcd_print_host_state() FROMGIT: scsi: ufs-qcom: Remove testbus dump in ufs_qcom_dump_dbg_regs FROMGIT: scsi: ufs: ufs-qcom: Fix race conditions caused by ufs_qcom_testbus_config() FROMGIT: scsi: ufs: Add checks before setting clk-gating states ANDROID: kbuild: don't preprocess module-lto.lds ANDROID: vendor_hooks: Add vendor hook to the net Revert "ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109" Linux 5.4.59 io_uring: Fix NULL pointer dereference in loop_rw_iter() s390/gmap: improve THP splitting s390/dasd: fix inability to use DASD with DIAG driver xen/gntdev: Fix dmabuf import with non-zero sgt offset xen/balloon: make the balloon wait interruptible xen/balloon: fix accounting in alloc_xenballooned_pages error path fs/minix: reject too-large maximum file size fs/minix: don't allow getting deleted inodes fs/minix: check return value of sb_getblk() bitfield.h: don't compile-time validate _val in FIELD_FIT crypto: cpt - don't sleep of CRYPTO_TFM_REQ_MAY_SLEEP was not specified crypto: ccp - Fix use of merged scatterlists crypto: qat - fix double free in qat_uclo_create_batch_init_list crypto: hisilicon - don't sleep of CRYPTO_TFM_REQ_MAY_SLEEP was not specified pstore: Fix linking when crypto API disabled tpm: Unify the mismatching TPM space buffer sizes ALSA: usb-audio: add quirk for Pioneer DDJ-RB irqdomain/treewide: Free firmware node after domain removal ARM: 8992/1: Fix unwind_frame for clang-built kernels parisc: mask out enable and reserved bits from sba imask parisc: Implement __smp_store_release and __smp_load_acquire barriers parisc: Do not use an ordered store in pa_tlb_lock() Revert "parisc: Revert "Release spinlocks using ordered store"" Revert "parisc: Use ldcw instruction for SMP spinlock release barrier" Revert "parisc: Drop LDCW barrier in CAS code when running UP" erofs: fix extended inode could cross boundary mtd: rawnand: qcom: avoid write to unavailable register spi: spidev: Align buffers for DMA include/asm-generic/vmlinux.lds.h: align ro_after_init cpufreq: dt: fix oops on armada37xx cpufreq: Fix locking issues with governors NFS: Don't return layout segments that are in use NFS: Don't move layouts to plh_return_segs list while in use io_uring: set ctx sq/cq entry count earlier drm/ttm/nouveau: don't call tt destroy callback on alloc failure. media: media-request: Fix crash if memory allocation fails 9p: Fix memory leak in v9fs_mount ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109 ALSA: usb-audio: fix overeager device match for MacroSilicon MS2109 ALSA: usb-audio: Creative USB X-Fi Pro SB1095 volume knob support ALSA: hda - fix the micmute led status for Lenovo ThinkCentre AIO USB: serial: cp210x: enable usb generic throttle/unthrottle USB: serial: cp210x: re-enable auto-RTS on open net: initialize fastreuse on inet_inherit_port net: refactor bind_bucket fastreuse into helper vmxnet3: use correct tcp hdr length when packet is encapsulated tcp: correct read of TFO keys on big endian systems net/tls: Fix kmap usage net: Set fput_needed iff FDPUT_FPUT is set net: phy: fix memory leak in device-create error path net/nfc/rawsock.c: add CAP_NET_RAW check. net: Fix potential memory leak in proto_register() drivers/net/wan/lapbether: Added needed_headroom and a skb->len check af_packet: TPACKET_V3: fix fill status rwlock imbalance crypto: aesni - add compatibility with IAS x86/fsgsbase/64: Fix NULL deref in 86_fsgsbase_read_task SUNRPC: Fix ("SUNRPC: Add "@len" parameter to gss_unwrap()") svcrdma: Fix page leak in svc_rdma_recv_read_chunk() pinctrl-single: fix pcs_parse_pinconf() return value ocfs2: fix unbalanced locking dlm: Fix kobject memleak net: thunderx: initialize VF's mailbox mutex before first usage fsl/fman: fix eth hash table allocation fsl/fman: check dereferencing null pointer fsl/fman: fix unreachable code fsl/fman: fix dereference null return value fsl/fman: use 32-bit unsigned integer net: spider_net: Fix the size used in a 'dma_free_coherent()' call liquidio: Fix wrong return value in cn23xx_get_pf_num() net: ethernet: aquantia: Fix wrong return value net/mlx5: Delete extra dump stack that gives nothing net/mlx5: DR, Change push vlan action sequence tools, bpftool: Fix wrong return value in do_dump() tools, build: Propagate build failures from tools/build/Makefile.build wl1251: fix always return 0 error rtw88: coex: only skip coex triggered by BT info rtw88: fix short GI capability based on current bandwidth rtw88: fix LDPC field for RA info ice: Graceful error handling in HW table calloc failure s390/qeth: don't process empty bridge port events ASoC: fsl_sai: Fix value of FSL_SAI_CR1_RFW_MASK ASoC: meson: axg-tdm-formatters: fix sclk inversion ASoC: meson: axg-tdmin: fix g12a skew ASoC: meson: axg-tdm-interface: fix link fmt setup selftests/powerpc: Fix online CPU selection cpufreq: ap806: fix cpufreq driver needs ap cpu clk PCI: Release IVRS table in AMD ACS quirk RDMA/netlink: Remove CAP_NET_RAW check when dump a raw QP selftests/powerpc: Fix CPU affinity for child process powerpc/boot: Fix CONFIG_PPC_MPC52XX references powerpc/32s: Fix CONFIG_BOOK3S_601 uses selftests/powerpc: Squash spurious errors due to device removal xfs: fix inode allocation block res calculation precedence net: dsa: rtl8366: Fix VLAN set-up net: dsa: rtl8366: Fix VLAN semantics Bluetooth: hci_serdev: Only unregister device if it was registered Bluetooth: hci_h5: Set HCI_UART_RESET_ON_INIT to correct flags power: supply: check if calc_soc succeeded in pm860x_init_battery Smack: prevent underflow in smk_set_cipso() Smack: fix another vsscanf out of bounds RDMA/core: Fix return error value in _ib_modify_qp() to negative PCI: cadence: Fix updating Vendor ID and Subsystem Vendor ID register macintosh/via-macii: Access autopoll_devs when inside lock net: dsa: mv88e6xxx: MV88E6097 does not support jumbo configuration scsi: mesh: Fix panic after host or bus reset scsi: megaraid_sas: Clear affinity hint usb: gadget: f_uac2: fix AC Interface Header Descriptor wTotalLength usb: dwc2: Fix error path in gadget registration MIPS: OCTEON: add missing put_device() call in dwc3_octeon_device_init() phy: armada-38x: fix NETA lockup when repeatedly switching speeds mt76: mt7615: fix potential memory leak in mcu message handler powerpc/perf: Fix missing is_sier_aviable() during build coresight: tmc: Fix TMC mode read in tmc_read_unprepare_etb() thermal: ti-soc-thermal: Fix reversed condition in ti_thermal_expose_sensor() usb: core: fix quirks_param_set() writing to a const pointer USB: serial: iuu_phoenix: fix led-activity helpers spi: lantiq-ssc: Fix warning by using WQ_MEM_RECLAIM gpu: ipu-v3: Restore RGB32, BGR32 drm/imx: tve: fix regulator_disable error path drm/imx: fix use after free powerpc/book3s64/pkeys: Use PVR check instead of cpu feature phy: renesas: rcar-gen3-usb2: move irq registration to init PCI/ASPM: Add missing newline in sysfs 'policy' ASoC: meson: fixes the missed kfree() for axg_card_add_tdm_loopback staging: rtl8192u: fix a dubious looking mask before a shift ima: Have the LSM free its audit rule RDMA/rxe: Prevent access to wr->next ptr afrer wr is posted to send queue RDMA/qedr: SRQ's bug fixes powerpc/vdso: Fix vdso cpu truncation powerpc/rtas: don't online CPUs for partition suspend kernfs: do not call fsnotify() with name without a parent mwifiex: Prevent memory corruption handling keys scsi: scsi_debug: Add check for sdebug_max_queue during module init drm/bridge: sil_sii8620: initialize return of sii8620_readb phy: exynos5-usbdrd: Calibrating makes sense only for USB2.0 PHY drm: panel: simple: Fix bpc for LG LB070WV8 panel leds: core: Flush scheduled work for system suspend kobject: Avoid premature parent object freeing in kobject_cleanup() drm/stm: repair runtime power management PCI: Fix pci_cfg_wait queue locking problem RDMA/rxe: Skip dgid check in loopback mode xfs: fix reflink quota reservation accounting error xfs: don't eat an EIO/ENOSPC writeback error when scrubbing data fork media: cros-ec-cec: do not bail on device_init_wakeup failure media: exynos4-is: Add missed check for pinctrl_lookup_state() media: firewire: Using uninitialized values in node_probe() ipvs: allow connection reuse for unconfirmed conntrack scsi: eesox: Fix different dev_id between request_irq() and free_irq() scsi: powertec: Fix different dev_id between request_irq() and free_irq() RDMA/core: Fix bogus WARN_ON during ib_unregister_device_queued() iavf: Fix updating statistics iavf: fix error return code in iavf_init_get_resources() staging: vchiq_arm: Add a matching unregister call drm/radeon: fix array out-of-bounds read and write issues cxl: Fix kobject memleak drm/mipi: use dcs write for mipi_dsi_dcs_set_tear_scanline scsi: cumana_2: Fix different dev_id between request_irq() and free_irq() ASoC: Intel: bxt_rt298: add missing .owner field ASoC: SOF: nocodec: add missing .owner field media: omap3isp: Add missed v4l2_ctrl_handler_free() for preview_init_entities() media: marvell-ccic: Add missed v4l2_async_notifier_cleanup() media: cxusb-analog: fix V4L2 dependency Bluetooth: btmtksdio: fix up firmware download sequence Bluetooth: btusb: fix up firmware download sequence leds: lm355x: avoid enum conversion warning clk: bcm63xx-gate: fix last clock availability drm/arm: fix unintentional integer overflow on left shift drm/etnaviv: Fix error path on failure to enable bus clk iio: improve IIO_CONCENTRATION channel type description ath10k: Acquire tx_lock in tx error paths video: pxafb: Fix the function used to balance a 'dma_alloc_coherent()' call console: newport_con: fix an issue about leak related system resources video: fbdev: sm712fb: fix an issue about iounmap for a wrong address btmrvl: Fix firmware filename for sd8997 chipset btmrvl: Fix firmware filename for sd8977 chipset mwifiex: Fix firmware filename for sd8997 chipset mwifiex: Fix firmware filename for sd8977 chipset agp/intel: Fix a memory leak on module initialisation failure drm/bridge: ti-sn65dsi86: Clear old error bits before AUX transfers drm/gem: Fix a leak in drm_gem_objects_lookup() drm/msm: ratelimit crtc event overflow error ACPICA: Do not increment operation_region reference counts for field units bcache: fix super block seq numbers comparision in register_cache_set() dyndbg: fix a BUG_ON in ddebug_describe_flags usb: bdc: Halt controller on suspend bdc: Fix bug causing crash after multiple disconnects usb: gadget: net2280: fix memory leak on probe error handling paths mmc: sdhci-pci-o2micro: Bug fix for O2 host controller Seabird1 ionic: update eid test for overflow gpu: host1x: debug: Fix multiple channels emitting messages simultaneously iwlegacy: Check the return value of pcie_capability_read_*() platform/x86: asus-nb-wmi: add support for ASUS ROG Zephyrus G14 and G15 brcmfmac: set state of hanger slot to FREE when flushing PSQ brcmfmac: To fix Bss Info flag definition Bug brcmfmac: keep SDIO watchdog running when console_interval is non-zero bpf: Fix fds_example SIGSEGV error drm/amd/powerplay: fix compile error with ARCH=arc drm/amdgpu/display bail early in dm_pp_get_static_clocks mm/mmap.c: Add cond_resched() for exit_mmap() CPU stalls irqchip/irq-mtk-sysirq: Replace spinlock with raw_spinlock drm/radeon: disable AGP by default drm/debugfs: fix plain echo to connector "force" attribute drm/msm: Fix a null pointer access in msm_gem_shrinker_count() drm: msm: a6xx: fix gpu failure after system resume usb: mtu3: clear dual mode of u3port when disable device btrfs: fix lockdep splat from btrfs_dump_space_info mmc: sdhci-cadence: do not use hardware tuning for SD mode drm/nouveau: fix multiple instances of reference count leaks drm/nouveau: fix reference count leak in nouveau_debugfs_strap_peek drm/etnaviv: fix ref count leak via pm_runtime_get_sync arm64: dts: hisilicon: hikey: fixes to comply with adi, adv7533 DT binding drm/nouveau/kms/nv50-: Fix disabling dithering md-cluster: fix wild pointer of unlock_all_bitmaps() bus: ti-sysc: Add missing quirk flags for usb_host_hs video: fbdev: neofb: fix memory leak in neo_scan_monitor() video: fbdev: savage: fix memory leak on error handling path in probe crypto: aesni - Fix build with LLVM_IAS=1 drm/radeon: Fix reference count leaks caused by pm_runtime_get_sync drm/amdgpu: avoid dereferencing a NULL pointer fs/btrfs: Add cond_resched() for try_release_extent_mapping() stalls ANDROID: fix a bug in quota2 loop: be paranoid on exit and prevent new additions / removals Bluetooth: add a mutex lock to avoid UAF in do_enale_set soc: qcom: rpmh-rsc: Set suppress_bind_attrs flag drm/tilcdc: fix leak & null ref in panel_connector_get_modes nvme-multipath: do not fall back to __nvme_find_path() for non-optimized paths nvme-multipath: fix logic for non-optimized paths nvme-rdma: fix controller reset hang during traffic nvme-tcp: fix controller reset hang during traffic md: raid0/linear: fix dereference before null check on pointer mddev seccomp: Fix ioctl number for SECCOMP_IOCTL_NOTIF_ID_VALID irqchip/ti-sci-inta: Fix return value about devm_ioremap_resource() iocost: Fix check condition of iocg abs_vdebt ARM: socfpga: PM: add missing put_device() call in socfpga_setup_ocram_self_refresh() spi: rockchip: Fix error in SPI slave pio read io_uring: fix sq array offset calculation regulator: fix memory leak on error path of regulator_register() recordmcount: only record relocation of type R_AARCH64_CALL26 on arm64. tpm: Require that all digests are present in TCG_PCR_EVENT2 structures spi: lantiq: fix: Rx overflow error in full duplex mode ARM: dts: sunxi: bananapi-m2-plus-v1.2: Fix CPU supply voltages ARM: dts: sunxi: bananapi-m2-plus-v1.2: Add regulator supply to all CPU cores ARM: at91: pm: add missing put_device() call in at91_pm_sram_init() ARM: dts: gose: Fix ports node name for adv7612 ARM: dts: gose: Fix ports node name for adv7180 platform/x86: intel-vbtn: Fix return value check in check_acpi_dev() platform/x86: intel-hid: Fix return value check in check_acpi_dev() m68k: mac: Fix IOP status/control register writes m68k: mac: Don't send IOP message until channel is idle clk: scmi: Fix min and max rate when registering clocks with discrete rates sched/uclamp: Fix initialization of struct uclamp_rq arm64: dts: exynos: Fix silent hang after boot on Espresso firmware: arm_scmi: Fix SCMI genpd domain probing ARM: exynos: MCPM: Restore big.LITTLE cpuidle support crypto: ccree - fix resource leak on error path blktrace: fix debugfs use after free arm64: dts: qcom: msm8916: Replace invalid bias-pull-none property crc-t10dif: Fix potential crypto notify dead-lock EDAC: Fix reference count leaks arm64: dts: rockchip: fix rk3399-puma gmac reset gpio arm64: dts: rockchip: fix rk3399-puma vcc5v0-host gpio arm64: dts: rockchip: fix rk3368-lion gmac reset gpio sched: correct SD_flags returned by tl->sd_flags() sched/fair: Fix NOHZ next idle balance x86/mce/inject: Fix a wrong assignment of i_mce.status clk: qcom: clk-rpmh: Wait for completion when enabling clocks fs/io_uring.c: Fix uninitialized variable is referenced in io_submit_sqe nvme: add a Identify Namespace Identification Descriptor list quirk HID: input: Fix devices that return multiple bytes in battery report tracepoint: Mark __tracepoint_string's __used ANDROID: ABI: Update allowed list for QCOM Conflicts: Documentation/devicetree/bindings Documentation/devicetree/bindings/iio/multiplexer/io-channel-mux.txt android/abi_gki_aarch64_qcom drivers/clk/qcom/clk-rpmh.c drivers/hwtracing/coresight/coresight-tmc-etf.c drivers/scsi/ufs/ufs-qcom.c drivers/scsi/ufs/ufshcd.c Change-Id: Ifd7b8337005ddb6c64a6f4e017e470e745170d98 Signed-off-by: Ivaylo Georgiev <irgeorgiev@codeaurora.org> Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
This commit is contained in:
commit
125c29efb1
@ -1566,7 +1566,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_voc_raw
|
||||
KernelVersion: 4.3
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Raw (unscaled no offset etc.) percentage reading of a substance.
|
||||
Raw (unscaled no offset etc.) reading of a substance. Units
|
||||
after application of scale and offset are percents.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_resistance_raw
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_resistanceX_raw
|
||||
|
4
Makefile
4
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 58
|
||||
SUBLEVEL = 60
|
||||
EXTRAVERSION =
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
@ -885,7 +885,7 @@ LD_FLAGS_LTO_CLANG := -mllvm -import-instr-limit=5
|
||||
KBUILD_LDFLAGS += $(LD_FLAGS_LTO_CLANG)
|
||||
KBUILD_LDFLAGS_MODULE += $(LD_FLAGS_LTO_CLANG)
|
||||
|
||||
KBUILD_LDS_MODULE += scripts/module-lto.lds
|
||||
KBUILD_LDS_MODULE += $(srctree)/scripts/module-lto.lds
|
||||
endif
|
||||
|
||||
ifdef CONFIG_LTO
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -858,6 +858,7 @@
|
||||
eth_commit_mac_addr_change
|
||||
ether_setup
|
||||
eth_mac_addr
|
||||
eth_platform_get_mac_address
|
||||
eth_prepare_mac_addr_change
|
||||
__ethtool_get_link_ksettings
|
||||
ethtool_op_get_link
|
||||
@ -938,12 +939,14 @@
|
||||
generic_file_read_iter
|
||||
generic_file_splice_read
|
||||
generic_handle_irq
|
||||
generic_mii_ioctl
|
||||
generic_permission
|
||||
generic_read_dir
|
||||
generic_shutdown_super
|
||||
genlmsg_put
|
||||
genl_register_family
|
||||
genl_unregister_family
|
||||
genphy_resume
|
||||
gen_pool_add_owner
|
||||
gen_pool_alloc_algo_owner
|
||||
gen_pool_avail
|
||||
@ -1082,6 +1085,7 @@
|
||||
idr_preload
|
||||
idr_remove
|
||||
idr_replace
|
||||
ieee80211_channel_to_freq_khz
|
||||
ieee80211_freq_khz_to_channel
|
||||
ieee80211_get_channel_khz
|
||||
ieee80211_hdrlen
|
||||
@ -1351,6 +1355,10 @@
|
||||
mbox_free_channel
|
||||
mbox_request_channel
|
||||
mbox_send_message
|
||||
mdiobus_alloc_size
|
||||
mdiobus_free
|
||||
__mdiobus_register
|
||||
mdiobus_unregister
|
||||
media_create_pad_link
|
||||
media_device_cleanup
|
||||
media_device_init
|
||||
@ -1371,6 +1379,12 @@
|
||||
__memset_io
|
||||
memunmap
|
||||
memweight
|
||||
mii_check_media
|
||||
mii_ethtool_get_link_ksettings
|
||||
mii_ethtool_gset
|
||||
mii_ethtool_set_link_ksettings
|
||||
mii_link_ok
|
||||
mii_nway_restart
|
||||
mipi_dsi_create_packet
|
||||
mipi_dsi_dcs_set_display_brightness
|
||||
mipi_dsi_dcs_set_tear_off
|
||||
@ -1652,13 +1666,22 @@
|
||||
perf_trace_run_bpf_submit
|
||||
pfn_valid
|
||||
phy_calibrate
|
||||
phy_connect
|
||||
phy_disconnect
|
||||
phy_ethtool_get_link_ksettings
|
||||
phy_ethtool_nway_reset
|
||||
phy_ethtool_set_link_ksettings
|
||||
phy_exit
|
||||
phy_init
|
||||
phy_mii_ioctl
|
||||
phy_pm_runtime_get_sync
|
||||
phy_pm_runtime_put_sync
|
||||
phy_power_off
|
||||
phy_power_on
|
||||
phy_print_status
|
||||
phy_set_mode_ext
|
||||
phy_start
|
||||
phy_stop
|
||||
physvirt_offset
|
||||
pinconf_generic_dt_node_to_map
|
||||
pinctrl_dev_get_drvdata
|
||||
@ -2575,6 +2598,33 @@
|
||||
usb_kill_urb
|
||||
usb_lock_device_for_reset
|
||||
usb_match_one_id
|
||||
usbnet_change_mtu
|
||||
usbnet_disconnect
|
||||
usbnet_get_drvinfo
|
||||
usbnet_get_endpoints
|
||||
usbnet_get_link
|
||||
usbnet_get_link_ksettings
|
||||
usbnet_get_msglevel
|
||||
usbnet_get_stats64
|
||||
usbnet_link_change
|
||||
usbnet_nway_reset
|
||||
usbnet_open
|
||||
usbnet_probe
|
||||
usbnet_read_cmd
|
||||
usbnet_read_cmd_nopm
|
||||
usbnet_resume
|
||||
usbnet_set_link_ksettings
|
||||
usbnet_set_msglevel
|
||||
usbnet_skb_return
|
||||
usbnet_start_xmit
|
||||
usbnet_stop
|
||||
usbnet_suspend
|
||||
usbnet_tx_timeout
|
||||
usbnet_unlink_rx_urbs
|
||||
usbnet_update_max_qlen
|
||||
usbnet_write_cmd
|
||||
usbnet_write_cmd_async
|
||||
usbnet_write_cmd_nopm
|
||||
usb_os_desc_prepare_interf_dir
|
||||
usb_poison_urb
|
||||
usb_put_dev
|
||||
|
@ -339,7 +339,7 @@
|
||||
reg = <0x20>;
|
||||
remote = <&vin1>;
|
||||
|
||||
port {
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
@ -399,7 +399,7 @@
|
||||
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
|
||||
default-input = <0>;
|
||||
|
||||
port {
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
|
@ -16,15 +16,27 @@
|
||||
regulator-type = "voltage";
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1100000>;
|
||||
regulator-max-microvolt = <1300000>;
|
||||
regulator-min-microvolt = <1108475>;
|
||||
regulator-max-microvolt = <1308475>;
|
||||
regulator-ramp-delay = <50>; /* 4ms */
|
||||
gpios = <&r_pio 0 1 GPIO_ACTIVE_HIGH>; /* PL1 */
|
||||
gpios-states = <0x1>;
|
||||
states = <1100000 0>, <1300000 1>;
|
||||
states = <1108475 0>, <1308475 1>;
|
||||
};
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
cpu-supply = <®_vdd_cpux>;
|
||||
};
|
||||
|
||||
&cpu1 {
|
||||
cpu-supply = <®_vdd_cpux>;
|
||||
};
|
||||
|
||||
&cpu2 {
|
||||
cpu-supply = <®_vdd_cpux>;
|
||||
};
|
||||
|
||||
&cpu3 {
|
||||
cpu-supply = <®_vdd_cpux>;
|
||||
};
|
||||
|
@ -22,6 +22,19 @@
|
||||
* A simple function epilogue looks like this:
|
||||
* ldm sp, {fp, sp, pc}
|
||||
*
|
||||
* When compiled with clang, pc and sp are not pushed. A simple function
|
||||
* prologue looks like this when built with clang:
|
||||
*
|
||||
* stmdb {..., fp, lr}
|
||||
* add fp, sp, #x
|
||||
* sub sp, sp, #y
|
||||
*
|
||||
* A simple function epilogue looks like this when built with clang:
|
||||
*
|
||||
* sub sp, fp, #x
|
||||
* ldm {..., fp, pc}
|
||||
*
|
||||
*
|
||||
* Note that with framepointer enabled, even the leaf functions have the same
|
||||
* prologue and epilogue, therefore we can ignore the LR value in this case.
|
||||
*/
|
||||
@ -34,6 +47,16 @@ int notrace unwind_frame(struct stackframe *frame)
|
||||
low = frame->sp;
|
||||
high = ALIGN(low, THREAD_SIZE);
|
||||
|
||||
#ifdef CONFIG_CC_IS_CLANG
|
||||
/* check current frame pointer is within bounds */
|
||||
if (fp < low + 4 || fp > high - 4)
|
||||
return -EINVAL;
|
||||
|
||||
frame->sp = frame->fp;
|
||||
frame->fp = *(unsigned long *)(fp);
|
||||
frame->pc = frame->lr;
|
||||
frame->lr = *(unsigned long *)(fp + 4);
|
||||
#else
|
||||
/* check current frame pointer is within bounds */
|
||||
if (fp < low + 12 || fp > high - 4)
|
||||
return -EINVAL;
|
||||
@ -42,6 +65,7 @@ int notrace unwind_frame(struct stackframe *frame)
|
||||
frame->fp = *(unsigned long *)(fp - 12);
|
||||
frame->sp = *(unsigned long *)(fp - 8);
|
||||
frame->pc = *(unsigned long *)(fp - 4);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -592,13 +592,13 @@ static void __init at91_pm_sram_init(void)
|
||||
sram_pool = gen_pool_get(&pdev->dev, NULL);
|
||||
if (!sram_pool) {
|
||||
pr_warn("%s: sram pool unavailable!\n", __func__);
|
||||
return;
|
||||
goto out_put_device;
|
||||
}
|
||||
|
||||
sram_base = gen_pool_alloc(sram_pool, at91_pm_suspend_in_sram_sz);
|
||||
if (!sram_base) {
|
||||
pr_warn("%s: unable to alloc sram!\n", __func__);
|
||||
return;
|
||||
goto out_put_device;
|
||||
}
|
||||
|
||||
sram_pbase = gen_pool_virt_to_phys(sram_pool, sram_base);
|
||||
@ -606,12 +606,17 @@ static void __init at91_pm_sram_init(void)
|
||||
at91_pm_suspend_in_sram_sz, false);
|
||||
if (!at91_suspend_sram_fn) {
|
||||
pr_warn("SRAM: Could not map\n");
|
||||
return;
|
||||
goto out_put_device;
|
||||
}
|
||||
|
||||
/* Copy the pm suspend handler to SRAM */
|
||||
at91_suspend_sram_fn = fncpy(at91_suspend_sram_fn,
|
||||
&at91_pm_suspend_in_sram, at91_pm_suspend_in_sram_sz);
|
||||
return;
|
||||
|
||||
out_put_device:
|
||||
put_device(&pdev->dev);
|
||||
return;
|
||||
}
|
||||
|
||||
static bool __init at91_is_pm_mode_active(int pm_mode)
|
||||
|
@ -26,6 +26,7 @@
|
||||
#define EXYNOS5420_USE_L2_COMMON_UP_STATE BIT(30)
|
||||
|
||||
static void __iomem *ns_sram_base_addr __ro_after_init;
|
||||
static bool secure_firmware __ro_after_init;
|
||||
|
||||
/*
|
||||
* The common v7_exit_coherency_flush API could not be used because of the
|
||||
@ -58,15 +59,16 @@ static void __iomem *ns_sram_base_addr __ro_after_init;
|
||||
static int exynos_cpu_powerup(unsigned int cpu, unsigned int cluster)
|
||||
{
|
||||
unsigned int cpunr = cpu + (cluster * EXYNOS5420_CPUS_PER_CLUSTER);
|
||||
bool state;
|
||||
|
||||
pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
|
||||
if (cpu >= EXYNOS5420_CPUS_PER_CLUSTER ||
|
||||
cluster >= EXYNOS5420_NR_CLUSTERS)
|
||||
return -EINVAL;
|
||||
|
||||
if (!exynos_cpu_power_state(cpunr)) {
|
||||
exynos_cpu_power_up(cpunr);
|
||||
|
||||
state = exynos_cpu_power_state(cpunr);
|
||||
exynos_cpu_power_up(cpunr);
|
||||
if (!state && secure_firmware) {
|
||||
/*
|
||||
* This assumes the cluster number of the big cores(Cortex A15)
|
||||
* is 0 and the Little cores(Cortex A7) is 1.
|
||||
@ -258,6 +260,8 @@ static int __init exynos_mcpm_init(void)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
secure_firmware = exynos_secure_firmware_available();
|
||||
|
||||
/*
|
||||
* To increase the stability of KFC reset we need to program
|
||||
* the PMU SPARE3 register
|
||||
|
@ -49,14 +49,14 @@ static int socfpga_setup_ocram_self_refresh(void)
|
||||
if (!ocram_pool) {
|
||||
pr_warn("%s: ocram pool unavailable!\n", __func__);
|
||||
ret = -ENODEV;
|
||||
goto put_node;
|
||||
goto put_device;
|
||||
}
|
||||
|
||||
ocram_base = gen_pool_alloc(ocram_pool, socfpga_sdram_self_refresh_sz);
|
||||
if (!ocram_base) {
|
||||
pr_warn("%s: unable to alloc ocram!\n", __func__);
|
||||
ret = -ENOMEM;
|
||||
goto put_node;
|
||||
goto put_device;
|
||||
}
|
||||
|
||||
ocram_pbase = gen_pool_virt_to_phys(ocram_pool, ocram_base);
|
||||
@ -67,7 +67,7 @@ static int socfpga_setup_ocram_self_refresh(void)
|
||||
if (!suspend_ocram_base) {
|
||||
pr_warn("%s: __arm_ioremap_exec failed!\n", __func__);
|
||||
ret = -ENOMEM;
|
||||
goto put_node;
|
||||
goto put_device;
|
||||
}
|
||||
|
||||
/* Copy the code that puts DDR in self refresh to ocram */
|
||||
@ -81,6 +81,8 @@ static int socfpga_setup_ocram_self_refresh(void)
|
||||
if (!socfpga_sdram_self_refresh_in_ocram)
|
||||
ret = -EFAULT;
|
||||
|
||||
put_device:
|
||||
put_device(&pdev->dev);
|
||||
put_node:
|
||||
of_node_put(np);
|
||||
|
||||
|
@ -157,6 +157,7 @@
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1150000>;
|
||||
regulator-enable-ramp-delay = <125>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo8_reg: LDO8 {
|
||||
|
@ -654,6 +654,17 @@
|
||||
status = "ok";
|
||||
compatible = "adi,adv7533";
|
||||
reg = <0x39>;
|
||||
adi,dsi-lanes = <4>;
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -516,7 +516,7 @@
|
||||
reg = <0x39>;
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <1 2>;
|
||||
pd-gpio = <&gpio0 4 0>;
|
||||
pd-gpios = <&gpio0 4 0>;
|
||||
adi,dsi-lanes = <4>;
|
||||
#sound-dai-cells = <0>;
|
||||
|
||||
|
@ -19,6 +19,12 @@
|
||||
model = "Globalscale Marvell ESPRESSOBin Board";
|
||||
compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710";
|
||||
|
||||
aliases {
|
||||
ethernet0 = ð0;
|
||||
serial0 = &uart0;
|
||||
serial1 = &uart1;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
@ -508,7 +508,7 @@
|
||||
pins = "gpio63", "gpio64", "gpio65", "gpio66",
|
||||
"gpio67", "gpio68";
|
||||
drive-strength = <8>;
|
||||
bias-pull-none;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
cdc_pdm_lines_sus: pdm_lines_off {
|
||||
@ -537,7 +537,7 @@
|
||||
pins = "gpio113", "gpio114", "gpio115",
|
||||
"gpio116";
|
||||
drive-strength = <8>;
|
||||
bias-pull-none;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
@ -565,7 +565,7 @@
|
||||
pinconf {
|
||||
pins = "gpio110";
|
||||
drive-strength = <8>;
|
||||
bias-pull-none;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
@ -591,7 +591,7 @@
|
||||
pinconf {
|
||||
pins = "gpio116";
|
||||
drive-strength = <8>;
|
||||
bias-pull-none;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
ext_mclk_tlmm_lines_sus: mclk_lines_off {
|
||||
@ -619,7 +619,7 @@
|
||||
pins = "gpio112", "gpio117", "gpio118",
|
||||
"gpio119";
|
||||
drive-strength = <8>;
|
||||
bias-pull-none;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
ext_sec_tlmm_lines_sus: tlmm_lines_off {
|
||||
|
@ -156,7 +156,7 @@
|
||||
pinctrl-0 = <&rgmii_pins>;
|
||||
snps,reset-active-low;
|
||||
snps,reset-delays-us = <0 10000 50000>;
|
||||
snps,reset-gpio = <&gpio3 RK_PB3 GPIO_ACTIVE_HIGH>;
|
||||
snps,reset-gpio = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
|
||||
tx_delay = <0x10>;
|
||||
rx_delay = <0x10>;
|
||||
status = "okay";
|
||||
|
@ -101,7 +101,7 @@
|
||||
|
||||
vcc5v0_host: vcc5v0-host-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
|
||||
gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_LOW>;
|
||||
enable-active-low;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vcc5v0_host_en>;
|
||||
@ -157,7 +157,7 @@
|
||||
phy-mode = "rgmii";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii_pins>;
|
||||
snps,reset-gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
|
||||
snps,reset-gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
|
||||
snps,reset-active-low;
|
||||
snps,reset-delays-us = <0 10000 50000>;
|
||||
tx_delay = <0x10>;
|
||||
|
@ -265,7 +265,6 @@ CONFIG_DUMMY=y
|
||||
CONFIG_TUN=y
|
||||
CONFIG_VETH=y
|
||||
# CONFIG_ETHERNET is not set
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PPP=y
|
||||
CONFIG_PPP_BSDCOMP=y
|
||||
CONFIG_PPP_DEFLATE=y
|
||||
@ -274,9 +273,6 @@ CONFIG_PPTP=y
|
||||
CONFIG_PPPOL2TP=y
|
||||
CONFIG_USB_RTL8152=y
|
||||
CONFIG_USB_USBNET=y
|
||||
# CONFIG_USB_NET_AX8817X is not set
|
||||
# CONFIG_USB_NET_AX88179_178A is not set
|
||||
# CONFIG_USB_NET_CDCETHER is not set
|
||||
# CONFIG_USB_NET_CDC_NCM is not set
|
||||
# CONFIG_USB_NET_NET1080 is not set
|
||||
# CONFIG_USB_NET_CDC_SUBSET is not set
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/android_vendor.h>
|
||||
|
||||
#include <vdso/processor.h>
|
||||
|
||||
@ -138,6 +139,8 @@ struct thread_struct {
|
||||
struct user_fpsimd_state fpsimd_state;
|
||||
} uw;
|
||||
|
||||
ANDROID_VENDOR_DATA(1);
|
||||
|
||||
unsigned int fpsimd_cpu;
|
||||
void *sve_state; /* SVE registers, if any */
|
||||
unsigned int sve_vl; /* SVE vector length */
|
||||
|
@ -155,7 +155,7 @@ armv8pmu_events_sysfs_show(struct device *dev,
|
||||
|
||||
pmu_attr = container_of(attr, struct perf_pmu_events_attr, attr);
|
||||
|
||||
return sprintf(page, "event=0x%03llx\n", pmu_attr->id);
|
||||
return sprintf(page, "event=0x%04llx\n", pmu_attr->id);
|
||||
}
|
||||
|
||||
#define ARMV8_EVENT_ATTR(name, config) \
|
||||
@ -303,10 +303,13 @@ armv8pmu_event_attr_is_visible(struct kobject *kobj,
|
||||
test_bit(pmu_attr->id, cpu_pmu->pmceid_bitmap))
|
||||
return attr->mode;
|
||||
|
||||
pmu_attr->id -= ARMV8_PMUV3_EXT_COMMON_EVENT_BASE;
|
||||
if (pmu_attr->id < ARMV8_PMUV3_MAX_COMMON_EVENTS &&
|
||||
test_bit(pmu_attr->id, cpu_pmu->pmceid_ext_bitmap))
|
||||
return attr->mode;
|
||||
if (pmu_attr->id >= ARMV8_PMUV3_EXT_COMMON_EVENT_BASE) {
|
||||
u64 id = pmu_attr->id - ARMV8_PMUV3_EXT_COMMON_EVENT_BASE;
|
||||
|
||||
if (id < ARMV8_PMUV3_MAX_COMMON_EVENTS &&
|
||||
test_bit(id, cpu_pmu->pmceid_ext_bitmap))
|
||||
return attr->mode;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include <linux/percpu.h>
|
||||
#include <linux/thread_info.h>
|
||||
#include <linux/prctl.h>
|
||||
#include <trace/hooks/fpsimd.h>
|
||||
|
||||
#include <asm/alternative.h>
|
||||
#include <asm/arch_gicv3.h>
|
||||
@ -530,6 +531,8 @@ __notrace_funcgraph struct task_struct *__switch_to(struct task_struct *prev,
|
||||
*/
|
||||
dsb(ish);
|
||||
|
||||
trace_android_vh_is_fpsimd_save(prev, next);
|
||||
|
||||
/* the actual thread switch */
|
||||
last = cpu_switch_to(prev, next);
|
||||
|
||||
|
@ -183,7 +183,7 @@ static __inline__ void iop_writeb(volatile struct mac_iop *iop, __u16 addr, __u8
|
||||
|
||||
static __inline__ void iop_stop(volatile struct mac_iop *iop)
|
||||
{
|
||||
iop->status_ctrl &= ~IOP_RUN;
|
||||
iop->status_ctrl = IOP_AUTOINC;
|
||||
}
|
||||
|
||||
static __inline__ void iop_start(volatile struct mac_iop *iop)
|
||||
@ -191,14 +191,9 @@ static __inline__ void iop_start(volatile struct mac_iop *iop)
|
||||
iop->status_ctrl = IOP_RUN | IOP_AUTOINC;
|
||||
}
|
||||
|
||||
static __inline__ void iop_bypass(volatile struct mac_iop *iop)
|
||||
{
|
||||
iop->status_ctrl |= IOP_BYPASS;
|
||||
}
|
||||
|
||||
static __inline__ void iop_interrupt(volatile struct mac_iop *iop)
|
||||
{
|
||||
iop->status_ctrl |= IOP_IRQ;
|
||||
iop->status_ctrl = IOP_IRQ | IOP_RUN | IOP_AUTOINC;
|
||||
}
|
||||
|
||||
static int iop_alive(volatile struct mac_iop *iop)
|
||||
@ -244,7 +239,6 @@ void __init iop_preinit(void)
|
||||
} else {
|
||||
iop_base[IOP_NUM_SCC] = (struct mac_iop *) SCC_IOP_BASE_QUADRA;
|
||||
}
|
||||
iop_base[IOP_NUM_SCC]->status_ctrl = 0x87;
|
||||
iop_scc_present = 1;
|
||||
} else {
|
||||
iop_base[IOP_NUM_SCC] = NULL;
|
||||
@ -256,7 +250,7 @@ void __init iop_preinit(void)
|
||||
} else {
|
||||
iop_base[IOP_NUM_ISM] = (struct mac_iop *) ISM_IOP_BASE_QUADRA;
|
||||
}
|
||||
iop_base[IOP_NUM_ISM]->status_ctrl = 0;
|
||||
iop_stop(iop_base[IOP_NUM_ISM]);
|
||||
iop_ism_present = 1;
|
||||
} else {
|
||||
iop_base[IOP_NUM_ISM] = NULL;
|
||||
@ -416,7 +410,8 @@ static void iop_handle_send(uint iop_num, uint chan)
|
||||
msg->status = IOP_MSGSTATUS_UNUSED;
|
||||
msg = msg->next;
|
||||
iop_send_queue[iop_num][chan] = msg;
|
||||
if (msg) iop_do_send(msg);
|
||||
if (msg && iop_readb(iop, IOP_ADDR_SEND_STATE + chan) == IOP_MSG_IDLE)
|
||||
iop_do_send(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -490,16 +485,12 @@ int iop_send_message(uint iop_num, uint chan, void *privdata,
|
||||
|
||||
if (!(q = iop_send_queue[iop_num][chan])) {
|
||||
iop_send_queue[iop_num][chan] = msg;
|
||||
iop_do_send(msg);
|
||||
} else {
|
||||
while (q->next) q = q->next;
|
||||
q->next = msg;
|
||||
}
|
||||
|
||||
if (iop_readb(iop_base[iop_num],
|
||||
IOP_ADDR_SEND_STATE + chan) == IOP_MSG_IDLE) {
|
||||
iop_do_send(msg);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@
|
||||
"Speaker", "OUTL",
|
||||
"Speaker", "OUTR",
|
||||
"INL", "LOUT",
|
||||
"INL", "ROUT";
|
||||
"INR", "ROUT";
|
||||
|
||||
simple-audio-card,aux-devs = <&>;
|
||||
|
||||
|
@ -518,6 +518,7 @@ static int __init dwc3_octeon_device_init(void)
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (res == NULL) {
|
||||
put_device(&pdev->dev);
|
||||
dev_err(&pdev->dev, "No memory resources\n");
|
||||
return -ENXIO;
|
||||
}
|
||||
@ -529,8 +530,10 @@ static int __init dwc3_octeon_device_init(void)
|
||||
* know the difference.
|
||||
*/
|
||||
base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(base))
|
||||
if (IS_ERR(base)) {
|
||||
put_device(&pdev->dev);
|
||||
return PTR_ERR(base);
|
||||
}
|
||||
|
||||
mutex_lock(&dwc3_octeon_clocks_mutex);
|
||||
dwc3_octeon_clocks_start(&pdev->dev, (u64)base);
|
||||
|
@ -20,7 +20,7 @@ static int __init topology_init(void)
|
||||
for_each_present_cpu(i) {
|
||||
struct cpu *c = &per_cpu(cpu_devices, i);
|
||||
|
||||
c->hotpluggable = 1;
|
||||
c->hotpluggable = !!i;
|
||||
ret = register_cpu(c, i);
|
||||
if (ret)
|
||||
printk(KERN_WARNING "topology_init: register_cpu %d "
|
||||
|
@ -539,6 +539,7 @@ static int bridge_probe(struct platform_device *pdev)
|
||||
pci_free_resource_list(&host->windows);
|
||||
err_remove_domain:
|
||||
irq_domain_remove(domain);
|
||||
irq_domain_free_fwnode(fn);
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -546,8 +547,10 @@ static int bridge_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct pci_bus *bus = platform_get_drvdata(pdev);
|
||||
struct bridge_controller *bc = BRIDGE_CONTROLLER(bus);
|
||||
struct fwnode_handle *fn = bc->domain->fwnode;
|
||||
|
||||
irq_domain_remove(bc->domain);
|
||||
irq_domain_free_fwnode(fn);
|
||||
pci_lock_rescan_remove();
|
||||
pci_stop_root_bus(bus);
|
||||
pci_remove_root_bus(bus);
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <linux/export.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/sched/debug.h>
|
||||
#include <linux/sched/task_stack.h>
|
||||
#include <linux/stacktrace.h>
|
||||
|
||||
#include <asm/processor.h>
|
||||
@ -68,12 +69,25 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
|
||||
{
|
||||
unsigned long *sp = NULL;
|
||||
|
||||
if (!try_get_task_stack(tsk))
|
||||
return;
|
||||
|
||||
if (tsk == current)
|
||||
sp = (unsigned long *) &sp;
|
||||
else
|
||||
sp = (unsigned long *) KSTK_ESP(tsk);
|
||||
else {
|
||||
unsigned long ksp;
|
||||
|
||||
/* Locate stack from kernel context */
|
||||
ksp = task_thread_info(tsk)->ksp;
|
||||
ksp += STACK_FRAME_OVERHEAD; /* redzone */
|
||||
ksp += sizeof(struct pt_regs);
|
||||
|
||||
sp = (unsigned long *) ksp;
|
||||
}
|
||||
|
||||
unwind_stack(trace, sp, save_stack_address_nosched);
|
||||
|
||||
put_task_stack(tsk);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(save_stack_trace_tsk);
|
||||
|
||||
|
@ -26,6 +26,67 @@
|
||||
#define __smp_rmb() mb()
|
||||
#define __smp_wmb() mb()
|
||||
|
||||
#define __smp_store_release(p, v) \
|
||||
do { \
|
||||
typeof(p) __p = (p); \
|
||||
union { typeof(*p) __val; char __c[1]; } __u = \
|
||||
{ .__val = (__force typeof(*p)) (v) }; \
|
||||
compiletime_assert_atomic_type(*p); \
|
||||
switch (sizeof(*p)) { \
|
||||
case 1: \
|
||||
asm volatile("stb,ma %0,0(%1)" \
|
||||
: : "r"(*(__u8 *)__u.__c), "r"(__p) \
|
||||
: "memory"); \
|
||||
break; \
|
||||
case 2: \
|
||||
asm volatile("sth,ma %0,0(%1)" \
|
||||
: : "r"(*(__u16 *)__u.__c), "r"(__p) \
|
||||
: "memory"); \
|
||||
break; \
|
||||
case 4: \
|
||||
asm volatile("stw,ma %0,0(%1)" \
|
||||
: : "r"(*(__u32 *)__u.__c), "r"(__p) \
|
||||
: "memory"); \
|
||||
break; \
|
||||
case 8: \
|
||||
if (IS_ENABLED(CONFIG_64BIT)) \
|
||||
asm volatile("std,ma %0,0(%1)" \
|
||||
: : "r"(*(__u64 *)__u.__c), "r"(__p) \
|
||||
: "memory"); \
|
||||
break; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define __smp_load_acquire(p) \
|
||||
({ \
|
||||
union { typeof(*p) __val; char __c[1]; } __u; \
|
||||
typeof(p) __p = (p); \
|
||||
compiletime_assert_atomic_type(*p); \
|
||||
switch (sizeof(*p)) { \
|
||||
case 1: \
|
||||
asm volatile("ldb,ma 0(%1),%0" \
|
||||
: "=r"(*(__u8 *)__u.__c) : "r"(__p) \
|
||||
: "memory"); \
|
||||
break; \
|
||||
case 2: \
|
||||
asm volatile("ldh,ma 0(%1),%0" \
|
||||
: "=r"(*(__u16 *)__u.__c) : "r"(__p) \
|
||||
: "memory"); \
|
||||
break; \
|
||||
case 4: \
|
||||
asm volatile("ldw,ma 0(%1),%0" \
|
||||
: "=r"(*(__u32 *)__u.__c) : "r"(__p) \
|
||||
: "memory"); \
|
||||
break; \
|
||||
case 8: \
|
||||
if (IS_ENABLED(CONFIG_64BIT)) \
|
||||
asm volatile("ldd,ma 0(%1),%0" \
|
||||
: "=r"(*(__u64 *)__u.__c) : "r"(__p) \
|
||||
: "memory"); \
|
||||
break; \
|
||||
} \
|
||||
__u.__val; \
|
||||
})
|
||||
#include <asm-generic/barrier.h>
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
@ -37,12 +37,8 @@ static inline void arch_spin_unlock(arch_spinlock_t *x)
|
||||
volatile unsigned int *a;
|
||||
|
||||
a = __ldcw_align(x);
|
||||
#ifdef CONFIG_SMP
|
||||
(void) __ldcw(a);
|
||||
#else
|
||||
mb();
|
||||
#endif
|
||||
*a = 1;
|
||||
/* Release with ordered store. */
|
||||
__asm__ __volatile__("stw,ma %0,0(%1)" : : "r"(1), "r"(a) : "memory");
|
||||
}
|
||||
|
||||
static inline int arch_spin_trylock(arch_spinlock_t *x)
|
||||
|
@ -454,7 +454,6 @@
|
||||
nop
|
||||
LDREG 0(\ptp),\pte
|
||||
bb,<,n \pte,_PAGE_PRESENT_BIT,3f
|
||||
LDCW 0(\tmp),\tmp1
|
||||
b \fault
|
||||
stw \spc,0(\tmp)
|
||||
99: ALTERNATIVE(98b, 99b, ALT_COND_NO_SMP, INSN_NOP)
|
||||
@ -464,23 +463,26 @@
|
||||
3:
|
||||
.endm
|
||||
|
||||
/* Release pa_tlb_lock lock without reloading lock address. */
|
||||
.macro tlb_unlock0 spc,tmp,tmp1
|
||||
/* Release pa_tlb_lock lock without reloading lock address.
|
||||
Note that the values in the register spc are limited to
|
||||
NR_SPACE_IDS (262144). Thus, the stw instruction always
|
||||
stores a nonzero value even when register spc is 64 bits.
|
||||
We use an ordered store to ensure all prior accesses are
|
||||
performed prior to releasing the lock. */
|
||||
.macro tlb_unlock0 spc,tmp
|
||||
#ifdef CONFIG_SMP
|
||||
98: or,COND(=) %r0,\spc,%r0
|
||||
LDCW 0(\tmp),\tmp1
|
||||
or,COND(=) %r0,\spc,%r0
|
||||
stw \spc,0(\tmp)
|
||||
stw,ma \spc,0(\tmp)
|
||||
99: ALTERNATIVE(98b, 99b, ALT_COND_NO_SMP, INSN_NOP)
|
||||
#endif
|
||||
.endm
|
||||
|
||||
/* Release pa_tlb_lock lock. */
|
||||
.macro tlb_unlock1 spc,tmp,tmp1
|
||||
.macro tlb_unlock1 spc,tmp
|
||||
#ifdef CONFIG_SMP
|
||||
98: load_pa_tlb_lock \tmp
|
||||
99: ALTERNATIVE(98b, 99b, ALT_COND_NO_SMP, INSN_NOP)
|
||||
tlb_unlock0 \spc,\tmp,\tmp1
|
||||
tlb_unlock0 \spc,\tmp
|
||||
#endif
|
||||
.endm
|
||||
|
||||
@ -1163,7 +1165,7 @@ dtlb_miss_20w:
|
||||
|
||||
idtlbt pte,prot
|
||||
|
||||
tlb_unlock1 spc,t0,t1
|
||||
tlb_unlock1 spc,t0
|
||||
rfir
|
||||
nop
|
||||
|
||||
@ -1189,7 +1191,7 @@ nadtlb_miss_20w:
|
||||
|
||||
idtlbt pte,prot
|
||||
|
||||
tlb_unlock1 spc,t0,t1
|
||||
tlb_unlock1 spc,t0
|
||||
rfir
|
||||
nop
|
||||
|
||||
@ -1223,7 +1225,7 @@ dtlb_miss_11:
|
||||
|
||||
mtsp t1, %sr1 /* Restore sr1 */
|
||||
|
||||
tlb_unlock1 spc,t0,t1
|
||||
tlb_unlock1 spc,t0
|
||||
rfir
|
||||
nop
|
||||
|
||||
@ -1256,7 +1258,7 @@ nadtlb_miss_11:
|
||||
|
||||
mtsp t1, %sr1 /* Restore sr1 */
|
||||
|
||||
tlb_unlock1 spc,t0,t1
|
||||
tlb_unlock1 spc,t0
|
||||
rfir
|
||||
nop
|
||||
|
||||
@ -1285,7 +1287,7 @@ dtlb_miss_20:
|
||||
|
||||
idtlbt pte,prot
|
||||
|
||||
tlb_unlock1 spc,t0,t1
|
||||
tlb_unlock1 spc,t0
|
||||
rfir
|
||||
nop
|
||||
|
||||
@ -1313,7 +1315,7 @@ nadtlb_miss_20:
|
||||
|
||||
idtlbt pte,prot
|
||||
|
||||
tlb_unlock1 spc,t0,t1
|
||||
tlb_unlock1 spc,t0
|
||||
rfir
|
||||
nop
|
||||
|
||||
@ -1420,7 +1422,7 @@ itlb_miss_20w:
|
||||
|
||||
iitlbt pte,prot
|
||||
|
||||
tlb_unlock1 spc,t0,t1
|
||||
tlb_unlock1 spc,t0
|
||||
rfir
|
||||
nop
|
||||
|
||||
@ -1444,7 +1446,7 @@ naitlb_miss_20w:
|
||||
|
||||
iitlbt pte,prot
|
||||
|
||||
tlb_unlock1 spc,t0,t1
|
||||
tlb_unlock1 spc,t0
|
||||
rfir
|
||||
nop
|
||||
|
||||
@ -1478,7 +1480,7 @@ itlb_miss_11:
|
||||
|
||||
mtsp t1, %sr1 /* Restore sr1 */
|
||||
|
||||
tlb_unlock1 spc,t0,t1
|
||||
tlb_unlock1 spc,t0
|
||||
rfir
|
||||
nop
|
||||
|
||||
@ -1502,7 +1504,7 @@ naitlb_miss_11:
|
||||
|
||||
mtsp t1, %sr1 /* Restore sr1 */
|
||||
|
||||
tlb_unlock1 spc,t0,t1
|
||||
tlb_unlock1 spc,t0
|
||||
rfir
|
||||
nop
|
||||
|
||||
@ -1532,7 +1534,7 @@ itlb_miss_20:
|
||||
|
||||
iitlbt pte,prot
|
||||
|
||||
tlb_unlock1 spc,t0,t1
|
||||
tlb_unlock1 spc,t0
|
||||
rfir
|
||||
nop
|
||||
|
||||
@ -1552,7 +1554,7 @@ naitlb_miss_20:
|
||||
|
||||
iitlbt pte,prot
|
||||
|
||||
tlb_unlock1 spc,t0,t1
|
||||
tlb_unlock1 spc,t0
|
||||
rfir
|
||||
nop
|
||||
|
||||
@ -1582,7 +1584,7 @@ dbit_trap_20w:
|
||||
|
||||
idtlbt pte,prot
|
||||
|
||||
tlb_unlock0 spc,t0,t1
|
||||
tlb_unlock0 spc,t0
|
||||
rfir
|
||||
nop
|
||||
#else
|
||||
@ -1608,7 +1610,7 @@ dbit_trap_11:
|
||||
|
||||
mtsp t1, %sr1 /* Restore sr1 */
|
||||
|
||||
tlb_unlock0 spc,t0,t1
|
||||
tlb_unlock0 spc,t0
|
||||
rfir
|
||||
nop
|
||||
|
||||
@ -1628,7 +1630,7 @@ dbit_trap_20:
|
||||
|
||||
idtlbt pte,prot
|
||||
|
||||
tlb_unlock0 spc,t0,t1
|
||||
tlb_unlock0 spc,t0
|
||||
rfir
|
||||
nop
|
||||
#endif
|
||||
|
@ -640,11 +640,7 @@ cas_action:
|
||||
sub,<> %r28, %r25, %r0
|
||||
2: stw %r24, 0(%r26)
|
||||
/* Free lock */
|
||||
#ifdef CONFIG_SMP
|
||||
98: LDCW 0(%sr2,%r20), %r1 /* Barrier */
|
||||
99: ALTERNATIVE(98b, 99b, ALT_COND_NO_SMP, INSN_NOP)
|
||||
#endif
|
||||
stw %r20, 0(%sr2,%r20)
|
||||
stw,ma %r20, 0(%sr2,%r20)
|
||||
#if ENABLE_LWS_DEBUG
|
||||
/* Clear thread register indicator */
|
||||
stw %r0, 4(%sr2,%r20)
|
||||
@ -658,11 +654,7 @@ cas_action:
|
||||
3:
|
||||
/* Error occurred on load or store */
|
||||
/* Free lock */
|
||||
#ifdef CONFIG_SMP
|
||||
98: LDCW 0(%sr2,%r20), %r1 /* Barrier */
|
||||
99: ALTERNATIVE(98b, 99b, ALT_COND_NO_SMP, INSN_NOP)
|
||||
#endif
|
||||
stw %r20, 0(%sr2,%r20)
|
||||
stw,ma %r20, 0(%sr2,%r20)
|
||||
#if ENABLE_LWS_DEBUG
|
||||
stw %r0, 4(%sr2,%r20)
|
||||
#endif
|
||||
@ -863,11 +855,7 @@ cas2_action:
|
||||
|
||||
cas2_end:
|
||||
/* Free lock */
|
||||
#ifdef CONFIG_SMP
|
||||
98: LDCW 0(%sr2,%r20), %r1 /* Barrier */
|
||||
99: ALTERNATIVE(98b, 99b, ALT_COND_NO_SMP, INSN_NOP)
|
||||
#endif
|
||||
stw %r20, 0(%sr2,%r20)
|
||||
stw,ma %r20, 0(%sr2,%r20)
|
||||
/* Enable interrupts */
|
||||
ssm PSW_SM_I, %r0
|
||||
/* Return to userspace, set no error */
|
||||
@ -877,11 +865,7 @@ cas2_end:
|
||||
22:
|
||||
/* Error occurred on load or store */
|
||||
/* Free lock */
|
||||
#ifdef CONFIG_SMP
|
||||
98: LDCW 0(%sr2,%r20), %r1 /* Barrier */
|
||||
99: ALTERNATIVE(98b, 99b, ALT_COND_NO_SMP, INSN_NOP)
|
||||
#endif
|
||||
stw %r20, 0(%sr2,%r20)
|
||||
stw,ma %r20, 0(%sr2,%r20)
|
||||
ssm PSW_SM_I, %r0
|
||||
ldo 1(%r0),%r28
|
||||
b lws_exit
|
||||
|
@ -119,7 +119,7 @@ src-wlib-y := string.S crt0.S stdio.c decompress.c main.c \
|
||||
elf_util.c $(zlib-y) devtree.c stdlib.c \
|
||||
oflib.c ofconsole.c cuboot.c
|
||||
|
||||
src-wlib-$(CONFIG_PPC_MPC52XX) += mpc52xx-psc.c
|
||||
src-wlib-$(CONFIG_PPC_MPC52xx) += mpc52xx-psc.c
|
||||
src-wlib-$(CONFIG_PPC64_BOOT_WRAPPER) += opal-calls.S opal.c
|
||||
ifndef CONFIG_PPC64_BOOT_WRAPPER
|
||||
src-wlib-y += crtsavres.S
|
||||
|
@ -128,7 +128,7 @@ int serial_console_init(void)
|
||||
dt_is_compatible(devp, "fsl,cpm2-smc-uart"))
|
||||
rc = cpm_console_init(devp, &serial_cd);
|
||||
#endif
|
||||
#ifdef CONFIG_PPC_MPC52XX
|
||||
#ifdef CONFIG_PPC_MPC52xx
|
||||
else if (dt_is_compatible(devp, "fsl,mpc5200-psc-uart"))
|
||||
rc = mpc5200_psc_console_init(devp, &serial_cd);
|
||||
#endif
|
||||
|
@ -10,8 +10,6 @@
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
#include <asm/paca.h>
|
||||
|
||||
#define __my_cpu_offset local_paca->data_offset
|
||||
|
||||
#endif /* CONFIG_SMP */
|
||||
@ -19,4 +17,6 @@
|
||||
|
||||
#include <asm-generic/percpu.h>
|
||||
|
||||
#include <asm/paca.h>
|
||||
|
||||
#endif /* _ASM_POWERPC_PERCPU_H_ */
|
||||
|
@ -12,6 +12,8 @@
|
||||
|
||||
#ifdef CONFIG_PPC_PERF_CTRS
|
||||
#include <asm/perf_event_server.h>
|
||||
#else
|
||||
static inline bool is_sier_available(void) { return false; }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FSL_EMB_PERF_EVENT
|
||||
|
@ -203,7 +203,7 @@ do { \
|
||||
#endif /* __powerpc64__ */
|
||||
|
||||
#define arch_has_single_step() (1)
|
||||
#ifndef CONFIG_BOOK3S_601
|
||||
#ifndef CONFIG_PPC_BOOK3S_601
|
||||
#define arch_has_block_step() (true)
|
||||
#else
|
||||
#define arch_has_block_step() (false)
|
||||
|
@ -368,8 +368,6 @@ extern int rtas_set_indicator_fast(int indicator, int index, int new_value);
|
||||
extern void rtas_progress(char *s, unsigned short hex);
|
||||
extern int rtas_suspend_cpu(struct rtas_suspend_me_data *data);
|
||||
extern int rtas_suspend_last_cpu(struct rtas_suspend_me_data *data);
|
||||
extern int rtas_online_cpus_mask(cpumask_var_t cpus);
|
||||
extern int rtas_offline_cpus_mask(cpumask_var_t cpus);
|
||||
extern int rtas_ibm_suspend_me(u64 handle);
|
||||
|
||||
struct rtc_time;
|
||||
|
@ -17,7 +17,7 @@ typedef unsigned long cycles_t;
|
||||
|
||||
static inline cycles_t get_cycles(void)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_BOOK3S_601))
|
||||
if (IS_ENABLED(CONFIG_PPC_BOOK3S_601))
|
||||
return 0;
|
||||
|
||||
return mftb();
|
||||
|
@ -842,96 +842,6 @@ static void rtas_percpu_suspend_me(void *info)
|
||||
__rtas_suspend_cpu((struct rtas_suspend_me_data *)info, 1);
|
||||
}
|
||||
|
||||
enum rtas_cpu_state {
|
||||
DOWN,
|
||||
UP,
|
||||
};
|
||||
|
||||
#ifndef CONFIG_SMP
|
||||
static int rtas_cpu_state_change_mask(enum rtas_cpu_state state,
|
||||
cpumask_var_t cpus)
|
||||
{
|
||||
if (!cpumask_empty(cpus)) {
|
||||
cpumask_clear(cpus);
|
||||
return -EINVAL;
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
/* On return cpumask will be altered to indicate CPUs changed.
|
||||
* CPUs with states changed will be set in the mask,
|
||||
* CPUs with status unchanged will be unset in the mask. */
|
||||
static int rtas_cpu_state_change_mask(enum rtas_cpu_state state,
|
||||
cpumask_var_t cpus)
|
||||
{
|
||||
int cpu;
|
||||
int cpuret = 0;
|
||||
int ret = 0;
|
||||
|
||||
if (cpumask_empty(cpus))
|
||||
return 0;
|
||||
|
||||
for_each_cpu(cpu, cpus) {
|
||||
struct device *dev = get_cpu_device(cpu);
|
||||
|
||||
switch (state) {
|
||||
case DOWN:
|
||||
cpuret = device_offline(dev);
|
||||
break;
|
||||
case UP:
|
||||
cpuret = device_online(dev);
|
||||
break;
|
||||
}
|
||||
if (cpuret < 0) {
|
||||
pr_debug("%s: cpu_%s for cpu#%d returned %d.\n",
|
||||
__func__,
|
||||
((state == UP) ? "up" : "down"),
|
||||
cpu, cpuret);
|
||||
if (!ret)
|
||||
ret = cpuret;
|
||||
if (state == UP) {
|
||||
/* clear bits for unchanged cpus, return */
|
||||
cpumask_shift_right(cpus, cpus, cpu);
|
||||
cpumask_shift_left(cpus, cpus, cpu);
|
||||
break;
|
||||
} else {
|
||||
/* clear bit for unchanged cpu, continue */
|
||||
cpumask_clear_cpu(cpu, cpus);
|
||||
}
|
||||
}
|
||||
cond_resched();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
int rtas_online_cpus_mask(cpumask_var_t cpus)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = rtas_cpu_state_change_mask(UP, cpus);
|
||||
|
||||
if (ret) {
|
||||
cpumask_var_t tmp_mask;
|
||||
|
||||
if (!alloc_cpumask_var(&tmp_mask, GFP_KERNEL))
|
||||
return ret;
|
||||
|
||||
/* Use tmp_mask to preserve cpus mask from first failure */
|
||||
cpumask_copy(tmp_mask, cpus);
|
||||
rtas_offline_cpus_mask(tmp_mask);
|
||||
free_cpumask_var(tmp_mask);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int rtas_offline_cpus_mask(cpumask_var_t cpus)
|
||||
{
|
||||
return rtas_cpu_state_change_mask(DOWN, cpus);
|
||||
}
|
||||
|
||||
int rtas_ibm_suspend_me(u64 handle)
|
||||
{
|
||||
long state;
|
||||
@ -939,8 +849,6 @@ int rtas_ibm_suspend_me(u64 handle)
|
||||
unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
|
||||
struct rtas_suspend_me_data data;
|
||||
DECLARE_COMPLETION_ONSTACK(done);
|
||||
cpumask_var_t offline_mask;
|
||||
int cpuret;
|
||||
|
||||
if (!rtas_service_present("ibm,suspend-me"))
|
||||
return -ENOSYS;
|
||||
@ -961,9 +869,6 @@ int rtas_ibm_suspend_me(u64 handle)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if (!alloc_cpumask_var(&offline_mask, GFP_KERNEL))
|
||||
return -ENOMEM;
|
||||
|
||||
atomic_set(&data.working, 0);
|
||||
atomic_set(&data.done, 0);
|
||||
atomic_set(&data.error, 0);
|
||||
@ -972,24 +877,8 @@ int rtas_ibm_suspend_me(u64 handle)
|
||||
|
||||
lock_device_hotplug();
|
||||
|
||||
/* All present CPUs must be online */
|
||||
cpumask_andnot(offline_mask, cpu_present_mask, cpu_online_mask);
|
||||
cpuret = rtas_online_cpus_mask(offline_mask);
|
||||
if (cpuret) {
|
||||
pr_err("%s: Could not bring present CPUs online.\n", __func__);
|
||||
atomic_set(&data.error, cpuret);
|
||||
goto out;
|
||||
}
|
||||
|
||||
cpu_hotplug_disable();
|
||||
|
||||
/* Check if we raced with a CPU-Offline Operation */
|
||||
if (!cpumask_equal(cpu_present_mask, cpu_online_mask)) {
|
||||
pr_info("%s: Raced against a concurrent CPU-Offline\n", __func__);
|
||||
atomic_set(&data.error, -EAGAIN);
|
||||
goto out_hotplug_enable;
|
||||
}
|
||||
|
||||
/* Call function on all CPUs. One of us will make the
|
||||
* rtas call
|
||||
*/
|
||||
@ -1000,18 +889,11 @@ int rtas_ibm_suspend_me(u64 handle)
|
||||
if (atomic_read(&data.error) != 0)
|
||||
printk(KERN_ERR "Error doing global join\n");
|
||||
|
||||
out_hotplug_enable:
|
||||
|
||||
cpu_hotplug_enable();
|
||||
|
||||
/* Take down CPUs not online prior to suspend */
|
||||
cpuret = rtas_offline_cpus_mask(offline_mask);
|
||||
if (cpuret)
|
||||
pr_warn("%s: Could not restore CPUs to offline state.\n",
|
||||
__func__);
|
||||
|
||||
out:
|
||||
unlock_device_hotplug();
|
||||
free_cpumask_var(offline_mask);
|
||||
|
||||
return atomic_read(&data.error);
|
||||
}
|
||||
#else /* CONFIG_PPC_PSERIES */
|
||||
|
@ -682,7 +682,7 @@ int vdso_getcpu_init(void)
|
||||
node = cpu_to_node(cpu);
|
||||
WARN_ON_ONCE(node > 0xffff);
|
||||
|
||||
val = (cpu & 0xfff) | ((node & 0xffff) << 16);
|
||||
val = (cpu & 0xffff) | ((node & 0xffff) << 16);
|
||||
mtspr(SPRN_SPRG_VDSO_WRITE, val);
|
||||
get_paca()->sprg_vdso = val;
|
||||
|
||||
|
@ -83,13 +83,17 @@ static int pkey_initialize(void)
|
||||
scan_pkey_feature();
|
||||
|
||||
/*
|
||||
* Let's assume 32 pkeys on P8 bare metal, if its not defined by device
|
||||
* tree. We make this exception since skiboot forgot to expose this
|
||||
* property on power8.
|
||||
* Let's assume 32 pkeys on P8/P9 bare metal, if its not defined by device
|
||||
* tree. We make this exception since some version of skiboot forgot to
|
||||
* expose this property on power8/9.
|
||||
*/
|
||||
if (!pkeys_devtree_defined && !firmware_has_feature(FW_FEATURE_LPAR) &&
|
||||
cpu_has_feature(CPU_FTRS_POWER8))
|
||||
pkeys_total = 32;
|
||||
if (!pkeys_devtree_defined && !firmware_has_feature(FW_FEATURE_LPAR)) {
|
||||
unsigned long pvr = mfspr(SPRN_PVR);
|
||||
|
||||
if (PVR_VER(pvr) == PVR_POWER8 || PVR_VER(pvr) == PVR_POWER8E ||
|
||||
PVR_VER(pvr) == PVR_POWER8NVL || PVR_VER(pvr) == PVR_POWER9)
|
||||
pkeys_total = 32;
|
||||
}
|
||||
|
||||
/*
|
||||
* Adjust the upper limit, based on the number of bits supported by
|
||||
|
@ -241,6 +241,9 @@ static bool bad_kernel_fault(struct pt_regs *regs, unsigned long error_code,
|
||||
return false;
|
||||
}
|
||||
|
||||
// This comes from 64-bit struct rt_sigframe + __SIGNAL_FRAMESIZE
|
||||
#define SIGFRAME_MAX_SIZE (4096 + 128)
|
||||
|
||||
static bool bad_stack_expansion(struct pt_regs *regs, unsigned long address,
|
||||
struct vm_area_struct *vma, unsigned int flags,
|
||||
bool *must_retry)
|
||||
@ -248,7 +251,7 @@ static bool bad_stack_expansion(struct pt_regs *regs, unsigned long address,
|
||||
/*
|
||||
* N.B. The POWER/Open ABI allows programs to access up to
|
||||
* 288 bytes below the stack pointer.
|
||||
* The kernel signal delivery code writes up to about 1.5kB
|
||||
* The kernel signal delivery code writes a bit over 4KB
|
||||
* below the stack pointer (r1) before decrementing it.
|
||||
* The exec code can write slightly over 640kB to the stack
|
||||
* before setting the user r1. Thus we allow the stack to
|
||||
@ -273,7 +276,7 @@ static bool bad_stack_expansion(struct pt_regs *regs, unsigned long address,
|
||||
* between the last mapped region and the stack will
|
||||
* expand the stack rather than segfaulting.
|
||||
*/
|
||||
if (address + 2048 >= uregs->gpr[1])
|
||||
if (address + SIGFRAME_MAX_SIZE >= uregs->gpr[1])
|
||||
return false;
|
||||
|
||||
if ((flags & FAULT_FLAG_WRITE) && (flags & FAULT_FLAG_USER) &&
|
||||
|
@ -259,7 +259,7 @@ static int pseries_find(unsigned long ea, int psize, bool primary, u64 *v, u64 *
|
||||
for (i = 0; i < HPTES_PER_GROUP; i += 4, hpte_group += 4) {
|
||||
lpar_rc = plpar_pte_read_4(0, hpte_group, (void *)ptes);
|
||||
|
||||
if (lpar_rc != H_SUCCESS)
|
||||
if (lpar_rc)
|
||||
continue;
|
||||
for (j = 0; j < 4; j++) {
|
||||
if (HPTE_V_COMPARE(ptes[j].v, want_v) &&
|
||||
|
@ -27,7 +27,7 @@ static bool rtas_hp_event;
|
||||
unsigned long pseries_memory_block_size(void)
|
||||
{
|
||||
struct device_node *np;
|
||||
unsigned int memblock_size = MIN_MEMORY_BLOCK_SIZE;
|
||||
u64 memblock_size = MIN_MEMORY_BLOCK_SIZE;
|
||||
struct resource r;
|
||||
|
||||
np = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory");
|
||||
|
@ -132,15 +132,11 @@ static ssize_t store_hibernate(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
cpumask_var_t offline_mask;
|
||||
int rc;
|
||||
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (!alloc_cpumask_var(&offline_mask, GFP_KERNEL))
|
||||
return -ENOMEM;
|
||||
|
||||
stream_id = simple_strtoul(buf, NULL, 16);
|
||||
|
||||
do {
|
||||
@ -150,32 +146,16 @@ static ssize_t store_hibernate(struct device *dev,
|
||||
} while (rc == -EAGAIN);
|
||||
|
||||
if (!rc) {
|
||||
/* All present CPUs must be online */
|
||||
cpumask_andnot(offline_mask, cpu_present_mask,
|
||||
cpu_online_mask);
|
||||
rc = rtas_online_cpus_mask(offline_mask);
|
||||
if (rc) {
|
||||
pr_err("%s: Could not bring present CPUs online.\n",
|
||||
__func__);
|
||||
goto out;
|
||||
}
|
||||
|
||||
stop_topology_update();
|
||||
rc = pm_suspend(PM_SUSPEND_MEM);
|
||||
start_topology_update();
|
||||
|
||||
/* Take down CPUs not online prior to suspend */
|
||||
if (!rtas_offline_cpus_mask(offline_mask))
|
||||
pr_warn("%s: Could not restore CPUs to offline "
|
||||
"state.\n", __func__);
|
||||
}
|
||||
|
||||
stream_id = 0;
|
||||
|
||||
if (!rc)
|
||||
rc = count;
|
||||
out:
|
||||
free_cpumask_var(offline_mask);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -2485,23 +2485,36 @@ void gmap_sync_dirty_log_pmd(struct gmap *gmap, unsigned long bitmap[4],
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(gmap_sync_dirty_log_pmd);
|
||||
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
static int thp_split_walk_pmd_entry(pmd_t *pmd, unsigned long addr,
|
||||
unsigned long end, struct mm_walk *walk)
|
||||
{
|
||||
struct vm_area_struct *vma = walk->vma;
|
||||
|
||||
split_huge_pmd(vma, pmd, addr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct mm_walk_ops thp_split_walk_ops = {
|
||||
.pmd_entry = thp_split_walk_pmd_entry,
|
||||
};
|
||||
|
||||
static inline void thp_split_mm(struct mm_struct *mm)
|
||||
{
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
struct vm_area_struct *vma;
|
||||
unsigned long addr;
|
||||
|
||||
for (vma = mm->mmap; vma != NULL; vma = vma->vm_next) {
|
||||
for (addr = vma->vm_start;
|
||||
addr < vma->vm_end;
|
||||
addr += PAGE_SIZE)
|
||||
follow_page(vma, addr, FOLL_SPLIT);
|
||||
vma->vm_flags &= ~VM_HUGEPAGE;
|
||||
vma->vm_flags |= VM_NOHUGEPAGE;
|
||||
walk_page_vma(vma, &thp_split_walk_ops, NULL);
|
||||
}
|
||||
mm->def_flags |= VM_NOHUGEPAGE;
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
static inline void thp_split_mm(struct mm_struct *mm)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
|
||||
|
||||
/*
|
||||
* Remove all empty zero pages from the mapping for lazy refaulting
|
||||
|
@ -82,6 +82,9 @@ device_initcall(landisk_devices_setup);
|
||||
|
||||
static void __init landisk_setup(char **cmdline_p)
|
||||
{
|
||||
/* I/O port identity mapping */
|
||||
__set_io_port_base(0);
|
||||
|
||||
/* LED ON */
|
||||
__raw_writeb(__raw_readb(PA_LED) | 0x03, PA_LED);
|
||||
|
||||
|
@ -238,7 +238,6 @@ CONFIG_DUMMY=y
|
||||
CONFIG_TUN=y
|
||||
CONFIG_VETH=y
|
||||
# CONFIG_ETHERNET is not set
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PPP=y
|
||||
CONFIG_PPP_BSDCOMP=y
|
||||
CONFIG_PPP_DEFLATE=y
|
||||
@ -247,9 +246,6 @@ CONFIG_PPTP=y
|
||||
CONFIG_PPPOL2TP=y
|
||||
CONFIG_USB_RTL8152=y
|
||||
CONFIG_USB_USBNET=y
|
||||
# CONFIG_USB_NET_AX8817X is not set
|
||||
# CONFIG_USB_NET_AX88179_178A is not set
|
||||
# CONFIG_USB_NET_CDCETHER is not set
|
||||
# CONFIG_USB_NET_CDC_NCM is not set
|
||||
# CONFIG_USB_NET_NET1080 is not set
|
||||
# CONFIG_USB_NET_CDC_SUBSET is not set
|
||||
@ -360,6 +356,7 @@ CONFIG_USB_CONFIGFS_F_ACC=y
|
||||
CONFIG_USB_CONFIGFS_F_AUDIO_SRC=y
|
||||
CONFIG_USB_CONFIGFS_F_MIDI=y
|
||||
CONFIG_USB_CONFIGFS_F_HID=y
|
||||
CONFIG_USB_ROLE_SWITCH=y
|
||||
CONFIG_MMC=y
|
||||
# CONFIG_PWRSEQ_EMMC is not set
|
||||
# CONFIG_PWRSEQ_SIMPLE is not set
|
||||
|
@ -127,10 +127,6 @@ ddq_add_8:
|
||||
|
||||
/* generate a unique variable for ddq_add_x */
|
||||
|
||||
.macro setddq n
|
||||
var_ddq_add = ddq_add_\n
|
||||
.endm
|
||||
|
||||
/* generate a unique variable for xmm register */
|
||||
.macro setxdata n
|
||||
var_xdata = %xmm\n
|
||||
@ -140,9 +136,7 @@ ddq_add_8:
|
||||
|
||||
.macro club name, id
|
||||
.altmacro
|
||||
.if \name == DDQ_DATA
|
||||
setddq %\id
|
||||
.elseif \name == XDATA
|
||||
.if \name == XDATA
|
||||
setxdata %\id
|
||||
.endif
|
||||
.noaltmacro
|
||||
@ -165,9 +159,8 @@ ddq_add_8:
|
||||
|
||||
.set i, 1
|
||||
.rept (by - 1)
|
||||
club DDQ_DATA, i
|
||||
club XDATA, i
|
||||
vpaddq var_ddq_add(%rip), xcounter, var_xdata
|
||||
vpaddq (ddq_add_1 + 16 * (i - 1))(%rip), xcounter, var_xdata
|
||||
vptest ddq_low_msk(%rip), var_xdata
|
||||
jnz 1f
|
||||
vpaddq ddq_high_add_1(%rip), var_xdata, var_xdata
|
||||
@ -180,8 +173,7 @@ ddq_add_8:
|
||||
vmovdqa 1*16(p_keys), xkeyA
|
||||
|
||||
vpxor xkey0, xdata0, xdata0
|
||||
club DDQ_DATA, by
|
||||
vpaddq var_ddq_add(%rip), xcounter, xcounter
|
||||
vpaddq (ddq_add_1 + 16 * (by - 1))(%rip), xcounter, xcounter
|
||||
vptest ddq_low_msk(%rip), xcounter
|
||||
jnz 1f
|
||||
vpaddq ddq_high_add_1(%rip), xcounter, xcounter
|
||||
|
@ -266,7 +266,7 @@ ALL_F: .octa 0xffffffffffffffffffffffffffffffff
|
||||
PSHUFB_XMM %xmm2, %xmm0
|
||||
movdqu %xmm0, CurCount(%arg2) # ctx_data.current_counter = iv
|
||||
|
||||
PRECOMPUTE \SUBKEY, %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7,
|
||||
PRECOMPUTE \SUBKEY, %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7
|
||||
movdqu HashKey(%arg2), %xmm13
|
||||
|
||||
CALC_AAD_HASH %xmm13, \AAD, \AADLEN, %xmm0, %xmm1, %xmm2, %xmm3, \
|
||||
@ -978,7 +978,7 @@ _initial_blocks_done\@:
|
||||
* arg1, %arg3, %arg4 are used as pointers only, not modified
|
||||
* %r11 is the data offset value
|
||||
*/
|
||||
.macro GHASH_4_ENCRYPT_4_PARALLEL_ENC TMP1 TMP2 TMP3 TMP4 TMP5 \
|
||||
.macro GHASH_4_ENCRYPT_4_PARALLEL_enc TMP1 TMP2 TMP3 TMP4 TMP5 \
|
||||
TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
|
||||
|
||||
movdqa \XMM1, \XMM5
|
||||
@ -1186,7 +1186,7 @@ aes_loop_par_enc_done\@:
|
||||
* arg1, %arg3, %arg4 are used as pointers only, not modified
|
||||
* %r11 is the data offset value
|
||||
*/
|
||||
.macro GHASH_4_ENCRYPT_4_PARALLEL_DEC TMP1 TMP2 TMP3 TMP4 TMP5 \
|
||||
.macro GHASH_4_ENCRYPT_4_PARALLEL_dec TMP1 TMP2 TMP3 TMP4 TMP5 \
|
||||
TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
|
||||
|
||||
movdqa \XMM1, \XMM5
|
||||
|
@ -642,7 +642,7 @@ static const struct attribute_group *rapl_attr_update[] = {
|
||||
&rapl_events_pkg_group,
|
||||
&rapl_events_ram_group,
|
||||
&rapl_events_gpu_group,
|
||||
&rapl_events_gpu_group,
|
||||
&rapl_events_psys_group,
|
||||
NULL,
|
||||
};
|
||||
|
||||
|
@ -2348,8 +2348,13 @@ static int mp_irqdomain_create(int ioapic)
|
||||
|
||||
static void ioapic_destroy_irqdomain(int idx)
|
||||
{
|
||||
struct ioapic_domain_cfg *cfg = &ioapics[idx].irqdomain_cfg;
|
||||
struct fwnode_handle *fn = ioapics[idx].irqdomain->fwnode;
|
||||
|
||||
if (ioapics[idx].irqdomain) {
|
||||
irq_domain_remove(ioapics[idx].irqdomain);
|
||||
if (!cfg->dev)
|
||||
irq_domain_free_fwnode(fn);
|
||||
ioapics[idx].irqdomain = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -554,6 +554,10 @@ static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq,
|
||||
irqd->chip_data = apicd;
|
||||
irqd->hwirq = virq + i;
|
||||
irqd_set_single_target(irqd);
|
||||
|
||||
/* Don't invoke affinity setter on deactivated interrupts */
|
||||
irqd_set_affinity_on_activate(irqd);
|
||||
|
||||
/*
|
||||
* Legacy vectors are already assigned when the IOAPIC
|
||||
* takes them over. They stay on the same vector. This is
|
||||
|
@ -511,7 +511,7 @@ static void do_inject(void)
|
||||
*/
|
||||
if (inj_type == DFR_INT_INJ) {
|
||||
i_mce.status |= MCI_STATUS_DEFERRED;
|
||||
i_mce.status |= (i_mce.status & ~MCI_STATUS_UC);
|
||||
i_mce.status &= ~MCI_STATUS_UC;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -316,7 +316,7 @@ static unsigned long x86_fsgsbase_read_task(struct task_struct *task,
|
||||
*/
|
||||
mutex_lock(&task->mm->context.lock);
|
||||
ldt = task->mm->context.ldt;
|
||||
if (unlikely(idx >= ldt->nr_entries))
|
||||
if (unlikely(!ldt || idx >= ldt->nr_entries))
|
||||
base = 0;
|
||||
else
|
||||
base = get_desc_base(ldt->entries + idx);
|
||||
|
@ -133,10 +133,15 @@ static const struct freq_desc freq_desc_ann = {
|
||||
.mask = 0x0f,
|
||||
};
|
||||
|
||||
/* 24 MHz crystal? : 24 * 13 / 4 = 78 MHz */
|
||||
/*
|
||||
* 24 MHz crystal? : 24 * 13 / 4 = 78 MHz
|
||||
* Frequency step for Lightning Mountain SoC is fixed to 78 MHz,
|
||||
* so all the frequency entries are 78000.
|
||||
*/
|
||||
static const struct freq_desc freq_desc_lgm = {
|
||||
.use_msr_plat = true,
|
||||
.freqs = { 78000, 78000, 78000, 78000, 78000, 78000, 78000, 78000 },
|
||||
.freqs = { 78000, 78000, 78000, 78000, 78000, 78000, 78000, 78000,
|
||||
78000, 78000, 78000, 78000, 78000, 78000, 78000, 78000 },
|
||||
.mask = 0x0f,
|
||||
};
|
||||
|
||||
|
@ -55,6 +55,10 @@ struct thread_info {
|
||||
mm_segment_t addr_limit; /* thread address space */
|
||||
|
||||
unsigned long cpenable;
|
||||
#if XCHAL_HAVE_EXCLUSIVE
|
||||
/* result of the most recent exclusive store */
|
||||
unsigned long atomctl8;
|
||||
#endif
|
||||
|
||||
/* Allocate storage for extra user states and coprocessor states. */
|
||||
#if XTENSA_HAVE_COPROCESSORS
|
||||
|
@ -93,6 +93,9 @@ int main(void)
|
||||
DEFINE(THREAD_RA, offsetof (struct task_struct, thread.ra));
|
||||
DEFINE(THREAD_SP, offsetof (struct task_struct, thread.sp));
|
||||
DEFINE(THREAD_CPENABLE, offsetof (struct thread_info, cpenable));
|
||||
#if XCHAL_HAVE_EXCLUSIVE
|
||||
DEFINE(THREAD_ATOMCTL8, offsetof (struct thread_info, atomctl8));
|
||||
#endif
|
||||
#if XTENSA_HAVE_COPROCESSORS
|
||||
DEFINE(THREAD_XTREGS_CP0, offsetof(struct thread_info, xtregs_cp.cp0));
|
||||
DEFINE(THREAD_XTREGS_CP1, offsetof(struct thread_info, xtregs_cp.cp1));
|
||||
|
@ -374,6 +374,11 @@ common_exception:
|
||||
s32i a2, a1, PT_LCOUNT
|
||||
#endif
|
||||
|
||||
#if XCHAL_HAVE_EXCLUSIVE
|
||||
/* Clear exclusive access monitor set by interrupted code */
|
||||
clrex
|
||||
#endif
|
||||
|
||||
/* It is now save to restore the EXC_TABLE_FIXUP variable. */
|
||||
|
||||
rsr a2, exccause
|
||||
@ -2024,6 +2029,12 @@ ENTRY(_switch_to)
|
||||
s32i a3, a4, THREAD_CPENABLE
|
||||
#endif
|
||||
|
||||
#if XCHAL_HAVE_EXCLUSIVE
|
||||
l32i a3, a5, THREAD_ATOMCTL8
|
||||
getex a3
|
||||
s32i a3, a4, THREAD_ATOMCTL8
|
||||
#endif
|
||||
|
||||
/* Flush register file. */
|
||||
|
||||
spill_registers_kernel
|
||||
|
@ -401,7 +401,7 @@ static struct pmu xtensa_pmu = {
|
||||
.read = xtensa_pmu_read,
|
||||
};
|
||||
|
||||
static int xtensa_pmu_setup(int cpu)
|
||||
static int xtensa_pmu_setup(unsigned int cpu)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
|
@ -1377,7 +1377,7 @@ static void ioc_timer_fn(struct timer_list *timer)
|
||||
* should have woken up in the last period and expire idle iocgs.
|
||||
*/
|
||||
list_for_each_entry_safe(iocg, tiocg, &ioc->active_iocgs, active_list) {
|
||||
if (!waitqueue_active(&iocg->waitq) && iocg->abs_vdebt &&
|
||||
if (!waitqueue_active(&iocg->waitq) && !iocg->abs_vdebt &&
|
||||
!iocg_is_idle(iocg))
|
||||
continue;
|
||||
|
||||
|
@ -635,6 +635,7 @@ void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst,
|
||||
|
||||
if (!ctx->used)
|
||||
ctx->merge = 0;
|
||||
ctx->init = ctx->more;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(af_alg_pull_tsgl);
|
||||
|
||||
@ -734,9 +735,10 @@ EXPORT_SYMBOL_GPL(af_alg_wmem_wakeup);
|
||||
*
|
||||
* @sk socket of connection to user space
|
||||
* @flags If MSG_DONTWAIT is set, then only report if function would sleep
|
||||
* @min Set to minimum request size if partial requests are allowed.
|
||||
* @return 0 when writable memory is available, < 0 upon error
|
||||
*/
|
||||
int af_alg_wait_for_data(struct sock *sk, unsigned flags)
|
||||
int af_alg_wait_for_data(struct sock *sk, unsigned flags, unsigned min)
|
||||
{
|
||||
DEFINE_WAIT_FUNC(wait, woken_wake_function);
|
||||
struct alg_sock *ask = alg_sk(sk);
|
||||
@ -754,7 +756,9 @@ int af_alg_wait_for_data(struct sock *sk, unsigned flags)
|
||||
if (signal_pending(current))
|
||||
break;
|
||||
timeout = MAX_SCHEDULE_TIMEOUT;
|
||||
if (sk_wait_event(sk, &timeout, (ctx->used || !ctx->more),
|
||||
if (sk_wait_event(sk, &timeout,
|
||||
ctx->init && (!ctx->more ||
|
||||
(min && ctx->used >= min)),
|
||||
&wait)) {
|
||||
err = 0;
|
||||
break;
|
||||
@ -843,10 +847,11 @@ int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size,
|
||||
}
|
||||
|
||||
lock_sock(sk);
|
||||
if (!ctx->more && ctx->used) {
|
||||
if (ctx->init && (init || !ctx->more)) {
|
||||
err = -EINVAL;
|
||||
goto unlock;
|
||||
}
|
||||
ctx->init = true;
|
||||
|
||||
if (init) {
|
||||
ctx->enc = enc;
|
||||
|
@ -106,8 +106,8 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg,
|
||||
size_t usedpages = 0; /* [in] RX bufs to be used from user */
|
||||
size_t processed = 0; /* [in] TX bufs to be consumed */
|
||||
|
||||
if (!ctx->used) {
|
||||
err = af_alg_wait_for_data(sk, flags);
|
||||
if (!ctx->init || ctx->more) {
|
||||
err = af_alg_wait_for_data(sk, flags, 0);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
@ -558,12 +558,6 @@ static int aead_accept_parent_nokey(void *private, struct sock *sk)
|
||||
|
||||
INIT_LIST_HEAD(&ctx->tsgl_list);
|
||||
ctx->len = len;
|
||||
ctx->used = 0;
|
||||
atomic_set(&ctx->rcvused, 0);
|
||||
ctx->more = 0;
|
||||
ctx->merge = 0;
|
||||
ctx->enc = 0;
|
||||
ctx->aead_assoclen = 0;
|
||||
crypto_init_wait(&ctx->wait);
|
||||
|
||||
ask->private = ctx;
|
||||
|
@ -61,8 +61,8 @@ static int _skcipher_recvmsg(struct socket *sock, struct msghdr *msg,
|
||||
int err = 0;
|
||||
size_t len = 0;
|
||||
|
||||
if (!ctx->used) {
|
||||
err = af_alg_wait_for_data(sk, flags);
|
||||
if (!ctx->init || (ctx->more && ctx->used < bs)) {
|
||||
err = af_alg_wait_for_data(sk, flags, bs);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
@ -333,6 +333,7 @@ static int skcipher_accept_parent_nokey(void *private, struct sock *sk)
|
||||
ctx = sock_kmalloc(sk, len, GFP_KERNEL);
|
||||
if (!ctx)
|
||||
return -ENOMEM;
|
||||
memset(ctx, 0, len);
|
||||
|
||||
ctx->iv = sock_kmalloc(sk, crypto_skcipher_ivsize(tfm),
|
||||
GFP_KERNEL);
|
||||
@ -340,16 +341,10 @@ static int skcipher_accept_parent_nokey(void *private, struct sock *sk)
|
||||
sock_kfree_s(sk, ctx, len);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memset(ctx->iv, 0, crypto_skcipher_ivsize(tfm));
|
||||
|
||||
INIT_LIST_HEAD(&ctx->tsgl_list);
|
||||
ctx->len = len;
|
||||
ctx->used = 0;
|
||||
atomic_set(&ctx->rcvused, 0);
|
||||
ctx->more = 0;
|
||||
ctx->merge = 0;
|
||||
ctx->enc = 0;
|
||||
crypto_init_wait(&ctx->wait);
|
||||
|
||||
ask->private = ctx;
|
||||
|
@ -473,10 +473,6 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
|
||||
(u8)access_byte_width;
|
||||
}
|
||||
}
|
||||
/* An additional reference for the container */
|
||||
|
||||
acpi_ut_add_reference(obj_desc->field.region_obj);
|
||||
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
|
||||
"RegionField: BitOff %X, Off %X, Gran %X, Region %p\n",
|
||||
obj_desc->field.start_field_bit_offset,
|
||||
|
@ -568,11 +568,6 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
|
||||
next_object = object->buffer_field.buffer_obj;
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
||||
|
||||
next_object = object->field.region_obj;
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
||||
|
||||
next_object = object->bank_field.bank_obj;
|
||||
@ -613,6 +608,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
|
||||
}
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
||||
case ACPI_TYPE_REGION:
|
||||
default:
|
||||
|
||||
|
@ -65,6 +65,7 @@
|
||||
#include <linux/ratelimit.h>
|
||||
#include <linux/syscalls.h>
|
||||
#include <linux/task_work.h>
|
||||
#include <linux/android_vendor.h>
|
||||
|
||||
#include <uapi/linux/sched/types.h>
|
||||
#include <uapi/linux/android/binder.h>
|
||||
@ -75,6 +76,7 @@
|
||||
#include "binder_alloc.h"
|
||||
#include "binder_internal.h"
|
||||
#include "binder_trace.h"
|
||||
#include <trace/hooks/binder.h>
|
||||
|
||||
static HLIST_HEAD(binder_deferred_list);
|
||||
static DEFINE_MUTEX(binder_deferred_lock);
|
||||
@ -620,6 +622,7 @@ struct binder_transaction {
|
||||
* during thread teardown
|
||||
*/
|
||||
spinlock_t lock;
|
||||
ANDROID_VENDOR_DATA(1);
|
||||
};
|
||||
|
||||
/**
|
||||
@ -1217,6 +1220,7 @@ static void binder_transaction_priority(struct task_struct *task,
|
||||
}
|
||||
|
||||
binder_set_priority(task, desired_prio);
|
||||
trace_android_vh_binder_set_priority(t, task);
|
||||
}
|
||||
|
||||
static struct binder_node *binder_get_node_ilocked(struct binder_proc *proc,
|
||||
@ -3234,6 +3238,7 @@ static void binder_transaction(struct binder_proc *proc,
|
||||
INIT_LIST_HEAD(&t->fd_fixups);
|
||||
binder_stats_created(BINDER_STAT_TRANSACTION);
|
||||
spin_lock_init(&t->lock);
|
||||
trace_android_vh_binder_transaction_init(t);
|
||||
|
||||
tcomplete = kzalloc(sizeof(*tcomplete), GFP_KERNEL);
|
||||
if (tcomplete == NULL) {
|
||||
@ -3615,6 +3620,7 @@ static void binder_transaction(struct binder_proc *proc,
|
||||
}
|
||||
#endif
|
||||
wake_up_interruptible_sync(&target_thread->wait);
|
||||
trace_android_vh_binder_restore_priority(in_reply_to, current);
|
||||
binder_restore_priority(current, in_reply_to->saved_priority);
|
||||
binder_free_transaction(in_reply_to);
|
||||
} else if (!(t->flags & TF_ONE_WAY)) {
|
||||
@ -3726,6 +3732,7 @@ static void binder_transaction(struct binder_proc *proc,
|
||||
|
||||
BUG_ON(thread->return_error.cmd != BR_OK);
|
||||
if (in_reply_to) {
|
||||
trace_android_vh_binder_restore_priority(in_reply_to, current);
|
||||
binder_restore_priority(current, in_reply_to->saved_priority);
|
||||
thread->return_error.cmd = BR_TRANSACTION_COMPLETE;
|
||||
binder_enqueue_thread_work(thread, &thread->return_error.work);
|
||||
@ -4393,6 +4400,7 @@ static int binder_thread_read(struct binder_proc *proc,
|
||||
wait_event_interruptible(binder_user_error_wait,
|
||||
binder_stop_on_user_error < 2);
|
||||
}
|
||||
trace_android_vh_binder_restore_priority(NULL, current);
|
||||
binder_restore_priority(current, proc->default_priority);
|
||||
}
|
||||
|
||||
|
@ -8,12 +8,24 @@
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/hooks/vendor_hooks.h>
|
||||
#include <trace/hooks/sched.h>
|
||||
#include <trace/hooks/dtask.h>
|
||||
#include <trace/hooks/net.h>
|
||||
#include <trace/hooks/binder.h>
|
||||
#include <trace/hooks/rwsem.h>
|
||||
#include <trace/hooks/futex.h>
|
||||
#include <trace/hooks/fpsimd.h>
|
||||
|
||||
/*
|
||||
* Export tracepoints that act as a bare tracehook (ie: have no trace event
|
||||
* associated with them) to allow external modules to probe them.
|
||||
*/
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_select_task_rq_fair);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_rtmutex_prepare_setprio);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_prepare_prio_fork);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_finish_prio_fork);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_user_nice);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_setscheduler);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mutex_wait_start);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mutex_wait_finish);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_read_wait_start);
|
||||
@ -21,4 +33,14 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_read_wait_finish);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_write_wait_start);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_write_wait_finish);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sched_show_task);
|
||||
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ptype_head);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_kfree_skb);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_transaction_init);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_set_priority);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_restore_priority);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_init);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_wake);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_write_finished);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_rwsem_list_add);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_futex_plist_add);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_is_fpsimd_save);
|
||||
|
@ -893,7 +893,9 @@ static int __device_attach(struct device *dev, bool allow_async)
|
||||
int ret = 0;
|
||||
|
||||
device_lock(dev);
|
||||
if (dev->driver) {
|
||||
if (dev->p->dead) {
|
||||
goto out_unlock;
|
||||
} else if (dev->driver) {
|
||||
if (device_is_bound(dev)) {
|
||||
ret = 1;
|
||||
goto out_unlock;
|
||||
|
@ -2399,6 +2399,8 @@ static void __exit loop_exit(void)
|
||||
|
||||
range = max_loop ? max_loop << part_shift : 1UL << MINORBITS;
|
||||
|
||||
mutex_lock(&loop_ctl_mutex);
|
||||
|
||||
idr_for_each(&loop_index_idr, &loop_exit_cb, NULL);
|
||||
idr_destroy(&loop_index_idr);
|
||||
|
||||
@ -2406,6 +2408,8 @@ static void __exit loop_exit(void)
|
||||
unregister_blkdev(LOOP_MAJOR, "loop");
|
||||
|
||||
misc_deregister(&loop_misc);
|
||||
|
||||
mutex_unlock(&loop_ctl_mutex);
|
||||
}
|
||||
|
||||
module_init(loop_init);
|
||||
|
@ -328,7 +328,7 @@ static const struct btmrvl_sdio_device btmrvl_sdio_sd8897 = {
|
||||
|
||||
static const struct btmrvl_sdio_device btmrvl_sdio_sd8977 = {
|
||||
.helper = NULL,
|
||||
.firmware = "mrvl/sd8977_uapsta.bin",
|
||||
.firmware = "mrvl/sdsd8977_combo_v2.bin",
|
||||
.reg = &btmrvl_reg_8977,
|
||||
.support_pscan_win_report = true,
|
||||
.sd_blksz_fw_dl = 256,
|
||||
@ -346,7 +346,7 @@ static const struct btmrvl_sdio_device btmrvl_sdio_sd8987 = {
|
||||
|
||||
static const struct btmrvl_sdio_device btmrvl_sdio_sd8997 = {
|
||||
.helper = NULL,
|
||||
.firmware = "mrvl/sd8997_uapsta.bin",
|
||||
.firmware = "mrvl/sdsd8997_combo_v4.bin",
|
||||
.reg = &btmrvl_reg_8997,
|
||||
.support_pscan_win_report = true,
|
||||
.sd_blksz_fw_dl = 256,
|
||||
@ -1831,6 +1831,6 @@ MODULE_FIRMWARE("mrvl/sd8787_uapsta.bin");
|
||||
MODULE_FIRMWARE("mrvl/sd8797_uapsta.bin");
|
||||
MODULE_FIRMWARE("mrvl/sd8887_uapsta.bin");
|
||||
MODULE_FIRMWARE("mrvl/sd8897_uapsta.bin");
|
||||
MODULE_FIRMWARE("mrvl/sd8977_uapsta.bin");
|
||||
MODULE_FIRMWARE("mrvl/sdsd8977_combo_v2.bin");
|
||||
MODULE_FIRMWARE("mrvl/sd8987_uapsta.bin");
|
||||
MODULE_FIRMWARE("mrvl/sd8997_uapsta.bin");
|
||||
MODULE_FIRMWARE("mrvl/sdsd8997_combo_v4.bin");
|
||||
|
@ -684,7 +684,7 @@ static int mtk_setup_firmware(struct hci_dev *hdev, const char *fwname)
|
||||
const u8 *fw_ptr;
|
||||
size_t fw_size;
|
||||
int err, dlen;
|
||||
u8 flag;
|
||||
u8 flag, param;
|
||||
|
||||
err = request_firmware(&fw, fwname, &hdev->dev);
|
||||
if (err < 0) {
|
||||
@ -692,6 +692,20 @@ static int mtk_setup_firmware(struct hci_dev *hdev, const char *fwname)
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Power on data RAM the firmware relies on. */
|
||||
param = 1;
|
||||
wmt_params.op = MTK_WMT_FUNC_CTRL;
|
||||
wmt_params.flag = 3;
|
||||
wmt_params.dlen = sizeof(param);
|
||||
wmt_params.data = ¶m;
|
||||
wmt_params.status = NULL;
|
||||
|
||||
err = mtk_hci_wmt_sync(hdev, &wmt_params);
|
||||
if (err < 0) {
|
||||
bt_dev_err(hdev, "Failed to power on data RAM (%d)", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
fw_ptr = fw->data;
|
||||
fw_size = fw->size;
|
||||
|
||||
|
@ -2792,7 +2792,7 @@ static int btusb_mtk_setup_firmware(struct hci_dev *hdev, const char *fwname)
|
||||
const u8 *fw_ptr;
|
||||
size_t fw_size;
|
||||
int err, dlen;
|
||||
u8 flag;
|
||||
u8 flag, param;
|
||||
|
||||
err = request_firmware(&fw, fwname, &hdev->dev);
|
||||
if (err < 0) {
|
||||
@ -2800,6 +2800,20 @@ static int btusb_mtk_setup_firmware(struct hci_dev *hdev, const char *fwname)
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Power on data RAM the firmware relies on. */
|
||||
param = 1;
|
||||
wmt_params.op = BTMTK_WMT_FUNC_CTRL;
|
||||
wmt_params.flag = 3;
|
||||
wmt_params.dlen = sizeof(param);
|
||||
wmt_params.data = ¶m;
|
||||
wmt_params.status = NULL;
|
||||
|
||||
err = btusb_mtk_hci_wmt_sync(hdev, &wmt_params);
|
||||
if (err < 0) {
|
||||
bt_dev_err(hdev, "Failed to power on data RAM (%d)", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
fw_ptr = fw->data;
|
||||
fw_size = fw->size;
|
||||
|
||||
|
@ -790,7 +790,7 @@ static int h5_serdev_probe(struct serdev_device *serdev)
|
||||
if (!h5)
|
||||
return -ENOMEM;
|
||||
|
||||
set_bit(HCI_UART_RESET_ON_INIT, &h5->serdev_hu.flags);
|
||||
set_bit(HCI_UART_RESET_ON_INIT, &h5->serdev_hu.hdev_flags);
|
||||
|
||||
h5->hu = &h5->serdev_hu;
|
||||
h5->serdev_hu.serdev = serdev;
|
||||
|
@ -357,7 +357,8 @@ void hci_uart_unregister_device(struct hci_uart *hu)
|
||||
struct hci_dev *hdev = hu->hdev;
|
||||
|
||||
clear_bit(HCI_UART_PROTO_READY, &hu->flags);
|
||||
hci_unregister_dev(hdev);
|
||||
if (test_bit(HCI_UART_REGISTERED, &hu->flags))
|
||||
hci_unregister_dev(hdev);
|
||||
hci_free_dev(hdev);
|
||||
|
||||
cancel_work_sync(&hu->write_work);
|
||||
|
@ -1371,6 +1371,10 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
|
||||
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
|
||||
SYSC_QUIRK("tptc", 0, 0, -ENODEV, -ENODEV, 0x40007c00, 0xffffffff,
|
||||
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
|
||||
SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, 0x14, 0x50700100, 0xffffffff,
|
||||
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
|
||||
SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, -ENODEV, 0x50700101, 0xffffffff,
|
||||
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
|
||||
SYSC_QUIRK("usb_otg_hs", 0, 0x400, 0x404, 0x408, 0x00000050,
|
||||
0xffffffff, SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
|
||||
SYSC_QUIRK("usb_otg_hs", 0, 0, 0x10, -ENODEV, 0x4ea2080d, 0xffffffff,
|
||||
@ -1440,8 +1444,6 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
|
||||
SYSC_QUIRK("tpcc", 0, 0, -ENODEV, -ENODEV, 0x40014c00, 0xffffffff, 0),
|
||||
SYSC_QUIRK("usbhstll", 0, 0, 0x10, 0x14, 0x00000004, 0xffffffff, 0),
|
||||
SYSC_QUIRK("usbhstll", 0, 0, 0x10, 0x14, 0x00000008, 0xffffffff, 0),
|
||||
SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, 0x14, 0x50700100, 0xffffffff, 0),
|
||||
SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, -ENODEV, 0x50700101, 0xffffffff, 0),
|
||||
SYSC_QUIRK("venc", 0x58003000, 0, -ENODEV, -ENODEV, 0x00000002, 0xffffffff, 0),
|
||||
SYSC_QUIRK("vfpe", 0, 0, 0x104, -ENODEV, 0x4d001200, 0xffffffff, 0),
|
||||
#endif
|
||||
|
@ -304,8 +304,10 @@ static int intel_gtt_setup_scratch_page(void)
|
||||
if (intel_private.needs_dmar) {
|
||||
dma_addr = pci_map_page(intel_private.pcidev, page, 0,
|
||||
PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
|
||||
if (pci_dma_mapping_error(intel_private.pcidev, dma_addr))
|
||||
if (pci_dma_mapping_error(intel_private.pcidev, dma_addr)) {
|
||||
__free_page(page);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
intel_private.scratch_page_dma = dma_addr;
|
||||
} else
|
||||
|
@ -386,13 +386,8 @@ struct tpm_chip *tpm_chip_alloc(struct device *pdev,
|
||||
chip->cdev.owner = THIS_MODULE;
|
||||
chip->cdevs.owner = THIS_MODULE;
|
||||
|
||||
chip->work_space.context_buf = kzalloc(PAGE_SIZE, GFP_KERNEL);
|
||||
if (!chip->work_space.context_buf) {
|
||||
rc = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
chip->work_space.session_buf = kzalloc(PAGE_SIZE, GFP_KERNEL);
|
||||
if (!chip->work_space.session_buf) {
|
||||
rc = tpm2_init_space(&chip->work_space, TPM2_SPACE_BUFFER_SIZE);
|
||||
if (rc) {
|
||||
rc = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
@ -177,6 +177,9 @@ struct tpm_header {
|
||||
|
||||
#define TPM_TAG_RQU_COMMAND 193
|
||||
|
||||
/* TPM2 specific constants. */
|
||||
#define TPM2_SPACE_BUFFER_SIZE 16384 /* 16 kB */
|
||||
|
||||
struct stclear_flags_t {
|
||||
__be16 tag;
|
||||
u8 deactivated;
|
||||
@ -456,7 +459,7 @@ void tpm2_shutdown(struct tpm_chip *chip, u16 shutdown_type);
|
||||
unsigned long tpm2_calc_ordinal_duration(struct tpm_chip *chip, u32 ordinal);
|
||||
int tpm2_probe(struct tpm_chip *chip);
|
||||
int tpm2_find_cc(struct tpm_chip *chip, u32 cc);
|
||||
int tpm2_init_space(struct tpm_space *space);
|
||||
int tpm2_init_space(struct tpm_space *space, unsigned int buf_size);
|
||||
void tpm2_del_space(struct tpm_chip *chip, struct tpm_space *space);
|
||||
void tpm2_flush_space(struct tpm_chip *chip);
|
||||
int tpm2_prepare_space(struct tpm_chip *chip, struct tpm_space *space, u8 *cmd,
|
||||
|
@ -38,18 +38,21 @@ static void tpm2_flush_sessions(struct tpm_chip *chip, struct tpm_space *space)
|
||||
}
|
||||
}
|
||||
|
||||
int tpm2_init_space(struct tpm_space *space)
|
||||
int tpm2_init_space(struct tpm_space *space, unsigned int buf_size)
|
||||
{
|
||||
space->context_buf = kzalloc(PAGE_SIZE, GFP_KERNEL);
|
||||
space->context_buf = kzalloc(buf_size, GFP_KERNEL);
|
||||
if (!space->context_buf)
|
||||
return -ENOMEM;
|
||||
|
||||
space->session_buf = kzalloc(PAGE_SIZE, GFP_KERNEL);
|
||||
space->session_buf = kzalloc(buf_size, GFP_KERNEL);
|
||||
if (space->session_buf == NULL) {
|
||||
kfree(space->context_buf);
|
||||
/* Prevent caller getting a dangling pointer. */
|
||||
space->context_buf = NULL;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
space->buf_size = buf_size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -311,8 +314,10 @@ int tpm2_prepare_space(struct tpm_chip *chip, struct tpm_space *space, u8 *cmd,
|
||||
sizeof(space->context_tbl));
|
||||
memcpy(&chip->work_space.session_tbl, &space->session_tbl,
|
||||
sizeof(space->session_tbl));
|
||||
memcpy(chip->work_space.context_buf, space->context_buf, PAGE_SIZE);
|
||||
memcpy(chip->work_space.session_buf, space->session_buf, PAGE_SIZE);
|
||||
memcpy(chip->work_space.context_buf, space->context_buf,
|
||||
space->buf_size);
|
||||
memcpy(chip->work_space.session_buf, space->session_buf,
|
||||
space->buf_size);
|
||||
|
||||
rc = tpm2_load_space(chip);
|
||||
if (rc) {
|
||||
@ -492,7 +497,7 @@ static int tpm2_save_space(struct tpm_chip *chip)
|
||||
continue;
|
||||
|
||||
rc = tpm2_save_context(chip, space->context_tbl[i],
|
||||
space->context_buf, PAGE_SIZE,
|
||||
space->context_buf, space->buf_size,
|
||||
&offset);
|
||||
if (rc == -ENOENT) {
|
||||
space->context_tbl[i] = 0;
|
||||
@ -509,9 +514,8 @@ static int tpm2_save_space(struct tpm_chip *chip)
|
||||
continue;
|
||||
|
||||
rc = tpm2_save_context(chip, space->session_tbl[i],
|
||||
space->session_buf, PAGE_SIZE,
|
||||
space->session_buf, space->buf_size,
|
||||
&offset);
|
||||
|
||||
if (rc == -ENOENT) {
|
||||
/* handle error saving session, just forget it */
|
||||
space->session_tbl[i] = 0;
|
||||
@ -557,8 +561,10 @@ int tpm2_commit_space(struct tpm_chip *chip, struct tpm_space *space,
|
||||
sizeof(space->context_tbl));
|
||||
memcpy(&space->session_tbl, &chip->work_space.session_tbl,
|
||||
sizeof(space->session_tbl));
|
||||
memcpy(space->context_buf, chip->work_space.context_buf, PAGE_SIZE);
|
||||
memcpy(space->session_buf, chip->work_space.session_buf, PAGE_SIZE);
|
||||
memcpy(space->context_buf, chip->work_space.context_buf,
|
||||
space->buf_size);
|
||||
memcpy(space->session_buf, chip->work_space.session_buf,
|
||||
space->buf_size);
|
||||
|
||||
return 0;
|
||||
out:
|
||||
|
@ -21,7 +21,7 @@ static int tpmrm_open(struct inode *inode, struct file *file)
|
||||
if (priv == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
rc = tpm2_init_space(&priv->space);
|
||||
rc = tpm2_init_space(&priv->space, TPM2_SPACE_BUFFER_SIZE);
|
||||
if (rc) {
|
||||
kfree(priv);
|
||||
return -ENOMEM;
|
||||
|
@ -183,7 +183,7 @@ static OWL_GATE(timer_clk, "timer_clk", "hosc", CMU_DEVCLKEN1, 27, 0, 0);
|
||||
static OWL_GATE(hdmi_clk, "hdmi_clk", "hosc", CMU_DEVCLKEN1, 3, 0, 0);
|
||||
|
||||
/* divider clocks */
|
||||
static OWL_DIVIDER(h_clk, "h_clk", "ahbprevdiv_clk", CMU_BUSCLK1, 12, 2, NULL, 0, 0);
|
||||
static OWL_DIVIDER(h_clk, "h_clk", "ahbprediv_clk", CMU_BUSCLK1, 12, 2, NULL, 0, 0);
|
||||
static OWL_DIVIDER(rmii_ref_clk, "rmii_ref_clk", "ethernet_pll_clk", CMU_ETHERNETPLL, 1, 1, rmii_ref_div_table, 0, 0);
|
||||
|
||||
/* factor clocks */
|
||||
|
@ -314,6 +314,7 @@ struct bcm2835_cprman {
|
||||
struct device *dev;
|
||||
void __iomem *regs;
|
||||
spinlock_t regs_lock; /* spinlock for all clocks */
|
||||
unsigned int soc;
|
||||
|
||||
/*
|
||||
* Real names of cprman clock parents looked up through
|
||||
@ -525,6 +526,20 @@ static int bcm2835_pll_is_on(struct clk_hw *hw)
|
||||
A2W_PLL_CTRL_PRST_DISABLE;
|
||||
}
|
||||
|
||||
static u32 bcm2835_pll_get_prediv_mask(struct bcm2835_cprman *cprman,
|
||||
const struct bcm2835_pll_data *data)
|
||||
{
|
||||
/*
|
||||
* On BCM2711 there isn't a pre-divisor available in the PLL feedback
|
||||
* loop. Bits 13:14 of ANA1 (PLLA,PLLB,PLLC,PLLD) have been re-purposed
|
||||
* for to for VCO RANGE bits.
|
||||
*/
|
||||
if (cprman->soc & SOC_BCM2711)
|
||||
return 0;
|
||||
|
||||
return data->ana->fb_prediv_mask;
|
||||
}
|
||||
|
||||
static void bcm2835_pll_choose_ndiv_and_fdiv(unsigned long rate,
|
||||
unsigned long parent_rate,
|
||||
u32 *ndiv, u32 *fdiv)
|
||||
@ -582,7 +597,7 @@ static unsigned long bcm2835_pll_get_rate(struct clk_hw *hw,
|
||||
ndiv = (a2wctrl & A2W_PLL_CTRL_NDIV_MASK) >> A2W_PLL_CTRL_NDIV_SHIFT;
|
||||
pdiv = (a2wctrl & A2W_PLL_CTRL_PDIV_MASK) >> A2W_PLL_CTRL_PDIV_SHIFT;
|
||||
using_prediv = cprman_read(cprman, data->ana_reg_base + 4) &
|
||||
data->ana->fb_prediv_mask;
|
||||
bcm2835_pll_get_prediv_mask(cprman, data);
|
||||
|
||||
if (using_prediv) {
|
||||
ndiv *= 2;
|
||||
@ -665,6 +680,7 @@ static int bcm2835_pll_set_rate(struct clk_hw *hw,
|
||||
struct bcm2835_pll *pll = container_of(hw, struct bcm2835_pll, hw);
|
||||
struct bcm2835_cprman *cprman = pll->cprman;
|
||||
const struct bcm2835_pll_data *data = pll->data;
|
||||
u32 prediv_mask = bcm2835_pll_get_prediv_mask(cprman, data);
|
||||
bool was_using_prediv, use_fb_prediv, do_ana_setup_first;
|
||||
u32 ndiv, fdiv, a2w_ctl;
|
||||
u32 ana[4];
|
||||
@ -682,7 +698,7 @@ static int bcm2835_pll_set_rate(struct clk_hw *hw,
|
||||
for (i = 3; i >= 0; i--)
|
||||
ana[i] = cprman_read(cprman, data->ana_reg_base + i * 4);
|
||||
|
||||
was_using_prediv = ana[1] & data->ana->fb_prediv_mask;
|
||||
was_using_prediv = ana[1] & prediv_mask;
|
||||
|
||||
ana[0] &= ~data->ana->mask0;
|
||||
ana[0] |= data->ana->set0;
|
||||
@ -692,10 +708,10 @@ static int bcm2835_pll_set_rate(struct clk_hw *hw,
|
||||
ana[3] |= data->ana->set3;
|
||||
|
||||
if (was_using_prediv && !use_fb_prediv) {
|
||||
ana[1] &= ~data->ana->fb_prediv_mask;
|
||||
ana[1] &= ~prediv_mask;
|
||||
do_ana_setup_first = true;
|
||||
} else if (!was_using_prediv && use_fb_prediv) {
|
||||
ana[1] |= data->ana->fb_prediv_mask;
|
||||
ana[1] |= prediv_mask;
|
||||
do_ana_setup_first = false;
|
||||
} else {
|
||||
do_ana_setup_first = true;
|
||||
@ -2234,6 +2250,7 @@ static int bcm2835_clk_probe(struct platform_device *pdev)
|
||||
platform_set_drvdata(pdev, cprman);
|
||||
|
||||
cprman->onecell.num = asize;
|
||||
cprman->soc = pdata->soc;
|
||||
hws = cprman->onecell.hws;
|
||||
|
||||
for (i = 0; i < asize; i++) {
|
||||
|
@ -155,6 +155,7 @@ static int clk_bcm63xx_probe(struct platform_device *pdev)
|
||||
|
||||
for (entry = table; entry->name; entry++)
|
||||
maxbit = max_t(u8, maxbit, entry->bit);
|
||||
maxbit++;
|
||||
|
||||
hw = devm_kzalloc(&pdev->dev, struct_size(hw, data.hws, maxbit),
|
||||
GFP_KERNEL);
|
||||
|
@ -103,6 +103,8 @@ static const struct clk_ops scmi_clk_ops = {
|
||||
static int scmi_clk_ops_init(struct device *dev, struct scmi_clk *sclk)
|
||||
{
|
||||
int ret;
|
||||
unsigned long min_rate, max_rate;
|
||||
|
||||
struct clk_init_data init = {
|
||||
.flags = CLK_GET_RATE_NOCACHE,
|
||||
.num_parents = 0,
|
||||
@ -112,9 +114,23 @@ static int scmi_clk_ops_init(struct device *dev, struct scmi_clk *sclk)
|
||||
|
||||
sclk->hw.init = &init;
|
||||
ret = devm_clk_hw_register(dev, &sclk->hw);
|
||||
if (!ret)
|
||||
clk_hw_set_rate_range(&sclk->hw, sclk->info->range.min_rate,
|
||||
sclk->info->range.max_rate);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (sclk->info->rate_discrete) {
|
||||
int num_rates = sclk->info->list.num_rates;
|
||||
|
||||
if (num_rates <= 0)
|
||||
return -EINVAL;
|
||||
|
||||
min_rate = sclk->info->list.rates[0];
|
||||
max_rate = sclk->info->list.rates[num_rates - 1];
|
||||
} else {
|
||||
min_rate = sclk->info->range.min_rate;
|
||||
max_rate = sclk->info->range.max_rate;
|
||||
}
|
||||
|
||||
clk_hw_set_rate_range(&sclk->hw, min_rate, max_rate);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,6 @@
|
||||
#define PLL_STATUS(p) ((p)->offset + (p)->regs[PLL_OFF_STATUS])
|
||||
#define PLL_OPMODE(p) ((p)->offset + (p)->regs[PLL_OFF_OPMODE])
|
||||
#define PLL_FRAC(p) ((p)->offset + (p)->regs[PLL_OFF_FRAC])
|
||||
#define PLL_CAL_VAL(p) ((p)->offset + (p)->regs[PLL_OFF_CAL_VAL])
|
||||
|
||||
const u8 clk_alpha_pll_regs[][PLL_OFF_MAX_REGS] = {
|
||||
[CLK_ALPHA_PLL_TYPE_DEFAULT] = {
|
||||
|
@ -154,16 +154,12 @@ static inline bool has_state_changed(struct clk_rpmh *c, u32 state)
|
||||
}
|
||||
|
||||
static int clk_rpmh_send(struct clk_rpmh *c, enum rpmh_state state,
|
||||
struct tcs_cmd *cmd, bool wait_for_completion)
|
||||
struct tcs_cmd *cmd, bool wait)
|
||||
{
|
||||
int ret;
|
||||
if (wait)
|
||||
return rpmh_write(c->dev, state, cmd, 1);
|
||||
|
||||
if (wait_for_completion)
|
||||
ret = rpmh_write(c->dev, state, cmd, 1);
|
||||
else
|
||||
ret = rpmh_write_async(c->dev, state, cmd, 1);
|
||||
|
||||
return ret;
|
||||
return rpmh_write_async(c->dev, state, cmd, 1);
|
||||
}
|
||||
|
||||
static int clk_rpmh_send_aggregate_command(struct clk_rpmh *c)
|
||||
@ -172,6 +168,7 @@ static int clk_rpmh_send_aggregate_command(struct clk_rpmh *c)
|
||||
u32 cmd_state, on_val;
|
||||
enum rpmh_state state = RPMH_SLEEP_STATE;
|
||||
int ret;
|
||||
bool wait;
|
||||
|
||||
cmd.addr = c->res_addr;
|
||||
cmd_state = c->aggr_state;
|
||||
@ -182,8 +179,8 @@ static int clk_rpmh_send_aggregate_command(struct clk_rpmh *c)
|
||||
if (cmd_state & BIT(state))
|
||||
cmd.data = on_val;
|
||||
|
||||
ret = clk_rpmh_send(c, state, &cmd,
|
||||
cmd_state && state == RPMH_ACTIVE_ONLY_STATE);
|
||||
wait = cmd_state && state == RPMH_ACTIVE_ONLY_STATE;
|
||||
ret = clk_rpmh_send(c, state, &cmd, wait);
|
||||
if (ret) {
|
||||
dev_err(c->dev, "set %s state of %s failed: (%d)\n",
|
||||
!state ? "sleep" :
|
||||
|
@ -1715,6 +1715,9 @@ static struct clk_branch gcc_mss_cfg_ahb_clk = {
|
||||
|
||||
static struct clk_branch gcc_mss_mnoc_bimc_axi_clk = {
|
||||
.halt_reg = 0x8a004,
|
||||
.halt_check = BRANCH_HALT,
|
||||
.hwcg_reg = 0x8a004,
|
||||
.hwcg_bit = 1,
|
||||
.clkr = {
|
||||
.enable_reg = 0x8a004,
|
||||
.enable_mask = BIT(0),
|
||||
|
@ -1616,6 +1616,7 @@ static struct clk_branch gcc_gpu_cfg_ahb_clk = {
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_gpu_gpll0_clk_src = {
|
||||
.halt_check = BRANCH_HALT_SKIP,
|
||||
.clkr = {
|
||||
.enable_reg = 0x52004,
|
||||
.enable_mask = BIT(15),
|
||||
@ -1631,13 +1632,14 @@ static struct clk_branch gcc_gpu_gpll0_clk_src = {
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_gpu_gpll0_div_clk_src = {
|
||||
.halt_check = BRANCH_HALT_SKIP,
|
||||
.clkr = {
|
||||
.enable_reg = 0x52004,
|
||||
.enable_mask = BIT(16),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gcc_gpu_gpll0_div_clk_src",
|
||||
.parent_hws = (const struct clk_hw *[]){
|
||||
&gcc_gpu_gpll0_clk_src.clkr.hw },
|
||||
&gpll0_out_even.clkr.hw },
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
@ -1728,6 +1730,7 @@ static struct clk_branch gcc_npu_cfg_ahb_clk = {
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_npu_gpll0_clk_src = {
|
||||
.halt_check = BRANCH_HALT_SKIP,
|
||||
.clkr = {
|
||||
.enable_reg = 0x52004,
|
||||
.enable_mask = BIT(18),
|
||||
@ -1743,13 +1746,14 @@ static struct clk_branch gcc_npu_gpll0_clk_src = {
|
||||
};
|
||||
|
||||
static struct clk_branch gcc_npu_gpll0_div_clk_src = {
|
||||
.halt_check = BRANCH_HALT_SKIP,
|
||||
.clkr = {
|
||||
.enable_reg = 0x52004,
|
||||
.enable_mask = BIT(19),
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gcc_npu_gpll0_div_clk_src",
|
||||
.parent_hws = (const struct clk_hw *[]){
|
||||
&gcc_npu_gpll0_clk_src.clkr.hw },
|
||||
&gpll0_out_even.clkr.hw },
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_branch2_ops,
|
||||
|
@ -135,7 +135,7 @@ static void __init atlas6_clk_init(struct device_node *np)
|
||||
|
||||
for (i = pll1; i < maxclk; i++) {
|
||||
atlas6_clks[i] = clk_register(NULL, atlas6_clk_hw_array[i]);
|
||||
BUG_ON(!atlas6_clks[i]);
|
||||
BUG_ON(IS_ERR(atlas6_clks[i]));
|
||||
}
|
||||
clk_register_clkdev(atlas6_clks[cpu], NULL, "cpu");
|
||||
clk_register_clkdev(atlas6_clks[io], NULL, "io");
|
||||
|
@ -41,6 +41,7 @@ config ARM_ARMADA_37XX_CPUFREQ
|
||||
config ARM_ARMADA_8K_CPUFREQ
|
||||
tristate "Armada 8K CPUFreq driver"
|
||||
depends on ARCH_MVEBU && CPUFREQ_DT
|
||||
select ARMADA_AP_CPU_CLK
|
||||
help
|
||||
This enables the CPUFreq driver support for Marvell
|
||||
Armada8k SOCs.
|
||||
|
@ -456,6 +456,7 @@ static int __init armada37xx_cpufreq_driver_init(void)
|
||||
/* Now that everything is setup, enable the DVFS at hardware level */
|
||||
armada37xx_cpufreq_enable_dvfs(nb_pm_base);
|
||||
|
||||
memset(&pdata, 0, sizeof(pdata));
|
||||
pdata.suspend = armada37xx_cpufreq_suspend;
|
||||
pdata.resume = armada37xx_cpufreq_resume;
|
||||
|
||||
|
@ -627,6 +627,24 @@ static struct cpufreq_governor *find_governor(const char *str_governor)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct cpufreq_governor *get_governor(const char *str_governor)
|
||||
{
|
||||
struct cpufreq_governor *t;
|
||||
|
||||
mutex_lock(&cpufreq_governor_mutex);
|
||||
t = find_governor(str_governor);
|
||||
if (!t)
|
||||
goto unlock;
|
||||
|
||||
if (!try_module_get(t->owner))
|
||||
t = NULL;
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&cpufreq_governor_mutex);
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
static unsigned int cpufreq_parse_policy(char *str_governor)
|
||||
{
|
||||
if (!strncasecmp(str_governor, "performance", CPUFREQ_NAME_LEN))
|
||||
@ -646,28 +664,14 @@ static struct cpufreq_governor *cpufreq_parse_governor(char *str_governor)
|
||||
{
|
||||
struct cpufreq_governor *t;
|
||||
|
||||
mutex_lock(&cpufreq_governor_mutex);
|
||||
t = get_governor(str_governor);
|
||||
if (t)
|
||||
return t;
|
||||
|
||||
t = find_governor(str_governor);
|
||||
if (!t) {
|
||||
int ret;
|
||||
if (request_module("cpufreq_%s", str_governor))
|
||||
return NULL;
|
||||
|
||||
mutex_unlock(&cpufreq_governor_mutex);
|
||||
|
||||
ret = request_module("cpufreq_%s", str_governor);
|
||||
if (ret)
|
||||
return NULL;
|
||||
|
||||
mutex_lock(&cpufreq_governor_mutex);
|
||||
|
||||
t = find_governor(str_governor);
|
||||
}
|
||||
if (t && !try_module_get(t->owner))
|
||||
t = NULL;
|
||||
|
||||
mutex_unlock(&cpufreq_governor_mutex);
|
||||
|
||||
return t;
|
||||
return get_governor(str_governor);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -845,12 +849,14 @@ static ssize_t show_scaling_available_governors(struct cpufreq_policy *policy,
|
||||
goto out;
|
||||
}
|
||||
|
||||
mutex_lock(&cpufreq_governor_mutex);
|
||||
for_each_governor(t) {
|
||||
if (i >= (ssize_t) ((PAGE_SIZE / sizeof(char))
|
||||
- (CPUFREQ_NAME_LEN + 2)))
|
||||
goto out;
|
||||
break;
|
||||
i += scnprintf(&buf[i], CPUFREQ_NAME_PLEN, "%s ", t->name);
|
||||
}
|
||||
mutex_unlock(&cpufreq_governor_mutex);
|
||||
out:
|
||||
i += sprintf(&buf[i], "\n");
|
||||
return i;
|
||||
@ -1088,15 +1094,17 @@ static int cpufreq_init_policy(struct cpufreq_policy *policy)
|
||||
struct cpufreq_governor *def_gov = cpufreq_default_governor();
|
||||
struct cpufreq_governor *gov = NULL;
|
||||
unsigned int pol = CPUFREQ_POLICY_UNKNOWN;
|
||||
int ret;
|
||||
|
||||
if (has_target()) {
|
||||
/* Update policy governor to the one used before hotplug. */
|
||||
gov = find_governor(policy->last_governor);
|
||||
gov = get_governor(policy->last_governor);
|
||||
if (gov) {
|
||||
pr_debug("Restoring governor %s for cpu %d\n",
|
||||
policy->governor->name, policy->cpu);
|
||||
} else if (def_gov) {
|
||||
gov = def_gov;
|
||||
__module_get(gov->owner);
|
||||
} else {
|
||||
return -ENODATA;
|
||||
}
|
||||
@ -1119,7 +1127,11 @@ static int cpufreq_init_policy(struct cpufreq_policy *policy)
|
||||
return -ENODATA;
|
||||
}
|
||||
|
||||
return cpufreq_set_policy(policy, gov, pol);
|
||||
ret = cpufreq_set_policy(policy, gov, pol);
|
||||
if (gov)
|
||||
module_put(gov->owner);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int cpufreq_add_policy_cpu(struct cpufreq_policy *policy, unsigned int cpu)
|
||||
|
@ -818,12 +818,6 @@ static int ctr_skcipher_setkey(struct crypto_skcipher *skcipher,
|
||||
return skcipher_setkey(skcipher, key, keylen, ctx1_iv_off);
|
||||
}
|
||||
|
||||
static int arc4_skcipher_setkey(struct crypto_skcipher *skcipher,
|
||||
const u8 *key, unsigned int keylen)
|
||||
{
|
||||
return skcipher_setkey(skcipher, key, keylen, 0);
|
||||
}
|
||||
|
||||
static int des_skcipher_setkey(struct crypto_skcipher *skcipher,
|
||||
const u8 *key, unsigned int keylen)
|
||||
{
|
||||
@ -2058,21 +2052,6 @@ static struct caam_skcipher_alg driver_algs[] = {
|
||||
},
|
||||
.caam.class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_ECB,
|
||||
},
|
||||
{
|
||||
.skcipher = {
|
||||
.base = {
|
||||
.cra_name = "ecb(arc4)",
|
||||
.cra_driver_name = "ecb-arc4-caam",
|
||||
.cra_blocksize = ARC4_BLOCK_SIZE,
|
||||
},
|
||||
.setkey = arc4_skcipher_setkey,
|
||||
.encrypt = skcipher_encrypt,
|
||||
.decrypt = skcipher_decrypt,
|
||||
.min_keysize = ARC4_MIN_KEY_SIZE,
|
||||
.max_keysize = ARC4_MAX_KEY_SIZE,
|
||||
},
|
||||
.caam.class1_alg_type = OP_ALG_ALGSEL_ARC4 | OP_ALG_AAI_ECB,
|
||||
},
|
||||
};
|
||||
|
||||
static struct caam_aead_alg driver_aeads[] = {
|
||||
@ -3533,7 +3512,6 @@ int caam_algapi_init(struct device *ctrldev)
|
||||
struct caam_drv_private *priv = dev_get_drvdata(ctrldev);
|
||||
int i = 0, err = 0;
|
||||
u32 aes_vid, aes_inst, des_inst, md_vid, md_inst, ccha_inst, ptha_inst;
|
||||
u32 arc4_inst;
|
||||
unsigned int md_limit = SHA512_DIGEST_SIZE;
|
||||
bool registered = false, gcm_support;
|
||||
|
||||
@ -3553,8 +3531,6 @@ int caam_algapi_init(struct device *ctrldev)
|
||||
CHA_ID_LS_DES_SHIFT;
|
||||
aes_inst = cha_inst & CHA_ID_LS_AES_MASK;
|
||||
md_inst = (cha_inst & CHA_ID_LS_MD_MASK) >> CHA_ID_LS_MD_SHIFT;
|
||||
arc4_inst = (cha_inst & CHA_ID_LS_ARC4_MASK) >>
|
||||
CHA_ID_LS_ARC4_SHIFT;
|
||||
ccha_inst = 0;
|
||||
ptha_inst = 0;
|
||||
|
||||
@ -3575,7 +3551,6 @@ int caam_algapi_init(struct device *ctrldev)
|
||||
md_inst = mdha & CHA_VER_NUM_MASK;
|
||||
ccha_inst = rd_reg32(&priv->ctrl->vreg.ccha) & CHA_VER_NUM_MASK;
|
||||
ptha_inst = rd_reg32(&priv->ctrl->vreg.ptha) & CHA_VER_NUM_MASK;
|
||||
arc4_inst = rd_reg32(&priv->ctrl->vreg.afha) & CHA_VER_NUM_MASK;
|
||||
|
||||
gcm_support = aesa & CHA_VER_MISC_AES_GCM;
|
||||
}
|
||||
@ -3598,10 +3573,6 @@ int caam_algapi_init(struct device *ctrldev)
|
||||
if (!aes_inst && (alg_sel == OP_ALG_ALGSEL_AES))
|
||||
continue;
|
||||
|
||||
/* Skip ARC4 algorithms if not supported by device */
|
||||
if (!arc4_inst && alg_sel == OP_ALG_ALGSEL_ARC4)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Check support for AES modes not available
|
||||
* on LP devices.
|
||||
|
@ -43,7 +43,6 @@
|
||||
#include <crypto/akcipher.h>
|
||||
#include <crypto/scatterwalk.h>
|
||||
#include <crypto/skcipher.h>
|
||||
#include <crypto/arc4.h>
|
||||
#include <crypto/internal/skcipher.h>
|
||||
#include <crypto/internal/hash.h>
|
||||
#include <crypto/internal/rsa.h>
|
||||
|
@ -200,6 +200,7 @@ static inline int cvm_enc_dec(struct ablkcipher_request *req, u32 enc)
|
||||
int status;
|
||||
|
||||
memset(req_info, 0, sizeof(struct cpt_request_info));
|
||||
req_info->may_sleep = (req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) != 0;
|
||||
memset(fctx, 0, sizeof(struct fc_context));
|
||||
create_input_list(req, enc, enc_iv_len);
|
||||
create_output_list(req, enc_iv_len);
|
||||
|
@ -133,7 +133,7 @@ static inline int setup_sgio_list(struct cpt_vf *cptvf,
|
||||
|
||||
/* Setup gather (input) components */
|
||||
g_sz_bytes = ((req->incnt + 3) / 4) * sizeof(struct sglist_component);
|
||||
info->gather_components = kzalloc(g_sz_bytes, GFP_KERNEL);
|
||||
info->gather_components = kzalloc(g_sz_bytes, req->may_sleep ? GFP_KERNEL : GFP_ATOMIC);
|
||||
if (!info->gather_components) {
|
||||
ret = -ENOMEM;
|
||||
goto scatter_gather_clean;
|
||||
@ -150,7 +150,7 @@ static inline int setup_sgio_list(struct cpt_vf *cptvf,
|
||||
|
||||
/* Setup scatter (output) components */
|
||||
s_sz_bytes = ((req->outcnt + 3) / 4) * sizeof(struct sglist_component);
|
||||
info->scatter_components = kzalloc(s_sz_bytes, GFP_KERNEL);
|
||||
info->scatter_components = kzalloc(s_sz_bytes, req->may_sleep ? GFP_KERNEL : GFP_ATOMIC);
|
||||
if (!info->scatter_components) {
|
||||
ret = -ENOMEM;
|
||||
goto scatter_gather_clean;
|
||||
@ -167,7 +167,7 @@ static inline int setup_sgio_list(struct cpt_vf *cptvf,
|
||||
|
||||
/* Create and initialize DPTR */
|
||||
info->dlen = g_sz_bytes + s_sz_bytes + SG_LIST_HDR_SIZE;
|
||||
info->in_buffer = kzalloc(info->dlen, GFP_KERNEL);
|
||||
info->in_buffer = kzalloc(info->dlen, req->may_sleep ? GFP_KERNEL : GFP_ATOMIC);
|
||||
if (!info->in_buffer) {
|
||||
ret = -ENOMEM;
|
||||
goto scatter_gather_clean;
|
||||
@ -195,7 +195,7 @@ static inline int setup_sgio_list(struct cpt_vf *cptvf,
|
||||
}
|
||||
|
||||
/* Create and initialize RPTR */
|
||||
info->out_buffer = kzalloc(COMPLETION_CODE_SIZE, GFP_KERNEL);
|
||||
info->out_buffer = kzalloc(COMPLETION_CODE_SIZE, req->may_sleep ? GFP_KERNEL : GFP_ATOMIC);
|
||||
if (!info->out_buffer) {
|
||||
ret = -ENOMEM;
|
||||
goto scatter_gather_clean;
|
||||
@ -421,7 +421,7 @@ int process_request(struct cpt_vf *cptvf, struct cpt_request_info *req)
|
||||
struct cpt_vq_command vq_cmd;
|
||||
union cpt_inst_s cptinst;
|
||||
|
||||
info = kzalloc(sizeof(*info), GFP_KERNEL);
|
||||
info = kzalloc(sizeof(*info), req->may_sleep ? GFP_KERNEL : GFP_ATOMIC);
|
||||
if (unlikely(!info)) {
|
||||
dev_err(&pdev->dev, "Unable to allocate memory for info_buffer\n");
|
||||
return -ENOMEM;
|
||||
@ -443,7 +443,7 @@ int process_request(struct cpt_vf *cptvf, struct cpt_request_info *req)
|
||||
* Get buffer for union cpt_res_s response
|
||||
* structure and its physical address
|
||||
*/
|
||||
info->completion_addr = kzalloc(sizeof(union cpt_res_s), GFP_KERNEL);
|
||||
info->completion_addr = kzalloc(sizeof(union cpt_res_s), req->may_sleep ? GFP_KERNEL : GFP_ATOMIC);
|
||||
if (unlikely(!info->completion_addr)) {
|
||||
dev_err(&pdev->dev, "Unable to allocate memory for completion_addr\n");
|
||||
ret = -ENOMEM;
|
||||
|
@ -62,6 +62,8 @@ struct cpt_request_info {
|
||||
union ctrl_info ctrl; /* User control information */
|
||||
struct cptvf_request req; /* Request Information (Core specific) */
|
||||
|
||||
bool may_sleep;
|
||||
|
||||
struct buf_ptr in[MAX_BUF_CNT];
|
||||
struct buf_ptr out[MAX_BUF_CNT];
|
||||
|
||||
|
@ -469,6 +469,7 @@ struct ccp_sg_workarea {
|
||||
unsigned int sg_used;
|
||||
|
||||
struct scatterlist *dma_sg;
|
||||
struct scatterlist *dma_sg_head;
|
||||
struct device *dma_dev;
|
||||
unsigned int dma_count;
|
||||
enum dma_data_direction dma_dir;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user