Merge tag 'ASB-2022-10-01_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2022-10-01 CVE-2022-1786 CVE-2022-20421 CVE-2022-20422 CVE-2022-20423 CVE-2022-20409 * tag 'ASB-2022-10-01_4.19-stable' of https://android.googlesource.com/kernel/common: Linux 4.19.261 clk: iproc: Do not rely on node name for correct PLL setup selftests: Fix the if conditions of in test_extra_filter() nvme: Fix IOC_PR_CLEAR and IOC_PR_RELEASE ioctls for nvme devices nvme: add new line after variable declatation usbnet: Fix memory leak in usbnet_disconnect() Input: melfas_mip4 - fix return value check in mip4_probe() Revert "drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time" soc: sunxi: sram: Fix debugfs info for A64 SRAM C soc: sunxi: sram: Fix probe function ordering issues soc: sunxi: sram: Prevent the driver from being unbound soc: sunxi: sram: Actually claim SRAM regions ima: Free the entire rule if it fails to parse ima: Free the entire rule when deleting a list of rules ima: Have the LSM free its audit rule mm/migrate_device.c: flush TLB while holding PTL mm: prevent page_frag_alloc() from corrupting the memory mm/page_alloc: fix race condition between build_all_zonelists and page allocation mmc: moxart: fix 4-bit bus width and remove 8-bit bus width libata: add ATA_HORKAGE_NOLPM for Pioneer BDR-207M and BDR-205 ntfs: fix BUG_ON in ntfs_lookup_inode_by_name() ARM: dts: integrator: Tag PCI host with device_type net: usb: qmi_wwan: Add new usb-id for Dell branded EM7455 uas: ignore UAS for Thinkplus chips usb-storage: Add Hiksemi USB3-FW to IGNORE_UAS uas: add no-uas quirk for Hiksemi usb_disk Linux 4.19.260 ext4: make directory inode spreading reflect flexbg size usb: dwc3: pci: Allow Elkhart Lake to utilize DSM method for PM functionality workqueue: don't skip lockdep work dependency in cancel_work_sync() drm/rockchip: Fix return type of cdn_dp_connector_mode_valid drm/amd/display: Limit user regamma to a valid value Drivers: hv: Never allocate anything besides framebuffer from framebuffer memory region s390/dasd: fix Oops in dasd_alias_get_start_dev due to missing pavgroup serial: tegra: Use uart_xmit_advance(), fixes icount.tx accounting serial: Create uart_xmit_advance() net: sunhme: Fix packet reception for len < RX_COPY_THRESHOLD perf kcore_copy: Do not check /proc/modules is unchanged perf jit: Include program header in ELF files can: gs_usb: gs_can_open(): fix race dev->can.state condition netfilter: ebtables: fix memory leak when blob is malformed of: mdio: Add of_node_put() when breaking out of for_each_xx i40e: Fix set max_tx_rate when it is lower than 1 Mbps i40e: Fix VF set max MTU size MIPS: lantiq: export clk_get_io() for lantiq_wdt.ko net: team: Unsync device addresses on ndo_stop ipvlan: Fix out-of-bound bugs caused by unset skb->mac_header iavf: Fix cached head and tail value for iavf_get_tx_pending netfilter: nf_conntrack_irc: Tighten matching on DCC message netfilter: nf_conntrack_sip: fix ct_sip_walk_headers arm64: dts: rockchip: Remove 'enable-active-low' from rk3399-puma arm64: dts: rockchip: Set RK3399-Gru PCLK_EDP to 24 MHz mm/slub: fix to return errno if kmalloc() fails efi: libstub: check Shim mode using MokSBStateRT ALSA: hda/realtek: Enable 4-speaker output Dell Precision 5530 laptop ALSA: hda: add Intel 5 Series / 3400 PCI DID ALSA: hda/tegra: set depop delay for tegra USB: serial: option: add Quectel RM520N USB: serial: option: add Quectel BG95 0x0203 composition USB: core: Fix RST error in hub.c wifi: mac80211: Fix UAF in ieee80211_scan_rx() usb: dwc3: pci: add support for the Intel Alder Lake-S usb: dwc3: pci: add support for the Intel Jasper Lake usb: dwc3: pci: add support for the Intel Tiger Lake PCH -H variant usb: dwc3: pci: add support for TigerLake Devices usb: dwc3: pci: Add Support for Intel Elkhart Lake Devices ALSA: hda/sigmatel: Fix unused variable warning for beep power change video: fbdev: pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write mksysmap: Fix the mismatch of 'L0' symbols in System.map MIPS: OCTEON: irq: Fix octeon_irq_force_ciu_mapping() net: usb: qmi_wwan: add Quectel RM520N ALSA: hda/sigmatel: Keep power up while beep is enabled rxrpc: Fix local destruction being repeated regulator: pfuze100: Fix the global-out-of-bounds access in pfuze100_regulator_probe() ASoC: nau8824: Fix semaphore unbalance at error paths cifs: don't send down the destination address to sendmsg for a SOCK_STREAM mvpp2: no need to check return value of debugfs_create functions nvmet: fix a use-after-free parisc: ccio-dma: Add missing iounmap in error path in ccio_probe() drm/meson: Correct OSD1 global alpha value gpio: mpc8xxx: Fix support for IRQ_TYPE_LEVEL_LOW flow_type in mpc85xx of: fdt: fix off-by-one error in unflatten_dt_nodes() Revert "xhci: Add grace period after xHC start to prevent premature runtime suspend." Revert "USB: core: Prevent nested device-reset calls" Revert "mm/rmap: Fix anon_vma->degree ambiguity leading to double-reuse" Revert "sched/deadline: Fix priority inheritance with multiple scheduling classes" Revert "kernel/sched: Remove dl_boosted flag comment" Revert "fs: check FMODE_LSEEK to control internal pipe splicing" Linux 4.19.259 tracefs: Only clobber mode/uid/gid on remount if asked net: dp83822: disable rx error interrupt mm: Fix TLB flush for not-first PFNMAP mappings in unmap_region() usb: storage: Add ASUS <0x0b05:0x1932> to IGNORE_UAS platform/x86: acer-wmi: Acer Aspire One AOD270/Packard Bell Dot keymap fixes perf/arm_pmu_platform: fix tests for platform_get_irq() failure Input: iforce - add support for Boeder Force Feedback Wheel ieee802154: cc2520: add rc code in cc2520_tx() tg3: Disable tg3 device on system reboot to avoid triggering AER HID: ishtp-hid-clientHID: ishtp-hid-client: Fix comment typo drm/msm/rd: Fix FIFO-full deadlock Linux 4.19.258 SUNRPC: use _bh spinlocking on ->transport_lock MIPS: loongson32: ls1c: Fix hang during startup x86/nospec: Fix i386 RSB stuffing usb: dwc3: qcom: fix use-after-free on runtime-PM wakeup USB: serial: ch341: fix disabled rx timer on older devices USB: serial: ch341: fix lost character on LCR updates usb: dwc3: fix PHY disable sequence sch_sfb: Also store skb len before calling child enqueue tcp: fix early ETIMEDOUT after spurious non-SACK RTO RDMA/mlx5: Set local port to one when accessing counters ipv6: sr: fix out-of-bounds read when setting HMAC data. i40e: Fix kernel crash during module removal tipc: fix shift wrapping bug in map_get() sch_sfb: Don't assume the skb is still around after enqueueing to child netfilter: nf_conntrack_irc: Fix forged IP logic netfilter: br_netfilter: Drop dst references before setting. soc: brcmstb: pm-arm: Fix refcount leak and __iomem leak bugs scsi: mpt3sas: Fix use-after-free warning debugfs: add debugfs_lookup_and_remove() kprobes: Prohibit probes in gate area ALSA: usb-audio: Fix an out-of-bounds bug in __snd_usb_parse_audio_interface() ALSA: aloop: Fix random zeros in capture data when using jiffies timer ALSA: emu10k1: Fix out of bounds access in snd_emu10k1_pcm_channel_alloc() drm/amdgpu: mmVM_L2_CNTL3 register not initialized correctly fbdev: chipsfb: Add missing pci_disable_device() in chipsfb_pci_init() arm64: cacheinfo: Fix incorrect assignment of signed error value to unsigned fw_level parisc: Add runtime check to prevent PA2.0 kernels on PA1.x machines parisc: ccio-dma: Handle kmalloc failure in ccio_init_resources() drm/radeon: add a force flush to delay work when radeon drm/amdgpu: Check num_gfx_rings for gfx v9_0 rb setup. ALSA: seq: Fix data-race at module auto-loading ALSA: seq: oss: Fix data-race for max_midi_devs access net: mac802154: Fix a condition in the receive path wifi: mac80211: Don't finalize CSA in IBSS mode if state is disconnected usb: gadget: mass_storage: Fix cdrom data transfers on MAC-OS USB: core: Prevent nested device-reset calls s390: fix nospec table alignments s390/hugetlb: fix prepare_hugepage_range() check for 2 GB hugepages usb-storage: Add ignore-residue quirk for NXP PN7462AU USB: cdc-acm: Add Icom PMR F3400 support (0c26:0020) usb: dwc2: fix wrong order of phy_power_on and phy_init usb: typec: altmodes/displayport: correct pin assignment for UFP receptacles USB: serial: option: add support for Cinterion MV32-WA/WB RmNet mode USB: serial: option: add Quectel EM060K modem USB: serial: option: add support for OPPO R11 diag port USB: serial: cp210x: add Decagon UCA device id xhci: Add grace period after xHC start to prevent premature runtime suspend. thunderbolt: Use the actual buffer in tb_async_error() hwmon: (gpio-fan) Fix array out of bounds access Input: rk805-pwrkey - fix module autoloading clk: core: Fix runtime PM sequence in clk_core_unprepare() Revert "clk: core: Honor CLK_OPS_PARENT_ENABLE for clk gate ops" clk: core: Honor CLK_OPS_PARENT_ENABLE for clk gate ops drm/i915/reg: Fix spelling mistake "Unsupport" -> "Unsupported" binder: fix UAF of ref->proc caused by race condition USB: serial: ftdi_sio: add Omron CS1W-CIF31 device id vt: Clear selection before changing the font staging: rtl8712: fix use after free bugs serial: fsl_lpuart: RS485 RTS polariy is inverse net/smc: Remove redundant refcount increase Revert "sch_cake: Return __NET_XMIT_STOLEN when consuming enqueued skb" tcp: annotate data-race around challenge_timestamp sch_cake: Return __NET_XMIT_STOLEN when consuming enqueued skb kcm: fix strp_init() order and cleanup ethernet: rocker: fix sleep in atomic context bug in neigh_timer_handler Revert "xhci: turn off port power in shutdown" wifi: cfg80211: debugfs: fix return type in ht40allow_map_read() ieee802154/adf7242: defer destroy_workqueue call platform/x86: pmc_atom: Fix SLP_TYPx bitfield mask drm/msm/dsi: Fix number of regulators for msm8996_dsi_cfg drm/msm/dsi: fix the inconsistent indenting net: dp83822: disable false carrier interrupt Revert "mm: kmemleak: take a full lowmem check in kmemleak_*_phys()" fs: only do a memory barrier for the first set_buffer_uptodate() wifi: iwlegacy: 4965: corrected fix for potential off-by-one overflow in il4965_rs_fill_link_cmd() efi: capsule-loader: Fix use-after-free in efi_capsule_write driver core: Don't probe devices after bus_type.match() probe deferral Revert "USB: HCD: Fix URB giveback issue in tasklet function" Linux 4.19.257 net: neigh: don't call kfree_skb() under spin_lock_irqsave() kprobes: don't call disarm_kprobe() for disabled kprobes netfilter: conntrack: NF_CONNTRACK_PROCFS should no longer default to y s390/hypfs: avoid error message under KVM neigh: fix possible DoS due to net iface start/stop loop drm/amd/display: clear optc underflow before turn off odm clock mm/rmap: Fix anon_vma->degree ambiguity leading to double-reuse ftrace: Fix NULL pointer dereference in is_ftrace_trampoline when ftrace is dead fbdev: fb_pm2fb: Avoid potential divide by zero error HID: hidraw: fix memory leak in hidraw_release() media: pvrusb2: fix memory leak in pvr_probe HID: steam: Prevent NULL pointer dereference in steam_{recv,send}_report Bluetooth: L2CAP: Fix build errors in some archs kbuild: Fix include path in scripts/Makefile.modpost x86/bugs: Add "unknown" reporting for MMIO Stale Data s390/mm: do not trigger write fault when vma does not allow VM_WRITE selftests/bpf: Fix test_align verifier log patterns bpf: Fix the off-by-two error in range markings arm64: map FDT as RW for early_init_dt_scan() mm: Force TLB flush for PFNMAP mappings before unlink_file_vma() scsi: storvsc: Remove WQ_MEM_RECLAIM from storvsc_error_wq md: call __md_stop_writes in md_stop mm/hugetlb: fix hugetlb not supporting softdirty tracking s390: fix double free of GS and RI CBs on fork() failure asm-generic: sections: refactor memory_intersects loop: Check for overflow while configuring loop x86/unwind/orc: Unwind ftrace trampolines with correct ORC entry btrfs: check if root is readonly while setting security xattr ixgbe: stop resetting SYSTIME in ixgbe_ptp_start_cyclecounter net: Fix a data-race around sysctl_somaxconn. net: Fix a data-race around netdev_budget_usecs. net: Fix a data-race around netdev_budget. net: Fix a data-race around sysctl_net_busy_read. net: Fix a data-race around sysctl_net_busy_poll. net: Fix a data-race around sysctl_tstamp_allow_data. ratelimit: Fix data-races in ___ratelimit(). net: Fix data-races around netdev_tstamp_prequeue. net: Fix data-races around weight_p and dev_weight_[rt]x_bias. netfilter: nft_tunnel: restrict it to netdev family netfilter: nft_osf: restrict osf to ipv4, ipv6 and inet families netfilter: nft_payload: do not truncate csum_offset and csum_type netfilter: nft_payload: report ERANGE for too long offset and length netfilter: ebtables: reject blobs that don't provide all entry points net: ipvtap - add __init/__exit annotations to module init/exit funcs bonding: 802.3ad: fix no transmission of LACPDUs rose: check NULL rose_loopback_neigh->loopback af_key: Do not call xfrm_probe_algs in parallel xfrm: fix refcount leak in __xfrm_policy_check() kernel/sched: Remove dl_boosted flag comment sched/deadline: Fix priority inheritance with multiple scheduling classes sched/deadline: Fix stale throttling on de-/boosted tasks sched/deadline: Unthrottle PI boosted threads while enqueuing pinctrl: amd: Don't save/restore interrupt status and wake status bits kernel/sys_ni: add compat entry for fadvise64_64 parisc: Fix exception handler for fldw and fstw instructions audit: fix potential double free on error path from fsnotify_add_inode_mark Linux 4.19.256 btrfs: raid56: don't trust any cached sector in __raid56_parity_recover() btrfs: only write the sectors in the vertical stripe which has data stripes tracing/probes: Have kprobes and uprobes use $COMM too tee: add overflow check in register_shm_helper() MIPS: tlbex: Explicitly compare _PAGE_NO_EXEC against 0 video: fbdev: i740fb: Check the argument of i740_calc_vclk() powerpc/64: Init jump labels before parse_early_param() smb3: check xattr value length earlier f2fs: fix to avoid use f2fs_bug_on() in f2fs_new_node_page() ALSA: timer: Use deferred fasync helper ALSA: core: Add async signal helpers watchdog: export lockup_detector_reconfigure RISC-V: Add fast call path of crash_kexec() riscv: mmap with PROT_WRITE but no PROT_READ is invalid mips: cavium-octeon: Fix missing of_node_put() in octeon2_usb_clocks_start vfio: Clear the caps->buf to NULL after free tty: serial: Fix refcount leak bug in ucc_uart.c lib/list_debug.c: Detect uninitialized lists ext4: avoid resizing to a partial cluster size ext4: avoid remove directory when directory is corrupted drivers:md:fix a potential use-after-free bug dmaengine: sprd: Cleanup in .remove() after pm_runtime_get_sync() failed cxl: Fix a memory leak in an error handling path gadgetfs: ep_io - wait until IRQ finishes clk: qcom: ipq8074: dont disable gcc_sleep_clk_src vboxguest: Do not use devm for irq usb: renesas: Fix refcount leak bug usb: host: ohci-ppc-of: Fix refcount leak bug irqchip/tegra: Fix overflow implicit truncation warnings PCI: Add ACS quirk for Broadcom BCM5750x NICs drm/meson: Fix refcount bugs in meson_vpu_has_available_connectors() locking/atomic: Make test_and_*_bit() ordered on failure gcc-plugins: Undefine LATENT_ENTROPY_PLUGIN when plugin disabled for a file igb: Add lock to avoid data race fec: Fix timer capture timing in `fec_ptp_enable_pps()` i40e: Fix to stop tx_timeout recovery if GLOBR fails powerpc/pci: Fix get_phb_number() locking netfilter: nf_tables: really skip inactive sets when allocating name nios2: add force_successful_syscall_return() nios2: restarts apply only to the first sigframe we build... nios2: fix syscall restart checks nios2: traced syscall does need to check the syscall number nios2: don't leave NULLs in sys_call_table[] nios2: page fault et.al. are *not* restartable syscalls... atm: idt77252: fix use-after-free bugs caused by tst_timer xen/xenbus: fix return type in xenbus_file_read() NTB: ntb_tool: uninitialized heap data in tool_fn_write() tools build: Switch to new openssl API for test-libcrypto vsock: Set socket state back to SS_UNCONNECTED in vsock_connect_timeout() vsock: Fix memory leak in vsock_connect() geneve: do not use RT_TOS for IPv6 flowlabel ACPI: property: Return type of acpi_add_nondev_subnodes() should be bool pinctrl: qcom: msm8916: Allow CAMSS GP clocks to be muxed pinctrl: nomadik: Fix refcount leak in nmk_pinctrl_dt_subnode_to_map SUNRPC: Reinitialise the backchannel request buffers before reuse NFSv4/pnfs: Fix a use-after-free bug in open NFSv4.1: RECLAIM_COMPLETE must handle EACCES NFSv4: Fix races in the legacy idmapper upcall apparmor: Fix memleak in aa_simple_write_to_buffer() apparmor: fix reference count leak in aa_pivotroot() apparmor: fix overlapping attachment computation apparmor: fix aa_label_asxprint return check apparmor: Fix failed mount permission check error message apparmor: fix absroot causing audited secids to begin with = apparmor: fix quiet_denied for file rules can: ems_usb: fix clang's -Wunaligned-access warning tracing: Have filter accept "common_cpu" to be consistent btrfs: fix lost error handling when looking up extended ref on log replay mmc: pxamci: Fix an error handling path in pxamci_probe() mmc: pxamci: Fix another error handling path in pxamci_probe() ata: libata-eh: Add missing command name rds: add missing barrier to release_refill ALSA: info: Fix llseek return value when using callback powerpc/ptdump: Fix display of RW pages on FSL_BOOK3E powerpc/mm: Split dump_pagelinuxtables flag_array table firmware: arm_scpi: Ensure scpi_info is not assigned if the probe fails net_sched: cls_route: disallow handle of 0 net/9p: Initialize the iounit field during fid creation Bluetooth: L2CAP: Fix l2cap_global_chan_by_psm regression Revert "net: usb: ax88179_178a needs FLAG_SEND_ZLP" scsi: sg: Allow waiting for commands to complete on removed device tcp: fix over estimation in sk_forced_mem_schedule() KVM: x86: Avoid theoretical NULL pointer dereference in kvm_irq_delivery_to_apic_fast() KVM: x86: Check lapic_in_kernel() before attempting to set a SynIC irq KVM: Add infrastructure and macro to mark VM as bugged btrfs: reject log replay if there is unsupported RO compat flag net_sched: cls_route: remove from list when handle is 0 ACPI: CPPC: Do not prevent CPPC from working in the future dm writecache: set a default MAX_WRITEBACK_JOBS dm raid: fix address sanitizer warning in raid_status dm raid: fix address sanitizer warning in raid_resume intel_th: pci: Add Meteor Lake-P support intel_th: pci: Add Raptor Lake-S PCH support intel_th: pci: Add Raptor Lake-S CPU support ext4: correct the misjudgment in ext4_iget_extra_inode ext4: correct max_inline_xattr_value_size computing ext4: fix extent status tree race in writeback error recovery path ext4: update s_overhead_clusters in the superblock during an on-line resize ext4: fix use-after-free in ext4_xattr_set_entry ext4: make sure ext4_append() always allocates new block ext4: add EXT4_INODE_HAS_XATTR_SPACE macro in xattr.h spmi: trace: fix stack-out-of-bound access in SPMI tracing functions x86/olpc: fix 'logical not is only applied to the left hand side' scsi: zfcp: Fix missing auto port scan and thus missing target ports video: fbdev: s3fb: Check the size of screen before memset_io() video: fbdev: arkfb: Check the size of screen before memset_io() video: fbdev: vt8623fb: Check the size of screen before memset_io() tools/thermal: Fix possible path truncations video: fbdev: arkfb: Fix a divide-by-zero bug in ark_set_pixclock() x86/numa: Use cpumask_available instead of hardcoded NULL check scripts/faddr2line: Fix vmlinux detection on arm64 genelf: Use HAVE_LIBCRYPTO_SUPPORT, not the never defined HAVE_LIBCRYPTO powerpc/pci: Fix PHB numbering when using opal-phbid kprobes: Forbid probing on trampoline and BPF code areas powerpc/cell/axon_msi: Fix refcount leak in setup_msi_msg_address powerpc/xive: Fix refcount leak in xive_get_max_prio powerpc/spufs: Fix refcount leak in spufs_init_isolated_loader powerpc/pci: Prefer PCI domain assignment via DT 'linux,pci-domain' and alias powerpc/32: Do not allow selection of e5500 or e6500 CPUs on PPC32 video: fbdev: sis: fix typos in SiS_GetModeID() video: fbdev: amba-clcd: Fix refcount leak bugs ASoC: qcom: q6dsp: Fix an off-by-one in q6adm_alloc_copp() s390/zcore: fix race when reading from hardware system area iommu/arm-smmu: qcom_iommu: Add of_node_put() when breaking out of loop mfd: t7l66xb: Drop platform disable callback kfifo: fix kfifo_to_user() return type rpmsg: qcom_smd: Fix refcount leak in qcom_smd_parse_edge iommu/exynos: Handle failed IOMMU device registration properly tty: n_gsm: fix missing corner cases in gsmld_poll() tty: n_gsm: fix DM command tty: n_gsm: fix wrong T1 retry count handling vfio/ccw: Do not change FSM state in subchannel event remoteproc: qcom: wcnss: Fix handling of IRQs tty: n_gsm: fix race condition in gsmld_write() tty: n_gsm: fix packet re-transmission without open control channel tty: n_gsm: fix non flow control frames during mux flow off profiling: fix shift too large makes kernel panic serial: 8250_dw: Store LSR into lsr_saved_flags in dw8250_tx_wait_empty() ASoC: mediatek: mt8173-rt5650: Fix refcount leak in mt8173_rt5650_dev_probe ASoC: codecs: da7210: add check for i2c_add_driver ASoC: mt6797-mt6351: Fix refcount leak in mt6797_mt6351_dev_probe ASoC: mediatek: mt8173: Fix refcount leak in mt8173_rt5650_rt5676_dev_probe jbd2: fix assertion 'jh->b_frozen_data == NULL' failure when journal aborted ext4: recover csum seed of tmp_inode after migrating to extents null_blk: fix ida error handling in null_add_dev() RDMA/rxe: Fix error unwind in rxe_create_qp() mm/mmap.c: fix missing call to vm_unacct_memory in mmap_region platform/olpc: Fix uninitialized data in debugfs write USB: serial: fix tty-port initialized comments HID: alps: Declare U1_UNICORN_LEGACY support mmc: cavium-thunderx: Add of_node_put() when breaking out of loop mmc: cavium-octeon: Add of_node_put() when breaking out of loop gpio: gpiolib-of: Fix refcount bugs in of_mm_gpiochip_add_data() RDMA/hfi1: fix potential memory leak in setup_base_ctxt() usb: gadget: udc: amd5536 depends on HAS_DMA scsi: smartpqi: Fix DMA direction for RAID requests mmc: sdhci-of-at91: fix set_uhs_signaling rewriting of MC1R memstick/ms_block: Fix a memory leak memstick/ms_block: Fix some incorrect memory allocation mmc: sdhci-of-esdhc: Fix refcount leak in esdhc_signal_voltage_switch staging: rtl8192u: Fix sleep in atomic context bug in dm_fsync_timer_callback soundwire: bus_type: fix remove and shutdown support clk: qcom: ipq8074: set BRANCH_HALT_DELAY flag for UBI clocks clk: qcom: ipq8074: fix NSS port frequency tables misc: rtsx: Fix an error handling path in rtsx_pci_probe() usb: ohci-nxp: Fix refcount leak in ohci_hcd_nxp_probe usb: host: Fix refcount leak in ehci_hcd_ppc_of_probe fpga: altera-pr-ip: fix unsigned comparison with less than zero mtd: st_spi_fsm: Add a clk_disable_unprepare() in .probe()'s error path mtd: sm_ftl: Fix deadlock caused by cancel_work_sync in sm_release HID: cp2112: prevent a buffer overflow in cp2112_xfer() mtd: maps: Fix refcount leak in ap_flash_init mtd: maps: Fix refcount leak in of_flash_probe_versatile clk: renesas: r9a06g032: Fix UART clkgrp bitsel dccp: put dccp_qpolicy_full() and dccp_qpolicy_push() in the same lock net: rose: fix netdev reference changes netdevsim: Avoid allocation warnings triggered from user space net/mlx5e: Fix the value of MLX5E_MAX_RQ_NUM_MTTS wifi: libertas: Fix possible refcount leak in if_usb_probe() wifi: wil6210: debugfs: fix uninitialized variable use in `wil_write_file_wmi()` i2c: mux-gpmux: Add of_node_put() when breaking out of loop i2c: cadence: Support PEC for SMBus block read Bluetooth: hci_intel: Add check for platform_driver_register can: pch_can: pch_can_error(): initialize errc before using it can: error: specify the values of data[5..7] of CAN error frames can: usb_8dev: do not report txerr and rxerr during bus-off can: kvaser_usb_leaf: do not report txerr and rxerr during bus-off can: kvaser_usb_hydra: do not report txerr and rxerr during bus-off can: sun4i_can: do not report txerr and rxerr during bus-off can: hi311x: do not report txerr and rxerr during bus-off can: sja1000: do not report txerr and rxerr during bus-off can: rcar_can: do not report txerr and rxerr during bus-off can: pch_can: do not report txerr and rxerr during bus-off wifi: p54: add missing parentheses in p54_flush() wifi: p54: Fix an error handling path in p54spi_probe() selftests: timers: clocksource-switch: fix passing errors from child wifi: wil6210: debugfs: fix info leak in wil_write_file_wmi() selftests: timers: valid-adjtimex: build fix for newer toolchains fs: check FMODE_LSEEK to control internal pipe splicing libbpf: Fix the name of a reused map tcp: make retransmitted SKB fit into the send window mediatek: mt76: mac80211: Fix missing of_node_put() in mt76_led_init() media: platform: mtk-mdp: Fix mdp_ipi_comm structure alignment crypto: hisilicon - Kunpeng916 crypto driver don't sleep when in softirq drm/msm/mdp5: Fix global state lock backoff drm: bridge: sii8620: fix possible off-by-one drm/mediatek: dpi: Remove output format of YUV drm/rockchip: vop: Don't crash for invalid duplicate_state() drm/vc4: dsi: Correct DSI divider calculations media: hdpvr: fix error value returns in hdpvr_read drm: bridge: adv7511: Add check for mipi_dsi_driver_register wifi: iwlegacy: 4965: fix potential off-by-one overflow in il4965_rs_fill_link_cmd() ath9k: fix use-after-free in ath9k_hif_usb_rx_cb media: tw686x: Register the irq at the end of probe i2c: Fix a potential use after free drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function drm/radeon: fix potential buffer overflow in ni_set_mc_special_registers() wifi: rtlwifi: fix error codes in rtl_debugfs_set_write_h2c() ath10k: do not enforce interrupt trigger type dm: return early from dm_pr_call() if DM device is suspended thermal/tools/tmon: Include pthread and time headers in tmon.h nohz/full, sched/rt: Fix missed tick-reenabling bug in dequeue_task_rt() regulator: of: Fix refcount leak bug in of_get_regulation_constraints() arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node bus: hisi_lpc: fix missing platform_device_put() in hisi_lpc_acpi_probe() ARM: dts: qcom: pm8841: add required thermal-sensor-cells cpufreq: zynq: Fix refcount leak in zynq_get_revision ARM: OMAP2+: Fix refcount leak in omap3xxx_prm_late_init soc: fsl: guts: machine variable might be unset ARM: dts: ast2500-evb: fix board compatible x86/pmem: Fix platform-device leak in error path ARM: bcm: Fix refcount leak in bcm_kona_smc_init meson-mx-socinfo: Fix refcount leak in meson_mx_socinfo_init ARM: findbit: fix overflowing offset selinux: Add boundary check in put_entry() PM: hibernate: defer device probing when resuming from hibernation arm64: dts: qcom: ipq8074: fix NAND node name ACPI: LPSS: Fix missing check in register_device_clock() ACPI: PM: save NVS memory for Lenovo G40-45 ACPI: EC: Remove duplicate ThinkPad X1 Carbon 6th entry from DMI quirks ARM: OMAP2+: display: Fix refcount leak bug ARM: dts: imx6ul: fix qspi node compatible ARM: dts: imx6ul: fix lcdif node compatible ARM: dts: imx6ul: change operating-points to uint32-matrix ARM: dts: imx6ul: add missing properties for sram ext2: Add more validity checks for inode counts USB: HCD: Fix URB giveback issue in tasklet function arm64: fix oops in concurrently setting insn_emulation sysctls arm64: Do not forget syscall when starting a new thread. netfilter: nf_tables: fix null deref due to zeroed list head netfilter: nf_tables: do not allow SET_ID to refer to another table MIPS: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK powerpc/powernv: Avoid crashing if rng is NULL powerpc/fsl-pci: Fix Class Code of PCIe Root Port PCI: Add defines for normal and subtractive PCI bridges ia64, processor: fix -Wincompatible-pointer-types in ia64_get_irr() md-raid10: fix KASAN warning serial: mvebu-uart: uart2 error bits clearing fuse: limit nsec iio: light: isl29028: Fix the warning in isl29028_remove() bpf: Verifer, adjust_scalar_min_max_vals to always call update_reg_bounds() drm/amdgpu: Check BO's requested pinning domains against its preferred_domains drm/nouveau: fix another off-by-one in nvbios_addr parisc: Fix device names in /proc/iomem ovl: drop WARN_ON() dentry is NULL in ovl_encode_fh() usbnet: Fix linkwatch use-after-free on disconnect fbcon: Fix boundary checks for fbcon=vc:n1-n2 parameters thermal: sysfs: Fix cooling_device_stats_setup() error code path fs: Add missing umask strip in vfs_tmpfile vfs: Check the truncate maximum size in inode_newsize_ok() tty: vt: initialize unicode screen buffer ALSA: hda/cirrus - support for iMac 12,1 model ALSA: hda/conexant: Add quirk for LENOVO 20149 Notebook model KVM: x86: Set error code to segment selector on LLDT/LTR non-canonical #GP KVM: x86: Mark TSS busy during LTR emulation _after_ all fault checks KVM: SVM: Don't BUG if userspace injects an interrupt with GIF=0 HID: wacom: Don't register pad_input for touch switch add barriers to buffer_uptodate and set_buffer_uptodate wifi: mac80211_hwsim: use 32-bit skb cookie wifi: mac80211_hwsim: add back erroneously removed cast wifi: mac80211_hwsim: fix race condition in pending packet ALSA: bcd2000: Fix a UAF bug on the error path of probing x86: link vdso and boot with -z noexecstack --no-warn-rwx-segments Makefile: link with -z noexecstack --no-warn-rwx-segments Conflicts: drivers/usb/dwc3/core.c Change-Id: I6a80af5bf9ef489c3a2be1d4f6f6589e26bb3102
This commit is contained in:
commit
b30fea722d
458 changed files with 3082 additions and 1392 deletions
|
@ -230,6 +230,20 @@ The possible values in this file are:
|
||||||
* - 'Mitigation: Clear CPU buffers'
|
* - 'Mitigation: Clear CPU buffers'
|
||||||
- The processor is vulnerable and the CPU buffer clearing mitigation is
|
- The processor is vulnerable and the CPU buffer clearing mitigation is
|
||||||
enabled.
|
enabled.
|
||||||
|
* - 'Unknown: No mitigations'
|
||||||
|
- The processor vulnerability status is unknown because it is
|
||||||
|
out of Servicing period. Mitigation is not attempted.
|
||||||
|
|
||||||
|
Definitions:
|
||||||
|
------------
|
||||||
|
|
||||||
|
Servicing period: The process of providing functional and security updates to
|
||||||
|
Intel processors or platforms, utilizing the Intel Platform Update (IPU)
|
||||||
|
process or other similar mechanisms.
|
||||||
|
|
||||||
|
End of Servicing Updates (ESU): ESU is the date at which Intel will no
|
||||||
|
longer provide Servicing, such as through IPU or other similar update
|
||||||
|
processes. ESU dates will typically be aligned to end of quarter.
|
||||||
|
|
||||||
If the processor is vulnerable then the following information is appended to
|
If the processor is vulnerable then the following information is appended to
|
||||||
the above information:
|
the above information:
|
||||||
|
|
|
@ -59,7 +59,7 @@ Like with atomic_t, the rule of thumb is:
|
||||||
- RMW operations that have a return value are fully ordered.
|
- RMW operations that have a return value are fully ordered.
|
||||||
|
|
||||||
- RMW operations that are conditional are unordered on FAILURE,
|
- RMW operations that are conditional are unordered on FAILURE,
|
||||||
otherwise the above rules apply. In the case of test_and_{}_bit() operations,
|
otherwise the above rules apply. In the case of test_and_set_bit_lock(),
|
||||||
if the bit in memory is unchanged by the operation then it is deemed to have
|
if the bit in memory is unchanged by the operation then it is deemed to have
|
||||||
failed.
|
failed.
|
||||||
|
|
||||||
|
|
|
@ -517,6 +517,7 @@ All I-Force devices are supported by the iforce module. This includes:
|
||||||
* AVB Mag Turbo Force
|
* AVB Mag Turbo Force
|
||||||
* AVB Top Shot Pegasus
|
* AVB Top Shot Pegasus
|
||||||
* AVB Top Shot Force Feedback Racing Wheel
|
* AVB Top Shot Force Feedback Racing Wheel
|
||||||
|
* Boeder Force Feedback Wheel
|
||||||
* Logitech WingMan Force
|
* Logitech WingMan Force
|
||||||
* Logitech WingMan Force Wheel
|
* Logitech WingMan Force Wheel
|
||||||
* Guillemot Race Leader Force Feedback
|
* Guillemot Race Leader Force Feedback
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -1,7 +1,7 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 19
|
PATCHLEVEL = 19
|
||||||
SUBLEVEL = 255
|
SUBLEVEL = 261
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = "People's Front"
|
NAME = "People's Front"
|
||||||
|
|
||||||
|
@ -995,6 +995,9 @@ LDFLAGS_BUILD_ID := $(call ld-option, --build-id)
|
||||||
KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID)
|
KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID)
|
||||||
LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID)
|
LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID)
|
||||||
|
|
||||||
|
KBUILD_LDFLAGS += -z noexecstack
|
||||||
|
KBUILD_LDFLAGS += $(call ld-option,--no-warn-rwx-segments)
|
||||||
|
|
||||||
ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
|
ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
|
||||||
LDFLAGS_vmlinux += $(call ld-option, -X,)
|
LDFLAGS_vmlinux += $(call ld-option, -X,)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "AST2500 EVB";
|
model = "AST2500 EVB";
|
||||||
compatible = "aspeed,ast2500";
|
compatible = "aspeed,ast2500-evb", "aspeed,ast2500";
|
||||||
|
|
||||||
aliases {
|
aliases {
|
||||||
serial4 = &uart5;
|
serial4 = &uart5;
|
||||||
|
|
|
@ -61,20 +61,18 @@
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
clock-latency = <61036>; /* two CLK32 periods */
|
clock-latency = <61036>; /* two CLK32 periods */
|
||||||
#cooling-cells = <2>;
|
#cooling-cells = <2>;
|
||||||
operating-points = <
|
operating-points =
|
||||||
/* kHz uV */
|
/* kHz uV */
|
||||||
696000 1275000
|
<696000 1275000>,
|
||||||
528000 1175000
|
<528000 1175000>,
|
||||||
396000 1025000
|
<396000 1025000>,
|
||||||
198000 950000
|
<198000 950000>;
|
||||||
>;
|
fsl,soc-operating-points =
|
||||||
fsl,soc-operating-points = <
|
|
||||||
/* KHz uV */
|
/* KHz uV */
|
||||||
696000 1275000
|
<696000 1275000>,
|
||||||
528000 1175000
|
<528000 1175000>,
|
||||||
396000 1175000
|
<396000 1175000>,
|
||||||
198000 1175000
|
<198000 1175000>;
|
||||||
>;
|
|
||||||
clocks = <&clks IMX6UL_CLK_ARM>,
|
clocks = <&clks IMX6UL_CLK_ARM>,
|
||||||
<&clks IMX6UL_CLK_PLL2_BUS>,
|
<&clks IMX6UL_CLK_PLL2_BUS>,
|
||||||
<&clks IMX6UL_CLK_PLL2_PFD2>,
|
<&clks IMX6UL_CLK_PLL2_PFD2>,
|
||||||
|
@ -169,6 +167,9 @@
|
||||||
ocram: sram@900000 {
|
ocram: sram@900000 {
|
||||||
compatible = "mmio-sram";
|
compatible = "mmio-sram";
|
||||||
reg = <0x00900000 0x20000>;
|
reg = <0x00900000 0x20000>;
|
||||||
|
ranges = <0 0x00900000 0x20000>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
};
|
};
|
||||||
|
|
||||||
dma_apbh: dma-apbh@1804000 {
|
dma_apbh: dma-apbh@1804000 {
|
||||||
|
@ -939,7 +940,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
lcdif: lcdif@21c8000 {
|
lcdif: lcdif@21c8000 {
|
||||||
compatible = "fsl,imx6ul-lcdif", "fsl,imx28-lcdif";
|
compatible = "fsl,imx6ul-lcdif", "fsl,imx6sx-lcdif";
|
||||||
reg = <0x021c8000 0x4000>;
|
reg = <0x021c8000 0x4000>;
|
||||||
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clks IMX6UL_CLK_LCDIF_PIX>,
|
clocks = <&clks IMX6UL_CLK_LCDIF_PIX>,
|
||||||
|
@ -952,7 +953,7 @@
|
||||||
qspi: qspi@21e0000 {
|
qspi: qspi@21e0000 {
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "fsl,imx6ul-qspi", "fsl,imx6sx-qspi";
|
compatible = "fsl,imx6ul-qspi";
|
||||||
reg = <0x021e0000 0x4000>, <0x60000000 0x10000000>;
|
reg = <0x021e0000 0x4000>, <0x60000000 0x10000000>;
|
||||||
reg-names = "QuadSPI", "QuadSPI-memory";
|
reg-names = "QuadSPI", "QuadSPI-memory";
|
||||||
interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
|
|
@ -155,6 +155,7 @@
|
||||||
|
|
||||||
pci: pciv3@62000000 {
|
pci: pciv3@62000000 {
|
||||||
compatible = "arm,integrator-ap-pci", "v3,v360epc-pci";
|
compatible = "arm,integrator-ap-pci", "v3,v360epc-pci";
|
||||||
|
device_type = "pci";
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
#size-cells = <2>;
|
#size-cells = <2>;
|
||||||
#address-cells = <3>;
|
#address-cells = <3>;
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
compatible = "qcom,spmi-temp-alarm";
|
compatible = "qcom,spmi-temp-alarm";
|
||||||
reg = <0x2400>;
|
reg = <0x2400>;
|
||||||
interrupts = <4 0x24 0 IRQ_TYPE_EDGE_RISING>;
|
interrupts = <4 0x24 0 IRQ_TYPE_EDGE_RISING>;
|
||||||
|
#thermal-sensor-cells = <0>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,8 @@ ENDPROC(_find_first_zero_bit_le)
|
||||||
* Prototype: int find_next_zero_bit(void *addr, unsigned int maxbit, int offset)
|
* Prototype: int find_next_zero_bit(void *addr, unsigned int maxbit, int offset)
|
||||||
*/
|
*/
|
||||||
ENTRY(_find_next_zero_bit_le)
|
ENTRY(_find_next_zero_bit_le)
|
||||||
teq r1, #0
|
cmp r2, r1
|
||||||
beq 3b
|
bhs 3b
|
||||||
ands ip, r2, #7
|
ands ip, r2, #7
|
||||||
beq 1b @ If new byte, goto old routine
|
beq 1b @ If new byte, goto old routine
|
||||||
ARM( ldrb r3, [r0, r2, lsr #3] )
|
ARM( ldrb r3, [r0, r2, lsr #3] )
|
||||||
|
@ -84,8 +84,8 @@ ENDPROC(_find_first_bit_le)
|
||||||
* Prototype: int find_next_zero_bit(void *addr, unsigned int maxbit, int offset)
|
* Prototype: int find_next_zero_bit(void *addr, unsigned int maxbit, int offset)
|
||||||
*/
|
*/
|
||||||
ENTRY(_find_next_bit_le)
|
ENTRY(_find_next_bit_le)
|
||||||
teq r1, #0
|
cmp r2, r1
|
||||||
beq 3b
|
bhs 3b
|
||||||
ands ip, r2, #7
|
ands ip, r2, #7
|
||||||
beq 1b @ If new byte, goto old routine
|
beq 1b @ If new byte, goto old routine
|
||||||
ARM( ldrb r3, [r0, r2, lsr #3] )
|
ARM( ldrb r3, [r0, r2, lsr #3] )
|
||||||
|
@ -118,8 +118,8 @@ ENTRY(_find_first_zero_bit_be)
|
||||||
ENDPROC(_find_first_zero_bit_be)
|
ENDPROC(_find_first_zero_bit_be)
|
||||||
|
|
||||||
ENTRY(_find_next_zero_bit_be)
|
ENTRY(_find_next_zero_bit_be)
|
||||||
teq r1, #0
|
cmp r2, r1
|
||||||
beq 3b
|
bhs 3b
|
||||||
ands ip, r2, #7
|
ands ip, r2, #7
|
||||||
beq 1b @ If new byte, goto old routine
|
beq 1b @ If new byte, goto old routine
|
||||||
eor r3, r2, #0x18 @ big endian byte ordering
|
eor r3, r2, #0x18 @ big endian byte ordering
|
||||||
|
@ -152,8 +152,8 @@ ENTRY(_find_first_bit_be)
|
||||||
ENDPROC(_find_first_bit_be)
|
ENDPROC(_find_first_bit_be)
|
||||||
|
|
||||||
ENTRY(_find_next_bit_be)
|
ENTRY(_find_next_bit_be)
|
||||||
teq r1, #0
|
cmp r2, r1
|
||||||
beq 3b
|
bhs 3b
|
||||||
ands ip, r2, #7
|
ands ip, r2, #7
|
||||||
beq 1b @ If new byte, goto old routine
|
beq 1b @ If new byte, goto old routine
|
||||||
eor r3, r2, #0x18 @ big endian byte ordering
|
eor r3, r2, #0x18 @ big endian byte ordering
|
||||||
|
|
|
@ -54,6 +54,7 @@ int __init bcm_kona_smc_init(void)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
prop_val = of_get_address(node, 0, &prop_size, NULL);
|
prop_val = of_get_address(node, 0, &prop_size, NULL);
|
||||||
|
of_node_put(node);
|
||||||
if (!prop_val)
|
if (!prop_val)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
|
|
@ -211,6 +211,7 @@ static int __init omapdss_init_fbdev(void)
|
||||||
node = of_find_node_by_name(NULL, "omap4_padconf_global");
|
node = of_find_node_by_name(NULL, "omap4_padconf_global");
|
||||||
if (node)
|
if (node)
|
||||||
omap4_dsi_mux_syscon = syscon_node_to_regmap(node);
|
omap4_dsi_mux_syscon = syscon_node_to_regmap(node);
|
||||||
|
of_node_put(node);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -711,6 +711,7 @@ static int omap3xxx_prm_late_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
irq_num = of_irq_get(np, 0);
|
irq_num = of_irq_get(np, 0);
|
||||||
|
of_node_put(np);
|
||||||
if (irq_num == -EPROBE_DEFER)
|
if (irq_num == -EPROBE_DEFER)
|
||||||
return irq_num;
|
return irq_num;
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,7 @@ static int __init zynq_get_revision(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
zynq_devcfg_base = of_iomap(np, 0);
|
zynq_devcfg_base = of_iomap(np, 0);
|
||||||
|
of_node_put(np);
|
||||||
if (!zynq_devcfg_base) {
|
if (!zynq_devcfg_base) {
|
||||||
pr_err("%s: Unable to map I/O memory\n", __func__);
|
pr_err("%s: Unable to map I/O memory\n", __func__);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -261,7 +261,7 @@
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
qpic_nand: nand@79b0000 {
|
qpic_nand: nand-controller@79b0000 {
|
||||||
compatible = "qcom,ipq8074-nand";
|
compatible = "qcom,ipq8074-nand";
|
||||||
reg = <0x79b0000 0x10000>;
|
reg = <0x79b0000 0x10000>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
|
|
@ -1039,8 +1039,8 @@
|
||||||
vddmx-supply = <&pm8916_l3>;
|
vddmx-supply = <&pm8916_l3>;
|
||||||
vddpx-supply = <&pm8916_l7>;
|
vddpx-supply = <&pm8916_l7>;
|
||||||
|
|
||||||
qcom,state = <&wcnss_smp2p_out 0>;
|
qcom,smem-states = <&wcnss_smp2p_out 0>;
|
||||||
qcom,state-names = "stop";
|
qcom,smem-state-names = "stop";
|
||||||
|
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&wcnss_pin_a>;
|
pinctrl-0 = <&wcnss_pin_a>;
|
||||||
|
|
|
@ -232,6 +232,14 @@
|
||||||
&edp {
|
&edp {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* eDP PHY/clk don't sync reliably at anything other than 24 MHz. Only
|
||||||
|
* set this here, because rk3399-gru.dtsi ensures we can generate this
|
||||||
|
* off GPLL=600MHz, whereas some other RK3399 boards may not.
|
||||||
|
*/
|
||||||
|
assigned-clocks = <&cru PCLK_EDP>;
|
||||||
|
assigned-clock-rates = <24000000>;
|
||||||
|
|
||||||
ports {
|
ports {
|
||||||
edp_out: port@1 {
|
edp_out: port@1 {
|
||||||
reg = <1>;
|
reg = <1>;
|
||||||
|
|
|
@ -102,7 +102,6 @@
|
||||||
vcc5v0_host: vcc5v0-host-regulator {
|
vcc5v0_host: vcc5v0-host-regulator {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_LOW>;
|
gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_LOW>;
|
||||||
enable-active-low;
|
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&vcc5v0_host_en>;
|
pinctrl-0 = <&vcc5v0_host_en>;
|
||||||
regulator-name = "vcc5v0_host";
|
regulator-name = "vcc5v0_host";
|
||||||
|
|
|
@ -177,8 +177,9 @@ void tls_preserve_current_state(void);
|
||||||
|
|
||||||
static inline void start_thread_common(struct pt_regs *regs, unsigned long pc)
|
static inline void start_thread_common(struct pt_regs *regs, unsigned long pc)
|
||||||
{
|
{
|
||||||
|
s32 previous_syscall = regs->syscallno;
|
||||||
memset(regs, 0, sizeof(*regs));
|
memset(regs, 0, sizeof(*regs));
|
||||||
forget_syscall(regs);
|
regs->syscallno = previous_syscall;
|
||||||
regs->pc = pc;
|
regs->pc = pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,8 @@ static void ci_leaf_init(struct cacheinfo *this_leaf,
|
||||||
|
|
||||||
int init_cache_level(unsigned int cpu)
|
int init_cache_level(unsigned int cpu)
|
||||||
{
|
{
|
||||||
unsigned int ctype, level, leaves, fw_level;
|
unsigned int ctype, level, leaves;
|
||||||
|
int fw_level;
|
||||||
struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu);
|
struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu);
|
||||||
|
|
||||||
for (level = 1, leaves = 0; level <= MAX_CACHE_LEVEL; level++) {
|
for (level = 1, leaves = 0; level <= MAX_CACHE_LEVEL; level++) {
|
||||||
|
@ -65,6 +66,9 @@ int init_cache_level(unsigned int cpu)
|
||||||
else
|
else
|
||||||
fw_level = acpi_find_last_cache_level(cpu);
|
fw_level = acpi_find_last_cache_level(cpu);
|
||||||
|
|
||||||
|
if (fw_level < 0)
|
||||||
|
return fw_level;
|
||||||
|
|
||||||
if (level < fw_level) {
|
if (level < fw_level) {
|
||||||
/*
|
/*
|
||||||
* some external caches not specified in CLIDR_EL1
|
* some external caches not specified in CLIDR_EL1
|
||||||
|
|
|
@ -1376,11 +1376,6 @@ void *__init fixmap_remap_fdt(phys_addr_t dt_phys, int *size, pgprot_t prot)
|
||||||
return dt_virt;
|
return dt_virt;
|
||||||
}
|
}
|
||||||
|
|
||||||
int __init arch_ioremap_p4d_supported(void)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int __init arch_ioremap_pud_supported(void)
|
int __init arch_ioremap_pud_supported(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -552,7 +552,7 @@ ia64_get_irr(unsigned int vector)
|
||||||
{
|
{
|
||||||
unsigned int reg = vector / 64;
|
unsigned int reg = vector / 64;
|
||||||
unsigned int bit = vector % 64;
|
unsigned int bit = vector % 64;
|
||||||
u64 irr;
|
unsigned long irr;
|
||||||
|
|
||||||
switch (reg) {
|
switch (reg) {
|
||||||
case 0: irr = ia64_getreg(_IA64_REG_CR_IRR0); break;
|
case 0: irr = ia64_getreg(_IA64_REG_CR_IRR0); break;
|
||||||
|
|
|
@ -127,6 +127,16 @@ static void octeon_irq_free_cd(struct irq_domain *d, unsigned int irq)
|
||||||
static int octeon_irq_force_ciu_mapping(struct irq_domain *domain,
|
static int octeon_irq_force_ciu_mapping(struct irq_domain *domain,
|
||||||
int irq, int line, int bit)
|
int irq, int line, int bit)
|
||||||
{
|
{
|
||||||
|
struct device_node *of_node;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
of_node = irq_domain_get_of_node(domain);
|
||||||
|
if (!of_node)
|
||||||
|
return -EINVAL;
|
||||||
|
ret = irq_alloc_desc_at(irq, of_node_to_nid(of_node));
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
return irq_domain_associate(domain, irq, line << 6 | bit);
|
return irq_domain_associate(domain, irq, line << 6 | bit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,11 +86,12 @@ static void octeon2_usb_clocks_start(struct device *dev)
|
||||||
"refclk-frequency", &clock_rate);
|
"refclk-frequency", &clock_rate);
|
||||||
if (i) {
|
if (i) {
|
||||||
dev_err(dev, "No UCTL \"refclk-frequency\"\n");
|
dev_err(dev, "No UCTL \"refclk-frequency\"\n");
|
||||||
|
of_node_put(uctl_node);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
i = of_property_read_string(uctl_node,
|
i = of_property_read_string(uctl_node,
|
||||||
"refclk-type", &clock_type);
|
"refclk-type", &clock_type);
|
||||||
|
of_node_put(uctl_node);
|
||||||
if (!i && strcmp("crystal", clock_type) == 0)
|
if (!i && strcmp("crystal", clock_type) == 0)
|
||||||
is_crystal_clock = true;
|
is_crystal_clock = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,7 +168,7 @@ static void *c_start(struct seq_file *m, loff_t *pos)
|
||||||
{
|
{
|
||||||
unsigned long i = *pos;
|
unsigned long i = *pos;
|
||||||
|
|
||||||
return i < NR_CPUS ? (void *) (i + 1) : NULL;
|
return i < nr_cpu_ids ? (void *) (i + 1) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *c_next(struct seq_file *m, void *v, loff_t *pos)
|
static void *c_next(struct seq_file *m, void *v, loff_t *pos)
|
||||||
|
|
|
@ -52,6 +52,7 @@ struct clk *clk_get_io(void)
|
||||||
{
|
{
|
||||||
return &cpu_clk_generic[2];
|
return &cpu_clk_generic[2];
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(clk_get_io);
|
||||||
|
|
||||||
struct clk *clk_get_ppe(void)
|
struct clk *clk_get_ppe(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,6 @@ static struct platform_device *ls1c_platform_devices[] __initdata = {
|
||||||
static int __init ls1c_platform_init(void)
|
static int __init ls1c_platform_init(void)
|
||||||
{
|
{
|
||||||
ls1x_serial_set_uartclk(&ls1x_uart_pdev);
|
ls1x_serial_set_uartclk(&ls1x_uart_pdev);
|
||||||
ls1x_rtc_set_extclk(&ls1x_rtc_pdev);
|
|
||||||
|
|
||||||
return platform_add_devices(ls1c_platform_devices,
|
return platform_add_devices(ls1c_platform_devices,
|
||||||
ARRAY_SIZE(ls1c_platform_devices));
|
ARRAY_SIZE(ls1c_platform_devices));
|
||||||
|
|
|
@ -630,7 +630,7 @@ static __maybe_unused void build_convert_pte_to_entrylo(u32 **p,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cpu_has_rixi && !!_PAGE_NO_EXEC) {
|
if (cpu_has_rixi && _PAGE_NO_EXEC != 0) {
|
||||||
if (fill_includes_sw_bits) {
|
if (fill_includes_sw_bits) {
|
||||||
UASM_i_ROTR(p, reg, reg, ilog2(_PAGE_GLOBAL));
|
UASM_i_ROTR(p, reg, reg, ilog2(_PAGE_GLOBAL));
|
||||||
} else {
|
} else {
|
||||||
|
@ -2559,7 +2559,7 @@ static void check_pabits(void)
|
||||||
unsigned long entry;
|
unsigned long entry;
|
||||||
unsigned pabits, fillbits;
|
unsigned pabits, fillbits;
|
||||||
|
|
||||||
if (!cpu_has_rixi || !_PAGE_NO_EXEC) {
|
if (!cpu_has_rixi || _PAGE_NO_EXEC == 0) {
|
||||||
/*
|
/*
|
||||||
* We'll only be making use of the fact that we can rotate bits
|
* We'll only be making use of the fact that we can rotate bits
|
||||||
* into the fill if the CPU supports RIXI, so don't bother
|
* into the fill if the CPU supports RIXI, so don't bother
|
||||||
|
|
|
@ -50,7 +50,8 @@
|
||||||
stw r13, PT_R13(sp)
|
stw r13, PT_R13(sp)
|
||||||
stw r14, PT_R14(sp)
|
stw r14, PT_R14(sp)
|
||||||
stw r15, PT_R15(sp)
|
stw r15, PT_R15(sp)
|
||||||
stw r2, PT_ORIG_R2(sp)
|
movi r24, -1
|
||||||
|
stw r24, PT_ORIG_R2(sp)
|
||||||
stw r7, PT_ORIG_R7(sp)
|
stw r7, PT_ORIG_R7(sp)
|
||||||
|
|
||||||
stw ra, PT_RA(sp)
|
stw ra, PT_RA(sp)
|
||||||
|
|
|
@ -74,6 +74,8 @@ extern void show_regs(struct pt_regs *);
|
||||||
((struct pt_regs *)((unsigned long)current_thread_info() + THREAD_SIZE)\
|
((struct pt_regs *)((unsigned long)current_thread_info() + THREAD_SIZE)\
|
||||||
- 1)
|
- 1)
|
||||||
|
|
||||||
|
#define force_successful_syscall_return() (current_pt_regs()->orig_r2 = -1)
|
||||||
|
|
||||||
int do_syscall_trace_enter(void);
|
int do_syscall_trace_enter(void);
|
||||||
void do_syscall_trace_exit(void);
|
void do_syscall_trace_exit(void);
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
|
@ -185,6 +185,7 @@ ENTRY(handle_system_call)
|
||||||
ldw r5, PT_R5(sp)
|
ldw r5, PT_R5(sp)
|
||||||
|
|
||||||
local_restart:
|
local_restart:
|
||||||
|
stw r2, PT_ORIG_R2(sp)
|
||||||
/* Check that the requested system call is within limits */
|
/* Check that the requested system call is within limits */
|
||||||
movui r1, __NR_syscalls
|
movui r1, __NR_syscalls
|
||||||
bgeu r2, r1, ret_invsyscall
|
bgeu r2, r1, ret_invsyscall
|
||||||
|
@ -192,7 +193,6 @@ local_restart:
|
||||||
movhi r11, %hiadj(sys_call_table)
|
movhi r11, %hiadj(sys_call_table)
|
||||||
add r1, r1, r11
|
add r1, r1, r11
|
||||||
ldw r1, %lo(sys_call_table)(r1)
|
ldw r1, %lo(sys_call_table)(r1)
|
||||||
beq r1, r0, ret_invsyscall
|
|
||||||
|
|
||||||
/* Check if we are being traced */
|
/* Check if we are being traced */
|
||||||
GET_THREAD_INFO r11
|
GET_THREAD_INFO r11
|
||||||
|
@ -213,6 +213,9 @@ local_restart:
|
||||||
translate_rc_and_ret:
|
translate_rc_and_ret:
|
||||||
movi r1, 0
|
movi r1, 0
|
||||||
bge r2, zero, 3f
|
bge r2, zero, 3f
|
||||||
|
ldw r1, PT_ORIG_R2(sp)
|
||||||
|
addi r1, r1, 1
|
||||||
|
beq r1, zero, 3f
|
||||||
sub r2, zero, r2
|
sub r2, zero, r2
|
||||||
movi r1, 1
|
movi r1, 1
|
||||||
3:
|
3:
|
||||||
|
@ -255,9 +258,9 @@ traced_system_call:
|
||||||
ldw r6, PT_R6(sp)
|
ldw r6, PT_R6(sp)
|
||||||
ldw r7, PT_R7(sp)
|
ldw r7, PT_R7(sp)
|
||||||
|
|
||||||
/* Fetch the syscall function, we don't need to check the boundaries
|
/* Fetch the syscall function. */
|
||||||
* since this is already done.
|
movui r1, __NR_syscalls
|
||||||
*/
|
bgeu r2, r1, traced_invsyscall
|
||||||
slli r1, r2, 2
|
slli r1, r2, 2
|
||||||
movhi r11,%hiadj(sys_call_table)
|
movhi r11,%hiadj(sys_call_table)
|
||||||
add r1, r1, r11
|
add r1, r1, r11
|
||||||
|
@ -276,6 +279,9 @@ traced_system_call:
|
||||||
translate_rc_and_ret2:
|
translate_rc_and_ret2:
|
||||||
movi r1, 0
|
movi r1, 0
|
||||||
bge r2, zero, 4f
|
bge r2, zero, 4f
|
||||||
|
ldw r1, PT_ORIG_R2(sp)
|
||||||
|
addi r1, r1, 1
|
||||||
|
beq r1, zero, 4f
|
||||||
sub r2, zero, r2
|
sub r2, zero, r2
|
||||||
movi r1, 1
|
movi r1, 1
|
||||||
4:
|
4:
|
||||||
|
@ -287,6 +293,11 @@ end_translate_rc_and_ret2:
|
||||||
RESTORE_SWITCH_STACK
|
RESTORE_SWITCH_STACK
|
||||||
br ret_from_exception
|
br ret_from_exception
|
||||||
|
|
||||||
|
/* If the syscall number was invalid return ENOSYS */
|
||||||
|
traced_invsyscall:
|
||||||
|
movi r2, -ENOSYS
|
||||||
|
br translate_rc_and_ret2
|
||||||
|
|
||||||
Luser_return:
|
Luser_return:
|
||||||
GET_THREAD_INFO r11 /* get thread_info pointer */
|
GET_THREAD_INFO r11 /* get thread_info pointer */
|
||||||
ldw r10, TI_FLAGS(r11) /* get thread_info->flags */
|
ldw r10, TI_FLAGS(r11) /* get thread_info->flags */
|
||||||
|
@ -336,9 +347,6 @@ external_interrupt:
|
||||||
/* skip if no interrupt is pending */
|
/* skip if no interrupt is pending */
|
||||||
beq r12, r0, ret_from_interrupt
|
beq r12, r0, ret_from_interrupt
|
||||||
|
|
||||||
movi r24, -1
|
|
||||||
stw r24, PT_ORIG_R2(sp)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Process an external hardware interrupt.
|
* Process an external hardware interrupt.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -240,7 +240,7 @@ static int do_signal(struct pt_regs *regs)
|
||||||
/*
|
/*
|
||||||
* If we were from a system call, check for system call restarting...
|
* If we were from a system call, check for system call restarting...
|
||||||
*/
|
*/
|
||||||
if (regs->orig_r2 >= 0) {
|
if (regs->orig_r2 >= 0 && regs->r1) {
|
||||||
continue_addr = regs->ea;
|
continue_addr = regs->ea;
|
||||||
restart_addr = continue_addr - 4;
|
restart_addr = continue_addr - 4;
|
||||||
retval = regs->r2;
|
retval = regs->r2;
|
||||||
|
@ -261,6 +261,7 @@ static int do_signal(struct pt_regs *regs)
|
||||||
regs->ea = restart_addr;
|
regs->ea = restart_addr;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
regs->orig_r2 = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (get_signal(&ksig)) {
|
if (get_signal(&ksig)) {
|
||||||
|
|
|
@ -25,5 +25,6 @@
|
||||||
#define __SYSCALL(nr, call) [nr] = (call),
|
#define __SYSCALL(nr, call) [nr] = (call),
|
||||||
|
|
||||||
void *sys_call_table[__NR_syscalls] = {
|
void *sys_call_table[__NR_syscalls] = {
|
||||||
|
[0 ... __NR_syscalls-1] = sys_ni_syscall,
|
||||||
#include <asm/unistd.h>
|
#include <asm/unistd.h>
|
||||||
};
|
};
|
||||||
|
|
|
@ -499,7 +499,6 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path)
|
||||||
dev->id.hversion_rev = iodc_data[1] & 0x0f;
|
dev->id.hversion_rev = iodc_data[1] & 0x0f;
|
||||||
dev->id.sversion = ((iodc_data[4] & 0x0f) << 16) |
|
dev->id.sversion = ((iodc_data[4] & 0x0f) << 16) |
|
||||||
(iodc_data[5] << 8) | iodc_data[6];
|
(iodc_data[5] << 8) | iodc_data[6];
|
||||||
dev->hpa.name = parisc_pathname(dev);
|
|
||||||
dev->hpa.start = hpa;
|
dev->hpa.start = hpa;
|
||||||
/* This is awkward. The STI spec says that gfx devices may occupy
|
/* This is awkward. The STI spec says that gfx devices may occupy
|
||||||
* 32MB or 64MB. Unfortunately, we don't know how to tell whether
|
* 32MB or 64MB. Unfortunately, we don't know how to tell whether
|
||||||
|
@ -513,10 +512,10 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path)
|
||||||
dev->hpa.end = hpa + 0xfff;
|
dev->hpa.end = hpa + 0xfff;
|
||||||
}
|
}
|
||||||
dev->hpa.flags = IORESOURCE_MEM;
|
dev->hpa.flags = IORESOURCE_MEM;
|
||||||
name = parisc_hardware_description(&dev->id);
|
dev->hpa.name = dev->name;
|
||||||
if (name) {
|
name = parisc_hardware_description(&dev->id) ? : "unknown";
|
||||||
strlcpy(dev->name, name, sizeof(dev->name));
|
snprintf(dev->name, sizeof(dev->name), "%s [%s]",
|
||||||
}
|
name, parisc_pathname(dev));
|
||||||
|
|
||||||
/* Silently fail things like mouse ports which are subsumed within
|
/* Silently fail things like mouse ports which are subsumed within
|
||||||
* the keyboard controller
|
* the keyboard controller
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include <linux/linkage.h>
|
#include <linux/linkage.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
|
||||||
.level PA_ASM_LEVEL
|
.level 1.1
|
||||||
|
|
||||||
__INITDATA
|
__INITDATA
|
||||||
ENTRY(boot_args)
|
ENTRY(boot_args)
|
||||||
|
@ -69,6 +69,47 @@ $bss_loop:
|
||||||
stw,ma %arg2,4(%r1)
|
stw,ma %arg2,4(%r1)
|
||||||
stw,ma %arg3,4(%r1)
|
stw,ma %arg3,4(%r1)
|
||||||
|
|
||||||
|
#if !defined(CONFIG_64BIT) && defined(CONFIG_PA20)
|
||||||
|
/* This 32-bit kernel was compiled for PA2.0 CPUs. Check current CPU
|
||||||
|
* and halt kernel if we detect a PA1.x CPU. */
|
||||||
|
ldi 32,%r10
|
||||||
|
mtctl %r10,%cr11
|
||||||
|
.level 2.0
|
||||||
|
mfctl,w %cr11,%r10
|
||||||
|
.level 1.1
|
||||||
|
comib,<>,n 0,%r10,$cpu_ok
|
||||||
|
|
||||||
|
load32 PA(msg1),%arg0
|
||||||
|
ldi msg1_end-msg1,%arg1
|
||||||
|
$iodc_panic:
|
||||||
|
copy %arg0, %r10
|
||||||
|
copy %arg1, %r11
|
||||||
|
load32 PA(init_stack),%sp
|
||||||
|
#define MEM_CONS 0x3A0
|
||||||
|
ldw MEM_CONS+32(%r0),%arg0 // HPA
|
||||||
|
ldi ENTRY_IO_COUT,%arg1
|
||||||
|
ldw MEM_CONS+36(%r0),%arg2 // SPA
|
||||||
|
ldw MEM_CONS+8(%r0),%arg3 // layers
|
||||||
|
load32 PA(__bss_start),%r1
|
||||||
|
stw %r1,-52(%sp) // arg4
|
||||||
|
stw %r0,-56(%sp) // arg5
|
||||||
|
stw %r10,-60(%sp) // arg6 = ptr to text
|
||||||
|
stw %r11,-64(%sp) // arg7 = len
|
||||||
|
stw %r0,-68(%sp) // arg8
|
||||||
|
load32 PA(.iodc_panic_ret), %rp
|
||||||
|
ldw MEM_CONS+40(%r0),%r1 // ENTRY_IODC
|
||||||
|
bv,n (%r1)
|
||||||
|
.iodc_panic_ret:
|
||||||
|
b . /* wait endless with ... */
|
||||||
|
or %r10,%r10,%r10 /* qemu idle sleep */
|
||||||
|
msg1: .ascii "Can't boot kernel which was built for PA8x00 CPUs on this machine.\r\n"
|
||||||
|
msg1_end:
|
||||||
|
|
||||||
|
$cpu_ok:
|
||||||
|
#endif
|
||||||
|
|
||||||
|
.level PA_ASM_LEVEL
|
||||||
|
|
||||||
/* Initialize startup VM. Just map first 16/32 MB of memory */
|
/* Initialize startup VM. Just map first 16/32 MB of memory */
|
||||||
load32 PA(swapper_pg_dir),%r4
|
load32 PA(swapper_pg_dir),%r4
|
||||||
mtctl %r4,%cr24 /* Initialize kernel root pointer */
|
mtctl %r4,%cr24 /* Initialize kernel root pointer */
|
||||||
|
|
|
@ -121,7 +121,7 @@
|
||||||
#define R1(i) (((i)>>21)&0x1f)
|
#define R1(i) (((i)>>21)&0x1f)
|
||||||
#define R2(i) (((i)>>16)&0x1f)
|
#define R2(i) (((i)>>16)&0x1f)
|
||||||
#define R3(i) ((i)&0x1f)
|
#define R3(i) ((i)&0x1f)
|
||||||
#define FR3(i) ((((i)<<1)&0x1f)|(((i)>>6)&1))
|
#define FR3(i) ((((i)&0x1f)<<1)|(((i)>>6)&1))
|
||||||
#define IM(i,n) (((i)>>1&((1<<(n-1))-1))|((i)&1?((0-1L)<<(n-1)):0))
|
#define IM(i,n) (((i)>>1&((1<<(n-1))-1))|((i)&1?((0-1L)<<(n-1)):0))
|
||||||
#define IM5_2(i) IM((i)>>16,5)
|
#define IM5_2(i) IM((i)>>16,5)
|
||||||
#define IM5_3(i) IM((i),5)
|
#define IM5_3(i) IM((i),5)
|
||||||
|
|
|
@ -75,23 +75,35 @@ const struct dma_map_ops *get_pci_dma_ops(void)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(get_pci_dma_ops);
|
EXPORT_SYMBOL(get_pci_dma_ops);
|
||||||
|
|
||||||
/*
|
|
||||||
* This function should run under locking protection, specifically
|
|
||||||
* hose_spinlock.
|
|
||||||
*/
|
|
||||||
static int get_phb_number(struct device_node *dn)
|
static int get_phb_number(struct device_node *dn)
|
||||||
{
|
{
|
||||||
int ret, phb_id = -1;
|
int ret, phb_id = -1;
|
||||||
u32 prop_32;
|
|
||||||
u64 prop;
|
u64 prop;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Try fixed PHB numbering first, by checking archs and reading
|
* Try fixed PHB numbering first, by checking archs and reading
|
||||||
* the respective device-tree properties. Firstly, try powernv by
|
* the respective device-tree properties. Firstly, try reading
|
||||||
* reading "ibm,opal-phbid", only present in OPAL environment.
|
* standard "linux,pci-domain", then try reading "ibm,opal-phbid"
|
||||||
|
* (only present in powernv OPAL environment), then try device-tree
|
||||||
|
* alias and as the last try to use lower bits of "reg" property.
|
||||||
*/
|
*/
|
||||||
|
ret = of_get_pci_domain_nr(dn);
|
||||||
|
if (ret >= 0) {
|
||||||
|
prop = ret;
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
|
if (ret)
|
||||||
ret = of_property_read_u64(dn, "ibm,opal-phbid", &prop);
|
ret = of_property_read_u64(dn, "ibm,opal-phbid", &prop);
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
ret = of_alias_get_id(dn, "pci");
|
||||||
|
if (ret >= 0) {
|
||||||
|
prop = ret;
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ret) {
|
||||||
|
u32 prop_32;
|
||||||
ret = of_property_read_u32_index(dn, "reg", 1, &prop_32);
|
ret = of_property_read_u32_index(dn, "reg", 1, &prop_32);
|
||||||
prop = prop_32;
|
prop = prop_32;
|
||||||
}
|
}
|
||||||
|
@ -99,18 +111,20 @@ static int get_phb_number(struct device_node *dn)
|
||||||
if (!ret)
|
if (!ret)
|
||||||
phb_id = (int)(prop & (MAX_PHBS - 1));
|
phb_id = (int)(prop & (MAX_PHBS - 1));
|
||||||
|
|
||||||
|
spin_lock(&hose_spinlock);
|
||||||
|
|
||||||
/* We need to be sure to not use the same PHB number twice. */
|
/* We need to be sure to not use the same PHB number twice. */
|
||||||
if ((phb_id >= 0) && !test_and_set_bit(phb_id, phb_bitmap))
|
if ((phb_id >= 0) && !test_and_set_bit(phb_id, phb_bitmap))
|
||||||
return phb_id;
|
goto out_unlock;
|
||||||
|
|
||||||
/*
|
/* If everything fails then fallback to dynamic PHB numbering. */
|
||||||
* If not pseries nor powernv, or if fixed PHB numbering tried to add
|
|
||||||
* the same PHB number twice, then fallback to dynamic PHB numbering.
|
|
||||||
*/
|
|
||||||
phb_id = find_first_zero_bit(phb_bitmap, MAX_PHBS);
|
phb_id = find_first_zero_bit(phb_bitmap, MAX_PHBS);
|
||||||
BUG_ON(phb_id >= MAX_PHBS);
|
BUG_ON(phb_id >= MAX_PHBS);
|
||||||
set_bit(phb_id, phb_bitmap);
|
set_bit(phb_id, phb_bitmap);
|
||||||
|
|
||||||
|
out_unlock:
|
||||||
|
spin_unlock(&hose_spinlock);
|
||||||
|
|
||||||
return phb_id;
|
return phb_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,10 +135,13 @@ struct pci_controller *pcibios_alloc_controller(struct device_node *dev)
|
||||||
phb = zalloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL);
|
phb = zalloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL);
|
||||||
if (phb == NULL)
|
if (phb == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
spin_lock(&hose_spinlock);
|
|
||||||
phb->global_number = get_phb_number(dev);
|
phb->global_number = get_phb_number(dev);
|
||||||
|
|
||||||
|
spin_lock(&hose_spinlock);
|
||||||
list_add_tail(&phb->list_node, &hose_list);
|
list_add_tail(&phb->list_node, &hose_list);
|
||||||
spin_unlock(&hose_spinlock);
|
spin_unlock(&hose_spinlock);
|
||||||
|
|
||||||
phb->dn = dev;
|
phb->dn = dev;
|
||||||
phb->is_dynamic = slab_is_available();
|
phb->is_dynamic = slab_is_available();
|
||||||
#ifdef CONFIG_PPC64
|
#ifdef CONFIG_PPC64
|
||||||
|
|
|
@ -737,6 +737,13 @@ void __init early_init_devtree(void *params)
|
||||||
of_scan_flat_dt(early_init_dt_scan_root, NULL);
|
of_scan_flat_dt(early_init_dt_scan_root, NULL);
|
||||||
of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL);
|
of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* As generic code authors expect to be able to use static keys
|
||||||
|
* in early_param() handlers, we initialize the static keys just
|
||||||
|
* before parsing early params (it's fine to call jump_label_init()
|
||||||
|
* more than once).
|
||||||
|
*/
|
||||||
|
jump_label_init();
|
||||||
parse_early_param();
|
parse_early_param();
|
||||||
|
|
||||||
/* make sure we've parsed cmdline for mem= before this */
|
/* make sure we've parsed cmdline for mem= before this */
|
||||||
|
|
|
@ -43,5 +43,12 @@ obj-$(CONFIG_HIGHMEM) += highmem.o
|
||||||
obj-$(CONFIG_PPC_COPRO_BASE) += copro_fault.o
|
obj-$(CONFIG_PPC_COPRO_BASE) += copro_fault.o
|
||||||
obj-$(CONFIG_SPAPR_TCE_IOMMU) += mmu_context_iommu.o
|
obj-$(CONFIG_SPAPR_TCE_IOMMU) += mmu_context_iommu.o
|
||||||
obj-$(CONFIG_PPC_PTDUMP) += dump_linuxpagetables.o
|
obj-$(CONFIG_PPC_PTDUMP) += dump_linuxpagetables.o
|
||||||
|
ifdef CONFIG_PPC_PTDUMP
|
||||||
|
obj-$(CONFIG_4xx) += dump_linuxpagetables-generic.o
|
||||||
|
obj-$(CONFIG_PPC_8xx) += dump_linuxpagetables-8xx.o
|
||||||
|
obj-$(CONFIG_PPC_BOOK3E_MMU) += dump_linuxpagetables-generic.o
|
||||||
|
obj-$(CONFIG_PPC_BOOK3S_32) += dump_linuxpagetables-generic.o
|
||||||
|
obj-$(CONFIG_PPC_BOOK3S_64) += dump_linuxpagetables-book3s64.o
|
||||||
|
endif
|
||||||
obj-$(CONFIG_PPC_HTDUMP) += dump_hashpagetable.o
|
obj-$(CONFIG_PPC_HTDUMP) += dump_hashpagetable.o
|
||||||
obj-$(CONFIG_PPC_MEM_KEYS) += pkeys.o
|
obj-$(CONFIG_PPC_MEM_KEYS) += pkeys.o
|
||||||
|
|
82
arch/powerpc/mm/dump_linuxpagetables-8xx.c
Normal file
82
arch/powerpc/mm/dump_linuxpagetables-8xx.c
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
|
/*
|
||||||
|
* From split of dump_linuxpagetables.c
|
||||||
|
* Copyright 2016, Rashmica Gupta, IBM Corp.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <asm/pgtable.h>
|
||||||
|
|
||||||
|
#include "dump_linuxpagetables.h"
|
||||||
|
|
||||||
|
static const struct flag_info flag_array[] = {
|
||||||
|
{
|
||||||
|
.mask = _PAGE_PRIVILEGED,
|
||||||
|
.val = 0,
|
||||||
|
.set = "user",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_RO | _PAGE_NA,
|
||||||
|
.val = 0,
|
||||||
|
.set = "rw",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_RO | _PAGE_NA,
|
||||||
|
.val = _PAGE_RO,
|
||||||
|
.set = "r ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_RO | _PAGE_NA,
|
||||||
|
.val = _PAGE_NA,
|
||||||
|
.set = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_EXEC,
|
||||||
|
.val = _PAGE_EXEC,
|
||||||
|
.set = " X ",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_PRESENT,
|
||||||
|
.val = _PAGE_PRESENT,
|
||||||
|
.set = "present",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_GUARDED,
|
||||||
|
.val = _PAGE_GUARDED,
|
||||||
|
.set = "guarded",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_DIRTY,
|
||||||
|
.val = _PAGE_DIRTY,
|
||||||
|
.set = "dirty",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_ACCESSED,
|
||||||
|
.val = _PAGE_ACCESSED,
|
||||||
|
.set = "accessed",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_NO_CACHE,
|
||||||
|
.val = _PAGE_NO_CACHE,
|
||||||
|
.set = "no cache",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_SPECIAL,
|
||||||
|
.val = _PAGE_SPECIAL,
|
||||||
|
.set = "special",
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct pgtable_level pg_level[5] = {
|
||||||
|
{
|
||||||
|
}, { /* pgd */
|
||||||
|
.flag = flag_array,
|
||||||
|
.num = ARRAY_SIZE(flag_array),
|
||||||
|
}, { /* pud */
|
||||||
|
.flag = flag_array,
|
||||||
|
.num = ARRAY_SIZE(flag_array),
|
||||||
|
}, { /* pmd */
|
||||||
|
.flag = flag_array,
|
||||||
|
.num = ARRAY_SIZE(flag_array),
|
||||||
|
}, { /* pte */
|
||||||
|
.flag = flag_array,
|
||||||
|
.num = ARRAY_SIZE(flag_array),
|
||||||
|
},
|
||||||
|
};
|
115
arch/powerpc/mm/dump_linuxpagetables-book3s64.c
Normal file
115
arch/powerpc/mm/dump_linuxpagetables-book3s64.c
Normal file
|
@ -0,0 +1,115 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
|
/*
|
||||||
|
* From split of dump_linuxpagetables.c
|
||||||
|
* Copyright 2016, Rashmica Gupta, IBM Corp.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <asm/pgtable.h>
|
||||||
|
|
||||||
|
#include "dump_linuxpagetables.h"
|
||||||
|
|
||||||
|
static const struct flag_info flag_array[] = {
|
||||||
|
{
|
||||||
|
.mask = _PAGE_PRIVILEGED,
|
||||||
|
.val = 0,
|
||||||
|
.set = "user",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_READ,
|
||||||
|
.val = _PAGE_READ,
|
||||||
|
.set = "r",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_WRITE,
|
||||||
|
.val = _PAGE_WRITE,
|
||||||
|
.set = "w",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_EXEC,
|
||||||
|
.val = _PAGE_EXEC,
|
||||||
|
.set = " X ",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_PTE,
|
||||||
|
.val = _PAGE_PTE,
|
||||||
|
.set = "pte",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_PRESENT,
|
||||||
|
.val = _PAGE_PRESENT,
|
||||||
|
.set = "present",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = H_PAGE_HASHPTE,
|
||||||
|
.val = H_PAGE_HASHPTE,
|
||||||
|
.set = "hpte",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_DIRTY,
|
||||||
|
.val = _PAGE_DIRTY,
|
||||||
|
.set = "dirty",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_ACCESSED,
|
||||||
|
.val = _PAGE_ACCESSED,
|
||||||
|
.set = "accessed",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_NON_IDEMPOTENT,
|
||||||
|
.val = _PAGE_NON_IDEMPOTENT,
|
||||||
|
.set = "non-idempotent",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_TOLERANT,
|
||||||
|
.val = _PAGE_TOLERANT,
|
||||||
|
.set = "tolerant",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = H_PAGE_BUSY,
|
||||||
|
.val = H_PAGE_BUSY,
|
||||||
|
.set = "busy",
|
||||||
|
}, {
|
||||||
|
#ifdef CONFIG_PPC_64K_PAGES
|
||||||
|
.mask = H_PAGE_COMBO,
|
||||||
|
.val = H_PAGE_COMBO,
|
||||||
|
.set = "combo",
|
||||||
|
}, {
|
||||||
|
.mask = H_PAGE_4K_PFN,
|
||||||
|
.val = H_PAGE_4K_PFN,
|
||||||
|
.set = "4K_pfn",
|
||||||
|
}, {
|
||||||
|
#else /* CONFIG_PPC_64K_PAGES */
|
||||||
|
.mask = H_PAGE_F_GIX,
|
||||||
|
.val = H_PAGE_F_GIX,
|
||||||
|
.set = "f_gix",
|
||||||
|
.is_val = true,
|
||||||
|
.shift = H_PAGE_F_GIX_SHIFT,
|
||||||
|
}, {
|
||||||
|
.mask = H_PAGE_F_SECOND,
|
||||||
|
.val = H_PAGE_F_SECOND,
|
||||||
|
.set = "f_second",
|
||||||
|
}, {
|
||||||
|
#endif /* CONFIG_PPC_64K_PAGES */
|
||||||
|
.mask = _PAGE_SPECIAL,
|
||||||
|
.val = _PAGE_SPECIAL,
|
||||||
|
.set = "special",
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct pgtable_level pg_level[5] = {
|
||||||
|
{
|
||||||
|
}, { /* pgd */
|
||||||
|
.flag = flag_array,
|
||||||
|
.num = ARRAY_SIZE(flag_array),
|
||||||
|
}, { /* pud */
|
||||||
|
.flag = flag_array,
|
||||||
|
.num = ARRAY_SIZE(flag_array),
|
||||||
|
}, { /* pmd */
|
||||||
|
.flag = flag_array,
|
||||||
|
.num = ARRAY_SIZE(flag_array),
|
||||||
|
}, { /* pte */
|
||||||
|
.flag = flag_array,
|
||||||
|
.num = ARRAY_SIZE(flag_array),
|
||||||
|
},
|
||||||
|
};
|
82
arch/powerpc/mm/dump_linuxpagetables-generic.c
Normal file
82
arch/powerpc/mm/dump_linuxpagetables-generic.c
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
|
/*
|
||||||
|
* From split of dump_linuxpagetables.c
|
||||||
|
* Copyright 2016, Rashmica Gupta, IBM Corp.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <asm/pgtable.h>
|
||||||
|
|
||||||
|
#include "dump_linuxpagetables.h"
|
||||||
|
|
||||||
|
static const struct flag_info flag_array[] = {
|
||||||
|
{
|
||||||
|
.mask = _PAGE_USER,
|
||||||
|
.val = _PAGE_USER,
|
||||||
|
.set = "user",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_RW,
|
||||||
|
.val = 0,
|
||||||
|
.set = "r ",
|
||||||
|
.clear = "rw",
|
||||||
|
}, {
|
||||||
|
#ifndef CONFIG_PPC_BOOK3S_32
|
||||||
|
.mask = _PAGE_EXEC,
|
||||||
|
.val = _PAGE_EXEC,
|
||||||
|
.set = " X ",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
#endif
|
||||||
|
.mask = _PAGE_PRESENT,
|
||||||
|
.val = _PAGE_PRESENT,
|
||||||
|
.set = "present",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_GUARDED,
|
||||||
|
.val = _PAGE_GUARDED,
|
||||||
|
.set = "guarded",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_DIRTY,
|
||||||
|
.val = _PAGE_DIRTY,
|
||||||
|
.set = "dirty",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_ACCESSED,
|
||||||
|
.val = _PAGE_ACCESSED,
|
||||||
|
.set = "accessed",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_WRITETHRU,
|
||||||
|
.val = _PAGE_WRITETHRU,
|
||||||
|
.set = "write through",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_NO_CACHE,
|
||||||
|
.val = _PAGE_NO_CACHE,
|
||||||
|
.set = "no cache",
|
||||||
|
.clear = " ",
|
||||||
|
}, {
|
||||||
|
.mask = _PAGE_SPECIAL,
|
||||||
|
.val = _PAGE_SPECIAL,
|
||||||
|
.set = "special",
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct pgtable_level pg_level[5] = {
|
||||||
|
{
|
||||||
|
}, { /* pgd */
|
||||||
|
.flag = flag_array,
|
||||||
|
.num = ARRAY_SIZE(flag_array),
|
||||||
|
}, { /* pud */
|
||||||
|
.flag = flag_array,
|
||||||
|
.num = ARRAY_SIZE(flag_array),
|
||||||
|
}, { /* pmd */
|
||||||
|
.flag = flag_array,
|
||||||
|
.num = ARRAY_SIZE(flag_array),
|
||||||
|
}, { /* pte */
|
||||||
|
.flag = flag_array,
|
||||||
|
.num = ARRAY_SIZE(flag_array),
|
||||||
|
},
|
||||||
|
};
|
|
@ -28,6 +28,8 @@
|
||||||
#include <asm/page.h>
|
#include <asm/page.h>
|
||||||
#include <asm/pgalloc.h>
|
#include <asm/pgalloc.h>
|
||||||
|
|
||||||
|
#include "dump_linuxpagetables.h"
|
||||||
|
|
||||||
#ifdef CONFIG_PPC32
|
#ifdef CONFIG_PPC32
|
||||||
#define KERN_VIRT_START 0
|
#define KERN_VIRT_START 0
|
||||||
#endif
|
#endif
|
||||||
|
@ -102,159 +104,6 @@ static struct addr_marker address_markers[] = {
|
||||||
{ -1, NULL },
|
{ -1, NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
struct flag_info {
|
|
||||||
u64 mask;
|
|
||||||
u64 val;
|
|
||||||
const char *set;
|
|
||||||
const char *clear;
|
|
||||||
bool is_val;
|
|
||||||
int shift;
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct flag_info flag_array[] = {
|
|
||||||
{
|
|
||||||
.mask = _PAGE_USER | _PAGE_PRIVILEGED,
|
|
||||||
.val = _PAGE_USER,
|
|
||||||
.set = "user",
|
|
||||||
.clear = " ",
|
|
||||||
}, {
|
|
||||||
.mask = _PAGE_RW | _PAGE_RO | _PAGE_NA,
|
|
||||||
.val = _PAGE_RW,
|
|
||||||
.set = "rw",
|
|
||||||
}, {
|
|
||||||
.mask = _PAGE_RW | _PAGE_RO | _PAGE_NA,
|
|
||||||
.val = _PAGE_RO,
|
|
||||||
.set = "ro",
|
|
||||||
}, {
|
|
||||||
#if _PAGE_NA != 0
|
|
||||||
.mask = _PAGE_RW | _PAGE_RO | _PAGE_NA,
|
|
||||||
.val = _PAGE_RO,
|
|
||||||
.set = "na",
|
|
||||||
}, {
|
|
||||||
#endif
|
|
||||||
.mask = _PAGE_EXEC,
|
|
||||||
.val = _PAGE_EXEC,
|
|
||||||
.set = " X ",
|
|
||||||
.clear = " ",
|
|
||||||
}, {
|
|
||||||
.mask = _PAGE_PTE,
|
|
||||||
.val = _PAGE_PTE,
|
|
||||||
.set = "pte",
|
|
||||||
.clear = " ",
|
|
||||||
}, {
|
|
||||||
.mask = _PAGE_PRESENT,
|
|
||||||
.val = _PAGE_PRESENT,
|
|
||||||
.set = "present",
|
|
||||||
.clear = " ",
|
|
||||||
}, {
|
|
||||||
#ifdef CONFIG_PPC_BOOK3S_64
|
|
||||||
.mask = H_PAGE_HASHPTE,
|
|
||||||
.val = H_PAGE_HASHPTE,
|
|
||||||
#else
|
|
||||||
.mask = _PAGE_HASHPTE,
|
|
||||||
.val = _PAGE_HASHPTE,
|
|
||||||
#endif
|
|
||||||
.set = "hpte",
|
|
||||||
.clear = " ",
|
|
||||||
}, {
|
|
||||||
#ifndef CONFIG_PPC_BOOK3S_64
|
|
||||||
.mask = _PAGE_GUARDED,
|
|
||||||
.val = _PAGE_GUARDED,
|
|
||||||
.set = "guarded",
|
|
||||||
.clear = " ",
|
|
||||||
}, {
|
|
||||||
#endif
|
|
||||||
.mask = _PAGE_DIRTY,
|
|
||||||
.val = _PAGE_DIRTY,
|
|
||||||
.set = "dirty",
|
|
||||||
.clear = " ",
|
|
||||||
}, {
|
|
||||||
.mask = _PAGE_ACCESSED,
|
|
||||||
.val = _PAGE_ACCESSED,
|
|
||||||
.set = "accessed",
|
|
||||||
.clear = " ",
|
|
||||||
}, {
|
|
||||||
#ifndef CONFIG_PPC_BOOK3S_64
|
|
||||||
.mask = _PAGE_WRITETHRU,
|
|
||||||
.val = _PAGE_WRITETHRU,
|
|
||||||
.set = "write through",
|
|
||||||
.clear = " ",
|
|
||||||
}, {
|
|
||||||
#endif
|
|
||||||
#ifndef CONFIG_PPC_BOOK3S_64
|
|
||||||
.mask = _PAGE_NO_CACHE,
|
|
||||||
.val = _PAGE_NO_CACHE,
|
|
||||||
.set = "no cache",
|
|
||||||
.clear = " ",
|
|
||||||
}, {
|
|
||||||
#else
|
|
||||||
.mask = _PAGE_NON_IDEMPOTENT,
|
|
||||||
.val = _PAGE_NON_IDEMPOTENT,
|
|
||||||
.set = "non-idempotent",
|
|
||||||
.clear = " ",
|
|
||||||
}, {
|
|
||||||
.mask = _PAGE_TOLERANT,
|
|
||||||
.val = _PAGE_TOLERANT,
|
|
||||||
.set = "tolerant",
|
|
||||||
.clear = " ",
|
|
||||||
}, {
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_PPC_BOOK3S_64
|
|
||||||
.mask = H_PAGE_BUSY,
|
|
||||||
.val = H_PAGE_BUSY,
|
|
||||||
.set = "busy",
|
|
||||||
}, {
|
|
||||||
#ifdef CONFIG_PPC_64K_PAGES
|
|
||||||
.mask = H_PAGE_COMBO,
|
|
||||||
.val = H_PAGE_COMBO,
|
|
||||||
.set = "combo",
|
|
||||||
}, {
|
|
||||||
.mask = H_PAGE_4K_PFN,
|
|
||||||
.val = H_PAGE_4K_PFN,
|
|
||||||
.set = "4K_pfn",
|
|
||||||
}, {
|
|
||||||
#else /* CONFIG_PPC_64K_PAGES */
|
|
||||||
.mask = H_PAGE_F_GIX,
|
|
||||||
.val = H_PAGE_F_GIX,
|
|
||||||
.set = "f_gix",
|
|
||||||
.is_val = true,
|
|
||||||
.shift = H_PAGE_F_GIX_SHIFT,
|
|
||||||
}, {
|
|
||||||
.mask = H_PAGE_F_SECOND,
|
|
||||||
.val = H_PAGE_F_SECOND,
|
|
||||||
.set = "f_second",
|
|
||||||
}, {
|
|
||||||
#endif /* CONFIG_PPC_64K_PAGES */
|
|
||||||
#endif
|
|
||||||
.mask = _PAGE_SPECIAL,
|
|
||||||
.val = _PAGE_SPECIAL,
|
|
||||||
.set = "special",
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
struct pgtable_level {
|
|
||||||
const struct flag_info *flag;
|
|
||||||
size_t num;
|
|
||||||
u64 mask;
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct pgtable_level pg_level[] = {
|
|
||||||
{
|
|
||||||
}, { /* pgd */
|
|
||||||
.flag = flag_array,
|
|
||||||
.num = ARRAY_SIZE(flag_array),
|
|
||||||
}, { /* pud */
|
|
||||||
.flag = flag_array,
|
|
||||||
.num = ARRAY_SIZE(flag_array),
|
|
||||||
}, { /* pmd */
|
|
||||||
.flag = flag_array,
|
|
||||||
.num = ARRAY_SIZE(flag_array),
|
|
||||||
}, { /* pte */
|
|
||||||
.flag = flag_array,
|
|
||||||
.num = ARRAY_SIZE(flag_array),
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
static void dump_flag_info(struct pg_state *st, const struct flag_info
|
static void dump_flag_info(struct pg_state *st, const struct flag_info
|
||||||
*flag, u64 pte, int num)
|
*flag, u64 pte, int num)
|
||||||
{
|
{
|
||||||
|
|
19
arch/powerpc/mm/dump_linuxpagetables.h
Normal file
19
arch/powerpc/mm/dump_linuxpagetables.h
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
|
#include <linux/types.h>
|
||||||
|
|
||||||
|
struct flag_info {
|
||||||
|
u64 mask;
|
||||||
|
u64 val;
|
||||||
|
const char *set;
|
||||||
|
const char *clear;
|
||||||
|
bool is_val;
|
||||||
|
int shift;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct pgtable_level {
|
||||||
|
const struct flag_info *flag;
|
||||||
|
size_t num;
|
||||||
|
u64 mask;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern struct pgtable_level pg_level[5];
|
|
@ -134,11 +134,11 @@ config POWER9_CPU
|
||||||
|
|
||||||
config E5500_CPU
|
config E5500_CPU
|
||||||
bool "Freescale e5500"
|
bool "Freescale e5500"
|
||||||
depends on E500
|
depends on PPC64 && E500
|
||||||
|
|
||||||
config E6500_CPU
|
config E6500_CPU
|
||||||
bool "Freescale e6500"
|
bool "Freescale e6500"
|
||||||
depends on E500
|
depends on PPC64 && E500
|
||||||
|
|
||||||
config 860_CPU
|
config 860_CPU
|
||||||
bool "8xx family"
|
bool "8xx family"
|
||||||
|
|
|
@ -230,6 +230,7 @@ static int setup_msi_msg_address(struct pci_dev *dev, struct msi_msg *msg)
|
||||||
if (!prop) {
|
if (!prop) {
|
||||||
dev_dbg(&dev->dev,
|
dev_dbg(&dev->dev,
|
||||||
"axon_msi: no msi-address-(32|64) properties found\n");
|
"axon_msi: no msi-address-(32|64) properties found\n");
|
||||||
|
of_node_put(dn);
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -684,6 +684,7 @@ spufs_init_isolated_loader(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
loader = of_get_property(dn, "loader", &size);
|
loader = of_get_property(dn, "loader", &size);
|
||||||
|
of_node_put(dn);
|
||||||
if (!loader)
|
if (!loader)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,8 @@ int powernv_get_random_real_mode(unsigned long *v)
|
||||||
struct powernv_rng *rng;
|
struct powernv_rng *rng;
|
||||||
|
|
||||||
rng = raw_cpu_read(powernv_rng);
|
rng = raw_cpu_read(powernv_rng);
|
||||||
|
if (!rng)
|
||||||
|
return 0;
|
||||||
|
|
||||||
*v = rng_whiten(rng, __raw_rm_readq(rng->regs_real));
|
*v = rng_whiten(rng, __raw_rm_readq(rng->regs_real));
|
||||||
|
|
||||||
|
|
|
@ -523,6 +523,7 @@ int fsl_add_bridge(struct platform_device *pdev, int is_primary)
|
||||||
struct resource rsrc;
|
struct resource rsrc;
|
||||||
const int *bus_range;
|
const int *bus_range;
|
||||||
u8 hdr_type, progif;
|
u8 hdr_type, progif;
|
||||||
|
u32 class_code;
|
||||||
struct device_node *dev;
|
struct device_node *dev;
|
||||||
struct ccsr_pci __iomem *pci;
|
struct ccsr_pci __iomem *pci;
|
||||||
u16 temp;
|
u16 temp;
|
||||||
|
@ -596,6 +597,13 @@ int fsl_add_bridge(struct platform_device *pdev, int is_primary)
|
||||||
PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS;
|
PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS;
|
||||||
if (fsl_pcie_check_link(hose))
|
if (fsl_pcie_check_link(hose))
|
||||||
hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK;
|
hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK;
|
||||||
|
/* Fix Class Code to PCI_CLASS_BRIDGE_PCI_NORMAL for pre-3.0 controller */
|
||||||
|
if (in_be32(&pci->block_rev1) < PCIE_IP_REV_3_0) {
|
||||||
|
early_read_config_dword(hose, 0, 0, PCIE_FSL_CSR_CLASSCODE, &class_code);
|
||||||
|
class_code &= 0xff;
|
||||||
|
class_code |= PCI_CLASS_BRIDGE_PCI_NORMAL << 8;
|
||||||
|
early_write_config_dword(hose, 0, 0, PCIE_FSL_CSR_CLASSCODE, class_code);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Set PBFR(PCI Bus Function Register)[10] = 1 to
|
* Set PBFR(PCI Bus Function Register)[10] = 1 to
|
||||||
|
|
|
@ -23,6 +23,7 @@ struct platform_device;
|
||||||
|
|
||||||
#define PCIE_LTSSM 0x0404 /* PCIE Link Training and Status */
|
#define PCIE_LTSSM 0x0404 /* PCIE Link Training and Status */
|
||||||
#define PCIE_LTSSM_L0 0x16 /* L0 state */
|
#define PCIE_LTSSM_L0 0x16 /* L0 state */
|
||||||
|
#define PCIE_FSL_CSR_CLASSCODE 0x474 /* FSL GPEX CSR */
|
||||||
#define PCIE_IP_REV_2_2 0x02080202 /* PCIE IP block version Rev2.2 */
|
#define PCIE_IP_REV_2_2 0x02080202 /* PCIE IP block version Rev2.2 */
|
||||||
#define PCIE_IP_REV_3_0 0x02080300 /* PCIE IP block version Rev3.0 */
|
#define PCIE_IP_REV_3_0 0x02080300 /* PCIE IP block version Rev3.0 */
|
||||||
#define PIWAR_EN 0x80000000 /* Enable */
|
#define PIWAR_EN 0x80000000 /* Enable */
|
||||||
|
|
|
@ -631,6 +631,7 @@ static bool xive_get_max_prio(u8 *max_prio)
|
||||||
}
|
}
|
||||||
|
|
||||||
reg = of_get_property(rootdn, "ibm,plat-res-int-priorities", &len);
|
reg = of_get_property(rootdn, "ibm,plat-res-int-priorities", &len);
|
||||||
|
of_node_put(rootdn);
|
||||||
if (!reg) {
|
if (!reg) {
|
||||||
pr_err("Failed to read 'ibm,plat-res-int-priorities' property\n");
|
pr_err("Failed to read 'ibm,plat-res-int-priorities' property\n");
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -26,8 +26,7 @@ static long riscv_sys_mmap(unsigned long addr, unsigned long len,
|
||||||
if (unlikely(offset & (~PAGE_MASK >> page_shift_offset)))
|
if (unlikely(offset & (~PAGE_MASK >> page_shift_offset)))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if ((prot & PROT_WRITE) && (prot & PROT_EXEC))
|
if (unlikely((prot & PROT_WRITE) && !(prot & PROT_READ)))
|
||||||
if (unlikely(!(prot & PROT_READ)))
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
return ksys_mmap_pgoff(addr, len, prot, flags, fd,
|
return ksys_mmap_pgoff(addr, len, prot, flags, fd,
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/irq.h>
|
#include <linux/irq.h>
|
||||||
|
#include <linux/kexec.h>
|
||||||
|
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <asm/ptrace.h>
|
#include <asm/ptrace.h>
|
||||||
|
@ -50,6 +51,9 @@ void die(struct pt_regs *regs, const char *str)
|
||||||
|
|
||||||
ret = notify_die(DIE_OOPS, str, regs, 0, regs->scause, SIGSEGV);
|
ret = notify_die(DIE_OOPS, str, regs, 0, regs->scause, SIGSEGV);
|
||||||
|
|
||||||
|
if (regs && kexec_should_crash(current))
|
||||||
|
crash_kexec(regs);
|
||||||
|
|
||||||
bust_spinlocks(0);
|
bust_spinlocks(0);
|
||||||
add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
|
add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
|
||||||
spin_unlock_irq(&die_lock);
|
spin_unlock_irq(&die_lock);
|
||||||
|
|
|
@ -437,7 +437,7 @@ __init int hypfs_diag_init(void)
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if (diag204_probe()) {
|
if (diag204_probe()) {
|
||||||
pr_err("The hardware system does not support hypfs\n");
|
pr_info("The hardware system does not support hypfs\n");
|
||||||
return -ENODATA;
|
return -ENODATA;
|
||||||
}
|
}
|
||||||
if (diag204_info_type == DIAG204_INFO_EXT) {
|
if (diag204_info_type == DIAG204_INFO_EXT) {
|
||||||
|
|
|
@ -494,9 +494,9 @@ fail_hypfs_vm_exit:
|
||||||
hypfs_vm_exit();
|
hypfs_vm_exit();
|
||||||
fail_hypfs_diag_exit:
|
fail_hypfs_diag_exit:
|
||||||
hypfs_diag_exit();
|
hypfs_diag_exit();
|
||||||
|
pr_err("Initialization of hypfs failed with rc=%i\n", rc);
|
||||||
fail_dbfs_exit:
|
fail_dbfs_exit:
|
||||||
hypfs_dbfs_exit();
|
hypfs_dbfs_exit();
|
||||||
pr_err("Initialization of hypfs failed with rc=%i\n", rc);
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
device_initcall(hypfs_init)
|
device_initcall(hypfs_init)
|
||||||
|
|
|
@ -30,9 +30,11 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
|
||||||
static inline int prepare_hugepage_range(struct file *file,
|
static inline int prepare_hugepage_range(struct file *file,
|
||||||
unsigned long addr, unsigned long len)
|
unsigned long addr, unsigned long len)
|
||||||
{
|
{
|
||||||
if (len & ~HPAGE_MASK)
|
struct hstate *h = hstate_file(file);
|
||||||
|
|
||||||
|
if (len & ~huge_page_mask(h))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (addr & ~HPAGE_MASK)
|
if (addr & ~huge_page_mask(h))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,6 +75,18 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
|
||||||
|
|
||||||
memcpy(dst, src, arch_task_struct_size);
|
memcpy(dst, src, arch_task_struct_size);
|
||||||
dst->thread.fpu.regs = dst->thread.fpu.fprs;
|
dst->thread.fpu.regs = dst->thread.fpu.fprs;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Don't transfer over the runtime instrumentation or the guarded
|
||||||
|
* storage control block pointers. These fields are cleared here instead
|
||||||
|
* of in copy_thread() to avoid premature freeing of associated memory
|
||||||
|
* on fork() failure. Wait to clear the RI flag because ->stack still
|
||||||
|
* refers to the source thread.
|
||||||
|
*/
|
||||||
|
dst->thread.ri_cb = NULL;
|
||||||
|
dst->thread.gs_cb = NULL;
|
||||||
|
dst->thread.gs_bc_cb = NULL;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,13 +143,11 @@ int copy_thread_tls(unsigned long clone_flags, unsigned long new_stackp,
|
||||||
frame->childregs.flags = 0;
|
frame->childregs.flags = 0;
|
||||||
if (new_stackp)
|
if (new_stackp)
|
||||||
frame->childregs.gprs[15] = new_stackp;
|
frame->childregs.gprs[15] = new_stackp;
|
||||||
|
/*
|
||||||
/* Don't copy runtime instrumentation info */
|
* Clear the runtime instrumentation flag after the above childregs
|
||||||
p->thread.ri_cb = NULL;
|
* copy. The CB pointer was already cleared in arch_dup_task_struct().
|
||||||
|
*/
|
||||||
frame->childregs.psw.mask &= ~PSW_MASK_RI;
|
frame->childregs.psw.mask &= ~PSW_MASK_RI;
|
||||||
/* Don't copy guarded storage control block */
|
|
||||||
p->thread.gs_cb = NULL;
|
|
||||||
p->thread.gs_bc_cb = NULL;
|
|
||||||
|
|
||||||
/* Set a new TLS ? */
|
/* Set a new TLS ? */
|
||||||
if (clone_flags & CLONE_SETTLS) {
|
if (clone_flags & CLONE_SETTLS) {
|
||||||
|
|
|
@ -121,6 +121,7 @@ SECTIONS
|
||||||
/*
|
/*
|
||||||
* Table with the patch locations to undo expolines
|
* Table with the patch locations to undo expolines
|
||||||
*/
|
*/
|
||||||
|
. = ALIGN(4);
|
||||||
.nospec_call_table : {
|
.nospec_call_table : {
|
||||||
__nospec_call_start = . ;
|
__nospec_call_start = . ;
|
||||||
*(.s390_indirect*)
|
*(.s390_indirect*)
|
||||||
|
|
|
@ -455,7 +455,9 @@ static inline vm_fault_t do_exception(struct pt_regs *regs, int access)
|
||||||
flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
|
flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
|
||||||
if (user_mode(regs))
|
if (user_mode(regs))
|
||||||
flags |= FAULT_FLAG_USER;
|
flags |= FAULT_FLAG_USER;
|
||||||
if (access == VM_WRITE || (trans_exc_code & store_indication) == 0x400)
|
if ((trans_exc_code & store_indication) == 0x400)
|
||||||
|
access = VM_WRITE;
|
||||||
|
if (access == VM_WRITE)
|
||||||
flags |= FAULT_FLAG_WRITE;
|
flags |= FAULT_FLAG_WRITE;
|
||||||
down_read(&mm->mmap_sem);
|
down_read(&mm->mmap_sem);
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ $(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE
|
||||||
AFLAGS_header.o += -I$(objtree)/$(obj)
|
AFLAGS_header.o += -I$(objtree)/$(obj)
|
||||||
$(obj)/header.o: $(obj)/zoffset.h
|
$(obj)/header.o: $(obj)/zoffset.h
|
||||||
|
|
||||||
LDFLAGS_setup.elf := -m elf_i386 -T
|
LDFLAGS_setup.elf := -m elf_i386 -z noexecstack -T
|
||||||
$(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
|
$(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
|
||||||
$(call if_changed,ld)
|
$(call if_changed,ld)
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,10 @@ else
|
||||||
KBUILD_LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \
|
KBUILD_LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \
|
||||||
&& echo "-z noreloc-overflow -pie --no-dynamic-linker")
|
&& echo "-z noreloc-overflow -pie --no-dynamic-linker")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
KBUILD_LDFLAGS += -z noexecstack
|
||||||
|
KBUILD_LDFLAGS += $(call ld-option,--no-warn-rwx-segments)
|
||||||
|
|
||||||
LDFLAGS_vmlinux := -T
|
LDFLAGS_vmlinux := -T
|
||||||
|
|
||||||
hostprogs-y := mkpiggy
|
hostprogs-y := mkpiggy
|
||||||
|
|
|
@ -180,7 +180,7 @@ quiet_cmd_vdso = VDSO $@
|
||||||
|
|
||||||
VDSO_LDFLAGS = -shared $(call ld-option, --hash-style=both) \
|
VDSO_LDFLAGS = -shared $(call ld-option, --hash-style=both) \
|
||||||
$(call ld-option, --build-id) $(call ld-option, --eh-frame-hdr) \
|
$(call ld-option, --build-id) $(call ld-option, --eh-frame-hdr) \
|
||||||
-Bsymbolic
|
-Bsymbolic -z noexecstack
|
||||||
GCOV_PROFILE := n
|
GCOV_PROFILE := n
|
||||||
|
|
||||||
quiet_cmd_vdso_and_check = VDSO $@
|
quiet_cmd_vdso_and_check = VDSO $@
|
||||||
|
|
|
@ -396,6 +396,7 @@
|
||||||
#define X86_BUG_ITLB_MULTIHIT X86_BUG(23) /* CPU may incur MCE during certain page attribute changes */
|
#define X86_BUG_ITLB_MULTIHIT X86_BUG(23) /* CPU may incur MCE during certain page attribute changes */
|
||||||
#define X86_BUG_SRBDS X86_BUG(24) /* CPU may leak RNG bits if not mitigated */
|
#define X86_BUG_SRBDS X86_BUG(24) /* CPU may leak RNG bits if not mitigated */
|
||||||
#define X86_BUG_MMIO_STALE_DATA X86_BUG(25) /* CPU is affected by Processor MMIO Stale Data vulnerabilities */
|
#define X86_BUG_MMIO_STALE_DATA X86_BUG(25) /* CPU is affected by Processor MMIO Stale Data vulnerabilities */
|
||||||
#define X86_BUG_EIBRS_PBRSB X86_BUG(26) /* EIBRS is vulnerable to Post Barrier RSB Predictions */
|
#define X86_BUG_MMIO_UNKNOWN X86_BUG(26) /* CPU is too old and its MMIO Stale Data status is unknown */
|
||||||
|
#define X86_BUG_EIBRS_PBRSB X86_BUG(27) /* EIBRS is vulnerable to Post Barrier RSB Predictions */
|
||||||
|
|
||||||
#endif /* _ASM_X86_CPUFEATURES_H */
|
#endif /* _ASM_X86_CPUFEATURES_H */
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
* the optimal version — two calls, each with their own speculation
|
* the optimal version — two calls, each with their own speculation
|
||||||
* trap should their return address end up getting used, in a loop.
|
* trap should their return address end up getting used, in a loop.
|
||||||
*/
|
*/
|
||||||
|
#ifdef CONFIG_X86_64
|
||||||
#define __FILL_RETURN_BUFFER(reg, nr, sp) \
|
#define __FILL_RETURN_BUFFER(reg, nr, sp) \
|
||||||
mov $(nr/2), reg; \
|
mov $(nr/2), reg; \
|
||||||
771: \
|
771: \
|
||||||
|
@ -55,6 +56,19 @@
|
||||||
add $(BITS_PER_LONG/8) * nr, sp; \
|
add $(BITS_PER_LONG/8) * nr, sp; \
|
||||||
/* barrier for jnz misprediction */ \
|
/* barrier for jnz misprediction */ \
|
||||||
lfence;
|
lfence;
|
||||||
|
#else
|
||||||
|
/*
|
||||||
|
* i386 doesn't unconditionally have LFENCE, as such it can't
|
||||||
|
* do a loop.
|
||||||
|
*/
|
||||||
|
#define __FILL_RETURN_BUFFER(reg, nr, sp) \
|
||||||
|
.rept nr; \
|
||||||
|
call 772f; \
|
||||||
|
int3; \
|
||||||
|
772:; \
|
||||||
|
.endr; \
|
||||||
|
add $(BITS_PER_LONG/8) * nr, sp;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Sequence to mitigate PBRSB on eIBRS CPUs */
|
/* Sequence to mitigate PBRSB on eIBRS CPUs */
|
||||||
#define __ISSUE_UNBALANCED_RET_GUARD(sp) \
|
#define __ISSUE_UNBALANCED_RET_GUARD(sp) \
|
||||||
|
|
|
@ -396,6 +396,7 @@ static void __init mmio_select_mitigation(void)
|
||||||
u64 ia32_cap;
|
u64 ia32_cap;
|
||||||
|
|
||||||
if (!boot_cpu_has_bug(X86_BUG_MMIO_STALE_DATA) ||
|
if (!boot_cpu_has_bug(X86_BUG_MMIO_STALE_DATA) ||
|
||||||
|
boot_cpu_has_bug(X86_BUG_MMIO_UNKNOWN) ||
|
||||||
cpu_mitigations_off()) {
|
cpu_mitigations_off()) {
|
||||||
mmio_mitigation = MMIO_MITIGATION_OFF;
|
mmio_mitigation = MMIO_MITIGATION_OFF;
|
||||||
return;
|
return;
|
||||||
|
@ -501,6 +502,8 @@ out:
|
||||||
pr_info("TAA: %s\n", taa_strings[taa_mitigation]);
|
pr_info("TAA: %s\n", taa_strings[taa_mitigation]);
|
||||||
if (boot_cpu_has_bug(X86_BUG_MMIO_STALE_DATA))
|
if (boot_cpu_has_bug(X86_BUG_MMIO_STALE_DATA))
|
||||||
pr_info("MMIO Stale Data: %s\n", mmio_strings[mmio_mitigation]);
|
pr_info("MMIO Stale Data: %s\n", mmio_strings[mmio_mitigation]);
|
||||||
|
else if (boot_cpu_has_bug(X86_BUG_MMIO_UNKNOWN))
|
||||||
|
pr_info("MMIO Stale Data: Unknown: No mitigations\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __init md_clear_select_mitigation(void)
|
static void __init md_clear_select_mitigation(void)
|
||||||
|
@ -1868,6 +1871,9 @@ static ssize_t tsx_async_abort_show_state(char *buf)
|
||||||
|
|
||||||
static ssize_t mmio_stale_data_show_state(char *buf)
|
static ssize_t mmio_stale_data_show_state(char *buf)
|
||||||
{
|
{
|
||||||
|
if (boot_cpu_has_bug(X86_BUG_MMIO_UNKNOWN))
|
||||||
|
return sysfs_emit(buf, "Unknown: No mitigations\n");
|
||||||
|
|
||||||
if (mmio_mitigation == MMIO_MITIGATION_OFF)
|
if (mmio_mitigation == MMIO_MITIGATION_OFF)
|
||||||
return sysfs_emit(buf, "%s\n", mmio_strings[mmio_mitigation]);
|
return sysfs_emit(buf, "%s\n", mmio_strings[mmio_mitigation]);
|
||||||
|
|
||||||
|
@ -1995,6 +2001,7 @@ static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr
|
||||||
return srbds_show_state(buf);
|
return srbds_show_state(buf);
|
||||||
|
|
||||||
case X86_BUG_MMIO_STALE_DATA:
|
case X86_BUG_MMIO_STALE_DATA:
|
||||||
|
case X86_BUG_MMIO_UNKNOWN:
|
||||||
return mmio_stale_data_show_state(buf);
|
return mmio_stale_data_show_state(buf);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -2051,6 +2058,9 @@ ssize_t cpu_show_srbds(struct device *dev, struct device_attribute *attr, char *
|
||||||
|
|
||||||
ssize_t cpu_show_mmio_stale_data(struct device *dev, struct device_attribute *attr, char *buf)
|
ssize_t cpu_show_mmio_stale_data(struct device *dev, struct device_attribute *attr, char *buf)
|
||||||
{
|
{
|
||||||
|
if (boot_cpu_has_bug(X86_BUG_MMIO_UNKNOWN))
|
||||||
|
return cpu_show_common(dev, attr, buf, X86_BUG_MMIO_UNKNOWN);
|
||||||
|
else
|
||||||
return cpu_show_common(dev, attr, buf, X86_BUG_MMIO_STALE_DATA);
|
return cpu_show_common(dev, attr, buf, X86_BUG_MMIO_STALE_DATA);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -955,6 +955,7 @@ static void identify_cpu_without_cpuid(struct cpuinfo_x86 *c)
|
||||||
#define NO_SWAPGS BIT(6)
|
#define NO_SWAPGS BIT(6)
|
||||||
#define NO_ITLB_MULTIHIT BIT(7)
|
#define NO_ITLB_MULTIHIT BIT(7)
|
||||||
#define NO_EIBRS_PBRSB BIT(8)
|
#define NO_EIBRS_PBRSB BIT(8)
|
||||||
|
#define NO_MMIO BIT(9)
|
||||||
|
|
||||||
#define VULNWL(_vendor, _family, _model, _whitelist) \
|
#define VULNWL(_vendor, _family, _model, _whitelist) \
|
||||||
{ X86_VENDOR_##_vendor, _family, _model, X86_FEATURE_ANY, _whitelist }
|
{ X86_VENDOR_##_vendor, _family, _model, X86_FEATURE_ANY, _whitelist }
|
||||||
|
@ -972,6 +973,11 @@ static const __initconst struct x86_cpu_id cpu_vuln_whitelist[] = {
|
||||||
VULNWL(NSC, 5, X86_MODEL_ANY, NO_SPECULATION),
|
VULNWL(NSC, 5, X86_MODEL_ANY, NO_SPECULATION),
|
||||||
|
|
||||||
/* Intel Family 6 */
|
/* Intel Family 6 */
|
||||||
|
VULNWL_INTEL(TIGERLAKE, NO_MMIO),
|
||||||
|
VULNWL_INTEL(TIGERLAKE_L, NO_MMIO),
|
||||||
|
VULNWL_INTEL(ALDERLAKE, NO_MMIO),
|
||||||
|
VULNWL_INTEL(ALDERLAKE_L, NO_MMIO),
|
||||||
|
|
||||||
VULNWL_INTEL(ATOM_SALTWELL, NO_SPECULATION | NO_ITLB_MULTIHIT),
|
VULNWL_INTEL(ATOM_SALTWELL, NO_SPECULATION | NO_ITLB_MULTIHIT),
|
||||||
VULNWL_INTEL(ATOM_SALTWELL_TABLET, NO_SPECULATION | NO_ITLB_MULTIHIT),
|
VULNWL_INTEL(ATOM_SALTWELL_TABLET, NO_SPECULATION | NO_ITLB_MULTIHIT),
|
||||||
VULNWL_INTEL(ATOM_SALTWELL_MID, NO_SPECULATION | NO_ITLB_MULTIHIT),
|
VULNWL_INTEL(ATOM_SALTWELL_MID, NO_SPECULATION | NO_ITLB_MULTIHIT),
|
||||||
|
@ -989,9 +995,9 @@ static const __initconst struct x86_cpu_id cpu_vuln_whitelist[] = {
|
||||||
|
|
||||||
VULNWL_INTEL(ATOM_AIRMONT_MID, NO_L1TF | MSBDS_ONLY | NO_SWAPGS | NO_ITLB_MULTIHIT),
|
VULNWL_INTEL(ATOM_AIRMONT_MID, NO_L1TF | MSBDS_ONLY | NO_SWAPGS | NO_ITLB_MULTIHIT),
|
||||||
|
|
||||||
VULNWL_INTEL(ATOM_GOLDMONT, NO_MDS | NO_L1TF | NO_SWAPGS | NO_ITLB_MULTIHIT),
|
VULNWL_INTEL(ATOM_GOLDMONT, NO_MDS | NO_L1TF | NO_SWAPGS | NO_ITLB_MULTIHIT | NO_MMIO),
|
||||||
VULNWL_INTEL(ATOM_GOLDMONT_X, NO_MDS | NO_L1TF | NO_SWAPGS | NO_ITLB_MULTIHIT),
|
VULNWL_INTEL(ATOM_GOLDMONT_X, NO_MDS | NO_L1TF | NO_SWAPGS | NO_ITLB_MULTIHIT | NO_MMIO),
|
||||||
VULNWL_INTEL(ATOM_GOLDMONT_PLUS, NO_MDS | NO_L1TF | NO_SWAPGS | NO_ITLB_MULTIHIT | NO_EIBRS_PBRSB),
|
VULNWL_INTEL(ATOM_GOLDMONT_PLUS, NO_MDS | NO_L1TF | NO_SWAPGS | NO_ITLB_MULTIHIT | NO_MMIO | NO_EIBRS_PBRSB),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Technically, swapgs isn't serializing on AMD (despite it previously
|
* Technically, swapgs isn't serializing on AMD (despite it previously
|
||||||
|
@ -1006,13 +1012,13 @@ static const __initconst struct x86_cpu_id cpu_vuln_whitelist[] = {
|
||||||
VULNWL_INTEL(ATOM_TREMONT_X, NO_ITLB_MULTIHIT | NO_EIBRS_PBRSB),
|
VULNWL_INTEL(ATOM_TREMONT_X, NO_ITLB_MULTIHIT | NO_EIBRS_PBRSB),
|
||||||
|
|
||||||
/* AMD Family 0xf - 0x12 */
|
/* AMD Family 0xf - 0x12 */
|
||||||
VULNWL_AMD(0x0f, NO_MELTDOWN | NO_SSB | NO_L1TF | NO_MDS | NO_SWAPGS | NO_ITLB_MULTIHIT),
|
VULNWL_AMD(0x0f, NO_MELTDOWN | NO_SSB | NO_L1TF | NO_MDS | NO_SWAPGS | NO_ITLB_MULTIHIT | NO_MMIO),
|
||||||
VULNWL_AMD(0x10, NO_MELTDOWN | NO_SSB | NO_L1TF | NO_MDS | NO_SWAPGS | NO_ITLB_MULTIHIT),
|
VULNWL_AMD(0x10, NO_MELTDOWN | NO_SSB | NO_L1TF | NO_MDS | NO_SWAPGS | NO_ITLB_MULTIHIT | NO_MMIO),
|
||||||
VULNWL_AMD(0x11, NO_MELTDOWN | NO_SSB | NO_L1TF | NO_MDS | NO_SWAPGS | NO_ITLB_MULTIHIT),
|
VULNWL_AMD(0x11, NO_MELTDOWN | NO_SSB | NO_L1TF | NO_MDS | NO_SWAPGS | NO_ITLB_MULTIHIT | NO_MMIO),
|
||||||
VULNWL_AMD(0x12, NO_MELTDOWN | NO_SSB | NO_L1TF | NO_MDS | NO_SWAPGS | NO_ITLB_MULTIHIT),
|
VULNWL_AMD(0x12, NO_MELTDOWN | NO_SSB | NO_L1TF | NO_MDS | NO_SWAPGS | NO_ITLB_MULTIHIT | NO_MMIO),
|
||||||
|
|
||||||
/* FAMILY_ANY must be last, otherwise 0x0f - 0x12 matches won't work */
|
/* FAMILY_ANY must be last, otherwise 0x0f - 0x12 matches won't work */
|
||||||
VULNWL_AMD(X86_FAMILY_ANY, NO_MELTDOWN | NO_L1TF | NO_MDS | NO_SWAPGS | NO_ITLB_MULTIHIT),
|
VULNWL_AMD(X86_FAMILY_ANY, NO_MELTDOWN | NO_L1TF | NO_MDS | NO_SWAPGS | NO_ITLB_MULTIHIT | NO_MMIO),
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1152,10 +1158,16 @@ static void __init cpu_set_bug_bits(struct cpuinfo_x86 *c)
|
||||||
* Affected CPU list is generally enough to enumerate the vulnerability,
|
* Affected CPU list is generally enough to enumerate the vulnerability,
|
||||||
* but for virtualization case check for ARCH_CAP MSR bits also, VMM may
|
* but for virtualization case check for ARCH_CAP MSR bits also, VMM may
|
||||||
* not want the guest to enumerate the bug.
|
* not want the guest to enumerate the bug.
|
||||||
|
*
|
||||||
|
* Set X86_BUG_MMIO_UNKNOWN for CPUs that are neither in the blacklist,
|
||||||
|
* nor in the whitelist and also don't enumerate MSR ARCH_CAP MMIO bits.
|
||||||
*/
|
*/
|
||||||
if (cpu_matches(cpu_vuln_blacklist, MMIO) &&
|
if (!arch_cap_mmio_immune(ia32_cap)) {
|
||||||
!arch_cap_mmio_immune(ia32_cap))
|
if (cpu_matches(cpu_vuln_blacklist, MMIO))
|
||||||
setup_force_cpu_bug(X86_BUG_MMIO_STALE_DATA);
|
setup_force_cpu_bug(X86_BUG_MMIO_STALE_DATA);
|
||||||
|
else if (!cpu_matches(cpu_vuln_whitelist, NO_MMIO))
|
||||||
|
setup_force_cpu_bug(X86_BUG_MMIO_UNKNOWN);
|
||||||
|
}
|
||||||
|
|
||||||
if (cpu_has(c, X86_FEATURE_IBRS_ENHANCED) &&
|
if (cpu_has(c, X86_FEATURE_IBRS_ENHANCED) &&
|
||||||
!cpu_matches(cpu_vuln_whitelist, NO_EIBRS_PBRSB) &&
|
!cpu_matches(cpu_vuln_whitelist, NO_EIBRS_PBRSB) &&
|
||||||
|
|
|
@ -27,6 +27,11 @@ static __init int register_e820_pmem(void)
|
||||||
* simply here to trigger the module to load on demand.
|
* simply here to trigger the module to load on demand.
|
||||||
*/
|
*/
|
||||||
pdev = platform_device_alloc("e820_pmem", -1);
|
pdev = platform_device_alloc("e820_pmem", -1);
|
||||||
return platform_device_add(pdev);
|
|
||||||
|
rc = platform_device_add(pdev);
|
||||||
|
if (rc)
|
||||||
|
platform_device_put(pdev);
|
||||||
|
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
device_initcall(register_e820_pmem);
|
device_initcall(register_e820_pmem);
|
||||||
|
|
|
@ -89,22 +89,27 @@ static struct orc_entry *orc_find(unsigned long ip);
|
||||||
static struct orc_entry *orc_ftrace_find(unsigned long ip)
|
static struct orc_entry *orc_ftrace_find(unsigned long ip)
|
||||||
{
|
{
|
||||||
struct ftrace_ops *ops;
|
struct ftrace_ops *ops;
|
||||||
unsigned long caller;
|
unsigned long tramp_addr, offset;
|
||||||
|
|
||||||
ops = ftrace_ops_trampoline(ip);
|
ops = ftrace_ops_trampoline(ip);
|
||||||
if (!ops)
|
if (!ops)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
/* Set tramp_addr to the start of the code copied by the trampoline */
|
||||||
if (ops->flags & FTRACE_OPS_FL_SAVE_REGS)
|
if (ops->flags & FTRACE_OPS_FL_SAVE_REGS)
|
||||||
caller = (unsigned long)ftrace_regs_call;
|
tramp_addr = (unsigned long)ftrace_regs_caller;
|
||||||
else
|
else
|
||||||
caller = (unsigned long)ftrace_call;
|
tramp_addr = (unsigned long)ftrace_caller;
|
||||||
|
|
||||||
|
/* Now place tramp_addr to the location within the trampoline ip is at */
|
||||||
|
offset = ip - ops->trampoline;
|
||||||
|
tramp_addr += offset;
|
||||||
|
|
||||||
/* Prevent unlikely recursion */
|
/* Prevent unlikely recursion */
|
||||||
if (ip == caller)
|
if (ip == tramp_addr)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return orc_find(caller);
|
return orc_find(tramp_addr);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static struct orc_entry *orc_ftrace_find(unsigned long ip)
|
static struct orc_entry *orc_ftrace_find(unsigned long ip)
|
||||||
|
|
|
@ -1708,16 +1708,6 @@ static int __load_segment_descriptor(struct x86_emulate_ctxt *ctxt,
|
||||||
case VCPU_SREG_TR:
|
case VCPU_SREG_TR:
|
||||||
if (seg_desc.s || (seg_desc.type != 1 && seg_desc.type != 9))
|
if (seg_desc.s || (seg_desc.type != 1 && seg_desc.type != 9))
|
||||||
goto exception;
|
goto exception;
|
||||||
if (!seg_desc.p) {
|
|
||||||
err_vec = NP_VECTOR;
|
|
||||||
goto exception;
|
|
||||||
}
|
|
||||||
old_desc = seg_desc;
|
|
||||||
seg_desc.type |= 2; /* busy */
|
|
||||||
ret = ctxt->ops->cmpxchg_emulated(ctxt, desc_addr, &old_desc, &seg_desc,
|
|
||||||
sizeof(seg_desc), &ctxt->exception);
|
|
||||||
if (ret != X86EMUL_CONTINUE)
|
|
||||||
return ret;
|
|
||||||
break;
|
break;
|
||||||
case VCPU_SREG_LDTR:
|
case VCPU_SREG_LDTR:
|
||||||
if (seg_desc.s || seg_desc.type != 2)
|
if (seg_desc.s || seg_desc.type != 2)
|
||||||
|
@ -1756,7 +1746,16 @@ static int __load_segment_descriptor(struct x86_emulate_ctxt *ctxt,
|
||||||
return ret;
|
return ret;
|
||||||
if (emul_is_noncanonical_address(get_desc_base(&seg_desc) |
|
if (emul_is_noncanonical_address(get_desc_base(&seg_desc) |
|
||||||
((u64)base3 << 32), ctxt))
|
((u64)base3 << 32), ctxt))
|
||||||
return emulate_gp(ctxt, 0);
|
return emulate_gp(ctxt, err_code);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (seg == VCPU_SREG_TR) {
|
||||||
|
old_desc = seg_desc;
|
||||||
|
seg_desc.type |= 2; /* busy */
|
||||||
|
ret = ctxt->ops->cmpxchg_emulated(ctxt, desc_addr, &old_desc, &seg_desc,
|
||||||
|
sizeof(seg_desc), &ctxt->exception);
|
||||||
|
if (ret != X86EMUL_CONTINUE)
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
load:
|
load:
|
||||||
ctxt->ops->set_segment(ctxt, selector, &seg_desc, base3, seg);
|
ctxt->ops->set_segment(ctxt, selector, &seg_desc, base3, seg);
|
||||||
|
|
|
@ -341,6 +341,9 @@ static int synic_set_irq(struct kvm_vcpu_hv_synic *synic, u32 sint)
|
||||||
struct kvm_lapic_irq irq;
|
struct kvm_lapic_irq irq;
|
||||||
int ret, vector;
|
int ret, vector;
|
||||||
|
|
||||||
|
if (KVM_BUG_ON(!lapic_in_kernel(vcpu), vcpu->kvm))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
if (sint >= ARRAY_SIZE(synic->sint))
|
if (sint >= ARRAY_SIZE(synic->sint))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
|
|
@ -961,6 +961,10 @@ bool kvm_irq_delivery_to_apic_fast(struct kvm *kvm, struct kvm_lapic *src,
|
||||||
*r = -1;
|
*r = -1;
|
||||||
|
|
||||||
if (irq->shorthand == APIC_DEST_SELF) {
|
if (irq->shorthand == APIC_DEST_SELF) {
|
||||||
|
if (KVM_BUG_ON(!src, kvm)) {
|
||||||
|
*r = 0;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
*r = kvm_apic_set_irq(src->vcpu, irq, dest_map);
|
*r = kvm_apic_set_irq(src->vcpu, irq, dest_map);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5142,8 +5142,6 @@ static void svm_set_irq(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
struct vcpu_svm *svm = to_svm(vcpu);
|
struct vcpu_svm *svm = to_svm(vcpu);
|
||||||
|
|
||||||
BUG_ON(!(gif_set(svm)));
|
|
||||||
|
|
||||||
trace_kvm_inj_virq(vcpu->arch.interrupt.nr);
|
trace_kvm_inj_virq(vcpu->arch.interrupt.nr);
|
||||||
++vcpu->stat.irq_injections;
|
++vcpu->stat.irq_injections;
|
||||||
|
|
||||||
|
|
|
@ -826,7 +826,7 @@ void debug_cpumask_set_cpu(int cpu, int node, bool enable)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mask = node_to_cpumask_map[node];
|
mask = node_to_cpumask_map[node];
|
||||||
if (!mask) {
|
if (!cpumask_available(mask)) {
|
||||||
pr_err("node_to_cpumask_map[%i] NULL\n", node);
|
pr_err("node_to_cpumask_map[%i] NULL\n", node);
|
||||||
dump_stack();
|
dump_stack();
|
||||||
return;
|
return;
|
||||||
|
@ -872,7 +872,7 @@ const struct cpumask *cpumask_of_node(int node)
|
||||||
dump_stack();
|
dump_stack();
|
||||||
return cpu_none_mask;
|
return cpu_none_mask;
|
||||||
}
|
}
|
||||||
if (node_to_cpumask_map[node] == NULL) {
|
if (!cpumask_available(node_to_cpumask_map[node])) {
|
||||||
printk(KERN_WARNING
|
printk(KERN_WARNING
|
||||||
"cpumask_of_node(%d): no node_to_cpumask_map!\n",
|
"cpumask_of_node(%d): no node_to_cpumask_map!\n",
|
||||||
node);
|
node);
|
||||||
|
|
|
@ -85,7 +85,7 @@ static void send_ebook_state(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!!test_bit(SW_TABLET_MODE, ebook_switch_idev->sw) == state)
|
if (test_bit(SW_TABLET_MODE, ebook_switch_idev->sw) == !!state)
|
||||||
return; /* Nothing new to report. */
|
return; /* Nothing new to report. */
|
||||||
|
|
||||||
input_report_switch(ebook_switch_idev, SW_TABLET_MODE, state);
|
input_report_switch(ebook_switch_idev, SW_TABLET_MODE, state);
|
||||||
|
|
|
@ -401,6 +401,9 @@ static int register_device_clock(struct acpi_device *adev,
|
||||||
if (!lpss_clk_dev)
|
if (!lpss_clk_dev)
|
||||||
lpt_register_clock_device();
|
lpt_register_clock_device();
|
||||||
|
|
||||||
|
if (IS_ERR(lpss_clk_dev))
|
||||||
|
return PTR_ERR(lpss_clk_dev);
|
||||||
|
|
||||||
clk_data = platform_get_drvdata(lpss_clk_dev);
|
clk_data = platform_get_drvdata(lpss_clk_dev);
|
||||||
if (!clk_data)
|
if (!clk_data)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
|
@ -630,33 +630,6 @@ int pcc_data_alloc(int pcc_ss_id)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if CPPC revision + num_ent combination is supported */
|
|
||||||
static bool is_cppc_supported(int revision, int num_ent)
|
|
||||||
{
|
|
||||||
int expected_num_ent;
|
|
||||||
|
|
||||||
switch (revision) {
|
|
||||||
case CPPC_V2_REV:
|
|
||||||
expected_num_ent = CPPC_V2_NUM_ENT;
|
|
||||||
break;
|
|
||||||
case CPPC_V3_REV:
|
|
||||||
expected_num_ent = CPPC_V3_NUM_ENT;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
pr_debug("Firmware exports unsupported CPPC revision: %d\n",
|
|
||||||
revision);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (expected_num_ent != num_ent) {
|
|
||||||
pr_debug("Firmware exports %d entries. Expected: %d for CPPC rev:%d\n",
|
|
||||||
num_ent, expected_num_ent, revision);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* An example CPC table looks like the following.
|
* An example CPC table looks like the following.
|
||||||
*
|
*
|
||||||
|
@ -752,7 +725,6 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
|
||||||
cpc_obj->type);
|
cpc_obj->type);
|
||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
cpc_ptr->num_entries = num_ent;
|
|
||||||
|
|
||||||
/* Second entry should be revision. */
|
/* Second entry should be revision. */
|
||||||
cpc_obj = &out_obj->package.elements[1];
|
cpc_obj = &out_obj->package.elements[1];
|
||||||
|
@ -763,10 +735,32 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
|
||||||
cpc_obj->type);
|
cpc_obj->type);
|
||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
cpc_ptr->version = cpc_rev;
|
|
||||||
|
|
||||||
if (!is_cppc_supported(cpc_rev, num_ent))
|
if (cpc_rev < CPPC_V2_REV) {
|
||||||
|
pr_debug("Unsupported _CPC Revision (%d) for CPU:%d\n", cpc_rev,
|
||||||
|
pr->id);
|
||||||
goto out_free;
|
goto out_free;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Disregard _CPC if the number of entries in the return pachage is not
|
||||||
|
* as expected, but support future revisions being proper supersets of
|
||||||
|
* the v3 and only causing more entries to be returned by _CPC.
|
||||||
|
*/
|
||||||
|
if ((cpc_rev == CPPC_V2_REV && num_ent != CPPC_V2_NUM_ENT) ||
|
||||||
|
(cpc_rev == CPPC_V3_REV && num_ent != CPPC_V3_NUM_ENT) ||
|
||||||
|
(cpc_rev > CPPC_V3_REV && num_ent <= CPPC_V3_NUM_ENT)) {
|
||||||
|
pr_debug("Unexpected number of _CPC return package entries (%d) for CPU:%d\n",
|
||||||
|
num_ent, pr->id);
|
||||||
|
goto out_free;
|
||||||
|
}
|
||||||
|
if (cpc_rev > CPPC_V3_REV) {
|
||||||
|
num_ent = CPPC_V3_NUM_ENT;
|
||||||
|
cpc_rev = CPPC_V3_REV;
|
||||||
|
}
|
||||||
|
|
||||||
|
cpc_ptr->num_entries = num_ent;
|
||||||
|
cpc_ptr->version = cpc_rev;
|
||||||
|
|
||||||
/* Iterate through remaining entries in _CPC */
|
/* Iterate through remaining entries in _CPC */
|
||||||
for (i = 2; i < num_ent; i++) {
|
for (i = 2; i < num_ent; i++) {
|
||||||
|
|
|
@ -2118,13 +2118,6 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = {
|
||||||
DMI_MATCH(DMI_PRODUCT_FAMILY, "Thinkpad X1 Carbon 6th"),
|
DMI_MATCH(DMI_PRODUCT_FAMILY, "Thinkpad X1 Carbon 6th"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
.ident = "ThinkPad X1 Carbon 6th",
|
|
||||||
.matches = {
|
|
||||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
|
||||||
DMI_MATCH(DMI_PRODUCT_FAMILY, "ThinkPad X1 Carbon 6th"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
.ident = "ThinkPad X1 Yoga 3rd",
|
.ident = "ThinkPad X1 Yoga 3rd",
|
||||||
.matches = {
|
.matches = {
|
||||||
|
|
|
@ -132,7 +132,7 @@ static bool acpi_nondev_subnode_ok(acpi_handle scope,
|
||||||
return acpi_nondev_subnode_data_ok(handle, link, list, parent);
|
return acpi_nondev_subnode_data_ok(handle, link, list, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int acpi_add_nondev_subnodes(acpi_handle scope,
|
static bool acpi_add_nondev_subnodes(acpi_handle scope,
|
||||||
const union acpi_object *links,
|
const union acpi_object *links,
|
||||||
struct list_head *list,
|
struct list_head *list,
|
||||||
struct fwnode_handle *parent)
|
struct fwnode_handle *parent)
|
||||||
|
|
|
@ -359,6 +359,14 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "80E3"),
|
DMI_MATCH(DMI_PRODUCT_NAME, "80E3"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.callback = init_nvs_save_s3,
|
||||||
|
.ident = "Lenovo G40-45",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "80E1"),
|
||||||
|
},
|
||||||
|
},
|
||||||
/*
|
/*
|
||||||
* https://bugzilla.kernel.org/show_bug.cgi?id=196907
|
* https://bugzilla.kernel.org/show_bug.cgi?id=196907
|
||||||
* Some Dell XPS13 9360 cannot do suspend-to-idle using the Low Power
|
* Some Dell XPS13 9360 cannot do suspend-to-idle using the Low Power
|
||||||
|
|
|
@ -4560,6 +4560,10 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
|
||||||
{ "PIONEER DVD-RW DVR-212D", NULL, ATA_HORKAGE_NOSETXFER },
|
{ "PIONEER DVD-RW DVR-212D", NULL, ATA_HORKAGE_NOSETXFER },
|
||||||
{ "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER },
|
{ "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER },
|
||||||
|
|
||||||
|
/* These specific Pioneer models have LPM issues */
|
||||||
|
{ "PIONEER BD-RW BDR-207M", NULL, ATA_HORKAGE_NOLPM },
|
||||||
|
{ "PIONEER BD-RW BDR-205", NULL, ATA_HORKAGE_NOLPM },
|
||||||
|
|
||||||
/* Crucial BX100 SSD 500GB has broken LPM support */
|
/* Crucial BX100 SSD 500GB has broken LPM support */
|
||||||
{ "CT500BX100SSD1", NULL, ATA_HORKAGE_NOLPM },
|
{ "CT500BX100SSD1", NULL, ATA_HORKAGE_NOLPM },
|
||||||
|
|
||||||
|
|
|
@ -2350,6 +2350,7 @@ const char *ata_get_cmd_descript(u8 command)
|
||||||
{ ATA_CMD_WRITE_QUEUED_FUA_EXT, "WRITE DMA QUEUED FUA EXT" },
|
{ ATA_CMD_WRITE_QUEUED_FUA_EXT, "WRITE DMA QUEUED FUA EXT" },
|
||||||
{ ATA_CMD_FPDMA_READ, "READ FPDMA QUEUED" },
|
{ ATA_CMD_FPDMA_READ, "READ FPDMA QUEUED" },
|
||||||
{ ATA_CMD_FPDMA_WRITE, "WRITE FPDMA QUEUED" },
|
{ ATA_CMD_FPDMA_WRITE, "WRITE FPDMA QUEUED" },
|
||||||
|
{ ATA_CMD_NCQ_NON_DATA, "NCQ NON-DATA" },
|
||||||
{ ATA_CMD_FPDMA_SEND, "SEND FPDMA QUEUED" },
|
{ ATA_CMD_FPDMA_SEND, "SEND FPDMA QUEUED" },
|
||||||
{ ATA_CMD_FPDMA_RECV, "RECEIVE FPDMA QUEUED" },
|
{ ATA_CMD_FPDMA_RECV, "RECEIVE FPDMA QUEUED" },
|
||||||
{ ATA_CMD_PIO_READ, "READ SECTOR(S)" },
|
{ ATA_CMD_PIO_READ, "READ SECTOR(S)" },
|
||||||
|
|
|
@ -3767,6 +3767,7 @@ static void __exit idt77252_exit(void)
|
||||||
card = idt77252_chain;
|
card = idt77252_chain;
|
||||||
dev = card->atmdev;
|
dev = card->atmdev;
|
||||||
idt77252_chain = card->next;
|
idt77252_chain = card->next;
|
||||||
|
del_timer_sync(&card->tst_timer);
|
||||||
|
|
||||||
if (dev->phy->stop)
|
if (dev->phy->stop)
|
||||||
dev->phy->stop(dev);
|
dev->phy->stop(dev);
|
||||||
|
|
|
@ -759,6 +759,11 @@ static int __device_attach_driver(struct device_driver *drv, void *_data)
|
||||||
} else if (ret == -EPROBE_DEFER) {
|
} else if (ret == -EPROBE_DEFER) {
|
||||||
dev_dbg(dev, "Device match requests probe deferral\n");
|
dev_dbg(dev, "Device match requests probe deferral\n");
|
||||||
driver_deferred_probe_add(dev);
|
driver_deferred_probe_add(dev);
|
||||||
|
/*
|
||||||
|
* Device can't match with a driver right now, so don't attempt
|
||||||
|
* to match or bind with other drivers on the bus.
|
||||||
|
*/
|
||||||
|
return ret;
|
||||||
} else if (ret < 0) {
|
} else if (ret < 0) {
|
||||||
dev_dbg(dev, "Bus failed to match device: %d", ret);
|
dev_dbg(dev, "Bus failed to match device: %d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -912,6 +917,11 @@ static int __driver_attach(struct device *dev, void *data)
|
||||||
} else if (ret == -EPROBE_DEFER) {
|
} else if (ret == -EPROBE_DEFER) {
|
||||||
dev_dbg(dev, "Device match requests probe deferral\n");
|
dev_dbg(dev, "Device match requests probe deferral\n");
|
||||||
driver_deferred_probe_add(dev);
|
driver_deferred_probe_add(dev);
|
||||||
|
/*
|
||||||
|
* Driver could not match with device, but may match with
|
||||||
|
* another device on the bus.
|
||||||
|
*/
|
||||||
|
return 0;
|
||||||
} else if (ret < 0) {
|
} else if (ret < 0) {
|
||||||
dev_dbg(dev, "Bus failed to match device: %d", ret);
|
dev_dbg(dev, "Bus failed to match device: %d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -1410,6 +1410,11 @@ loop_get_status(struct loop_device *lo, struct loop_info64 *info)
|
||||||
info->lo_number = lo->lo_number;
|
info->lo_number = lo->lo_number;
|
||||||
info->lo_offset = lo->lo_offset;
|
info->lo_offset = lo->lo_offset;
|
||||||
info->lo_sizelimit = lo->lo_sizelimit;
|
info->lo_sizelimit = lo->lo_sizelimit;
|
||||||
|
|
||||||
|
/* loff_t vars have been assigned __u64 */
|
||||||
|
if (lo->lo_offset < 0 || lo->lo_sizelimit < 0)
|
||||||
|
return -EOVERFLOW;
|
||||||
|
|
||||||
info->lo_flags = lo->lo_flags;
|
info->lo_flags = lo->lo_flags;
|
||||||
memcpy(info->lo_file_name, lo->lo_file_name, LO_NAME_SIZE);
|
memcpy(info->lo_file_name, lo->lo_file_name, LO_NAME_SIZE);
|
||||||
memcpy(info->lo_crypt_name, lo->lo_crypt_name, LO_NAME_SIZE);
|
memcpy(info->lo_crypt_name, lo->lo_crypt_name, LO_NAME_SIZE);
|
||||||
|
|
|
@ -1819,8 +1819,13 @@ static int null_add_dev(struct nullb_device *dev)
|
||||||
blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, nullb->q);
|
blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, nullb->q);
|
||||||
|
|
||||||
mutex_lock(&lock);
|
mutex_lock(&lock);
|
||||||
nullb->index = ida_simple_get(&nullb_indexes, 0, 0, GFP_KERNEL);
|
rv = ida_simple_get(&nullb_indexes, 0, 0, GFP_KERNEL);
|
||||||
dev->index = nullb->index;
|
if (rv < 0) {
|
||||||
|
mutex_unlock(&lock);
|
||||||
|
goto out_cleanup_zone;
|
||||||
|
}
|
||||||
|
nullb->index = rv;
|
||||||
|
dev->index = rv;
|
||||||
mutex_unlock(&lock);
|
mutex_unlock(&lock);
|
||||||
|
|
||||||
blk_queue_logical_block_size(nullb->q, dev->blocksize);
|
blk_queue_logical_block_size(nullb->q, dev->blocksize);
|
||||||
|
@ -1832,13 +1837,16 @@ static int null_add_dev(struct nullb_device *dev)
|
||||||
|
|
||||||
rv = null_gendisk_register(nullb);
|
rv = null_gendisk_register(nullb);
|
||||||
if (rv)
|
if (rv)
|
||||||
goto out_cleanup_zone;
|
goto out_ida_free;
|
||||||
|
|
||||||
mutex_lock(&lock);
|
mutex_lock(&lock);
|
||||||
list_add_tail(&nullb->list, &nullb_list);
|
list_add_tail(&nullb->list, &nullb_list);
|
||||||
mutex_unlock(&lock);
|
mutex_unlock(&lock);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
out_ida_free:
|
||||||
|
ida_free(&nullb_indexes, nullb->index);
|
||||||
out_cleanup_zone:
|
out_cleanup_zone:
|
||||||
if (dev->zoned)
|
if (dev->zoned)
|
||||||
null_zone_exit(dev);
|
null_zone_exit(dev);
|
||||||
|
|
|
@ -1253,7 +1253,11 @@ static struct platform_driver intel_driver = {
|
||||||
|
|
||||||
int __init intel_init(void)
|
int __init intel_init(void)
|
||||||
{
|
{
|
||||||
platform_driver_register(&intel_driver);
|
int err;
|
||||||
|
|
||||||
|
err = platform_driver_register(&intel_driver);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
|
||||||
return hci_uart_register_proto(&intel_proto);
|
return hci_uart_register_proto(&intel_proto);
|
||||||
}
|
}
|
||||||
|
|
|
@ -504,13 +504,13 @@ static int hisi_lpc_acpi_probe(struct device *hostdev)
|
||||||
{
|
{
|
||||||
struct acpi_device *adev = ACPI_COMPANION(hostdev);
|
struct acpi_device *adev = ACPI_COMPANION(hostdev);
|
||||||
struct acpi_device *child;
|
struct acpi_device *child;
|
||||||
|
struct platform_device *pdev;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Only consider the children of the host */
|
/* Only consider the children of the host */
|
||||||
list_for_each_entry(child, &adev->children, node) {
|
list_for_each_entry(child, &adev->children, node) {
|
||||||
const char *hid = acpi_device_hid(child);
|
const char *hid = acpi_device_hid(child);
|
||||||
const struct hisi_lpc_acpi_cell *cell;
|
const struct hisi_lpc_acpi_cell *cell;
|
||||||
struct platform_device *pdev;
|
|
||||||
const struct resource *res;
|
const struct resource *res;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
int num_res;
|
int num_res;
|
||||||
|
@ -573,22 +573,24 @@ static int hisi_lpc_acpi_probe(struct device *hostdev)
|
||||||
|
|
||||||
ret = platform_device_add_resources(pdev, res, num_res);
|
ret = platform_device_add_resources(pdev, res, num_res);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto fail;
|
goto fail_put_device;
|
||||||
|
|
||||||
ret = platform_device_add_data(pdev, cell->pdata,
|
ret = platform_device_add_data(pdev, cell->pdata,
|
||||||
cell->pdata_size);
|
cell->pdata_size);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto fail;
|
goto fail_put_device;
|
||||||
|
|
||||||
ret = platform_device_add(pdev);
|
ret = platform_device_add(pdev);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto fail;
|
goto fail_put_device;
|
||||||
|
|
||||||
acpi_device_set_enumerated(child);
|
acpi_device_set_enumerated(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
fail_put_device:
|
||||||
|
platform_device_put(pdev);
|
||||||
fail:
|
fail:
|
||||||
hisi_lpc_acpi_remove(hostdev);
|
hisi_lpc_acpi_remove(hostdev);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -736,6 +736,7 @@ void iproc_pll_clk_setup(struct device_node *node,
|
||||||
const char *parent_name;
|
const char *parent_name;
|
||||||
struct iproc_clk *iclk_array;
|
struct iproc_clk *iclk_array;
|
||||||
struct clk_hw_onecell_data *clk_data;
|
struct clk_hw_onecell_data *clk_data;
|
||||||
|
const char *clk_name;
|
||||||
|
|
||||||
if (WARN_ON(!pll_ctrl) || WARN_ON(!clk_ctrl))
|
if (WARN_ON(!pll_ctrl) || WARN_ON(!clk_ctrl))
|
||||||
return;
|
return;
|
||||||
|
@ -783,7 +784,12 @@ void iproc_pll_clk_setup(struct device_node *node,
|
||||||
iclk = &iclk_array[0];
|
iclk = &iclk_array[0];
|
||||||
iclk->pll = pll;
|
iclk->pll = pll;
|
||||||
|
|
||||||
init.name = node->name;
|
ret = of_property_read_string_index(node, "clock-output-names",
|
||||||
|
0, &clk_name);
|
||||||
|
if (WARN_ON(ret))
|
||||||
|
goto err_pll_register;
|
||||||
|
|
||||||
|
init.name = clk_name;
|
||||||
init.ops = &iproc_pll_ops;
|
init.ops = &iproc_pll_ops;
|
||||||
init.flags = 0;
|
init.flags = 0;
|
||||||
parent_name = of_clk_get_parent_name(node, 0);
|
parent_name = of_clk_get_parent_name(node, 0);
|
||||||
|
@ -803,13 +809,11 @@ void iproc_pll_clk_setup(struct device_node *node,
|
||||||
goto err_pll_register;
|
goto err_pll_register;
|
||||||
|
|
||||||
clk_data->hws[0] = &iclk->hw;
|
clk_data->hws[0] = &iclk->hw;
|
||||||
|
parent_name = clk_name;
|
||||||
|
|
||||||
/* now initialize and register all leaf clocks */
|
/* now initialize and register all leaf clocks */
|
||||||
for (i = 1; i < num_clks; i++) {
|
for (i = 1; i < num_clks; i++) {
|
||||||
const char *clk_name;
|
|
||||||
|
|
||||||
memset(&init, 0, sizeof(init));
|
memset(&init, 0, sizeof(init));
|
||||||
parent_name = node->name;
|
|
||||||
|
|
||||||
ret = of_property_read_string_index(node, "clock-output-names",
|
ret = of_property_read_string_index(node, "clock-output-names",
|
||||||
i, &clk_name);
|
i, &clk_name);
|
||||||
|
|
|
@ -1017,8 +1017,6 @@ static void clk_core_unprepare(struct clk_core *core)
|
||||||
if (core->ops->unprepare)
|
if (core->ops->unprepare)
|
||||||
core->ops->unprepare(core->hw);
|
core->ops->unprepare(core->hw);
|
||||||
|
|
||||||
clk_pm_runtime_put(core);
|
|
||||||
|
|
||||||
trace_clk_unprepare_complete(core);
|
trace_clk_unprepare_complete(core);
|
||||||
|
|
||||||
if (core->vdd_class) {
|
if (core->vdd_class) {
|
||||||
|
@ -1028,6 +1026,7 @@ static void clk_core_unprepare(struct clk_core *core)
|
||||||
}
|
}
|
||||||
|
|
||||||
clk_core_unprepare(core->parent);
|
clk_core_unprepare(core->parent);
|
||||||
|
clk_pm_runtime_put(core);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clk_core_unprepare_lock(struct clk_core *core)
|
static void clk_core_unprepare_lock(struct clk_core *core)
|
||||||
|
|
|
@ -675,6 +675,7 @@ static struct clk_branch gcc_sleep_clk_src = {
|
||||||
},
|
},
|
||||||
.num_parents = 1,
|
.num_parents = 1,
|
||||||
.ops = &clk_branch2_ops,
|
.ops = &clk_branch2_ops,
|
||||||
|
.flags = CLK_IS_CRITICAL,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -1796,8 +1797,10 @@ static struct clk_regmap_div nss_port4_tx_div_clk_src = {
|
||||||
static const struct freq_tbl ftbl_nss_port5_rx_clk_src[] = {
|
static const struct freq_tbl ftbl_nss_port5_rx_clk_src[] = {
|
||||||
F(19200000, P_XO, 1, 0, 0),
|
F(19200000, P_XO, 1, 0, 0),
|
||||||
F(25000000, P_UNIPHY1_RX, 12.5, 0, 0),
|
F(25000000, P_UNIPHY1_RX, 12.5, 0, 0),
|
||||||
|
F(25000000, P_UNIPHY0_RX, 5, 0, 0),
|
||||||
F(78125000, P_UNIPHY1_RX, 4, 0, 0),
|
F(78125000, P_UNIPHY1_RX, 4, 0, 0),
|
||||||
F(125000000, P_UNIPHY1_RX, 2.5, 0, 0),
|
F(125000000, P_UNIPHY1_RX, 2.5, 0, 0),
|
||||||
|
F(125000000, P_UNIPHY0_RX, 1, 0, 0),
|
||||||
F(156250000, P_UNIPHY1_RX, 2, 0, 0),
|
F(156250000, P_UNIPHY1_RX, 2, 0, 0),
|
||||||
F(312500000, P_UNIPHY1_RX, 1, 0, 0),
|
F(312500000, P_UNIPHY1_RX, 1, 0, 0),
|
||||||
{ }
|
{ }
|
||||||
|
@ -1836,8 +1839,10 @@ static struct clk_regmap_div nss_port5_rx_div_clk_src = {
|
||||||
static const struct freq_tbl ftbl_nss_port5_tx_clk_src[] = {
|
static const struct freq_tbl ftbl_nss_port5_tx_clk_src[] = {
|
||||||
F(19200000, P_XO, 1, 0, 0),
|
F(19200000, P_XO, 1, 0, 0),
|
||||||
F(25000000, P_UNIPHY1_TX, 12.5, 0, 0),
|
F(25000000, P_UNIPHY1_TX, 12.5, 0, 0),
|
||||||
|
F(25000000, P_UNIPHY0_TX, 5, 0, 0),
|
||||||
F(78125000, P_UNIPHY1_TX, 4, 0, 0),
|
F(78125000, P_UNIPHY1_TX, 4, 0, 0),
|
||||||
F(125000000, P_UNIPHY1_TX, 2.5, 0, 0),
|
F(125000000, P_UNIPHY1_TX, 2.5, 0, 0),
|
||||||
|
F(125000000, P_UNIPHY0_TX, 1, 0, 0),
|
||||||
F(156250000, P_UNIPHY1_TX, 2, 0, 0),
|
F(156250000, P_UNIPHY1_TX, 2, 0, 0),
|
||||||
F(312500000, P_UNIPHY1_TX, 1, 0, 0),
|
F(312500000, P_UNIPHY1_TX, 1, 0, 0),
|
||||||
{ }
|
{ }
|
||||||
|
@ -1875,8 +1880,10 @@ static struct clk_regmap_div nss_port5_tx_div_clk_src = {
|
||||||
|
|
||||||
static const struct freq_tbl ftbl_nss_port6_rx_clk_src[] = {
|
static const struct freq_tbl ftbl_nss_port6_rx_clk_src[] = {
|
||||||
F(19200000, P_XO, 1, 0, 0),
|
F(19200000, P_XO, 1, 0, 0),
|
||||||
|
F(25000000, P_UNIPHY2_RX, 5, 0, 0),
|
||||||
F(25000000, P_UNIPHY2_RX, 12.5, 0, 0),
|
F(25000000, P_UNIPHY2_RX, 12.5, 0, 0),
|
||||||
F(78125000, P_UNIPHY2_RX, 4, 0, 0),
|
F(78125000, P_UNIPHY2_RX, 4, 0, 0),
|
||||||
|
F(125000000, P_UNIPHY2_RX, 1, 0, 0),
|
||||||
F(125000000, P_UNIPHY2_RX, 2.5, 0, 0),
|
F(125000000, P_UNIPHY2_RX, 2.5, 0, 0),
|
||||||
F(156250000, P_UNIPHY2_RX, 2, 0, 0),
|
F(156250000, P_UNIPHY2_RX, 2, 0, 0),
|
||||||
F(312500000, P_UNIPHY2_RX, 1, 0, 0),
|
F(312500000, P_UNIPHY2_RX, 1, 0, 0),
|
||||||
|
@ -1915,8 +1922,10 @@ static struct clk_regmap_div nss_port6_rx_div_clk_src = {
|
||||||
|
|
||||||
static const struct freq_tbl ftbl_nss_port6_tx_clk_src[] = {
|
static const struct freq_tbl ftbl_nss_port6_tx_clk_src[] = {
|
||||||
F(19200000, P_XO, 1, 0, 0),
|
F(19200000, P_XO, 1, 0, 0),
|
||||||
|
F(25000000, P_UNIPHY2_TX, 5, 0, 0),
|
||||||
F(25000000, P_UNIPHY2_TX, 12.5, 0, 0),
|
F(25000000, P_UNIPHY2_TX, 12.5, 0, 0),
|
||||||
F(78125000, P_UNIPHY2_TX, 4, 0, 0),
|
F(78125000, P_UNIPHY2_TX, 4, 0, 0),
|
||||||
|
F(125000000, P_UNIPHY2_TX, 1, 0, 0),
|
||||||
F(125000000, P_UNIPHY2_TX, 2.5, 0, 0),
|
F(125000000, P_UNIPHY2_TX, 2.5, 0, 0),
|
||||||
F(156250000, P_UNIPHY2_TX, 2, 0, 0),
|
F(156250000, P_UNIPHY2_TX, 2, 0, 0),
|
||||||
F(312500000, P_UNIPHY2_TX, 1, 0, 0),
|
F(312500000, P_UNIPHY2_TX, 1, 0, 0),
|
||||||
|
@ -3354,6 +3363,7 @@ static struct clk_branch gcc_nssnoc_ubi1_ahb_clk = {
|
||||||
|
|
||||||
static struct clk_branch gcc_ubi0_ahb_clk = {
|
static struct clk_branch gcc_ubi0_ahb_clk = {
|
||||||
.halt_reg = 0x6820c,
|
.halt_reg = 0x6820c,
|
||||||
|
.halt_check = BRANCH_HALT_DELAY,
|
||||||
.clkr = {
|
.clkr = {
|
||||||
.enable_reg = 0x6820c,
|
.enable_reg = 0x6820c,
|
||||||
.enable_mask = BIT(0),
|
.enable_mask = BIT(0),
|
||||||
|
@ -3371,6 +3381,7 @@ static struct clk_branch gcc_ubi0_ahb_clk = {
|
||||||
|
|
||||||
static struct clk_branch gcc_ubi0_axi_clk = {
|
static struct clk_branch gcc_ubi0_axi_clk = {
|
||||||
.halt_reg = 0x68200,
|
.halt_reg = 0x68200,
|
||||||
|
.halt_check = BRANCH_HALT_DELAY,
|
||||||
.clkr = {
|
.clkr = {
|
||||||
.enable_reg = 0x68200,
|
.enable_reg = 0x68200,
|
||||||
.enable_mask = BIT(0),
|
.enable_mask = BIT(0),
|
||||||
|
@ -3388,6 +3399,7 @@ static struct clk_branch gcc_ubi0_axi_clk = {
|
||||||
|
|
||||||
static struct clk_branch gcc_ubi0_nc_axi_clk = {
|
static struct clk_branch gcc_ubi0_nc_axi_clk = {
|
||||||
.halt_reg = 0x68204,
|
.halt_reg = 0x68204,
|
||||||
|
.halt_check = BRANCH_HALT_DELAY,
|
||||||
.clkr = {
|
.clkr = {
|
||||||
.enable_reg = 0x68204,
|
.enable_reg = 0x68204,
|
||||||
.enable_mask = BIT(0),
|
.enable_mask = BIT(0),
|
||||||
|
@ -3405,6 +3417,7 @@ static struct clk_branch gcc_ubi0_nc_axi_clk = {
|
||||||
|
|
||||||
static struct clk_branch gcc_ubi0_core_clk = {
|
static struct clk_branch gcc_ubi0_core_clk = {
|
||||||
.halt_reg = 0x68210,
|
.halt_reg = 0x68210,
|
||||||
|
.halt_check = BRANCH_HALT_DELAY,
|
||||||
.clkr = {
|
.clkr = {
|
||||||
.enable_reg = 0x68210,
|
.enable_reg = 0x68210,
|
||||||
.enable_mask = BIT(0),
|
.enable_mask = BIT(0),
|
||||||
|
@ -3422,6 +3435,7 @@ static struct clk_branch gcc_ubi0_core_clk = {
|
||||||
|
|
||||||
static struct clk_branch gcc_ubi0_mpt_clk = {
|
static struct clk_branch gcc_ubi0_mpt_clk = {
|
||||||
.halt_reg = 0x68208,
|
.halt_reg = 0x68208,
|
||||||
|
.halt_check = BRANCH_HALT_DELAY,
|
||||||
.clkr = {
|
.clkr = {
|
||||||
.enable_reg = 0x68208,
|
.enable_reg = 0x68208,
|
||||||
.enable_mask = BIT(0),
|
.enable_mask = BIT(0),
|
||||||
|
@ -3439,6 +3453,7 @@ static struct clk_branch gcc_ubi0_mpt_clk = {
|
||||||
|
|
||||||
static struct clk_branch gcc_ubi1_ahb_clk = {
|
static struct clk_branch gcc_ubi1_ahb_clk = {
|
||||||
.halt_reg = 0x6822c,
|
.halt_reg = 0x6822c,
|
||||||
|
.halt_check = BRANCH_HALT_DELAY,
|
||||||
.clkr = {
|
.clkr = {
|
||||||
.enable_reg = 0x6822c,
|
.enable_reg = 0x6822c,
|
||||||
.enable_mask = BIT(0),
|
.enable_mask = BIT(0),
|
||||||
|
@ -3456,6 +3471,7 @@ static struct clk_branch gcc_ubi1_ahb_clk = {
|
||||||
|
|
||||||
static struct clk_branch gcc_ubi1_axi_clk = {
|
static struct clk_branch gcc_ubi1_axi_clk = {
|
||||||
.halt_reg = 0x68220,
|
.halt_reg = 0x68220,
|
||||||
|
.halt_check = BRANCH_HALT_DELAY,
|
||||||
.clkr = {
|
.clkr = {
|
||||||
.enable_reg = 0x68220,
|
.enable_reg = 0x68220,
|
||||||
.enable_mask = BIT(0),
|
.enable_mask = BIT(0),
|
||||||
|
@ -3473,6 +3489,7 @@ static struct clk_branch gcc_ubi1_axi_clk = {
|
||||||
|
|
||||||
static struct clk_branch gcc_ubi1_nc_axi_clk = {
|
static struct clk_branch gcc_ubi1_nc_axi_clk = {
|
||||||
.halt_reg = 0x68224,
|
.halt_reg = 0x68224,
|
||||||
|
.halt_check = BRANCH_HALT_DELAY,
|
||||||
.clkr = {
|
.clkr = {
|
||||||
.enable_reg = 0x68224,
|
.enable_reg = 0x68224,
|
||||||
.enable_mask = BIT(0),
|
.enable_mask = BIT(0),
|
||||||
|
@ -3490,6 +3507,7 @@ static struct clk_branch gcc_ubi1_nc_axi_clk = {
|
||||||
|
|
||||||
static struct clk_branch gcc_ubi1_core_clk = {
|
static struct clk_branch gcc_ubi1_core_clk = {
|
||||||
.halt_reg = 0x68230,
|
.halt_reg = 0x68230,
|
||||||
|
.halt_check = BRANCH_HALT_DELAY,
|
||||||
.clkr = {
|
.clkr = {
|
||||||
.enable_reg = 0x68230,
|
.enable_reg = 0x68230,
|
||||||
.enable_mask = BIT(0),
|
.enable_mask = BIT(0),
|
||||||
|
@ -3507,6 +3525,7 @@ static struct clk_branch gcc_ubi1_core_clk = {
|
||||||
|
|
||||||
static struct clk_branch gcc_ubi1_mpt_clk = {
|
static struct clk_branch gcc_ubi1_mpt_clk = {
|
||||||
.halt_reg = 0x68228,
|
.halt_reg = 0x68228,
|
||||||
|
.halt_check = BRANCH_HALT_DELAY,
|
||||||
.clkr = {
|
.clkr = {
|
||||||
.enable_reg = 0x68228,
|
.enable_reg = 0x68228,
|
||||||
.enable_mask = BIT(0),
|
.enable_mask = BIT(0),
|
||||||
|
|
|
@ -277,8 +277,8 @@ static const struct r9a06g032_clkdesc r9a06g032_clocks[] __initconst = {
|
||||||
.name = "uart_group_012",
|
.name = "uart_group_012",
|
||||||
.type = K_BITSEL,
|
.type = K_BITSEL,
|
||||||
.source = 1 + R9A06G032_DIV_UART,
|
.source = 1 + R9A06G032_DIV_UART,
|
||||||
/* R9A06G032_SYSCTRL_REG_PWRCTRL_PG1_PR2 */
|
/* R9A06G032_SYSCTRL_REG_PWRCTRL_PG0_0 */
|
||||||
.dual.sel = ((0xec / 4) << 5) | 24,
|
.dual.sel = ((0x34 / 4) << 5) | 30,
|
||||||
.dual.group = 0,
|
.dual.group = 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -286,8 +286,8 @@ static const struct r9a06g032_clkdesc r9a06g032_clocks[] __initconst = {
|
||||||
.name = "uart_group_34567",
|
.name = "uart_group_34567",
|
||||||
.type = K_BITSEL,
|
.type = K_BITSEL,
|
||||||
.source = 1 + R9A06G032_DIV_P2_PG,
|
.source = 1 + R9A06G032_DIV_P2_PG,
|
||||||
/* R9A06G032_SYSCTRL_REG_PWRCTRL_PG0_0 */
|
/* R9A06G032_SYSCTRL_REG_PWRCTRL_PG1_PR2 */
|
||||||
.dual.sel = ((0x34 / 4) << 5) | 30,
|
.dual.sel = ((0xec / 4) << 5) | 24,
|
||||||
.dual.group = 1,
|
.dual.group = 1,
|
||||||
},
|
},
|
||||||
D_UGATE(CLK_UART0, "clk_uart0", UART_GROUP_012, 0, 0, 0x1b2, 0x1b3, 0x1b4, 0x1b5),
|
D_UGATE(CLK_UART0, "clk_uart0", UART_GROUP_012, 0, 0, 0x1b2, 0x1b3, 0x1b4, 0x1b5),
|
||||||
|
|
|
@ -457,7 +457,7 @@ static void sec_skcipher_alg_callback(struct sec_bd_info *sec_resp,
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_lock(&ctx->queue->queuelock);
|
spin_lock_bh(&ctx->queue->queuelock);
|
||||||
/* Put the IV in place for chained cases */
|
/* Put the IV in place for chained cases */
|
||||||
switch (ctx->cipher_alg) {
|
switch (ctx->cipher_alg) {
|
||||||
case SEC_C_AES_CBC_128:
|
case SEC_C_AES_CBC_128:
|
||||||
|
@ -517,7 +517,7 @@ static void sec_skcipher_alg_callback(struct sec_bd_info *sec_resp,
|
||||||
list_del(&backlog_req->backlog_head);
|
list_del(&backlog_req->backlog_head);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mutex_unlock(&ctx->queue->queuelock);
|
spin_unlock_bh(&ctx->queue->queuelock);
|
||||||
|
|
||||||
mutex_lock(&sec_req->lock);
|
mutex_lock(&sec_req->lock);
|
||||||
list_del(&sec_req_el->head);
|
list_del(&sec_req_el->head);
|
||||||
|
@ -806,7 +806,7 @@ static int sec_alg_skcipher_crypto(struct skcipher_request *skreq,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Grab a big lock for a long time to avoid concurrency issues */
|
/* Grab a big lock for a long time to avoid concurrency issues */
|
||||||
mutex_lock(&queue->queuelock);
|
spin_lock_bh(&queue->queuelock);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Can go on to queue if we have space in either:
|
* Can go on to queue if we have space in either:
|
||||||
|
@ -822,15 +822,15 @@ static int sec_alg_skcipher_crypto(struct skcipher_request *skreq,
|
||||||
ret = -EBUSY;
|
ret = -EBUSY;
|
||||||
if ((skreq->base.flags & CRYPTO_TFM_REQ_MAY_BACKLOG)) {
|
if ((skreq->base.flags & CRYPTO_TFM_REQ_MAY_BACKLOG)) {
|
||||||
list_add_tail(&sec_req->backlog_head, &ctx->backlog);
|
list_add_tail(&sec_req->backlog_head, &ctx->backlog);
|
||||||
mutex_unlock(&queue->queuelock);
|
spin_unlock_bh(&queue->queuelock);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_unlock(&queue->queuelock);
|
spin_unlock_bh(&queue->queuelock);
|
||||||
goto err_free_elements;
|
goto err_free_elements;
|
||||||
}
|
}
|
||||||
ret = sec_send_request(sec_req, queue);
|
ret = sec_send_request(sec_req, queue);
|
||||||
mutex_unlock(&queue->queuelock);
|
spin_unlock_bh(&queue->queuelock);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_free_elements;
|
goto err_free_elements;
|
||||||
|
|
||||||
|
@ -889,7 +889,7 @@ static int sec_alg_skcipher_init(struct crypto_skcipher *tfm)
|
||||||
if (IS_ERR(ctx->queue))
|
if (IS_ERR(ctx->queue))
|
||||||
return PTR_ERR(ctx->queue);
|
return PTR_ERR(ctx->queue);
|
||||||
|
|
||||||
mutex_init(&ctx->queue->queuelock);
|
spin_lock_init(&ctx->queue->queuelock);
|
||||||
ctx->queue->havesoftqueue = false;
|
ctx->queue->havesoftqueue = false;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -347,7 +347,7 @@ struct sec_queue {
|
||||||
DECLARE_BITMAP(unprocessed, SEC_QUEUE_LEN);
|
DECLARE_BITMAP(unprocessed, SEC_QUEUE_LEN);
|
||||||
DECLARE_KFIFO_PTR(softqueue, typeof(struct sec_request_el *));
|
DECLARE_KFIFO_PTR(softqueue, typeof(struct sec_request_el *));
|
||||||
bool havesoftqueue;
|
bool havesoftqueue;
|
||||||
struct mutex queuelock;
|
spinlock_t queuelock;
|
||||||
void *shadow[SEC_QUEUE_LEN];
|
void *shadow[SEC_QUEUE_LEN];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -987,11 +987,8 @@ static int sprd_dma_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct sprd_dma_dev *sdev = platform_get_drvdata(pdev);
|
struct sprd_dma_dev *sdev = platform_get_drvdata(pdev);
|
||||||
struct sprd_dma_chn *c, *cn;
|
struct sprd_dma_chn *c, *cn;
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = pm_runtime_get_sync(&pdev->dev);
|
pm_runtime_get_sync(&pdev->dev);
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
/* explicitly free the irq */
|
/* explicitly free the irq */
|
||||||
if (sdev->irq > 0)
|
if (sdev->irq > 0)
|
||||||
|
|
|
@ -826,7 +826,7 @@ static int scpi_init_versions(struct scpi_drvinfo *info)
|
||||||
info->firmware_version = le32_to_cpu(caps.platform_version);
|
info->firmware_version = le32_to_cpu(caps.platform_version);
|
||||||
}
|
}
|
||||||
/* Ignore error if not implemented */
|
/* Ignore error if not implemented */
|
||||||
if (scpi_info->is_legacy && ret == -EOPNOTSUPP)
|
if (info->is_legacy && ret == -EOPNOTSUPP)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -916,13 +916,14 @@ static int scpi_probe(struct platform_device *pdev)
|
||||||
struct resource res;
|
struct resource res;
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct device_node *np = dev->of_node;
|
struct device_node *np = dev->of_node;
|
||||||
|
struct scpi_drvinfo *scpi_drvinfo;
|
||||||
|
|
||||||
scpi_info = devm_kzalloc(dev, sizeof(*scpi_info), GFP_KERNEL);
|
scpi_drvinfo = devm_kzalloc(dev, sizeof(*scpi_drvinfo), GFP_KERNEL);
|
||||||
if (!scpi_info)
|
if (!scpi_drvinfo)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
if (of_match_device(legacy_scpi_of_match, &pdev->dev))
|
if (of_match_device(legacy_scpi_of_match, &pdev->dev))
|
||||||
scpi_info->is_legacy = true;
|
scpi_drvinfo->is_legacy = true;
|
||||||
|
|
||||||
count = of_count_phandle_with_args(np, "mboxes", "#mbox-cells");
|
count = of_count_phandle_with_args(np, "mboxes", "#mbox-cells");
|
||||||
if (count < 0) {
|
if (count < 0) {
|
||||||
|
@ -930,19 +931,19 @@ static int scpi_probe(struct platform_device *pdev)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
scpi_info->channels = devm_kcalloc(dev, count, sizeof(struct scpi_chan),
|
scpi_drvinfo->channels =
|
||||||
GFP_KERNEL);
|
devm_kcalloc(dev, count, sizeof(struct scpi_chan), GFP_KERNEL);
|
||||||
if (!scpi_info->channels)
|
if (!scpi_drvinfo->channels)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
ret = devm_add_action(dev, scpi_free_channels, scpi_info);
|
ret = devm_add_action(dev, scpi_free_channels, scpi_drvinfo);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
for (; scpi_info->num_chans < count; scpi_info->num_chans++) {
|
for (; scpi_drvinfo->num_chans < count; scpi_drvinfo->num_chans++) {
|
||||||
resource_size_t size;
|
resource_size_t size;
|
||||||
int idx = scpi_info->num_chans;
|
int idx = scpi_drvinfo->num_chans;
|
||||||
struct scpi_chan *pchan = scpi_info->channels + idx;
|
struct scpi_chan *pchan = scpi_drvinfo->channels + idx;
|
||||||
struct mbox_client *cl = &pchan->cl;
|
struct mbox_client *cl = &pchan->cl;
|
||||||
struct device_node *shmem = of_parse_phandle(np, "shmem", idx);
|
struct device_node *shmem = of_parse_phandle(np, "shmem", idx);
|
||||||
|
|
||||||
|
@ -986,49 +987,57 @@ static int scpi_probe(struct platform_device *pdev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
scpi_info->commands = scpi_std_commands;
|
scpi_drvinfo->commands = scpi_std_commands;
|
||||||
|
|
||||||
platform_set_drvdata(pdev, scpi_info);
|
platform_set_drvdata(pdev, scpi_drvinfo);
|
||||||
|
|
||||||
if (scpi_info->is_legacy) {
|
if (scpi_drvinfo->is_legacy) {
|
||||||
/* Replace with legacy variants */
|
/* Replace with legacy variants */
|
||||||
scpi_ops.clk_set_val = legacy_scpi_clk_set_val;
|
scpi_ops.clk_set_val = legacy_scpi_clk_set_val;
|
||||||
scpi_info->commands = scpi_legacy_commands;
|
scpi_drvinfo->commands = scpi_legacy_commands;
|
||||||
|
|
||||||
/* Fill priority bitmap */
|
/* Fill priority bitmap */
|
||||||
for (idx = 0; idx < ARRAY_SIZE(legacy_hpriority_cmds); idx++)
|
for (idx = 0; idx < ARRAY_SIZE(legacy_hpriority_cmds); idx++)
|
||||||
set_bit(legacy_hpriority_cmds[idx],
|
set_bit(legacy_hpriority_cmds[idx],
|
||||||
scpi_info->cmd_priority);
|
scpi_drvinfo->cmd_priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = scpi_init_versions(scpi_info);
|
scpi_info = scpi_drvinfo;
|
||||||
|
|
||||||
|
ret = scpi_init_versions(scpi_drvinfo);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "incorrect or no SCP firmware found\n");
|
dev_err(dev, "incorrect or no SCP firmware found\n");
|
||||||
|
scpi_info = NULL;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scpi_info->is_legacy && !scpi_info->protocol_version &&
|
if (scpi_drvinfo->is_legacy && !scpi_drvinfo->protocol_version &&
|
||||||
!scpi_info->firmware_version)
|
!scpi_drvinfo->firmware_version)
|
||||||
dev_info(dev, "SCP Protocol legacy pre-1.0 firmware\n");
|
dev_info(dev, "SCP Protocol legacy pre-1.0 firmware\n");
|
||||||
else
|
else
|
||||||
dev_info(dev, "SCP Protocol %lu.%lu Firmware %lu.%lu.%lu version\n",
|
dev_info(dev, "SCP Protocol %lu.%lu Firmware %lu.%lu.%lu version\n",
|
||||||
FIELD_GET(PROTO_REV_MAJOR_MASK,
|
FIELD_GET(PROTO_REV_MAJOR_MASK,
|
||||||
scpi_info->protocol_version),
|
scpi_drvinfo->protocol_version),
|
||||||
FIELD_GET(PROTO_REV_MINOR_MASK,
|
FIELD_GET(PROTO_REV_MINOR_MASK,
|
||||||
scpi_info->protocol_version),
|
scpi_drvinfo->protocol_version),
|
||||||
FIELD_GET(FW_REV_MAJOR_MASK,
|
FIELD_GET(FW_REV_MAJOR_MASK,
|
||||||
scpi_info->firmware_version),
|
scpi_drvinfo->firmware_version),
|
||||||
FIELD_GET(FW_REV_MINOR_MASK,
|
FIELD_GET(FW_REV_MINOR_MASK,
|
||||||
scpi_info->firmware_version),
|
scpi_drvinfo->firmware_version),
|
||||||
FIELD_GET(FW_REV_PATCH_MASK,
|
FIELD_GET(FW_REV_PATCH_MASK,
|
||||||
scpi_info->firmware_version));
|
scpi_drvinfo->firmware_version));
|
||||||
scpi_info->scpi_ops = &scpi_ops;
|
|
||||||
|
|
||||||
ret = devm_device_add_groups(dev, versions_groups);
|
ret = devm_device_add_groups(dev, versions_groups);
|
||||||
if (ret)
|
if (ret)
|
||||||
dev_err(dev, "unable to create sysfs version group\n");
|
dev_err(dev, "unable to create sysfs version group\n");
|
||||||
|
|
||||||
return devm_of_platform_populate(dev);
|
scpi_drvinfo->scpi_ops = &scpi_ops;
|
||||||
|
|
||||||
|
ret = devm_of_platform_populate(dev);
|
||||||
|
if (ret)
|
||||||
|
scpi_info = NULL;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct of_device_id scpi_of_match[] = {
|
static const struct of_device_id scpi_of_match[] = {
|
||||||
|
|
|
@ -243,29 +243,6 @@ failed:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* efi_capsule_flush - called by file close or file flush
|
|
||||||
* @file: file pointer
|
|
||||||
* @id: not used
|
|
||||||
*
|
|
||||||
* If a capsule is being partially uploaded then calling this function
|
|
||||||
* will be treated as upload termination and will free those completed
|
|
||||||
* buffer pages and -ECANCELED will be returned.
|
|
||||||
**/
|
|
||||||
static int efi_capsule_flush(struct file *file, fl_owner_t id)
|
|
||||||
{
|
|
||||||
int ret = 0;
|
|
||||||
struct capsule_info *cap_info = file->private_data;
|
|
||||||
|
|
||||||
if (cap_info->index > 0) {
|
|
||||||
pr_err("capsule upload not complete\n");
|
|
||||||
efi_free_all_buff_pages(cap_info);
|
|
||||||
ret = -ECANCELED;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* efi_capsule_release - called by file close
|
* efi_capsule_release - called by file close
|
||||||
* @inode: not used
|
* @inode: not used
|
||||||
|
@ -278,6 +255,13 @@ static int efi_capsule_release(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
struct capsule_info *cap_info = file->private_data;
|
struct capsule_info *cap_info = file->private_data;
|
||||||
|
|
||||||
|
if (cap_info->index > 0 &&
|
||||||
|
(cap_info->header.headersize == 0 ||
|
||||||
|
cap_info->count < cap_info->total_size)) {
|
||||||
|
pr_err("capsule upload not complete\n");
|
||||||
|
efi_free_all_buff_pages(cap_info);
|
||||||
|
}
|
||||||
|
|
||||||
kfree(cap_info->pages);
|
kfree(cap_info->pages);
|
||||||
kfree(cap_info->phys);
|
kfree(cap_info->phys);
|
||||||
kfree(file->private_data);
|
kfree(file->private_data);
|
||||||
|
@ -325,7 +309,6 @@ static const struct file_operations efi_capsule_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.open = efi_capsule_open,
|
.open = efi_capsule_open,
|
||||||
.write = efi_capsule_write,
|
.write = efi_capsule_write,
|
||||||
.flush = efi_capsule_flush,
|
|
||||||
.release = efi_capsule_release,
|
.release = efi_capsule_release,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,7 +21,7 @@ static const efi_char16_t efi_SetupMode_name[] = L"SetupMode";
|
||||||
|
|
||||||
/* SHIM variables */
|
/* SHIM variables */
|
||||||
static const efi_guid_t shim_guid = EFI_SHIM_LOCK_GUID;
|
static const efi_guid_t shim_guid = EFI_SHIM_LOCK_GUID;
|
||||||
static const efi_char16_t shim_MokSBState_name[] = L"MokSBState";
|
static const efi_char16_t shim_MokSBState_name[] = L"MokSBStateRT";
|
||||||
|
|
||||||
#define get_efi_var(name, vendor, ...) \
|
#define get_efi_var(name, vendor, ...) \
|
||||||
efi_call_runtime(get_variable, \
|
efi_call_runtime(get_variable, \
|
||||||
|
@ -60,8 +60,8 @@ enum efi_secureboot_mode efi_get_secureboot(efi_system_table_t *sys_table_arg)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See if a user has put the shim into insecure mode. If so, and if the
|
* See if a user has put the shim into insecure mode. If so, and if the
|
||||||
* variable doesn't have the runtime attribute set, we might as well
|
* variable doesn't have the non-volatile attribute set, we might as
|
||||||
* honor that.
|
* well honor that.
|
||||||
*/
|
*/
|
||||||
size = sizeof(moksbstate);
|
size = sizeof(moksbstate);
|
||||||
status = get_efi_var(shim_MokSBState_name, &shim_guid,
|
status = get_efi_var(shim_MokSBState_name, &shim_guid,
|
||||||
|
@ -70,7 +70,7 @@ enum efi_secureboot_mode efi_get_secureboot(efi_system_table_t *sys_table_arg)
|
||||||
/* If it fails, we don't care why. Default to secure */
|
/* If it fails, we don't care why. Default to secure */
|
||||||
if (status != EFI_SUCCESS)
|
if (status != EFI_SUCCESS)
|
||||||
goto secure_boot_enabled;
|
goto secure_boot_enabled;
|
||||||
if (!(attr & EFI_VARIABLE_RUNTIME_ACCESS) && moksbstate == 1)
|
if (!(attr & EFI_VARIABLE_NON_VOLATILE) && moksbstate == 1)
|
||||||
return efi_secureboot_mode_disabled;
|
return efi_secureboot_mode_disabled;
|
||||||
|
|
||||||
secure_boot_enabled:
|
secure_boot_enabled:
|
||||||
|
|
|
@ -108,7 +108,7 @@ static int alt_pr_fpga_write(struct fpga_manager *mgr, const char *buf,
|
||||||
u32 *buffer_32 = (u32 *)buf;
|
u32 *buffer_32 = (u32 *)buf;
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
|
|
||||||
if (count <= 0)
|
if (!count)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/* Write out the complete 32-bit chunks */
|
/* Write out the complete 32-bit chunks */
|
||||||
|
|
|
@ -168,6 +168,7 @@ static int mpc8xxx_irq_set_type(struct irq_data *d, unsigned int flow_type)
|
||||||
|
|
||||||
switch (flow_type) {
|
switch (flow_type) {
|
||||||
case IRQ_TYPE_EDGE_FALLING:
|
case IRQ_TYPE_EDGE_FALLING:
|
||||||
|
case IRQ_TYPE_LEVEL_LOW:
|
||||||
raw_spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
|
raw_spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
|
||||||
gc->write_reg(mpc8xxx_gc->regs + GPIO_ICR,
|
gc->write_reg(mpc8xxx_gc->regs + GPIO_ICR,
|
||||||
gc->read_reg(mpc8xxx_gc->regs + GPIO_ICR)
|
gc->read_reg(mpc8xxx_gc->regs + GPIO_ICR)
|
||||||
|
|
|
@ -476,7 +476,8 @@ int of_mm_gpiochip_add_data(struct device_node *np,
|
||||||
if (mm_gc->save_regs)
|
if (mm_gc->save_regs)
|
||||||
mm_gc->save_regs(mm_gc);
|
mm_gc->save_regs(mm_gc);
|
||||||
|
|
||||||
mm_gc->gc.of_node = np;
|
of_node_put(mm_gc->gc.of_node);
|
||||||
|
mm_gc->gc.of_node = of_node_get(np);
|
||||||
|
|
||||||
ret = gpiochip_add_data(gc, data);
|
ret = gpiochip_add_data(gc, data);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -484,6 +485,7 @@ int of_mm_gpiochip_add_data(struct device_node *np,
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
err2:
|
err2:
|
||||||
|
of_node_put(np);
|
||||||
iounmap(mm_gc->regs);
|
iounmap(mm_gc->regs);
|
||||||
err1:
|
err1:
|
||||||
kfree(gc->label);
|
kfree(gc->label);
|
||||||
|
|
|
@ -883,6 +883,10 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,
|
||||||
if (WARN_ON_ONCE(min_offset > max_offset))
|
if (WARN_ON_ONCE(min_offset > max_offset))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
/* Check domain to be pinned to against preferred domains */
|
||||||
|
if (bo->preferred_domains & domain)
|
||||||
|
domain = bo->preferred_domains & domain;
|
||||||
|
|
||||||
/* A shared bo cannot be migrated to VRAM */
|
/* A shared bo cannot be migrated to VRAM */
|
||||||
if (bo->prime_shared_count) {
|
if (bo->prime_shared_count) {
|
||||||
if (domain & AMDGPU_GEM_DOMAIN_GTT)
|
if (domain & AMDGPU_GEM_DOMAIN_GTT)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue