This is the 5.4.160 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmGUwhUACgkQONu9yGCS aT4hlBAAjcjBBtJ7IuVRAbJhRSIW3H0viMdPTBvydSNwSF6mk9BL56CQ+OyAGLaB Fnb5DNxhIO9DAbwuvBW4wEJibSA1Q4191bRjZEKrf70LRdmA51vz0dBu2KRNV+IV HWtJYyXIyqqU/EXPsVmdmNFxr6YUCUmkyEaE18/rsg/cZmMg/Zot434cnSuzVzrW 9yLQVQAs7CAKD7kICZ/S7P7V1IKQyuLj5meX2BBE24YwukvlA9N5ISXGQuW91683 iqv0cfjwYtfrNMOE7K2AKrDgZ0AxuLrIiyppqHjHPB+zIvgm2ErQU+Hp76hVtWpW yP0cq6ReP3ktc9Hmxr49xU1l3D/6jo+OyqQh5eomP2veGpRh3dq+oe1VoN7Iw9Xg YBvjOuononlBoChsddlbxwQTZIXff9MvOK2zADmHM0740xTlqSIgw6ITdg/lyKG8 7QbM6pSepXKVXDhHtbEQQGIJP/SvLyjGKX5pJjTKQ0cemkGJ/Sp/HNHMlf/CRLen LsS2kHCuBTWKQP0NJaAIp0J3lNfcCnB8Cv2BhmkHkVPx0jEvlZKDVJqdH7tbpIdy hdR9vwq9neBIjAiTFMEAuV1/+zGR4zNqiocUXhkIC9BAzrBKinyct78kV2trVOc2 J4lFhpOv1I9/HwaqP6kYnJW+nNoMzN3sD0uT8fk8dlYo5GBvbVk= =YkOP -----END PGP SIGNATURE----- Merge 5.4.160 into android11-5.4-lts Changes in 5.4.160 xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform binder: use euid from cred instead of using task binder: use cred instead of task for selinux checks binder: use cred instead of task for getsecid Input: iforce - fix control-message timeout Input: elantench - fix misreporting trackpoint coordinates Input: i8042 - Add quirk for Fujitsu Lifebook T725 libata: fix read log timeout value ocfs2: fix data corruption on truncate scsi: qla2xxx: Fix kernel crash when accessing port_speed sysfs file scsi: qla2xxx: Fix use after free in eh_abort path mmc: dw_mmc: Dont wait for DRTO on Write RSP error parisc: Fix ptrace check on syscall return tpm: Check for integer overflow in tpm2_map_response_body() firmware/psci: fix application of sizeof to pointer crypto: s5p-sss - Add error handling in s5p_aes_probe() media: ite-cir: IR receiver stop working after receive overflow media: ir-kbd-i2c: improve responsiveness of hauppauge zilog receivers media: v4l2-ioctl: Fix check_ext_ctrls ALSA: hda/realtek: Add quirk for Clevo PC70HS ALSA: hda/realtek: Add a quirk for Acer Spin SP513-54N ALSA: hda/realtek: Add quirk for ASUS UX550VE ALSA: hda/realtek: Add quirk for HP EliteBook 840 G7 mute LED ALSA: ua101: fix division by zero at probe ALSA: 6fire: fix control and bulk message timeouts ALSA: line6: fix control and interrupt message timeouts ALSA: usb-audio: Add registration quirk for JBL Quantum 400 ALSA: synth: missing check for possible NULL after the call to kstrdup ALSA: timer: Fix use-after-free problem ALSA: timer: Unconditionally unlink slave instances, too fuse: fix page stealing x86/sme: Use #define USE_EARLY_PGTABLE_L5 in mem_encrypt_identity.c x86/cpu: Fix migration safety with X86_BUG_NULL_SEL x86/irq: Ensure PI wakeup handler is unregistered before module unload cavium: Return negative value when pci_alloc_irq_vectors() fails scsi: qla2xxx: Return -ENOMEM if kzalloc() fails scsi: qla2xxx: Fix unmap of already freed sgl cavium: Fix return values of the probe function sfc: Don't use netif_info before net_device setup hyperv/vmbus: include linux/bitops.h ARM: dts: sun7i: A20-olinuxino-lime2: Fix ethernet phy-mode reset: socfpga: add empty driver allowing consumers to probe mmc: winbond: don't build on M68K drm: panel-orientation-quirks: Add quirk for Aya Neo 2021 bpf: Define bpf_jit_alloc_exec_limit for arm64 JIT bpf: Prevent increasing bpf_jit_limit above max xen/netfront: stop tx queues during live migration nvmet-tcp: fix a memory leak when releasing a queue spi: spl022: fix Microwire full duplex mode net: multicast: calculate csum of looped-back and forwarded packets watchdog: Fix OMAP watchdog early handling drm: panel-orientation-quirks: Add quirk for GPD Win3 nvmet-tcp: fix header digest verification r8169: Add device 10ec:8162 to driver r8169 vmxnet3: do not stop tx queues after netif_device_detach() nfp: bpf: relax prog rejection for mtu check through max_pkt_offset net/smc: Correct spelling mistake to TCPF_SYN_RECV btrfs: clear MISSING device status bit in btrfs_close_one_device btrfs: fix lost error handling when replaying directory deletes btrfs: call btrfs_check_rw_degradable only if there is a missing device ia64: kprobes: Fix to pass correct trampoline address to the handler hwmon: (pmbus/lm25066) Add offset coefficients regulator: s5m8767: do not use reset value as DVS voltage if GPIO DVS is disabled regulator: dt-bindings: samsung,s5m8767: correct s5m8767,pmic-buck-default-dvs-idx property EDAC/sb_edac: Fix top-of-high-memory value for Broadwell/Haswell mwifiex: fix division by zero in fw download path ath6kl: fix division by zero in send path ath6kl: fix control-message timeout ath10k: fix control-message timeout ath10k: fix division by zero in send path PCI: Mark Atheros QCA6174 to avoid bus reset rtl8187: fix control-message timeouts evm: mark evm_fixmode as __ro_after_init wcn36xx: Fix HT40 capability for 2Ghz band mwifiex: Read a PCI register after writing the TX ring write pointer libata: fix checking of DMA state wcn36xx: handle connection loss indication rsi: fix occasional initialisation failure with BT coex rsi: fix key enabled check causing unwanted encryption for vap_id > 0 rsi: fix rate mask set leading to P2P failure rsi: Fix module dev_oper_mode parameter description RDMA/qedr: Fix NULL deref for query_qp on the GSI QP signal: Remove the bogus sigkill_pending in ptrace_stop signal/mips: Update (_save|_restore)_fp_context to fail with -EFAULT power: supply: max17042_battery: Prevent int underflow in set_soc_threshold power: supply: max17042_battery: use VFSOC for capacity when no rsns KVM: nVMX: Query current VMCS when determining if MSR bitmaps are in use can: j1939: j1939_tp_cmd_recv(): ignore abort message in the BAM transport can: j1939: j1939_can_recv(): ignore messages with invalid source address powerpc/85xx: Fix oops when mpc85xx_smp_guts_ids node cannot be found serial: core: Fix initializing and restoring termios speed ALSA: mixer: oss: Fix racy access to slots ALSA: mixer: fix deadlock in snd_mixer_oss_set_volume xen/balloon: add late_initcall_sync() for initial ballooning done PCI: pci-bridge-emul: Fix emulation of W1C bits PCI: aardvark: Do not clear status bits of masked interrupts PCI: aardvark: Fix checking for link up via LTSSM state PCI: aardvark: Do not unmask unused interrupts PCI: aardvark: Fix reporting Data Link Layer Link Active PCI: aardvark: Fix return value of MSI domain .alloc() method PCI: aardvark: Read all 16-bits from PCIE_MSI_PAYLOAD_REG quota: check block number when reading the block in quota file quota: correct error number in free_dqentry() pinctrl: core: fix possible memory leak in pinctrl_enable() iio: dac: ad5446: Fix ad5622_write() return value USB: serial: keyspan: fix memleak on probe errors USB: iowarrior: fix control-message timeouts USB: chipidea: fix interrupt deadlock dma-buf: WARN on dmabuf release with pending attachments drm: panel-orientation-quirks: Update the Lenovo Ideapad D330 quirk (v2) drm: panel-orientation-quirks: Add quirk for KD Kurio Smart C15200 2-in-1 drm: panel-orientation-quirks: Add quirk for the Samsung Galaxy Book 10.6 Bluetooth: sco: Fix lock_sock() blockage by memcpy_from_msg() Bluetooth: fix use-after-free error in lock_sock_nested() drm/panel-orientation-quirks: add Valve Steam Deck platform/x86: wmi: do not fail if disabling fails MIPS: lantiq: dma: add small delay after reset MIPS: lantiq: dma: reset correct number of channel locking/lockdep: Avoid RCU-induced noinstr fail net: sched: update default qdisc visibility after Tx queue cnt changes smackfs: Fix use-after-free in netlbl_catmap_walk() x86: Increase exception stack sizes mwifiex: Run SET_BSS_MODE when changing from P2P to STATION vif-type mwifiex: Properly initialize private structure on interface type changes ath10k: high latency fixes for beacon buffer media: mt9p031: Fix corrupted frame after restarting stream media: netup_unidvb: handle interrupt properly according to the firmware media: stm32: Potential NULL pointer dereference in dcmi_irq_thread() media: uvcvideo: Set capability in s_param media: uvcvideo: Return -EIO for control errors media: uvcvideo: Set unique vdev name based in type media: s5p-mfc: fix possible null-pointer dereference in s5p_mfc_probe() media: s5p-mfc: Add checking to s5p_mfc_probe(). media: imx: set a media_device bus_info string media: mceusb: return without resubmitting URB in case of -EPROTO error. ia64: don't do IA64_CMPXCHG_DEBUG without CONFIG_PRINTK brcmfmac: Add DMI nvram filename quirk for Cyberbook T116 tablet media: rcar-csi2: Add checking to rcsi2_start_receiver() ipmi: Disable some operations during a panic ACPICA: Avoid evaluating methods too early during system resume media: ipu3-imgu: imgu_fmt: Handle properly try media: ipu3-imgu: VIDIOC_QUERYCAP: Fix bus_info media: usb: dvd-usb: fix uninit-value bug in dibusb_read_eeprom_byte() net-sysfs: try not to restart the syscall if it will fail eventually tracefs: Have tracefs directories not set OTH permission bits by default ath: dfs_pattern_detector: Fix possible null-pointer dereference in channel_detector_create() iov_iter: Fix iov_iter_get_pages{,_alloc} page fault return value ACPI: battery: Accept charges over the design capacity as full leaking_addresses: Always print a trailing newline memstick: r592: Fix a UAF bug when removing the driver lib/xz: Avoid overlapping memcpy() with invalid input with in-place decompression lib/xz: Validate the value before assigning it to an enum variable workqueue: make sysfs of unbound kworker cpumask more clever tracing/cfi: Fix cmp_entries_* functions signature mismatch mwl8k: Fix use-after-free in mwl8k_fw_state_machine() block: remove inaccurate requeue check nvmet: fix use-after-free when a port is removed nvmet-tcp: fix use-after-free when a port is removed nvme: drop scan_lock and always kick requeue list when removing namespaces PM: hibernate: Get block device exclusively in swsusp_check() selftests: kvm: fix mismatched fclose() after popen() iwlwifi: mvm: disable RX-diversity in powersave smackfs: use __GFP_NOFAIL for smk_cipso_doi() ARM: clang: Do not rely on lr register for stacktrace gre/sit: Don't generate link-local addr if addr_gen_mode is IN6_ADDR_GEN_MODE_NONE ARM: 9136/1: ARMv7-M uses BE-8, not BE-32 vrf: run conntrack only in context of lower/physdev for locally generated packets net: annotate data-race in neigh_output() btrfs: do not take the uuid_mutex in btrfs_rm_device spi: bcm-qspi: Fix missing clk_disable_unprepare() on error in bcm_qspi_probe() x86/hyperv: Protect set_hv_tscchange_cb() against getting preempted parisc: fix warning in flush_tlb_all task_stack: Fix end_of_stack() for architectures with upwards-growing stack parisc/unwind: fix unwinder when CONFIG_64BIT is enabled parisc/kgdb: add kgdb_roundup() to make kgdb work with idle polling netfilter: conntrack: set on IPS_ASSURED if flows enters internal stream state selftests/bpf: Fix strobemeta selftest regression Bluetooth: fix init and cleanup of sco_conn.timeout_work rcu: Fix existing exp request check in sync_sched_exp_online_cleanup() drm/v3d: fix wait for TMU write combiner flush virtio-gpu: fix possible memory allocation failure net: net_namespace: Fix undefined member in key_remove_domain() cgroup: Make rebind_subsystems() disable v2 controllers all at once wilc1000: fix possible memory leak in cfg_scan_result() Bluetooth: btmtkuart: fix a memleak in mtk_hci_wmt_sync crypto: caam - disable pkc for non-E SoCs rxrpc: Fix _usecs_to_jiffies() by using usecs_to_jiffies() net: dsa: rtl8366rb: Fix off-by-one bug ath10k: Fix missing frame timestamp for beacon/probe-resp drm/amdgpu: fix warning for overflow check media: em28xx: add missing em28xx_close_extension media: cxd2880-spi: Fix a null pointer dereference on error handling path media: dvb-usb: fix ununit-value in az6027_rc_query media: TDA1997x: handle short reads of hdmi info frame. media: mtk-vpu: Fix a resource leak in the error handling path of 'mtk_vpu_probe()' media: radio-wl1273: Avoid card name truncation media: si470x: Avoid card name truncation media: tm6000: Avoid card name truncation media: cx23885: Fix snd_card_free call on null card pointer kprobes: Do not use local variable when creating debugfs file crypto: ecc - fix CRYPTO_DEFAULT_RNG dependency cpuidle: Fix kobject memory leaks in error paths media: em28xx: Don't use ops->suspend if it is NULL ath9k: Fix potential interrupt storm on queue reset EDAC/amd64: Handle three rank interleaving mode netfilter: nft_dynset: relax superfluous check on set updates media: dvb-frontends: mn88443x: Handle errors of clk_prepare_enable() crypto: qat - detect PFVF collision after ACK crypto: qat - disregard spurious PFVF interrupts hwrng: mtk - Force runtime pm ops for sleep ops b43legacy: fix a lower bounds test b43: fix a lower bounds test mmc: sdhci-omap: Fix NULL pointer exception if regulator is not configured memstick: avoid out-of-range warning memstick: jmb38x_ms: use appropriate free function in jmb38x_ms_alloc_host() net, neigh: Fix NTF_EXT_LEARNED in combination with NTF_USE hwmon: Fix possible memleak in __hwmon_device_register() hwmon: (pmbus/lm25066) Let compiler determine outer dimension of lm25066_coeff ath10k: fix max antenna gain unit drm/msm: uninitialized variable in msm_gem_import() net: stream: don't purge sk_error_queue in sk_stream_kill_queues() mmc: mxs-mmc: disable regulator on error and in the remove function block: ataflop: fix breakage introduced at blk-mq refactoring platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning mt76: mt76x02: fix endianness warnings in mt76x02_mac.c rsi: stop thread firstly in rsi_91x_init() error handling mwifiex: Send DELBA requests according to spec phy: micrel: ksz8041nl: do not use power down mode nvme-rdma: fix error code in nvme_rdma_setup_ctrl PM: hibernate: fix sparse warnings clocksource/drivers/timer-ti-dm: Select TIMER_OF drm/msm: Fix potential NULL dereference in DPU SSPP smackfs: use netlbl_cfg_cipsov4_del() for deleting cipso_v4_doi libbpf: Fix BTF data layout checks and allow empty BTF s390/gmap: don't unconditionally call pte_unmap_unlock() in __gmap_zap() irq: mips: avoid nested irq_enter() tcp: don't free a FIN sk_buff in tcp_remove_empty_skb() samples/kretprobes: Fix return value if register_kretprobe() failed KVM: s390: Fix handle_sske page fault handling libertas_tf: Fix possible memory leak in probe and disconnect libertas: Fix possible memory leak in probe and disconnect wcn36xx: add proper DMA memory barriers in rx path drm/amdgpu/gmc6: fix DMA mask from 44 to 40 bits net: amd-xgbe: Toggle PLL settings during rate change net: phylink: avoid mvneta warning when setting pause parameters crypto: pcrypt - Delay write to padata->info selftests/bpf: Fix fclose/pclose mismatch in test_progs udp6: allow SO_MARK ctrl msg to affect routing ibmvnic: don't stop queue in xmit ibmvnic: Process crqs after enabling interrupts RDMA/rxe: Fix wrong port_cap_flags clk: mvebu: ap-cpu-clk: Fix a memory leak in error handling paths ARM: s3c: irq-s3c24xx: Fix return value check for s3c24xx_init_intc() arm64: dts: rockchip: Fix GPU register width for RK3328 ARM: dts: qcom: msm8974: Add xo_board reference clock to DSI0 PHY RDMA/bnxt_re: Fix query SRQ failure arm64: dts: meson-g12a: Fix the pwm regulator supply properties ARM: dts: at91: tse850: the emac<->phy interface is rmii scsi: dc395: Fix error case unwinding MIPS: loongson64: make CPU_LOONGSON64 depends on MIPS_FP_SUPPORT JFS: fix memleak in jfs_mount ALSA: hda: Reduce udelay() at SKL+ position reporting arm: dts: omap3-gta04a4: accelerometer irq fix soc/tegra: Fix an error handling path in tegra_powergate_power_up() memory: fsl_ifc: fix leak of irq and nand_irq in fsl_ifc_ctrl_probe clk: at91: check pmc node status before registering syscore ops video: fbdev: chipsfb: use memset_io() instead of memset() serial: 8250_dw: Drop wrong use of ACPI_PTR() usb: gadget: hid: fix error code in do_config() power: supply: rt5033_battery: Change voltage values to µV scsi: csiostor: Uninitialized data in csio_ln_vnp_read_cbfn() RDMA/mlx4: Return missed an error if device doesn't support steering staging: ks7010: select CRYPTO_HASH/CRYPTO_MICHAEL_MIC ARM: dts: stm32: fix SAI sub nodes register range ASoC: cs42l42: Correct some register default values ASoC: cs42l42: Defer probe if request_threaded_irq() returns EPROBE_DEFER phy: qcom-qusb2: Fix a memory leak on probe serial: xilinx_uartps: Fix race condition causing stuck TX HID: u2fzero: clarify error check and length calculations HID: u2fzero: properly handle timeouts in usb_submit_urb powerpc/44x/fsp2: add missing of_node_put mips: cm: Convert to bitfield API to fix out-of-bounds access power: supply: bq27xxx: Fix kernel crash on IRQ handler register error apparmor: fix error check rpmsg: Fix rpmsg_create_ept return when RPMSG config is not defined pnfs/flexfiles: Fix misplaced barrier in nfs4_ff_layout_prepare_ds drm/plane-helper: fix uninitialized variable reference PCI: aardvark: Don't spam about PIO Response Status PCI: aardvark: Fix preserving PCI_EXP_RTCTL_CRSSVE flag on emulated bridge opp: Fix return in _opp_add_static_v2() NFS: Fix deadlocks in nfs_scan_commit_list() fs: orangefs: fix error return code of orangefs_revalidate_lookup() mtd: spi-nor: hisi-sfc: Remove excessive clk_disable_unprepare() mtd: core: don't remove debugfs directory if device is in use dmaengine: at_xdmac: fix AT_XDMAC_CC_PERID() macro auxdisplay: img-ascii-lcd: Fix lock-up when displaying empty string auxdisplay: ht16k33: Connect backlight to fbdev auxdisplay: ht16k33: Fix frame buffer device blanking soc: fsl: dpaa2-console: free buffer before returning from dpaa2_console_read netfilter: nfnetlink_queue: fix OOB when mac header was cleared dmaengine: dmaengine_desc_callback_valid(): Check for `callback_result` signal/sh: Use force_sig(SIGKILL) instead of do_group_exit(SIGKILL) m68k: set a default value for MEMORY_RESERVE watchdog: f71808e_wdt: fix inaccurate report in WDIOC_GETTIMEOUT ar7: fix kernel builds for compiler test scsi: qla2xxx: Fix gnl list corruption scsi: qla2xxx: Turn off target reset during issue_lip NFSv4: Fix a regression in nfs_set_open_stateid_locked() i2c: xlr: Fix a resource leak in the error handling path of 'xlr_i2c_probe()' xen-pciback: Fix return in pm_ctrl_init() net: davinci_emac: Fix interrupt pacing disable net: vlan: fix a UAF in vlan_dev_real_dev() ACPI: PMIC: Fix intel_pmic_regs_handler() read accesses bonding: Fix a use-after-free problem when bond_sysfs_slave_add() failed mm/zsmalloc.c: close race window between zs_pool_dec_isolated() and zs_unregister_migration() zram: off by one in read_block_state() perf bpf: Add missing free to bpf_event__print_bpf_prog_info() llc: fix out-of-bound array index in llc_sk_dev_hash() nfc: pn533: Fix double free when pn533_fill_fragment_skbs() fails arm64: pgtable: make __pte_to_phys/__phys_to_pte_val inline functions bpf: sockmap, strparser, and tls are reusing qdisc_skb_cb and colliding net/sched: sch_taprio: fix undefined behavior in ktime_mono_to_any net: hns3: allow configure ETS bandwidth of all TCs vsock: prevent unnecessary refcnt inc for nonblocking connect net/smc: fix sk_refcnt underflow on linkdown and fallback cxgb4: fix eeprom len when diagnostics not implemented selftests/net: udpgso_bench_rx: fix port argument ARM: 9155/1: fix early early_iounmap() ARM: 9156/1: drop cc-option fallbacks for architecture selection parisc: Fix backtrace to always include init funtion names parisc: Fix set_fixmap() on PA1.x CPUs irqchip/sifive-plic: Fixup EOI failed when masked f2fs: should use GFP_NOFS for directory inodes net, neigh: Enable state migration between NUD_PERMANENT and NTF_USE 9p/net: fix missing error check in p9_check_errors ovl: fix deadlock in splice write powerpc/lib: Add helper to check if offset is within conditional branch range powerpc/bpf: Validate branch ranges powerpc/bpf: Fix BPF_SUB when imm == 0x80000000 powerpc/security: Add a helper to query stf_barrier type powerpc/bpf: Emit stf barrier instruction sequences for BPF_NOSPEC mm, oom: pagefault_out_of_memory: don't force global OOM for dying tasks mm, oom: do not trigger out_of_memory from the #PF video: backlight: Drop maximum brightness override for brightness zero s390/cio: check the subchannel validity for dev_busid s390/tape: fix timer initialization in tape_std_assign() s390/cio: make ccw_device_dma_* more robust powerpc/powernv/prd: Unregister OPAL_MSG_PRD2 notifier during module unload PCI: Add PCI_EXP_DEVCTL_PAYLOAD_* macros SUNRPC: Partial revert of commit 6f9f17287e78 ath10k: fix invalid dma_addr_t token assignment selftests/bpf: Fix also no-alu32 strobemeta selftest Linux 5.4.160 Note, binder* patches were manually reverted as part of this merge, they are not present in this merge point at all. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I1fb759dd89408adbe9b9ac1527af51bfdc4059de
This commit is contained in:
commit
91a7552bea
@ -5486,6 +5486,13 @@
|
||||
as generic guest with no PV drivers. Currently support
|
||||
XEN HVM, KVM, HYPER_V and VMWARE guest.
|
||||
|
||||
xen.balloon_boot_timeout= [XEN]
|
||||
The time (in seconds) to wait before giving up to boot
|
||||
in case initial ballooning fails to free enough memory.
|
||||
Applies only when running as HVM or PVH guest and
|
||||
started with less memory configured than allowed at
|
||||
max. Default is 180.
|
||||
|
||||
xen.event_eoi_delay= [XEN]
|
||||
How long to delay EOI handling in case of event
|
||||
storms (jiffies). Default is 10.
|
||||
|
@ -13,6 +13,14 @@ common regulator binding documented in:
|
||||
|
||||
|
||||
Required properties of the main device node (the parent!):
|
||||
- s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used
|
||||
for selecting GPIO DVS lines. It is one-to-one mapped to dvs gpio lines.
|
||||
|
||||
[1] If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
|
||||
property is specified, then all the eight voltage values for the
|
||||
's5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified.
|
||||
|
||||
Optional properties of the main device node (the parent!):
|
||||
- s5m8767,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
|
||||
units for buck2 when changing voltage using gpio dvs. Refer to [1] below
|
||||
for additional information.
|
||||
@ -25,26 +33,13 @@ Required properties of the main device node (the parent!):
|
||||
units for buck4 when changing voltage using gpio dvs. Refer to [1] below
|
||||
for additional information.
|
||||
|
||||
- s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used
|
||||
for selecting GPIO DVS lines. It is one-to-one mapped to dvs gpio lines.
|
||||
|
||||
[1] If none of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
|
||||
property is specified, the 's5m8767,pmic-buck[2/3/4]-dvs-voltage'
|
||||
property should specify atleast one voltage level (which would be a
|
||||
safe operating voltage).
|
||||
|
||||
If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
|
||||
property is specified, then all the eight voltage values for the
|
||||
's5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified.
|
||||
|
||||
Optional properties of the main device node (the parent!):
|
||||
- s5m8767,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs.
|
||||
- s5m8767,pmic-buck3-uses-gpio-dvs: 'buck3' can be controlled by gpio dvs.
|
||||
- s5m8767,pmic-buck4-uses-gpio-dvs: 'buck4' can be controlled by gpio dvs.
|
||||
|
||||
Additional properties required if either of the optional properties are used:
|
||||
|
||||
- s5m8767,pmic-buck234-default-dvs-idx: Default voltage setting selected from
|
||||
- s5m8767,pmic-buck-default-dvs-idx: Default voltage setting selected from
|
||||
the possible 8 options selectable by the dvs gpios. The value of this
|
||||
property should be between 0 and 7. If not specified or if out of range, the
|
||||
default value of this property is set to 0.
|
||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 159
|
||||
SUBLEVEL = 160
|
||||
EXTRAVERSION =
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
|
@ -66,15 +66,15 @@ KBUILD_CFLAGS += $(call cc-option,-fno-ipa-sra)
|
||||
# Note that GCC does not numerically define an architecture version
|
||||
# macro, but instead defines a whole series of macros which makes
|
||||
# testing for a specific architecture or later rather impossible.
|
||||
arch-$(CONFIG_CPU_32v7M) =-D__LINUX_ARM_ARCH__=7 -march=armv7-m -Wa,-march=armv7-m
|
||||
arch-$(CONFIG_CPU_32v7) =-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
|
||||
arch-$(CONFIG_CPU_32v6) =-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
|
||||
arch-$(CONFIG_CPU_32v7M) =-D__LINUX_ARM_ARCH__=7 -march=armv7-m
|
||||
arch-$(CONFIG_CPU_32v7) =-D__LINUX_ARM_ARCH__=7 -march=armv7-a
|
||||
arch-$(CONFIG_CPU_32v6) =-D__LINUX_ARM_ARCH__=6 -march=armv6
|
||||
# Only override the compiler option if ARMv6. The ARMv6K extensions are
|
||||
# always available in ARMv7
|
||||
ifeq ($(CONFIG_CPU_32v6),y)
|
||||
arch-$(CONFIG_CPU_32v6K) =-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6k,-march=armv5t -Wa$(comma)-march=armv6k)
|
||||
arch-$(CONFIG_CPU_32v6K) =-D__LINUX_ARM_ARCH__=6 -march=armv6k
|
||||
endif
|
||||
arch-$(CONFIG_CPU_32v5) =-D__LINUX_ARM_ARCH__=5 $(call cc-option,-march=armv5te,-march=armv4t)
|
||||
arch-$(CONFIG_CPU_32v5) =-D__LINUX_ARM_ARCH__=5 -march=armv5te
|
||||
arch-$(CONFIG_CPU_32v4T) =-D__LINUX_ARM_ARCH__=4 -march=armv4t
|
||||
arch-$(CONFIG_CPU_32v4) =-D__LINUX_ARM_ARCH__=4 -march=armv4
|
||||
arch-$(CONFIG_CPU_32v3) =-D__LINUX_ARM_ARCH__=3 -march=armv3m
|
||||
@ -88,7 +88,7 @@ tune-$(CONFIG_CPU_ARM720T) =-mtune=arm7tdmi
|
||||
tune-$(CONFIG_CPU_ARM740T) =-mtune=arm7tdmi
|
||||
tune-$(CONFIG_CPU_ARM9TDMI) =-mtune=arm9tdmi
|
||||
tune-$(CONFIG_CPU_ARM940T) =-mtune=arm9tdmi
|
||||
tune-$(CONFIG_CPU_ARM946E) =$(call cc-option,-mtune=arm9e,-mtune=arm9tdmi)
|
||||
tune-$(CONFIG_CPU_ARM946E) =-mtune=arm9e
|
||||
tune-$(CONFIG_CPU_ARM920T) =-mtune=arm9tdmi
|
||||
tune-$(CONFIG_CPU_ARM922T) =-mtune=arm9tdmi
|
||||
tune-$(CONFIG_CPU_ARM925T) =-mtune=arm9tdmi
|
||||
@ -96,11 +96,11 @@ tune-$(CONFIG_CPU_ARM926T) =-mtune=arm9tdmi
|
||||
tune-$(CONFIG_CPU_FA526) =-mtune=arm9tdmi
|
||||
tune-$(CONFIG_CPU_SA110) =-mtune=strongarm110
|
||||
tune-$(CONFIG_CPU_SA1100) =-mtune=strongarm1100
|
||||
tune-$(CONFIG_CPU_XSCALE) =$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale
|
||||
tune-$(CONFIG_CPU_XSC3) =$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale
|
||||
tune-$(CONFIG_CPU_FEROCEON) =$(call cc-option,-mtune=marvell-f,-mtune=xscale)
|
||||
tune-$(CONFIG_CPU_V6) =$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm)
|
||||
tune-$(CONFIG_CPU_V6K) =$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm)
|
||||
tune-$(CONFIG_CPU_XSCALE) =-mtune=xscale
|
||||
tune-$(CONFIG_CPU_XSC3) =-mtune=xscale
|
||||
tune-$(CONFIG_CPU_FEROCEON) =-mtune=xscale
|
||||
tune-$(CONFIG_CPU_V6) =-mtune=arm1136j-s
|
||||
tune-$(CONFIG_CPU_V6K) =-mtune=arm1136j-s
|
||||
|
||||
# Evaluate tune cc-option calls now
|
||||
tune-y := $(tune-y)
|
||||
|
@ -262,7 +262,7 @@
|
||||
&macb1 {
|
||||
status = "okay";
|
||||
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rmii";
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
@ -515,7 +515,7 @@
|
||||
compatible = "bosch,bma180";
|
||||
reg = <0x41>;
|
||||
pinctrl-names = "default";
|
||||
pintcrl-0 = <&bma180_pins>;
|
||||
pinctrl-0 = <&bma180_pins>;
|
||||
interrupt-parent = <&gpio4>;
|
||||
interrupts = <19 IRQ_TYPE_LEVEL_HIGH>; /* GPIO_115 */
|
||||
};
|
||||
|
@ -1213,8 +1213,8 @@
|
||||
#phy-cells = <0>;
|
||||
qcom,dsi-phy-index = <0>;
|
||||
|
||||
clocks = <&mmcc MDSS_AHB_CLK>;
|
||||
clock-names = "iface";
|
||||
clocks = <&mmcc MDSS_AHB_CLK>, <&xo_board>;
|
||||
clock-names = "iface", "ref";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -773,7 +773,7 @@
|
||||
#sound-dai-cells = <0>;
|
||||
|
||||
compatible = "st,stm32-sai-sub-a";
|
||||
reg = <0x4 0x1c>;
|
||||
reg = <0x4 0x20>;
|
||||
clocks = <&rcc SAI1_K>;
|
||||
clock-names = "sai_ck";
|
||||
dmas = <&dmamux1 87 0x400 0x01>;
|
||||
@ -783,7 +783,7 @@
|
||||
sai1b: audio-controller@4400a024 {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "st,stm32-sai-sub-b";
|
||||
reg = <0x24 0x1c>;
|
||||
reg = <0x24 0x20>;
|
||||
clocks = <&rcc SAI1_K>;
|
||||
clock-names = "sai_ck";
|
||||
dmas = <&dmamux1 88 0x400 0x01>;
|
||||
@ -804,7 +804,7 @@
|
||||
sai2a: audio-controller@4400b004 {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "st,stm32-sai-sub-a";
|
||||
reg = <0x4 0x1c>;
|
||||
reg = <0x4 0x20>;
|
||||
clocks = <&rcc SAI2_K>;
|
||||
clock-names = "sai_ck";
|
||||
dmas = <&dmamux1 89 0x400 0x01>;
|
||||
@ -814,7 +814,7 @@
|
||||
sai2b: audio-controller@4400b024 {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "st,stm32-sai-sub-b";
|
||||
reg = <0x24 0x1c>;
|
||||
reg = <0x24 0x20>;
|
||||
clocks = <&rcc SAI2_K>;
|
||||
clock-names = "sai_ck";
|
||||
dmas = <&dmamux1 90 0x400 0x01>;
|
||||
@ -835,7 +835,7 @@
|
||||
sai3a: audio-controller@4400c004 {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "st,stm32-sai-sub-a";
|
||||
reg = <0x04 0x1c>;
|
||||
reg = <0x04 0x20>;
|
||||
clocks = <&rcc SAI3_K>;
|
||||
clock-names = "sai_ck";
|
||||
dmas = <&dmamux1 113 0x400 0x01>;
|
||||
@ -845,7 +845,7 @@
|
||||
sai3b: audio-controller@4400c024 {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "st,stm32-sai-sub-b";
|
||||
reg = <0x24 0x1c>;
|
||||
reg = <0x24 0x20>;
|
||||
clocks = <&rcc SAI3_K>;
|
||||
clock-names = "sai_ck";
|
||||
dmas = <&dmamux1 114 0x400 0x01>;
|
||||
@ -1191,7 +1191,7 @@
|
||||
sai4a: audio-controller@50027004 {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "st,stm32-sai-sub-a";
|
||||
reg = <0x04 0x1c>;
|
||||
reg = <0x04 0x20>;
|
||||
clocks = <&rcc SAI4_K>;
|
||||
clock-names = "sai_ck";
|
||||
dmas = <&dmamux1 99 0x400 0x01>;
|
||||
@ -1201,7 +1201,7 @@
|
||||
sai4b: audio-controller@50027024 {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "st,stm32-sai-sub-b";
|
||||
reg = <0x24 0x1c>;
|
||||
reg = <0x24 0x20>;
|
||||
clocks = <&rcc SAI4_K>;
|
||||
clock-names = "sai_ck";
|
||||
dmas = <&dmamux1 100 0x400 0x01>;
|
||||
|
@ -112,7 +112,7 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac_rgmii_pins>;
|
||||
phy-handle = <&phy1>;
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-id";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -54,8 +54,7 @@ int notrace unwind_frame(struct stackframe *frame)
|
||||
|
||||
frame->sp = frame->fp;
|
||||
frame->fp = *(unsigned long *)(fp);
|
||||
frame->pc = frame->lr;
|
||||
frame->lr = *(unsigned long *)(fp + 4);
|
||||
frame->pc = *(unsigned long *)(fp + 4);
|
||||
#else
|
||||
/* check current frame pointer is within bounds */
|
||||
if (fp < low + 12 || fp > high - 4)
|
||||
|
@ -752,7 +752,7 @@ config CPU_BIG_ENDIAN
|
||||
config CPU_ENDIAN_BE8
|
||||
bool
|
||||
depends on CPU_BIG_ENDIAN
|
||||
default CPU_V6 || CPU_V6K || CPU_V7
|
||||
default CPU_V6 || CPU_V6K || CPU_V7 || CPU_V7M
|
||||
help
|
||||
Support for the BE-8 (big-endian) mode on ARMv6 and ARMv7 processors.
|
||||
|
||||
|
@ -415,9 +415,9 @@ void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot)
|
||||
FIXADDR_END);
|
||||
BUG_ON(idx >= __end_of_fixed_addresses);
|
||||
|
||||
/* we only support device mappings until pgprot_kernel has been set */
|
||||
/* We support only device mappings before pgprot_kernel is set. */
|
||||
if (WARN_ON(pgprot_val(prot) != pgprot_val(FIXMAP_PAGE_IO) &&
|
||||
pgprot_val(pgprot_kernel) == 0))
|
||||
pgprot_val(prot) && pgprot_val(pgprot_kernel) == 0))
|
||||
return;
|
||||
|
||||
if (pgprot_val(prot))
|
||||
|
@ -139,7 +139,7 @@
|
||||
regulator-min-microvolt = <721000>;
|
||||
regulator-max-microvolt = <1022000>;
|
||||
|
||||
vin-supply = <&dc_in>;
|
||||
pwm-supply = <&dc_in>;
|
||||
|
||||
pwms = <&pwm_AO_cd 1 1250 0>;
|
||||
pwm-dutycycle-range = <100 0>;
|
||||
|
@ -139,7 +139,7 @@
|
||||
regulator-min-microvolt = <721000>;
|
||||
regulator-max-microvolt = <1022000>;
|
||||
|
||||
vin-supply = <&main_12v>;
|
||||
pwm-supply = <&main_12v>;
|
||||
|
||||
pwms = <&pwm_AO_cd 1 1250 0>;
|
||||
pwm-dutycycle-range = <100 0>;
|
||||
|
@ -139,7 +139,7 @@
|
||||
regulator-min-microvolt = <721000>;
|
||||
regulator-max-microvolt = <1022000>;
|
||||
|
||||
vin-supply = <&dc_in>;
|
||||
pwm-supply = <&dc_in>;
|
||||
|
||||
pwms = <&pwm_AO_cd 1 1250 0>;
|
||||
pwm-dutycycle-range = <100 0>;
|
||||
|
@ -555,7 +555,7 @@
|
||||
|
||||
gpu: gpu@ff300000 {
|
||||
compatible = "rockchip,rk3328-mali", "arm,mali-450";
|
||||
reg = <0x0 0xff300000 0x0 0x40000>;
|
||||
reg = <0x0 0xff300000 0x0 0x30000>;
|
||||
interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>,
|
||||
|
@ -54,9 +54,15 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
|
||||
* page table entry, taking care of 52-bit addresses.
|
||||
*/
|
||||
#ifdef CONFIG_ARM64_PA_BITS_52
|
||||
#define __pte_to_phys(pte) \
|
||||
((pte_val(pte) & PTE_ADDR_LOW) | ((pte_val(pte) & PTE_ADDR_HIGH) << 36))
|
||||
#define __phys_to_pte_val(phys) (((phys) | ((phys) >> 36)) & PTE_ADDR_MASK)
|
||||
static inline phys_addr_t __pte_to_phys(pte_t pte)
|
||||
{
|
||||
return (pte_val(pte) & PTE_ADDR_LOW) |
|
||||
((pte_val(pte) & PTE_ADDR_HIGH) << 36);
|
||||
}
|
||||
static inline pteval_t __phys_to_pte_val(phys_addr_t phys)
|
||||
{
|
||||
return (phys | (phys >> 36)) & PTE_ADDR_MASK;
|
||||
}
|
||||
#else
|
||||
#define __pte_to_phys(pte) (pte_val(pte) & PTE_ADDR_MASK)
|
||||
#define __phys_to_pte_val(phys) (phys)
|
||||
|
@ -996,6 +996,11 @@ out:
|
||||
return prog;
|
||||
}
|
||||
|
||||
u64 bpf_jit_alloc_exec_limit(void)
|
||||
{
|
||||
return BPF_JIT_REGION_SIZE;
|
||||
}
|
||||
|
||||
void *bpf_jit_alloc_exec(unsigned long size)
|
||||
{
|
||||
return __vmalloc_node_range(size, PAGE_SIZE, BPF_JIT_REGION_START,
|
||||
|
@ -39,7 +39,7 @@ config DISABLE_VHPT
|
||||
|
||||
config IA64_DEBUG_CMPXCHG
|
||||
bool "Turn on compare-and-exchange bug checking (slow!)"
|
||||
depends on DEBUG_KERNEL
|
||||
depends on DEBUG_KERNEL && PRINTK
|
||||
help
|
||||
Selecting this option turns on bug checking for the IA-64
|
||||
compare-and-exchange instructions. This is slow! Itaniums
|
||||
|
@ -398,7 +398,8 @@ static void kretprobe_trampoline(void)
|
||||
|
||||
int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
|
||||
{
|
||||
regs->cr_iip = __kretprobe_trampoline_handler(regs, kretprobe_trampoline, NULL);
|
||||
regs->cr_iip = __kretprobe_trampoline_handler(regs,
|
||||
dereference_function_descriptor(kretprobe_trampoline), NULL);
|
||||
/*
|
||||
* By returning a non-zero value, we are telling
|
||||
* kprobe_handler() that we don't want the post_handler
|
||||
@ -414,7 +415,7 @@ void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
|
||||
ri->fp = NULL;
|
||||
|
||||
/* Replace the return addr with trampoline addr */
|
||||
regs->b0 = ((struct fnptr *)kretprobe_trampoline)->ip;
|
||||
regs->b0 = (unsigned long)dereference_function_descriptor(kretprobe_trampoline);
|
||||
}
|
||||
|
||||
/* Check the instruction in the slot is break */
|
||||
@ -918,14 +919,14 @@ static struct kprobe trampoline_p = {
|
||||
int __init arch_init_kprobes(void)
|
||||
{
|
||||
trampoline_p.addr =
|
||||
(kprobe_opcode_t *)((struct fnptr *)kretprobe_trampoline)->ip;
|
||||
dereference_function_descriptor(kretprobe_trampoline);
|
||||
return register_kprobe(&trampoline_p);
|
||||
}
|
||||
|
||||
int __kprobes arch_trampoline_kprobe(struct kprobe *p)
|
||||
{
|
||||
if (p->addr ==
|
||||
(kprobe_opcode_t *)((struct fnptr *)kretprobe_trampoline)->ip)
|
||||
dereference_function_descriptor(kretprobe_trampoline))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
@ -190,6 +190,7 @@ config INIT_LCD
|
||||
config MEMORY_RESERVE
|
||||
int "Memory reservation (MiB)"
|
||||
depends on (UCSIMM || UCDIMM)
|
||||
default 0
|
||||
help
|
||||
Reserve certain memory regions on 68x328 based boards.
|
||||
|
||||
|
@ -1393,6 +1393,7 @@ config CPU_LOONGSON3
|
||||
select WEAK_REORDERING_BEYOND_LLSC
|
||||
select MIPS_PGD_C0_CONTEXT
|
||||
select MIPS_L1_CACHE_SHIFT_6
|
||||
select MIPS_FP_SUPPORT
|
||||
select GPIOLIB
|
||||
select SWIOTLB
|
||||
help
|
||||
|
@ -11,6 +11,7 @@
|
||||
#ifndef __MIPS_ASM_MIPS_CM_H__
|
||||
#define __MIPS_ASM_MIPS_CM_H__
|
||||
|
||||
#include <linux/bitfield.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/errno.h>
|
||||
|
||||
@ -153,8 +154,8 @@ GCR_ACCESSOR_RO(32, 0x030, rev)
|
||||
#define CM_GCR_REV_MINOR GENMASK(7, 0)
|
||||
|
||||
#define CM_ENCODE_REV(major, minor) \
|
||||
(((major) << __ffs(CM_GCR_REV_MAJOR)) | \
|
||||
((minor) << __ffs(CM_GCR_REV_MINOR)))
|
||||
(FIELD_PREP(CM_GCR_REV_MAJOR, major) | \
|
||||
FIELD_PREP(CM_GCR_REV_MINOR, minor))
|
||||
|
||||
#define CM_REV_CM2 CM_ENCODE_REV(6, 0)
|
||||
#define CM_REV_CM2_5 CM_ENCODE_REV(7, 0)
|
||||
@ -362,10 +363,10 @@ static inline int mips_cm_revision(void)
|
||||
static inline unsigned int mips_cm_max_vp_width(void)
|
||||
{
|
||||
extern int smp_num_siblings;
|
||||
uint32_t cfg;
|
||||
|
||||
if (mips_cm_revision() >= CM_REV_CM3)
|
||||
return read_gcr_sys_config2() & CM_GCR_SYS_CONFIG2_MAXVPW;
|
||||
return FIELD_GET(CM_GCR_SYS_CONFIG2_MAXVPW,
|
||||
read_gcr_sys_config2());
|
||||
|
||||
if (mips_cm_present()) {
|
||||
/*
|
||||
@ -373,8 +374,7 @@ static inline unsigned int mips_cm_max_vp_width(void)
|
||||
* number of VP(E)s, and if that ever changes then this will
|
||||
* need revisiting.
|
||||
*/
|
||||
cfg = read_gcr_cl_config() & CM_GCR_Cx_CONFIG_PVPE;
|
||||
return (cfg >> __ffs(CM_GCR_Cx_CONFIG_PVPE)) + 1;
|
||||
return FIELD_GET(CM_GCR_Cx_CONFIG_PVPE, read_gcr_cl_config()) + 1;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_SMP))
|
||||
|
@ -179,8 +179,7 @@ static void mips_cm_probe_l2sync(void)
|
||||
phys_addr_t addr;
|
||||
|
||||
/* L2-only sync was introduced with CM major revision 6 */
|
||||
major_rev = (read_gcr_rev() & CM_GCR_REV_MAJOR) >>
|
||||
__ffs(CM_GCR_REV_MAJOR);
|
||||
major_rev = FIELD_GET(CM_GCR_REV_MAJOR, read_gcr_rev());
|
||||
if (major_rev < 6)
|
||||
return;
|
||||
|
||||
@ -263,13 +262,13 @@ void mips_cm_lock_other(unsigned int cluster, unsigned int core,
|
||||
preempt_disable();
|
||||
|
||||
if (cm_rev >= CM_REV_CM3) {
|
||||
val = core << __ffs(CM3_GCR_Cx_OTHER_CORE);
|
||||
val |= vp << __ffs(CM3_GCR_Cx_OTHER_VP);
|
||||
val = FIELD_PREP(CM3_GCR_Cx_OTHER_CORE, core) |
|
||||
FIELD_PREP(CM3_GCR_Cx_OTHER_VP, vp);
|
||||
|
||||
if (cm_rev >= CM_REV_CM3_5) {
|
||||
val |= CM_GCR_Cx_OTHER_CLUSTER_EN;
|
||||
val |= cluster << __ffs(CM_GCR_Cx_OTHER_CLUSTER);
|
||||
val |= block << __ffs(CM_GCR_Cx_OTHER_BLOCK);
|
||||
val |= FIELD_PREP(CM_GCR_Cx_OTHER_CLUSTER, cluster);
|
||||
val |= FIELD_PREP(CM_GCR_Cx_OTHER_BLOCK, block);
|
||||
} else {
|
||||
WARN_ON(cluster != 0);
|
||||
WARN_ON(block != CM_GCR_Cx_OTHER_BLOCK_LOCAL);
|
||||
@ -299,7 +298,7 @@ void mips_cm_lock_other(unsigned int cluster, unsigned int core,
|
||||
spin_lock_irqsave(&per_cpu(cm_core_lock, curr_core),
|
||||
per_cpu(cm_core_lock_flags, curr_core));
|
||||
|
||||
val = core << __ffs(CM_GCR_Cx_OTHER_CORENUM);
|
||||
val = FIELD_PREP(CM_GCR_Cx_OTHER_CORENUM, core);
|
||||
}
|
||||
|
||||
write_gcr_cl_other(val);
|
||||
@ -343,8 +342,8 @@ void mips_cm_error_report(void)
|
||||
cm_other = read_gcr_error_mult();
|
||||
|
||||
if (revision < CM_REV_CM3) { /* CM2 */
|
||||
cause = cm_error >> __ffs(CM_GCR_ERROR_CAUSE_ERRTYPE);
|
||||
ocause = cm_other >> __ffs(CM_GCR_ERROR_MULT_ERR2ND);
|
||||
cause = FIELD_GET(CM_GCR_ERROR_CAUSE_ERRTYPE, cm_error);
|
||||
ocause = FIELD_GET(CM_GCR_ERROR_MULT_ERR2ND, cm_other);
|
||||
|
||||
if (!cause)
|
||||
return;
|
||||
@ -386,8 +385,8 @@ void mips_cm_error_report(void)
|
||||
ulong core_id_bits, vp_id_bits, cmd_bits, cmd_group_bits;
|
||||
ulong cm3_cca_bits, mcp_bits, cm3_tr_bits, sched_bit;
|
||||
|
||||
cause = cm_error >> __ffs64(CM3_GCR_ERROR_CAUSE_ERRTYPE);
|
||||
ocause = cm_other >> __ffs(CM_GCR_ERROR_MULT_ERR2ND);
|
||||
cause = FIELD_GET(CM3_GCR_ERROR_CAUSE_ERRTYPE, cm_error);
|
||||
ocause = FIELD_GET(CM_GCR_ERROR_MULT_ERR2ND, cm_other);
|
||||
|
||||
if (!cause)
|
||||
return;
|
||||
|
@ -29,8 +29,8 @@
|
||||
#define EX2(a,b) \
|
||||
9: a,##b; \
|
||||
.section __ex_table,"a"; \
|
||||
PTR 9b,bad_stack; \
|
||||
PTR 9b+4,bad_stack; \
|
||||
PTR 9b,fault; \
|
||||
PTR 9b+4,fault; \
|
||||
.previous
|
||||
|
||||
.set mips1
|
||||
|
@ -239,12 +239,3 @@ SYSCALL_DEFINE3(cachectl, char *, addr, int, nbytes, int, op)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we ever come here the user sp is bad. Zap the process right away.
|
||||
* Due to the bad stack signaling wouldn't work.
|
||||
*/
|
||||
asmlinkage void bad_stack(void)
|
||||
{
|
||||
do_exit(SIGSEGV);
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <linux/export.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/err.h>
|
||||
|
||||
#include <lantiq_soc.h>
|
||||
@ -29,6 +30,7 @@
|
||||
#define LTQ_DMA_PCTRL 0x44
|
||||
#define LTQ_DMA_IRNEN 0xf4
|
||||
|
||||
#define DMA_ID_CHNR GENMASK(26, 20) /* channel number */
|
||||
#define DMA_DESCPT BIT(3) /* descriptor complete irq */
|
||||
#define DMA_TX BIT(8) /* TX channel direction */
|
||||
#define DMA_CHAN_ON BIT(0) /* channel on / off bit */
|
||||
@ -39,7 +41,6 @@
|
||||
#define DMA_POLL BIT(31) /* turn on channel polling */
|
||||
#define DMA_CLK_DIV4 BIT(6) /* polling clock divider */
|
||||
#define DMA_2W_BURST BIT(1) /* 2 word burst length */
|
||||
#define DMA_MAX_CHANNEL 20 /* the soc has 20 channels */
|
||||
#define DMA_ETOP_ENDIANNESS (0xf << 8) /* endianness swap etop channels */
|
||||
#define DMA_WEIGHT (BIT(17) | BIT(16)) /* default channel wheight */
|
||||
|
||||
@ -205,7 +206,7 @@ ltq_dma_init(struct platform_device *pdev)
|
||||
{
|
||||
struct clk *clk;
|
||||
struct resource *res;
|
||||
unsigned id;
|
||||
unsigned int id, nchannels;
|
||||
int i;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
@ -221,21 +222,24 @@ ltq_dma_init(struct platform_device *pdev)
|
||||
clk_enable(clk);
|
||||
ltq_dma_w32_mask(0, DMA_RESET, LTQ_DMA_CTRL);
|
||||
|
||||
usleep_range(1, 10);
|
||||
|
||||
/* disable all interrupts */
|
||||
ltq_dma_w32(0, LTQ_DMA_IRNEN);
|
||||
|
||||
/* reset/configure each channel */
|
||||
for (i = 0; i < DMA_MAX_CHANNEL; i++) {
|
||||
id = ltq_dma_r32(LTQ_DMA_ID);
|
||||
nchannels = ((id & DMA_ID_CHNR) >> 20);
|
||||
for (i = 0; i < nchannels; i++) {
|
||||
ltq_dma_w32(i, LTQ_DMA_CS);
|
||||
ltq_dma_w32(DMA_CHAN_RST, LTQ_DMA_CCTRL);
|
||||
ltq_dma_w32(DMA_POLL | DMA_CLK_DIV4, LTQ_DMA_CPOLL);
|
||||
ltq_dma_w32_mask(DMA_CHAN_ON, 0, LTQ_DMA_CCTRL);
|
||||
}
|
||||
|
||||
id = ltq_dma_r32(LTQ_DMA_ID);
|
||||
dev_info(&pdev->dev,
|
||||
"Init done - hw rev: %X, ports: %d, channels: %d\n",
|
||||
id & 0x1f, (id >> 16) & 0xf, id >> 20);
|
||||
id & 0x1f, (id >> 16) & 0xf, nchannels);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1841,7 +1841,7 @@ syscall_restore:
|
||||
LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
|
||||
|
||||
/* Are we being ptraced? */
|
||||
ldw TASK_FLAGS(%r1),%r19
|
||||
LDREG TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19
|
||||
ldi _TIF_SYSCALL_TRACE_MASK,%r2
|
||||
and,COND(=) %r19,%r2,%r0
|
||||
b,n syscall_restore_rfi
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/ftrace.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/kgdb.h>
|
||||
|
||||
#include <linux/atomic.h>
|
||||
#include <asm/current.h>
|
||||
@ -71,7 +72,10 @@ enum ipi_message_type {
|
||||
IPI_CALL_FUNC,
|
||||
IPI_CPU_START,
|
||||
IPI_CPU_STOP,
|
||||
IPI_CPU_TEST
|
||||
IPI_CPU_TEST,
|
||||
#ifdef CONFIG_KGDB
|
||||
IPI_ENTER_KGDB,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@ -169,7 +173,12 @@ ipi_interrupt(int irq, void *dev_id)
|
||||
case IPI_CPU_TEST:
|
||||
smp_debug(100, KERN_DEBUG "CPU%d is alive!\n", this_cpu);
|
||||
break;
|
||||
|
||||
#ifdef CONFIG_KGDB
|
||||
case IPI_ENTER_KGDB:
|
||||
smp_debug(100, KERN_DEBUG "CPU%d ENTER_KGDB\n", this_cpu);
|
||||
kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs());
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
printk(KERN_CRIT "Unknown IPI num on CPU%d: %lu\n",
|
||||
this_cpu, which);
|
||||
@ -225,6 +234,12 @@ send_IPI_allbutself(enum ipi_message_type op)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_KGDB
|
||||
void kgdb_roundup_cpus(void)
|
||||
{
|
||||
send_IPI_allbutself(IPI_ENTER_KGDB);
|
||||
}
|
||||
#endif
|
||||
|
||||
inline void
|
||||
smp_send_stop(void) { send_IPI_allbutself(IPI_CPU_STOP); }
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
#include <asm/unwind.h>
|
||||
#include <asm/switch_to.h>
|
||||
#include <asm/sections.h>
|
||||
|
||||
/* #define DEBUG 1 */
|
||||
#ifdef DEBUG
|
||||
@ -203,6 +205,11 @@ int __init unwind_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool pc_is_kernel_fn(unsigned long pc, void *fn)
|
||||
{
|
||||
return (unsigned long)dereference_kernel_function_descriptor(fn) == pc;
|
||||
}
|
||||
|
||||
static int unwind_special(struct unwind_frame_info *info, unsigned long pc, int frame_size)
|
||||
{
|
||||
/*
|
||||
@ -221,7 +228,7 @@ static int unwind_special(struct unwind_frame_info *info, unsigned long pc, int
|
||||
extern void * const _call_on_stack;
|
||||
#endif /* CONFIG_IRQSTACKS */
|
||||
|
||||
if (pc == (unsigned long) &handle_interruption) {
|
||||
if (pc_is_kernel_fn(pc, handle_interruption)) {
|
||||
struct pt_regs *regs = (struct pt_regs *)(info->sp - frame_size - PT_SZ_ALGN);
|
||||
dbg("Unwinding through handle_interruption()\n");
|
||||
info->prev_sp = regs->gr[30];
|
||||
@ -229,13 +236,13 @@ static int unwind_special(struct unwind_frame_info *info, unsigned long pc, int
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (pc == (unsigned long) &ret_from_kernel_thread ||
|
||||
pc == (unsigned long) &syscall_exit) {
|
||||
if (pc_is_kernel_fn(pc, ret_from_kernel_thread) ||
|
||||
pc_is_kernel_fn(pc, syscall_exit)) {
|
||||
info->prev_sp = info->prev_ip = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (pc == (unsigned long) &intr_return) {
|
||||
if (pc_is_kernel_fn(pc, intr_return)) {
|
||||
struct pt_regs *regs;
|
||||
|
||||
dbg("Found intr_return()\n");
|
||||
@ -246,20 +253,20 @@ static int unwind_special(struct unwind_frame_info *info, unsigned long pc, int
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (pc == (unsigned long) &_switch_to_ret) {
|
||||
if (pc_is_kernel_fn(pc, _switch_to) ||
|
||||
pc_is_kernel_fn(pc, _switch_to_ret)) {
|
||||
info->prev_sp = info->sp - CALLEE_SAVE_FRAME_SIZE;
|
||||
info->prev_ip = *(unsigned long *)(info->prev_sp - RP_OFFSET);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IRQSTACKS
|
||||
if (pc == (unsigned long) &_call_on_stack) {
|
||||
if (pc_is_kernel_fn(pc, _call_on_stack)) {
|
||||
info->prev_sp = *(unsigned long *)(info->sp - FRAME_SIZE - REG_SZ);
|
||||
info->prev_ip = *(unsigned long *)(info->sp - FRAME_SIZE - RP_OFFSET);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -56,6 +56,8 @@ SECTIONS
|
||||
{
|
||||
. = KERNEL_BINARY_TEXT_START;
|
||||
|
||||
_stext = .; /* start of kernel text, includes init code & data */
|
||||
|
||||
__init_begin = .;
|
||||
HEAD_TEXT_SECTION
|
||||
MLONGCALL_DISCARD(INIT_TEXT_SECTION(8))
|
||||
@ -79,7 +81,6 @@ SECTIONS
|
||||
/* freed after init ends here */
|
||||
|
||||
_text = .; /* Text and read-only data */
|
||||
_stext = .;
|
||||
MLONGCALL_KEEP(INIT_TEXT_SECTION(8))
|
||||
.text ALIGN(PAGE_SIZE) : {
|
||||
TEXT_TEXT
|
||||
|
@ -18,12 +18,9 @@ void notrace set_fixmap(enum fixed_addresses idx, phys_addr_t phys)
|
||||
pte_t *pte;
|
||||
|
||||
if (pmd_none(*pmd))
|
||||
pmd = pmd_alloc(NULL, pgd, vaddr);
|
||||
|
||||
pte = pte_offset_kernel(pmd, vaddr);
|
||||
if (pte_none(*pte))
|
||||
pte = pte_alloc_kernel(pmd, vaddr);
|
||||
|
||||
pte = pte_offset_kernel(pmd, vaddr);
|
||||
set_pte_at(&init_mm, vaddr, pte, __mk_pte(phys, PAGE_KERNEL_RWX));
|
||||
flush_tlb_kernel_range(vaddr, vaddr + PAGE_SIZE);
|
||||
}
|
||||
|
@ -892,9 +892,9 @@ void flush_tlb_all(void)
|
||||
{
|
||||
int do_recycle;
|
||||
|
||||
__inc_irq_stat(irq_tlb_count);
|
||||
do_recycle = 0;
|
||||
spin_lock(&sid_lock);
|
||||
__inc_irq_stat(irq_tlb_count);
|
||||
if (dirty_space_ids > RECYCLE_THRESHOLD) {
|
||||
BUG_ON(recycle_inuse); /* FIXME: Use a semaphore/wait queue here */
|
||||
get_dirty_sids(&recycle_ndirty,recycle_dirty_array);
|
||||
@ -913,8 +913,8 @@ void flush_tlb_all(void)
|
||||
#else
|
||||
void flush_tlb_all(void)
|
||||
{
|
||||
__inc_irq_stat(irq_tlb_count);
|
||||
spin_lock(&sid_lock);
|
||||
__inc_irq_stat(irq_tlb_count);
|
||||
flush_tlb_all_local(NULL);
|
||||
recycle_sids();
|
||||
spin_unlock(&sid_lock);
|
||||
|
@ -22,6 +22,7 @@
|
||||
#define BRANCH_ABSOLUTE 0x2
|
||||
|
||||
bool is_offset_in_branch_range(long offset);
|
||||
bool is_offset_in_cond_branch_range(long offset);
|
||||
unsigned int create_branch(const unsigned int *addr,
|
||||
unsigned long target, int flags);
|
||||
unsigned int create_cond_branch(const unsigned int *addr,
|
||||
|
@ -39,6 +39,11 @@ static inline bool security_ftr_enabled(u64 feature)
|
||||
return !!(powerpc_security_features & feature);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PPC_BOOK3S_64
|
||||
enum stf_barrier_type stf_barrier_type_get(void);
|
||||
#else
|
||||
static inline enum stf_barrier_type stf_barrier_type_get(void) { return STF_BARRIER_NONE; }
|
||||
#endif
|
||||
|
||||
// Features indicating support for Spectre/Meltdown mitigations
|
||||
|
||||
|
@ -256,6 +256,11 @@ static int __init handle_no_stf_barrier(char *p)
|
||||
|
||||
early_param("no_stf_barrier", handle_no_stf_barrier);
|
||||
|
||||
enum stf_barrier_type stf_barrier_type_get(void)
|
||||
{
|
||||
return stf_enabled_flush_types;
|
||||
}
|
||||
|
||||
/* This is the generic flag used by other architectures */
|
||||
static int __init handle_ssbd(char *p)
|
||||
{
|
||||
|
@ -221,6 +221,11 @@ bool is_offset_in_branch_range(long offset)
|
||||
return (offset >= -0x2000000 && offset <= 0x1fffffc && !(offset & 0x3));
|
||||
}
|
||||
|
||||
bool is_offset_in_cond_branch_range(long offset)
|
||||
{
|
||||
return offset >= -0x8000 && offset <= 0x7fff && !(offset & 0x3);
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper to check if a given instruction is a conditional branch
|
||||
* Derived from the conditional checks in analyse_instr()
|
||||
@ -274,7 +279,7 @@ unsigned int create_cond_branch(const unsigned int *addr,
|
||||
offset = offset - (unsigned long)addr;
|
||||
|
||||
/* Check we can represent the target in the instruction format */
|
||||
if (offset < -0x8000 || offset > 0x7FFF || offset & 0x3)
|
||||
if (!is_offset_in_cond_branch_range(offset))
|
||||
return 0;
|
||||
|
||||
/* Mask out the flags and target, so they don't step on each other. */
|
||||
|
@ -11,6 +11,7 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <asm/types.h>
|
||||
#include <asm/code-patching.h>
|
||||
|
||||
#ifdef PPC64_ELF_ABI_v1
|
||||
#define FUNCTION_DESCR_SIZE 24
|
||||
@ -180,13 +181,26 @@
|
||||
#define PPC_NEG(d, a) EMIT(PPC_INST_NEG | ___PPC_RT(d) | ___PPC_RA(a))
|
||||
|
||||
/* Long jump; (unconditional 'branch') */
|
||||
#define PPC_JMP(dest) EMIT(PPC_INST_BRANCH | \
|
||||
(((dest) - (ctx->idx * 4)) & 0x03fffffc))
|
||||
#define PPC_JMP(dest) \
|
||||
do { \
|
||||
long offset = (long)(dest) - (ctx->idx * 4); \
|
||||
if (!is_offset_in_branch_range(offset)) { \
|
||||
pr_err_ratelimited("Branch offset 0x%lx (@%u) out of range\n", offset, ctx->idx); \
|
||||
return -ERANGE; \
|
||||
} \
|
||||
EMIT(PPC_INST_BRANCH | (offset & 0x03fffffc)); \
|
||||
} while (0)
|
||||
/* "cond" here covers BO:BI fields. */
|
||||
#define PPC_BCC_SHORT(cond, dest) EMIT(PPC_INST_BRANCH_COND | \
|
||||
(((cond) & 0x3ff) << 16) | \
|
||||
(((dest) - (ctx->idx * 4)) & \
|
||||
0xfffc))
|
||||
#define PPC_BCC_SHORT(cond, dest) \
|
||||
do { \
|
||||
long offset = (long)(dest) - (ctx->idx * 4); \
|
||||
if (!is_offset_in_cond_branch_range(offset)) { \
|
||||
pr_err_ratelimited("Conditional branch offset 0x%lx (@%u) out of range\n", offset, ctx->idx); \
|
||||
return -ERANGE; \
|
||||
} \
|
||||
EMIT(PPC_INST_BRANCH_COND | (((cond) & 0x3ff) << 16) | (offset & 0xfffc)); \
|
||||
} while (0)
|
||||
|
||||
/* Sign-extended 32-bit immediate load */
|
||||
#define PPC_LI32(d, i) do { \
|
||||
if ((int)(uintptr_t)(i) >= -32768 && \
|
||||
@ -225,11 +239,6 @@
|
||||
#define PPC_FUNC_ADDR(d,i) do { PPC_LI32(d, i); } while(0)
|
||||
#endif
|
||||
|
||||
static inline bool is_nearbranch(int offset)
|
||||
{
|
||||
return (offset < 32768) && (offset >= -32768);
|
||||
}
|
||||
|
||||
/*
|
||||
* The fly in the ointment of code size changing from pass to pass is
|
||||
* avoided by padding the short branch case with a NOP. If code size differs
|
||||
@ -238,7 +247,7 @@ static inline bool is_nearbranch(int offset)
|
||||
* state.
|
||||
*/
|
||||
#define PPC_BCC(cond, dest) do { \
|
||||
if (is_nearbranch((dest) - (ctx->idx * 4))) { \
|
||||
if (is_offset_in_cond_branch_range((long)(dest) - (ctx->idx * 4))) { \
|
||||
PPC_BCC_SHORT(cond, dest); \
|
||||
PPC_NOP(); \
|
||||
} else { \
|
||||
|
@ -16,18 +16,18 @@
|
||||
* with our redzone usage.
|
||||
*
|
||||
* [ prev sp ] <-------------
|
||||
* [ nv gpr save area ] 6*8 |
|
||||
* [ nv gpr save area ] 5*8 |
|
||||
* [ tail_call_cnt ] 8 |
|
||||
* [ local_tmp_var ] 8 |
|
||||
* [ local_tmp_var ] 16 |
|
||||
* fp (r31) --> [ ebpf stack space ] upto 512 |
|
||||
* [ frame header ] 32/112 |
|
||||
* sp (r1) ---> [ stack pointer ] --------------
|
||||
*/
|
||||
|
||||
/* for gpr non volatile registers BPG_REG_6 to 10 */
|
||||
#define BPF_PPC_STACK_SAVE (6*8)
|
||||
#define BPF_PPC_STACK_SAVE (5*8)
|
||||
/* for bpf JIT code internal usage */
|
||||
#define BPF_PPC_STACK_LOCALS 16
|
||||
#define BPF_PPC_STACK_LOCALS 24
|
||||
/* stack frame excluding BPF stack, ensure this is quadword aligned */
|
||||
#define BPF_PPC_STACKFRAME (STACK_FRAME_MIN_SIZE + \
|
||||
BPF_PPC_STACK_LOCALS + BPF_PPC_STACK_SAVE)
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <linux/if_vlan.h>
|
||||
#include <asm/kprobes.h>
|
||||
#include <linux/bpf.h>
|
||||
#include <asm/security_features.h>
|
||||
|
||||
#include "bpf_jit64.h"
|
||||
|
||||
@ -56,9 +57,9 @@ static inline bool bpf_has_stack_frame(struct codegen_context *ctx)
|
||||
* [ prev sp ] <-------------
|
||||
* [ ... ] |
|
||||
* sp (r1) ---> [ stack pointer ] --------------
|
||||
* [ nv gpr save area ] 6*8
|
||||
* [ nv gpr save area ] 5*8
|
||||
* [ tail_call_cnt ] 8
|
||||
* [ local_tmp_var ] 8
|
||||
* [ local_tmp_var ] 16
|
||||
* [ unused red zone ] 208 bytes protected
|
||||
*/
|
||||
static int bpf_jit_stack_local(struct codegen_context *ctx)
|
||||
@ -66,12 +67,12 @@ static int bpf_jit_stack_local(struct codegen_context *ctx)
|
||||
if (bpf_has_stack_frame(ctx))
|
||||
return STACK_FRAME_MIN_SIZE + ctx->stack_size;
|
||||
else
|
||||
return -(BPF_PPC_STACK_SAVE + 16);
|
||||
return -(BPF_PPC_STACK_SAVE + 24);
|
||||
}
|
||||
|
||||
static int bpf_jit_stack_tailcallcnt(struct codegen_context *ctx)
|
||||
{
|
||||
return bpf_jit_stack_local(ctx) + 8;
|
||||
return bpf_jit_stack_local(ctx) + 16;
|
||||
}
|
||||
|
||||
static int bpf_jit_stack_offsetof(struct codegen_context *ctx, int reg)
|
||||
@ -224,7 +225,7 @@ static void bpf_jit_emit_func_call_rel(u32 *image, struct codegen_context *ctx,
|
||||
PPC_BLRL();
|
||||
}
|
||||
|
||||
static void bpf_jit_emit_tail_call(u32 *image, struct codegen_context *ctx, u32 out)
|
||||
static int bpf_jit_emit_tail_call(u32 *image, struct codegen_context *ctx, u32 out)
|
||||
{
|
||||
/*
|
||||
* By now, the eBPF program has already setup parameters in r3, r4 and r5
|
||||
@ -285,14 +286,39 @@ static void bpf_jit_emit_tail_call(u32 *image, struct codegen_context *ctx, u32
|
||||
bpf_jit_emit_common_epilogue(image, ctx);
|
||||
|
||||
PPC_BCTR();
|
||||
|
||||
/* out: */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* We spill into the redzone always, even if the bpf program has its own stackframe.
|
||||
* Offsets hardcoded based on BPF_PPC_STACK_SAVE -- see bpf_jit_stack_local()
|
||||
*/
|
||||
void bpf_stf_barrier(void);
|
||||
|
||||
asm (
|
||||
" .global bpf_stf_barrier ;"
|
||||
" bpf_stf_barrier: ;"
|
||||
" std 21,-64(1) ;"
|
||||
" std 22,-56(1) ;"
|
||||
" sync ;"
|
||||
" ld 21,-64(1) ;"
|
||||
" ld 22,-56(1) ;"
|
||||
" ori 31,31,0 ;"
|
||||
" .rept 14 ;"
|
||||
" b 1f ;"
|
||||
" 1: ;"
|
||||
" .endr ;"
|
||||
" blr ;"
|
||||
);
|
||||
|
||||
/* Assemble the body code between the prologue & epilogue */
|
||||
static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
|
||||
struct codegen_context *ctx,
|
||||
u32 *addrs, bool extra_pass)
|
||||
{
|
||||
enum stf_barrier_type stf_barrier = stf_barrier_type_get();
|
||||
const struct bpf_insn *insn = fp->insnsi;
|
||||
int flen = fp->len;
|
||||
int i, ret;
|
||||
@ -347,18 +373,25 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
|
||||
PPC_SUB(dst_reg, dst_reg, src_reg);
|
||||
goto bpf_alu32_trunc;
|
||||
case BPF_ALU | BPF_ADD | BPF_K: /* (u32) dst += (u32) imm */
|
||||
case BPF_ALU | BPF_SUB | BPF_K: /* (u32) dst -= (u32) imm */
|
||||
case BPF_ALU64 | BPF_ADD | BPF_K: /* dst += imm */
|
||||
if (!imm) {
|
||||
goto bpf_alu32_trunc;
|
||||
} else if (imm >= -32768 && imm < 32768) {
|
||||
PPC_ADDI(dst_reg, dst_reg, IMM_L(imm));
|
||||
} else {
|
||||
PPC_LI32(b2p[TMP_REG_1], imm);
|
||||
PPC_ADD(dst_reg, dst_reg, b2p[TMP_REG_1]);
|
||||
}
|
||||
goto bpf_alu32_trunc;
|
||||
case BPF_ALU | BPF_SUB | BPF_K: /* (u32) dst -= (u32) imm */
|
||||
case BPF_ALU64 | BPF_SUB | BPF_K: /* dst -= imm */
|
||||
if (BPF_OP(code) == BPF_SUB)
|
||||
imm = -imm;
|
||||
if (imm) {
|
||||
if (imm >= -32768 && imm < 32768)
|
||||
PPC_ADDI(dst_reg, dst_reg, IMM_L(imm));
|
||||
else {
|
||||
PPC_LI32(b2p[TMP_REG_1], imm);
|
||||
PPC_ADD(dst_reg, dst_reg, b2p[TMP_REG_1]);
|
||||
}
|
||||
if (!imm) {
|
||||
goto bpf_alu32_trunc;
|
||||
} else if (imm > -32768 && imm <= 32768) {
|
||||
PPC_ADDI(dst_reg, dst_reg, IMM_L(-imm));
|
||||
} else {
|
||||
PPC_LI32(b2p[TMP_REG_1], imm);
|
||||
PPC_SUB(dst_reg, dst_reg, b2p[TMP_REG_1]);
|
||||
}
|
||||
goto bpf_alu32_trunc;
|
||||
case BPF_ALU | BPF_MUL | BPF_X: /* (u32) dst *= (u32) src */
|
||||
@ -654,6 +687,30 @@ emit_clear:
|
||||
* BPF_ST NOSPEC (speculation barrier)
|
||||
*/
|
||||
case BPF_ST | BPF_NOSPEC:
|
||||
if (!security_ftr_enabled(SEC_FTR_FAVOUR_SECURITY) ||
|
||||
(!security_ftr_enabled(SEC_FTR_L1D_FLUSH_PR) &&
|
||||
(!security_ftr_enabled(SEC_FTR_L1D_FLUSH_HV) || !cpu_has_feature(CPU_FTR_HVMODE))))
|
||||
break;
|
||||
|
||||
switch (stf_barrier) {
|
||||
case STF_BARRIER_EIEIO:
|
||||
EMIT(0x7c0006ac | 0x02000000);
|
||||
break;
|
||||
case STF_BARRIER_SYNC_ORI:
|
||||
EMIT(PPC_INST_SYNC);
|
||||
PPC_LD(b2p[TMP_REG_1], 13, 0);
|
||||
PPC_ORI(31, 31, 0);
|
||||
break;
|
||||
case STF_BARRIER_FALLBACK:
|
||||
EMIT(PPC_INST_MFLR | ___PPC_RT(b2p[TMP_REG_1]));
|
||||
PPC_LI64(12, dereference_kernel_function_descriptor(bpf_stf_barrier));
|
||||
PPC_MTCTR(12);
|
||||
EMIT(PPC_INST_BCTR | 0x1);
|
||||
PPC_MTLR(b2p[TMP_REG_1]);
|
||||
break;
|
||||
case STF_BARRIER_NONE:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
/*
|
||||
@ -1001,7 +1058,9 @@ cond_branch:
|
||||
*/
|
||||
case BPF_JMP | BPF_TAIL_CALL:
|
||||
ctx->seen |= SEEN_TAILCALL;
|
||||
bpf_jit_emit_tail_call(image, ctx, addrs[i + 1]);
|
||||
ret = bpf_jit_emit_tail_call(image, ctx, addrs[i + 1]);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -208,6 +208,7 @@ static void node_irq_request(const char *compat, irq_handler_t errirq_handler)
|
||||
if (irq == NO_IRQ) {
|
||||
pr_err("device tree node %pOFn is missing a interrupt",
|
||||
np);
|
||||
of_node_put(np);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -215,6 +216,7 @@ static void node_irq_request(const char *compat, irq_handler_t errirq_handler)
|
||||
if (rc) {
|
||||
pr_err("fsp_of_probe: request_irq failed: np=%pOF rc=%d",
|
||||
np, rc);
|
||||
of_node_put(np);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -94,9 +94,8 @@ int __init mpc85xx_setup_pmc(void)
|
||||
pr_err("Could not map guts node address\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
qoriq_pm_ops = &mpc85xx_pm_ops;
|
||||
}
|
||||
|
||||
qoriq_pm_ops = &mpc85xx_pm_ops;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -372,6 +372,12 @@ static struct notifier_block opal_prd_event_nb = {
|
||||
.priority = 0,
|
||||
};
|
||||
|
||||
static struct notifier_block opal_prd_event_nb2 = {
|
||||
.notifier_call = opal_prd_msg_notifier,
|
||||
.next = NULL,
|
||||
.priority = 0,
|
||||
};
|
||||
|
||||
static int opal_prd_probe(struct platform_device *pdev)
|
||||
{
|
||||
int rc;
|
||||
@ -393,9 +399,10 @@ static int opal_prd_probe(struct platform_device *pdev)
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = opal_message_notifier_register(OPAL_MSG_PRD2, &opal_prd_event_nb);
|
||||
rc = opal_message_notifier_register(OPAL_MSG_PRD2, &opal_prd_event_nb2);
|
||||
if (rc) {
|
||||
pr_err("Couldn't register PRD2 event notifier\n");
|
||||
opal_message_notifier_unregister(OPAL_MSG_PRD, &opal_prd_event_nb);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -404,6 +411,8 @@ static int opal_prd_probe(struct platform_device *pdev)
|
||||
pr_err("failed to register miscdev\n");
|
||||
opal_message_notifier_unregister(OPAL_MSG_PRD,
|
||||
&opal_prd_event_nb);
|
||||
opal_message_notifier_unregister(OPAL_MSG_PRD2,
|
||||
&opal_prd_event_nb2);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -414,6 +423,7 @@ static int opal_prd_remove(struct platform_device *pdev)
|
||||
{
|
||||
misc_deregister(&opal_prd_dev);
|
||||
opal_message_notifier_unregister(OPAL_MSG_PRD, &opal_prd_event_nb);
|
||||
opal_message_notifier_unregister(OPAL_MSG_PRD2, &opal_prd_event_nb2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -398,6 +398,8 @@ static int handle_sske(struct kvm_vcpu *vcpu)
|
||||
up_read(¤t->mm->mmap_sem);
|
||||
if (rc == -EFAULT)
|
||||
return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING);
|
||||
if (rc == -EAGAIN)
|
||||
continue;
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
start += PAGE_SIZE;
|
||||
|
@ -684,9 +684,10 @@ void __gmap_zap(struct gmap *gmap, unsigned long gaddr)
|
||||
vmaddr |= gaddr & ~PMD_MASK;
|
||||
/* Get pointer to the page table entry */
|
||||
ptep = get_locked_pte(gmap->mm, vmaddr, &ptl);
|
||||
if (likely(ptep))
|
||||
if (likely(ptep)) {
|
||||
ptep_zap_unused(gmap->mm, vmaddr, ptep, 0);
|
||||
pte_unmap_unlock(ptep, ptl);
|
||||
pte_unmap_unlock(ptep, ptl);
|
||||
}
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__gmap_zap);
|
||||
|
@ -62,18 +62,20 @@ void fpu_state_restore(struct pt_regs *regs)
|
||||
}
|
||||
|
||||
if (!tsk_used_math(tsk)) {
|
||||
local_irq_enable();
|
||||
int ret;
|
||||
/*
|
||||
* does a slab alloc which can sleep
|
||||
*/
|
||||
if (init_fpu(tsk)) {
|
||||
local_irq_enable();
|
||||
ret = init_fpu(tsk);
|
||||
local_irq_disable();
|
||||
if (ret) {
|
||||
/*
|
||||
* ran out of memory!
|
||||
*/
|
||||
do_group_exit(SIGKILL);
|
||||
force_sig(SIGKILL);
|
||||
return;
|
||||
}
|
||||
local_irq_disable();
|
||||
}
|
||||
|
||||
grab_fpu(regs);
|
||||
|
@ -155,7 +155,6 @@ void set_hv_tscchange_cb(void (*cb)(void))
|
||||
struct hv_reenlightenment_control re_ctrl = {
|
||||
.vector = HYPERV_REENLIGHTENMENT_VECTOR,
|
||||
.enabled = 1,
|
||||
.target_vp = hv_vp_index[smp_processor_id()]
|
||||
};
|
||||
struct hv_tsc_emulation_control emu_ctrl = {.enabled = 1};
|
||||
|
||||
@ -169,8 +168,12 @@ void set_hv_tscchange_cb(void (*cb)(void))
|
||||
/* Make sure callback is registered before we write to MSRs */
|
||||
wmb();
|
||||
|
||||
re_ctrl.target_vp = hv_vp_index[get_cpu()];
|
||||
|
||||
wrmsrl(HV_X64_MSR_REENLIGHTENMENT_CONTROL, *((u64 *)&re_ctrl));
|
||||
wrmsrl(HV_X64_MSR_TSC_EMULATION_CONTROL, *((u64 *)&emu_ctrl));
|
||||
|
||||
put_cpu();
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(set_hv_tscchange_cb);
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#define THREAD_SIZE_ORDER (2 + KASAN_STACK_ORDER)
|
||||
#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
|
||||
|
||||
#define EXCEPTION_STACK_ORDER (0 + KASAN_STACK_ORDER)
|
||||
#define EXCEPTION_STACK_ORDER (1 + KASAN_STACK_ORDER)
|
||||
#define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER)
|
||||
|
||||
#define IRQ_STACK_ORDER (2 + KASAN_STACK_ORDER)
|
||||
|
@ -987,6 +987,8 @@ static void init_amd(struct cpuinfo_x86 *c)
|
||||
if (cpu_has(c, X86_FEATURE_IRPERF) &&
|
||||
!cpu_has_amd_erratum(c, amd_erratum_1054))
|
||||
msr_set_bit(MSR_K7_HWCR, MSR_K7_HWCR_IRPERF_EN_BIT);
|
||||
|
||||
check_null_seg_clears_base(c);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
|
@ -1336,9 +1336,8 @@ void __init early_cpu_init(void)
|
||||
early_identify_cpu(&boot_cpu_data);
|
||||
}
|
||||
|
||||
static void detect_null_seg_behavior(struct cpuinfo_x86 *c)
|
||||
static bool detect_null_seg_behavior(void)
|
||||
{
|
||||
#ifdef CONFIG_X86_64
|
||||
/*
|
||||
* Empirically, writing zero to a segment selector on AMD does
|
||||
* not clear the base, whereas writing zero to a segment
|
||||
@ -1359,10 +1358,43 @@ static void detect_null_seg_behavior(struct cpuinfo_x86 *c)
|
||||
wrmsrl(MSR_FS_BASE, 1);
|
||||
loadsegment(fs, 0);
|
||||
rdmsrl(MSR_FS_BASE, tmp);
|
||||
if (tmp != 0)
|
||||
set_cpu_bug(c, X86_BUG_NULL_SEG);
|
||||
wrmsrl(MSR_FS_BASE, old_base);
|
||||
#endif
|
||||
return tmp == 0;
|
||||
}
|
||||
|
||||
void check_null_seg_clears_base(struct cpuinfo_x86 *c)
|
||||
{
|
||||
/* BUG_NULL_SEG is only relevant with 64bit userspace */
|
||||
if (!IS_ENABLED(CONFIG_X86_64))
|
||||
return;
|
||||
|
||||
/* Zen3 CPUs advertise Null Selector Clears Base in CPUID. */
|
||||
if (c->extended_cpuid_level >= 0x80000021 &&
|
||||
cpuid_eax(0x80000021) & BIT(6))
|
||||
return;
|
||||
|
||||
/*
|
||||
* CPUID bit above wasn't set. If this kernel is still running
|
||||
* as a HV guest, then the HV has decided not to advertize
|
||||
* that CPUID bit for whatever reason. For example, one
|
||||
* member of the migration pool might be vulnerable. Which
|
||||
* means, the bug is present: set the BUG flag and return.
|
||||
*/
|
||||
if (cpu_has(c, X86_FEATURE_HYPERVISOR)) {
|
||||
set_cpu_bug(c, X86_BUG_NULL_SEG);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Zen2 CPUs also have this behaviour, but no CPUID bit.
|
||||
* 0x18 is the respective family for Hygon.
|
||||
*/
|
||||
if ((c->x86 == 0x17 || c->x86 == 0x18) &&
|
||||
detect_null_seg_behavior())
|
||||
return;
|
||||
|
||||
/* All the remaining ones are affected */
|
||||
set_cpu_bug(c, X86_BUG_NULL_SEG);
|
||||
}
|
||||
|
||||
static void generic_identify(struct cpuinfo_x86 *c)
|
||||
@ -1398,8 +1430,6 @@ static void generic_identify(struct cpuinfo_x86 *c)
|
||||
|
||||
get_model_name(c); /* Default name */
|
||||
|
||||
detect_null_seg_behavior(c);
|
||||
|
||||
/*
|
||||
* ESPFIX is a strange bug. All real CPUs have it. Paravirt
|
||||
* systems that run Linux at CPL > 0 may or may not have the
|
||||
|
@ -73,6 +73,7 @@ extern int detect_extended_topology_early(struct cpuinfo_x86 *c);
|
||||
extern int detect_extended_topology(struct cpuinfo_x86 *c);
|
||||
extern int detect_ht_early(struct cpuinfo_x86 *c);
|
||||
extern void detect_ht(struct cpuinfo_x86 *c);
|
||||
extern void check_null_seg_clears_base(struct cpuinfo_x86 *c);
|
||||
|
||||
unsigned int aperfmperf_get_khz(int cpu);
|
||||
|
||||
|
@ -350,6 +350,8 @@ static void init_hygon(struct cpuinfo_x86 *c)
|
||||
/* Hygon CPUs don't reset SS attributes on SYSRET, Xen does. */
|
||||
if (!cpu_has(c, X86_FEATURE_XENPV))
|
||||
set_cpu_bug(c, X86_BUG_SYSRET_SS_ATTRS);
|
||||
|
||||
check_null_seg_clears_base(c);
|
||||
}
|
||||
|
||||
static void cpu_detect_tlb_hygon(struct cpuinfo_x86 *c)
|
||||
|
@ -295,8 +295,10 @@ void kvm_set_posted_intr_wakeup_handler(void (*handler)(void))
|
||||
{
|
||||
if (handler)
|
||||
kvm_posted_intr_wakeup_handler = handler;
|
||||
else
|
||||
else {
|
||||
kvm_posted_intr_wakeup_handler = dummy_handler;
|
||||
synchronize_rcu();
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(kvm_set_posted_intr_wakeup_handler);
|
||||
|
||||
|
@ -785,15 +785,15 @@ void update_exception_bitmap(struct kvm_vcpu *vcpu)
|
||||
/*
|
||||
* Check if MSR is intercepted for currently loaded MSR bitmap.
|
||||
*/
|
||||
static bool msr_write_intercepted(struct kvm_vcpu *vcpu, u32 msr)
|
||||
static bool msr_write_intercepted(struct vcpu_vmx *vmx, u32 msr)
|
||||
{
|
||||
unsigned long *msr_bitmap;
|
||||
int f = sizeof(unsigned long);
|
||||
|
||||
if (!cpu_has_vmx_msr_bitmap())
|
||||
if (!(exec_controls_get(vmx) & CPU_BASED_USE_MSR_BITMAPS))
|
||||
return true;
|
||||
|
||||
msr_bitmap = to_vmx(vcpu)->loaded_vmcs->msr_bitmap;
|
||||
msr_bitmap = vmx->loaded_vmcs->msr_bitmap;
|
||||
|
||||
if (msr <= 0x1fff) {
|
||||
return !!test_bit(msr, msr_bitmap + 0x800 / f);
|
||||
@ -6579,7 +6579,7 @@ static void vmx_vcpu_run(struct kvm_vcpu *vcpu)
|
||||
* If the L02 MSR bitmap does not intercept the MSR, then we need to
|
||||
* save it.
|
||||
*/
|
||||
if (unlikely(!msr_write_intercepted(vcpu, MSR_IA32_SPEC_CTRL)))
|
||||
if (unlikely(!msr_write_intercepted(vmx, MSR_IA32_SPEC_CTRL)))
|
||||
vmx->spec_ctrl = native_read_msr(MSR_IA32_SPEC_CTRL);
|
||||
|
||||
x86_spec_ctrl_restore_host(vmx->spec_ctrl, 0);
|
||||
|
@ -27,6 +27,15 @@
|
||||
#undef CONFIG_PARAVIRT_XXL
|
||||
#undef CONFIG_PARAVIRT_SPINLOCKS
|
||||
|
||||
/*
|
||||
* This code runs before CPU feature bits are set. By default, the
|
||||
* pgtable_l5_enabled() function uses bit X86_FEATURE_LA57 to determine if
|
||||
* 5-level paging is active, so that won't work here. USE_EARLY_PGTABLE_L5
|
||||
* is provided to handle this situation and, instead, use a variable that
|
||||
* has been set by the early boot code.
|
||||
*/
|
||||
#define USE_EARLY_PGTABLE_L5
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/mem_encrypt.h>
|
||||
|
@ -733,7 +733,6 @@ void blk_mq_requeue_request(struct request *rq, bool kick_requeue_list)
|
||||
/* this request will be re-inserted to io scheduler queue */
|
||||
blk_mq_sched_requeue_request(rq);
|
||||
|
||||
BUG_ON(!list_empty(&rq->queuelist));
|
||||
blk_mq_add_to_requeue_list(rq, true, kick_requeue_list);
|
||||
}
|
||||
EXPORT_SYMBOL(blk_mq_requeue_request);
|
||||
|
@ -242,12 +242,12 @@ config CRYPTO_DH
|
||||
|
||||
config CRYPTO_ECC
|
||||
tristate
|
||||
select CRYPTO_RNG_DEFAULT
|
||||
|
||||
config CRYPTO_ECDH
|
||||
tristate "ECDH algorithm"
|
||||
select CRYPTO_ECC
|
||||
select CRYPTO_KPP
|
||||
select CRYPTO_RNG_DEFAULT
|
||||
help
|
||||
Generic implementation of the ECDH algorithm
|
||||
|
||||
|
@ -79,12 +79,14 @@ static void pcrypt_aead_enc(struct padata_priv *padata)
|
||||
{
|
||||
struct pcrypt_request *preq = pcrypt_padata_request(padata);
|
||||
struct aead_request *req = pcrypt_request_ctx(preq);
|
||||
int ret;
|
||||
|
||||
padata->info = crypto_aead_encrypt(req);
|
||||
ret = crypto_aead_encrypt(req);
|
||||
|
||||
if (padata->info == -EINPROGRESS)
|
||||
if (ret == -EINPROGRESS)
|
||||
return;
|
||||
|
||||
padata->info = ret;
|
||||
padata_do_serial(padata);
|
||||
}
|
||||
|
||||
@ -124,12 +126,14 @@ static void pcrypt_aead_dec(struct padata_priv *padata)
|
||||
{
|
||||
struct pcrypt_request *preq = pcrypt_padata_request(padata);
|
||||
struct aead_request *req = pcrypt_request_ctx(preq);
|
||||
int ret;
|
||||
|
||||
padata->info = crypto_aead_decrypt(req);
|
||||
ret = crypto_aead_decrypt(req);
|
||||
|
||||
if (padata->info == -EINPROGRESS)
|
||||
if (ret == -EINPROGRESS)
|
||||
return;
|
||||
|
||||
padata->info = ret;
|
||||
padata_do_serial(padata);
|
||||
}
|
||||
|
||||
|
@ -220,6 +220,8 @@ extern struct acpi_bit_register_info
|
||||
acpi_gbl_bit_register_info[ACPI_NUM_BITREG];
|
||||
ACPI_GLOBAL(u8, acpi_gbl_sleep_type_a);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_sleep_type_b);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_sleep_type_a_s0);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_sleep_type_b_s0);
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
|
@ -147,17 +147,13 @@ acpi_status acpi_hw_extended_sleep(u8 sleep_state)
|
||||
|
||||
acpi_status acpi_hw_extended_wake_prep(u8 sleep_state)
|
||||
{
|
||||
acpi_status status;
|
||||
u8 sleep_type_value;
|
||||
|
||||
ACPI_FUNCTION_TRACE(hw_extended_wake_prep);
|
||||
|
||||
status = acpi_get_sleep_type_data(ACPI_STATE_S0,
|
||||
&acpi_gbl_sleep_type_a,
|
||||
&acpi_gbl_sleep_type_b);
|
||||
if (ACPI_SUCCESS(status)) {
|
||||
if (acpi_gbl_sleep_type_a_s0 != ACPI_SLEEP_TYPE_INVALID) {
|
||||
sleep_type_value =
|
||||
((acpi_gbl_sleep_type_a << ACPI_X_SLEEP_TYPE_POSITION) &
|
||||
((acpi_gbl_sleep_type_a_s0 << ACPI_X_SLEEP_TYPE_POSITION) &
|
||||
ACPI_X_SLEEP_TYPE_MASK);
|
||||
|
||||
(void)acpi_write((u64)(sleep_type_value | ACPI_X_SLEEP_ENABLE),
|
||||
|
@ -179,7 +179,7 @@ acpi_status acpi_hw_legacy_sleep(u8 sleep_state)
|
||||
|
||||
acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state)
|
||||
{
|
||||
acpi_status status;
|
||||
acpi_status status = AE_OK;
|
||||
struct acpi_bit_register_info *sleep_type_reg_info;
|
||||
struct acpi_bit_register_info *sleep_enable_reg_info;
|
||||
u32 pm1a_control;
|
||||
@ -192,10 +192,7 @@ acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state)
|
||||
* This is unclear from the ACPI Spec, but it is required
|
||||
* by some machines.
|
||||
*/
|
||||
status = acpi_get_sleep_type_data(ACPI_STATE_S0,
|
||||
&acpi_gbl_sleep_type_a,
|
||||
&acpi_gbl_sleep_type_b);
|
||||
if (ACPI_SUCCESS(status)) {
|
||||
if (acpi_gbl_sleep_type_a_s0 != ACPI_SLEEP_TYPE_INVALID) {
|
||||
sleep_type_reg_info =
|
||||
acpi_hw_get_bit_register_info(ACPI_BITREG_SLEEP_TYPE);
|
||||
sleep_enable_reg_info =
|
||||
@ -216,9 +213,9 @@ acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state)
|
||||
|
||||
/* Insert the SLP_TYP bits */
|
||||
|
||||
pm1a_control |= (acpi_gbl_sleep_type_a <<
|
||||
pm1a_control |= (acpi_gbl_sleep_type_a_s0 <<
|
||||
sleep_type_reg_info->bit_position);
|
||||
pm1b_control |= (acpi_gbl_sleep_type_b <<
|
||||
pm1b_control |= (acpi_gbl_sleep_type_b_s0 <<
|
||||
sleep_type_reg_info->bit_position);
|
||||
|
||||
/* Write the control registers and ignore any errors */
|
||||
|
@ -214,6 +214,13 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state)
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
status = acpi_get_sleep_type_data(ACPI_STATE_S0,
|
||||
&acpi_gbl_sleep_type_a_s0,
|
||||
&acpi_gbl_sleep_type_b_s0);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
acpi_gbl_sleep_type_a_s0 = ACPI_SLEEP_TYPE_INVALID;
|
||||
}
|
||||
|
||||
/* Execute the _PTS method (Prepare To Sleep) */
|
||||
|
||||
arg_list.count = 1;
|
||||
|
@ -185,7 +185,7 @@ static int acpi_battery_is_charged(struct acpi_battery *battery)
|
||||
return 1;
|
||||
|
||||
/* fallback to using design values for broken batteries */
|
||||
if (battery->design_capacity == battery->capacity_now)
|
||||
if (battery->design_capacity <= battery->capacity_now)
|
||||
return 1;
|
||||
|
||||
/* we don't do any sort of metric based on percentages */
|
||||
|
@ -211,31 +211,36 @@ static acpi_status intel_pmic_regs_handler(u32 function,
|
||||
void *handler_context, void *region_context)
|
||||
{
|
||||
struct intel_pmic_opregion *opregion = region_context;
|
||||
int result = 0;
|
||||
int result = -EINVAL;
|
||||
|
||||
switch (address) {
|
||||
case 0:
|
||||
return AE_OK;
|
||||
case 1:
|
||||
opregion->ctx.addr |= (*value64 & 0xff) << 8;
|
||||
return AE_OK;
|
||||
case 2:
|
||||
opregion->ctx.addr |= *value64 & 0xff;
|
||||
return AE_OK;
|
||||
case 3:
|
||||
opregion->ctx.val = *value64 & 0xff;
|
||||
return AE_OK;
|
||||
case 4:
|
||||
if (*value64) {
|
||||
result = regmap_write(opregion->regmap, opregion->ctx.addr,
|
||||
opregion->ctx.val);
|
||||
} else {
|
||||
result = regmap_read(opregion->regmap, opregion->ctx.addr,
|
||||
&opregion->ctx.val);
|
||||
if (result == 0)
|
||||
*value64 = opregion->ctx.val;
|
||||
if (function == ACPI_WRITE) {
|
||||
switch (address) {
|
||||
case 0:
|
||||
return AE_OK;
|
||||
case 1:
|
||||
opregion->ctx.addr |= (*value64 & 0xff) << 8;
|
||||
return AE_OK;
|
||||
case 2:
|
||||
opregion->ctx.addr |= *value64 & 0xff;
|
||||
return AE_OK;
|
||||
case 3:
|
||||
opregion->ctx.val = *value64 & 0xff;
|
||||
return AE_OK;
|
||||
case 4:
|
||||
if (*value64) {
|
||||
result = regmap_write(opregion->regmap, opregion->ctx.addr,
|
||||
opregion->ctx.val);
|
||||
} else {
|
||||
result = regmap_read(opregion->regmap, opregion->ctx.addr,
|
||||
&opregion->ctx.val);
|
||||
}
|
||||
opregion->ctx.addr = 0;
|
||||
}
|
||||
memset(&opregion->ctx, 0x00, sizeof(opregion->ctx));
|
||||
}
|
||||
|
||||
if (function == ACPI_READ && address == 3) {
|
||||
*value64 = opregion->ctx.val;
|
||||
return AE_OK;
|
||||
}
|
||||
|
||||
if (result < 0) {
|
||||
|
@ -2057,7 +2057,7 @@ unsigned int ata_read_log_page(struct ata_device *dev, u8 log,
|
||||
|
||||
retry:
|
||||
ata_tf_init(dev, &tf);
|
||||
if (dev->dma_mode && ata_id_has_read_log_dma_ext(dev->id) &&
|
||||
if (ata_dma_enabled(dev) && ata_id_has_read_log_dma_ext(dev->id) &&
|
||||
!(dev->horkage & ATA_HORKAGE_NO_DMA_LOG)) {
|
||||
tf.command = ATA_CMD_READ_LOG_DMA_EXT;
|
||||
tf.protocol = ATA_PROT_DMA;
|
||||
|
@ -97,6 +97,12 @@ static const unsigned long ata_eh_identify_timeouts[] = {
|
||||
ULONG_MAX,
|
||||
};
|
||||
|
||||
static const unsigned long ata_eh_revalidate_timeouts[] = {
|
||||
15000, /* Some drives are slow to read log pages when waking-up */
|
||||
15000, /* combined time till here is enough even for media access */
|
||||
ULONG_MAX,
|
||||
};
|
||||
|
||||
static const unsigned long ata_eh_flush_timeouts[] = {
|
||||
15000, /* be generous with flush */
|
||||
15000, /* ditto */
|
||||
@ -133,6 +139,8 @@ static const struct ata_eh_cmd_timeout_ent
|
||||
ata_eh_cmd_timeout_table[ATA_EH_CMD_TIMEOUT_TABLE_SIZE] = {
|
||||
{ .commands = CMDS(ATA_CMD_ID_ATA, ATA_CMD_ID_ATAPI),
|
||||
.timeouts = ata_eh_identify_timeouts, },
|
||||
{ .commands = CMDS(ATA_CMD_READ_LOG_EXT, ATA_CMD_READ_LOG_DMA_EXT),
|
||||
.timeouts = ata_eh_revalidate_timeouts, },
|
||||
{ .commands = CMDS(ATA_CMD_READ_NATIVE_MAX, ATA_CMD_READ_NATIVE_MAX_EXT),
|
||||
.timeouts = ata_eh_other_timeouts, },
|
||||
{ .commands = CMDS(ATA_CMD_SET_MAX, ATA_CMD_SET_MAX_EXT),
|
||||
|
@ -219,6 +219,15 @@ static const struct backlight_ops ht16k33_bl_ops = {
|
||||
.check_fb = ht16k33_bl_check_fb,
|
||||
};
|
||||
|
||||
/*
|
||||
* Blank events will be passed to the actual device handling the backlight when
|
||||
* we return zero here.
|
||||
*/
|
||||
static int ht16k33_blank(int blank, struct fb_info *info)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ht16k33_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
||||
{
|
||||
struct ht16k33_priv *priv = info->par;
|
||||
@ -231,6 +240,7 @@ static struct fb_ops ht16k33_fb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.fb_read = fb_sys_read,
|
||||
.fb_write = fb_sys_write,
|
||||
.fb_blank = ht16k33_blank,
|
||||
.fb_fillrect = sys_fillrect,
|
||||
.fb_copyarea = sys_copyarea,
|
||||
.fb_imageblit = sys_imageblit,
|
||||
@ -418,6 +428,33 @@ static int ht16k33_probe(struct i2c_client *client,
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* Backlight */
|
||||
memset(&bl_props, 0, sizeof(struct backlight_properties));
|
||||
bl_props.type = BACKLIGHT_RAW;
|
||||
bl_props.max_brightness = MAX_BRIGHTNESS;
|
||||
|
||||
bl = devm_backlight_device_register(&client->dev, DRIVER_NAME"-bl",
|
||||
&client->dev, priv,
|
||||
&ht16k33_bl_ops, &bl_props);
|
||||
if (IS_ERR(bl)) {
|
||||
dev_err(&client->dev, "failed to register backlight\n");
|
||||
return PTR_ERR(bl);
|
||||
}
|
||||
|
||||
err = of_property_read_u32(node, "default-brightness-level",
|
||||
&dft_brightness);
|
||||
if (err) {
|
||||
dft_brightness = MAX_BRIGHTNESS;
|
||||
} else if (dft_brightness > MAX_BRIGHTNESS) {
|
||||
dev_warn(&client->dev,
|
||||
"invalid default brightness level: %u, using %u\n",
|
||||
dft_brightness, MAX_BRIGHTNESS);
|
||||
dft_brightness = MAX_BRIGHTNESS;
|
||||
}
|
||||
|
||||
bl->props.brightness = dft_brightness;
|
||||
ht16k33_bl_update_status(bl);
|
||||
|
||||
/* Framebuffer (2 bytes per column) */
|
||||
BUILD_BUG_ON(PAGE_SIZE < HT16K33_FB_SIZE);
|
||||
fbdev->buffer = (unsigned char *) get_zeroed_page(GFP_KERNEL);
|
||||
@ -450,6 +487,7 @@ static int ht16k33_probe(struct i2c_client *client,
|
||||
fbdev->info->screen_size = HT16K33_FB_SIZE;
|
||||
fbdev->info->fix = ht16k33_fb_fix;
|
||||
fbdev->info->var = ht16k33_fb_var;
|
||||
fbdev->info->bl_dev = bl;
|
||||
fbdev->info->pseudo_palette = NULL;
|
||||
fbdev->info->flags = FBINFO_FLAG_DEFAULT;
|
||||
fbdev->info->par = priv;
|
||||
@ -462,34 +500,6 @@ static int ht16k33_probe(struct i2c_client *client,
|
||||
if (err)
|
||||
goto err_fbdev_unregister;
|
||||
|
||||
/* Backlight */
|
||||
memset(&bl_props, 0, sizeof(struct backlight_properties));
|
||||
bl_props.type = BACKLIGHT_RAW;
|
||||
bl_props.max_brightness = MAX_BRIGHTNESS;
|
||||
|
||||
bl = devm_backlight_device_register(&client->dev, DRIVER_NAME"-bl",
|
||||
&client->dev, priv,
|
||||
&ht16k33_bl_ops, &bl_props);
|
||||
if (IS_ERR(bl)) {
|
||||
dev_err(&client->dev, "failed to register backlight\n");
|
||||
err = PTR_ERR(bl);
|
||||
goto err_fbdev_unregister;
|
||||
}
|
||||
|
||||
err = of_property_read_u32(node, "default-brightness-level",
|
||||
&dft_brightness);
|
||||
if (err) {
|
||||
dft_brightness = MAX_BRIGHTNESS;
|
||||
} else if (dft_brightness > MAX_BRIGHTNESS) {
|
||||
dev_warn(&client->dev,
|
||||
"invalid default brightness level: %u, using %u\n",
|
||||
dft_brightness, MAX_BRIGHTNESS);
|
||||
dft_brightness = MAX_BRIGHTNESS;
|
||||
}
|
||||
|
||||
bl->props.brightness = dft_brightness;
|
||||
ht16k33_bl_update_status(bl);
|
||||
|
||||
ht16k33_fb_queue(priv);
|
||||
return 0;
|
||||
|
||||
|
@ -280,6 +280,16 @@ static int img_ascii_lcd_display(struct img_ascii_lcd_ctx *ctx,
|
||||
if (msg[count - 1] == '\n')
|
||||
count--;
|
||||
|
||||
if (!count) {
|
||||
/* clear the LCD */
|
||||
devm_kfree(&ctx->pdev->dev, ctx->message);
|
||||
ctx->message = NULL;
|
||||
ctx->message_len = 0;
|
||||
memset(ctx->curr, ' ', ctx->cfg->num_chars);
|
||||
ctx->cfg->update(ctx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
new_msg = devm_kmalloc(&ctx->pdev->dev, count + 1, GFP_KERNEL);
|
||||
if (!new_msg)
|
||||
return -ENOMEM;
|
||||
|
@ -653,9 +653,6 @@ static inline void copy_buffer(void *from, void *to)
|
||||
*p2++ = *p1++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* General Interrupt Handling */
|
||||
|
||||
static void (*FloppyIRQHandler)( int status ) = NULL;
|
||||
@ -1225,6 +1222,7 @@ static void fd_rwsec_done1(int status)
|
||||
}
|
||||
else {
|
||||
/* all sectors finished */
|
||||
finish_fdc();
|
||||
fd_end_request_cur(BLK_STS_OK);
|
||||
}
|
||||
return;
|
||||
@ -1472,15 +1470,6 @@ static void setup_req_params( int drive )
|
||||
ReqTrack, ReqSector, (unsigned long)ReqData ));
|
||||
}
|
||||
|
||||
static void ataflop_commit_rqs(struct blk_mq_hw_ctx *hctx)
|
||||
{
|
||||
spin_lock_irq(&ataflop_lock);
|
||||
atari_disable_irq(IRQ_MFP_FDC);
|
||||
finish_fdc();
|
||||
atari_enable_irq(IRQ_MFP_FDC);
|
||||
spin_unlock_irq(&ataflop_lock);
|
||||
}
|
||||
|
||||
static blk_status_t ataflop_queue_rq(struct blk_mq_hw_ctx *hctx,
|
||||
const struct blk_mq_queue_data *bd)
|
||||
{
|
||||
@ -1488,6 +1477,8 @@ static blk_status_t ataflop_queue_rq(struct blk_mq_hw_ctx *hctx,
|
||||
int drive = floppy - unit;
|
||||
int type = floppy->type;
|
||||
|
||||
DPRINT(("Queue request: drive %d type %d last %d\n", drive, type, bd->last));
|
||||
|
||||
spin_lock_irq(&ataflop_lock);
|
||||
if (fd_request) {
|
||||
spin_unlock_irq(&ataflop_lock);
|
||||
@ -1547,8 +1538,6 @@ static blk_status_t ataflop_queue_rq(struct blk_mq_hw_ctx *hctx,
|
||||
setup_req_params( drive );
|
||||
do_fd_action( drive );
|
||||
|
||||
if (bd->last)
|
||||
finish_fdc();
|
||||
atari_enable_irq( IRQ_MFP_FDC );
|
||||
|
||||
out:
|
||||
@ -1958,7 +1947,6 @@ static const struct block_device_operations floppy_fops = {
|
||||
|
||||
static const struct blk_mq_ops ataflop_mq_ops = {
|
||||
.queue_rq = ataflop_queue_rq,
|
||||
.commit_rqs = ataflop_commit_rqs,
|
||||
};
|
||||
|
||||
static struct kobject *floppy_find(dev_t dev, int *part, void *data)
|
||||
|
@ -901,7 +901,7 @@ static ssize_t read_block_state(struct file *file, char __user *buf,
|
||||
zram_test_flag(zram, index, ZRAM_HUGE) ? 'h' : '.',
|
||||
zram_test_flag(zram, index, ZRAM_IDLE) ? 'i' : '.');
|
||||
|
||||
if (count < copied) {
|
||||
if (count <= copied) {
|
||||
zram_slot_unlock(zram, index);
|
||||
break;
|
||||
}
|
||||
|
@ -158,8 +158,10 @@ static int mtk_hci_wmt_sync(struct hci_dev *hdev,
|
||||
int err;
|
||||
|
||||
hlen = sizeof(*hdr) + wmt_params->dlen;
|
||||
if (hlen > 255)
|
||||
return -EINVAL;
|
||||
if (hlen > 255) {
|
||||
err = -EINVAL;
|
||||
goto err_free_skb;
|
||||
}
|
||||
|
||||
hdr = (struct mtk_wmt_hdr *)&wc;
|
||||
hdr->dir = 1;
|
||||
@ -173,7 +175,7 @@ static int mtk_hci_wmt_sync(struct hci_dev *hdev,
|
||||
err = __hci_cmd_send(hdev, 0xfc6f, hlen, &wc);
|
||||
if (err < 0) {
|
||||
clear_bit(BTMTKUART_TX_WAIT_VND_EVT, &bdev->tx_state);
|
||||
return err;
|
||||
goto err_free_skb;
|
||||
}
|
||||
|
||||
/* The vendor specific WMT commands are all answered by a vendor
|
||||
@ -190,13 +192,14 @@ static int mtk_hci_wmt_sync(struct hci_dev *hdev,
|
||||
if (err == -EINTR) {
|
||||
bt_dev_err(hdev, "Execution of wmt command interrupted");
|
||||
clear_bit(BTMTKUART_TX_WAIT_VND_EVT, &bdev->tx_state);
|
||||
return err;
|
||||
goto err_free_skb;
|
||||
}
|
||||
|
||||
if (err) {
|
||||
bt_dev_err(hdev, "Execution of wmt command timed out");
|
||||
clear_bit(BTMTKUART_TX_WAIT_VND_EVT, &bdev->tx_state);
|
||||
return -ETIMEDOUT;
|
||||
err = -ETIMEDOUT;
|
||||
goto err_free_skb;
|
||||
}
|
||||
|
||||
/* Parse and handle the return WMT event */
|
||||
|
@ -173,8 +173,13 @@ static int mtk_rng_runtime_resume(struct device *dev)
|
||||
return mtk_rng_init(&priv->rng);
|
||||
}
|
||||
|
||||
static UNIVERSAL_DEV_PM_OPS(mtk_rng_pm_ops, mtk_rng_runtime_suspend,
|
||||
mtk_rng_runtime_resume, NULL);
|
||||
static const struct dev_pm_ops mtk_rng_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(mtk_rng_runtime_suspend,
|
||||
mtk_rng_runtime_resume, NULL)
|
||||
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
#define MTK_RNG_PM_OPS (&mtk_rng_pm_ops)
|
||||
#else /* CONFIG_PM */
|
||||
#define MTK_RNG_PM_OPS NULL
|
||||
|
@ -4797,7 +4797,9 @@ static atomic_t recv_msg_inuse_count = ATOMIC_INIT(0);
|
||||
static void free_smi_msg(struct ipmi_smi_msg *msg)
|
||||
{
|
||||
atomic_dec(&smi_msg_inuse_count);
|
||||
kfree(msg);
|
||||
/* Try to keep as much stuff out of the panic path as possible. */
|
||||
if (!oops_in_progress)
|
||||
kfree(msg);
|
||||
}
|
||||
|
||||
struct ipmi_smi_msg *ipmi_alloc_smi_msg(void)
|
||||
@ -4816,7 +4818,9 @@ EXPORT_SYMBOL(ipmi_alloc_smi_msg);
|
||||
static void free_recv_msg(struct ipmi_recv_msg *msg)
|
||||
{
|
||||
atomic_dec(&recv_msg_inuse_count);
|
||||
kfree(msg);
|
||||
/* Try to keep as much stuff out of the panic path as possible. */
|
||||
if (!oops_in_progress)
|
||||
kfree(msg);
|
||||
}
|
||||
|
||||
static struct ipmi_recv_msg *ipmi_alloc_recv_msg(void)
|
||||
@ -4834,7 +4838,7 @@ static struct ipmi_recv_msg *ipmi_alloc_recv_msg(void)
|
||||
|
||||
void ipmi_free_recv_msg(struct ipmi_recv_msg *msg)
|
||||
{
|
||||
if (msg->user)
|
||||
if (msg->user && !oops_in_progress)
|
||||
kref_put(&msg->user->refcount, free_user);
|
||||
msg->done(msg);
|
||||
}
|
||||
|
@ -337,13 +337,17 @@ static atomic_t msg_tofree = ATOMIC_INIT(0);
|
||||
static DECLARE_COMPLETION(msg_wait);
|
||||
static void msg_free_smi(struct ipmi_smi_msg *msg)
|
||||
{
|
||||
if (atomic_dec_and_test(&msg_tofree))
|
||||
complete(&msg_wait);
|
||||
if (atomic_dec_and_test(&msg_tofree)) {
|
||||
if (!oops_in_progress)
|
||||
complete(&msg_wait);
|
||||
}
|
||||
}
|
||||
static void msg_free_recv(struct ipmi_recv_msg *msg)
|
||||
{
|
||||
if (atomic_dec_and_test(&msg_tofree))
|
||||
complete(&msg_wait);
|
||||
if (atomic_dec_and_test(&msg_tofree)) {
|
||||
if (!oops_in_progress)
|
||||
complete(&msg_wait);
|
||||
}
|
||||
}
|
||||
static struct ipmi_smi_msg smi_msg = {
|
||||
.done = msg_free_smi
|
||||
@ -429,8 +433,10 @@ static int _ipmi_set_timeout(int do_heartbeat)
|
||||
rv = __ipmi_set_timeout(&smi_msg,
|
||||
&recv_msg,
|
||||
&send_heartbeat_now);
|
||||
if (rv)
|
||||
if (rv) {
|
||||
atomic_set(&msg_tofree, 0);
|
||||
return rv;
|
||||
}
|
||||
|
||||
wait_for_completion(&msg_wait);
|
||||
|
||||
@ -575,6 +581,7 @@ restart:
|
||||
&recv_msg,
|
||||
1);
|
||||
if (rv) {
|
||||
atomic_set(&msg_tofree, 0);
|
||||
pr_warn("heartbeat send failure: %d\n", rv);
|
||||
return rv;
|
||||
}
|
||||
|
@ -455,6 +455,9 @@ static int tpm2_map_response_body(struct tpm_chip *chip, u32 cc, u8 *rsp,
|
||||
if (be32_to_cpu(data->capability) != TPM2_CAP_HANDLES)
|
||||
return 0;
|
||||
|
||||
if (be32_to_cpu(data->count) > (UINT_MAX - TPM_HEADER_SIZE - 9) / 4)
|
||||
return -EFAULT;
|
||||
|
||||
if (len != TPM_HEADER_SIZE + 9 + 4 * be32_to_cpu(data->count))
|
||||
return -EFAULT;
|
||||
|
||||
|
@ -275,6 +275,11 @@ static int __init pmc_register_ops(void)
|
||||
|
||||
np = of_find_matching_node(NULL, sama5d2_pmc_dt_ids);
|
||||
|
||||
if (!of_device_is_available(np)) {
|
||||
of_node_put(np);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
pmcreg = device_node_to_regmap(np);
|
||||
if (IS_ERR(pmcreg))
|
||||
return PTR_ERR(pmcreg);
|
||||
|
@ -256,12 +256,15 @@ static int ap_cpu_clock_probe(struct platform_device *pdev)
|
||||
int cpu, err;
|
||||
|
||||
err = of_property_read_u32(dn, "reg", &cpu);
|
||||
if (WARN_ON(err))
|
||||
if (WARN_ON(err)) {
|
||||
of_node_put(dn);
|
||||
return err;
|
||||
}
|
||||
|
||||
/* If cpu2 or cpu3 is enabled */
|
||||
if (cpu & APN806_CLUSTER_NUM_MASK) {
|
||||
nclusters = 2;
|
||||
of_node_put(dn);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -288,8 +291,10 @@ static int ap_cpu_clock_probe(struct platform_device *pdev)
|
||||
int cpu, err;
|
||||
|
||||
err = of_property_read_u32(dn, "reg", &cpu);
|
||||
if (WARN_ON(err))
|
||||
if (WARN_ON(err)) {
|
||||
of_node_put(dn);
|
||||
return err;
|
||||
}
|
||||
|
||||
cluster_index = cpu & APN806_CLUSTER_NUM_MASK;
|
||||
cluster_index >>= APN806_CLUSTER_NUM_OFFSET;
|
||||
@ -301,6 +306,7 @@ static int ap_cpu_clock_probe(struct platform_device *pdev)
|
||||
parent = of_clk_get(np, cluster_index);
|
||||
if (IS_ERR(parent)) {
|
||||
dev_err(dev, "Could not get the clock parent\n");
|
||||
of_node_put(dn);
|
||||
return -EINVAL;
|
||||
}
|
||||
parent_name = __clk_get_name(parent);
|
||||
@ -319,8 +325,10 @@ static int ap_cpu_clock_probe(struct platform_device *pdev)
|
||||
init.parent_names = &parent_name;
|
||||
|
||||
ret = devm_clk_hw_register(dev, &ap_cpu_clk[cluster_index].hw);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
of_node_put(dn);
|
||||
return ret;
|
||||
}
|
||||
ap_cpu_data->hws[cluster_index] = &ap_cpu_clk[cluster_index].hw;
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ config I8253_LOCK
|
||||
|
||||
config OMAP_DM_TIMER
|
||||
bool
|
||||
select TIMER_OF
|
||||
|
||||
config CLKBLD_I8253
|
||||
def_bool y if CLKSRC_I8253 || CLKEVT_I8253 || I8253_LOCK
|
||||
|
@ -481,6 +481,7 @@ static int cpuidle_add_state_sysfs(struct cpuidle_device *device)
|
||||
&kdev->kobj, "state%d", i);
|
||||
if (ret) {
|
||||
kobject_put(&kobj->kobj);
|
||||
kfree(kobj);
|
||||
goto error_state;
|
||||
}
|
||||
cpuidle_add_s2idle_attr_group(kobj);
|
||||
@ -612,6 +613,7 @@ static int cpuidle_add_driver_sysfs(struct cpuidle_device *dev)
|
||||
&kdev->kobj, "driver");
|
||||
if (ret) {
|
||||
kobject_put(&kdrv->kobj);
|
||||
kfree(kdrv);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -698,7 +700,6 @@ int cpuidle_add_sysfs(struct cpuidle_device *dev)
|
||||
if (!kdev)
|
||||
return -ENOMEM;
|
||||
kdev->dev = dev;
|
||||
dev->kobj_dev = kdev;
|
||||
|
||||
init_completion(&kdev->kobj_unregister);
|
||||
|
||||
@ -706,9 +707,11 @@ int cpuidle_add_sysfs(struct cpuidle_device *dev)
|
||||
"cpuidle");
|
||||
if (error) {
|
||||
kobject_put(&kdev->kobj);
|
||||
kfree(kdev);
|
||||
return error;
|
||||
}
|
||||
|
||||
dev->kobj_dev = kdev;
|
||||
kobject_uevent(&kdev->kobj, KOBJ_ADD);
|
||||
|
||||
return 0;
|
||||
|
@ -1087,16 +1087,27 @@ static struct caam_akcipher_alg caam_rsa = {
|
||||
int caam_pkc_init(struct device *ctrldev)
|
||||
{
|
||||
struct caam_drv_private *priv = dev_get_drvdata(ctrldev);
|
||||
u32 pk_inst;
|
||||
u32 pk_inst, pkha;
|
||||
int err;
|
||||
init_done = false;
|
||||
|
||||
/* Determine public key hardware accelerator presence. */
|
||||
if (priv->era < 10)
|
||||
if (priv->era < 10) {
|
||||
pk_inst = (rd_reg32(&priv->ctrl->perfmon.cha_num_ls) &
|
||||
CHA_ID_LS_PK_MASK) >> CHA_ID_LS_PK_SHIFT;
|
||||
else
|
||||
pk_inst = rd_reg32(&priv->ctrl->vreg.pkha) & CHA_VER_NUM_MASK;
|
||||
} else {
|
||||
pkha = rd_reg32(&priv->ctrl->vreg.pkha);
|
||||
pk_inst = pkha & CHA_VER_NUM_MASK;
|
||||
|
||||
/*
|
||||
* Newer CAAMs support partially disabled functionality. If this is the
|
||||
* case, the number is non-zero, but this bit is set to indicate that
|
||||
* no encryption or decryption is supported. Only signing and verifying
|
||||
* is supported.
|
||||
*/
|
||||
if (pkha & CHA_VER_MISC_PKHA_NO_CRYPT)
|
||||
pk_inst = 0;
|
||||
}
|
||||
|
||||
/* Do not register algorithms if PKHA is not present. */
|
||||
if (!pk_inst)
|
||||
|
@ -317,6 +317,9 @@ struct version_regs {
|
||||
/* CHA Miscellaneous Information - AESA_MISC specific */
|
||||
#define CHA_VER_MISC_AES_GCM BIT(1 + CHA_VER_MISC_SHIFT)
|
||||
|
||||
/* CHA Miscellaneous Information - PKHA_MISC specific */
|
||||
#define CHA_VER_MISC_PKHA_NO_CRYPT BIT(7 + CHA_VER_MISC_SHIFT)
|
||||
|
||||
/*
|
||||
* caam_perfmon - Performance Monitor/Secure Memory Status/
|
||||
* CAAM Global Status/Component Version IDs
|
||||
|
@ -195,6 +195,13 @@ static int __adf_iov_putmsg(struct adf_accel_dev *accel_dev, u32 msg, u8 vf_nr)
|
||||
val = ADF_CSR_RD(pmisc_bar_addr, pf2vf_offset);
|
||||
} while ((val & int_bit) && (count++ < ADF_IOV_MSG_ACK_MAX_RETRY));
|
||||
|
||||
if (val != msg) {
|
||||
dev_dbg(&GET_DEV(accel_dev),
|
||||
"Collision - PFVF CSR overwritten by remote function\n");
|
||||
ret = -EIO;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (val & int_bit) {
|
||||
dev_dbg(&GET_DEV(accel_dev), "ACK not received from remote\n");
|
||||
val &= ~int_bit;
|
||||
@ -243,6 +250,11 @@ void adf_vf2pf_req_hndl(struct adf_accel_vf_info *vf_info)
|
||||
|
||||
/* Read message from the VF */
|
||||
msg = ADF_CSR_RD(pmisc_addr, hw_data->get_pf2vf_offset(vf_nr));
|
||||
if (!(msg & ADF_VF2PF_INT)) {
|
||||
dev_info(&GET_DEV(accel_dev),
|
||||
"Spurious VF2PF interrupt, msg %X. Ignored\n", msg);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* To ACK, clear the VF2PFINT bit */
|
||||
msg &= ~ADF_VF2PF_INT;
|
||||
@ -326,6 +338,7 @@ void adf_vf2pf_req_hndl(struct adf_accel_vf_info *vf_info)
|
||||
if (resp && adf_iov_putmsg(accel_dev, resp, vf_nr))
|
||||
dev_err(&GET_DEV(accel_dev), "Failed to send response to VF\n");
|
||||
|
||||
out:
|
||||
/* re-enable interrupt on PF from this VF */
|
||||
adf_enable_vf2pf_interrupts(accel_dev, (1 << vf_nr));
|
||||
return;
|
||||
|
@ -123,6 +123,11 @@ static void adf_pf2vf_bh_handler(void *data)
|
||||
|
||||
/* Read the message from PF */
|
||||
msg = ADF_CSR_RD(pmisc_bar_addr, hw_data->get_pf2vf_offset(0));
|
||||
if (!(msg & ADF_PF2VF_INT)) {
|
||||
dev_info(&GET_DEV(accel_dev),
|
||||
"Spurious PF2VF interrupt, msg %X. Ignored\n", msg);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!(msg & ADF_PF2VF_MSGORIGIN_SYSTEM))
|
||||
/* Ignore legacy non-system (non-kernel) PF2VF messages */
|
||||
@ -171,6 +176,7 @@ static void adf_pf2vf_bh_handler(void *data)
|
||||
msg &= ~ADF_PF2VF_INT;
|
||||
ADF_CSR_WR(pmisc_bar_addr, hw_data->get_pf2vf_offset(0), msg);
|
||||
|
||||
out:
|
||||
/* Re-enable PF2VF interrupts */
|
||||
adf_enable_pf2vf_interrupts(accel_dev);
|
||||
return;
|
||||
|
@ -2208,6 +2208,8 @@ static int s5p_aes_probe(struct platform_device *pdev)
|
||||
|
||||
variant = find_s5p_sss_version(pdev);
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!res)
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* Note: HASH and PRNG uses the same registers in secss, avoid
|
||||
|
@ -79,6 +79,7 @@ static void dma_buf_release(struct dentry *dentry)
|
||||
if (dmabuf->resv == (struct dma_resv *)&dmabuf[1])
|
||||
dma_resv_fini(dmabuf->resv);
|
||||
|
||||
WARN_ON(!list_empty(&dmabuf->attachments));
|
||||
module_put(dmabuf->owner);
|
||||
kfree(dmabuf->name);
|
||||
kfree(dmabuf);
|
||||
|
@ -145,7 +145,7 @@
|
||||
#define AT_XDMAC_CC_WRIP (0x1 << 23) /* Write in Progress (read only) */
|
||||
#define AT_XDMAC_CC_WRIP_DONE (0x0 << 23)
|
||||
#define AT_XDMAC_CC_WRIP_IN_PROGRESS (0x1 << 23)
|
||||
#define AT_XDMAC_CC_PERID(i) (0x7f & (i) << 24) /* Channel Peripheral Identifier */
|
||||
#define AT_XDMAC_CC_PERID(i) ((0x7f & (i)) << 24) /* Channel Peripheral Identifier */
|
||||
#define AT_XDMAC_CDS_MSP 0x2C /* Channel Data Stride Memory Set Pattern */
|
||||
#define AT_XDMAC_CSUS 0x30 /* Channel Source Microblock Stride */
|
||||
#define AT_XDMAC_CDUS 0x34 /* Channel Destination Microblock Stride */
|
||||
|
@ -168,7 +168,7 @@ dmaengine_desc_get_callback_invoke(struct dma_async_tx_descriptor *tx,
|
||||
static inline bool
|
||||
dmaengine_desc_callback_valid(struct dmaengine_desc_callback *cb)
|
||||
{
|
||||
return (cb->callback) ? true : false;
|
||||
return cb->callback || cb->callback_result;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -797,12 +797,14 @@ static void debug_dump_dramcfg_low(struct amd64_pvt *pvt, u32 dclr, int chan)
|
||||
#define CS_ODD_PRIMARY BIT(1)
|
||||
#define CS_EVEN_SECONDARY BIT(2)
|
||||
#define CS_ODD_SECONDARY BIT(3)
|
||||
#define CS_3R_INTERLEAVE BIT(4)
|
||||
|
||||
#define CS_EVEN (CS_EVEN_PRIMARY | CS_EVEN_SECONDARY)
|
||||
#define CS_ODD (CS_ODD_PRIMARY | CS_ODD_SECONDARY)
|
||||
|
||||
static int f17_get_cs_mode(int dimm, u8 ctrl, struct amd64_pvt *pvt)
|
||||
{
|
||||
u8 base, count = 0;
|
||||
int cs_mode = 0;
|
||||
|
||||
if (csrow_enabled(2 * dimm, ctrl, pvt))
|
||||
@ -815,6 +817,20 @@ static int f17_get_cs_mode(int dimm, u8 ctrl, struct amd64_pvt *pvt)
|
||||
if (csrow_sec_enabled(2 * dimm + 1, ctrl, pvt))
|
||||
cs_mode |= CS_ODD_SECONDARY;
|
||||
|
||||
/*
|
||||
* 3 Rank inteleaving support.
|
||||
* There should be only three bases enabled and their two masks should
|
||||
* be equal.
|
||||
*/
|
||||
for_each_chip_select(base, ctrl, pvt)
|
||||
count += csrow_enabled(base, ctrl, pvt);
|
||||
|
||||
if (count == 3 &&
|
||||
pvt->csels[ctrl].csmasks[0] == pvt->csels[ctrl].csmasks[1]) {
|
||||
edac_dbg(1, "3R interleaving in use.\n");
|
||||
cs_mode |= CS_3R_INTERLEAVE;
|
||||
}
|
||||
|
||||
return cs_mode;
|
||||
}
|
||||
|
||||
@ -1623,10 +1639,14 @@ static int f17_addr_mask_to_cs_size(struct amd64_pvt *pvt, u8 umc,
|
||||
*
|
||||
* The MSB is the number of bits in the full mask because BIT[0] is
|
||||
* always 0.
|
||||
*
|
||||
* In the special 3 Rank interleaving case, a single bit is flipped
|
||||
* without swapping with the most significant bit. This can be handled
|
||||
* by keeping the MSB where it is and ignoring the single zero bit.
|
||||
*/
|
||||
msb = fls(addr_mask_orig) - 1;
|
||||
weight = hweight_long(addr_mask_orig);
|
||||
num_zero_bits = msb - weight;
|
||||
num_zero_bits = msb - weight - !!(cs_mode & CS_3R_INTERLEAVE);
|
||||
|
||||
/* Take the number of zero bits off from the top of the mask. */
|
||||
addr_mask_deinterleaved = GENMASK_ULL(msb - num_zero_bits, 1);
|
||||
|
@ -1055,7 +1055,7 @@ static u64 haswell_get_tohm(struct sbridge_pvt *pvt)
|
||||
pci_read_config_dword(pvt->info.pci_vtd, HASWELL_TOHM_1, ®);
|
||||
rc = ((reg << 6) | rc) << 26;
|
||||
|
||||
return rc | 0x1ffffff;
|
||||
return rc | 0x3ffffff;
|
||||
}
|
||||
|
||||
static u64 knl_get_tolm(struct sbridge_pvt *pvt)
|
||||
|
@ -155,7 +155,7 @@ static int alloc_init_cpu_groups(cpumask_var_t **pcpu_groups)
|
||||
if (!alloc_cpumask_var(&tmp, GFP_KERNEL))
|
||||
return -ENOMEM;
|
||||
|
||||
cpu_groups = kcalloc(nb_available_cpus, sizeof(cpu_groups),
|
||||
cpu_groups = kcalloc(nb_available_cpus, sizeof(*cpu_groups),
|
||||
GFP_KERNEL);
|
||||
if (!cpu_groups) {
|
||||
free_cpumask_var(tmp);
|
||||
|
@ -61,7 +61,7 @@ static void amdgpu_bo_list_free(struct kref *ref)
|
||||
|
||||
int amdgpu_bo_list_create(struct amdgpu_device *adev, struct drm_file *filp,
|
||||
struct drm_amdgpu_bo_list_entry *info,
|
||||
unsigned num_entries, struct amdgpu_bo_list **result)
|
||||
size_t num_entries, struct amdgpu_bo_list **result)
|
||||
{
|
||||
unsigned last_entry = 0, first_userptr = num_entries;
|
||||
struct amdgpu_bo_list_entry *array;
|
||||
|
@ -60,7 +60,7 @@ int amdgpu_bo_create_list_entry_array(struct drm_amdgpu_bo_list_in *in,
|
||||
int amdgpu_bo_list_create(struct amdgpu_device *adev,
|
||||
struct drm_file *filp,
|
||||
struct drm_amdgpu_bo_list_entry *info,
|
||||
unsigned num_entries,
|
||||
size_t num_entries,
|
||||
struct amdgpu_bo_list **list);
|
||||
|
||||
static inline struct amdgpu_bo_list_entry *
|
||||
|
@ -863,12 +863,12 @@ static int gmc_v6_0_sw_init(void *handle)
|
||||
|
||||
adev->gmc.mc_mask = 0xffffffffffULL;
|
||||
|
||||
r = dma_set_mask_and_coherent(adev->dev, DMA_BIT_MASK(44));
|
||||
r = dma_set_mask_and_coherent(adev->dev, DMA_BIT_MASK(40));
|
||||
if (r) {
|
||||
dev_warn(adev->dev, "amdgpu: No suitable DMA available.\n");
|
||||
return r;
|
||||
}
|
||||
adev->need_swiotlb = drm_need_swiotlb(44);
|
||||
adev->need_swiotlb = drm_need_swiotlb(40);
|
||||
|
||||
r = gmc_v6_0_init_microcode(adev);
|
||||
if (r) {
|
||||
|
@ -109,6 +109,12 @@ static const struct drm_dmi_panel_orientation_data lcd1200x1920_rightside_up = {
|
||||
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
|
||||
};
|
||||
|
||||
static const struct drm_dmi_panel_orientation_data lcd1280x1920_rightside_up = {
|
||||
.width = 1280,
|
||||
.height = 1920,
|
||||
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
|
||||
};
|
||||
|
||||
static const struct dmi_system_id orientation_data[] = {
|
||||
{ /* Acer One 10 (S1003) */
|
||||
.matches = {
|
||||
@ -134,6 +140,12 @@ static const struct dmi_system_id orientation_data[] = {
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T103HAF"),
|
||||
},
|
||||
.driver_data = (void *)&lcd800x1280_rightside_up,
|
||||
}, { /* AYA NEO 2021 */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYADEVICE"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "AYA NEO 2021"),
|
||||
},
|
||||
.driver_data = (void *)&lcd800x1280_rightside_up,
|
||||
}, { /* GPD MicroPC (generic strings, also match on bios date) */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),
|
||||
@ -185,6 +197,12 @@ static const struct dmi_system_id orientation_data[] = {
|
||||
DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
|
||||
},
|
||||
.driver_data = (void *)&gpd_win2,
|
||||
}, { /* GPD Win 3 */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "GPD"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "G1618-03")
|
||||
},
|
||||
.driver_data = (void *)&lcd720x1280_rightside_up,
|
||||
}, { /* I.T.Works TW891 */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
|
||||
@ -193,6 +211,13 @@ static const struct dmi_system_id orientation_data[] = {
|
||||
DMI_EXACT_MATCH(DMI_BOARD_NAME, "TW891"),
|
||||
},
|
||||
.driver_data = (void *)&itworks_tw891,
|
||||
}, { /* KD Kurio Smart C15200 2-in-1 */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "KD Interactive"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Kurio Smart"),
|
||||
DMI_EXACT_MATCH(DMI_BOARD_NAME, "KDM960BCP"),
|
||||
},
|
||||
.driver_data = (void *)&lcd800x1280_rightside_up,
|
||||
}, { /*
|
||||
* Lenovo Ideapad Miix 310 laptop, only some production batches
|
||||
* have a portrait screen, the resolution checks makes the quirk
|
||||
@ -211,10 +236,15 @@ static const struct dmi_system_id orientation_data[] = {
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"),
|
||||
},
|
||||
.driver_data = (void *)&lcd800x1280_rightside_up,
|
||||
}, { /* Lenovo Ideapad D330 */
|
||||
}, { /* Lenovo Ideapad D330-10IGM (HD) */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad D330-10IGM"),
|
||||
},
|
||||
.driver_data = (void *)&lcd800x1280_rightside_up,
|
||||
}, { /* Lenovo Ideapad D330-10IGM (FHD) */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "81H3"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad D330-10IGM"),
|
||||
},
|
||||
.driver_data = (void *)&lcd1200x1920_rightside_up,
|
||||
@ -225,6 +255,19 @@ static const struct dmi_system_id orientation_data[] = {
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Default string"),
|
||||
},
|
||||
.driver_data = (void *)&onegx1_pro,
|
||||
}, { /* Samsung GalaxyBook 10.6 */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Galaxy Book 10.6"),
|
||||
},
|
||||
.driver_data = (void *)&lcd1280x1920_rightside_up,
|
||||
}, { /* Valve Steam Deck */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Valve"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Jupiter"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "1"),
|
||||
},
|
||||
.driver_data = (void *)&lcd800x1280_rightside_up,
|
||||
}, { /* VIOS LTH17 */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "VIOS"),
|
||||
|
@ -123,7 +123,6 @@ static int drm_plane_helper_check_update(struct drm_plane *plane,
|
||||
.crtc_w = drm_rect_width(dst),
|
||||
.crtc_h = drm_rect_height(dst),
|
||||
.rotation = rotation,
|
||||
.visible = *visible,
|
||||
};
|
||||
struct drm_crtc_state crtc_state = {
|
||||
.crtc = crtc,
|
||||
|
@ -137,11 +137,13 @@ static int _sspp_subblk_offset(struct dpu_hw_pipe *ctx,
|
||||
u32 *idx)
|
||||
{
|
||||
int rc = 0;
|
||||
const struct dpu_sspp_sub_blks *sblk = ctx->cap->sblk;
|
||||
const struct dpu_sspp_sub_blks *sblk;
|
||||
|
||||
if (!ctx)
|
||||
if (!ctx || !ctx->cap || !ctx->cap->sblk)
|
||||
return -EINVAL;
|
||||
|
||||
sblk = ctx->cap->sblk;
|
||||
|
||||
switch (s_id) {
|
||||
case DPU_SSPP_SRC:
|
||||
*idx = sblk->src_blk.base;
|
||||
@ -404,7 +406,7 @@ static void _dpu_hw_sspp_setup_scaler3(struct dpu_hw_pipe *ctx,
|
||||
|
||||
(void)pe;
|
||||
if (_sspp_subblk_offset(ctx, DPU_SSPP_SCALER_QSEED3, &idx) || !sspp
|
||||
|| !scaler3_cfg || !ctx || !ctx->cap || !ctx->cap->sblk)
|
||||
|| !scaler3_cfg)
|
||||
return;
|
||||
|
||||
dpu_hw_setup_scaler3(&ctx->hw, scaler3_cfg, idx,
|
||||
|
@ -1036,7 +1036,7 @@ static struct drm_gem_object *_msm_gem_new(struct drm_device *dev,
|
||||
|
||||
ret = msm_gem_new_impl(dev, size, flags, &obj);
|
||||
if (ret)
|
||||
goto fail;
|
||||
return ERR_PTR(ret);
|
||||
|
||||
msm_obj = to_msm_bo(obj);
|
||||
|
||||
@ -1124,7 +1124,7 @@ struct drm_gem_object *msm_gem_import(struct drm_device *dev,
|
||||
|
||||
ret = msm_gem_new_impl(dev, size, MSM_BO_WC, &obj);
|
||||
if (ret)
|
||||
goto fail;
|
||||
return ERR_PTR(ret);
|
||||
|
||||
drm_gem_private_object_init(dev, obj, size);
|
||||
|
||||
|
@ -195,8 +195,8 @@ v3d_clean_caches(struct v3d_dev *v3d)
|
||||
|
||||
V3D_CORE_WRITE(core, V3D_CTL_L2TCACTL, V3D_L2TCACTL_TMUWCF);
|
||||
if (wait_for(!(V3D_CORE_READ(core, V3D_CTL_L2TCACTL) &
|
||||
V3D_L2TCACTL_L2TFLS), 100)) {
|
||||
DRM_ERROR("Timeout waiting for L1T write combiner flush\n");
|
||||
V3D_L2TCACTL_TMUWCF), 100)) {
|
||||
DRM_ERROR("Timeout waiting for TMU write combiner flush\n");
|
||||
}
|
||||
|
||||
mutex_lock(&v3d->cache_clean_lock);
|
||||
|
@ -80,9 +80,7 @@ virtio_gpu_get_vbuf(struct virtio_gpu_device *vgdev,
|
||||
{
|
||||
struct virtio_gpu_vbuffer *vbuf;
|
||||
|
||||
vbuf = kmem_cache_zalloc(vgdev->vbufs, GFP_KERNEL);
|
||||
if (!vbuf)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
vbuf = kmem_cache_zalloc(vgdev->vbufs, GFP_KERNEL | __GFP_NOFAIL);
|
||||
|
||||
BUG_ON(size > MAX_INLINE_CMD_SIZE);
|
||||
vbuf->buf = (void *)vbuf + sizeof(*vbuf);
|
||||
@ -142,10 +140,6 @@ static void *virtio_gpu_alloc_cmd_resp(struct virtio_gpu_device *vgdev,
|
||||
|
||||
vbuf = virtio_gpu_get_vbuf(vgdev, cmd_size,
|
||||
resp_size, resp_buf, cb);
|
||||
if (IS_ERR(vbuf)) {
|
||||
*vbuffer_p = NULL;
|
||||
return ERR_CAST(vbuf);
|
||||
}
|
||||
*vbuffer_p = vbuf;
|
||||
return (struct virtio_gpu_command *)vbuf->buf;
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ static int u2fzero_recv(struct u2fzero_device *dev,
|
||||
|
||||
ret = (wait_for_completion_timeout(
|
||||
&ctx.done, msecs_to_jiffies(USB_CTRL_SET_TIMEOUT)));
|
||||
if (ret < 0) {
|
||||
if (ret == 0) {
|
||||
usb_kill_urb(dev->urb);
|
||||
hid_err(hdev, "urb submission timed out");
|
||||
} else {
|
||||
@ -191,6 +191,8 @@ static int u2fzero_rng_read(struct hwrng *rng, void *data,
|
||||
struct u2f_hid_msg resp;
|
||||
int ret;
|
||||
size_t actual_length;
|
||||
/* valid packets must have a correct header */
|
||||
int min_length = offsetof(struct u2f_hid_msg, init.data);
|
||||
|
||||
if (!dev->present) {
|
||||
hid_dbg(dev->hdev, "device not present");
|
||||
@ -200,12 +202,12 @@ static int u2fzero_rng_read(struct hwrng *rng, void *data,
|
||||
ret = u2fzero_recv(dev, &req, &resp);
|
||||
|
||||
/* ignore errors or packets without data */
|
||||
if (ret < offsetof(struct u2f_hid_msg, init.data))
|
||||
if (ret < min_length)
|
||||
return 0;
|
||||
|
||||
/* only take the minimum amount of data it is safe to take */
|
||||
actual_length = min3((size_t)ret - offsetof(struct u2f_hid_msg,
|
||||
init.data), U2F_HID_MSG_LEN(resp), max);
|
||||
actual_length = min3((size_t)ret - min_length,
|
||||
U2F_HID_MSG_LEN(resp), max);
|
||||
|
||||
memcpy(data, resp.init.data, actual_length);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user