Merge 5.10.94 into android12-5.10-lts
Changes in 5.10.94 KVM: VMX: switch blocked_vcpu_on_cpu_lock to raw spinlock HID: uhid: Fix worker destroying device without any protection HID: wacom: Reset expected and received contact counts at the same time HID: wacom: Ignore the confidence flag when a touch is removed HID: wacom: Avoid using stale array indicies to read contact count f2fs: fix to do sanity check in is_alive() nfc: llcp: fix NULL error pointer dereference on sendmsg() after failed bind() mtd: rawnand: gpmi: Add ERR007117 protection for nfc_apply_timings mtd: rawnand: gpmi: Remove explicit default gpmi clock setting for i.MX6 mtd: Fixed breaking list in __mtd_del_partition. mtd: rawnand: davinci: Don't calculate ECC when reading page mtd: rawnand: davinci: Avoid duplicated page read mtd: rawnand: davinci: Rewrite function description x86/gpu: Reserve stolen memory for first integrated Intel GPU tools/nolibc: x86-64: Fix startup code bug tools/nolibc: i386: fix initial stack alignment tools/nolibc: fix incorrect truncation of exit code rtc: cmos: take rtc_lock while reading from CMOS media: v4l2-ioctl.c: readbuffers depends on V4L2_CAP_READWRITE media: flexcop-usb: fix control-message timeouts media: mceusb: fix control-message timeouts media: em28xx: fix control-message timeouts media: cpia2: fix control-message timeouts media: s2255: fix control-message timeouts media: dib0700: fix undefined behavior in tuner shutdown media: redrat3: fix control-message timeouts media: pvrusb2: fix control-message timeouts media: stk1160: fix control-message timeouts media: cec-pin: fix interrupt en/disable handling can: softing_cs: softingcs_probe(): fix memleak on registration failure iio: adc: ti-adc081c: Partial revert of removal of ACPI IDs lkdtm: Fix content of section containing lkdtm_rodata_do_nothing() iommu/io-pgtable-arm-v7s: Add error handle for page table allocation failure gpu: host1x: Add back arm_iommu_detach_device() dma_fence_array: Fix PENDING_ERROR leak in dma_fence_array_signaled() PCI: Add function 1 DMA alias quirk for Marvell 88SE9125 SATA controller mm_zone: add function to check if managed dma zone exists dma/pool: create dma atomic pool only if dma zone has managed pages mm/page_alloc.c: do not warn allocation failure on zone DMA if no managed pages shmem: fix a race between shmem_unused_huge_shrink and shmem_evict_inode drm/ttm: Put BO in its memory manager's lru list Bluetooth: L2CAP: Fix not initializing sk_peer_pid drm/bridge: display-connector: fix an uninitialized pointer in probe() drm: fix null-ptr-deref in drm_dev_init_release() drm/panel: kingdisplay-kd097d04: Delete panel on attach() failure drm/panel: innolux-p079zca: Delete panel on attach() failure drm/rockchip: dsi: Fix unbalanced clock on probe error drm/rockchip: dsi: Hold pm-runtime across bind/unbind drm/rockchip: dsi: Disable PLL clock on bind error drm/rockchip: dsi: Reconfigure hardware on resume() Bluetooth: cmtp: fix possible panic when cmtp_init_sockets() fails clk: bcm-2835: Pick the closest clock rate clk: bcm-2835: Remove rounding up the dividers drm/vc4: hdmi: Set a default HSM rate wcn36xx: ensure pairing of init_scan/finish_scan and start_scan/end_scan wcn36xx: Indicate beacon not connection loss on MISSED_BEACON_IND wcn36xx: Fix DMA channel enable/disable cycle wcn36xx: Release DMA channel descriptor allocations wcn36xx: Put DXE block into reset before freeing memory wcn36xx: populate band before determining rate on RX wcn36xx: fix RX BD rate mapping for 5GHz legacy rates ath11k: Send PPDU_STATS_CFG with proper pdev mask to firmware mtd: hyperbus: rpc-if: Check return value of rpcif_sw_init() media: videobuf2: Fix the size printk format media: atomisp: add missing media_device_cleanup() in atomisp_unregister_entities() media: atomisp: fix punit_ddr_dvfs_enable() argument for mrfld_power up case media: atomisp: fix inverted logic in buffers_needed() media: atomisp: do not use err var when checking port validity for ISP2400 media: atomisp: fix inverted error check for ia_css_mipi_is_source_port_valid() media: atomisp: fix ifdefs in sh_css.c media: staging: media: atomisp: pci: Balance braces around conditional statements in file atomisp_cmd.c media: atomisp: add NULL check for asd obtained from atomisp_video_pipe media: atomisp: fix enum formats logic media: atomisp: fix uninitialized bug in gmin_get_pmic_id_and_addr() media: aspeed: fix mode-detect always time out at 2nd run media: em28xx: fix memory leak in em28xx_init_dev media: aspeed: Update signal status immediately to ensure sane hw state arm64: dts: amlogic: meson-g12: Fix GPU operating point table node name arm64: dts: amlogic: Fix SPI NOR flash node name for ODROID N2/N2+ arm64: dts: meson-gxbb-wetek: fix HDMI in early boot arm64: dts: meson-gxbb-wetek: fix missing GPIO binding fs: dlm: use sk->sk_socket instead of con->sock fs: dlm: don't call kernel_getpeername() in error_report() memory: renesas-rpc-if: Return error in case devm_ioremap_resource() fails Bluetooth: stop proccessing malicious adv data ath11k: Fix ETSI regd with weather radar overlap ath11k: clear the keys properly via DISABLE_KEY ath11k: reset RSN/WPA present state for open BSS tee: fix put order in teedev_close_context() fs: dlm: fix build with CONFIG_IPV6 disabled drm/vboxvideo: fix a NULL vs IS_ERR() check arm64: dts: renesas: cat875: Add rx/tx delays media: dmxdev: fix UAF when dvb_register_device() fails crypto: qce - fix uaf on qce_ahash_register_one crypto: qce - fix uaf on qce_skcipher_register_one mtd: hyperbus: rpc-if: fix bug in rpcif_hb_remove ARM: dts: stm32: fix dtbs_check warning on ili9341 dts binding on stm32f429 disco crypto: qat - fix spelling mistake: "messge" -> "message" crypto: qat - remove unnecessary collision prevention step in PFVF crypto: qat - make pfvf send message direction agnostic crypto: qat - fix undetected PFVF timeout in ACK loop ath11k: Use host CE parameters for CE interrupts configuration arm64: dts: ti: k3-j721e: correct cache-sets info tty: serial: atmel: Check return code of dmaengine_submit() tty: serial: atmel: Call dma_async_issue_pending() mfd: atmel-flexcom: Remove #ifdef CONFIG_PM_SLEEP mfd: atmel-flexcom: Use .resume_noirq media: rcar-csi2: Correct the selection of hsfreqrange media: imx-pxp: Initialize the spinlock prior to using it media: si470x-i2c: fix possible memory leak in si470x_i2c_probe() media: mtk-vcodec: call v4l2_m2m_ctx_release first when file is released media: coda: fix CODA960 JPEG encoder buffer overflow media: venus: pm_helpers: Control core power domain manually media: venus: core, venc, vdec: Fix probe dependency error media: venus: core: Fix a potential NULL pointer dereference in an error handling path media: venus: core: Fix a resource leak in the error handling path of 'venus_probe()' thermal/drivers/imx: Implement runtime PM support netfilter: bridge: add support for pppoe filtering arm64: dts: qcom: msm8916: fix MMC controller aliases cgroup: Trace event cgroup id fields should be u64 ACPI: EC: Rework flushing of EC work while suspended to idle thermal/drivers/imx8mm: Enable ADC when enabling monitor drm/amdgpu: Fix a NULL pointer dereference in amdgpu_connector_lcd_native_mode() drm/radeon/radeon_kms: Fix a NULL pointer dereference in radeon_driver_open_kms() arm64: dts: ti: k3-j7200: Fix the L2 cache sets arm64: dts: ti: k3-j721e: Fix the L2 cache sets arm64: dts: ti: k3-j7200: Correct the d-cache-sets info tty: serial: uartlite: allow 64 bit address serial: amba-pl011: do not request memory region twice floppy: Fix hang in watchdog when disk is ejected staging: rtl8192e: return error code from rtllib_softmac_init() staging: rtl8192e: rtllib_module: fix error handle case in alloc_rtllib() Bluetooth: btmtksdio: fix resume failure sched/fair: Fix detection of per-CPU kthreads waking a task sched/fair: Fix per-CPU kthread and wakee stacking for asym CPU capacity bpf: Adjust BTF log size limit. bpf: Disallow BPF_LOG_KERNEL log level for bpf(BPF_BTF_LOAD) bpf: Remove config check to enable bpf support for branch records arm64: lib: Annotate {clear, copy}_page() as position-independent arm64: clear_page() shouldn't use DC ZVA when DCZID_EL0.DZP == 1 media: dib8000: Fix a memleak in dib8000_init() media: saa7146: mxb: Fix a NULL pointer dereference in mxb_attach() media: si2157: Fix "warm" tuner state detection wireless: iwlwifi: Fix a double free in iwl_txq_dyn_alloc_dma sched/rt: Try to restart rt period timer when rt runtime exceeded drm/msm/dp: displayPort driver need algorithm rational rcu/exp: Mark current CPU as exp-QS in IPI loop second pass mwifiex: Fix possible ABBA deadlock xfrm: fix a small bug in xfrm_sa_len() x86/uaccess: Move variable into switch case statement selftests: clone3: clone3: add case CLONE3_ARGS_NO_TEST selftests: harness: avoid false negatives if test has no ASSERTs crypto: stm32 - Fix last sparse warning in stm32_cryp_check_ctr_counter crypto: stm32/cryp - fix CTR counter carry crypto: stm32/cryp - fix xts and race condition in crypto_engine requests crypto: stm32/cryp - check early input data crypto: stm32/cryp - fix double pm exit crypto: stm32/cryp - fix lrw chaining mode crypto: stm32/cryp - fix bugs and crash in tests crypto: stm32 - Revert broken pm_runtime_resume_and_get changes ath11k: Fix deleting uninitialized kernel timer during fragment cache flush ARM: dts: gemini: NAS4220-B: fis-index-block with 128 KiB sectors media: dw2102: Fix use after free media: msi001: fix possible null-ptr-deref in msi001_probe() media: coda/imx-vdoa: Handle dma_set_coherent_mask error codes ath11k: Fix a NULL pointer dereference in ath11k_mac_op_hw_scan() arm64: dts: qcom: c630: Fix soundcard setup arm64: dts: qcom: ipq6018: Fix gpio-ranges property drm/msm/dpu: fix safe status debugfs file drm/bridge: ti-sn65dsi86: Set max register for regmap drm/tegra: vic: Fix DMA API misuse media: hantro: Fix probe func error path xfrm: interface with if_id 0 should return error xfrm: state and policy should fail if XFRMA_IF_ID 0 ARM: 9159/1: decompressor: Avoid UNPREDICTABLE NOP encoding usb: ftdi-elan: fix memory leak on device disconnect arm64: dts: marvell: cn9130: add GPIO and SPI aliases arm64: dts: marvell: cn9130: enable CP0 GPIO controllers ARM: dts: armada-38x: Add generic compatible to UART nodes iwlwifi: mvm: fix 32-bit build in FTM iwlwifi: mvm: test roc running status bits before removing the sta mmc: meson-mx-sdhc: add IRQ check mmc: meson-mx-sdio: add IRQ check selinux: fix potential memleak in selinux_add_opt() um: fix ndelay/udelay defines um: virtio_uml: Fix time-travel external time propagation Bluetooth: L2CAP: Fix using wrong mode bpftool: Enable line buffering for stdout backlight: qcom-wled: Validate enabled string indices in DT backlight: qcom-wled: Pass number of elements to read to read_u32_array backlight: qcom-wled: Fix off-by-one maximum with default num_strings backlight: qcom-wled: Override default length with qcom,enabled-strings backlight: qcom-wled: Use cpu_to_le16 macro to perform conversion backlight: qcom-wled: Respect enabled-strings in set_brightness software node: fix wrong node passed to find nargs_prop Bluetooth: hci_qca: Stop IBS timer during BT OFF x86/boot/compressed: Move CLANG_FLAGS to beginning of KBUILD_CFLAGS hwmon: (mr75203) fix wrong power-up delay value x86/mce/inject: Avoid out-of-bounds write when setting flags ACPI: scan: Create platform device for BCM4752 and LNV4752 ACPI nodes pcmcia: rsrc_nonstatic: Fix a NULL pointer dereference in __nonstatic_find_io_region() pcmcia: rsrc_nonstatic: Fix a NULL pointer dereference in nonstatic_find_mem_region() power: reset: mt6397: Check for null res pointer netfilter: ipt_CLUSTERIP: fix refcount leak in clusterip_tg_check() bpf: Don't promote bogus looking registers after null check. bpf: Fix SO_RCVBUF/SO_SNDBUF handling in _bpf_setsockopt(). netfilter: nft_set_pipapo: allocate pcpu scratch maps on clone ppp: ensure minimum packet size in ppp_write() rocker: fix a sleeping in atomic bug staging: greybus: audio: Check null pointer fsl/fman: Check for null pointer after calling devm_ioremap Bluetooth: hci_bcm: Check for error irq Bluetooth: hci_qca: Fix NULL vs IS_ERR_OR_NULL check in qca_serdev_probe usb: dwc3: qcom: Fix NULL vs IS_ERR checking in dwc3_qcom_probe HID: hid-uclogic-params: Invalid parameter check in uclogic_params_init HID: hid-uclogic-params: Invalid parameter check in uclogic_params_get_str_desc HID: hid-uclogic-params: Invalid parameter check in uclogic_params_huion_init HID: hid-uclogic-params: Invalid parameter check in uclogic_params_frame_init_v1_buttonpad debugfs: lockdown: Allow reading debugfs files that are not world readable net/mlx5e: Fix page DMA map/unmap attributes net/mlx5e: Don't block routes with nexthop objects in SW Revert "net/mlx5e: Block offload of outer header csum for UDP tunnels" net/mlx5: Set command entry semaphore up once got index free lib/mpi: Add the return value check of kcalloc() Bluetooth: L2CAP: uninitialized variables in l2cap_sock_setsockopt() spi: spi-meson-spifc: Add missing pm_runtime_disable() in meson_spifc_probe ax25: uninitialized variable in ax25_setsockopt() netrom: fix api breakage in nr_setsockopt() regmap: Call regmap_debugfs_exit() prior to _init() can: mcp251xfd: add missing newline to printed strings tpm: add request_locality before write TPM_INT_ENABLE tpm_tis: Fix an error handling path in 'tpm_tis_core_init()' can: softing: softing_startstop(): fix set but not used variable warning can: xilinx_can: xcan_probe(): check for error irq pcmcia: fix setting of kthread task states iwlwifi: mvm: Use div_s64 instead of do_div in iwl_mvm_ftm_rtt_smoothing() net: mcs7830: handle usb read errors properly ext4: avoid trim error on fs with small groups ALSA: jack: Add missing rwsem around snd_ctl_remove() calls ALSA: PCM: Add missing rwsem around snd_ctl_remove() calls ALSA: hda: Add missing rwsem around snd_ctl_remove() calls RDMA/bnxt_re: Scan the whole bitmap when checking if "disabling RCFW with pending cmd-bit" RDMA/hns: Validate the pkey index scsi: pm80xx: Update WARN_ON check in pm8001_mpi_build_cmd() clk: imx8mn: Fix imx8mn_clko1_sels powerpc/prom_init: Fix improper check of prom_getprop() ASoC: uniphier: drop selecting non-existing SND_SOC_UNIPHIER_AIO_DMA dt-bindings: thermal: Fix definition of cooling-maps contribution property powerpc/64s: Convert some cpu_setup() and cpu_restore() functions to C powerpc/perf: MMCR0 control for PMU registers under PMCC=00 powerpc/perf: move perf irq/nmi handling details into traps.c powerpc/irq: Add helper to set regs->softe powerpc/perf: Fix PMU callbacks to clear pending PMI before resetting an overflown PMC powerpc/32s: Fix shift-out-of-bounds in KASAN init clocksource: Reduce clocksource-skew threshold clocksource: Avoid accidental unstable marking of clocksources ALSA: oss: fix compile error when OSS_DEBUG is enabled ALSA: usb-audio: Drop superfluous '0' in Presonus Studio 1810c's ID char/mwave: Adjust io port register size binder: fix handling of error during copy openrisc: Add clone3 ABI wrapper iommu/io-pgtable-arm: Fix table descriptor paddr formatting scsi: ufs: Fix race conditions related to driver data RDMA/qedr: Fix reporting max_{send/recv}_wr attrs PCI/MSI: Fix pci_irq_vector()/pci_irq_get_affinity() powerpc/powermac: Add additional missing lockdep_register_key() RDMA/core: Let ib_find_gid() continue search even after empty entry RDMA/cma: Let cma_resolve_ib_dev() continue search even after empty entry ASoC: rt5663: Handle device_property_read_u32_array error codes of: unittest: fix warning on PowerPC frame size warning of: unittest: 64 bit dma address test requires arch support clk: stm32: Fix ltdc's clock turn off by clk_disable_unused() after system enter shell mips: add SYS_HAS_CPU_MIPS64_R5 config for MIPS Release 5 support mips: fix Kconfig reference to PHYS_ADDR_T_64BIT dmaengine: pxa/mmp: stop referencing config->slave_id iommu/amd: Remove iommu_init_ga() iommu/amd: Restore GA log/tail pointer on host resume ASoC: Intel: catpt: Test dmaengine_submit() result before moving on iommu/iova: Fix race between FQ timeout and teardown scsi: block: pm: Always set request queue runtime active in blk_post_runtime_resume() phy: uniphier-usb3ss: fix unintended writing zeros to PHY register ASoC: mediatek: Check for error clk pointer ASoC: samsung: idma: Check of ioremap return value misc: lattice-ecp3-config: Fix task hung when firmware load failed counter: stm32-lptimer-cnt: remove iio counter abi arm64: tegra: Fix Tegra194 HDA {clock,reset}-names ordering arm64: tegra: Remove non existent Tegra194 reset mips: lantiq: add support for clk_set_parent() mips: bcm63xx: add support for clk_set_parent() powerpc/xive: Add missing null check after calling kmalloc ASoC: fsl_mqs: fix MODULE_ALIAS RDMA/cxgb4: Set queue pair state when being queried ASoC: fsl_asrc: refine the check of available clock divider clk: bm1880: remove kfrees on static allocations of: base: Fix phandle argument length mismatch error message ARM: dts: omap3-n900: Fix lp5523 for multi color Bluetooth: Fix debugfs entry leak in hci_register_dev() fs: dlm: filter user dlm messages for kernel locks drm/lima: fix warning when CONFIG_DEBUG_SG=y & CONFIG_DMA_API_DEBUG=y selftests/bpf: Fix bpf_object leak in skb_ctx selftest ar5523: Fix null-ptr-deref with unexpected WDCMSG_TARGET_START reply drm/bridge: dw-hdmi: handle ELD when DRM_BRIDGE_ATTACH_NO_CONNECTOR drm/nouveau/pmu/gm200-: avoid touching PMU outside of DEVINIT/PREOS/ACR media: atomisp: fix try_fmt logic media: atomisp: set per-device's default mode media: atomisp-ov2680: Fix ov2680_set_fmt() clobbering the exposure ARM: shmobile: rcar-gen2: Add missing of_node_put() batman-adv: allow netlink usage in unprivileged containers media: atomisp: handle errors at sh_css_create_isp_params() ath11k: Fix crash caused by uninitialized TX ring usb: gadget: f_fs: Use stream_open() for endpoint files drm: panel-orientation-quirks: Add quirk for the Lenovo Yoga Book X91F/L HID: apple: Do not reset quirks when the Fn key is not found media: b2c2: Add missing check in flexcop_pci_isr: EDAC/synopsys: Use the quirk for version instead of ddr version ARM: imx: rename DEBUG_IMX21_IMX27_UART to DEBUG_IMX27_UART drm/amd/display: check top_pipe_to_program pointer drm/amdgpu/display: set vblank_disable_immediate for DC soc: ti: pruss: fix referenced node in error message mlxsw: pci: Add shutdown method in PCI driver drm/bridge: megachips: Ensure both bridges are probed before registration tty: serial: imx: disable UCR4_OREN in .stop_rx() instead of .shutdown() gpiolib: acpi: Do not set the IRQ type if the IRQ is already in use HSI: core: Fix return freed object in hsi_new_client crypto: jitter - consider 32 LSB for APT mwifiex: Fix skb_over_panic in mwifiex_usb_recv() rsi: Fix use-after-free in rsi_rx_done_handler() rsi: Fix out-of-bounds read in rsi_read_pkt() ath11k: Avoid NULL ptr access during mgmt tx cleanup media: venus: avoid calling core_clk_setrate() concurrently during concurrent video sessions ACPI / x86: Drop PWM2 device on Lenovo Yoga Book from always present table ACPI: Change acpi_device_always_present() into acpi_device_override_status() ACPI / x86: Allow specifying acpi_device_override_status() quirks by path ACPI / x86: Add not-present quirk for the PCI0.SDHB.BRC1 device on the GPD win arm64: dts: ti: j7200-main: Fix 'dtbs_check' serdes_ln_ctrl node usb: uhci: add aspeed ast2600 uhci support floppy: Add max size check for user space request x86/mm: Flush global TLB when switching to trampoline page-table drm: rcar-du: Fix CRTC timings when CMM is used media: uvcvideo: Increase UVC_CTRL_CONTROL_TIMEOUT to 5 seconds. media: rcar-vin: Update format alignment constraints media: saa7146: hexium_orion: Fix a NULL pointer dereference in hexium_attach() media: m920x: don't use stack on USB reads thunderbolt: Runtime PM activate both ends of the device link iwlwifi: mvm: synchronize with FW after multicast commands iwlwifi: mvm: avoid clearing a just saved session protection id ath11k: avoid deadlock by change ieee80211_queue_work for regd_update_work ath10k: Fix tx hanging net-sysfs: update the queue counts in the unregistration path net: phy: prefer 1000baseT over 1000baseKX gpio: aspeed: Convert aspeed_gpio.lock to raw_spinlock selftests/ftrace: make kprobe profile testcase description unique ath11k: Avoid false DEADLOCK warning reported by lockdep x86/mce: Allow instrumentation during task work queueing x86/mce: Mark mce_panic() noinstr x86/mce: Mark mce_end() noinstr x86/mce: Mark mce_read_aux() noinstr net: bonding: debug: avoid printing debug logs when bond is not notifying peers bpf: Do not WARN in bpf_warn_invalid_xdp_action() HID: quirks: Allow inverting the absolute X/Y values media: igorplugusb: receiver overflow should be reported media: saa7146: hexium_gemini: Fix a NULL pointer dereference in hexium_attach() mmc: core: Fixup storing of OCR for MMC_QUIRK_NONSTD_SDIO audit: ensure userspace is penalized the same as the kernel when under pressure arm64: dts: ls1028a-qds: move rtc node to the correct i2c bus arm64: tegra: Adjust length of CCPLEX cluster MMIO region PM: runtime: Add safety net to supplier device release cpufreq: Fix initialization of min and max frequency QoS requests usb: hub: Add delay for SuperSpeed hub resume to let links transit to U0 ath9k: Fix out-of-bound memcpy in ath9k_hif_usb_rx_stream rtw88: 8822c: update rx settings to prevent potential hw deadlock PM: AVS: qcom-cpr: Use div64_ul instead of do_div iwlwifi: fix leaks/bad data after failed firmware load iwlwifi: remove module loading failure message iwlwifi: mvm: Fix calculation of frame length iwlwifi: pcie: make sure prph_info is set when treating wakeup IRQ um: registers: Rename function names to avoid conflicts and build problems ath11k: Fix napi related hang Bluetooth: vhci: Set HCI_QUIRK_VALID_LE_STATES xfrm: rate limit SA mapping change message to user space drm/etnaviv: consider completed fence seqno in hang check jffs2: GC deadlock reading a page that is used in jffs2_write_begin() ACPICA: actypes.h: Expand the ACPI_ACCESS_ definitions ACPICA: Utilities: Avoid deleting the same object twice in a row ACPICA: Executer: Fix the REFCLASS_REFOF case in acpi_ex_opcode_1A_0T_1R() ACPICA: Fix wrong interpretation of PCC address ACPICA: Hardware: Do not flush CPU cache when entering S4 and S5 drm/amdgpu: fixup bad vram size on gmc v8 amdgpu/pm: Make sysfs pm attributes as read-only for VFs ACPI: battery: Add the ThinkPad "Not Charging" quirk btrfs: remove BUG_ON() in find_parent_nodes() btrfs: remove BUG_ON(!eie) in find_parent_nodes net: mdio: Demote probed message to debug print mac80211: allow non-standard VHT MCS-10/11 dm btree: add a defensive bounds check to insert_at() dm space map common: add bounds check to sm_ll_lookup_bitmap() mlxsw: pci: Avoid flow control for EMAD packets net: phy: marvell: configure RGMII delays for 88E1118 net: gemini: allow any RGMII interface mode regulator: qcom_smd: Align probe function with rpmh-regulator serial: pl010: Drop CR register reset on set_termios serial: core: Keep mctrl register state and cached copy in sync random: do not throw away excess input to crng_fast_load parisc: Avoid calling faulthandler_disabled() twice x86/kbuild: Enable CONFIG_KALLSYMS_ALL=y in the defconfigs powerpc/6xx: add missing of_node_put powerpc/powernv: add missing of_node_put powerpc/cell: add missing of_node_put powerpc/btext: add missing of_node_put powerpc/watchdog: Fix missed watchdog reset due to memory ordering race i2c: i801: Don't silently correct invalid transfer size powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING i2c: mpc: Correct I2C reset procedure clk: meson: gxbb: Fix the SDM_EN bit for MPLL0 on GXBB powerpc/powermac: Add missing lockdep_register_key() KVM: PPC: Book3S: Suppress warnings when allocating too big memory slots KVM: PPC: Book3S: Suppress failed alloc warning in H_COPY_TOFROM_GUEST w1: Misuse of get_user()/put_user() reported by sparse nvmem: core: set size for sysfs bin file dm: fix alloc_dax error handling in alloc_dev scsi: lpfc: Trigger SLI4 firmware dump before doing driver cleanup ALSA: seq: Set upper limit of processed events MIPS: Loongson64: Use three arguments for slti powerpc/40x: Map 32Mbytes of memory at startup selftests/powerpc/spectre_v2: Return skip code when miss_percent is high powerpc: handle kdump appropriately with crash_kexec_post_notifiers option powerpc/fadump: Fix inaccurate CPU state info in vmcore generated with panic udf: Fix error handling in udf_new_inode() MIPS: OCTEON: add put_device() after of_find_device_by_node() irqchip/gic-v4: Disable redistributors' view of the VPE table at boot time i2c: designware-pci: Fix to change data types of hcnt and lcnt parameters MIPS: Octeon: Fix build errors using clang scsi: sr: Don't use GFP_DMA ASoC: mediatek: mt8173: fix device_node leak ASoC: mediatek: mt8183: fix device_node leak phy: mediatek: Fix missing check in mtk_mipi_tx_probe rpmsg: core: Clean up resources on announce_create failure. crypto: omap-aes - Fix broken pm_runtime_and_get() usage crypto: stm32/crc32 - Fix kernel BUG triggered in probe() crypto: caam - replace this_cpu_ptr with raw_cpu_ptr ubifs: Error path in ubifs_remount_rw() seems to wrongly free write buffers tpm: fix NPE on probe for missing device spi: uniphier: Fix a bug that doesn't point to private data correctly xen/gntdev: fix unmap notification order fuse: Pass correct lend value to filemap_write_and_wait_range() serial: Fix incorrect rs485 polarity on uart open cputime, cpuacct: Include guest time in user time in cpuacct.stat tracing/kprobes: 'nmissed' not showed correctly for kretprobe iwlwifi: mvm: Increase the scan timeout guard to 30 seconds s390/mm: fix 2KB pgtable release race device property: Fix fwnode_graph_devcon_match() fwnode leak drm/etnaviv: limit submit sizes drm/nouveau/kms/nv04: use vzalloc for nv04_display drm/bridge: analogix_dp: Make PSR-exit block less parisc: Fix lpa and lpa_user defines powerpc/64s/radix: Fix huge vmap false positive PCI: xgene: Fix IB window setup PCI: pciehp: Use down_read/write_nested(reset_lock) to fix lockdep errors PCI: pci-bridge-emul: Make expansion ROM Base Address register read-only PCI: pci-bridge-emul: Properly mark reserved PCIe bits in PCI config space PCI: pci-bridge-emul: Fix definitions of reserved bits PCI: pci-bridge-emul: Correctly set PCIe capabilities PCI: pci-bridge-emul: Set PCI_STATUS_CAP_LIST for PCIe device xfrm: fix policy lookup for ipv6 gre packets btrfs: fix deadlock between quota enable and other quota operations btrfs: check the root node for uptodate before returning it btrfs: respect the max size in the header when activating swap file ext4: make sure to reset inode lockdep class when quota enabling fails ext4: make sure quota gets properly shutdown on error ext4: fix a possible ABBA deadlock due to busy PA ext4: initialize err_blk before calling __ext4_get_inode_loc ext4: fix fast commit may miss tracking range for FALLOC_FL_ZERO_RANGE ext4: set csum seed in tmp inode while migrating to extents ext4: Fix BUG_ON in ext4_bread when write quota data ext4: use ext4_ext_remove_space() for fast commit replay delete range ext4: fast commit may miss tracking unwritten range during ftruncate ext4: destroy ext4_fc_dentry_cachep kmemcache on module removal ext4: fix null-ptr-deref in '__ext4_journal_ensure_credits' ext4: don't use the orphan list when migrating an inode drm/radeon: fix error handling in radeon_driver_open_kms of: base: Improve argument length mismatch error firmware: Update Kconfig help text for Google firmware can: mcp251xfd: mcp251xfd_tef_obj_read(): fix typo in error message media: rcar-csi2: Optimize the selection PHTW register drm/vc4: hdmi: Make sure the device is powered with CEC media: correct MEDIA_TEST_SUPPORT help text Documentation: dmaengine: Correctly describe dmatest with channel unset Documentation: ACPI: Fix data node reference documentation Documentation: refer to config RANDOMIZE_BASE for kernel address-space randomization Documentation: fix firewire.rst ABI file path error Bluetooth: hci_sync: Fix not setting adv set duration scsi: core: Show SCMD_LAST in text form dmaengine: uniphier-xdmac: Fix type of address variables RDMA/hns: Modify the mapping attribute of doorbell to device RDMA/rxe: Fix a typo in opcode name dmaengine: stm32-mdma: fix STM32_MDMA_CTBR_TSEL_MASK Revert "net/mlx5: Add retry mechanism to the command entry index allocation" powerpc/cell: Fix clang -Wimplicit-fallthrough warning powerpc/fsl/dts: Enable WA for erratum A-009885 on fman3l MDIO buses block: Fix fsync always failed if once failed bpftool: Remove inclusion of utilities.mak from Makefiles xdp: check prog type before updating BPF link perf evsel: Override attr->sample_period for non-libpfm4 events ipv4: update fib_info_cnt under spinlock protection ipv4: avoid quadratic behavior in netns dismantle net/fsl: xgmac_mdio: Add workaround for erratum A-009885 net/fsl: xgmac_mdio: Fix incorrect iounmap when removing module parisc: pdc_stable: Fix memory leak in pdcs_register_pathentries f2fs: compress: fix potential deadlock of compress file f2fs: fix to reserve space for IO align feature af_unix: annote lockless accesses to unix_tot_inflight & gc_in_progress clk: Emit a stern warning with writable debugfs enabled clk: si5341: Fix clock HW provider cleanup net/smc: Fix hung_task when removing SMC-R devices net: axienet: increase reset timeout net: axienet: Wait for PhyRstCmplt after core reset net: axienet: reset core on initialization prior to MDIO access net: axienet: add missing memory barriers net: axienet: limit minimum TX ring size net: axienet: Fix TX ring slot available check net: axienet: fix number of TX ring slots for available check net: axienet: fix for TX busy handling net: axienet: increase default TX ring size to 128 HID: vivaldi: fix handling devices not using numbered reports rtc: pxa: fix null pointer dereference vdpa/mlx5: Fix wrong configuration of virtio_version_1_0 virtio_ring: mark ring unused on error taskstats: Cleanup the use of task->exit_code inet: frags: annotate races around fqdir->dead and fqdir->high_thresh netns: add schedule point in ops_exit_list() xfrm: Don't accidentally set RTO_ONLINK in decode_session4() gre: Don't accidentally set RTO_ONLINK in gre_fill_metadata_dst() libcxgb: Don't accidentally set RTO_ONLINK in cxgb_find_route() perf script: Fix hex dump character output dmaengine: at_xdmac: Don't start transactions at tx_submit level dmaengine: at_xdmac: Start transfer for cyclic channels in issue_pending dmaengine: at_xdmac: Print debug message after realeasing the lock dmaengine: at_xdmac: Fix concurrency over xfers_list dmaengine: at_xdmac: Fix lld view setting dmaengine: at_xdmac: Fix at_xdmac_lld struct definition perf probe: Fix ppc64 'perf probe add events failed' case devlink: Remove misleading internal_flags from health reporter dump arm64: dts: qcom: msm8996: drop not documented adreno properties net: bonding: fix bond_xmit_broadcast return value error bug net_sched: restore "mpu xxx" handling bcmgenet: add WOL IRQ check net: ethernet: mtk_eth_soc: fix error checking in mtk_mac_config() net: sfp: fix high power modules without diagnostic monitoring net: mscc: ocelot: fix using match before it is set dt-bindings: display: meson-dw-hdmi: add missing sound-name-prefix property dt-bindings: display: meson-vpu: Add missing amlogic,canvas property dt-bindings: watchdog: Require samsung,syscon-phandle for Exynos7 scripts/dtc: dtx_diff: remove broken example from help text lib82596: Fix IRQ check in sni_82596_probe mm/hmm.c: allow VM_MIXEDMAP to work with hmm_range_fault lib/test_meminit: destroy cache in kmem_cache_alloc_bulk() test mtd: nand: bbt: Fix corner case in bad block table handling ath10k: Fix the MTU size on QCA9377 SDIO scripts: sphinx-pre-install: add required ctex dependency scripts: sphinx-pre-install: Fix ctex support on Debian Linux 5.10.94 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I857f2417c899508815a1ba13d1285fd400a1f133
This commit is contained in:
@@ -1,62 +0,0 @@
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_count0_preset
|
||||
KernelVersion: 4.13
|
||||
Contact: fabrice.gasnier@st.com
|
||||
Description:
|
||||
Reading returns the current preset value. Writing sets the
|
||||
preset value. Encoder counts continuously from 0 to preset
|
||||
value, depending on direction (up/down).
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_count_quadrature_mode_available
|
||||
KernelVersion: 4.13
|
||||
Contact: fabrice.gasnier@st.com
|
||||
Description:
|
||||
Reading returns the list possible quadrature modes.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_count0_quadrature_mode
|
||||
KernelVersion: 4.13
|
||||
Contact: fabrice.gasnier@st.com
|
||||
Description:
|
||||
Configure the device counter quadrature modes:
|
||||
|
||||
- non-quadrature:
|
||||
Encoder IN1 input servers as the count input (up
|
||||
direction).
|
||||
|
||||
- quadrature:
|
||||
Encoder IN1 and IN2 inputs are mixed to get direction
|
||||
and count.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_count_polarity_available
|
||||
KernelVersion: 4.13
|
||||
Contact: fabrice.gasnier@st.com
|
||||
Description:
|
||||
Reading returns the list possible active edges.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_count0_polarity
|
||||
KernelVersion: 4.13
|
||||
Contact: fabrice.gasnier@st.com
|
||||
Description:
|
||||
Configure the device encoder/counter active edge:
|
||||
|
||||
- rising-edge
|
||||
- falling-edge
|
||||
- both-edges
|
||||
|
||||
In non-quadrature mode, device counts up on active edge.
|
||||
|
||||
In quadrature mode, encoder counting scenarios are as follows:
|
||||
|
||||
+---------+----------+--------------------+--------------------+
|
||||
| Active | Level on | IN1 signal | IN2 signal |
|
||||
| edge | opposite +----------+---------+----------+---------+
|
||||
| | signal | Rising | Falling | Rising | Falling |
|
||||
+---------+----------+----------+---------+----------+---------+
|
||||
| Rising | High -> | Down | - | Up | - |
|
||||
| edge | Low -> | Up | - | Down | - |
|
||||
+---------+----------+----------+---------+----------+---------+
|
||||
| Falling | High -> | - | Up | - | Down |
|
||||
| edge | Low -> | - | Down | - | Up |
|
||||
+---------+----------+----------+---------+----------+---------+
|
||||
| Both | High -> | Down | Up | Up | Down |
|
||||
| edges | Low -> | Up | Down | Down | Up |
|
||||
+---------+----------+----------+---------+----------+---------+
|
@@ -468,7 +468,7 @@ Spectre variant 2
|
||||
before invoking any firmware code to prevent Spectre variant 2 exploits
|
||||
using the firmware.
|
||||
|
||||
Using kernel address space randomization (CONFIG_RANDOMIZE_SLAB=y
|
||||
Using kernel address space randomization (CONFIG_RANDOMIZE_BASE=y
|
||||
and CONFIG_SLAB_FREELIST_RANDOM=y in the kernel configuration) makes
|
||||
attacks on the kernel generally more difficult.
|
||||
|
||||
|
@@ -10,6 +10,9 @@ title: Amlogic specific extensions to the Synopsys Designware HDMI Controller
|
||||
maintainers:
|
||||
- Neil Armstrong <narmstrong@baylibre.com>
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/sound/name-prefix.yaml#
|
||||
|
||||
description: |
|
||||
The Amlogic Meson Synopsys Designware Integration is composed of
|
||||
- A Synopsys DesignWare HDMI Controller IP
|
||||
@@ -99,6 +102,8 @@ properties:
|
||||
"#sound-dai-cells":
|
||||
const: 0
|
||||
|
||||
sound-name-prefix: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
@@ -78,6 +78,10 @@ properties:
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
amlogic,canvas:
|
||||
description: should point to a canvas provider node
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
description: phandle to the associated power domain
|
||||
@@ -106,6 +110,7 @@ required:
|
||||
- port@1
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- amlogic,canvas
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
@@ -118,6 +123,7 @@ examples:
|
||||
interrupts = <3>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
amlogic,canvas = <&canvas>;
|
||||
|
||||
/* CVBS VDAC output port */
|
||||
port@0 {
|
||||
|
@@ -199,12 +199,11 @@ patternProperties:
|
||||
|
||||
contribution:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
minimum: 0
|
||||
maximum: 100
|
||||
description:
|
||||
The percentage contribution of the cooling devices at the
|
||||
specific trip temperature referenced in this map
|
||||
to this thermal zone
|
||||
The cooling contribution to the thermal zone of the referred
|
||||
cooling device at the referred trip point. The contribution is
|
||||
a ratio of the sum of all cooling contributions within a
|
||||
thermal zone.
|
||||
|
||||
required:
|
||||
- trip
|
||||
|
@@ -39,8 +39,8 @@ properties:
|
||||
samsung,syscon-phandle:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description:
|
||||
Phandle to the PMU system controller node (in case of Exynos5250
|
||||
and Exynos5420).
|
||||
Phandle to the PMU system controller node (in case of Exynos5250,
|
||||
Exynos5420 and Exynos7).
|
||||
|
||||
required:
|
||||
- compatible
|
||||
@@ -58,6 +58,7 @@ allOf:
|
||||
enum:
|
||||
- samsung,exynos5250-wdt
|
||||
- samsung,exynos5420-wdt
|
||||
- samsung,exynos7-wdt
|
||||
then:
|
||||
required:
|
||||
- samsung,syscon-phandle
|
||||
|
@@ -143,13 +143,14 @@ Part 5 - Handling channel allocation
|
||||
Allocating Channels
|
||||
-------------------
|
||||
|
||||
Channels are required to be configured prior to starting the test run.
|
||||
Attempting to run the test without configuring the channels will fail.
|
||||
Channels do not need to be configured prior to starting a test run. Attempting
|
||||
to run the test without configuring the channels will result in testing any
|
||||
channels that are available.
|
||||
|
||||
Example::
|
||||
|
||||
% echo 1 > /sys/module/dmatest/parameters/run
|
||||
dmatest: Could not start test, no channels configured
|
||||
dmatest: No channels configured, continue with any
|
||||
|
||||
Channels are registered using the "channel" parameter. Channels can be requested by their
|
||||
name, once requested, the channel is registered and a pending thread is added to the test list.
|
||||
|
@@ -19,7 +19,7 @@ of kernel interfaces is available via exported symbols in `firewire-core` module
|
||||
Firewire char device data structures
|
||||
====================================
|
||||
|
||||
.. include:: /ABI/stable/firewire-cdev
|
||||
.. include:: ../ABI/stable/firewire-cdev
|
||||
:literal:
|
||||
|
||||
.. kernel-doc:: include/uapi/linux/firewire-cdev.h
|
||||
@@ -28,7 +28,7 @@ Firewire char device data structures
|
||||
Firewire device probing and sysfs interfaces
|
||||
============================================
|
||||
|
||||
.. include:: /ABI/stable/sysfs-bus-firewire
|
||||
.. include:: ../ABI/stable/sysfs-bus-firewire
|
||||
:literal:
|
||||
|
||||
.. kernel-doc:: drivers/firewire/core-device.c
|
||||
|
@@ -5,7 +5,7 @@
|
||||
Referencing hierarchical data nodes
|
||||
===================================
|
||||
|
||||
:Copyright: |copy| 2018 Intel Corporation
|
||||
:Copyright: |copy| 2018, 2021 Intel Corporation
|
||||
:Author: Sakari Ailus <sakari.ailus@linux.intel.com>
|
||||
|
||||
ACPI in general allows referring to device objects in the tree only.
|
||||
@@ -52,12 +52,14 @@ the ANOD object which is also the final target node of the reference.
|
||||
Name (NOD0, Package() {
|
||||
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
|
||||
Package () {
|
||||
Package () { "reg", 0 },
|
||||
Package () { "random-property", 3 },
|
||||
}
|
||||
})
|
||||
Name (NOD1, Package() {
|
||||
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
|
||||
Package () {
|
||||
Package () { "reg", 1 },
|
||||
Package () { "anothernode", "ANOD" },
|
||||
}
|
||||
})
|
||||
@@ -74,7 +76,11 @@ the ANOD object which is also the final target node of the reference.
|
||||
Name (_DSD, Package () {
|
||||
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
|
||||
Package () {
|
||||
Package () { "reference", ^DEV0, "node@1", "anothernode" },
|
||||
Package () {
|
||||
"reference", Package () {
|
||||
^DEV0, "node@1", "anothernode"
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
}
|
||||
|
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 93
|
||||
SUBLEVEL = 94
|
||||
EXTRAVERSION =
|
||||
NAME = Dare mighty things
|
||||
|
||||
|
@@ -400,12 +400,12 @@ choice
|
||||
Say Y here if you want kernel low-level debugging support
|
||||
on i.MX25.
|
||||
|
||||
config DEBUG_IMX21_IMX27_UART
|
||||
bool "i.MX21 and i.MX27 Debug UART"
|
||||
depends on SOC_IMX21 || SOC_IMX27
|
||||
config DEBUG_IMX27_UART
|
||||
bool "i.MX27 Debug UART"
|
||||
depends on SOC_IMX27
|
||||
help
|
||||
Say Y here if you want kernel low-level debugging support
|
||||
on i.MX21 or i.MX27.
|
||||
on i.MX27.
|
||||
|
||||
config DEBUG_IMX28_UART
|
||||
bool "i.MX28 Debug UART"
|
||||
@@ -1523,7 +1523,7 @@ config DEBUG_IMX_UART_PORT
|
||||
int "i.MX Debug UART Port Selection"
|
||||
depends on DEBUG_IMX1_UART || \
|
||||
DEBUG_IMX25_UART || \
|
||||
DEBUG_IMX21_IMX27_UART || \
|
||||
DEBUG_IMX27_UART || \
|
||||
DEBUG_IMX31_UART || \
|
||||
DEBUG_IMX35_UART || \
|
||||
DEBUG_IMX50_UART || \
|
||||
@@ -1591,12 +1591,12 @@ config DEBUG_LL_INCLUDE
|
||||
default "debug/icedcc.S" if DEBUG_ICEDCC
|
||||
default "debug/imx.S" if DEBUG_IMX1_UART || \
|
||||
DEBUG_IMX25_UART || \
|
||||
DEBUG_IMX21_IMX27_UART || \
|
||||
DEBUG_IMX27_UART || \
|
||||
DEBUG_IMX31_UART || \
|
||||
DEBUG_IMX35_UART || \
|
||||
DEBUG_IMX50_UART || \
|
||||
DEBUG_IMX51_UART || \
|
||||
DEBUG_IMX53_UART ||\
|
||||
DEBUG_IMX53_UART || \
|
||||
DEBUG_IMX6Q_UART || \
|
||||
DEBUG_IMX6SL_UART || \
|
||||
DEBUG_IMX6SX_UART || \
|
||||
|
@@ -9,16 +9,22 @@
|
||||
#include <linux/sizes.h>
|
||||
|
||||
.macro __nop
|
||||
#ifdef CONFIG_EFI_STUB
|
||||
@ This is almost but not quite a NOP, since it does clobber the
|
||||
@ condition flags. But it is the best we can do for EFI, since
|
||||
@ PE/COFF expects the magic string "MZ" at offset 0, while the
|
||||
@ ARM/Linux boot protocol expects an executable instruction
|
||||
@ there.
|
||||
.inst MZ_MAGIC | (0x1310 << 16) @ tstne r0, #0x4d000
|
||||
#else
|
||||
AR_CLASS( mov r0, r0 )
|
||||
M_CLASS( nop.w )
|
||||
.endm
|
||||
|
||||
.macro __initial_nops
|
||||
#ifdef CONFIG_EFI_STUB
|
||||
@ This is a two-instruction NOP, which happens to bear the
|
||||
@ PE/COFF signature "MZ" in the first two bytes, so the kernel
|
||||
@ is accepted as an EFI binary. Booting via the UEFI stub
|
||||
@ will not execute those instructions, but the ARM/Linux
|
||||
@ boot protocol does, so we need some NOPs here.
|
||||
.inst MZ_MAGIC | (0xe225 << 16) @ eor r5, r5, 0x4d000
|
||||
eor r5, r5, 0x4d000 @ undo previous insn
|
||||
#else
|
||||
__nop
|
||||
__nop
|
||||
#endif
|
||||
.endm
|
||||
|
||||
|
@@ -197,7 +197,8 @@ start:
|
||||
* were patching the initial instructions of the kernel, i.e
|
||||
* had started to exploit this "patch area".
|
||||
*/
|
||||
.rept 7
|
||||
__initial_nops
|
||||
.rept 5
|
||||
__nop
|
||||
.endr
|
||||
#ifndef CONFIG_THUMB2_KERNEL
|
||||
|
@@ -168,7 +168,7 @@
|
||||
};
|
||||
|
||||
uart0: serial@12000 {
|
||||
compatible = "marvell,armada-38x-uart";
|
||||
compatible = "marvell,armada-38x-uart", "ns16550a";
|
||||
reg = <0x12000 0x100>;
|
||||
reg-shift = <2>;
|
||||
interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
|
||||
@@ -178,7 +178,7 @@
|
||||
};
|
||||
|
||||
uart1: serial@12100 {
|
||||
compatible = "marvell,armada-38x-uart";
|
||||
compatible = "marvell,armada-38x-uart", "ns16550a";
|
||||
reg = <0x12100 0x100>;
|
||||
reg-shift = <2>;
|
||||
interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
@@ -84,7 +84,7 @@
|
||||
partitions {
|
||||
compatible = "redboot-fis";
|
||||
/* Eraseblock at 0xfe0000 */
|
||||
fis-index-block = <0x1fc>;
|
||||
fis-index-block = <0x7f>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "omap34xx.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
/*
|
||||
* Default secure signed bootloader (Nokia X-Loader) does not enable L3 firewall
|
||||
@@ -630,63 +631,92 @@
|
||||
};
|
||||
|
||||
lp5523: lp5523@32 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "national,lp5523";
|
||||
reg = <0x32>;
|
||||
clock-mode = /bits/ 8 <0>; /* LP55XX_CLOCK_AUTO */
|
||||
enable-gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>; /* 41 */
|
||||
enable-gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>; /* 41 */
|
||||
|
||||
chan0 {
|
||||
led@0 {
|
||||
reg = <0>;
|
||||
chan-name = "lp5523:kb1";
|
||||
led-cur = /bits/ 8 <50>;
|
||||
max-cur = /bits/ 8 <100>;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_KBD_BACKLIGHT;
|
||||
};
|
||||
|
||||
chan1 {
|
||||
led@1 {
|
||||
reg = <1>;
|
||||
chan-name = "lp5523:kb2";
|
||||
led-cur = /bits/ 8 <50>;
|
||||
max-cur = /bits/ 8 <100>;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_KBD_BACKLIGHT;
|
||||
};
|
||||
|
||||
chan2 {
|
||||
led@2 {
|
||||
reg = <2>;
|
||||
chan-name = "lp5523:kb3";
|
||||
led-cur = /bits/ 8 <50>;
|
||||
max-cur = /bits/ 8 <100>;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_KBD_BACKLIGHT;
|
||||
};
|
||||
|
||||
chan3 {
|
||||
led@3 {
|
||||
reg = <3>;
|
||||
chan-name = "lp5523:kb4";
|
||||
led-cur = /bits/ 8 <50>;
|
||||
max-cur = /bits/ 8 <100>;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_KBD_BACKLIGHT;
|
||||
};
|
||||
|
||||
chan4 {
|
||||
led@4 {
|
||||
reg = <4>;
|
||||
chan-name = "lp5523:b";
|
||||
led-cur = /bits/ 8 <50>;
|
||||
max-cur = /bits/ 8 <100>;
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
};
|
||||
|
||||
chan5 {
|
||||
led@5 {
|
||||
reg = <5>;
|
||||
chan-name = "lp5523:g";
|
||||
led-cur = /bits/ 8 <50>;
|
||||
max-cur = /bits/ 8 <100>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
};
|
||||
|
||||
chan6 {
|
||||
led@6 {
|
||||
reg = <6>;
|
||||
chan-name = "lp5523:r";
|
||||
led-cur = /bits/ 8 <50>;
|
||||
max-cur = /bits/ 8 <100>;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
};
|
||||
|
||||
chan7 {
|
||||
led@7 {
|
||||
reg = <7>;
|
||||
chan-name = "lp5523:kb5";
|
||||
led-cur = /bits/ 8 <50>;
|
||||
max-cur = /bits/ 8 <100>;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_KBD_BACKLIGHT;
|
||||
};
|
||||
|
||||
chan8 {
|
||||
led@8 {
|
||||
reg = <8>;
|
||||
chan-name = "lp5523:kb6";
|
||||
led-cur = /bits/ 8 <50>;
|
||||
max-cur = /bits/ 8 <100>;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_KBD_BACKLIGHT;
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -192,7 +192,7 @@
|
||||
|
||||
display: display@1{
|
||||
/* Connect panel-ilitek-9341 to ltdc */
|
||||
compatible = "st,sf-tc240t-9370-t";
|
||||
compatible = "st,sf-tc240t-9370-t", "ilitek,ili9341";
|
||||
reg = <1>;
|
||||
spi-3wire;
|
||||
spi-max-frequency = <10000000>;
|
||||
|
@@ -11,13 +11,6 @@
|
||||
#define IMX1_UART_BASE_ADDR(n) IMX1_UART##n##_BASE_ADDR
|
||||
#define IMX1_UART_BASE(n) IMX1_UART_BASE_ADDR(n)
|
||||
|
||||
#define IMX21_UART1_BASE_ADDR 0x1000a000
|
||||
#define IMX21_UART2_BASE_ADDR 0x1000b000
|
||||
#define IMX21_UART3_BASE_ADDR 0x1000c000
|
||||
#define IMX21_UART4_BASE_ADDR 0x1000d000
|
||||
#define IMX21_UART_BASE_ADDR(n) IMX21_UART##n##_BASE_ADDR
|
||||
#define IMX21_UART_BASE(n) IMX21_UART_BASE_ADDR(n)
|
||||
|
||||
#define IMX25_UART1_BASE_ADDR 0x43f90000
|
||||
#define IMX25_UART2_BASE_ADDR 0x43f94000
|
||||
#define IMX25_UART3_BASE_ADDR 0x5000c000
|
||||
@@ -26,6 +19,13 @@
|
||||
#define IMX25_UART_BASE_ADDR(n) IMX25_UART##n##_BASE_ADDR
|
||||
#define IMX25_UART_BASE(n) IMX25_UART_BASE_ADDR(n)
|
||||
|
||||
#define IMX27_UART1_BASE_ADDR 0x1000a000
|
||||
#define IMX27_UART2_BASE_ADDR 0x1000b000
|
||||
#define IMX27_UART3_BASE_ADDR 0x1000c000
|
||||
#define IMX27_UART4_BASE_ADDR 0x1000d000
|
||||
#define IMX27_UART_BASE_ADDR(n) IMX27_UART##n##_BASE_ADDR
|
||||
#define IMX27_UART_BASE(n) IMX27_UART_BASE_ADDR(n)
|
||||
|
||||
#define IMX31_UART1_BASE_ADDR 0x43f90000
|
||||
#define IMX31_UART2_BASE_ADDR 0x43f94000
|
||||
#define IMX31_UART3_BASE_ADDR 0x5000c000
|
||||
@@ -112,10 +112,10 @@
|
||||
|
||||
#ifdef CONFIG_DEBUG_IMX1_UART
|
||||
#define UART_PADDR IMX_DEBUG_UART_BASE(IMX1)
|
||||
#elif defined(CONFIG_DEBUG_IMX21_IMX27_UART)
|
||||
#define UART_PADDR IMX_DEBUG_UART_BASE(IMX21)
|
||||
#elif defined(CONFIG_DEBUG_IMX25_UART)
|
||||
#define UART_PADDR IMX_DEBUG_UART_BASE(IMX25)
|
||||
#elif defined(CONFIG_DEBUG_IMX27_UART)
|
||||
#define UART_PADDR IMX_DEBUG_UART_BASE(IMX27)
|
||||
#elif defined(CONFIG_DEBUG_IMX31_UART)
|
||||
#define UART_PADDR IMX_DEBUG_UART_BASE(IMX31)
|
||||
#elif defined(CONFIG_DEBUG_IMX35_UART)
|
||||
|
@@ -154,8 +154,10 @@ static int __init rcar_gen2_regulator_quirk(void)
|
||||
return -ENODEV;
|
||||
|
||||
for_each_matching_node_and_match(np, rcar_gen2_quirk_match, &id) {
|
||||
if (!of_device_is_available(np))
|
||||
if (!of_device_is_available(np)) {
|
||||
of_node_put(np);
|
||||
break;
|
||||
}
|
||||
|
||||
ret = of_property_read_u32(np, "reg", &addr);
|
||||
if (ret) /* Skip invalid entry and continue */
|
||||
@@ -164,6 +166,7 @@ static int __init rcar_gen2_regulator_quirk(void)
|
||||
quirk = kzalloc(sizeof(*quirk), GFP_KERNEL);
|
||||
if (!quirk) {
|
||||
ret = -ENOMEM;
|
||||
of_node_put(np);
|
||||
goto err_mem;
|
||||
}
|
||||
|
||||
|
@@ -52,7 +52,7 @@
|
||||
secure-monitor = <&sm>;
|
||||
};
|
||||
|
||||
gpu_opp_table: gpu-opp-table {
|
||||
gpu_opp_table: opp-table-gpu {
|
||||
compatible = "operating-points-v2";
|
||||
|
||||
opp-124999998 {
|
||||
|
@@ -543,7 +543,7 @@
|
||||
pinctrl-0 = <&nor_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
mx25u64: spi-flash@0 {
|
||||
mx25u64: flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "mxicy,mx25u6435f", "jedec,spi-nor";
|
||||
|
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "meson-gxbb.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
@@ -64,6 +65,7 @@
|
||||
regulator-name = "VDDIO_AO18";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vcc_3v3: regulator-vcc_3v3 {
|
||||
@@ -161,6 +163,7 @@
|
||||
status = "okay";
|
||||
pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
|
||||
pinctrl-names = "default";
|
||||
hdmi-supply = <&vddio_ao18>;
|
||||
};
|
||||
|
||||
&hdmi_tx_tmds_port {
|
||||
|
@@ -261,11 +261,6 @@
|
||||
vcc-supply = <&sb_3v3>;
|
||||
};
|
||||
|
||||
rtc@51 {
|
||||
compatible = "nxp,pcf2129";
|
||||
reg = <0x51>;
|
||||
};
|
||||
|
||||
eeprom@56 {
|
||||
compatible = "atmel,24c512";
|
||||
reg = <0x56>;
|
||||
@@ -307,6 +302,15 @@
|
||||
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
status = "okay";
|
||||
|
||||
rtc@51 {
|
||||
compatible = "nxp,pcf2129";
|
||||
reg = <0x51>;
|
||||
};
|
||||
};
|
||||
|
||||
&enetc_port1 {
|
||||
phy-handle = <&qds_phy1>;
|
||||
phy-connection-type = "rgmii-id";
|
||||
|
@@ -11,6 +11,13 @@
|
||||
model = "Marvell Armada CN9130 SoC";
|
||||
compatible = "marvell,cn9130", "marvell,armada-ap807-quad",
|
||||
"marvell,armada-ap807";
|
||||
|
||||
aliases {
|
||||
gpio1 = &cp0_gpio1;
|
||||
gpio2 = &cp0_gpio2;
|
||||
spi1 = &cp0_spi0;
|
||||
spi2 = &cp0_spi1;
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -35,3 +42,11 @@
|
||||
#undef CP11X_PCIE0_BASE
|
||||
#undef CP11X_PCIE1_BASE
|
||||
#undef CP11X_PCIE2_BASE
|
||||
|
||||
&cp0_gpio1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cp0_gpio2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
@@ -985,7 +985,7 @@
|
||||
|
||||
ccplex@e000000 {
|
||||
compatible = "nvidia,tegra186-ccplex-cluster";
|
||||
reg = <0x0 0x0e000000 0x0 0x3fffff>;
|
||||
reg = <0x0 0x0e000000 0x0 0x400000>;
|
||||
|
||||
nvidia,bpmp = <&bpmp>;
|
||||
};
|
||||
|
@@ -782,13 +782,12 @@
|
||||
reg = <0x3510000 0x10000>;
|
||||
interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&bpmp TEGRA194_CLK_HDA>,
|
||||
<&bpmp TEGRA194_CLK_HDA2CODEC_2X>,
|
||||
<&bpmp TEGRA194_CLK_HDA2HDMICODEC>;
|
||||
clock-names = "hda", "hda2codec_2x", "hda2hdmi";
|
||||
<&bpmp TEGRA194_CLK_HDA2HDMICODEC>,
|
||||
<&bpmp TEGRA194_CLK_HDA2CODEC_2X>;
|
||||
clock-names = "hda", "hda2hdmi", "hda2codec_2x";
|
||||
resets = <&bpmp TEGRA194_RESET_HDA>,
|
||||
<&bpmp TEGRA194_RESET_HDA2CODEC_2X>,
|
||||
<&bpmp TEGRA194_RESET_HDA2HDMICODEC>;
|
||||
reset-names = "hda", "hda2codec_2x", "hda2hdmi";
|
||||
reset-names = "hda", "hda2hdmi";
|
||||
power-domains = <&bpmp TEGRA194_POWER_DOMAIN_DISP>;
|
||||
interconnects = <&mc TEGRA194_MEMORY_CLIENT_HDAR &emc>,
|
||||
<&mc TEGRA194_MEMORY_CLIENT_HDAW &emc>;
|
||||
|
@@ -221,7 +221,7 @@
|
||||
interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
gpio-ranges = <&tlmm 0 80>;
|
||||
gpio-ranges = <&tlmm 0 0 80>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
|
||||
|
@@ -18,8 +18,8 @@
|
||||
#size-cells = <2>;
|
||||
|
||||
aliases {
|
||||
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
|
||||
sdhc2 = &sdhc_2; /* SDC2 SD card slot */
|
||||
mmc0 = &sdhc_1; /* SDC1 eMMC slot */
|
||||
mmc1 = &sdhc_2; /* SDC2 SD card slot */
|
||||
};
|
||||
|
||||
chosen { };
|
||||
|
@@ -645,9 +645,6 @@
|
||||
nvmem-cells = <&gpu_speed_bin>;
|
||||
nvmem-cell-names = "speed_bin";
|
||||
|
||||
qcom,gpu-quirk-two-pass-use-wfi;
|
||||
qcom,gpu-quirk-fault-detect-mask;
|
||||
|
||||
operating-points-v2 = <&gpu_opp_table>;
|
||||
|
||||
gpu_opp_table: opp-table {
|
||||
|
@@ -365,6 +365,10 @@
|
||||
dai@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
dai@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
&sound {
|
||||
@@ -377,6 +381,7 @@
|
||||
"SpkrLeft IN", "SPK1 OUT",
|
||||
"SpkrRight IN", "SPK2 OUT",
|
||||
"MM_DL1", "MultiMedia1 Playback",
|
||||
"MM_DL3", "MultiMedia3 Playback",
|
||||
"MultiMedia2 Capture", "MM_UL2";
|
||||
|
||||
mm1-dai-link {
|
||||
@@ -393,6 +398,13 @@
|
||||
};
|
||||
};
|
||||
|
||||
mm3-dai-link {
|
||||
link-name = "MultiMedia3";
|
||||
cpu {
|
||||
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
|
||||
};
|
||||
};
|
||||
|
||||
slim-dai-link {
|
||||
link-name = "SLIM Playback";
|
||||
cpu {
|
||||
@@ -422,6 +434,21 @@
|
||||
sound-dai = <&wcd9340 1>;
|
||||
};
|
||||
};
|
||||
|
||||
slim-wcd-dai-link {
|
||||
link-name = "SLIM WCD Playback";
|
||||
cpu {
|
||||
sound-dai = <&q6afedai SLIMBUS_1_RX>;
|
||||
};
|
||||
|
||||
platform {
|
||||
sound-dai = <&q6routing>;
|
||||
};
|
||||
|
||||
codec {
|
||||
sound-dai = <&wcd9340 2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
|
@@ -18,6 +18,7 @@
|
||||
pinctrl-names = "default";
|
||||
renesas,no-ether-link;
|
||||
phy-handle = <&phy0>;
|
||||
phy-mode = "rgmii-id";
|
||||
status = "okay";
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#size-cells = <1>;
|
||||
ranges = <0x00 0x00 0x00100000 0x1c000>;
|
||||
|
||||
serdes_ln_ctrl: serdes-ln-ctrl@4080 {
|
||||
serdes_ln_ctrl: mux-controller@4080 {
|
||||
compatible = "mmio-mux";
|
||||
#mux-control-cells = <1>;
|
||||
mux-reg-masks = <0x4080 0x3>, <0x4084 0x3>, /* SERDES0 lane0/1 select */
|
||||
|
@@ -60,7 +60,7 @@
|
||||
i-cache-sets = <256>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <128>;
|
||||
d-cache-sets = <256>;
|
||||
next-level-cache = <&L2_0>;
|
||||
};
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
i-cache-sets = <256>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <128>;
|
||||
d-cache-sets = <256>;
|
||||
next-level-cache = <&L2_0>;
|
||||
};
|
||||
};
|
||||
@@ -84,7 +84,7 @@
|
||||
cache-level = <2>;
|
||||
cache-size = <0x100000>;
|
||||
cache-line-size = <64>;
|
||||
cache-sets = <2048>;
|
||||
cache-sets = <1024>;
|
||||
next-level-cache = <&msmc_l3>;
|
||||
};
|
||||
|
||||
|
@@ -61,7 +61,7 @@
|
||||
i-cache-sets = <256>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <128>;
|
||||
d-cache-sets = <256>;
|
||||
next-level-cache = <&L2_0>;
|
||||
};
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
i-cache-sets = <256>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <128>;
|
||||
d-cache-sets = <256>;
|
||||
next-level-cache = <&L2_0>;
|
||||
};
|
||||
};
|
||||
@@ -85,7 +85,7 @@
|
||||
cache-level = <2>;
|
||||
cache-size = <0x100000>;
|
||||
cache-line-size = <64>;
|
||||
cache-sets = <2048>;
|
||||
cache-sets = <1024>;
|
||||
next-level-cache = <&msmc_l3>;
|
||||
};
|
||||
|
||||
|
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
SYM_FUNC_START_PI(clear_page)
|
||||
mrs x1, dczid_el0
|
||||
tbnz x1, #4, 2f /* Branch if DC ZVA is prohibited */
|
||||
and w1, w1, #0xf
|
||||
mov x2, #4
|
||||
lsl x1, x2, x1
|
||||
@@ -25,5 +26,14 @@ SYM_FUNC_START_PI(clear_page)
|
||||
tst x0, #(PAGE_SIZE - 1)
|
||||
b.ne 1b
|
||||
ret
|
||||
|
||||
2: stnp xzr, xzr, [x0]
|
||||
stnp xzr, xzr, [x0, #16]
|
||||
stnp xzr, xzr, [x0, #32]
|
||||
stnp xzr, xzr, [x0, #48]
|
||||
add x0, x0, #64
|
||||
tst x0, #(PAGE_SIZE - 1)
|
||||
b.ne 2b
|
||||
ret
|
||||
SYM_FUNC_END_PI(clear_page)
|
||||
EXPORT_SYMBOL(clear_page)
|
||||
|
@@ -1985,6 +1985,10 @@ config SYS_HAS_CPU_MIPS64_R1
|
||||
config SYS_HAS_CPU_MIPS64_R2
|
||||
bool
|
||||
|
||||
config SYS_HAS_CPU_MIPS64_R5
|
||||
bool
|
||||
select ARCH_HAS_SYNC_DMA_FOR_CPU if DMA_NONCOHERENT
|
||||
|
||||
config SYS_HAS_CPU_MIPS64_R6
|
||||
bool
|
||||
select ARCH_HAS_SYNC_DMA_FOR_CPU if DMA_NONCOHERENT
|
||||
@@ -2146,7 +2150,7 @@ config CPU_SUPPORTS_ADDRWINCFG
|
||||
bool
|
||||
config CPU_SUPPORTS_HUGEPAGES
|
||||
bool
|
||||
depends on !(32BIT && (ARCH_PHYS_ADDR_T_64BIT || EVA))
|
||||
depends on !(32BIT && (PHYS_ADDR_T_64BIT || EVA))
|
||||
config MIPS_PGD_C0_CONTEXT
|
||||
bool
|
||||
default y if 64BIT && (CPU_MIPSR2 || CPU_MIPSR6) && !CPU_XLP
|
||||
|
@@ -387,6 +387,12 @@ struct clk *clk_get_parent(struct clk *clk)
|
||||
}
|
||||
EXPORT_SYMBOL(clk_get_parent);
|
||||
|
||||
int clk_set_parent(struct clk *clk, struct clk *parent)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(clk_set_parent);
|
||||
|
||||
unsigned long clk_get_rate(struct clk *clk)
|
||||
{
|
||||
if (!clk)
|
||||
|
@@ -328,6 +328,7 @@ static int __init octeon_ehci_device_init(void)
|
||||
|
||||
pd->dev.platform_data = &octeon_ehci_pdata;
|
||||
octeon_ehci_hw_start(&pd->dev);
|
||||
put_device(&pd->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -391,6 +392,7 @@ static int __init octeon_ohci_device_init(void)
|
||||
|
||||
pd->dev.platform_data = &octeon_ohci_pdata;
|
||||
octeon_ohci_hw_start(&pd->dev);
|
||||
put_device(&pd->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@@ -544,6 +544,7 @@ static int __init dwc3_octeon_device_init(void)
|
||||
devm_iounmap(&pdev->dev, base);
|
||||
devm_release_mem_region(&pdev->dev, res->start,
|
||||
resource_size(res));
|
||||
put_device(&pdev->dev);
|
||||
}
|
||||
} while (node != NULL);
|
||||
|
||||
|
@@ -36,7 +36,7 @@
|
||||
nop
|
||||
/* Loongson-3A R2/R3 */
|
||||
andi t0, (PRID_IMP_MASK | PRID_REV_MASK)
|
||||
slti t0, (PRID_IMP_LOONGSON_64C | PRID_REV_LOONGSON3A_R2_0)
|
||||
slti t0, t0, (PRID_IMP_LOONGSON_64C | PRID_REV_LOONGSON3A_R2_0)
|
||||
bnez t0, 2f
|
||||
nop
|
||||
1:
|
||||
@@ -71,7 +71,7 @@
|
||||
nop
|
||||
/* Loongson-3A R2/R3 */
|
||||
andi t0, (PRID_IMP_MASK | PRID_REV_MASK)
|
||||
slti t0, (PRID_IMP_LOONGSON_64C | PRID_REV_LOONGSON3A_R2_0)
|
||||
slti t0, t0, (PRID_IMP_LOONGSON_64C | PRID_REV_LOONGSON3A_R2_0)
|
||||
bnez t0, 2f
|
||||
nop
|
||||
1:
|
||||
|
@@ -317,7 +317,7 @@ enum cvmx_chip_types_enum {
|
||||
|
||||
/* Functions to return string based on type */
|
||||
#define ENUM_BRD_TYPE_CASE(x) \
|
||||
case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */
|
||||
case x: return (&#x[16]); /* Skip CVMX_BOARD_TYPE_ */
|
||||
static inline const char *cvmx_board_type_to_string(enum
|
||||
cvmx_board_types_enum type)
|
||||
{
|
||||
@@ -408,7 +408,7 @@ static inline const char *cvmx_board_type_to_string(enum
|
||||
}
|
||||
|
||||
#define ENUM_CHIP_TYPE_CASE(x) \
|
||||
case x: return(#x + 15); /* Skip CVMX_CHIP_TYPE */
|
||||
case x: return (&#x[15]); /* Skip CVMX_CHIP_TYPE */
|
||||
static inline const char *cvmx_chip_type_to_string(enum
|
||||
cvmx_chip_types_enum type)
|
||||
{
|
||||
|
@@ -164,6 +164,12 @@ struct clk *clk_get_parent(struct clk *clk)
|
||||
}
|
||||
EXPORT_SYMBOL(clk_get_parent);
|
||||
|
||||
int clk_set_parent(struct clk *clk, struct clk *parent)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(clk_set_parent);
|
||||
|
||||
static inline u32 get_counter_resolution(void)
|
||||
{
|
||||
u32 res;
|
||||
|
@@ -22,9 +22,11 @@ asmlinkage long sys_or1k_atomic(unsigned long type, unsigned long *v1,
|
||||
|
||||
asmlinkage long __sys_clone(unsigned long clone_flags, unsigned long newsp,
|
||||
void __user *parent_tid, void __user *child_tid, int tls);
|
||||
asmlinkage long __sys_clone3(struct clone_args __user *uargs, size_t size);
|
||||
asmlinkage long __sys_fork(void);
|
||||
|
||||
#define sys_clone __sys_clone
|
||||
#define sys_clone3 __sys_clone3
|
||||
#define sys_fork __sys_fork
|
||||
|
||||
#endif /* __ASM_OPENRISC_SYSCALLS_H */
|
||||
|
@@ -1170,6 +1170,11 @@ ENTRY(__sys_clone)
|
||||
l.j _fork_save_extra_regs_and_call
|
||||
l.nop
|
||||
|
||||
ENTRY(__sys_clone3)
|
||||
l.movhi r29,hi(sys_clone3)
|
||||
l.j _fork_save_extra_regs_and_call
|
||||
l.ori r29,r29,lo(sys_clone3)
|
||||
|
||||
ENTRY(__sys_fork)
|
||||
l.movhi r29,hi(sys_fork)
|
||||
l.ori r29,r29,lo(sys_fork)
|
||||
|
@@ -5,9 +5,11 @@
|
||||
#define lpa(va) ({ \
|
||||
unsigned long pa; \
|
||||
__asm__ __volatile__( \
|
||||
"copy %%r0,%0\n\t" \
|
||||
"lpa %%r0(%1),%0" \
|
||||
: "=r" (pa) \
|
||||
"copy %%r0,%0\n" \
|
||||
"8:\tlpa %%r0(%1),%0\n" \
|
||||
"9:\n" \
|
||||
ASM_EXCEPTIONTABLE_ENTRY(8b, 9b) \
|
||||
: "=&r" (pa) \
|
||||
: "r" (va) \
|
||||
: "memory" \
|
||||
); \
|
||||
@@ -17,9 +19,11 @@
|
||||
#define lpa_user(va) ({ \
|
||||
unsigned long pa; \
|
||||
__asm__ __volatile__( \
|
||||
"copy %%r0,%0\n\t" \
|
||||
"lpa %%r0(%%sr3,%1),%0" \
|
||||
: "=r" (pa) \
|
||||
"copy %%r0,%0\n" \
|
||||
"8:\tlpa %%r0(%%sr3,%1),%0\n" \
|
||||
"9:\n" \
|
||||
ASM_EXCEPTIONTABLE_ENTRY(8b, 9b) \
|
||||
: "=&r" (pa) \
|
||||
: "r" (va) \
|
||||
: "memory" \
|
||||
); \
|
||||
|
@@ -784,7 +784,7 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
|
||||
* unless pagefault_disable() was called before.
|
||||
*/
|
||||
|
||||
if (fault_space == 0 && !faulthandler_disabled())
|
||||
if (faulthandler_disabled() || fault_space == 0)
|
||||
{
|
||||
/* Clean up and return if in exception table. */
|
||||
if (fixup_exception(regs))
|
||||
|
@@ -79,6 +79,7 @@ fman0: fman@400000 {
|
||||
#size-cells = <0>;
|
||||
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
|
||||
reg = <0xfc000 0x1000>;
|
||||
fsl,erratum-a009885;
|
||||
};
|
||||
|
||||
xmdio0: mdio@fd000 {
|
||||
@@ -86,6 +87,7 @@ fman0: fman@400000 {
|
||||
#size-cells = <0>;
|
||||
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
|
||||
reg = <0xfd000 0x1000>;
|
||||
fsl,erratum-a009885;
|
||||
};
|
||||
};
|
||||
|
||||
|
12
arch/powerpc/include/asm/cpu_setup_power.h
Normal file
12
arch/powerpc/include/asm/cpu_setup_power.h
Normal file
@@ -0,0 +1,12 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/*
|
||||
* Copyright (C) 2020 IBM Corporation
|
||||
*/
|
||||
void __setup_cpu_power7(unsigned long offset, struct cpu_spec *spec);
|
||||
void __restore_cpu_power7(void);
|
||||
void __setup_cpu_power8(unsigned long offset, struct cpu_spec *spec);
|
||||
void __restore_cpu_power8(void);
|
||||
void __setup_cpu_power9(unsigned long offset, struct cpu_spec *spec);
|
||||
void __restore_cpu_power9(void);
|
||||
void __setup_cpu_power10(unsigned long offset, struct cpu_spec *spec);
|
||||
void __restore_cpu_power10(void);
|
@@ -38,6 +38,8 @@
|
||||
#define PACA_IRQ_MUST_HARD_MASK (PACA_IRQ_EE)
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_PPC64 */
|
||||
|
||||
/*
|
||||
* flags for paca->irq_soft_mask
|
||||
*/
|
||||
@@ -46,8 +48,6 @@
|
||||
#define IRQS_PMI_DISABLED 2
|
||||
#define IRQS_ALL_DISABLED (IRQS_DISABLED | IRQS_PMI_DISABLED)
|
||||
|
||||
#endif /* CONFIG_PPC64 */
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
extern void replay_system_reset(void);
|
||||
@@ -175,6 +175,42 @@ static inline bool arch_irqs_disabled(void)
|
||||
return arch_irqs_disabled_flags(arch_local_save_flags());
|
||||
}
|
||||
|
||||
static inline void set_pmi_irq_pending(void)
|
||||
{
|
||||
/*
|
||||
* Invoked from PMU callback functions to set PMI bit in the paca.
|
||||
* This has to be called with irq's disabled (via hard_irq_disable()).
|
||||
*/
|
||||
if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG))
|
||||
WARN_ON_ONCE(mfmsr() & MSR_EE);
|
||||
|
||||
get_paca()->irq_happened |= PACA_IRQ_PMI;
|
||||
}
|
||||
|
||||
static inline void clear_pmi_irq_pending(void)
|
||||
{
|
||||
/*
|
||||
* Invoked from PMU callback functions to clear the pending PMI bit
|
||||
* in the paca.
|
||||
*/
|
||||
if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG))
|
||||
WARN_ON_ONCE(mfmsr() & MSR_EE);
|
||||
|
||||
get_paca()->irq_happened &= ~PACA_IRQ_PMI;
|
||||
}
|
||||
|
||||
static inline bool pmi_irq_pending(void)
|
||||
{
|
||||
/*
|
||||
* Invoked from PMU callback functions to check if there is a pending
|
||||
* PMI bit in the paca.
|
||||
*/
|
||||
if (get_paca()->irq_happened & PACA_IRQ_PMI)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PPC_BOOK3S
|
||||
/*
|
||||
* To support disabling and enabling of irq with PMI, set of
|
||||
@@ -296,6 +332,10 @@ extern void irq_set_pending_from_srr1(unsigned long srr1);
|
||||
|
||||
extern void force_external_irq_replay(void);
|
||||
|
||||
static inline void irq_soft_mask_regs_set_state(struct pt_regs *regs, unsigned long val)
|
||||
{
|
||||
regs->softe = val;
|
||||
}
|
||||
#else /* CONFIG_PPC64 */
|
||||
|
||||
static inline unsigned long arch_local_save_flags(void)
|
||||
@@ -364,6 +404,13 @@ static inline bool arch_irq_disabled_regs(struct pt_regs *regs)
|
||||
|
||||
static inline void may_hard_irq_enable(void) { }
|
||||
|
||||
static inline void clear_pmi_irq_pending(void) { }
|
||||
static inline void set_pmi_irq_pending(void) { }
|
||||
static inline bool pmi_irq_pending(void) { return false; }
|
||||
|
||||
static inline void irq_soft_mask_regs_set_state(struct pt_regs *regs, unsigned long val)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_PPC64 */
|
||||
|
||||
#define ARCH_IRQ_INIT_FLAGS IRQ_NOREQUEST
|
||||
|
@@ -865,6 +865,7 @@
|
||||
#define MMCR0_BHRBA 0x00200000UL /* BHRB Access allowed in userspace */
|
||||
#define MMCR0_EBE 0x00100000UL /* Event based branch enable */
|
||||
#define MMCR0_PMCC 0x000c0000UL /* PMC control */
|
||||
#define MMCR0_PMCCEXT ASM_CONST(0x00000200) /* PMCCEXT control */
|
||||
#define MMCR0_PMCC_U6 0x00080000UL /* PMC1-6 are R/W by user (PR) */
|
||||
#define MMCR0_PMC1CE 0x00008000UL /* PMC1 count enable*/
|
||||
#define MMCR0_PMCjCE ASM_CONST(0x00004000) /* PMCj count enable*/
|
||||
|
@@ -241,9 +241,11 @@ int __init btext_find_display(int allow_nonstdout)
|
||||
rc = btext_initialize(np);
|
||||
printk("result: %d\n", rc);
|
||||
}
|
||||
if (rc == 0)
|
||||
if (rc == 0) {
|
||||
of_node_put(np);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@@ -1,252 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/*
|
||||
* This file contains low level CPU setup functions.
|
||||
* Copyright (C) 2003 Benjamin Herrenschmidt (benh@kernel.crashing.org)
|
||||
*/
|
||||
|
||||
#include <asm/processor.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/cputable.h>
|
||||
#include <asm/ppc_asm.h>
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/cache.h>
|
||||
#include <asm/book3s/64/mmu-hash.h>
|
||||
|
||||
/* Entry: r3 = crap, r4 = ptr to cputable entry
|
||||
*
|
||||
* Note that we can be called twice for pseudo-PVRs
|
||||
*/
|
||||
_GLOBAL(__setup_cpu_power7)
|
||||
mflr r11
|
||||
bl __init_hvmode_206
|
||||
mtlr r11
|
||||
beqlr
|
||||
li r0,0
|
||||
mtspr SPRN_LPID,r0
|
||||
LOAD_REG_IMMEDIATE(r0, PCR_MASK)
|
||||
mtspr SPRN_PCR,r0
|
||||
mfspr r3,SPRN_LPCR
|
||||
li r4,(LPCR_LPES1 >> LPCR_LPES_SH)
|
||||
bl __init_LPCR_ISA206
|
||||
mtlr r11
|
||||
blr
|
||||
|
||||
_GLOBAL(__restore_cpu_power7)
|
||||
mflr r11
|
||||
mfmsr r3
|
||||
rldicl. r0,r3,4,63
|
||||
beqlr
|
||||
li r0,0
|
||||
mtspr SPRN_LPID,r0
|
||||
LOAD_REG_IMMEDIATE(r0, PCR_MASK)
|
||||
mtspr SPRN_PCR,r0
|
||||
mfspr r3,SPRN_LPCR
|
||||
li r4,(LPCR_LPES1 >> LPCR_LPES_SH)
|
||||
bl __init_LPCR_ISA206
|
||||
mtlr r11
|
||||
blr
|
||||
|
||||
_GLOBAL(__setup_cpu_power8)
|
||||
mflr r11
|
||||
bl __init_FSCR
|
||||
bl __init_PMU
|
||||
bl __init_PMU_ISA207
|
||||
bl __init_hvmode_206
|
||||
mtlr r11
|
||||
beqlr
|
||||
li r0,0
|
||||
mtspr SPRN_LPID,r0
|
||||
LOAD_REG_IMMEDIATE(r0, PCR_MASK)
|
||||
mtspr SPRN_PCR,r0
|
||||
mfspr r3,SPRN_LPCR
|
||||
ori r3, r3, LPCR_PECEDH
|
||||
li r4,0 /* LPES = 0 */
|
||||
bl __init_LPCR_ISA206
|
||||
bl __init_HFSCR
|
||||
bl __init_PMU_HV
|
||||
bl __init_PMU_HV_ISA207
|
||||
mtlr r11
|
||||
blr
|
||||
|
||||
_GLOBAL(__restore_cpu_power8)
|
||||
mflr r11
|
||||
bl __init_FSCR
|
||||
bl __init_PMU
|
||||
bl __init_PMU_ISA207
|
||||
mfmsr r3
|
||||
rldicl. r0,r3,4,63
|
||||
mtlr r11
|
||||
beqlr
|
||||
li r0,0
|
||||
mtspr SPRN_LPID,r0
|
||||
LOAD_REG_IMMEDIATE(r0, PCR_MASK)
|
||||
mtspr SPRN_PCR,r0
|
||||
mfspr r3,SPRN_LPCR
|
||||
ori r3, r3, LPCR_PECEDH
|
||||
li r4,0 /* LPES = 0 */
|
||||
bl __init_LPCR_ISA206
|
||||
bl __init_HFSCR
|
||||
bl __init_PMU_HV
|
||||
bl __init_PMU_HV_ISA207
|
||||
mtlr r11
|
||||
blr
|
||||
|
||||
_GLOBAL(__setup_cpu_power10)
|
||||
mflr r11
|
||||
bl __init_FSCR_power10
|
||||
bl __init_PMU
|
||||
bl __init_PMU_ISA31
|
||||
b 1f
|
||||
|
||||
_GLOBAL(__setup_cpu_power9)
|
||||
mflr r11
|
||||
bl __init_FSCR_power9
|
||||
bl __init_PMU
|
||||
1: bl __init_hvmode_206
|
||||
mtlr r11
|
||||
beqlr
|
||||
li r0,0
|
||||
mtspr SPRN_PSSCR,r0
|
||||
mtspr SPRN_LPID,r0
|
||||
mtspr SPRN_PID,r0
|
||||
LOAD_REG_IMMEDIATE(r0, PCR_MASK)
|
||||
mtspr SPRN_PCR,r0
|
||||
mfspr r3,SPRN_LPCR
|
||||
LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE | LPCR_HEIC)
|
||||
or r3, r3, r4
|
||||
LOAD_REG_IMMEDIATE(r4, LPCR_UPRT | LPCR_HR)
|
||||
andc r3, r3, r4
|
||||
li r4,0 /* LPES = 0 */
|
||||
bl __init_LPCR_ISA300
|
||||
bl __init_HFSCR
|
||||
bl __init_PMU_HV
|
||||
mtlr r11
|
||||
blr
|
||||
|
||||
_GLOBAL(__restore_cpu_power10)
|
||||
mflr r11
|
||||
bl __init_FSCR_power10
|
||||
bl __init_PMU
|
||||
bl __init_PMU_ISA31
|
||||
b 1f
|
||||
|
||||
_GLOBAL(__restore_cpu_power9)
|
||||
mflr r11
|
||||
bl __init_FSCR_power9
|
||||
bl __init_PMU
|
||||
1: mfmsr r3
|
||||
rldicl. r0,r3,4,63
|
||||
mtlr r11
|
||||
beqlr
|
||||
li r0,0
|
||||
mtspr SPRN_PSSCR,r0
|
||||
mtspr SPRN_LPID,r0
|
||||
mtspr SPRN_PID,r0
|
||||
LOAD_REG_IMMEDIATE(r0, PCR_MASK)
|
||||
mtspr SPRN_PCR,r0
|
||||
mfspr r3,SPRN_LPCR
|
||||
LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE | LPCR_HEIC)
|
||||
or r3, r3, r4
|
||||
LOAD_REG_IMMEDIATE(r4, LPCR_UPRT | LPCR_HR)
|
||||
andc r3, r3, r4
|
||||
li r4,0 /* LPES = 0 */
|
||||
bl __init_LPCR_ISA300
|
||||
bl __init_HFSCR
|
||||
bl __init_PMU_HV
|
||||
mtlr r11
|
||||
blr
|
||||
|
||||
__init_hvmode_206:
|
||||
/* Disable CPU_FTR_HVMODE and exit if MSR:HV is not set */
|
||||
mfmsr r3
|
||||
rldicl. r0,r3,4,63
|
||||
bnelr
|
||||
ld r5,CPU_SPEC_FEATURES(r4)
|
||||
LOAD_REG_IMMEDIATE(r6,CPU_FTR_HVMODE | CPU_FTR_P9_TM_HV_ASSIST)
|
||||
andc r5,r5,r6
|
||||
std r5,CPU_SPEC_FEATURES(r4)
|
||||
blr
|
||||
|
||||
__init_LPCR_ISA206:
|
||||
/* Setup a sane LPCR:
|
||||
* Called with initial LPCR in R3 and desired LPES 2-bit value in R4
|
||||
*
|
||||
* LPES = 0b01 (HSRR0/1 used for 0x500)
|
||||
* PECE = 0b111
|
||||
* DPFD = 4
|
||||
* HDICE = 0
|
||||
* VC = 0b100 (VPM0=1, VPM1=0, ISL=0)
|
||||
* VRMASD = 0b10000 (L=1, LP=00)
|
||||
*
|
||||
* Other bits untouched for now
|
||||
*/
|
||||
li r5,0x10
|
||||
rldimi r3,r5, LPCR_VRMASD_SH, 64-LPCR_VRMASD_SH-5
|
||||
|
||||
/* POWER9 has no VRMASD */
|
||||
__init_LPCR_ISA300:
|
||||
rldimi r3,r4, LPCR_LPES_SH, 64-LPCR_LPES_SH-2
|
||||
ori r3,r3,(LPCR_PECE0|LPCR_PECE1|LPCR_PECE2)
|
||||
li r5,4
|
||||
rldimi r3,r5, LPCR_DPFD_SH, 64-LPCR_DPFD_SH-3
|
||||
clrrdi r3,r3,1 /* clear HDICE */
|
||||
li r5,4
|
||||
rldimi r3,r5, LPCR_VC_SH, 0
|
||||
mtspr SPRN_LPCR,r3
|
||||
isync
|
||||
blr
|
||||
|
||||
__init_FSCR_power10:
|
||||
mfspr r3, SPRN_FSCR
|
||||
ori r3, r3, FSCR_PREFIX
|
||||
mtspr SPRN_FSCR, r3
|
||||
// fall through
|
||||
|
||||
__init_FSCR_power9:
|
||||
mfspr r3, SPRN_FSCR
|
||||
ori r3, r3, FSCR_SCV
|
||||
mtspr SPRN_FSCR, r3
|
||||
// fall through
|
||||
|
||||
__init_FSCR:
|
||||
mfspr r3,SPRN_FSCR
|
||||
ori r3,r3,FSCR_TAR|FSCR_EBB
|
||||
mtspr SPRN_FSCR,r3
|
||||
blr
|
||||
|
||||
__init_HFSCR:
|
||||
mfspr r3,SPRN_HFSCR
|
||||
ori r3,r3,HFSCR_TAR|HFSCR_TM|HFSCR_BHRB|HFSCR_PM|\
|
||||
HFSCR_DSCR|HFSCR_VECVSX|HFSCR_FP|HFSCR_EBB|HFSCR_MSGP
|
||||
mtspr SPRN_HFSCR,r3
|
||||
blr
|
||||
|
||||
__init_PMU_HV:
|
||||
li r5,0
|
||||
mtspr SPRN_MMCRC,r5
|
||||
blr
|
||||
|
||||
__init_PMU_HV_ISA207:
|
||||
li r5,0
|
||||
mtspr SPRN_MMCRH,r5
|
||||
blr
|
||||
|
||||
__init_PMU:
|
||||
li r5,0
|
||||
mtspr SPRN_MMCRA,r5
|
||||
mtspr SPRN_MMCR0,r5
|
||||
mtspr SPRN_MMCR1,r5
|
||||
mtspr SPRN_MMCR2,r5
|
||||
blr
|
||||
|
||||
__init_PMU_ISA207:
|
||||
li r5,0
|
||||
mtspr SPRN_MMCRS,r5
|
||||
blr
|
||||
|
||||
__init_PMU_ISA31:
|
||||
li r5,0
|
||||
mtspr SPRN_MMCR3,r5
|
||||
LOAD_REG_IMMEDIATE(r5, MMCRA_BHRB_DISABLE)
|
||||
mtspr SPRN_MMCRA,r5
|
||||
blr
|
272
arch/powerpc/kernel/cpu_setup_power.c
Normal file
272
arch/powerpc/kernel/cpu_setup_power.c
Normal file
@@ -0,0 +1,272 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* Copyright 2020, Jordan Niethe, IBM Corporation.
|
||||
*
|
||||
* This file contains low level CPU setup functions.
|
||||
* Originally written in assembly by Benjamin Herrenschmidt & various other
|
||||
* authors.
|
||||
*/
|
||||
|
||||
#include <asm/reg.h>
|
||||
#include <asm/synch.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <asm/cputable.h>
|
||||
#include <asm/cpu_setup_power.h>
|
||||
|
||||
/* Disable CPU_FTR_HVMODE and return false if MSR:HV is not set */
|
||||
static bool init_hvmode_206(struct cpu_spec *t)
|
||||
{
|
||||
u64 msr;
|
||||
|
||||
msr = mfmsr();
|
||||
if (msr & MSR_HV)
|
||||
return true;
|
||||
|
||||
t->cpu_features &= ~(CPU_FTR_HVMODE | CPU_FTR_P9_TM_HV_ASSIST);
|
||||
return false;
|
||||
}
|
||||
|
||||
static void init_LPCR_ISA300(u64 lpcr, u64 lpes)
|
||||
{
|
||||
/* POWER9 has no VRMASD */
|
||||
lpcr |= (lpes << LPCR_LPES_SH) & LPCR_LPES;
|
||||
lpcr |= LPCR_PECE0|LPCR_PECE1|LPCR_PECE2;
|
||||
lpcr |= (4ull << LPCR_DPFD_SH) & LPCR_DPFD;
|
||||
lpcr &= ~LPCR_HDICE; /* clear HDICE */
|
||||
lpcr |= (4ull << LPCR_VC_SH);
|
||||
mtspr(SPRN_LPCR, lpcr);
|
||||
isync();
|
||||
}
|
||||
|
||||
/*
|
||||
* Setup a sane LPCR:
|
||||
* Called with initial LPCR and desired LPES 2-bit value
|
||||
*
|
||||
* LPES = 0b01 (HSRR0/1 used for 0x500)
|
||||
* PECE = 0b111
|
||||
* DPFD = 4
|
||||
* HDICE = 0
|
||||
* VC = 0b100 (VPM0=1, VPM1=0, ISL=0)
|
||||
* VRMASD = 0b10000 (L=1, LP=00)
|
||||
*
|
||||
* Other bits untouched for now
|
||||
*/
|
||||
static void init_LPCR_ISA206(u64 lpcr, u64 lpes)
|
||||
{
|
||||
lpcr |= (0x10ull << LPCR_VRMASD_SH) & LPCR_VRMASD;
|
||||
init_LPCR_ISA300(lpcr, lpes);
|
||||
}
|
||||
|
||||
static void init_FSCR(void)
|
||||
{
|
||||
u64 fscr;
|
||||
|
||||
fscr = mfspr(SPRN_FSCR);
|
||||
fscr |= FSCR_TAR|FSCR_EBB;
|
||||
mtspr(SPRN_FSCR, fscr);
|
||||
}
|
||||
|
||||
static void init_FSCR_power9(void)
|
||||
{
|
||||
u64 fscr;
|
||||
|
||||
fscr = mfspr(SPRN_FSCR);
|
||||
fscr |= FSCR_SCV;
|
||||
mtspr(SPRN_FSCR, fscr);
|
||||
init_FSCR();
|
||||
}
|
||||
|
||||
static void init_FSCR_power10(void)
|
||||
{
|
||||
u64 fscr;
|
||||
|
||||
fscr = mfspr(SPRN_FSCR);
|
||||
fscr |= FSCR_PREFIX;
|
||||
mtspr(SPRN_FSCR, fscr);
|
||||
init_FSCR_power9();
|
||||
}
|
||||
|
||||
static void init_HFSCR(void)
|
||||
{
|
||||
u64 hfscr;
|
||||
|
||||
hfscr = mfspr(SPRN_HFSCR);
|
||||
hfscr |= HFSCR_TAR|HFSCR_TM|HFSCR_BHRB|HFSCR_PM|HFSCR_DSCR|\
|
||||
HFSCR_VECVSX|HFSCR_FP|HFSCR_EBB|HFSCR_MSGP;
|
||||
mtspr(SPRN_HFSCR, hfscr);
|
||||
}
|
||||
|
||||
static void init_PMU_HV(void)
|
||||
{
|
||||
mtspr(SPRN_MMCRC, 0);
|
||||
}
|
||||
|
||||
static void init_PMU_HV_ISA207(void)
|
||||
{
|
||||
mtspr(SPRN_MMCRH, 0);
|
||||
}
|
||||
|
||||
static void init_PMU(void)
|
||||
{
|
||||
mtspr(SPRN_MMCRA, 0);
|
||||
mtspr(SPRN_MMCR0, 0);
|
||||
mtspr(SPRN_MMCR1, 0);
|
||||
mtspr(SPRN_MMCR2, 0);
|
||||
}
|
||||
|
||||
static void init_PMU_ISA207(void)
|
||||
{
|
||||
mtspr(SPRN_MMCRS, 0);
|
||||
}
|
||||
|
||||
static void init_PMU_ISA31(void)
|
||||
{
|
||||
mtspr(SPRN_MMCR3, 0);
|
||||
mtspr(SPRN_MMCRA, MMCRA_BHRB_DISABLE);
|
||||
mtspr(SPRN_MMCR0, MMCR0_PMCCEXT);
|
||||
}
|
||||
|
||||
/*
|
||||
* Note that we can be called twice of pseudo-PVRs.
|
||||
* The parameter offset is not used.
|
||||
*/
|
||||
|
||||
void __setup_cpu_power7(unsigned long offset, struct cpu_spec *t)
|
||||
{
|
||||
if (!init_hvmode_206(t))
|
||||
return;
|
||||
|
||||
mtspr(SPRN_LPID, 0);
|
||||
mtspr(SPRN_PCR, PCR_MASK);
|
||||
init_LPCR_ISA206(mfspr(SPRN_LPCR), LPCR_LPES1 >> LPCR_LPES_SH);
|
||||
}
|
||||
|
||||
void __restore_cpu_power7(void)
|
||||
{
|
||||
u64 msr;
|
||||
|
||||
msr = mfmsr();
|
||||
if (!(msr & MSR_HV))
|
||||
return;
|
||||
|
||||
mtspr(SPRN_LPID, 0);
|
||||
mtspr(SPRN_PCR, PCR_MASK);
|
||||
init_LPCR_ISA206(mfspr(SPRN_LPCR), LPCR_LPES1 >> LPCR_LPES_SH);
|
||||
}
|
||||
|
||||
void __setup_cpu_power8(unsigned long offset, struct cpu_spec *t)
|
||||
{
|
||||
init_FSCR();
|
||||
init_PMU();
|
||||
init_PMU_ISA207();
|
||||
|
||||
if (!init_hvmode_206(t))
|
||||
return;
|
||||
|
||||
mtspr(SPRN_LPID, 0);
|
||||
mtspr(SPRN_PCR, PCR_MASK);
|
||||
init_LPCR_ISA206(mfspr(SPRN_LPCR) | LPCR_PECEDH, 0); /* LPES = 0 */
|
||||
init_HFSCR();
|
||||
init_PMU_HV();
|
||||
init_PMU_HV_ISA207();
|
||||
}
|
||||
|
||||
void __restore_cpu_power8(void)
|
||||
{
|
||||
u64 msr;
|
||||
|
||||
init_FSCR();
|
||||
init_PMU();
|
||||
init_PMU_ISA207();
|
||||
|
||||
msr = mfmsr();
|
||||
if (!(msr & MSR_HV))
|
||||
return;
|
||||
|
||||
mtspr(SPRN_LPID, 0);
|
||||
mtspr(SPRN_PCR, PCR_MASK);
|
||||
init_LPCR_ISA206(mfspr(SPRN_LPCR) | LPCR_PECEDH, 0); /* LPES = 0 */
|
||||
init_HFSCR();
|
||||
init_PMU_HV();
|
||||
init_PMU_HV_ISA207();
|
||||
}
|
||||
|
||||
void __setup_cpu_power9(unsigned long offset, struct cpu_spec *t)
|
||||
{
|
||||
init_FSCR_power9();
|
||||
init_PMU();
|
||||
|
||||
if (!init_hvmode_206(t))
|
||||
return;
|
||||
|
||||
mtspr(SPRN_PSSCR, 0);
|
||||
mtspr(SPRN_LPID, 0);
|
||||
mtspr(SPRN_PID, 0);
|
||||
mtspr(SPRN_PCR, PCR_MASK);
|
||||
init_LPCR_ISA300((mfspr(SPRN_LPCR) | LPCR_PECEDH | LPCR_PECE_HVEE |\
|
||||
LPCR_HVICE | LPCR_HEIC) & ~(LPCR_UPRT | LPCR_HR), 0);
|
||||
init_HFSCR();
|
||||
init_PMU_HV();
|
||||
}
|
||||
|
||||
void __restore_cpu_power9(void)
|
||||
{
|
||||
u64 msr;
|
||||
|
||||
init_FSCR_power9();
|
||||
init_PMU();
|
||||
|
||||
msr = mfmsr();
|
||||
if (!(msr & MSR_HV))
|
||||
return;
|
||||
|
||||
mtspr(SPRN_PSSCR, 0);
|
||||
mtspr(SPRN_LPID, 0);
|
||||
mtspr(SPRN_PID, 0);
|
||||
mtspr(SPRN_PCR, PCR_MASK);
|
||||
init_LPCR_ISA300((mfspr(SPRN_LPCR) | LPCR_PECEDH | LPCR_PECE_HVEE |\
|
||||
LPCR_HVICE | LPCR_HEIC) & ~(LPCR_UPRT | LPCR_HR), 0);
|
||||
init_HFSCR();
|
||||
init_PMU_HV();
|
||||
}
|
||||
|
||||
void __setup_cpu_power10(unsigned long offset, struct cpu_spec *t)
|
||||
{
|
||||
init_FSCR_power10();
|
||||
init_PMU();
|
||||
init_PMU_ISA31();
|
||||
|
||||
if (!init_hvmode_206(t))
|
||||
return;
|
||||
|
||||
mtspr(SPRN_PSSCR, 0);
|
||||
mtspr(SPRN_LPID, 0);
|
||||
mtspr(SPRN_PID, 0);
|
||||
mtspr(SPRN_PCR, PCR_MASK);
|
||||
init_LPCR_ISA300((mfspr(SPRN_LPCR) | LPCR_PECEDH | LPCR_PECE_HVEE |\
|
||||
LPCR_HVICE | LPCR_HEIC) & ~(LPCR_UPRT | LPCR_HR), 0);
|
||||
init_HFSCR();
|
||||
init_PMU_HV();
|
||||
}
|
||||
|
||||
void __restore_cpu_power10(void)
|
||||
{
|
||||
u64 msr;
|
||||
|
||||
init_FSCR_power10();
|
||||
init_PMU();
|
||||
init_PMU_ISA31();
|
||||
|
||||
msr = mfmsr();
|
||||
if (!(msr & MSR_HV))
|
||||
return;
|
||||
|
||||
mtspr(SPRN_PSSCR, 0);
|
||||
mtspr(SPRN_LPID, 0);
|
||||
mtspr(SPRN_PID, 0);
|
||||
mtspr(SPRN_PCR, PCR_MASK);
|
||||
init_LPCR_ISA300((mfspr(SPRN_LPCR) | LPCR_PECEDH | LPCR_PECE_HVEE |\
|
||||
LPCR_HVICE | LPCR_HEIC) & ~(LPCR_UPRT | LPCR_HR), 0);
|
||||
init_HFSCR();
|
||||
init_PMU_HV();
|
||||
}
|
@@ -60,19 +60,15 @@ extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
|
||||
extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
|
||||
#endif /* CONFIG_PPC32 */
|
||||
#ifdef CONFIG_PPC64
|
||||
#include <asm/cpu_setup_power.h>
|
||||
extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
|
||||
extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
|
||||
extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
|
||||
extern void __restore_cpu_pa6t(void);
|
||||
extern void __restore_cpu_ppc970(void);
|
||||
extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
|
||||
extern void __restore_cpu_power7(void);
|
||||
extern void __setup_cpu_power8(unsigned long offset, struct cpu_spec* spec);
|
||||
extern void __restore_cpu_power8(void);
|
||||
extern void __setup_cpu_power9(unsigned long offset, struct cpu_spec* spec);
|
||||
extern void __restore_cpu_power9(void);
|
||||
extern void __setup_cpu_power10(unsigned long offset, struct cpu_spec* spec);
|
||||
extern void __restore_cpu_power10(void);
|
||||
extern long __machine_check_early_realmode_p7(struct pt_regs *regs);
|
||||
extern long __machine_check_early_realmode_p8(struct pt_regs *regs);
|
||||
extern long __machine_check_early_realmode_p9(struct pt_regs *regs);
|
||||
#endif /* CONFIG_PPC64 */
|
||||
#if defined(CONFIG_E500)
|
||||
extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
|
||||
|
@@ -454,6 +454,7 @@ static void init_pmu_power10(void)
|
||||
|
||||
mtspr(SPRN_MMCR3, 0);
|
||||
mtspr(SPRN_MMCRA, MMCRA_BHRB_DISABLE);
|
||||
mtspr(SPRN_MMCR0, MMCR0_PMCCEXT);
|
||||
}
|
||||
|
||||
static int __init feat_enable_pmu_power10(struct dt_cpu_feature *f)
|
||||
|
@@ -1641,6 +1641,14 @@ int __init setup_fadump(void)
|
||||
else if (fw_dump.reserve_dump_area_size)
|
||||
fw_dump.ops->fadump_init_mem_struct(&fw_dump);
|
||||
|
||||
/*
|
||||
* In case of panic, fadump is triggered via ppc_panic_event()
|
||||
* panic notifier. Setting crash_kexec_post_notifiers to 'true'
|
||||
* lets panic() function take crash friendly path before panic
|
||||
* notifiers are invoked.
|
||||
*/
|
||||
crash_kexec_post_notifiers = true;
|
||||
|
||||
return 1;
|
||||
}
|
||||
subsys_initcall(setup_fadump);
|
||||
|
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/pgtable.h>
|
||||
#include <linux/sizes.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/mmu.h>
|
||||
@@ -626,7 +627,7 @@ start_here:
|
||||
b . /* prevent prefetch past rfi */
|
||||
|
||||
/* Set up the initial MMU state so we can do the first level of
|
||||
* kernel initialization. This maps the first 16 MBytes of memory 1:1
|
||||
* kernel initialization. This maps the first 32 MBytes of memory 1:1
|
||||
* virtual to physical and more importantly sets the cache mode.
|
||||
*/
|
||||
initial_mmu:
|
||||
@@ -663,6 +664,12 @@ initial_mmu:
|
||||
tlbwe r4,r0,TLB_DATA /* Load the data portion of the entry */
|
||||
tlbwe r3,r0,TLB_TAG /* Load the tag portion of the entry */
|
||||
|
||||
li r0,62 /* TLB slot 62 */
|
||||
addis r4,r4,SZ_16M@h
|
||||
addis r3,r3,SZ_16M@h
|
||||
tlbwe r4,r0,TLB_DATA /* Load the data portion of the entry */
|
||||
tlbwe r3,r0,TLB_TAG /* Load the tag portion of the entry */
|
||||
|
||||
isync
|
||||
|
||||
/* Establish the exception vector base
|
||||
|
@@ -2956,7 +2956,7 @@ static void __init fixup_device_tree_efika_add_phy(void)
|
||||
|
||||
/* Check if the phy-handle property exists - bail if it does */
|
||||
rv = prom_getprop(node, "phy-handle", prop, sizeof(prop));
|
||||
if (!rv)
|
||||
if (rv <= 0)
|
||||
return;
|
||||
|
||||
/*
|
||||
|
@@ -60,6 +60,7 @@
|
||||
#include <asm/cpu_has_feature.h>
|
||||
#include <asm/ftrace.h>
|
||||
#include <asm/kup.h>
|
||||
#include <asm/fadump.h>
|
||||
|
||||
#ifdef DEBUG
|
||||
#include <asm/udbg.h>
|
||||
@@ -594,6 +595,45 @@ void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *))
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NMI_IPI
|
||||
static void crash_stop_this_cpu(struct pt_regs *regs)
|
||||
#else
|
||||
static void crash_stop_this_cpu(void *dummy)
|
||||
#endif
|
||||
{
|
||||
/*
|
||||
* Just busy wait here and avoid marking CPU as offline to ensure
|
||||
* register data is captured appropriately.
|
||||
*/
|
||||
while (1)
|
||||
cpu_relax();
|
||||
}
|
||||
|
||||
void crash_smp_send_stop(void)
|
||||
{
|
||||
static bool stopped = false;
|
||||
|
||||
/*
|
||||
* In case of fadump, register data for all CPUs is captured by f/w
|
||||
* on ibm,os-term rtas call. Skip IPI callbacks to other CPUs before
|
||||
* this rtas call to avoid tricky post processing of those CPUs'
|
||||
* backtraces.
|
||||
*/
|
||||
if (should_fadump_crash())
|
||||
return;
|
||||
|
||||
if (stopped)
|
||||
return;
|
||||
|
||||
stopped = true;
|
||||
|
||||
#ifdef CONFIG_NMI_IPI
|
||||
smp_send_nmi_ipi(NMI_IPI_ALL_OTHERS, crash_stop_this_cpu, 1000000);
|
||||
#else
|
||||
smp_call_function(crash_stop_this_cpu, NULL, 0);
|
||||
#endif /* CONFIG_NMI_IPI */
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NMI_IPI
|
||||
static void nmi_stop_this_cpu(struct pt_regs *regs)
|
||||
{
|
||||
@@ -1488,10 +1528,12 @@ void start_secondary(void *unused)
|
||||
BUG();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PROFILING
|
||||
int setup_profiling_timer(unsigned int multiplier)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void fixup_topology(void)
|
||||
{
|
||||
|
@@ -1922,11 +1922,40 @@ void vsx_unavailable_tm(struct pt_regs *regs)
|
||||
}
|
||||
#endif /* CONFIG_PPC_TRANSACTIONAL_MEM */
|
||||
|
||||
void performance_monitor_exception(struct pt_regs *regs)
|
||||
static void performance_monitor_exception_nmi(struct pt_regs *regs)
|
||||
{
|
||||
nmi_enter();
|
||||
|
||||
__this_cpu_inc(irq_stat.pmu_irqs);
|
||||
|
||||
perf_irq(regs);
|
||||
|
||||
nmi_exit();
|
||||
}
|
||||
|
||||
static void performance_monitor_exception_async(struct pt_regs *regs)
|
||||
{
|
||||
irq_enter();
|
||||
|
||||
__this_cpu_inc(irq_stat.pmu_irqs);
|
||||
|
||||
perf_irq(regs);
|
||||
|
||||
irq_exit();
|
||||
}
|
||||
|
||||
void performance_monitor_exception(struct pt_regs *regs)
|
||||
{
|
||||
/*
|
||||
* On 64-bit, if perf interrupts hit in a local_irq_disable
|
||||
* (soft-masked) region, we consider them as NMIs. This is required to
|
||||
* prevent hash faults on user addresses when reading callchains (and
|
||||
* looks better from an irq tracing perspective).
|
||||
*/
|
||||
if (IS_ENABLED(CONFIG_PPC64) && unlikely(arch_irq_disabled_regs(regs)))
|
||||
performance_monitor_exception_nmi(regs);
|
||||
else
|
||||
performance_monitor_exception_async(regs);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
|
||||
|
@@ -132,6 +132,10 @@ static void set_cpumask_stuck(const struct cpumask *cpumask, u64 tb)
|
||||
{
|
||||
cpumask_or(&wd_smp_cpus_stuck, &wd_smp_cpus_stuck, cpumask);
|
||||
cpumask_andnot(&wd_smp_cpus_pending, &wd_smp_cpus_pending, cpumask);
|
||||
/*
|
||||
* See wd_smp_clear_cpu_pending()
|
||||
*/
|
||||
smp_mb();
|
||||
if (cpumask_empty(&wd_smp_cpus_pending)) {
|
||||
wd_smp_last_reset_tb = tb;
|
||||
cpumask_andnot(&wd_smp_cpus_pending,
|
||||
@@ -217,13 +221,44 @@ static void wd_smp_clear_cpu_pending(int cpu, u64 tb)
|
||||
|
||||
cpumask_clear_cpu(cpu, &wd_smp_cpus_stuck);
|
||||
wd_smp_unlock(&flags);
|
||||
} else {
|
||||
/*
|
||||
* The last CPU to clear pending should have reset the
|
||||
* watchdog so we generally should not find it empty
|
||||
* here if our CPU was clear. However it could happen
|
||||
* due to a rare race with another CPU taking the
|
||||
* last CPU out of the mask concurrently.
|
||||
*
|
||||
* We can't add a warning for it. But just in case
|
||||
* there is a problem with the watchdog that is causing
|
||||
* the mask to not be reset, try to kick it along here.
|
||||
*/
|
||||
if (unlikely(cpumask_empty(&wd_smp_cpus_pending)))
|
||||
goto none_pending;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
cpumask_clear_cpu(cpu, &wd_smp_cpus_pending);
|
||||
|
||||
/*
|
||||
* Order the store to clear pending with the load(s) to check all
|
||||
* words in the pending mask to check they are all empty. This orders
|
||||
* with the same barrier on another CPU. This prevents two CPUs
|
||||
* clearing the last 2 pending bits, but neither seeing the other's
|
||||
* store when checking if the mask is empty, and missing an empty
|
||||
* mask, which ends with a false positive.
|
||||
*/
|
||||
smp_mb();
|
||||
if (cpumask_empty(&wd_smp_cpus_pending)) {
|
||||
unsigned long flags;
|
||||
|
||||
none_pending:
|
||||
/*
|
||||
* Double check under lock because more than one CPU could see
|
||||
* a clear mask with the lockless check after clearing their
|
||||
* pending bits.
|
||||
*/
|
||||
wd_smp_lock(&flags);
|
||||
if (cpumask_empty(&wd_smp_cpus_pending)) {
|
||||
wd_smp_last_reset_tb = tb;
|
||||
@@ -314,8 +349,12 @@ void arch_touch_nmi_watchdog(void)
|
||||
{
|
||||
unsigned long ticks = tb_ticks_per_usec * wd_timer_period_ms * 1000;
|
||||
int cpu = smp_processor_id();
|
||||
u64 tb = get_tb();
|
||||
u64 tb;
|
||||
|
||||
if (!cpumask_test_cpu(cpu, &watchdog_cpumask))
|
||||
return;
|
||||
|
||||
tb = get_tb();
|
||||
if (tb - per_cpu(wd_timer_tb, cpu) >= ticks) {
|
||||
per_cpu(wd_timer_tb, cpu) = tb;
|
||||
wd_smp_clear_cpu_pending(cpu, tb);
|
||||
|
@@ -4557,8 +4557,12 @@ static int kvmppc_core_prepare_memory_region_hv(struct kvm *kvm,
|
||||
unsigned long npages = mem->memory_size >> PAGE_SHIFT;
|
||||
|
||||
if (change == KVM_MR_CREATE) {
|
||||
slot->arch.rmap = vzalloc(array_size(npages,
|
||||
sizeof(*slot->arch.rmap)));
|
||||
unsigned long size = array_size(npages, sizeof(*slot->arch.rmap));
|
||||
|
||||
if ((size >> PAGE_SHIFT) > totalram_pages())
|
||||
return -ENOMEM;
|
||||
|
||||
slot->arch.rmap = vzalloc(size);
|
||||
if (!slot->arch.rmap)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
@@ -510,7 +510,7 @@ long kvmhv_copy_tofrom_guest_nested(struct kvm_vcpu *vcpu)
|
||||
if (eaddr & (0xFFFUL << 52))
|
||||
return H_PARAMETER;
|
||||
|
||||
buf = kzalloc(n, GFP_KERNEL);
|
||||
buf = kzalloc(n, GFP_KERNEL | __GFP_NOWARN);
|
||||
if (!buf)
|
||||
return H_NO_MEM;
|
||||
|
||||
|
@@ -1152,7 +1152,7 @@ int pud_set_huge(pud_t *pud, phys_addr_t addr, pgprot_t prot)
|
||||
|
||||
int pud_clear_huge(pud_t *pud)
|
||||
{
|
||||
if (pud_huge(*pud)) {
|
||||
if (pud_is_leaf(*pud)) {
|
||||
pud_clear(pud);
|
||||
return 1;
|
||||
}
|
||||
@@ -1199,7 +1199,7 @@ int pmd_set_huge(pmd_t *pmd, phys_addr_t addr, pgprot_t prot)
|
||||
|
||||
int pmd_clear_huge(pmd_t *pmd)
|
||||
{
|
||||
if (pmd_huge(*pmd)) {
|
||||
if (pmd_is_leaf(*pmd)) {
|
||||
pmd_clear(pmd);
|
||||
return 1;
|
||||
}
|
||||
|
@@ -19,7 +19,8 @@ int __init kasan_init_region(void *start, size_t size)
|
||||
block = memblock_alloc(k_size, k_size_base);
|
||||
|
||||
if (block && k_size_base >= SZ_128K && k_start == ALIGN(k_start, k_size_base)) {
|
||||
int k_size_more = 1 << (ffs(k_size - k_size_base) - 1);
|
||||
int shift = ffs(k_size - k_size_base);
|
||||
int k_size_more = shift ? 1 << (shift - 1) : 0;
|
||||
|
||||
setbat(-1, k_start, __pa(block), k_size_base, PAGE_KERNEL);
|
||||
if (k_size_more >= SZ_128K)
|
||||
|
@@ -102,6 +102,7 @@ EXPORT_SYMBOL(__pte_frag_size_shift);
|
||||
struct page *p4d_page(p4d_t p4d)
|
||||
{
|
||||
if (p4d_is_leaf(p4d)) {
|
||||
if (!IS_ENABLED(CONFIG_HAVE_ARCH_HUGE_VMAP))
|
||||
VM_WARN_ON(!p4d_huge(p4d));
|
||||
return pte_page(p4d_pte(p4d));
|
||||
}
|
||||
@@ -112,6 +113,7 @@ struct page *p4d_page(p4d_t p4d)
|
||||
struct page *pud_page(pud_t pud)
|
||||
{
|
||||
if (pud_is_leaf(pud)) {
|
||||
if (!IS_ENABLED(CONFIG_HAVE_ARCH_HUGE_VMAP))
|
||||
VM_WARN_ON(!pud_huge(pud));
|
||||
return pte_page(pud_pte(pud));
|
||||
}
|
||||
@@ -125,6 +127,12 @@ struct page *pud_page(pud_t pud)
|
||||
struct page *pmd_page(pmd_t pmd)
|
||||
{
|
||||
if (pmd_is_leaf(pmd)) {
|
||||
/*
|
||||
* vmalloc_to_page may be called on any vmap address (not only
|
||||
* vmalloc), and it uses pmd_page() etc., when huge vmap is
|
||||
* enabled so these checks can't be used.
|
||||
*/
|
||||
if (!IS_ENABLED(CONFIG_HAVE_ARCH_HUGE_VMAP))
|
||||
VM_WARN_ON(!(pmd_large(pmd) || pmd_huge(pmd)));
|
||||
return pte_page(pmd_pte(pmd));
|
||||
}
|
||||
|
@@ -95,6 +95,7 @@ static unsigned int freeze_events_kernel = MMCR0_FCS;
|
||||
#define SPRN_SIER3 0
|
||||
#define MMCRA_SAMPLE_ENABLE 0
|
||||
#define MMCRA_BHRB_DISABLE 0
|
||||
#define MMCR0_PMCCEXT 0
|
||||
|
||||
static inline unsigned long perf_ip_adjust(struct pt_regs *regs)
|
||||
{
|
||||
@@ -109,10 +110,6 @@ static inline void perf_read_regs(struct pt_regs *regs)
|
||||
{
|
||||
regs->result = 0;
|
||||
}
|
||||
static inline int perf_intr_is_nmi(struct pt_regs *regs)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int siar_valid(struct pt_regs *regs)
|
||||
{
|
||||
@@ -331,15 +328,6 @@ static inline void perf_read_regs(struct pt_regs *regs)
|
||||
regs->result = use_siar;
|
||||
}
|
||||
|
||||
/*
|
||||
* If interrupts were soft-disabled when a PMU interrupt occurs, treat
|
||||
* it as an NMI.
|
||||
*/
|
||||
static inline int perf_intr_is_nmi(struct pt_regs *regs)
|
||||
{
|
||||
return (regs->softe & IRQS_DISABLED);
|
||||
}
|
||||
|
||||
/*
|
||||
* On processors like P7+ that have the SIAR-Valid bit, marked instructions
|
||||
* must be sampled only if the SIAR-valid bit is set.
|
||||
@@ -817,6 +805,19 @@ static void write_pmc(int idx, unsigned long val)
|
||||
}
|
||||
}
|
||||
|
||||
static int any_pmc_overflown(struct cpu_hw_events *cpuhw)
|
||||
{
|
||||
int i, idx;
|
||||
|
||||
for (i = 0; i < cpuhw->n_events; i++) {
|
||||
idx = cpuhw->event[i]->hw.idx;
|
||||
if ((idx) && ((int)read_pmc(idx) < 0))
|
||||
return idx;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Called from sysrq_handle_showregs() */
|
||||
void perf_event_print_debug(void)
|
||||
{
|
||||
@@ -1240,11 +1241,16 @@ static void power_pmu_disable(struct pmu *pmu)
|
||||
|
||||
/*
|
||||
* Set the 'freeze counters' bit, clear EBE/BHRBA/PMCC/PMAO/FC56
|
||||
* Also clear PMXE to disable PMI's getting triggered in some
|
||||
* corner cases during PMU disable.
|
||||
*/
|
||||
val = mmcr0 = mfspr(SPRN_MMCR0);
|
||||
val |= MMCR0_FC;
|
||||
val &= ~(MMCR0_EBE | MMCR0_BHRBA | MMCR0_PMCC | MMCR0_PMAO |
|
||||
MMCR0_FC56);
|
||||
MMCR0_PMXE | MMCR0_FC56);
|
||||
/* Set mmcr0 PMCCEXT for p10 */
|
||||
if (ppmu->flags & PPMU_ARCH_31)
|
||||
val |= MMCR0_PMCCEXT;
|
||||
|
||||
/*
|
||||
* The barrier is to make sure the mtspr has been
|
||||
@@ -1255,6 +1261,23 @@ static void power_pmu_disable(struct pmu *pmu)
|
||||
mb();
|
||||
isync();
|
||||
|
||||
/*
|
||||
* Some corner cases could clear the PMU counter overflow
|
||||
* while a masked PMI is pending. One such case is when
|
||||
* a PMI happens during interrupt replay and perf counter
|
||||
* values are cleared by PMU callbacks before replay.
|
||||
*
|
||||
* If any PMC corresponding to the active PMU events are
|
||||
* overflown, disable the interrupt by clearing the paca
|
||||
* bit for PMI since we are disabling the PMU now.
|
||||
* Otherwise provide a warning if there is PMI pending, but
|
||||
* no counter is found overflown.
|
||||
*/
|
||||
if (any_pmc_overflown(cpuhw))
|
||||
clear_pmi_irq_pending();
|
||||
else
|
||||
WARN_ON(pmi_irq_pending());
|
||||
|
||||
val = mmcra = cpuhw->mmcr.mmcra;
|
||||
|
||||
/*
|
||||
@@ -1346,6 +1369,15 @@ static void power_pmu_enable(struct pmu *pmu)
|
||||
* (possibly updated for removal of events).
|
||||
*/
|
||||
if (!cpuhw->n_added) {
|
||||
/*
|
||||
* If there is any active event with an overflown PMC
|
||||
* value, set back PACA_IRQ_PMI which would have been
|
||||
* cleared in power_pmu_disable().
|
||||
*/
|
||||
hard_irq_disable();
|
||||
if (any_pmc_overflown(cpuhw))
|
||||
set_pmi_irq_pending();
|
||||
|
||||
mtspr(SPRN_MMCRA, cpuhw->mmcr.mmcra & ~MMCRA_SAMPLE_ENABLE);
|
||||
mtspr(SPRN_MMCR1, cpuhw->mmcr.mmcr1);
|
||||
if (ppmu->flags & PPMU_ARCH_31)
|
||||
@@ -2250,7 +2282,6 @@ static void __perf_event_interrupt(struct pt_regs *regs)
|
||||
struct perf_event *event;
|
||||
unsigned long val[8];
|
||||
int found, active;
|
||||
int nmi;
|
||||
|
||||
if (cpuhw->n_limited)
|
||||
freeze_limited_counters(cpuhw, mfspr(SPRN_PMC5),
|
||||
@@ -2258,18 +2289,6 @@ static void __perf_event_interrupt(struct pt_regs *regs)
|
||||
|
||||
perf_read_regs(regs);
|
||||
|
||||
/*
|
||||
* If perf interrupts hit in a local_irq_disable (soft-masked) region,
|
||||
* we consider them as NMIs. This is required to prevent hash faults on
|
||||
* user addresses when reading callchains. See the NMI test in
|
||||
* do_hash_page.
|
||||
*/
|
||||
nmi = perf_intr_is_nmi(regs);
|
||||
if (nmi)
|
||||
nmi_enter();
|
||||
else
|
||||
irq_enter();
|
||||
|
||||
/* Read all the PMCs since we'll need them a bunch of times */
|
||||
for (i = 0; i < ppmu->n_counter; ++i)
|
||||
val[i] = read_pmc(i + 1);
|
||||
@@ -2296,6 +2315,14 @@ static void __perf_event_interrupt(struct pt_regs *regs)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Clear PACA_IRQ_PMI in case it was set by
|
||||
* set_pmi_irq_pending() when PMU was enabled
|
||||
* after accounting for interrupts.
|
||||
*/
|
||||
clear_pmi_irq_pending();
|
||||
|
||||
if (!active)
|
||||
/* reset non active counters that have overflowed */
|
||||
write_pmc(i + 1, 0);
|
||||
@@ -2315,8 +2342,15 @@ static void __perf_event_interrupt(struct pt_regs *regs)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!found && !nmi && printk_ratelimit())
|
||||
printk(KERN_WARNING "Can't find PMC that caused IRQ\n");
|
||||
|
||||
/*
|
||||
* During system wide profling or while specific CPU is monitored for an
|
||||
* event, some corner cases could cause PMC to overflow in idle path. This
|
||||
* will trigger a PMI after waking up from idle. Since counter values are _not_
|
||||
* saved/restored in idle path, can lead to below "Can't find PMC" message.
|
||||
*/
|
||||
if (unlikely(!found) && !arch_irq_disabled_regs(regs))
|
||||
printk_ratelimited(KERN_WARNING "Can't find PMC that caused IRQ\n");
|
||||
|
||||
/*
|
||||
* Reset MMCR0 to its normal value. This will set PMXE and
|
||||
@@ -2326,11 +2360,6 @@ static void __perf_event_interrupt(struct pt_regs *regs)
|
||||
* we get back out of this interrupt.
|
||||
*/
|
||||
write_mmcr0(cpuhw, cpuhw->mmcr.mmcr0);
|
||||
|
||||
if (nmi)
|
||||
nmi_exit();
|
||||
else
|
||||
irq_exit();
|
||||
}
|
||||
|
||||
static void perf_event_interrupt(struct pt_regs *regs)
|
||||
|
@@ -31,19 +31,6 @@ static atomic_t num_events;
|
||||
/* Used to avoid races in calling reserve/release_pmc_hardware */
|
||||
static DEFINE_MUTEX(pmc_reserve_mutex);
|
||||
|
||||
/*
|
||||
* If interrupts were soft-disabled when a PMU interrupt occurs, treat
|
||||
* it as an NMI.
|
||||
*/
|
||||
static inline int perf_intr_is_nmi(struct pt_regs *regs)
|
||||
{
|
||||
#ifdef __powerpc64__
|
||||
return (regs->softe & IRQS_DISABLED);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void perf_event_interrupt(struct pt_regs *regs);
|
||||
|
||||
/*
|
||||
@@ -659,13 +646,6 @@ static void perf_event_interrupt(struct pt_regs *regs)
|
||||
struct perf_event *event;
|
||||
unsigned long val;
|
||||
int found = 0;
|
||||
int nmi;
|
||||
|
||||
nmi = perf_intr_is_nmi(regs);
|
||||
if (nmi)
|
||||
nmi_enter();
|
||||
else
|
||||
irq_enter();
|
||||
|
||||
for (i = 0; i < ppmu->n_counter; ++i) {
|
||||
event = cpuhw->event[i];
|
||||
@@ -690,11 +670,6 @@ static void perf_event_interrupt(struct pt_regs *regs)
|
||||
mtmsr(mfmsr() | MSR_PMM);
|
||||
mtpmr(PMRN_PMGC0, PMGC0_PMIE | PMGC0_FCECE);
|
||||
isync();
|
||||
|
||||
if (nmi)
|
||||
nmi_exit();
|
||||
else
|
||||
irq_exit();
|
||||
}
|
||||
|
||||
void hw_perf_event_setup(int cpu)
|
||||
|
@@ -561,6 +561,14 @@ int isa207_compute_mmcr(u64 event[], int n_ev,
|
||||
if (!(pmc_inuse & 0x60))
|
||||
mmcr->mmcr0 |= MMCR0_FC56;
|
||||
|
||||
/*
|
||||
* Set mmcr0 (PMCCEXT) for p10 which
|
||||
* will restrict access to group B registers
|
||||
* when MMCR0 PMCC=0b00.
|
||||
*/
|
||||
if (cpu_has_feature(CPU_FTR_ARCH_31))
|
||||
mmcr->mmcr0 |= MMCR0_PMCCEXT;
|
||||
|
||||
mmcr->mmcr1 = mmcr1;
|
||||
mmcr->mmcra = mmcra;
|
||||
mmcr->mmcr2 = mmcr2;
|
||||
|
@@ -976,6 +976,7 @@ static int __init cell_iommu_fixed_mapping_init(void)
|
||||
if (hbase < dbase || (hend > (dbase + dsize))) {
|
||||
pr_debug("iommu: hash window doesn't fit in"
|
||||
"real DMA window\n");
|
||||
of_node_put(np);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@@ -77,6 +77,7 @@ static int cbe_system_reset_exception(struct pt_regs *regs)
|
||||
switch (regs->msr & SRR1_WAKEMASK) {
|
||||
case SRR1_WAKEDEC:
|
||||
set_dec(1);
|
||||
break;
|
||||
case SRR1_WAKEEE:
|
||||
/*
|
||||
* Handle these when interrupts get re-enabled and we take
|
||||
|
@@ -215,6 +215,7 @@ void hlwd_pic_probe(void)
|
||||
irq_set_chained_handler(cascade_virq,
|
||||
hlwd_pic_irq_cascade);
|
||||
hlwd_irq_host = host;
|
||||
of_node_put(np);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -582,6 +582,7 @@ static void __init kw_i2c_add(struct pmac_i2c_host_kw *host,
|
||||
bus->close = kw_i2c_close;
|
||||
bus->xfer = kw_i2c_xfer;
|
||||
mutex_init(&bus->mutex);
|
||||
lockdep_register_key(&bus->lock_key);
|
||||
lockdep_set_class(&bus->mutex, &bus->lock_key);
|
||||
if (controller == busnode)
|
||||
bus->flags = pmac_i2c_multibus;
|
||||
@@ -810,6 +811,7 @@ static void __init pmu_i2c_probe(void)
|
||||
bus->hostdata = bus + 1;
|
||||
bus->xfer = pmu_i2c_xfer;
|
||||
mutex_init(&bus->mutex);
|
||||
lockdep_register_key(&bus->lock_key);
|
||||
lockdep_set_class(&bus->mutex, &bus->lock_key);
|
||||
bus->flags = pmac_i2c_multibus;
|
||||
list_add(&bus->link, &pmac_i2c_busses);
|
||||
@@ -933,6 +935,7 @@ static void __init smu_i2c_probe(void)
|
||||
bus->hostdata = bus + 1;
|
||||
bus->xfer = smu_i2c_xfer;
|
||||
mutex_init(&bus->mutex);
|
||||
lockdep_register_key(&bus->lock_key);
|
||||
lockdep_set_class(&bus->mutex, &bus->lock_key);
|
||||
bus->flags = 0;
|
||||
list_add(&bus->link, &pmac_i2c_busses);
|
||||
|
@@ -396,6 +396,7 @@ void __init opal_lpc_init(void)
|
||||
if (!of_get_property(np, "primary", NULL))
|
||||
continue;
|
||||
opal_lpc_chip_id = of_get_ibm_chip_id(np);
|
||||
of_node_put(np);
|
||||
break;
|
||||
}
|
||||
if (opal_lpc_chip_id < 0)
|
||||
|
@@ -658,6 +658,9 @@ static int xive_spapr_debug_show(struct seq_file *m, void *private)
|
||||
struct xive_irq_bitmap *xibm;
|
||||
char *buf = kmalloc(PAGE_SIZE, GFP_KERNEL);
|
||||
|
||||
if (!buf)
|
||||
return -ENOMEM;
|
||||
|
||||
list_for_each_entry(xibm, &xive_irq_bitmaps, list) {
|
||||
memset(buf, 0, PAGE_SIZE);
|
||||
bitmap_print_to_pagebuf(true, buf, xibm->bitmap, xibm->count);
|
||||
|
@@ -253,13 +253,15 @@ void page_table_free(struct mm_struct *mm, unsigned long *table)
|
||||
/* Free 2K page table fragment of a 4K page */
|
||||
bit = (__pa(table) & ~PAGE_MASK)/(PTRS_PER_PTE*sizeof(pte_t));
|
||||
spin_lock_bh(&mm->context.lock);
|
||||
mask = atomic_xor_bits(&page->_refcount, 1U << (bit + 24));
|
||||
mask = atomic_xor_bits(&page->_refcount, 0x11U << (bit + 24));
|
||||
mask >>= 24;
|
||||
if (mask & 3)
|
||||
list_add(&page->lru, &mm->context.pgtable_list);
|
||||
else
|
||||
list_del(&page->lru);
|
||||
spin_unlock_bh(&mm->context.lock);
|
||||
mask = atomic_xor_bits(&page->_refcount, 0x10U << (bit + 24));
|
||||
mask >>= 24;
|
||||
if (mask != 0)
|
||||
return;
|
||||
} else {
|
||||
|
@@ -1076,6 +1076,8 @@ static void virtio_uml_release_dev(struct device *d)
|
||||
container_of(d, struct virtio_device, dev);
|
||||
struct virtio_uml_device *vu_dev = to_virtio_uml_device(vdev);
|
||||
|
||||
time_travel_propagate_time();
|
||||
|
||||
/* might not have been opened due to not negotiating the feature */
|
||||
if (vu_dev->req_fd >= 0) {
|
||||
um_free_irq(VIRTIO_IRQ, vu_dev);
|
||||
@@ -1109,6 +1111,8 @@ static int virtio_uml_probe(struct platform_device *pdev)
|
||||
vu_dev->pdev = pdev;
|
||||
vu_dev->req_fd = -1;
|
||||
|
||||
time_travel_propagate_time();
|
||||
|
||||
do {
|
||||
rc = os_connect_socket(pdata->socket_path);
|
||||
} while (rc == -EINTR);
|
||||
|
@@ -14,7 +14,7 @@ static inline void um_ndelay(unsigned long nsecs)
|
||||
ndelay(nsecs);
|
||||
}
|
||||
#undef ndelay
|
||||
#define ndelay um_ndelay
|
||||
#define ndelay(n) um_ndelay(n)
|
||||
|
||||
static inline void um_udelay(unsigned long usecs)
|
||||
{
|
||||
@@ -26,5 +26,5 @@ static inline void um_udelay(unsigned long usecs)
|
||||
udelay(usecs);
|
||||
}
|
||||
#undef udelay
|
||||
#define udelay um_udelay
|
||||
#define udelay(n) um_udelay(n)
|
||||
#endif /* __UM_DELAY_H */
|
||||
|
@@ -16,8 +16,8 @@ extern int restore_fp_registers(int pid, unsigned long *fp_regs);
|
||||
extern int save_fpx_registers(int pid, unsigned long *fp_regs);
|
||||
extern int restore_fpx_registers(int pid, unsigned long *fp_regs);
|
||||
extern int save_registers(int pid, struct uml_pt_regs *regs);
|
||||
extern int restore_registers(int pid, struct uml_pt_regs *regs);
|
||||
extern int init_registers(int pid);
|
||||
extern int restore_pid_registers(int pid, struct uml_pt_regs *regs);
|
||||
extern int init_pid_registers(int pid);
|
||||
extern void get_safe_registers(unsigned long *regs, unsigned long *fp_regs);
|
||||
extern unsigned long get_thread_reg(int reg, jmp_buf *buf);
|
||||
extern int get_fp_registers(int pid, unsigned long *regs);
|
||||
|
@@ -21,7 +21,7 @@ int save_registers(int pid, struct uml_pt_regs *regs)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int restore_registers(int pid, struct uml_pt_regs *regs)
|
||||
int restore_pid_registers(int pid, struct uml_pt_regs *regs)
|
||||
{
|
||||
int err;
|
||||
|
||||
@@ -36,7 +36,7 @@ int restore_registers(int pid, struct uml_pt_regs *regs)
|
||||
static unsigned long exec_regs[MAX_REG_NR];
|
||||
static unsigned long exec_fp_regs[FP_SIZE];
|
||||
|
||||
int init_registers(int pid)
|
||||
int init_pid_registers(int pid)
|
||||
{
|
||||
int err;
|
||||
|
||||
|
@@ -336,7 +336,7 @@ void __init os_early_checks(void)
|
||||
check_tmpexec();
|
||||
|
||||
pid = start_ptraced_child();
|
||||
if (init_registers(pid))
|
||||
if (init_pid_registers(pid))
|
||||
fatal("Failed to initialize default registers");
|
||||
stop_ptraced_child(pid, 1, 1);
|
||||
}
|
||||
|
@@ -28,7 +28,11 @@ KCOV_INSTRUMENT := n
|
||||
targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \
|
||||
vmlinux.bin.xz vmlinux.bin.lzo vmlinux.bin.lz4 vmlinux.bin.zst
|
||||
|
||||
KBUILD_CFLAGS := -m$(BITS) -O2
|
||||
# CLANG_FLAGS must come before any cc-disable-warning or cc-option calls in
|
||||
# case of cross compiling, as it has the '--target=' flag, which is needed to
|
||||
# avoid errors with '-march=i386', and future flags may depend on the target to
|
||||
# be valid.
|
||||
KBUILD_CFLAGS := -m$(BITS) -O2 $(CLANG_FLAGS)
|
||||
KBUILD_CFLAGS += -fno-strict-aliasing -fPIE
|
||||
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
|
||||
cflags-$(CONFIG_X86_32) := -march=i386
|
||||
@@ -46,7 +50,6 @@ KBUILD_CFLAGS += -D__DISABLE_EXPORTS
|
||||
# Disable relocation relaxation in case the link is not PIE.
|
||||
KBUILD_CFLAGS += $(call as-option,-Wa$(comma)-mrelax-relocations=no)
|
||||
KBUILD_CFLAGS += -include $(srctree)/include/linux/hidden.h
|
||||
KBUILD_CFLAGS += $(CLANG_FLAGS)
|
||||
|
||||
# sev-es.c indirectly inludes inat-table.h which is generated during
|
||||
# compilation and stored in $(objtree). Add the directory to the includes so
|
||||
|
@@ -264,3 +264,4 @@ CONFIG_BLK_DEV_IO_TRACE=y
|
||||
CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
|
||||
CONFIG_EARLY_PRINTK_DBGP=y
|
||||
CONFIG_DEBUG_BOOT_PARAMS=y
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
|
@@ -260,3 +260,4 @@ CONFIG_BLK_DEV_IO_TRACE=y
|
||||
CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
|
||||
CONFIG_EARLY_PRINTK_DBGP=y
|
||||
CONFIG_DEBUG_BOOT_PARAMS=y
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
|
@@ -89,6 +89,7 @@ static inline void set_real_mode_mem(phys_addr_t mem)
|
||||
}
|
||||
|
||||
void reserve_real_mode(void);
|
||||
void load_trampoline_pgtable(void);
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
|
@@ -314,11 +314,12 @@ do { \
|
||||
do { \
|
||||
__chk_user_ptr(ptr); \
|
||||
switch (size) { \
|
||||
case 1: { \
|
||||
unsigned char x_u8__; \
|
||||
case 1: \
|
||||
__get_user_asm(x_u8__, ptr, "b", "=q", label); \
|
||||
(x) = x_u8__; \
|
||||
break; \
|
||||
} \
|
||||
case 2: \
|
||||
__get_user_asm(x, ptr, "w", "=r", label); \
|
||||
break; \
|
||||
|
@@ -295,11 +295,17 @@ static void wait_for_panic(void)
|
||||
panic("Panicing machine check CPU died");
|
||||
}
|
||||
|
||||
static void mce_panic(const char *msg, struct mce *final, char *exp)
|
||||
static noinstr void mce_panic(const char *msg, struct mce *final, char *exp)
|
||||
{
|
||||
int apei_err = 0;
|
||||
struct llist_node *pending;
|
||||
struct mce_evt_llist *l;
|
||||
int apei_err = 0;
|
||||
|
||||
/*
|
||||
* Allow instrumentation around external facilities usage. Not that it
|
||||
* matters a whole lot since the machine is going to panic anyway.
|
||||
*/
|
||||
instrumentation_begin();
|
||||
|
||||
if (!fake_panic) {
|
||||
/*
|
||||
@@ -314,7 +320,7 @@ static void mce_panic(const char *msg, struct mce *final, char *exp)
|
||||
} else {
|
||||
/* Don't log too much for fake panic */
|
||||
if (atomic_inc_return(&mce_fake_panicked) > 1)
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
pending = mce_gen_pool_prepare_records();
|
||||
/* First print corrected ones that are still unlogged */
|
||||
@@ -352,6 +358,9 @@ static void mce_panic(const char *msg, struct mce *final, char *exp)
|
||||
panic(msg);
|
||||
} else
|
||||
pr_emerg(HW_ERR "Fake kernel panic: %s\n", msg);
|
||||
|
||||
out:
|
||||
instrumentation_end();
|
||||
}
|
||||
|
||||
/* Support code for software error injection */
|
||||
@@ -682,7 +691,7 @@ static struct notifier_block mce_default_nb = {
|
||||
/*
|
||||
* Read ADDR and MISC registers.
|
||||
*/
|
||||
static void mce_read_aux(struct mce *m, int i)
|
||||
static noinstr void mce_read_aux(struct mce *m, int i)
|
||||
{
|
||||
if (m->status & MCI_STATUS_MISCV)
|
||||
m->misc = mce_rdmsrl(msr_ops.misc(i));
|
||||
@@ -1061,10 +1070,13 @@ static int mce_start(int *no_way_out)
|
||||
* Synchronize between CPUs after main scanning loop.
|
||||
* This invokes the bulk of the Monarch processing.
|
||||
*/
|
||||
static int mce_end(int order)
|
||||
static noinstr int mce_end(int order)
|
||||
{
|
||||
int ret = -1;
|
||||
u64 timeout = (u64)mca_cfg.monarch_timeout * NSEC_PER_USEC;
|
||||
int ret = -1;
|
||||
|
||||
/* Allow instrumentation around external facilities. */
|
||||
instrumentation_begin();
|
||||
|
||||
if (!timeout)
|
||||
goto reset;
|
||||
@@ -1108,7 +1120,8 @@ static int mce_end(int order)
|
||||
/*
|
||||
* Don't reset anything. That's done by the Monarch.
|
||||
*/
|
||||
return 0;
|
||||
ret = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1123,6 +1136,10 @@ reset:
|
||||
* Let others run again.
|
||||
*/
|
||||
atomic_set(&mce_executing, 0);
|
||||
|
||||
out:
|
||||
instrumentation_end();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1443,6 +1460,14 @@ noinstr void do_machine_check(struct pt_regs *regs)
|
||||
if (worst != MCE_AR_SEVERITY && !kill_it)
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* Enable instrumentation around the external facilities like
|
||||
* task_work_add() (via queue_task_work()), fixup_exception() etc.
|
||||
* For now, that is. Fixing this properly would need a lot more involved
|
||||
* reorganization.
|
||||
*/
|
||||
instrumentation_begin();
|
||||
|
||||
/* Fault was in user mode and we need to take some action */
|
||||
if ((m.cs & 3) == 3) {
|
||||
/* If this triggers there is no way to recover. Die hard. */
|
||||
@@ -1468,6 +1493,9 @@ noinstr void do_machine_check(struct pt_regs *regs)
|
||||
if (m.kflags & MCE_IN_KERNEL_COPYIN)
|
||||
queue_task_work(&m, msg, kill_it);
|
||||
}
|
||||
|
||||
instrumentation_end();
|
||||
|
||||
out:
|
||||
mce_wrmsrl(MSR_IA32_MCG_STATUS, 0);
|
||||
}
|
||||
|
@@ -347,7 +347,7 @@ static ssize_t flags_write(struct file *filp, const char __user *ubuf,
|
||||
char buf[MAX_FLAG_OPT_SIZE], *__buf;
|
||||
int err;
|
||||
|
||||
if (cnt > MAX_FLAG_OPT_SIZE)
|
||||
if (!cnt || cnt > MAX_FLAG_OPT_SIZE)
|
||||
return -EINVAL;
|
||||
|
||||
if (copy_from_user(&buf, ubuf, cnt))
|
||||
|
@@ -515,6 +515,7 @@ static const struct intel_early_ops gen11_early_ops __initconst = {
|
||||
.stolen_size = gen9_stolen_size,
|
||||
};
|
||||
|
||||
/* Intel integrated GPUs for which we need to reserve "stolen memory" */
|
||||
static const struct pci_device_id intel_early_ids[] __initconst = {
|
||||
INTEL_I830_IDS(&i830_early_ops),
|
||||
INTEL_I845G_IDS(&i845_early_ops),
|
||||
@@ -588,6 +589,13 @@ static void __init intel_graphics_quirks(int num, int slot, int func)
|
||||
u16 device;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Reserve "stolen memory" for an integrated GPU. If we've already
|
||||
* found one, there's nothing to do for other (discrete) GPUs.
|
||||
*/
|
||||
if (resource_size(&intel_graphics_stolen_res))
|
||||
return;
|
||||
|
||||
device = read_pci_config_16(num, slot, func, PCI_DEVICE_ID);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(intel_early_ids); i++) {
|
||||
@@ -700,7 +708,7 @@ static struct chipset early_qrk[] __initdata = {
|
||||
{ PCI_VENDOR_ID_INTEL, 0x3406, PCI_CLASS_BRIDGE_HOST,
|
||||
PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
|
||||
{ PCI_VENDOR_ID_INTEL, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA, PCI_ANY_ID,
|
||||
QFLAG_APPLY_ONCE, intel_graphics_quirks },
|
||||
0, intel_graphics_quirks },
|
||||
/*
|
||||
* HPET on the current version of the Baytrail platform has accuracy
|
||||
* problems: it will halt in deep idle state - so we disable it.
|
||||
|
@@ -113,17 +113,9 @@ void __noreturn machine_real_restart(unsigned int type)
|
||||
spin_unlock(&rtc_lock);
|
||||
|
||||
/*
|
||||
* Switch back to the initial page table.
|
||||
* Switch to the trampoline page table.
|
||||
*/
|
||||
#ifdef CONFIG_X86_32
|
||||
load_cr3(initial_page_table);
|
||||
#else
|
||||
write_cr3(real_mode_header->trampoline_pgd);
|
||||
|
||||
/* Exiting long mode will fail if CR4.PCIDE is set. */
|
||||
if (boot_cpu_has(X86_FEATURE_PCID))
|
||||
cr4_clear_bits(X86_CR4_PCIDE);
|
||||
#endif
|
||||
load_trampoline_pgtable();
|
||||
|
||||
/* Jump to the identity-mapped low memory code */
|
||||
#ifdef CONFIG_X86_32
|
||||
|
@@ -1127,6 +1127,7 @@ static int tsc_cs_enable(struct clocksource *cs)
|
||||
static struct clocksource clocksource_tsc_early = {
|
||||
.name = "tsc-early",
|
||||
.rating = 299,
|
||||
.uncertainty_margin = 32 * NSEC_PER_MSEC,
|
||||
.read = read_tsc,
|
||||
.mask = CLOCKSOURCE_MASK(64),
|
||||
.flags = CLOCK_SOURCE_IS_CONTINUOUS |
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* can find which vCPU should be waken up.
|
||||
*/
|
||||
static DEFINE_PER_CPU(struct list_head, blocked_vcpu_on_cpu);
|
||||
static DEFINE_PER_CPU(spinlock_t, blocked_vcpu_on_cpu_lock);
|
||||
static DEFINE_PER_CPU(raw_spinlock_t, blocked_vcpu_on_cpu_lock);
|
||||
|
||||
static inline struct pi_desc *vcpu_to_pi_desc(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
@@ -121,9 +121,9 @@ static void __pi_post_block(struct kvm_vcpu *vcpu)
|
||||
new.control) != old.control);
|
||||
|
||||
if (!WARN_ON_ONCE(vcpu->pre_pcpu == -1)) {
|
||||
spin_lock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
|
||||
raw_spin_lock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
|
||||
list_del(&vcpu->blocked_vcpu_list);
|
||||
spin_unlock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
|
||||
raw_spin_unlock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
|
||||
vcpu->pre_pcpu = -1;
|
||||
}
|
||||
}
|
||||
@@ -154,11 +154,11 @@ int pi_pre_block(struct kvm_vcpu *vcpu)
|
||||
local_irq_disable();
|
||||
if (!WARN_ON_ONCE(vcpu->pre_pcpu != -1)) {
|
||||
vcpu->pre_pcpu = vcpu->cpu;
|
||||
spin_lock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
|
||||
raw_spin_lock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
|
||||
list_add_tail(&vcpu->blocked_vcpu_list,
|
||||
&per_cpu(blocked_vcpu_on_cpu,
|
||||
vcpu->pre_pcpu));
|
||||
spin_unlock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
|
||||
raw_spin_unlock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
|
||||
}
|
||||
|
||||
do {
|
||||
@@ -215,7 +215,7 @@ void pi_wakeup_handler(void)
|
||||
struct kvm_vcpu *vcpu;
|
||||
int cpu = smp_processor_id();
|
||||
|
||||
spin_lock(&per_cpu(blocked_vcpu_on_cpu_lock, cpu));
|
||||
raw_spin_lock(&per_cpu(blocked_vcpu_on_cpu_lock, cpu));
|
||||
list_for_each_entry(vcpu, &per_cpu(blocked_vcpu_on_cpu, cpu),
|
||||
blocked_vcpu_list) {
|
||||
struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu);
|
||||
@@ -223,13 +223,13 @@ void pi_wakeup_handler(void)
|
||||
if (pi_test_on(pi_desc) == 1)
|
||||
kvm_vcpu_kick(vcpu);
|
||||
}
|
||||
spin_unlock(&per_cpu(blocked_vcpu_on_cpu_lock, cpu));
|
||||
raw_spin_unlock(&per_cpu(blocked_vcpu_on_cpu_lock, cpu));
|
||||
}
|
||||
|
||||
void __init pi_init_cpu(int cpu)
|
||||
{
|
||||
INIT_LIST_HEAD(&per_cpu(blocked_vcpu_on_cpu, cpu));
|
||||
spin_lock_init(&per_cpu(blocked_vcpu_on_cpu_lock, cpu));
|
||||
raw_spin_lock_init(&per_cpu(blocked_vcpu_on_cpu_lock, cpu));
|
||||
}
|
||||
|
||||
bool pi_has_pending_interrupt(struct kvm_vcpu *vcpu)
|
||||
|
@@ -17,6 +17,32 @@ u32 *trampoline_cr4_features;
|
||||
/* Hold the pgd entry used on booting additional CPUs */
|
||||
pgd_t trampoline_pgd_entry;
|
||||
|
||||
void load_trampoline_pgtable(void)
|
||||
{
|
||||
#ifdef CONFIG_X86_32
|
||||
load_cr3(initial_page_table);
|
||||
#else
|
||||
/*
|
||||
* This function is called before exiting to real-mode and that will
|
||||
* fail with CR4.PCIDE still set.
|
||||
*/
|
||||
if (boot_cpu_has(X86_FEATURE_PCID))
|
||||
cr4_clear_bits(X86_CR4_PCIDE);
|
||||
|
||||
write_cr3(real_mode_header->trampoline_pgd);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The CR3 write above will not flush global TLB entries.
|
||||
* Stale, global entries from previous page tables may still be
|
||||
* present. Flush those stale entries.
|
||||
*
|
||||
* This ensures that memory accessed while running with
|
||||
* trampoline_pgd is *actually* mapped into trampoline_pgd.
|
||||
*/
|
||||
__flush_tlb_all();
|
||||
}
|
||||
|
||||
void __init reserve_real_mode(void)
|
||||
{
|
||||
phys_addr_t mem;
|
||||
|
@@ -11,6 +11,7 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/prctl.h> /* XXX This should get the constants from libc */
|
||||
#include <os.h>
|
||||
#include <registers.h>
|
||||
|
||||
long arch_prctl(struct task_struct *task, int option,
|
||||
unsigned long __user *arg2)
|
||||
@@ -35,7 +36,7 @@ long arch_prctl(struct task_struct *task, int option,
|
||||
switch (option) {
|
||||
case ARCH_SET_FS:
|
||||
case ARCH_SET_GS:
|
||||
ret = restore_registers(pid, ¤t->thread.regs.regs);
|
||||
ret = restore_pid_registers(pid, ¤t->thread.regs.regs);
|
||||
if (ret)
|
||||
return ret;
|
||||
break;
|
||||
|
@@ -236,8 +236,10 @@ static void flush_end_io(struct request *flush_rq, blk_status_t error)
|
||||
* avoiding use-after-free.
|
||||
*/
|
||||
WRITE_ONCE(flush_rq->state, MQ_RQ_IDLE);
|
||||
if (fq->rq_status != BLK_STS_OK)
|
||||
if (fq->rq_status != BLK_STS_OK) {
|
||||
error = fq->rq_status;
|
||||
fq->rq_status = BLK_STS_OK;
|
||||
}
|
||||
|
||||
if (!q->elevator) {
|
||||
flush_rq->tag = BLK_MQ_NO_TAG;
|
||||
|
@@ -163,27 +163,19 @@ EXPORT_SYMBOL(blk_pre_runtime_resume);
|
||||
/**
|
||||
* blk_post_runtime_resume - Post runtime resume processing
|
||||
* @q: the queue of the device
|
||||
* @err: return value of the device's runtime_resume function
|
||||
*
|
||||
* Description:
|
||||
* Update the queue's runtime status according to the return value of the
|
||||
* device's runtime_resume function. If the resume was successful, call
|
||||
* blk_set_runtime_active() to do the real work of restarting the queue.
|
||||
* For historical reasons, this routine merely calls blk_set_runtime_active()
|
||||
* to do the real work of restarting the queue. It does this regardless of
|
||||
* whether the device's runtime-resume succeeded; even if it failed the
|
||||
* driver or error handler will need to communicate with the device.
|
||||
*
|
||||
* This function should be called near the end of the device's
|
||||
* runtime_resume callback.
|
||||
*/
|
||||
void blk_post_runtime_resume(struct request_queue *q, int err)
|
||||
void blk_post_runtime_resume(struct request_queue *q)
|
||||
{
|
||||
if (!q->dev)
|
||||
return;
|
||||
if (!err) {
|
||||
blk_set_runtime_active(q);
|
||||
} else {
|
||||
spin_lock_irq(&q->queue_lock);
|
||||
q->rpm_status = RPM_SUSPENDED;
|
||||
spin_unlock_irq(&q->queue_lock);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(blk_post_runtime_resume);
|
||||
|
||||
@@ -201,7 +193,7 @@ EXPORT_SYMBOL(blk_post_runtime_resume);
|
||||
* runtime PM status and re-enable peeking requests from the queue. It
|
||||
* should be called before first request is added to the queue.
|
||||
*
|
||||
* This function is also called by blk_post_runtime_resume() for successful
|
||||
* This function is also called by blk_post_runtime_resume() for
|
||||
* runtime resumes. It does everything necessary to restart the queue.
|
||||
*/
|
||||
void blk_set_runtime_active(struct request_queue *q)
|
||||
|
@@ -265,7 +265,6 @@ static int jent_stuck(struct rand_data *ec, __u64 current_delta)
|
||||
{
|
||||
__u64 delta2 = jent_delta(ec->last_delta, current_delta);
|
||||
__u64 delta3 = jent_delta(ec->last_delta2, delta2);
|
||||
unsigned int delta_masked = current_delta & JENT_APT_WORD_MASK;
|
||||
|
||||
ec->last_delta = current_delta;
|
||||
ec->last_delta2 = delta2;
|
||||
@@ -274,7 +273,7 @@ static int jent_stuck(struct rand_data *ec, __u64 current_delta)
|
||||
* Insert the result of the comparison of two back-to-back time
|
||||
* deltas.
|
||||
*/
|
||||
jent_apt_insert(ec, delta_masked);
|
||||
jent_apt_insert(ec, current_delta);
|
||||
|
||||
if (!current_delta || !delta2 || !delta3) {
|
||||
/* RCT with a stuck bit */
|
||||
|
@@ -326,12 +326,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
|
||||
obj_desc->field.base_byte_offset,
|
||||
source_desc->buffer.pointer, data_length);
|
||||
|
||||
if ((obj_desc->field.region_obj->region.address ==
|
||||
PCC_MASTER_SUBSPACE
|
||||
&& MASTER_SUBSPACE_COMMAND(obj_desc->field.
|
||||
base_byte_offset))
|
||||
|| GENERIC_SUBSPACE_COMMAND(obj_desc->field.
|
||||
base_byte_offset)) {
|
||||
if (MASTER_SUBSPACE_COMMAND(obj_desc->field.base_byte_offset)) {
|
||||
|
||||
/* Perform the write */
|
||||
|
||||
|
@@ -1007,7 +1007,8 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
|
||||
(walk_state, return_desc,
|
||||
&temp_desc);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
goto cleanup;
|
||||
return_ACPI_STATUS
|
||||
(status);
|
||||
}
|
||||
|
||||
return_desc = temp_desc;
|
||||
|
@@ -104,7 +104,9 @@ acpi_status acpi_hw_extended_sleep(u8 sleep_state)
|
||||
|
||||
/* Flush caches, as per ACPI specification */
|
||||
|
||||
if (sleep_state < ACPI_STATE_S4) {
|
||||
ACPI_FLUSH_CPU_CACHE();
|
||||
}
|
||||
|
||||
status = acpi_os_enter_sleep(sleep_state, sleep_control, 0);
|
||||
if (status == AE_CTRL_TERMINATE) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user