mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
Merge tag 'ASB-2025-05-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
https://source.android.com/docs/security/bulletin/2025-05-01 * tag 'ASB-2025-05-05_11-5.4' of https://android.googlesource.com/kernel/common: UPSTREAM: net_sched: Prevent creation of classes with TC_H_ROOT Linux 5.4.292 jfs: add index corruption check to DT_GETPAGE() jfs: fix slab-out-of-bounds read in ea_get() tracing: Fix use-after-free in print_graph_function_flags during tracer switching mmc: sdhci-pxav3: set NEED_RSP_BUSY capability ACPI: resource: Skip IRQ override on ASUS Vivobook 14 X1404VAP x86/mm: Fix flush_tlb_range() when used for zapping normal PMDs x86/tsc: Always save/restore TSC sched_clock() on suspend/resume ntb_perf: Delete duplicate dmaengine_unmap_put() call in perf_copy_chunk() can: flexcan: only change CAN state when link up in system PM arcnet: Add NULL check in com20020pci_probe() net: dsa: mv88e6xxx: propperly shutdown PPU re-enable timer on destroy ipv6: fix omitted netlink attributes when using RTEXT_FILTER_SKIP_STATS vsock: avoid timeout during connect() if the socket is closing net_sched: skbprio: Remove overly strict queue assertions netlabel: Fix NULL pointer exception caused by CALIPSO on IPv4 sockets ntb: intel: Fix using link status DB's ntb_hw_switchtec: Fix shift-out-of-bounds in switchtec_ntb_mw_set_trans spufs: fix a leak in spufs_create_context() spufs: fix a leak on spufs_new_file() failure hwmon: (nct6775-core) Fix out of bounds access for NCT679{8,9} can: statistics: use atomic access in hot path locking/semaphore: Use wake_q to wake up processes outside lock critical section sched/deadline: Use online cpus for validating runtime affs: don't write overlarge OFS data block size fields affs: generate OFS sequence numbers starting at 1 wifi: iwlwifi: fw: allocate chained SG tables for dump sched/smt: Always inline sched_smt_active() octeontx2-af: Fix mbox INTR handler when num VFs > 64 ring-buffer: Fix bytes_dropped calculation issue objtool, media: dib8000: Prevent divide-by-zero in dib8000_set_dds() fs/procfs: fix the comment above proc_pid_wchan() perf python: Check if there is space to copy all the event perf python: Decrement the refcount of just created event on failure perf python: Fixup description of sample.id event member ocfs2: validate l_tree_depth to avoid out-of-bounds access kexec: initialize ELF lowest address to ULONG_MAX perf units: Fix insufficient array space iio: accel: mma8452: Ensure error return on failure to matching oversampling ratio coresight: catu: Fix number of pages while using 64k pages isofs: fix KMSAN uninit-value bug in do_isofs_readdir() x86/dumpstack: Fix inaccurate unwinding from exception stacks due to misplaced assignment mfd: sm501: Switch to BIT() to mitigate integer overflows RDMA/mlx5: Fix mlx5_poll_one() cur_qp update flow power: supply: max77693: Fix wrong conversion of charge input threshold value x86/entry: Fix ORC unwinder for PUSH_REGS with save_ret=1 clk: amlogic: g12a: fix mmc A peripheral clock clk: amlogic: gxbb: drop non existing 32k clock parent clk: amlogic: g12b: fix cluster A parent data IB/mad: Check available slots before posting receive WRs clk: rockchip: rk3328: fix wrong clk_ref_usb3otg parent pinctrl: renesas: rza2: Fix missing of_node_put() call lib: 842: Improve error handling in sw842_compress() bpf: Use preempt_count() directly in bpf_send_signal_common() clk: amlogic: gxbb: drop incorrect flag on 32k clock fbdev: sm501fb: Add some geometry checks. mdacon: rework dependency list fbdev: au1100fb: Move a variable assignment behind a null pointer check PCI: pciehp: Don't enable HPIE when resuming in poll mode PCI: Remove stray put_device() in pci_register_host_bridge() PCI/portdrv: Only disable pciehp interrupts early when needed PCI/ASPM: Fix link state exit during switch upstream function removal drm/mediatek: mtk_hdmi: Fix typo for aud_sampe_size member ALSA: hda/realtek: Always honor no_shutup_pins perf/ring_buffer: Allow the EPOLLRDNORM flag for poll lockdep: Don't disable interrupts on RT in disable_irq_nosync_lockdep.*() PM: sleep: Fix handling devices with direct_complete set on errors thermal: int340x: Add NULL check for adev EDAC/ie31200: Fix the error path order of ie31200_init() EDAC/ie31200: Fix the DIMM size mask for several SoCs EDAC/ie31200: Fix the size of EDAC_MC_LAYER_CHIP_SELECT layer selinux: Chain up tool resolving errors in install_policy.sh x86/platform: Only allow CONFIG_EISA for 32-bit x86/fpu: Avoid copying dynamic FP state from init_task in arch_dup_task_struct() cpufreq: governor: Fix negative 'idle_time' handling in dbs_update() x86/mm/pat: cpa-test: fix length for CPA_ARRAY test serial: 8250_dma: terminate correct DMA in tx_dma_flush() memstick: rtsx_usb_ms: Fix slab-use-after-free in rtsx_usb_ms_drv_remove net: usb: usbnet: restore usb%d name exception for local mac addresses net: usb: qmi_wwan: add Telit Cinterion FE990B composition net: usb: qmi_wwan: add Telit Cinterion FN990B composition tty: serial: 8250: Add some more device IDs counter: stm32-lptimer-cnt: fix error handling when enabling netfilter: socket: Lookup orig tuple for IPv6 SNAT ARM: Remove address checking for MMUless devices ARM: 9351/1: fault: Add "cut here" line for prefetch aborts ARM: 9350/1: fault: Implement copy_from_kernel_nofault_allowed() atm: Fix NULL pointer dereference HID: hid-plantronics: Add mic mute mapping and generalize quirks ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names drm/radeon: fix uninitialized size issue in radeon_vce_cs_parse() batman-adv: Ignore own maximum aggregation size during RX ARM: shmobile: smp: Enforce shmobile_smp_* alignment mmc: atmel-mci: Add missing clk_disable_unprepare() drm/v3d: Don't run jobs that have errors flagged in its fence i2c: omap: fix IRQ storms net/neighbor: add missing policy for NDTPA_QUEUE_LENBYTES net: atm: fix use after free in lec_send() ipv6: Set errno after ip_fib_metrics_init() in ip6_route_info_create(). ipv6: Fix memleak of nhc_pcpu_rth_output in fib_check_nh_v6_gw(). Bluetooth: Fix error code in chan_alloc_skb_cb() RDMA/hns: Fix wrong value of max_sge_rd RDMA/bnxt_re: Avoid clearing VLAN_ID mask in modify qp path xfrm_output: Force software GSO only in tunnel mode firmware: imx-scu: fix OF node leak in .probe() i2c: sis630: Fix an error handling path in sis630_probe() i2c: ali15x3: Fix an error handling path in ali15x3_probe() i2c: ali1535: Fix an error handling path in ali1535_probe() ASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe() drm/gma500: Add NULL check for pci_gfx_root in mid_get_vbt_data() qlcnic: fix memory leak issues in qlcnic_sriov_common.c drm/amd/display: Assign normalized_pix_clk when color depth = 14 drm/atomic: Filter out redundant DPMS calls x86/microcode/AMD: Fix out-of-bounds on systems with CPU-less NUMA nodes USB: serial: option: match on interface class for Telit FN990B USB: serial: option: fix Telit Cinterion FE990A name USB: serial: option: add Telit Cinterion FE990B compositions USB: serial: ftdi_sio: add support for Altera USB Blaster 3 block: fix 'kmem_cache of name 'bio-108' already exists' drm/nouveau: Do not override forced connector status x86/irq: Define trace events conditionally fuse: don't truncate cached, mutated symlink nvme: only allow entering LIVE from CONNECTING state sctp: Fix undefined behavior in left shift operation nvmet-rdma: recheck queue state is LIVE in state lock in recv done ASoC: rsnd: don't indicate warning on rsnd_kctrl_accept_runtime() s390/cio: Fix CHPID "configure" attribute caching HID: ignore non-functional sensor in HP 5MP Camera HID: intel-ish-hid: fix the length of MNG_SYNC_FW_CLOCK in doorbell ACPI: resource: IRQ override for Eluktronics MECH-17 scsi: qla1280: Fix kernel oops when debug level > 2 iscsi_ibft: Fix UBSAN shift-out-of-bounds warning in ibft_attr_show_nic() powercap: call put_device() on an error path in powercap_register_control_type() hrtimers: Mark is_migration_base() with __always_inline nvme-fc: go straight to connecting state when initializing net/mlx5e: Prevent bridge link show failure for non-eswitch-allowed devices netfilter: nft_exthdr: fix offset with ipv4_find_option() net_sched: Prevent creation of classes with TC_H_ROOT ipvs: prevent integer overflow in do_ip_vs_get_ctl() netfilter: nf_conncount: Fully initialize struct nf_conncount_tuple in insert_tree() Drivers: hv: vmbus: Don't release fb_mmio resource in vmbus_free_mmio() drivers/hv: Replace binary semaphore with mutex netpoll: hold rcu read lock in __netpoll_send_skb() netpoll: netpoll_send_skb() returns transmit status netpoll: move netpoll_send_skb() out of line netpoll: remove dev argument from netpoll_send_skb_on_dev() netpoll: Fix use correct return type for ndo_start_xmit() pinctrl: bcm281xx: Fix incorrect regmap max_registers value sctp: sysctl: auth_enable: avoid using current->nsproxy sctp: sysctl: cookie_hmac_alg: avoid using current->nsproxy Revert "sctp: sysctl: auth_enable: avoid using current->nsproxy" Revert "sctp: sysctl: cookie_hmac_alg: avoid using current->nsproxy" sched/isolation: Prevent boot crash when the boot CPU is nohz_full clockevents/drivers/i8253: Fix stop sequence for timer 0 vlan: fix memory leak in vlan_newlink() Revert "tasklet: Introduce new initialization API" Revert "net: usb: rtl8150: use new tasklet API" Revert "net: usb: rtl8150: enable basic endpoint checking" Revert "usb: xhci: Add timeout argument in address_device USB HCD callback" Revert "usb: xhci: Fix NULL pointer dereference on certain command aborts" Linux 5.4.291 eeprom: digsy_mtc: Make GPIO lookup table match the device slimbus: messaging: Free transaction ID in delayed interrupt scenario intel_th: pci: Add Panther Lake-P/U support intel_th: pci: Add Panther Lake-H support intel_th: pci: Add Arrow Lake support Squashfs: check the inode number is not the invalid value of zero xhci: pci: Fix indentation in the PCI device ID definitions usb: gadget: Check bmAttributes only if configuration is valid usb: gadget: Fix setting self-powered state on suspend usb: gadget: Set self-powered based on MaxPower and bmAttributes usb: typec: tcpci_rt1711h: Unmask alert interrupts to fix functionality usb: typec: ucsi: increase timeout for PPM reset operations usb: atm: cxacru: fix a flaw in existing endpoint checks usb: renesas_usbhs: Flush the notify_hotplug_work usb: quirks: Add DELAY_INIT and NO_LPM for Prolific Mass Storage Card Reader usb: renesas_usbhs: Use devm_usb_get_phy() usb: renesas_usbhs: Call clk_put() Revert "drivers/card_reader/rtsx_usb: Restore interrupt based detection" gpio: rcar: Fix missing of_node_put() call net: ipv6: fix missing dst ref drop in ila lwtunnel net: ipv6: fix dst ref loop in ila lwtunnel net-timestamp: support TCP GSO case for a few missing flags vlan: enforce underlying device type ppp: Fix KMSAN uninit-value warning with bpf be2net: fix sleeping while atomic bugs in be_ndo_bridge_getlink drm/sched: Fix preprocessor guard hwmon: fix a NULL vs IS_ERR_OR_NULL() check in xgene_hwmon_probe() llc: do not use skb_get() before dev_queue_xmit() hwmon: (ad7314) Validate leading zero bits and return error hwmon: (ntc_thermistor) Fix the ncpXXxh103 sensor table hwmon: (pmbus) Initialise page count in pmbus_identify() caif_virtio: fix wrong pointer check in cfv_probe() net: gso: fix ownership in __udp_gso_segment HID: intel-ish-hid: Fix use-after-free issue in ishtp_hid_remove() HID: google: fix unused variable warning under !CONFIG_ACPI wifi: iwlwifi: limit printed string from FW file mm/page_alloc: fix uninitialized variable rapidio: fix an API misues when rio_add_net() fails rapidio: add check for rio_add_net() in rio_scan_alloc_net() wifi: nl80211: reject cooked mode if it is set along with other flags wifi: cfg80211: regulatory: improve invalid hints checking x86/cpu: Properly parse CPUID leaf 0x2 TLB descriptor 0x63 x86/cpu: Validate CPUID leaf 0x2 EDX output x86/cacheinfo: Validate CPUID leaf 0x2 EDX output platform/x86: thinkpad_acpi: Add battery quirk for ThinkPad X131e drm/radeon: Fix rs400_gpu_init for ATI mobility radeon Xpress 200M ALSA: hda/realtek: update ALC222 depop optimize ALSA: hda: intel: Add Dell ALC3271 to power_save denylist HID: appleir: Fix potential NULL dereference at raw event handle Revert "of: reserved-memory: Fix using wrong number of cells to get property 'alignment'" drm/amdgpu: disable BAR resize on Dell G5 SE drm/amdgpu: Check extended configuration space register when system uses large bar drm/amdgpu: skip BAR resizing if the bios already did it acct: perform last write from workqueue kernel/acct.c: use dedicated helper to access rlimit values kernel/acct.c: use #elif instead of #end and #elif drop_monitor: fix incorrect initialization order pfifo_tail_enqueue: Drop new packet when sch->limit == 0 sched/core: Prevent rescheduling when interrupts are disabled phy: exynos5-usbdrd: fix MPLL_MULTIPLIER and SSC_REFCLKSEL masks in refclk phy: tegra: xusb: reset VBUS & ID OVERRIDE usbnet: gl620a: fix endpoint checking in genelink_bind() perf/core: Fix low freq setting via IOC_PERIOD ftrace: Avoid potential division by zero in function_stat_show() x86/CPU: Fix warm boot hang regression on AMD SC1100 SoC systems net: mvpp2: cls: Fixed Non IP flow, with vlan tag flow defination. ipvs: Always clear ipvs_property flag in skb_scrub_packet() ASoC: es8328: fix route from DAC to output net: cadence: macb: Synchronize stats calculations net: loopback: Avoid sending IP packets without an Ethernet header sunrpc: suppress warnings for unused procfs functions batman-adv: Drop unmanaged ELP metric worker batman-adv: Ignore neighbor throughput metrics in error case acct: block access to kernel internal filesystems ALSA: hda/conexant: Add quirk for HP ProBook 450 G4 mute LED nfp: bpf: Add check for nfp_app_ctrl_msg_alloc() tee: optee: Fix supplicant wait loop power: supply: da9150-fg: fix potential overflow flow_dissector: Fix port range key handling in BPF conversion flow_dissector: Fix handling of mixed port and port-range keys net: extract port range fields from fl_flow_key geneve: Suppress list corruption splat in geneve_destroy_tunnels(). gtp: Suppress list corruption splat in gtp_net_exit_batch_rtnl(). geneve: Fix use-after-free in geneve_find_dev(). powerpc/code-patching: Fix KASAN hit by not flagging text patching area as VM_ALLOC ALSA: hda/realtek: Fixup ALC225 depop procedure ALSA: hda/realtek - Add type for ALC287 powerpc/64s: Rewrite __real_pte() and __rpte_to_hidx() as static inline powerpc/64s/mm: Move __real_pte stubs into hash-4k.h USB: gadget: f_midi: f_midi_complete to call queue_work usb/gadget: f_midi: Replace tasklet with work usb/gadget: f_midi: convert tasklets to use new tasklet_setup() API usb: dwc3: Fix timeout issue during controller enter/exit from halt state usb: dwc3: Increase DWC3 controller halt timeout memcg: fix soft lockup in the OOM process mm: update mark_victim tracepoints fields crypto: testmgr - some more fixes to RSA test vectors crypto: testmgr - populate RSA CRT parameters in RSA test vectors crypto: testmgr - fix version number of RSA tests crypto: testmgr - Fix wrong test case of RSA crypto: testmgr - fix wrong key length for pkcs1pad driver core: bus: Fix double free in driver API bus_register() scsi: storvsc: Set correct data length for sending SCSI command without payload vlan: move dev_put into vlan_dev_uninit vlan: introduce vlan_dev_free_egress_priority ima: Fix use-after-free on a dentry's dname.name pps: Fix a use-after-free btrfs: avoid monopolizing a core when activating a swap file Revert "btrfs: avoid monopolizing a core when activating a swap file" x86/i8253: Disable PIT timer 0 when not in use parport_pc: add support for ASIX AX99100 serial: 8250_pci: add support for ASIX AX99100 can: ems_pci: move ASIX AX99100 ids to pci_ids.h nilfs2: protect access to buffers with no active references nilfs2: do not force clear folio if buffer is referenced nilfs2: do not output warnings when clearing dirty buffers alpha: replace hardcoded stack offsets with autogenerated ones ndisc: extend RCU protection in ndisc_send_skb() openvswitch: use RCU protection in ovs_vport_cmd_fill_info() arp: use RCU protection in arp_xmit() neighbour: use RCU protection in __neigh_notify() neighbour: delete redundant judgment statements ndisc: use RCU protection in ndisc_alloc_skb() ipv6: use RCU protection in ip6_default_advmss() ipv4: use RCU protection in inet_select_addr() ipv4: use RCU protection in rt_is_expired() net: add dev_net_rcu() helper net: treat possible_net_t net pointer as an RCU one and add read_pnet_rcu() regmap-irq: Add missing kfree() partitions: mac: fix handling of bogus partition table gpio: stmpe: Check return value of stmpe_reg_read in stmpe_gpio_irq_sync_unlock alpha: align stack for page fault and user unaligned trap handlers serial: 8250: Fix fifo underflow on flush alpha: make stack 16-byte aligned (most cases) can: j1939: j1939_sk_send_loop(): fix unable to send messages with data length zero can: c_can: fix unbalanced runtime PM disable in error path USB: serial: option: drop MeiG Smart defines USB: serial: option: fix Telit Cinterion FN990A name USB: serial: option: add Telit Cinterion FN990B compositions USB: serial: option: add MeiG Smart SLM828 usb: cdc-acm: Fix handling of oversized fragments usb: cdc-acm: Check control transfer buffer size before access USB: cdc-acm: Fill in Renesas R-Car D3 USB Download mode quirk USB: hub: Ignore non-compliant devices with too many configs or interfaces usb: gadget: f_midi: fix MIDI Streaming descriptor lengths USB: Add USB_QUIRK_NO_LPM quirk for sony xperia xz1 smartphone USB: quirks: add USB_QUIRK_NO_LPM quirk for Teclast dist USB: pci-quirks: Fix HCCPARAMS register error for LS7A EHCI usb: dwc2: gadget: remove of_node reference upon udc_stop usb: gadget: udc: renesas_usb3: Fix compiler warning usb: roles: set switch registered flag early on batman-adv: fix panic during interface removal ASoC: Intel: bytcr_rt5640: Add DMI quirk for Vexia Edu Atla 10 tablet 5V orangefs: fix a oob in orangefs_debug_write Grab mm lock before grabbing pt lock vfio/pci: Enable iowrite64 and ioread64 for vfio pci media: cxd2841er: fix 64-bit division on gcc-9 x86/xen: allow larger contiguous memory regions in PV guests xen: remove a confusing comment on auto-translated guest I/O gpio: bcm-kona: Add missing newline to dev_err format string gpio: bcm-kona: Make sure GPIO bits are unlocked when requesting IRQ gpio: bcm-kona: Fix GPIO lock/unlock for banks above bank 0 arm64: cacheinfo: Avoid out-of-bounds write to cacheinfo array team: better TEAM_OPTION_TYPE_STRING validation vrf: use RCU protection in l3mdev_l3_out() ndisc: ndisc_send_redirect() must use dev_get_by_index_rcu() HID: multitouch: Add NULL check in mt_input_configured ocfs2: check dir i_size in ocfs2_find_entry MIPS: ftrace: Declare ftrace_get_parent_ra_addr() as static ptp: Ensure info->enable callback is always set net/ncsi: wait for the last response to Deselect Package before configuring channel misc: fastrpc: Fix registered buffer page address mtd: onenand: Fix uninitialized retlen in do_otp_read() NFC: nci: Add bounds checking in nci_hci_create_pipe() nilfs2: fix possible int overflows in nilfs_fiemap() ocfs2: handle a symlink read error correctly ocfs2: fix incorrect CPU endianness conversion causing mount failure vfio/platform: check the bounds of read/write syscalls nvmem: core: improve range check for nvmem_cell_write() crypto: qce - unregister previously registered algos in error path crypto: qce - fix goto jump in error path media: uvcvideo: Remove redundant NULL assignment media: uvcvideo: Fix event flags in uvc_ctrl_send_events media: ov5640: fix get_light_freq on auto soc: qcom: smem_state: fix missing of_node_put in error path kbuild: Move -Wenum-enum-conversion to W=2 powerpc/pseries/eeh: Fix get PE state translation serial: sh-sci: Do not probe the serial port if its slot in sci_ports[] is in use serial: sh-sci: Drop __initdata macro for port_cfg soc: qcom: socinfo: Avoid out of bounds read of serial number usb: gadget: f_tcm: Don't prepare BOT write request twice usb: gadget: f_tcm: ep_autoconfig with fullspeed endpoint usb: gadget: f_tcm: Decrement command ref count on cleanup usb: gadget: f_tcm: Translate error to sense wifi: brcmfmac: fix NULL pointer dereference in brcmf_txfinalize() HID: hid-sensor-hub: don't use stale platform-data on remove of: reserved-memory: Fix using wrong number of cells to get property 'alignment' of: Fix of_find_node_opts_by_path() handling of alias+path+options of: Correct child specifier used as input of the 2nd nexus node perf bench: Fix undefined behavior in cmpworker() clk: qcom: clk-rpmh: prevent integer overflow in recalc_rate clk: qcom: clk-alpha-pll: fix alpha mode configuration Bluetooth: L2CAP: handle NULL sock pointer in l2cap_sock_alloc drm/komeda: Add check for komeda_get_layer_fourcc_list() KVM: s390: vsie: fix some corner-cases when grabbing vsie pages KVM: Explicitly verify target vCPU is online in kvm_get_vcpu() arm64: dts: rockchip: increase gmac rx_delay on rk3399-puma binfmt_flat: Fix integer overflow bug on 32 bit systems m68k: vga: Fix I/O defines s390/futex: Fix FUTEX_OP_ANDN implementation leds: lp8860: Write full EEPROM, not only half of it cpufreq: s3c64xx: Fix compilation warning tun: revert fix group permission check netem: Update sch->q.qlen before qdisc_tree_reduce_backlog() net: rose: lock the socket in rose_bind() udp: gso: do not drop small packets when PMTU reduces tg3: Disable tg3 PCIe AER on system reboot gpu: drm_dp_cec: fix broken CEC adapter properties check firmware: iscsi_ibft: fix ISCSI_IBFT Kconfig entry nvme: handle connectivity loss in nvme_set_queue_count usb: xhci: Fix NULL pointer dereference on certain command aborts usb: xhci: Add timeout argument in address_device USB HCD callback net: usb: rtl8150: enable basic endpoint checking net: usb: rtl8150: use new tasklet API tasklet: Introduce new initialization API kbuild: userprogs: use correct lld when linking through clang sched: sch_cake: add bounds checks to host bulk flow fairness counts media: uvcvideo: Remove dangling pointers media: uvcvideo: Only save async fh if success nilfs2: handle errors that nilfs_prepare_chunk() may return nilfs2: eliminate staggered calls to kunmap in nilfs_rename nilfs2: move page release outside of nilfs_delete_entry and nilfs_set_link spi-mxs: Fix chipselect glitch x86/mm: Don't disable PCID when INVLPG has been fixed by microcode APEI: GHES: Have GHES honor the panic= setting HID: Wacom: Add PCI Wacom device support mfd: lpc_ich: Add another Gemini Lake ISA bridge PCI device-id tomoyo: don't emit warning in tomoyo_write_control() wifi: brcmsmac: add gain range check to wlc_phy_iqcal_gainparams_nphy() mmc: core: Respect quirk_max_rate for non-UHS SDIO card tun: fix group permission check printk: Fix signed integer overflow when defining LOG_BUF_LEN_MAX x86/amd_nb: Restrict init function to AMD-based systems sched: Don't try to catch up excess steal time. btrfs: convert BUG_ON in btrfs_reloc_cow_block() to proper error handling btrfs: fix use-after-free when attempting to join an aborted transaction btrfs: output the reason for open_ctree() failure usb: gadget: f_tcm: Don't free command immediately media: uvcvideo: Fix double free in error path HID: core: Fix assumption that Resolution Multipliers must be in Logical Collections usb: typec: tcpm: set SRC_SEND_CAPABILITIES timeout to PD_T_SENDER_RESPONSE drivers/card_reader/rtsx_usb: Restore interrupt based detection ktest.pl: Check kernelrelease return in get_version NFSD: Reset cb_seq_status after NFS4ERR_DELAY hexagon: Fix unbalanced spinlock in die() hexagon: fix using plain integer as NULL pointer warning in cmpxchg genksyms: fix memory leak when the same symbol is read from *.symref file genksyms: fix memory leak when the same symbol is added from source net: sh_eth: Fix missing rtnl lock in suspend/resume path vsock: Allow retrying on connect() failure perf trace: Fix runtime error of index out of bounds net: davicom: fix UAF in dm9000_drv_remove net: rose: fix timer races against user threads PM: hibernate: Add error handling for syscore_suspend() ipmr: do not call mr_mfc_uses_dev() for unres entries net: fec: implement TSO descriptor cleanup ubifs: skip dumping tnc tree when zroot is null rtc: pcf85063: fix potential OOB write in PCF85063 NVMEM read dmaengine: ti: edma: fix OF node reference leaks in edma_driver module: Extend the preempt disabled section in dereference_symbol_descriptor(). ocfs2: mark dquot as inactive if failed to start trans while releasing dquot scsi: ufs: bsg: Delete bsg_dev when setting up bsg fails scsi: mpt3sas: Set ioc->manu_pg11.EEDPTagMode directly to 1 staging: media: imx: fix OF node leak in imx_media_add_of_subdevs() media: uvcvideo: Propagate buf->error to userspace media: camif-core: Add check for clk_enable() media: mipi-csis: Add check for clk_enable() PCI: endpoint: Destroy the EPC device in devm_pci_epc_destroy() media: lmedm04: Handle errors for lme2510_int_read media: lmedm04: Use GFP_KERNEL for URB allocation/submission. media: rc: iguanair: handle timeouts fbdev: omapfb: Fix an OF node leak in dss_of_port_get_parent_device() ARM: dts: mediatek: mt7623: fix IR nodename arm64: dts: mediatek: mt8173-evb: Fix MT6397 PMIC sub-node names arm64: dts: mediatek: mt8173-evb: Drop regulator-compatible property rdma/cxgb4: Prevent potential integer overflow on 32bit RDMA/mlx4: Avoid false error about access to uninitialized gids array bpf: Send signals asynchronously if !preemptible perf report: Fix misleading help message about --demangle perf top: Don't complain about lack of vmlinux when not resolving some kernel samples padata: fix sysfs store callback check ktest.pl: Remove unused declarations in run_bisect_test function perf header: Fix one memory leakage in process_bpf_prog_info() perf header: Fix one memory leakage in process_bpf_btf() ASoC: sun4i-spdif: Add clock multiplier settings tools/testing/selftests/bpf/test_tc_tunnel.sh: Fix wait for server bind net: sched: Disallow replacing of child qdisc from one parent to another net/mlxfw: Drop hard coded max FW flash image size net: let net.core.dev_weight always be non-zero clk: analogbits: Fix incorrect calculation of vco rate delta selftests: harness: fix printing of mismatch values in __EXPECT() selftests/harness: Display signed values correctly wifi: wlcore: fix unbalanced pm_runtime calls regulator: of: Implement the unwind path of of_regulator_match() team: prevent adding a device which is already a team device lower cpupower: fix TSC MHz calculation wifi: rtlwifi: pci: wait for firmware loading before releasing memory wifi: rtlwifi: fix memory leaks and invalid access at probe error path wifi: rtlwifi: remove unused check_buddy_priv wifi: rtlwifi: remove unused dualmac control leftovers wifi: rtlwifi: remove unused timer and related code rtlwifi: replace usage of found with dedicated list iterator variable dt-bindings: mmc: controller: clarify the address-cells description wifi: rtlwifi: usb: fix workqueue leak when probe fails wifi: rtlwifi: rtl8192se: rise completion of firmware loading as last step rtlwifi: rtl8192se Rename RT_TRACE to rtl_dbg wifi: rtlwifi: do not complete firmware loading needlessly ipmi: ipmb: Add check devm_kasprintf() returned value drm/amdgpu: Fix potential NULL pointer dereference in atomctrl_get_smc_sclk_range_table drm/etnaviv: Fix page property being used for non writecombine buffers partitions: ldm: remove the initial kernel-doc notation nbd: don't allow reconnect after disconnect afs: Fix directory format encoding struct overflow: Allow mixed type arguments overflow: Correct check_shl_overflow() comment overflow: Add __must_check attribute to check_*() helpers udf: Fix use of check_add_overflow() with mixed type arguments perf cs-etm: Add missing variable in cs_etm__process_queues() Conflicts: Documentation/devicetree/bindings/mmc/mmc-controller.yaml Documentation/devicetree/bindings~HEAD drivers/clk/qcom/clk-alpha-pll.c drivers/soc/qcom/socinfo.c drivers/usb/dwc3/gadget.c mm/oom_kill.c scripts/Makefile.extrawarn Change-Id: I599df88164649e325b40d25cb1a8e64e5fd27cf0
This commit is contained in:
commit
bbcf9da13a
427 changed files with 3921 additions and 2159 deletions
|
|
@ -129,11 +129,8 @@ adaptive-tick CPUs: At least one non-adaptive-tick CPU must remain
|
|||
online to handle timekeeping tasks in order to ensure that system
|
||||
calls like gettimeofday() returns accurate values on adaptive-tick CPUs.
|
||||
(This is not an issue for CONFIG_NO_HZ_IDLE=y because there are no running
|
||||
user processes to observe slight drifts in clock rate.) Therefore, the
|
||||
boot CPU is prohibited from entering adaptive-ticks mode. Specifying a
|
||||
"nohz_full=" mask that includes the boot CPU will result in a boot-time
|
||||
error message, and the boot CPU will be removed from the mask. Note that
|
||||
this means that your system must have at least two CPUs in order for
|
||||
user processes to observe slight drifts in clock rate.) Note that this
|
||||
means that your system must have at least two CPUs in order for
|
||||
CONFIG_NO_HZ_FULL=y to do anything for you.
|
||||
|
||||
Finally, adaptive-ticks CPUs must have their RCU callbacks offloaded.
|
||||
|
|
|
|||
7
Makefile
7
Makefile
|
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 290
|
||||
SUBLEVEL = 292
|
||||
EXTRAVERSION =
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
|
|
@ -1047,6 +1047,11 @@ ifeq ($(CONFIG_RELR),y)
|
|||
LDFLAGS_vmlinux += --pack-dyn-relocs=relr --use-android-relr-tags
|
||||
endif
|
||||
|
||||
# userspace programs are linked via the compiler, use the correct linker
|
||||
ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_LD_IS_LLD),yy)
|
||||
KBUILD_USERLDFLAGS += $(call cc-option, --ld-path=$(LD))
|
||||
endif
|
||||
|
||||
# make the checker run with the right architecture
|
||||
CHECKFLAGS += --arch=$(ARCH)
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@ struct pt_regs {
|
|||
unsigned long trap_a0;
|
||||
unsigned long trap_a1;
|
||||
unsigned long trap_a2;
|
||||
/* This makes the stack 16-byte aligned as GCC expects */
|
||||
unsigned long __pad0;
|
||||
/* These are saved by PAL-code: */
|
||||
unsigned long ps;
|
||||
unsigned long pc;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@ void foo(void)
|
|||
DEFINE(CRED_EGID, offsetof(struct cred, egid));
|
||||
BLANK();
|
||||
|
||||
DEFINE(SP_OFF, offsetof(struct pt_regs, ps));
|
||||
DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs));
|
||||
DEFINE(SWITCH_STACK_SIZE, sizeof(struct switch_stack));
|
||||
DEFINE(PT_PTRACED, PT_PTRACED);
|
||||
DEFINE(CLONE_VM, CLONE_VM);
|
||||
DEFINE(CLONE_UNTRACED, CLONE_UNTRACED);
|
||||
|
|
|
|||
|
|
@ -15,10 +15,6 @@
|
|||
.set noat
|
||||
.cfi_sections .debug_frame
|
||||
|
||||
/* Stack offsets. */
|
||||
#define SP_OFF 184
|
||||
#define SWITCH_STACK_SIZE 320
|
||||
|
||||
.macro CFI_START_OSF_FRAME func
|
||||
.align 4
|
||||
.globl \func
|
||||
|
|
@ -199,8 +195,8 @@ CFI_END_OSF_FRAME entArith
|
|||
CFI_START_OSF_FRAME entMM
|
||||
SAVE_ALL
|
||||
/* save $9 - $15 so the inline exception code can manipulate them. */
|
||||
subq $sp, 56, $sp
|
||||
.cfi_adjust_cfa_offset 56
|
||||
subq $sp, 64, $sp
|
||||
.cfi_adjust_cfa_offset 64
|
||||
stq $9, 0($sp)
|
||||
stq $10, 8($sp)
|
||||
stq $11, 16($sp)
|
||||
|
|
@ -215,7 +211,7 @@ CFI_START_OSF_FRAME entMM
|
|||
.cfi_rel_offset $13, 32
|
||||
.cfi_rel_offset $14, 40
|
||||
.cfi_rel_offset $15, 48
|
||||
addq $sp, 56, $19
|
||||
addq $sp, 64, $19
|
||||
/* handle the fault */
|
||||
lda $8, 0x3fff
|
||||
bic $sp, $8, $8
|
||||
|
|
@ -228,7 +224,7 @@ CFI_START_OSF_FRAME entMM
|
|||
ldq $13, 32($sp)
|
||||
ldq $14, 40($sp)
|
||||
ldq $15, 48($sp)
|
||||
addq $sp, 56, $sp
|
||||
addq $sp, 64, $sp
|
||||
.cfi_restore $9
|
||||
.cfi_restore $10
|
||||
.cfi_restore $11
|
||||
|
|
@ -236,7 +232,7 @@ CFI_START_OSF_FRAME entMM
|
|||
.cfi_restore $13
|
||||
.cfi_restore $14
|
||||
.cfi_restore $15
|
||||
.cfi_adjust_cfa_offset -56
|
||||
.cfi_adjust_cfa_offset -64
|
||||
/* finish up the syscall as normal. */
|
||||
br ret_from_sys_call
|
||||
CFI_END_OSF_FRAME entMM
|
||||
|
|
@ -383,8 +379,8 @@ entUnaUser:
|
|||
.cfi_restore $0
|
||||
.cfi_adjust_cfa_offset -256
|
||||
SAVE_ALL /* setup normal kernel stack */
|
||||
lda $sp, -56($sp)
|
||||
.cfi_adjust_cfa_offset 56
|
||||
lda $sp, -64($sp)
|
||||
.cfi_adjust_cfa_offset 64
|
||||
stq $9, 0($sp)
|
||||
stq $10, 8($sp)
|
||||
stq $11, 16($sp)
|
||||
|
|
@ -400,7 +396,7 @@ entUnaUser:
|
|||
.cfi_rel_offset $14, 40
|
||||
.cfi_rel_offset $15, 48
|
||||
lda $8, 0x3fff
|
||||
addq $sp, 56, $19
|
||||
addq $sp, 64, $19
|
||||
bic $sp, $8, $8
|
||||
jsr $26, do_entUnaUser
|
||||
ldq $9, 0($sp)
|
||||
|
|
@ -410,7 +406,7 @@ entUnaUser:
|
|||
ldq $13, 32($sp)
|
||||
ldq $14, 40($sp)
|
||||
ldq $15, 48($sp)
|
||||
lda $sp, 56($sp)
|
||||
lda $sp, 64($sp)
|
||||
.cfi_restore $9
|
||||
.cfi_restore $10
|
||||
.cfi_restore $11
|
||||
|
|
@ -418,7 +414,7 @@ entUnaUser:
|
|||
.cfi_restore $13
|
||||
.cfi_restore $14
|
||||
.cfi_restore $15
|
||||
.cfi_adjust_cfa_offset -56
|
||||
.cfi_adjust_cfa_offset -64
|
||||
br ret_from_sys_call
|
||||
CFI_END_OSF_FRAME entUna
|
||||
|
||||
|
|
|
|||
|
|
@ -709,7 +709,7 @@ s_reg_to_mem (unsigned long s_reg)
|
|||
static int unauser_reg_offsets[32] = {
|
||||
R(r0), R(r1), R(r2), R(r3), R(r4), R(r5), R(r6), R(r7), R(r8),
|
||||
/* r9 ... r15 are stored in front of regs. */
|
||||
-56, -48, -40, -32, -24, -16, -8,
|
||||
-64, -56, -48, -40, -32, -24, -16, /* padding at -8 */
|
||||
R(r16), R(r17), R(r18),
|
||||
R(r19), R(r20), R(r21), R(r22), R(r23), R(r24), R(r25), R(r26),
|
||||
R(r27), R(r28), R(gp),
|
||||
|
|
|
|||
|
|
@ -77,8 +77,8 @@ __load_new_mm_context(struct mm_struct *next_mm)
|
|||
|
||||
/* Macro for exception fixup code to access integer registers. */
|
||||
#define dpf_reg(r) \
|
||||
(((unsigned long *)regs)[(r) <= 8 ? (r) : (r) <= 15 ? (r)-16 : \
|
||||
(r) <= 18 ? (r)+10 : (r)-10])
|
||||
(((unsigned long *)regs)[(r) <= 8 ? (r) : (r) <= 15 ? (r)-17 : \
|
||||
(r) <= 18 ? (r)+11 : (r)-10])
|
||||
|
||||
asmlinkage void
|
||||
do_page_fault(unsigned long address, unsigned long mmcsr,
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@
|
|||
clock-names = "spi", "wrap";
|
||||
};
|
||||
|
||||
cir: cir@10013000 {
|
||||
cir: ir-receiver@10013000 {
|
||||
compatible = "mediatek,mt7623-cir";
|
||||
reg = <0 0x10013000 0 0x1000>;
|
||||
interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_LOW>;
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ ENDPROC(shmobile_smp_sleep)
|
|||
.long shmobile_smp_arg - 1b
|
||||
|
||||
.bss
|
||||
.align 2
|
||||
.globl shmobile_smp_mpidr
|
||||
shmobile_smp_mpidr:
|
||||
.space NR_CPUS * 4
|
||||
|
|
|
|||
|
|
@ -27,6 +27,13 @@
|
|||
|
||||
#ifdef CONFIG_MMU
|
||||
|
||||
bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size)
|
||||
{
|
||||
unsigned long addr = (unsigned long)unsafe_src;
|
||||
|
||||
return addr >= TASK_SIZE && ULONG_MAX - addr >= size;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is useful to dump out the page tables associated with
|
||||
* 'addr' in mm 'mm'.
|
||||
|
|
@ -563,6 +570,7 @@ do_PrefetchAbort(unsigned long addr, unsigned int ifsr, struct pt_regs *regs)
|
|||
if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs))
|
||||
return;
|
||||
|
||||
pr_alert("8<--- cut here ---\n");
|
||||
pr_alert("Unhandled prefetch abort: %s (0x%03x) at 0x%08lx\n",
|
||||
inf->name, ifsr, addr);
|
||||
|
||||
|
|
|
|||
|
|
@ -303,11 +303,10 @@
|
|||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
|
||||
mt6397regulator: mt6397regulator {
|
||||
regulators {
|
||||
compatible = "mediatek,mt6397-regulator";
|
||||
|
||||
mt6397_vpca15_reg: buck_vpca15 {
|
||||
regulator-compatible = "buck_vpca15";
|
||||
regulator-name = "vpca15";
|
||||
regulator-min-microvolt = < 700000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
|
@ -316,7 +315,6 @@
|
|||
};
|
||||
|
||||
mt6397_vpca7_reg: buck_vpca7 {
|
||||
regulator-compatible = "buck_vpca7";
|
||||
regulator-name = "vpca7";
|
||||
regulator-min-microvolt = < 700000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
|
@ -325,7 +323,6 @@
|
|||
};
|
||||
|
||||
mt6397_vsramca15_reg: buck_vsramca15 {
|
||||
regulator-compatible = "buck_vsramca15";
|
||||
regulator-name = "vsramca15";
|
||||
regulator-min-microvolt = < 700000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
|
@ -334,7 +331,6 @@
|
|||
};
|
||||
|
||||
mt6397_vsramca7_reg: buck_vsramca7 {
|
||||
regulator-compatible = "buck_vsramca7";
|
||||
regulator-name = "vsramca7";
|
||||
regulator-min-microvolt = < 700000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
|
@ -343,7 +339,6 @@
|
|||
};
|
||||
|
||||
mt6397_vcore_reg: buck_vcore {
|
||||
regulator-compatible = "buck_vcore";
|
||||
regulator-name = "vcore";
|
||||
regulator-min-microvolt = < 700000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
|
@ -352,7 +347,6 @@
|
|||
};
|
||||
|
||||
mt6397_vgpu_reg: buck_vgpu {
|
||||
regulator-compatible = "buck_vgpu";
|
||||
regulator-name = "vgpu";
|
||||
regulator-min-microvolt = < 700000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
|
@ -361,7 +355,6 @@
|
|||
};
|
||||
|
||||
mt6397_vdrm_reg: buck_vdrm {
|
||||
regulator-compatible = "buck_vdrm";
|
||||
regulator-name = "vdrm";
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
|
|
@ -370,7 +363,6 @@
|
|||
};
|
||||
|
||||
mt6397_vio18_reg: buck_vio18 {
|
||||
regulator-compatible = "buck_vio18";
|
||||
regulator-name = "vio18";
|
||||
regulator-min-microvolt = <1620000>;
|
||||
regulator-max-microvolt = <1980000>;
|
||||
|
|
@ -379,19 +371,16 @@
|
|||
};
|
||||
|
||||
mt6397_vtcxo_reg: ldo_vtcxo {
|
||||
regulator-compatible = "ldo_vtcxo";
|
||||
regulator-name = "vtcxo";
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
mt6397_va28_reg: ldo_va28 {
|
||||
regulator-compatible = "ldo_va28";
|
||||
regulator-name = "va28";
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
mt6397_vcama_reg: ldo_vcama {
|
||||
regulator-compatible = "ldo_vcama";
|
||||
regulator-name = "vcama";
|
||||
regulator-min-microvolt = <1500000>;
|
||||
regulator-max-microvolt = <2800000>;
|
||||
|
|
@ -399,18 +388,15 @@
|
|||
};
|
||||
|
||||
mt6397_vio28_reg: ldo_vio28 {
|
||||
regulator-compatible = "ldo_vio28";
|
||||
regulator-name = "vio28";
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
mt6397_vusb_reg: ldo_vusb {
|
||||
regulator-compatible = "ldo_vusb";
|
||||
regulator-name = "vusb";
|
||||
};
|
||||
|
||||
mt6397_vmc_reg: ldo_vmc {
|
||||
regulator-compatible = "ldo_vmc";
|
||||
regulator-name = "vmc";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
|
@ -418,7 +404,6 @@
|
|||
};
|
||||
|
||||
mt6397_vmch_reg: ldo_vmch {
|
||||
regulator-compatible = "ldo_vmch";
|
||||
regulator-name = "vmch";
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
|
@ -426,7 +411,6 @@
|
|||
};
|
||||
|
||||
mt6397_vemc_3v3_reg: ldo_vemc3v3 {
|
||||
regulator-compatible = "ldo_vemc3v3";
|
||||
regulator-name = "vemc_3v3";
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
|
@ -434,7 +418,6 @@
|
|||
};
|
||||
|
||||
mt6397_vgp1_reg: ldo_vgp1 {
|
||||
regulator-compatible = "ldo_vgp1";
|
||||
regulator-name = "vcamd";
|
||||
regulator-min-microvolt = <1220000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
|
@ -442,7 +425,6 @@
|
|||
};
|
||||
|
||||
mt6397_vgp2_reg: ldo_vgp2 {
|
||||
regulator-compatible = "ldo_vgp2";
|
||||
regulator-name = "vcamio";
|
||||
regulator-min-microvolt = <1000000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
|
@ -450,7 +432,6 @@
|
|||
};
|
||||
|
||||
mt6397_vgp3_reg: ldo_vgp3 {
|
||||
regulator-compatible = "ldo_vgp3";
|
||||
regulator-name = "vcamaf";
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
|
@ -458,7 +439,6 @@
|
|||
};
|
||||
|
||||
mt6397_vgp4_reg: ldo_vgp4 {
|
||||
regulator-compatible = "ldo_vgp4";
|
||||
regulator-name = "vgp4";
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
|
@ -466,7 +446,6 @@
|
|||
};
|
||||
|
||||
mt6397_vgp5_reg: ldo_vgp5 {
|
||||
regulator-compatible = "ldo_vgp5";
|
||||
regulator-name = "vgp5";
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
|
|
@ -474,7 +453,6 @@
|
|||
};
|
||||
|
||||
mt6397_vgp6_reg: ldo_vgp6 {
|
||||
regulator-compatible = "ldo_vgp6";
|
||||
regulator-name = "vgp6";
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
|
@ -482,7 +460,6 @@
|
|||
};
|
||||
|
||||
mt6397_vibr_reg: ldo_vibr {
|
||||
regulator-compatible = "ldo_vibr";
|
||||
regulator-name = "vibr";
|
||||
regulator-min-microvolt = <1300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@
|
|||
snps,reset-active-low;
|
||||
snps,reset-delays-us = <0 10000 50000>;
|
||||
tx_delay = <0x10>;
|
||||
rx_delay = <0x10>;
|
||||
rx_delay = <0x23>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -87,16 +87,18 @@ int populate_cache_leaves(unsigned int cpu)
|
|||
unsigned int level, idx;
|
||||
enum cache_type type;
|
||||
struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu);
|
||||
struct cacheinfo *this_leaf = this_cpu_ci->info_list;
|
||||
struct cacheinfo *infos = this_cpu_ci->info_list;
|
||||
|
||||
for (idx = 0, level = 1; level <= this_cpu_ci->num_levels &&
|
||||
idx < this_cpu_ci->num_leaves; idx++, level++) {
|
||||
idx < this_cpu_ci->num_leaves; level++) {
|
||||
type = get_cache_type(level);
|
||||
if (type == CACHE_TYPE_SEPARATE) {
|
||||
ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level);
|
||||
ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level);
|
||||
if (idx + 1 >= this_cpu_ci->num_leaves)
|
||||
break;
|
||||
ci_leaf_init(&infos[idx++], CACHE_TYPE_DATA, level);
|
||||
ci_leaf_init(&infos[idx++], CACHE_TYPE_INST, level);
|
||||
} else {
|
||||
ci_leaf_init(this_leaf++, type, level);
|
||||
ci_leaf_init(&infos[idx++], type, level);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
|
|||
__typeof__(ptr) __ptr = (ptr); \
|
||||
__typeof__(*(ptr)) __old = (old); \
|
||||
__typeof__(*(ptr)) __new = (new); \
|
||||
__typeof__(*(ptr)) __oldval = 0; \
|
||||
__typeof__(*(ptr)) __oldval = (__typeof__(*(ptr))) 0; \
|
||||
\
|
||||
asm volatile( \
|
||||
"1: %0 = memw_locked(%1);\n" \
|
||||
|
|
|
|||
|
|
@ -202,8 +202,10 @@ int die(const char *str, struct pt_regs *regs, long err)
|
|||
printk(KERN_EMERG "Oops: %s[#%d]:\n", str, ++die.counter);
|
||||
|
||||
if (notify_die(DIE_OOPS, str, regs, err, pt_cause(regs), SIGSEGV) ==
|
||||
NOTIFY_STOP)
|
||||
NOTIFY_STOP) {
|
||||
spin_unlock_irq(&die.lock);
|
||||
return 1;
|
||||
}
|
||||
|
||||
print_modules();
|
||||
show_regs(regs);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
*/
|
||||
#ifndef CONFIG_PCI
|
||||
|
||||
#include <asm/raw_io.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/kmap.h>
|
||||
|
||||
/*
|
||||
|
|
@ -29,9 +29,9 @@
|
|||
#define inw_p(port) 0
|
||||
#define outb_p(port, val) do { } while (0)
|
||||
#define outw(port, val) do { } while (0)
|
||||
#define readb raw_inb
|
||||
#define writeb raw_outb
|
||||
#define writew raw_outw
|
||||
#define readb __raw_readb
|
||||
#define writeb __raw_writeb
|
||||
#define writew __raw_writew
|
||||
|
||||
#endif /* CONFIG_PCI */
|
||||
#endif /* _ASM_M68K_VGA_H */
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ int ftrace_disable_ftrace_graph_caller(void)
|
|||
#define S_R_SP (0xafb0 << 16) /* s{d,w} R, offset(sp) */
|
||||
#define OFFSET_MASK 0xffff /* stack offset range: 0 ~ PT_SIZE */
|
||||
|
||||
unsigned long ftrace_get_parent_ra_addr(unsigned long self_ra, unsigned long
|
||||
static unsigned long ftrace_get_parent_ra_addr(unsigned long self_ra, unsigned long
|
||||
old_parent_ra, unsigned long parent_ra_addr, unsigned long fp)
|
||||
{
|
||||
unsigned long sp, ip, tmp;
|
||||
|
|
|
|||
|
|
@ -83,6 +83,34 @@ static inline int hash__hugepd_ok(hugepd_t hpd)
|
|||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* With 4K page size the real_pte machinery is all nops.
|
||||
*/
|
||||
static inline real_pte_t __real_pte(pte_t pte, pte_t *ptep, int offset)
|
||||
{
|
||||
return (real_pte_t){pte};
|
||||
}
|
||||
|
||||
#define __rpte_to_pte(r) ((r).pte)
|
||||
|
||||
static inline unsigned long __rpte_to_hidx(real_pte_t rpte, unsigned long index)
|
||||
{
|
||||
return pte_val(__rpte_to_pte(rpte)) >> H_PAGE_F_GIX_SHIFT;
|
||||
}
|
||||
|
||||
#define pte_iterate_hashed_subpages(rpte, psize, va, index, shift) \
|
||||
do { \
|
||||
index = 0; \
|
||||
shift = mmu_psize_defs[psize].shift; \
|
||||
|
||||
#define pte_iterate_hashed_end() } while(0)
|
||||
|
||||
/*
|
||||
* We expect this to be called only for user addresses or kernel virtual
|
||||
* addresses other than the linear mapping.
|
||||
*/
|
||||
#define pte_pagesize_index(mm, addr, pte) MMU_PAGE_4K
|
||||
|
||||
/*
|
||||
* 4K PTE format is different from 64K PTE format. Saving the hash_slot is just
|
||||
* a matter of returning the PTE bits that need to be modified. On 64K PTE,
|
||||
|
|
|
|||
|
|
@ -324,32 +324,6 @@ extern unsigned long pci_io_base;
|
|||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/*
|
||||
* This is the default implementation of various PTE accessors, it's
|
||||
* used in all cases except Book3S with 64K pages where we have a
|
||||
* concept of sub-pages
|
||||
*/
|
||||
#ifndef __real_pte
|
||||
|
||||
#define __real_pte(e, p, o) ((real_pte_t){(e)})
|
||||
#define __rpte_to_pte(r) ((r).pte)
|
||||
#define __rpte_to_hidx(r,index) (pte_val(__rpte_to_pte(r)) >> H_PAGE_F_GIX_SHIFT)
|
||||
|
||||
#define pte_iterate_hashed_subpages(rpte, psize, va, index, shift) \
|
||||
do { \
|
||||
index = 0; \
|
||||
shift = mmu_psize_defs[psize].shift; \
|
||||
|
||||
#define pte_iterate_hashed_end() } while(0)
|
||||
|
||||
/*
|
||||
* We expect this to be called only for user addresses or kernel virtual
|
||||
* addresses other than the linear mapping.
|
||||
*/
|
||||
#define pte_pagesize_index(mm, addr, pte) MMU_PAGE_4K
|
||||
|
||||
#endif /* __real_pte */
|
||||
|
||||
static inline unsigned long pte_update(struct mm_struct *mm, unsigned long addr,
|
||||
pte_t *ptep, unsigned long clr,
|
||||
unsigned long set, int huge)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ static int text_area_cpu_up(unsigned int cpu)
|
|||
{
|
||||
struct vm_struct *area;
|
||||
|
||||
area = get_vm_area(PAGE_SIZE, VM_ALLOC);
|
||||
area = get_vm_area(PAGE_SIZE, 0);
|
||||
if (!area) {
|
||||
WARN_ONCE(1, "Failed to create text area for cpu %d\n",
|
||||
cpu);
|
||||
|
|
|
|||
|
|
@ -189,8 +189,10 @@ static int spufs_fill_dir(struct dentry *dir,
|
|||
return -ENOMEM;
|
||||
ret = spufs_new_file(dir->d_sb, dentry, files->ops,
|
||||
files->mode & mode, files->size, ctx);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
dput(dentry);
|
||||
return ret;
|
||||
}
|
||||
files++;
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -438,8 +440,11 @@ spufs_create_context(struct inode *inode, struct dentry *dentry,
|
|||
}
|
||||
|
||||
ret = spufs_mkdir(inode, dentry, flags, mode & 0777);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
if (neighbor)
|
||||
put_spu_context(neighbor);
|
||||
goto out_aff_unlock;
|
||||
}
|
||||
|
||||
if (affinity) {
|
||||
spufs_set_affinity(flags, SPUFS_I(d_inode(dentry))->i_ctx,
|
||||
|
|
|
|||
|
|
@ -472,8 +472,10 @@ static int pseries_eeh_get_state(struct eeh_pe *pe, int *delay)
|
|||
|
||||
switch(rets[0]) {
|
||||
case 0:
|
||||
result = EEH_STATE_MMIO_ACTIVE |
|
||||
EEH_STATE_DMA_ACTIVE;
|
||||
result = EEH_STATE_MMIO_ACTIVE |
|
||||
EEH_STATE_DMA_ACTIVE |
|
||||
EEH_STATE_MMIO_ENABLED |
|
||||
EEH_STATE_DMA_ENABLED;
|
||||
break;
|
||||
case 1:
|
||||
result = EEH_STATE_RESET_ACTIVE |
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval,
|
|||
break;
|
||||
case FUTEX_OP_ANDN:
|
||||
__futex_atomic_op("lr %2,%1\nnr %2,%5\n",
|
||||
ret, oldval, newval, uaddr, oparg);
|
||||
ret, oldval, newval, uaddr, ~oparg);
|
||||
break;
|
||||
case FUTEX_OP_XOR:
|
||||
__futex_atomic_op("lr %2,%1\nxr %2,%5\n",
|
||||
|
|
|
|||
|
|
@ -1228,8 +1228,14 @@ static struct vsie_page *get_vsie_page(struct kvm *kvm, unsigned long addr)
|
|||
page = radix_tree_lookup(&kvm->arch.vsie.addr_to_page, addr >> 9);
|
||||
rcu_read_unlock();
|
||||
if (page) {
|
||||
if (page_ref_inc_return(page) == 2)
|
||||
return page_to_virt(page);
|
||||
if (page_ref_inc_return(page) == 2) {
|
||||
if (page->index == addr)
|
||||
return page_to_virt(page);
|
||||
/*
|
||||
* We raced with someone reusing + putting this vsie
|
||||
* page before we grabbed it.
|
||||
*/
|
||||
}
|
||||
page_ref_dec(page);
|
||||
}
|
||||
|
||||
|
|
@ -1259,15 +1265,20 @@ static struct vsie_page *get_vsie_page(struct kvm *kvm, unsigned long addr)
|
|||
kvm->arch.vsie.next++;
|
||||
kvm->arch.vsie.next %= nr_vcpus;
|
||||
}
|
||||
radix_tree_delete(&kvm->arch.vsie.addr_to_page, page->index >> 9);
|
||||
if (page->index != ULONG_MAX)
|
||||
radix_tree_delete(&kvm->arch.vsie.addr_to_page,
|
||||
page->index >> 9);
|
||||
}
|
||||
page->index = addr;
|
||||
/* double use of the same address */
|
||||
/* Mark it as invalid until it resides in the tree. */
|
||||
page->index = ULONG_MAX;
|
||||
|
||||
/* Double use of the same address or allocation failure. */
|
||||
if (radix_tree_insert(&kvm->arch.vsie.addr_to_page, addr >> 9, page)) {
|
||||
page_ref_dec(page);
|
||||
mutex_unlock(&kvm->arch.vsie.mutex);
|
||||
return NULL;
|
||||
}
|
||||
page->index = addr;
|
||||
mutex_unlock(&kvm->arch.vsie.mutex);
|
||||
|
||||
vsie_page = page_to_virt(page);
|
||||
|
|
@ -1360,7 +1371,9 @@ void kvm_s390_vsie_destroy(struct kvm *kvm)
|
|||
vsie_page = page_to_virt(page);
|
||||
release_gmap_shadow(vsie_page);
|
||||
/* free the radix tree entry */
|
||||
radix_tree_delete(&kvm->arch.vsie.addr_to_page, page->index >> 9);
|
||||
if (page->index != ULONG_MAX)
|
||||
radix_tree_delete(&kvm->arch.vsie.addr_to_page,
|
||||
page->index >> 9);
|
||||
__free_page(page);
|
||||
}
|
||||
kvm->arch.vsie.page_count = 0;
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ config X86
|
|||
select HAVE_DYNAMIC_FTRACE_WITH_REGS
|
||||
select HAVE_EBPF_JIT
|
||||
select HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
select HAVE_EISA
|
||||
select HAVE_EISA if X86_32
|
||||
select HAVE_EXIT_THREAD
|
||||
select HAVE_FAST_GUP
|
||||
select HAVE_FENTRY if X86_64 || DYNAMIC_FTRACE
|
||||
|
|
|
|||
|
|
@ -104,6 +104,8 @@ For 32-bit we have the following conventions - kernel is built with
|
|||
pushq %rsi /* pt_regs->si */
|
||||
movq 8(%rsp), %rsi /* temporarily store the return address in %rsi */
|
||||
movq %rdi, 8(%rsp) /* pt_regs->di (overwriting original return address) */
|
||||
/* We just clobbered the return address - use the IRET frame for unwinding: */
|
||||
UNWIND_HINT_IRET_REGS offset=3*8
|
||||
.else
|
||||
pushq %rdi /* pt_regs->di */
|
||||
pushq %rsi /* pt_regs->si */
|
||||
|
|
|
|||
|
|
@ -572,7 +572,7 @@ struct flush_tlb_info {
|
|||
flush_tlb_mm_range((vma)->vm_mm, start, end, \
|
||||
((vma)->vm_flags & VM_HUGETLB) \
|
||||
? huge_page_shift(hstate_vma(vma)) \
|
||||
: PAGE_SHIFT, false)
|
||||
: PAGE_SHIFT, true)
|
||||
|
||||
extern void flush_tlb_all(void);
|
||||
extern void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
|
||||
|
|
|
|||
|
|
@ -538,6 +538,10 @@ static __init void fix_erratum_688(void)
|
|||
|
||||
static __init int init_amd_nbs(void)
|
||||
{
|
||||
if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD &&
|
||||
boot_cpu_data.x86_vendor != X86_VENDOR_HYGON)
|
||||
return 0;
|
||||
|
||||
amd_cache_northbridges();
|
||||
amd_cache_gart();
|
||||
|
||||
|
|
|
|||
|
|
@ -795,7 +795,7 @@ void init_intel_cacheinfo(struct cpuinfo_x86 *c)
|
|||
cpuid(2, ®s[0], ®s[1], ®s[2], ®s[3]);
|
||||
|
||||
/* If bit 31 is set, this is an unknown format */
|
||||
for (j = 0 ; j < 3 ; j++)
|
||||
for (j = 0 ; j < 4 ; j++)
|
||||
if (regs[j] & (1 << 31))
|
||||
regs[j] = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -152,8 +152,8 @@ static void geode_configure(void)
|
|||
u8 ccr3;
|
||||
local_irq_save(flags);
|
||||
|
||||
/* Suspend on halt power saving and enable #SUSP pin */
|
||||
setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);
|
||||
/* Suspend on halt power saving */
|
||||
setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x08);
|
||||
|
||||
ccr3 = getCx86(CX86_CCR3);
|
||||
setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */
|
||||
|
|
|
|||
|
|
@ -795,26 +795,37 @@ static unsigned int intel_size_cache(struct cpuinfo_x86 *c, unsigned int size)
|
|||
}
|
||||
#endif
|
||||
|
||||
#define TLB_INST_4K 0x01
|
||||
#define TLB_INST_4M 0x02
|
||||
#define TLB_INST_2M_4M 0x03
|
||||
#define TLB_INST_4K 0x01
|
||||
#define TLB_INST_4M 0x02
|
||||
#define TLB_INST_2M_4M 0x03
|
||||
|
||||
#define TLB_INST_ALL 0x05
|
||||
#define TLB_INST_1G 0x06
|
||||
#define TLB_INST_ALL 0x05
|
||||
#define TLB_INST_1G 0x06
|
||||
|
||||
#define TLB_DATA_4K 0x11
|
||||
#define TLB_DATA_4M 0x12
|
||||
#define TLB_DATA_2M_4M 0x13
|
||||
#define TLB_DATA_4K_4M 0x14
|
||||
#define TLB_DATA_4K 0x11
|
||||
#define TLB_DATA_4M 0x12
|
||||
#define TLB_DATA_2M_4M 0x13
|
||||
#define TLB_DATA_4K_4M 0x14
|
||||
|
||||
#define TLB_DATA_1G 0x16
|
||||
#define TLB_DATA_1G 0x16
|
||||
#define TLB_DATA_1G_2M_4M 0x17
|
||||
|
||||
#define TLB_DATA0_4K 0x21
|
||||
#define TLB_DATA0_4M 0x22
|
||||
#define TLB_DATA0_2M_4M 0x23
|
||||
#define TLB_DATA0_4K 0x21
|
||||
#define TLB_DATA0_4M 0x22
|
||||
#define TLB_DATA0_2M_4M 0x23
|
||||
|
||||
#define STLB_4K 0x41
|
||||
#define STLB_4K_2M 0x42
|
||||
#define STLB_4K 0x41
|
||||
#define STLB_4K_2M 0x42
|
||||
|
||||
/*
|
||||
* All of leaf 0x2's one-byte TLB descriptors implies the same number of
|
||||
* entries for their respective TLB types. The 0x63 descriptor is an
|
||||
* exception: it implies 4 dTLB entries for 1GB pages 32 dTLB entries
|
||||
* for 2MB or 4MB pages. Encode descriptor 0x63 dTLB entry count for
|
||||
* 2MB/4MB pages here, as its count for dTLB 1GB pages is already at the
|
||||
* intel_tlb_table[] mapping.
|
||||
*/
|
||||
#define TLB_0x63_2M_4M_ENTRIES 32
|
||||
|
||||
static const struct _tlb_table intel_tlb_table[] = {
|
||||
{ 0x01, TLB_INST_4K, 32, " TLB_INST 4 KByte pages, 4-way set associative" },
|
||||
|
|
@ -836,7 +847,8 @@ static const struct _tlb_table intel_tlb_table[] = {
|
|||
{ 0x5c, TLB_DATA_4K_4M, 128, " TLB_DATA 4 KByte and 4 MByte pages" },
|
||||
{ 0x5d, TLB_DATA_4K_4M, 256, " TLB_DATA 4 KByte and 4 MByte pages" },
|
||||
{ 0x61, TLB_INST_4K, 48, " TLB_INST 4 KByte pages, full associative" },
|
||||
{ 0x63, TLB_DATA_1G, 4, " TLB_DATA 1 GByte pages, 4-way set associative" },
|
||||
{ 0x63, TLB_DATA_1G_2M_4M, 4, " TLB_DATA 1 GByte pages, 4-way set associative"
|
||||
" (plus 32 entries TLB_DATA 2 MByte or 4 MByte pages, not encoded here)" },
|
||||
{ 0x6b, TLB_DATA_4K, 256, " TLB_DATA 4 KByte pages, 8-way associative" },
|
||||
{ 0x6c, TLB_DATA_2M_4M, 128, " TLB_DATA 2 MByte or 4 MByte pages, 8-way associative" },
|
||||
{ 0x6d, TLB_DATA_1G, 16, " TLB_DATA 1 GByte pages, fully associative" },
|
||||
|
|
@ -936,6 +948,12 @@ static void intel_tlb_lookup(const unsigned char desc)
|
|||
if (tlb_lld_4m[ENTRIES] < intel_tlb_table[k].entries)
|
||||
tlb_lld_4m[ENTRIES] = intel_tlb_table[k].entries;
|
||||
break;
|
||||
case TLB_DATA_1G_2M_4M:
|
||||
if (tlb_lld_2m[ENTRIES] < TLB_0x63_2M_4M_ENTRIES)
|
||||
tlb_lld_2m[ENTRIES] = TLB_0x63_2M_4M_ENTRIES;
|
||||
if (tlb_lld_4m[ENTRIES] < TLB_0x63_2M_4M_ENTRIES)
|
||||
tlb_lld_4m[ENTRIES] = TLB_0x63_2M_4M_ENTRIES;
|
||||
fallthrough;
|
||||
case TLB_DATA_1G:
|
||||
if (tlb_lld_1g[ENTRIES] < intel_tlb_table[k].entries)
|
||||
tlb_lld_1g[ENTRIES] = intel_tlb_table[k].entries;
|
||||
|
|
@ -959,7 +977,7 @@ static void intel_detect_tlb(struct cpuinfo_x86 *c)
|
|||
cpuid(2, ®s[0], ®s[1], ®s[2], ®s[3]);
|
||||
|
||||
/* If bit 31 is set, this is an unknown format */
|
||||
for (j = 0 ; j < 3 ; j++)
|
||||
for (j = 0 ; j < 4 ; j++)
|
||||
if (regs[j] & (1 << 31))
|
||||
regs[j] = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -862,7 +862,7 @@ static enum ucode_state load_microcode_amd(u8 family, const u8 *data, size_t siz
|
|||
return ret;
|
||||
}
|
||||
|
||||
for_each_node(nid) {
|
||||
for_each_node_with_cpus(nid) {
|
||||
cpu = cpumask_first(cpumask_of_node(nid));
|
||||
c = &cpu_data(cpu);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/kexec.h>
|
||||
#include <linux/i8253.h>
|
||||
#include <linux/random.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/hypervisor.h>
|
||||
|
|
@ -310,16 +309,6 @@ static void __init ms_hyperv_init_platform(void)
|
|||
if (efi_enabled(EFI_BOOT))
|
||||
x86_platform.get_nmi_reason = hv_get_nmi_reason;
|
||||
|
||||
/*
|
||||
* Hyper-V VMs have a PIT emulation quirk such that zeroing the
|
||||
* counter register during PIT shutdown restarts the PIT. So it
|
||||
* continues to interrupt @18.2 HZ. Setting i8253_clear_counter
|
||||
* to false tells pit_shutdown() not to zero the counter so that
|
||||
* the PIT really is shutdown. Generation 2 VMs don't have a PIT,
|
||||
* and setting this value has no effect.
|
||||
*/
|
||||
i8253_clear_counter_on_shutdown = false;
|
||||
|
||||
#if IS_ENABLED(CONFIG_HYPERV)
|
||||
/*
|
||||
* Setup the hook to get control post apic initialization.
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@ void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
|
|||
printk("%sCall Trace:\n", log_lvl);
|
||||
|
||||
unwind_start(&state, task, regs, stack);
|
||||
stack = stack ?: get_stack_pointer(task, regs);
|
||||
regs = unwind_get_entry_regs(&state, &partial);
|
||||
|
||||
/*
|
||||
|
|
@ -189,9 +190,7 @@ void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
|
|||
* - hardirq stack
|
||||
* - entry stack
|
||||
*/
|
||||
for (stack = stack ?: get_stack_pointer(task, regs);
|
||||
stack;
|
||||
stack = stack_info.next_sp) {
|
||||
for (; stack; stack = stack_info.next_sp) {
|
||||
const char *stack_name;
|
||||
|
||||
stack = PTR_ALIGN(stack, sizeof(long));
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#include <linux/timex.h>
|
||||
#include <linux/i8253.h>
|
||||
|
||||
#include <asm/hypervisor.h>
|
||||
#include <asm/apic.h>
|
||||
#include <asm/hpet.h>
|
||||
#include <asm/time.h>
|
||||
|
|
@ -39,9 +40,15 @@ static bool __init use_pit(void)
|
|||
|
||||
bool __init pit_timer_init(void)
|
||||
{
|
||||
if (!use_pit())
|
||||
if (!use_pit()) {
|
||||
/*
|
||||
* Don't just ignore the PIT. Ensure it's stopped, because
|
||||
* VMMs otherwise steal CPU time just to pointlessly waggle
|
||||
* the (masked) IRQ.
|
||||
*/
|
||||
clockevent_i8253_disable();
|
||||
return false;
|
||||
|
||||
}
|
||||
clockevent_i8253_init(true);
|
||||
global_clock_event = &i8253_clockevent;
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -20,8 +20,10 @@
|
|||
#include <asm/hw_irq.h>
|
||||
#include <asm/desc.h>
|
||||
|
||||
#if defined(CONFIG_X86_LOCAL_APIC) || defined(CONFIG_X86_THERMAL_VECTOR)
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <asm/trace/irq_vectors.h>
|
||||
#endif
|
||||
|
||||
DEFINE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
|
||||
EXPORT_PER_CPU_SYMBOL(irq_stat);
|
||||
|
|
|
|||
|
|
@ -96,7 +96,12 @@ EXPORT_PER_CPU_SYMBOL_GPL(__tss_limit_invalid);
|
|||
*/
|
||||
int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
|
||||
{
|
||||
memcpy(dst, src, arch_task_struct_size);
|
||||
/* init_task is not dynamically sized (incomplete FPU state) */
|
||||
if (unlikely(src == &init_task))
|
||||
memcpy_and_pad(dst, arch_task_struct_size, src, sizeof(init_task), 0);
|
||||
else
|
||||
memcpy(dst, src, arch_task_struct_size);
|
||||
|
||||
#ifdef CONFIG_VM86
|
||||
dst->thread.vm86 = NULL;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -912,7 +912,7 @@ static unsigned long long cyc2ns_suspend;
|
|||
|
||||
void tsc_save_sched_clock_state(void)
|
||||
{
|
||||
if (!sched_clock_stable())
|
||||
if (!static_branch_likely(&__use_tsc) && !sched_clock_stable())
|
||||
return;
|
||||
|
||||
cyc2ns_suspend = sched_clock();
|
||||
|
|
@ -932,7 +932,7 @@ void tsc_restore_sched_clock_state(void)
|
|||
unsigned long flags;
|
||||
int cpu;
|
||||
|
||||
if (!sched_clock_stable())
|
||||
if (!static_branch_likely(&__use_tsc) && !sched_clock_stable())
|
||||
return;
|
||||
|
||||
local_irq_save(flags);
|
||||
|
|
|
|||
|
|
@ -211,33 +211,39 @@ static void __init probe_page_size_mask(void)
|
|||
}
|
||||
}
|
||||
|
||||
#define INTEL_MATCH(_model) { .vendor = X86_VENDOR_INTEL, \
|
||||
.family = 6, \
|
||||
.model = _model, \
|
||||
}
|
||||
#define INTEL_MATCH(_model, ucode) { .vendor = X86_VENDOR_INTEL, \
|
||||
.family = 6, \
|
||||
.model = _model, \
|
||||
.driver_data = ucode, \
|
||||
}
|
||||
/*
|
||||
* INVLPG may not properly flush Global entries
|
||||
* on these CPUs when PCIDs are enabled.
|
||||
* INVLPG may not properly flush Global entries on
|
||||
* these CPUs. New microcode fixes the issue.
|
||||
*/
|
||||
static const struct x86_cpu_id invlpg_miss_ids[] = {
|
||||
INTEL_MATCH(INTEL_FAM6_ALDERLAKE ),
|
||||
INTEL_MATCH(INTEL_FAM6_ALDERLAKE_L ),
|
||||
INTEL_MATCH(INTEL_FAM6_ALDERLAKE_N ),
|
||||
INTEL_MATCH(INTEL_FAM6_RAPTORLAKE ),
|
||||
INTEL_MATCH(INTEL_FAM6_RAPTORLAKE_P),
|
||||
INTEL_MATCH(INTEL_FAM6_RAPTORLAKE_S),
|
||||
INTEL_MATCH(INTEL_FAM6_ALDERLAKE, 0x2e),
|
||||
INTEL_MATCH(INTEL_FAM6_ALDERLAKE_L, 0x42c),
|
||||
INTEL_MATCH(INTEL_FAM6_ALDERLAKE_N, 0x11),
|
||||
INTEL_MATCH(INTEL_FAM6_RAPTORLAKE, 0x118),
|
||||
INTEL_MATCH(INTEL_FAM6_RAPTORLAKE_P, 0x4117),
|
||||
INTEL_MATCH(INTEL_FAM6_RAPTORLAKE_S, 0x2e),
|
||||
{}
|
||||
};
|
||||
|
||||
static void setup_pcid(void)
|
||||
{
|
||||
const struct x86_cpu_id *invlpg_miss_match;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_X86_64))
|
||||
return;
|
||||
|
||||
if (!boot_cpu_has(X86_FEATURE_PCID))
|
||||
return;
|
||||
|
||||
if (x86_match_cpu(invlpg_miss_ids)) {
|
||||
invlpg_miss_match = x86_match_cpu(invlpg_miss_ids);
|
||||
|
||||
if (invlpg_miss_match &&
|
||||
boot_cpu_data.microcode < invlpg_miss_match->driver_data) {
|
||||
pr_info("Incomplete global flushes, disabling PCID");
|
||||
setup_clear_cpu_cap(X86_FEATURE_PCID);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ static int pageattr_test(void)
|
|||
break;
|
||||
|
||||
case 1:
|
||||
err = change_page_attr_set(addrs, len[1], PAGE_CPA_TEST, 1);
|
||||
err = change_page_attr_set(addrs, len[i], PAGE_CPA_TEST, 1);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
|
|
|||
|
|
@ -106,6 +106,51 @@ static pud_t level3_user_vsyscall[PTRS_PER_PUD] __page_aligned_bss;
|
|||
*/
|
||||
static DEFINE_SPINLOCK(xen_reservation_lock);
|
||||
|
||||
/* Protected by xen_reservation_lock. */
|
||||
#define MIN_CONTIG_ORDER 9 /* 2MB */
|
||||
static unsigned int discontig_frames_order = MIN_CONTIG_ORDER;
|
||||
static unsigned long discontig_frames_early[1UL << MIN_CONTIG_ORDER] __initdata;
|
||||
static unsigned long *discontig_frames __refdata = discontig_frames_early;
|
||||
static bool discontig_frames_dyn;
|
||||
|
||||
static int alloc_discontig_frames(unsigned int order)
|
||||
{
|
||||
unsigned long *new_array, *old_array;
|
||||
unsigned int old_order;
|
||||
unsigned long flags;
|
||||
|
||||
BUG_ON(order < MIN_CONTIG_ORDER);
|
||||
BUILD_BUG_ON(sizeof(discontig_frames_early) != PAGE_SIZE);
|
||||
|
||||
new_array = (unsigned long *)__get_free_pages(GFP_KERNEL,
|
||||
order - MIN_CONTIG_ORDER);
|
||||
if (!new_array)
|
||||
return -ENOMEM;
|
||||
|
||||
spin_lock_irqsave(&xen_reservation_lock, flags);
|
||||
|
||||
old_order = discontig_frames_order;
|
||||
|
||||
if (order > discontig_frames_order || !discontig_frames_dyn) {
|
||||
if (!discontig_frames_dyn)
|
||||
old_array = NULL;
|
||||
else
|
||||
old_array = discontig_frames;
|
||||
|
||||
discontig_frames = new_array;
|
||||
discontig_frames_order = order;
|
||||
discontig_frames_dyn = true;
|
||||
} else {
|
||||
old_array = new_array;
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&xen_reservation_lock, flags);
|
||||
|
||||
free_pages((unsigned long)old_array, old_order - MIN_CONTIG_ORDER);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Note about cr3 (pagetable base) values:
|
||||
*
|
||||
|
|
@ -842,6 +887,7 @@ void xen_mm_pin_all(void)
|
|||
{
|
||||
struct page *page;
|
||||
|
||||
spin_lock(&init_mm.page_table_lock);
|
||||
spin_lock(&pgd_lock);
|
||||
|
||||
list_for_each_entry(page, &pgd_list, lru) {
|
||||
|
|
@ -852,6 +898,7 @@ void xen_mm_pin_all(void)
|
|||
}
|
||||
|
||||
spin_unlock(&pgd_lock);
|
||||
spin_unlock(&init_mm.page_table_lock);
|
||||
}
|
||||
|
||||
static int __init xen_mark_pinned(struct mm_struct *mm, struct page *page,
|
||||
|
|
@ -874,6 +921,9 @@ static void __init xen_after_bootmem(void)
|
|||
SetPagePinned(virt_to_page(level3_user_vsyscall));
|
||||
#endif
|
||||
xen_pgd_walk(&init_mm, xen_mark_pinned, FIXADDR_TOP);
|
||||
|
||||
if (alloc_discontig_frames(MIN_CONTIG_ORDER))
|
||||
BUG();
|
||||
}
|
||||
|
||||
static int xen_unpin_page(struct mm_struct *mm, struct page *page,
|
||||
|
|
@ -961,6 +1011,7 @@ void xen_mm_unpin_all(void)
|
|||
{
|
||||
struct page *page;
|
||||
|
||||
spin_lock(&init_mm.page_table_lock);
|
||||
spin_lock(&pgd_lock);
|
||||
|
||||
list_for_each_entry(page, &pgd_list, lru) {
|
||||
|
|
@ -972,6 +1023,7 @@ void xen_mm_unpin_all(void)
|
|||
}
|
||||
|
||||
spin_unlock(&pgd_lock);
|
||||
spin_unlock(&init_mm.page_table_lock);
|
||||
}
|
||||
|
||||
static void xen_activate_mm(struct mm_struct *prev, struct mm_struct *next)
|
||||
|
|
@ -2467,10 +2519,6 @@ void __init xen_init_mmu_ops(void)
|
|||
memset(dummy_mapping, 0xff, PAGE_SIZE);
|
||||
}
|
||||
|
||||
/* Protected by xen_reservation_lock. */
|
||||
#define MAX_CONTIG_ORDER 9 /* 2MB */
|
||||
static unsigned long discontig_frames[1<<MAX_CONTIG_ORDER];
|
||||
|
||||
#define VOID_PTE (mfn_pte(0, __pgprot(0)))
|
||||
static void xen_zap_pfn_range(unsigned long vaddr, unsigned int order,
|
||||
unsigned long *in_frames,
|
||||
|
|
@ -2587,24 +2635,25 @@ int xen_create_contiguous_region(phys_addr_t pstart, unsigned int order,
|
|||
unsigned int address_bits,
|
||||
dma_addr_t *dma_handle)
|
||||
{
|
||||
unsigned long *in_frames = discontig_frames, out_frame;
|
||||
unsigned long *in_frames, out_frame;
|
||||
unsigned long flags;
|
||||
int success;
|
||||
unsigned long vstart = (unsigned long)phys_to_virt(pstart);
|
||||
|
||||
/*
|
||||
* Currently an auto-translated guest will not perform I/O, nor will
|
||||
* it require PAE page directories below 4GB. Therefore any calls to
|
||||
* this function are redundant and can be ignored.
|
||||
*/
|
||||
if (unlikely(order > discontig_frames_order)) {
|
||||
if (!discontig_frames_dyn)
|
||||
return -ENOMEM;
|
||||
|
||||
if (unlikely(order > MAX_CONTIG_ORDER))
|
||||
return -ENOMEM;
|
||||
if (alloc_discontig_frames(order))
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memset((void *) vstart, 0, PAGE_SIZE << order);
|
||||
|
||||
spin_lock_irqsave(&xen_reservation_lock, flags);
|
||||
|
||||
in_frames = discontig_frames;
|
||||
|
||||
/* 1. Zap current PTEs, remembering MFNs. */
|
||||
xen_zap_pfn_range(vstart, order, in_frames, NULL);
|
||||
|
||||
|
|
@ -2628,12 +2677,12 @@ int xen_create_contiguous_region(phys_addr_t pstart, unsigned int order,
|
|||
|
||||
void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order)
|
||||
{
|
||||
unsigned long *out_frames = discontig_frames, in_frame;
|
||||
unsigned long *out_frames, in_frame;
|
||||
unsigned long flags;
|
||||
int success;
|
||||
unsigned long vstart;
|
||||
|
||||
if (unlikely(order > MAX_CONTIG_ORDER))
|
||||
if (unlikely(order > discontig_frames_order))
|
||||
return;
|
||||
|
||||
vstart = (unsigned long)phys_to_virt(pstart);
|
||||
|
|
@ -2641,6 +2690,8 @@ void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order)
|
|||
|
||||
spin_lock_irqsave(&xen_reservation_lock, flags);
|
||||
|
||||
out_frames = discontig_frames;
|
||||
|
||||
/* 1. Find start MFN of contiguous extent. */
|
||||
in_frame = virt_to_mfn(vstart);
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ struct bio_slab {
|
|||
struct kmem_cache *slab;
|
||||
unsigned int slab_ref;
|
||||
unsigned int slab_size;
|
||||
char name[8];
|
||||
char name[12];
|
||||
};
|
||||
static DEFINE_MUTEX(bio_slab_lock);
|
||||
static struct bio_slab *bio_slabs;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/**
|
||||
/*
|
||||
* ldm - Part of the Linux-NTFS project.
|
||||
*
|
||||
* Copyright (C) 2001,2002 Richard Russon <ldm@flatcap.org>
|
||||
|
|
|
|||
|
|
@ -51,13 +51,25 @@ int mac_partition(struct parsed_partitions *state)
|
|||
}
|
||||
secsize = be16_to_cpu(md->block_size);
|
||||
put_dev_sector(sect);
|
||||
|
||||
/*
|
||||
* If the "block size" is not a power of 2, things get weird - we might
|
||||
* end up with a partition straddling a sector boundary, so we wouldn't
|
||||
* be able to read a partition entry with read_part_sector().
|
||||
* Real block sizes are probably (?) powers of two, so just require
|
||||
* that.
|
||||
*/
|
||||
if (!is_power_of_2(secsize))
|
||||
return -1;
|
||||
datasize = round_down(secsize, 512);
|
||||
data = read_part_sector(state, datasize / 512, §);
|
||||
if (!data)
|
||||
return -1;
|
||||
partoffset = secsize % 512;
|
||||
if (partoffset + sizeof(*part) > datasize)
|
||||
if (partoffset + sizeof(*part) > datasize) {
|
||||
put_dev_sector(sect);
|
||||
return -1;
|
||||
}
|
||||
part = (struct mac_partition *) (data + partoffset);
|
||||
if (be16_to_cpu(part->signature) != MAC_PARTITION_MAGIC) {
|
||||
put_dev_sector(sect);
|
||||
|
|
@ -110,8 +122,8 @@ int mac_partition(struct parsed_partitions *state)
|
|||
int i, l;
|
||||
|
||||
goodness++;
|
||||
l = strlen(part->name);
|
||||
if (strcmp(part->name, "/") == 0)
|
||||
l = strnlen(part->name, sizeof(part->name));
|
||||
if (strncmp(part->name, "/", sizeof(part->name)) == 0)
|
||||
goodness++;
|
||||
for (i = 0; i <= l - 4; ++i) {
|
||||
if (strncasecmp(part->name + i, "root",
|
||||
|
|
|
|||
227
crypto/testmgr.h
227
crypto/testmgr.h
|
|
@ -177,8 +177,8 @@ static const struct akcipher_testvec rsa_tv_template[] = {
|
|||
{
|
||||
#ifndef CONFIG_CRYPTO_FIPS
|
||||
.key =
|
||||
"\x30\x81\x9A" /* sequence of 154 bytes */
|
||||
"\x02\x01\x01" /* version - integer of 1 byte */
|
||||
"\x30\x82\x01\x38" /* sequence of 312 bytes */
|
||||
"\x02\x01\x00" /* version - integer of 1 byte */
|
||||
"\x02\x41" /* modulus - integer of 65 bytes */
|
||||
"\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x3C\x7F\xC4\x52\x3F"
|
||||
"\x90\xEF\xA0\x0D\xF3\x77\x4A\x25\x9F\x2E\x62\xB4\xC5\xD9\x9C\xB5"
|
||||
|
|
@ -191,24 +191,37 @@ static const struct akcipher_testvec rsa_tv_template[] = {
|
|||
"\xC2\xCD\x2D\xFF\x43\x40\x98\xCD\x20\xD8\xA1\x38\xD0\x90\xBF\x64"
|
||||
"\x79\x7C\x3F\xA7\xA2\xCD\xCB\x3C\xD1\xE0\xBD\xBA\x26\x54\xB4\xF9"
|
||||
"\xDF\x8E\x8A\xE5\x9D\x73\x3D\x9F\x33\xB3\x01\x62\x4A\xFD\x1D\x51"
|
||||
"\x02\x01\x00" /* prime1 - integer of 1 byte */
|
||||
"\x02\x01\x00" /* prime2 - integer of 1 byte */
|
||||
"\x02\x01\x00" /* exponent1 - integer of 1 byte */
|
||||
"\x02\x01\x00" /* exponent2 - integer of 1 byte */
|
||||
"\x02\x01\x00", /* coefficient - integer of 1 byte */
|
||||
"\x02\x21" /* prime1 - integer of 33 bytes */
|
||||
"\x00\xD8\x40\xB4\x16\x66\xB4\x2E\x92\xEA\x0D\xA3\xB4\x32\x04\xB5"
|
||||
"\xCF\xCE\x33\x52\x52\x4D\x04\x16\xA5\xA4\x41\xE7\x00\xAF\x46\x12"
|
||||
"\x0D"
|
||||
"\x02\x21" /* prime2 - integer of 33 bytes */
|
||||
"\x00\xC9\x7F\xB1\xF0\x27\xF4\x53\xF6\x34\x12\x33\xEA\xAA\xD1\xD9"
|
||||
"\x35\x3F\x6C\x42\xD0\x88\x66\xB1\xD0\x5A\x0F\x20\x35\x02\x8B\x9D"
|
||||
"\x89"
|
||||
"\x02\x20" /* exponent1 - integer of 32 bytes */
|
||||
"\x59\x0B\x95\x72\xA2\xC2\xA9\xC4\x06\x05\x9D\xC2\xAB\x2F\x1D\xAF"
|
||||
"\xEB\x7E\x8B\x4F\x10\xA7\x54\x9E\x8E\xED\xF5\xB4\xFC\xE0\x9E\x05"
|
||||
"\x02\x21" /* exponent2 - integer of 33 bytes */
|
||||
"\x00\x8E\x3C\x05\x21\xFE\x15\xE0\xEA\x06\xA3\x6F\xF0\xF1\x0C\x99"
|
||||
"\x52\xC3\x5B\x7A\x75\x14\xFD\x32\x38\xB8\x0A\xAD\x52\x98\x62\x8D"
|
||||
"\x51"
|
||||
"\x02\x20" /* coefficient - integer of 32 bytes */
|
||||
"\x36\x3F\xF7\x18\x9D\xA8\xE9\x0B\x1D\x34\x1F\x71\xD0\x9B\x76\xA8"
|
||||
"\xA9\x43\xE1\x1D\x10\xB2\x4D\x24\x9F\x2D\xEA\xFE\xF8\x0C\x18\x26",
|
||||
.m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
|
||||
.c =
|
||||
"\x63\x1c\xcd\x7b\xe1\x7e\xe4\xde\xc9\xa8\x89\xa1\x74\xcb\x3c\x63"
|
||||
"\x7d\x24\xec\x83\xc3\x15\xe4\x7f\x73\x05\x34\xd1\xec\x22\xbb\x8a"
|
||||
"\x5e\x32\x39\x6d\xc1\x1d\x7d\x50\x3b\x9f\x7a\xad\xf0\x2e\x25\x53"
|
||||
"\x9f\x6e\xbd\x4c\x55\x84\x0c\x9b\xcf\x1a\x4b\x51\x1e\x9e\x0c\x06",
|
||||
.key_len = 157,
|
||||
.key_len = 316,
|
||||
.m_size = 8,
|
||||
.c_size = 64,
|
||||
}, {
|
||||
.key =
|
||||
"\x30\x82\x01\x1D" /* sequence of 285 bytes */
|
||||
"\x02\x01\x01" /* version - integer of 1 byte */
|
||||
"\x30\x82\x02\x5B" /* sequence of 603 bytes */
|
||||
"\x02\x01\x00" /* version - integer of 1 byte */
|
||||
"\x02\x81\x81" /* modulus - integer of 129 bytes */
|
||||
"\x00\xBB\xF8\x2F\x09\x06\x82\xCE\x9C\x23\x38\xAC\x2B\x9D\xA8\x71"
|
||||
"\xF7\x36\x8D\x07\xEE\xD4\x10\x43\xA4\x40\xD6\xB6\xF0\x74\x54\xF5"
|
||||
|
|
@ -230,12 +243,35 @@ static const struct akcipher_testvec rsa_tv_template[] = {
|
|||
"\x93\x99\x26\xED\x4F\x74\xA1\x3E\xDD\xFB\xE1\xA1\xCE\xCC\x48\x94"
|
||||
"\xAF\x94\x28\xC2\xB7\xB8\x88\x3F\xE4\x46\x3A\x4B\xC8\x5B\x1C\xB3"
|
||||
"\xC1"
|
||||
"\x02\x01\x00" /* prime1 - integer of 1 byte */
|
||||
"\x02\x01\x00" /* prime2 - integer of 1 byte */
|
||||
"\x02\x01\x00" /* exponent1 - integer of 1 byte */
|
||||
"\x02\x01\x00" /* exponent2 - integer of 1 byte */
|
||||
"\x02\x01\x00", /* coefficient - integer of 1 byte */
|
||||
.key_len = 289,
|
||||
"\x02\x41" /* prime1 - integer of 65 bytes */
|
||||
"\x00\xEE\xCF\xAE\x81\xB1\xB9\xB3\xC9\x08\x81\x0B\x10\xA1\xB5\x60"
|
||||
"\x01\x99\xEB\x9F\x44\xAE\xF4\xFD\xA4\x93\xB8\x1A\x9E\x3D\x84\xF6"
|
||||
"\x32\x12\x4E\xF0\x23\x6E\x5D\x1E\x3B\x7E\x28\xFA\xE7\xAA\x04\x0A"
|
||||
"\x2D\x5B\x25\x21\x76\x45\x9D\x1F\x39\x75\x41\xBA\x2A\x58\xFB\x65"
|
||||
"\x99"
|
||||
"\x02\x41" /* prime2 - integer of 65 bytes */
|
||||
"\x00\xC9\x7F\xB1\xF0\x27\xF4\x53\xF6\x34\x12\x33\xEA\xAA\xD1\xD9"
|
||||
"\x35\x3F\x6C\x42\xD0\x88\x66\xB1\xD0\x5A\x0F\x20\x35\x02\x8B\x9D"
|
||||
"\x86\x98\x40\xB4\x16\x66\xB4\x2E\x92\xEA\x0D\xA3\xB4\x32\x04\xB5"
|
||||
"\xCF\xCE\x33\x52\x52\x4D\x04\x16\xA5\xA4\x41\xE7\x00\xAF\x46\x15"
|
||||
"\x03"
|
||||
"\x02\x40" /* exponent1 - integer of 64 bytes */
|
||||
"\x54\x49\x4C\xA6\x3E\xBA\x03\x37\xE4\xE2\x40\x23\xFC\xD6\x9A\x5A"
|
||||
"\xEB\x07\xDD\xDC\x01\x83\xA4\xD0\xAC\x9B\x54\xB0\x51\xF2\xB1\x3E"
|
||||
"\xD9\x49\x09\x75\xEA\xB7\x74\x14\xFF\x59\xC1\xF7\x69\x2E\x9A\x2E"
|
||||
"\x20\x2B\x38\xFC\x91\x0A\x47\x41\x74\xAD\xC9\x3C\x1F\x67\xC9\x81"
|
||||
"\x02\x40" /* exponent2 - integer of 64 bytes */
|
||||
"\x47\x1E\x02\x90\xFF\x0A\xF0\x75\x03\x51\xB7\xF8\x78\x86\x4C\xA9"
|
||||
"\x61\xAD\xBD\x3A\x8A\x7E\x99\x1C\x5C\x05\x56\xA9\x4C\x31\x46\xA7"
|
||||
"\xF9\x80\x3F\x8F\x6F\x8A\xE3\x42\xE9\x31\xFD\x8A\xE4\x7A\x22\x0D"
|
||||
"\x1B\x99\xA4\x95\x84\x98\x07\xFE\x39\xF9\x24\x5A\x98\x36\xDA\x3D"
|
||||
"\x02\x41" /* coefficient - integer of 65 bytes */
|
||||
"\x00\xB0\x6C\x4F\xDA\xBB\x63\x01\x19\x8D\x26\x5B\xDB\xAE\x94\x23"
|
||||
"\xB3\x80\xF2\x71\xF7\x34\x53\x88\x50\x93\x07\x7F\xCD\x39\xE2\x11"
|
||||
"\x9F\xC9\x86\x32\x15\x4F\x58\x83\xB1\x67\xA9\x67\xBF\x40\x2B\x4E"
|
||||
"\x9E\x2E\x0F\x96\x56\xE6\x98\xEA\x36\x66\xED\xFB\x25\x79\x80\x39"
|
||||
"\xF7",
|
||||
.key_len = 607,
|
||||
.m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
|
||||
.c =
|
||||
"\x74\x1b\x55\xac\x47\xb5\x08\x0a\x6e\x2b\x2d\xf7\x94\xb8\x8a\x95"
|
||||
|
|
@ -251,9 +287,9 @@ static const struct akcipher_testvec rsa_tv_template[] = {
|
|||
}, {
|
||||
#endif
|
||||
.key =
|
||||
"\x30\x82\x02\x1F" /* sequence of 543 bytes */
|
||||
"\x02\x01\x01" /* version - integer of 1 byte */
|
||||
"\x02\x82\x01\x00" /* modulus - integer of 256 bytes */
|
||||
"\x30\x82\x04\xA3" /* sequence of 1187 bytes */
|
||||
"\x02\x01\x00" /* version - integer of 1 byte */
|
||||
"\x02\x82\x01\x01\x00" /* modulus - integer of 256 bytes */
|
||||
"\xDB\x10\x1A\xC2\xA3\xF1\xDC\xFF\x13\x6B\xED\x44\xDF\xF0\x02\x6D"
|
||||
"\x13\xC7\x88\xDA\x70\x6B\x54\xF1\xE8\x27\xDC\xC3\x0F\x99\x6A\xFA"
|
||||
"\xC6\x67\xFF\x1D\x1E\x3C\x1D\xC1\xB5\x5F\x6C\xC0\xB2\x07\x3A\x6D"
|
||||
|
|
@ -288,12 +324,55 @@ static const struct akcipher_testvec rsa_tv_template[] = {
|
|||
"\x62\xFF\xE9\x46\xB8\xD8\x44\xDB\xA5\xCC\x31\x54\x34\xCE\x3E\x82"
|
||||
"\xD6\xBF\x7A\x0B\x64\x21\x6D\x88\x7E\x5B\x45\x12\x1E\x63\x8D\x49"
|
||||
"\xA7\x1D\xD9\x1E\x06\xCD\xE8\xBA\x2C\x8C\x69\x32\xEA\xBE\x60\x71"
|
||||
"\x02\x01\x00" /* prime1 - integer of 1 byte */
|
||||
"\x02\x01\x00" /* prime2 - integer of 1 byte */
|
||||
"\x02\x01\x00" /* exponent1 - integer of 1 byte */
|
||||
"\x02\x01\x00" /* exponent2 - integer of 1 byte */
|
||||
"\x02\x01\x00", /* coefficient - integer of 1 byte */
|
||||
.key_len = 547,
|
||||
"\x02\x81\x81" /* prime1 - integer of 129 bytes */
|
||||
"\x00\xFA\xAC\xE1\x37\x5E\x32\x11\x34\xC6\x72\x58\x2D\x91\x06\x3E"
|
||||
"\x77\xE7\x11\x21\xCD\x4A\xF8\xA4\x3F\x0F\xEF\x31\xE3\xF3\x55\xA0"
|
||||
"\xB9\xAC\xB6\xCB\xBB\x41\xD0\x32\x81\x9A\x8F\x7A\x99\x30\x77\x6C"
|
||||
"\x68\x27\xE2\x96\xB5\x72\xC9\xC3\xD4\x42\xAA\xAA\xCA\x95\x8F\xFF"
|
||||
"\xC9\x9B\x52\x34\x30\x1D\xCF\xFE\xCF\x3C\x56\x68\x6E\xEF\xE7\x6C"
|
||||
"\xD7\xFB\x99\xF5\x4A\xA5\x21\x1F\x2B\xEA\x93\xE8\x98\x26\xC4\x6E"
|
||||
"\x42\x21\x5E\xA0\xA1\x2A\x58\x35\xBB\x10\xE7\xBA\x27\x0A\x3B\xB3"
|
||||
"\xAF\xE2\x75\x36\x04\xAC\x56\xA0\xAB\x52\xDE\xCE\xDD\x2C\x28\x77"
|
||||
"\x03"
|
||||
"\x02\x81\x81" /* prime2 - integer of 129 bytes */
|
||||
"\x00\xDF\xB7\x52\xB6\xD7\xC0\xE2\x96\xE7\xC9\xFE\x5D\x71\x5A\xC4"
|
||||
"\x40\x96\x2F\xE5\x87\xEA\xF3\xA5\x77\x11\x67\x3C\x8D\x56\x08\xA7"
|
||||
"\xB5\x67\xFA\x37\xA8\xB8\xCF\x61\xE8\x63\xD8\x38\x06\x21\x2B\x92"
|
||||
"\x09\xA6\x39\x3A\xEA\xA8\xB4\x45\x4B\x36\x10\x4C\xE4\x00\x66\x71"
|
||||
"\x65\xF8\x0B\x94\x59\x4F\x8C\xFD\xD5\x34\xA2\xE7\x62\x84\x0A\xA7"
|
||||
"\xBB\xDB\xD9\x8A\xCD\x05\xE1\xCC\x57\x7B\xF1\xF1\x1F\x11\x9D\xBA"
|
||||
"\x3E\x45\x18\x99\x1B\x41\x64\x43\xEE\x97\x5D\x77\x13\x5B\x74\x69"
|
||||
"\x73\x87\x95\x05\x07\xBE\x45\x07\x17\x7E\x4A\x69\x22\xF3\xDB\x05"
|
||||
"\x39"
|
||||
"\x02\x81\x80" /* exponent1 - integer of 128 bytes */
|
||||
"\x5E\xD8\xDC\xDA\x53\x44\xC4\x67\xE0\x92\x51\x34\xE4\x83\xA5\x4D"
|
||||
"\x3E\xDB\xA7\x9B\x82\xBB\x73\x81\xFC\xE8\x77\x4B\x15\xBE\x17\x73"
|
||||
"\x49\x9B\x5C\x98\xBC\xBD\x26\xEF\x0C\xE9\x2E\xED\x19\x7E\x86\x41"
|
||||
"\x1E\x9E\x48\x81\xDD\x2D\xE4\x6F\xC2\xCD\xCA\x93\x9E\x65\x7E\xD5"
|
||||
"\xEC\x73\xFD\x15\x1B\xA2\xA0\x7A\x0F\x0D\x6E\xB4\x53\x07\x90\x92"
|
||||
"\x64\x3B\x8B\xA9\x33\xB3\xC5\x94\x9B\x4C\x5D\x9C\x7C\x46\xA4\xA5"
|
||||
"\x56\xF4\xF3\xF8\x27\x0A\x7B\x42\x0D\x92\x70\x47\xE7\x42\x51\xA9"
|
||||
"\xC2\x18\xB1\x58\xB1\x50\x91\xB8\x61\x41\xB6\xA9\xCE\xD4\x7C\xBB"
|
||||
"\x02\x81\x80" /* exponent2 - integer of 128 bytes */
|
||||
"\x54\x09\x1F\x0F\x03\xD8\xB6\xC5\x0C\xE8\xB9\x9E\x0C\x38\x96\x43"
|
||||
"\xD4\xA6\xC5\x47\xDB\x20\x0E\xE5\xBD\x29\xD4\x7B\x1A\xF8\x41\x57"
|
||||
"\x49\x69\x9A\x82\xCC\x79\x4A\x43\xEB\x4D\x8B\x2D\xF2\x43\xD5\xA5"
|
||||
"\xBE\x44\xFD\x36\xAC\x8C\x9B\x02\xF7\x9A\x03\xE8\x19\xA6\x61\xAE"
|
||||
"\x76\x10\x93\x77\x41\x04\xAB\x4C\xED\x6A\xCC\x14\x1B\x99\x8D\x0C"
|
||||
"\x6A\x37\x3B\x86\x6C\x51\x37\x5B\x1D\x79\xF2\xA3\x43\x10\xC6\xA7"
|
||||
"\x21\x79\x6D\xF9\xE9\x04\x6A\xE8\x32\xFF\xAE\xFD\x1C\x7B\x8C\x29"
|
||||
"\x13\xA3\x0C\xB2\xAD\xEC\x6C\x0F\x8D\x27\x12\x7B\x48\xB2\xDB\x31"
|
||||
"\x02\x81\x81" /* coefficient - integer of 129 bytes */
|
||||
"\x00\x8D\x1B\x05\xCA\x24\x1F\x0C\x53\x19\x52\x74\x63\x21\xFA\x78"
|
||||
"\x46\x79\xAF\x5C\xDE\x30\xA4\x6C\x20\x38\xE6\x97\x39\xB8\x7A\x70"
|
||||
"\x0D\x8B\x6C\x6D\x13\x74\xD5\x1C\xDE\xA9\xF4\x60\x37\xFE\x68\x77"
|
||||
"\x5E\x0B\x4E\x5E\x03\x31\x30\xDF\xD6\xAE\x85\xD0\x81\xBB\x61\xC7"
|
||||
"\xB1\x04\x5A\xC4\x6D\x56\x1C\xD9\x64\xE7\x85\x7F\x88\x91\xC9\x60"
|
||||
"\x28\x05\xE2\xC6\x24\x8F\xDD\x61\x64\xD8\x09\xDE\x7E\xD3\x4A\x61"
|
||||
"\x1A\xD3\x73\x58\x4B\xD8\xA0\x54\x25\x48\x83\x6F\x82\x6C\xAF\x36"
|
||||
"\x51\x2A\x5D\x14\x2F\x41\x25\x00\xDD\xF8\xF3\x95\xFE\x31\x25\x50"
|
||||
"\x12",
|
||||
.key_len = 1191,
|
||||
.m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
|
||||
.c =
|
||||
"\xb2\x97\x76\xb4\xae\x3e\x38\x3c\x7e\x64\x1f\xcc\xa2\x7f\xf6\xbe"
|
||||
|
|
@ -720,7 +799,7 @@ static const struct akcipher_testvec ecrdsa_tv_template[] = {
|
|||
static const struct akcipher_testvec pkcs1pad_rsa_tv_template[] = {
|
||||
{
|
||||
.key =
|
||||
"\x30\x82\x03\x1f\x02\x01\x00\x02\x82\x01\x01\x00\xd7\x1e\x77\x82"
|
||||
"\x30\x82\x04\xa5\x02\x01\x00\x02\x82\x01\x01\x00\xd7\x1e\x77\x82"
|
||||
"\x8c\x92\x31\xe7\x69\x02\xa2\xd5\x5c\x78\xde\xa2\x0c\x8f\xfe\x28"
|
||||
"\x59\x31\xdf\x40\x9c\x60\x61\x06\xb9\x2f\x62\x40\x80\x76\xcb\x67"
|
||||
"\x4a\xb5\x59\x56\x69\x17\x07\xfa\xf9\x4c\xbd\x6c\x37\x7a\x46\x7d"
|
||||
|
|
@ -736,42 +815,66 @@ static const struct akcipher_testvec pkcs1pad_rsa_tv_template[] = {
|
|||
"\x9e\x49\x63\x6e\x02\xc1\xc9\x3a\x9b\xa5\x22\x1b\x07\x95\xd6\x10"
|
||||
"\x02\x50\xfd\xfd\xd1\x9b\xbe\xab\xc2\xc0\x74\xd7\xec\x00\xfb\x11"
|
||||
"\x71\xcb\x7a\xdc\x81\x79\x9f\x86\x68\x46\x63\x82\x4d\xb7\xf1\xe6"
|
||||
"\x16\x6f\x42\x63\xf4\x94\xa0\xca\x33\xcc\x75\x13\x02\x82\x01\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01"
|
||||
"\x02\x82\x01\x00\x62\xb5\x60\x31\x4f\x3f\x66\x16\xc1\x60\xac\x47"
|
||||
"\x2a\xff\x6b\x69\x00\x4a\xb2\x5c\xe1\x50\xb9\x18\x74\xa8\xe4\xdc"
|
||||
"\xa8\xec\xcd\x30\xbb\xc1\xc6\xe3\xc6\xac\x20\x2a\x3e\x5e\x8b\x12"
|
||||
"\xe6\x82\x08\x09\x38\x0b\xab\x7c\xb3\xcc\x9c\xce\x97\x67\xdd\xef"
|
||||
"\x95\x40\x4e\x92\xe2\x44\xe9\x1d\xc1\x14\xfd\xa9\xb1\xdc\x71\x9c"
|
||||
"\x46\x21\xbd\x58\x88\x6e\x22\x15\x56\xc1\xef\xe0\xc9\x8d\xe5\x80"
|
||||
"\x3e\xda\x7e\x93\x0f\x52\xf6\xf5\xc1\x91\x90\x9e\x42\x49\x4f\x8d"
|
||||
"\x9c\xba\x38\x83\xe9\x33\xc2\x50\x4f\xec\xc2\xf0\xa8\xb7\x6e\x28"
|
||||
"\x25\x56\x6b\x62\x67\xfe\x08\xf1\x56\xe5\x6f\x0e\x99\xf1\xe5\x95"
|
||||
"\x7b\xef\xeb\x0a\x2c\x92\x97\x57\x23\x33\x36\x07\xdd\xfb\xae\xf1"
|
||||
"\xb1\xd8\x33\xb7\x96\x71\x42\x36\xc5\xa4\xa9\x19\x4b\x1b\x52\x4c"
|
||||
"\x50\x69\x91\xf0\x0e\xfa\x80\x37\x4b\xb5\xd0\x2f\xb7\x44\x0d\xd4"
|
||||
"\xf8\x39\x8d\xab\x71\x67\x59\x05\x88\x3d\xeb\x48\x48\x33\x88\x4e"
|
||||
"\xfe\xf8\x27\x1b\xd6\x55\x60\x5e\x48\xb7\x6d\x9a\xa8\x37\xf9\x7a"
|
||||
"\xde\x1b\xcd\x5d\x1a\x30\xd4\xe9\x9e\x5b\x3c\x15\xf8\x9c\x1f\xda"
|
||||
"\xd1\x86\x48\x55\xce\x83\xee\x8e\x51\xc7\xde\x32\x12\x47\x7d\x46"
|
||||
"\xb8\x35\xdf\x41\x02\x01\x00\x02\x01\x00\x02\x01\x00\x02\x01\x00"
|
||||
"\x02\x01\x00",
|
||||
.key_len = 804,
|
||||
"\x16\x6f\x42\x63\xf4\x94\xa0\xca\x33\xcc\x75\x13\x02\x03\x01\x00"
|
||||
"\x01\x02\x82\x01\x00\x62\xb5\x60\x31\x4f\x3f\x66\x16\xc1\x60\xac"
|
||||
"\x47\x2a\xff\x6b\x69\x00\x4a\xb2\x5c\xe1\x50\xb9\x18\x74\xa8\xe4"
|
||||
"\xdc\xa8\xec\xcd\x30\xbb\xc1\xc6\xe3\xc6\xac\x20\x2a\x3e\x5e\x8b"
|
||||
"\x12\xe6\x82\x08\x09\x38\x0b\xab\x7c\xb3\xcc\x9c\xce\x97\x67\xdd"
|
||||
"\xef\x95\x40\x4e\x92\xe2\x44\xe9\x1d\xc1\x14\xfd\xa9\xb1\xdc\x71"
|
||||
"\x9c\x46\x21\xbd\x58\x88\x6e\x22\x15\x56\xc1\xef\xe0\xc9\x8d\xe5"
|
||||
"\x80\x3e\xda\x7e\x93\x0f\x52\xf6\xf5\xc1\x91\x90\x9e\x42\x49\x4f"
|
||||
"\x8d\x9c\xba\x38\x83\xe9\x33\xc2\x50\x4f\xec\xc2\xf0\xa8\xb7\x6e"
|
||||
"\x28\x25\x56\x6b\x62\x67\xfe\x08\xf1\x56\xe5\x6f\x0e\x99\xf1\xe5"
|
||||
"\x95\x7b\xef\xeb\x0a\x2c\x92\x97\x57\x23\x33\x36\x07\xdd\xfb\xae"
|
||||
"\xf1\xb1\xd8\x33\xb7\x96\x71\x42\x36\xc5\xa4\xa9\x19\x4b\x1b\x52"
|
||||
"\x4c\x50\x69\x91\xf0\x0e\xfa\x80\x37\x4b\xb5\xd0\x2f\xb7\x44\x0d"
|
||||
"\xd4\xf8\x39\x8d\xab\x71\x67\x59\x05\x88\x3d\xeb\x48\x48\x33\x88"
|
||||
"\x4e\xfe\xf8\x27\x1b\xd6\x55\x60\x5e\x48\xb7\x6d\x9a\xa8\x37\xf9"
|
||||
"\x7a\xde\x1b\xcd\x5d\x1a\x30\xd4\xe9\x9e\x5b\x3c\x15\xf8\x9c\x1f"
|
||||
"\xda\xd1\x86\x48\x55\xce\x83\xee\x8e\x51\xc7\xde\x32\x12\x47\x7d"
|
||||
"\x46\xb8\x35\xdf\x41\x02\x81\x81\x00\xe4\x4c\xae\xde\x16\xfd\x9f"
|
||||
"\x83\x55\x5b\x84\x4a\xcf\x1c\xf1\x37\x95\xad\xca\x29\x7f\x2d\x6e"
|
||||
"\x32\x81\xa4\x2b\x26\x14\x96\x1d\x40\x05\xec\x0c\xaf\x3f\x2c\x6f"
|
||||
"\x2c\xe8\xbf\x1d\xee\xd0\xb3\xef\x7c\x5b\x9e\x88\x4f\x2a\x8b\x0e"
|
||||
"\x4a\xbd\xb7\x8c\xfa\x10\x0e\x3b\xda\x68\xad\x41\x2b\xe4\x96\xfa"
|
||||
"\x7f\x80\x52\x5f\x07\x9f\x0e\x3b\x5e\x96\x45\x1a\x13\x2b\x94\xce"
|
||||
"\x1f\x07\x69\x85\x35\xfc\x69\x63\x5b\xf8\xf8\x3f\xce\x9d\x40\x1e"
|
||||
"\x7c\xad\xfb\x9e\xce\xe0\x01\xf8\xef\x59\x5d\xdc\x00\x79\xab\x8a"
|
||||
"\x3f\x80\xa2\x76\x32\x94\xa9\xea\x65\x02\x81\x81\x00\xf1\x38\x60"
|
||||
"\x90\x0d\x0c\x2e\x3d\x34\xe5\x90\xea\x21\x43\x1f\x68\x63\x16\x7b"
|
||||
"\x25\x8d\xde\x82\x2b\x52\xf8\xa3\xfd\x0f\x39\xe7\xe9\x5e\x32\x75"
|
||||
"\x15\x7d\xd0\xc9\xce\x06\xe5\xfb\xa9\xcb\x22\xe5\xdb\x49\x09\xf2"
|
||||
"\xe6\xb7\xa5\xa7\x75\x2e\x91\x2d\x2b\x5d\xf1\x48\x61\x45\x43\xd7"
|
||||
"\xbd\xfc\x11\x73\xb5\x11\x9f\xb2\x18\x3a\x6f\x36\xa7\xc2\xd3\x18"
|
||||
"\x4d\xf0\xc5\x1f\x70\x8c\x9b\xc5\x1d\x95\xa8\x5a\x9e\x8c\xb1\x4b"
|
||||
"\x6a\x2a\x84\x76\x2c\xd8\x4f\x47\xb0\x81\x84\x02\x45\xf0\x85\xf8"
|
||||
"\x0c\x6d\xa7\x0c\x4d\x2c\xb2\x5b\x81\x70\xfd\x6e\x17\x02\x81\x81"
|
||||
"\x00\x8d\x07\xc5\xfa\x92\x4f\x48\xcb\xd3\xdd\xfe\x02\x4c\xa1\x7f"
|
||||
"\x6d\xab\xfc\x38\xe7\x9b\x95\xcf\xfe\x49\x51\xc6\x09\xf7\x2b\xa8"
|
||||
"\x94\x15\x54\x75\x9d\x88\xb4\x05\x55\xc3\xcd\xd4\x4a\xe4\x08\x53"
|
||||
"\xc8\x09\xbd\x0c\x4d\x83\x65\x75\x85\xbc\x5e\xf8\x2a\xbd\xe2\x5d"
|
||||
"\x1d\x16\x0e\xf9\x34\x89\x38\xaf\x34\x36\x6c\x2c\x22\x44\x22\x81"
|
||||
"\x90\x73\xd9\xea\x3a\xaf\x70\x74\x48\x7c\xc6\xb5\xb0\xdc\xe5\xa9"
|
||||
"\xa8\x76\x4b\xbc\xf7\x00\xf3\x4c\x22\x0f\x44\x62\x1d\x40\x0a\x57"
|
||||
"\xe2\x5b\xdd\x7c\x7b\x9a\xad\xda\x70\x52\x21\x8a\x4c\xc2\xc3\x98"
|
||||
"\x75\x02\x81\x81\x00\xed\x24\x5c\xa2\x21\x81\xa1\x0f\xa1\x2a\x33"
|
||||
"\x0e\x49\xc7\x00\x60\x92\x51\x6e\x9d\x9b\xdc\x6d\x22\x04\x7e\xd6"
|
||||
"\x51\x19\x9f\xf6\xe3\x91\x2c\x8f\xb8\xa2\x29\x19\xcc\x47\x31\xdf"
|
||||
"\xf8\xab\xf0\xd2\x02\x83\xca\x99\x16\xc2\xe2\xc3\x3f\x4b\x99\x83"
|
||||
"\xcb\x87\x9e\x86\x66\xc2\x3e\x91\x21\x80\x66\xf3\xd6\xc5\xcd\xb6"
|
||||
"\xbb\x64\xef\x22\xcf\x48\x94\x58\xe7\x7e\xd5\x7c\x34\x1c\xb7\xa2"
|
||||
"\xd0\x93\xe9\x9f\xb5\x11\x61\xd7\x5f\x37\x0f\x64\x52\x70\x11\x78"
|
||||
"\xcc\x08\x77\xeb\xf8\x30\x1e\xb4\x9e\x1b\x4a\xc7\xa8\x33\x51\xe0"
|
||||
"\xed\xdf\x53\xf6\xdf\x02\x81\x81\x00\x86\xd9\x4c\xee\x65\x61\xc1"
|
||||
"\x19\xa9\xd5\x74\x9b\xd5\xca\xf6\x83\x2b\x06\xb4\x20\xfe\x45\x29"
|
||||
"\xe8\xe3\xfa\xe1\x4f\x28\x8e\x63\x2f\x74\xc3\x3a\x5c\x9a\xf5\x9e"
|
||||
"\x0e\x0d\xc5\xfe\xa0\x4c\x00\xce\x7b\xa4\x19\x17\x59\xaf\x13\x3a"
|
||||
"\x03\x8f\x54\xf5\x60\x39\x2e\xd9\x06\xb3\x7c\xd6\x90\x06\x41\x77"
|
||||
"\xf3\x93\xe1\x7a\x01\x41\xc1\x8f\xfe\x4c\x88\x39\xdb\xde\x71\x9e"
|
||||
"\x58\xd1\x49\x50\x80\xb2\x5a\x4f\x69\x8b\xb8\xfe\x63\xd4\x42\x3d"
|
||||
"\x37\x61\xa8\x4c\xff\xb6\x99\x4c\xf4\x51\xe0\x44\xaa\x69\x79\x3f"
|
||||
"\x81\xa4\x61\x3d\x26\xe9\x04\x52\x64",
|
||||
.key_len = 1193,
|
||||
/*
|
||||
* m is SHA256 hash of following message:
|
||||
* "\x49\x41\xbe\x0a\x0c\xc9\xf6\x35\x51\xe4\x27\x56\x13\x71\x4b\xd0"
|
||||
|
|
|
|||
|
|
@ -128,8 +128,6 @@ static unsigned long ghes_estatus_pool_size_request;
|
|||
static struct ghes_estatus_cache *ghes_estatus_caches[GHES_ESTATUS_CACHES_SIZE];
|
||||
static atomic_t ghes_estatus_cache_alloced;
|
||||
|
||||
static int ghes_panic_timeout __read_mostly = 30;
|
||||
|
||||
static void __iomem *ghes_map(u64 pfn, enum fixed_addresses fixmap_idx)
|
||||
{
|
||||
phys_addr_t paddr;
|
||||
|
|
@ -707,14 +705,16 @@ static void __ghes_panic(struct ghes *ghes,
|
|||
struct acpi_hest_generic_status *estatus,
|
||||
u64 buf_paddr, enum fixed_addresses fixmap_idx)
|
||||
{
|
||||
const char *msg = GHES_PFX "Fatal hardware error";
|
||||
|
||||
__ghes_print_estatus(KERN_EMERG, ghes->generic, estatus);
|
||||
|
||||
ghes_clear_estatus(ghes, estatus, buf_paddr, fixmap_idx);
|
||||
|
||||
/* reboot to log the error! */
|
||||
if (!panic_timeout)
|
||||
panic_timeout = ghes_panic_timeout;
|
||||
panic("Fatal hardware error!");
|
||||
pr_emerg("%s but panic disabled\n", msg);
|
||||
|
||||
panic(msg);
|
||||
}
|
||||
|
||||
static int ghes_proc(struct ghes *ghes)
|
||||
|
|
|
|||
|
|
@ -442,6 +442,13 @@ static const struct dmi_system_id asus_laptop[] = {
|
|||
DMI_MATCH(DMI_BOARD_NAME, "B2402CBA"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus Vivobook X1404VAP */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "X1404VAP"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus Vivobook X1504VAP */
|
||||
.matches = {
|
||||
|
|
@ -482,6 +489,12 @@ static const struct dmi_system_id asus_laptop[] = {
|
|||
DMI_MATCH(DMI_BOARD_NAME, "RP-15"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Eluktronics Inc."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "MECH-17"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* TongFang GM6XGxX/TUXEDO Stellaris 16 Gen5 AMD */
|
||||
.matches = {
|
||||
|
|
|
|||
|
|
@ -873,6 +873,8 @@ bus_devices_fail:
|
|||
bus_remove_file(bus, &bus_attr_uevent);
|
||||
bus_uevent_fail:
|
||||
kset_unregister(&bus->p->subsys);
|
||||
/* Above kset_unregister() will kfree @bus->p */
|
||||
bus->p = NULL;
|
||||
out:
|
||||
kfree(bus->p);
|
||||
bus->p = NULL;
|
||||
|
|
|
|||
|
|
@ -969,6 +969,9 @@ static int device_resume(struct device *dev, pm_message_t state, bool async)
|
|||
if (dev->power.syscore)
|
||||
goto Complete;
|
||||
|
||||
if (!dev->power.is_suspended)
|
||||
goto Complete;
|
||||
|
||||
if (dev->power.direct_complete) {
|
||||
/* Match the pm_runtime_disable() in __device_suspend(). */
|
||||
pm_runtime_enable(dev);
|
||||
|
|
@ -987,9 +990,6 @@ static int device_resume(struct device *dev, pm_message_t state, bool async)
|
|||
*/
|
||||
dev->power.is_prepared = false;
|
||||
|
||||
if (!dev->power.is_suspended)
|
||||
goto Unlock;
|
||||
|
||||
if (dev->pm_domain) {
|
||||
info = "power domain ";
|
||||
callback = pm_op(&dev->pm_domain->ops, state);
|
||||
|
|
@ -1029,7 +1029,6 @@ static int device_resume(struct device *dev, pm_message_t state, bool async)
|
|||
error = dpm_run_callback(callback, dev, state, info);
|
||||
dev->power.is_suspended = false;
|
||||
|
||||
Unlock:
|
||||
device_unlock(dev);
|
||||
dpm_watchdog_clear(&wd);
|
||||
|
||||
|
|
@ -1763,6 +1762,7 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
|
|||
pm_runtime_disable(dev);
|
||||
if (pm_runtime_status_suspended(dev)) {
|
||||
pm_dev_dbg(dev, state, "direct-complete ");
|
||||
dev->power.is_suspended = true;
|
||||
goto Complete;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -823,6 +823,7 @@ err_alloc:
|
|||
kfree(d->wake_buf);
|
||||
kfree(d->mask_buf_def);
|
||||
kfree(d->mask_buf);
|
||||
kfree(d->main_status_buf);
|
||||
kfree(d->status_buf);
|
||||
kfree(d->status_reg_buf);
|
||||
kfree(d);
|
||||
|
|
@ -869,6 +870,7 @@ void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *d)
|
|||
kfree(d->wake_buf);
|
||||
kfree(d->mask_buf_def);
|
||||
kfree(d->mask_buf);
|
||||
kfree(d->main_status_buf);
|
||||
kfree(d->status_reg_buf);
|
||||
kfree(d->status_buf);
|
||||
kfree(d);
|
||||
|
|
|
|||
|
|
@ -2039,6 +2039,7 @@ static void nbd_disconnect_and_put(struct nbd_device *nbd)
|
|||
flush_workqueue(nbd->recv_workq);
|
||||
nbd_clear_que(nbd);
|
||||
nbd->task_setup = NULL;
|
||||
clear_bit(NBD_RT_BOUND, &nbd->config->runtime_flags);
|
||||
mutex_unlock(&nbd->config_lock);
|
||||
|
||||
if (test_and_clear_bit(NBD_RT_HAS_CONFIG_REF,
|
||||
|
|
|
|||
|
|
@ -309,6 +309,9 @@ static int ipmb_probe(struct i2c_client *client,
|
|||
ipmb_dev->miscdev.name = devm_kasprintf(&client->dev, GFP_KERNEL,
|
||||
"%s%d", "ipmb-",
|
||||
client->adapter->nr);
|
||||
if (!ipmb_dev->miscdev.name)
|
||||
return -ENOMEM;
|
||||
|
||||
ipmb_dev->miscdev.fops = &ipmb_fops;
|
||||
ipmb_dev->miscdev.parent = &client->dev;
|
||||
ret = misc_register(&ipmb_dev->miscdev);
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ int wrpll_configure_for_rate(struct wrpll_cfg *c, u32 target_rate,
|
|||
vco = vco_pre * f;
|
||||
}
|
||||
|
||||
delta = abs(target_rate - vco);
|
||||
delta = abs(target_vco_rate - vco);
|
||||
if (delta < best_delta) {
|
||||
best_delta = delta;
|
||||
best_r = r;
|
||||
|
|
|
|||
|
|
@ -1135,8 +1135,18 @@ static struct clk_regmap g12a_cpu_clk_div16_en = {
|
|||
.hw.init = &(struct clk_init_data) {
|
||||
.name = "cpu_clk_div16_en",
|
||||
.ops = &clk_regmap_gate_ro_ops,
|
||||
.parent_hws = (const struct clk_hw *[]) {
|
||||
&g12a_cpu_clk.hw
|
||||
.parent_data = &(const struct clk_parent_data) {
|
||||
/*
|
||||
* Note:
|
||||
* G12A and G12B have different cpu clocks (with
|
||||
* different struct clk_hw). We fallback to the global
|
||||
* naming string mechanism so this clock picks
|
||||
* up the appropriate one. Same goes for the other
|
||||
* clock using cpu cluster A clock output and present
|
||||
* on both G12 variant.
|
||||
*/
|
||||
.name = "cpu_clk",
|
||||
.index = -1,
|
||||
},
|
||||
.num_parents = 1,
|
||||
/*
|
||||
|
|
@ -1201,7 +1211,10 @@ static struct clk_regmap g12a_cpu_clk_apb_div = {
|
|||
.hw.init = &(struct clk_init_data){
|
||||
.name = "cpu_clk_apb_div",
|
||||
.ops = &clk_regmap_divider_ro_ops,
|
||||
.parent_hws = (const struct clk_hw *[]) { &g12a_cpu_clk.hw },
|
||||
.parent_data = &(const struct clk_parent_data) {
|
||||
.name = "cpu_clk",
|
||||
.index = -1,
|
||||
},
|
||||
.num_parents = 1,
|
||||
},
|
||||
};
|
||||
|
|
@ -1235,7 +1248,10 @@ static struct clk_regmap g12a_cpu_clk_atb_div = {
|
|||
.hw.init = &(struct clk_init_data){
|
||||
.name = "cpu_clk_atb_div",
|
||||
.ops = &clk_regmap_divider_ro_ops,
|
||||
.parent_hws = (const struct clk_hw *[]) { &g12a_cpu_clk.hw },
|
||||
.parent_data = &(const struct clk_parent_data) {
|
||||
.name = "cpu_clk",
|
||||
.index = -1,
|
||||
},
|
||||
.num_parents = 1,
|
||||
},
|
||||
};
|
||||
|
|
@ -1269,7 +1285,10 @@ static struct clk_regmap g12a_cpu_clk_axi_div = {
|
|||
.hw.init = &(struct clk_init_data){
|
||||
.name = "cpu_clk_axi_div",
|
||||
.ops = &clk_regmap_divider_ro_ops,
|
||||
.parent_hws = (const struct clk_hw *[]) { &g12a_cpu_clk.hw },
|
||||
.parent_data = &(const struct clk_parent_data) {
|
||||
.name = "cpu_clk",
|
||||
.index = -1,
|
||||
},
|
||||
.num_parents = 1,
|
||||
},
|
||||
};
|
||||
|
|
@ -1304,13 +1323,6 @@ static struct clk_regmap g12a_cpu_clk_trace_div = {
|
|||
.name = "cpu_clk_trace_div",
|
||||
.ops = &clk_regmap_divider_ro_ops,
|
||||
.parent_data = &(const struct clk_parent_data) {
|
||||
/*
|
||||
* Note:
|
||||
* G12A and G12B have different cpu_clks (with
|
||||
* different struct clk_hw). We fallback to the global
|
||||
* naming string mechanism so cpu_clk_trace_div picks
|
||||
* up the appropriate one.
|
||||
*/
|
||||
.name = "cpu_clk",
|
||||
.index = -1,
|
||||
},
|
||||
|
|
@ -3898,7 +3910,7 @@ static MESON_GATE(g12a_spicc_1, HHI_GCLK_MPEG0, 14);
|
|||
static MESON_GATE(g12a_hiu_reg, HHI_GCLK_MPEG0, 19);
|
||||
static MESON_GATE(g12a_mipi_dsi_phy, HHI_GCLK_MPEG0, 20);
|
||||
static MESON_GATE(g12a_assist_misc, HHI_GCLK_MPEG0, 23);
|
||||
static MESON_GATE(g12a_emmc_a, HHI_GCLK_MPEG0, 4);
|
||||
static MESON_GATE(g12a_emmc_a, HHI_GCLK_MPEG0, 24);
|
||||
static MESON_GATE(g12a_emmc_b, HHI_GCLK_MPEG0, 25);
|
||||
static MESON_GATE(g12a_emmc_c, HHI_GCLK_MPEG0, 26);
|
||||
static MESON_GATE(g12a_audio_codec, HHI_GCLK_MPEG0, 28);
|
||||
|
|
|
|||
|
|
@ -1265,14 +1265,13 @@ static struct clk_regmap gxbb_cts_i958 = {
|
|||
},
|
||||
};
|
||||
|
||||
/*
|
||||
* This table skips a clock named 'cts_slow_oscin' in the documentation
|
||||
* This clock does not exist yet in this controller or the AO one
|
||||
*/
|
||||
static u32 gxbb_32k_clk_parents_val_table[] = { 0, 2, 3 };
|
||||
static const struct clk_parent_data gxbb_32k_clk_parent_data[] = {
|
||||
{ .fw_name = "xtal", },
|
||||
/*
|
||||
* FIXME: This clock is provided by the ao clock controller but the
|
||||
* clock is not yet part of the binding of this controller, so string
|
||||
* name must be use to set this parent.
|
||||
*/
|
||||
{ .name = "cts_slow_oscin", .index = -1 },
|
||||
{ .hw = &gxbb_fclk_div3.hw },
|
||||
{ .hw = &gxbb_fclk_div5.hw },
|
||||
};
|
||||
|
|
@ -1282,6 +1281,7 @@ static struct clk_regmap gxbb_32k_clk_sel = {
|
|||
.offset = HHI_32K_CLK_CNTL,
|
||||
.mask = 0x3,
|
||||
.shift = 16,
|
||||
.table = gxbb_32k_clk_parents_val_table,
|
||||
},
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "32k_clk_sel",
|
||||
|
|
@ -1305,7 +1305,7 @@ static struct clk_regmap gxbb_32k_clk_div = {
|
|||
&gxbb_32k_clk_sel.hw
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_SET_RATE_PARENT | CLK_DIVIDER_ROUND_CLOSEST,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ static unsigned long clk_rpmh_bcm_recalc_rate(struct clk_hw *hw,
|
|||
{
|
||||
struct clk_rpmh *c = to_clk_rpmh(hw);
|
||||
|
||||
return c->aggr_state * c->unit;
|
||||
return (unsigned long)c->aggr_state * c->unit;
|
||||
}
|
||||
|
||||
static const struct clk_ops clk_rpmh_bcm_ops = {
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ PNAME(mux_aclk_peri_pre_p) = { "cpll_peri",
|
|||
"gpll_peri",
|
||||
"hdmiphy_peri" };
|
||||
PNAME(mux_ref_usb3otg_src_p) = { "xin24m",
|
||||
"clk_usb3otg_ref" };
|
||||
"clk_ref_usb3otg_src" };
|
||||
PNAME(mux_xin24m_32k_p) = { "xin24m",
|
||||
"clk_rtc32k" };
|
||||
PNAME(mux_mac2io_src_p) = { "clk_mac2io_src",
|
||||
|
|
|
|||
|
|
@ -20,13 +20,6 @@
|
|||
DEFINE_RAW_SPINLOCK(i8253_lock);
|
||||
EXPORT_SYMBOL(i8253_lock);
|
||||
|
||||
/*
|
||||
* Handle PIT quirk in pit_shutdown() where zeroing the counter register
|
||||
* restarts the PIT, negating the shutdown. On platforms with the quirk,
|
||||
* platform specific code can set this to false.
|
||||
*/
|
||||
bool i8253_clear_counter_on_shutdown __ro_after_init = true;
|
||||
|
||||
#ifdef CONFIG_CLKSRC_I8253
|
||||
/*
|
||||
* Since the PIT overflows every tick, its not very useful
|
||||
|
|
@ -108,21 +101,47 @@ int __init clocksource_i8253_init(void)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_CLKEVT_I8253
|
||||
void clockevent_i8253_disable(void)
|
||||
{
|
||||
raw_spin_lock(&i8253_lock);
|
||||
|
||||
/*
|
||||
* Writing the MODE register should stop the counter, according to
|
||||
* the datasheet. This appears to work on real hardware (well, on
|
||||
* modern Intel and AMD boxes; I didn't dig the Pegasos out of the
|
||||
* shed).
|
||||
*
|
||||
* However, some virtual implementations differ, and the MODE change
|
||||
* doesn't have any effect until either the counter is written (KVM
|
||||
* in-kernel PIT) or the next interrupt (QEMU). And in those cases,
|
||||
* it may not stop the *count*, only the interrupts. Although in
|
||||
* the virt case, that probably doesn't matter, as the value of the
|
||||
* counter will only be calculated on demand if the guest reads it;
|
||||
* it's the interrupts which cause steal time.
|
||||
*
|
||||
* Hyper-V apparently has a bug where even in mode 0, the IRQ keeps
|
||||
* firing repeatedly if the counter is running. But it *does* do the
|
||||
* right thing when the MODE register is written.
|
||||
*
|
||||
* So: write the MODE and then load the counter, which ensures that
|
||||
* the IRQ is stopped on those buggy virt implementations. And then
|
||||
* write the MODE again, which is the right way to stop it.
|
||||
*/
|
||||
outb_p(0x30, PIT_MODE);
|
||||
outb_p(0, PIT_CH0);
|
||||
outb_p(0, PIT_CH0);
|
||||
|
||||
outb_p(0x30, PIT_MODE);
|
||||
|
||||
raw_spin_unlock(&i8253_lock);
|
||||
}
|
||||
|
||||
static int pit_shutdown(struct clock_event_device *evt)
|
||||
{
|
||||
if (!clockevent_state_oneshot(evt) && !clockevent_state_periodic(evt))
|
||||
return 0;
|
||||
|
||||
raw_spin_lock(&i8253_lock);
|
||||
|
||||
outb_p(0x30, PIT_MODE);
|
||||
|
||||
if (i8253_clear_counter_on_shutdown) {
|
||||
outb_p(0, PIT_CH0);
|
||||
outb_p(0, PIT_CH0);
|
||||
}
|
||||
|
||||
raw_spin_unlock(&i8253_lock);
|
||||
clockevent_i8253_disable();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,37 +58,43 @@ static int stm32_lptim_set_enable_state(struct stm32_lptim_cnt *priv,
|
|||
return 0;
|
||||
}
|
||||
|
||||
ret = clk_enable(priv->clk);
|
||||
if (ret)
|
||||
goto disable_cnt;
|
||||
|
||||
/* LP timer must be enabled before writing CMP & ARR */
|
||||
ret = regmap_write(priv->regmap, STM32_LPTIM_ARR, priv->ceiling);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto disable_clk;
|
||||
|
||||
ret = regmap_write(priv->regmap, STM32_LPTIM_CMP, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto disable_clk;
|
||||
|
||||
/* ensure CMP & ARR registers are properly written */
|
||||
ret = regmap_read_poll_timeout(priv->regmap, STM32_LPTIM_ISR, val,
|
||||
(val & STM32_LPTIM_CMPOK_ARROK) == STM32_LPTIM_CMPOK_ARROK,
|
||||
100, 1000);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto disable_clk;
|
||||
|
||||
ret = regmap_write(priv->regmap, STM32_LPTIM_ICR,
|
||||
STM32_LPTIM_CMPOKCF_ARROKCF);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto disable_clk;
|
||||
|
||||
ret = clk_enable(priv->clk);
|
||||
if (ret) {
|
||||
regmap_write(priv->regmap, STM32_LPTIM_CR, 0);
|
||||
return ret;
|
||||
}
|
||||
priv->enabled = true;
|
||||
|
||||
/* Start LP timer in continuous mode */
|
||||
return regmap_update_bits(priv->regmap, STM32_LPTIM_CR,
|
||||
STM32_LPTIM_CNTSTRT, STM32_LPTIM_CNTSTRT);
|
||||
|
||||
disable_clk:
|
||||
clk_disable(priv->clk);
|
||||
disable_cnt:
|
||||
regmap_write(priv->regmap, STM32_LPTIM_CR, 0);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int stm32_lptim_setup(struct stm32_lptim_cnt *priv, int enable)
|
||||
|
|
|
|||
|
|
@ -145,7 +145,23 @@ unsigned int dbs_update(struct cpufreq_policy *policy)
|
|||
time_elapsed = update_time - j_cdbs->prev_update_time;
|
||||
j_cdbs->prev_update_time = update_time;
|
||||
|
||||
idle_time = cur_idle_time - j_cdbs->prev_cpu_idle;
|
||||
/*
|
||||
* cur_idle_time could be smaller than j_cdbs->prev_cpu_idle if
|
||||
* it's obtained from get_cpu_idle_time_jiffy() when NOHZ is
|
||||
* off, where idle_time is calculated by the difference between
|
||||
* time elapsed in jiffies and "busy time" obtained from CPU
|
||||
* statistics. If a CPU is 100% busy, the time elapsed and busy
|
||||
* time should grow with the same amount in two consecutive
|
||||
* samples, but in practice there could be a tiny difference,
|
||||
* making the accumulated idle time decrease sometimes. Hence,
|
||||
* in this case, idle_time should be regarded as 0 in order to
|
||||
* make the further process correct.
|
||||
*/
|
||||
if (cur_idle_time > j_cdbs->prev_cpu_idle)
|
||||
idle_time = cur_idle_time - j_cdbs->prev_cpu_idle;
|
||||
else
|
||||
idle_time = 0;
|
||||
|
||||
j_cdbs->prev_cpu_idle = cur_idle_time;
|
||||
|
||||
if (ignore_nice) {
|
||||
|
|
@ -162,7 +178,7 @@ unsigned int dbs_update(struct cpufreq_policy *policy)
|
|||
* calls, so the previous load value can be used then.
|
||||
*/
|
||||
load = j_cdbs->prev_load;
|
||||
} else if (unlikely((int)idle_time > 2 * sampling_rate &&
|
||||
} else if (unlikely(idle_time > 2 * sampling_rate &&
|
||||
j_cdbs->prev_load)) {
|
||||
/*
|
||||
* If the CPU had gone completely idle and a task has
|
||||
|
|
@ -189,30 +205,15 @@ unsigned int dbs_update(struct cpufreq_policy *policy)
|
|||
load = j_cdbs->prev_load;
|
||||
j_cdbs->prev_load = 0;
|
||||
} else {
|
||||
if (time_elapsed >= idle_time) {
|
||||
if (time_elapsed > idle_time)
|
||||
load = 100 * (time_elapsed - idle_time) / time_elapsed;
|
||||
} else {
|
||||
/*
|
||||
* That can happen if idle_time is returned by
|
||||
* get_cpu_idle_time_jiffy(). In that case
|
||||
* idle_time is roughly equal to the difference
|
||||
* between time_elapsed and "busy time" obtained
|
||||
* from CPU statistics. Then, the "busy time"
|
||||
* can end up being greater than time_elapsed
|
||||
* (for example, if jiffies_64 and the CPU
|
||||
* statistics are updated by different CPUs),
|
||||
* so idle_time may in fact be negative. That
|
||||
* means, though, that the CPU was busy all
|
||||
* the time (on the rough average) during the
|
||||
* last sampling interval and 100 can be
|
||||
* returned as the load.
|
||||
*/
|
||||
load = (int)idle_time < 0 ? 100 : 0;
|
||||
}
|
||||
else
|
||||
load = 0;
|
||||
|
||||
j_cdbs->prev_load = load;
|
||||
}
|
||||
|
||||
if (unlikely((int)idle_time > 2 * sampling_rate)) {
|
||||
if (unlikely(idle_time > 2 * sampling_rate)) {
|
||||
unsigned int periods = idle_time / sampling_rate;
|
||||
|
||||
if (periods < idle_periods)
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ struct s3c64xx_dvfs {
|
|||
unsigned int vddarm_max;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_REGULATOR
|
||||
static struct s3c64xx_dvfs s3c64xx_dvfs_table[] = {
|
||||
[0] = { 1000000, 1150000 },
|
||||
[1] = { 1050000, 1150000 },
|
||||
|
|
@ -32,6 +33,7 @@ static struct s3c64xx_dvfs s3c64xx_dvfs_table[] = {
|
|||
[3] = { 1200000, 1350000 },
|
||||
[4] = { 1300000, 1350000 },
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct cpufreq_frequency_table s3c64xx_freq_table[] = {
|
||||
{ 0, 0, 66000 },
|
||||
|
|
@ -53,15 +55,16 @@ static struct cpufreq_frequency_table s3c64xx_freq_table[] = {
|
|||
static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy,
|
||||
unsigned int index)
|
||||
{
|
||||
struct s3c64xx_dvfs *dvfs;
|
||||
unsigned int old_freq, new_freq;
|
||||
unsigned int new_freq = s3c64xx_freq_table[index].frequency;
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_REGULATOR
|
||||
struct s3c64xx_dvfs *dvfs;
|
||||
unsigned int old_freq;
|
||||
|
||||
old_freq = clk_get_rate(policy->clk) / 1000;
|
||||
new_freq = s3c64xx_freq_table[index].frequency;
|
||||
dvfs = &s3c64xx_dvfs_table[s3c64xx_freq_table[index].driver_data];
|
||||
|
||||
#ifdef CONFIG_REGULATOR
|
||||
if (vddarm && new_freq > old_freq) {
|
||||
ret = regulator_set_voltage(vddarm,
|
||||
dvfs->vddarm_min,
|
||||
|
|
|
|||
|
|
@ -40,16 +40,19 @@ static void qce_unregister_algs(struct qce_device *qce)
|
|||
static int qce_register_algs(struct qce_device *qce)
|
||||
{
|
||||
const struct qce_algo_ops *ops;
|
||||
int i, ret = -ENODEV;
|
||||
int i, j, ret = -ENODEV;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(qce_ops); i++) {
|
||||
ops = qce_ops[i];
|
||||
ret = ops->register_algs(qce);
|
||||
if (ret)
|
||||
break;
|
||||
if (ret) {
|
||||
for (j = i - 1; j >= 0; j--)
|
||||
ops->unregister_algs(qce);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int qce_handle_request(struct crypto_async_request *async_req)
|
||||
|
|
@ -214,7 +217,7 @@ static int qce_crypto_probe(struct platform_device *pdev)
|
|||
|
||||
ret = qce_check_version(qce);
|
||||
if (ret)
|
||||
goto err_clks;
|
||||
goto err_dma;
|
||||
|
||||
spin_lock_init(&qce->lock);
|
||||
tasklet_init(&qce->done_tasklet, qce_tasklet_req_done,
|
||||
|
|
|
|||
|
|
@ -217,7 +217,6 @@ struct edma_desc {
|
|||
struct edma_cc;
|
||||
|
||||
struct edma_tc {
|
||||
struct device_node *node;
|
||||
u16 id;
|
||||
};
|
||||
|
||||
|
|
@ -2414,13 +2413,13 @@ static int edma_probe(struct platform_device *pdev)
|
|||
if (ret || i == ecc->num_tc)
|
||||
break;
|
||||
|
||||
ecc->tc_list[i].node = tc_args.np;
|
||||
ecc->tc_list[i].id = i;
|
||||
queue_priority_mapping[i][1] = tc_args.args[0];
|
||||
if (queue_priority_mapping[i][1] > lowest_priority) {
|
||||
lowest_priority = queue_priority_mapping[i][1];
|
||||
info->default_queue = i;
|
||||
}
|
||||
of_node_put(tc_args.np);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,8 +83,6 @@
|
|||
(((did) & PCI_DEVICE_ID_INTEL_IE31200_HB_CFL_MASK) == \
|
||||
PCI_DEVICE_ID_INTEL_IE31200_HB_CFL_MASK))
|
||||
|
||||
#define IE31200_DIMMS 4
|
||||
#define IE31200_RANKS 8
|
||||
#define IE31200_RANKS_PER_CHANNEL 4
|
||||
#define IE31200_DIMMS_PER_CHANNEL 2
|
||||
#define IE31200_CHANNELS 2
|
||||
|
|
@ -156,6 +154,7 @@
|
|||
#define IE31200_MAD_DIMM_0_OFFSET 0x5004
|
||||
#define IE31200_MAD_DIMM_0_OFFSET_SKL 0x500C
|
||||
#define IE31200_MAD_DIMM_SIZE GENMASK_ULL(7, 0)
|
||||
#define IE31200_MAD_DIMM_SIZE_SKL GENMASK_ULL(5, 0)
|
||||
#define IE31200_MAD_DIMM_A_RANK BIT(17)
|
||||
#define IE31200_MAD_DIMM_A_RANK_SHIFT 17
|
||||
#define IE31200_MAD_DIMM_A_RANK_SKL BIT(10)
|
||||
|
|
@ -370,7 +369,7 @@ static void __iomem *ie31200_map_mchbar(struct pci_dev *pdev)
|
|||
static void __skl_populate_dimm_info(struct dimm_data *dd, u32 addr_decode,
|
||||
int chan)
|
||||
{
|
||||
dd->size = (addr_decode >> (chan << 4)) & IE31200_MAD_DIMM_SIZE;
|
||||
dd->size = (addr_decode >> (chan << 4)) & IE31200_MAD_DIMM_SIZE_SKL;
|
||||
dd->dual_rank = (addr_decode & (IE31200_MAD_DIMM_A_RANK_SKL << (chan << 4))) ? 1 : 0;
|
||||
dd->x16_width = ((addr_decode & (IE31200_MAD_DIMM_A_WIDTH_SKL << (chan << 4))) >>
|
||||
(IE31200_MAD_DIMM_A_WIDTH_SKL_SHIFT + (chan << 4)));
|
||||
|
|
@ -419,7 +418,7 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
|
|||
|
||||
nr_channels = how_many_channels(pdev);
|
||||
layers[0].type = EDAC_MC_LAYER_CHIP_SELECT;
|
||||
layers[0].size = IE31200_DIMMS;
|
||||
layers[0].size = IE31200_RANKS_PER_CHANNEL;
|
||||
layers[0].is_virt_csrow = true;
|
||||
layers[1].type = EDAC_MC_LAYER_CHANNEL;
|
||||
layers[1].size = nr_channels;
|
||||
|
|
@ -612,7 +611,7 @@ static int __init ie31200_init(void)
|
|||
|
||||
pci_rc = pci_register_driver(&ie31200_driver);
|
||||
if (pci_rc < 0)
|
||||
goto fail0;
|
||||
return pci_rc;
|
||||
|
||||
if (!mci_pdev) {
|
||||
ie31200_registered = 0;
|
||||
|
|
@ -623,11 +622,13 @@ static int __init ie31200_init(void)
|
|||
if (mci_pdev)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!mci_pdev) {
|
||||
edac_dbg(0, "ie31200 pci_get_device fail\n");
|
||||
pci_rc = -ENODEV;
|
||||
goto fail1;
|
||||
goto fail0;
|
||||
}
|
||||
|
||||
pci_rc = ie31200_init_one(mci_pdev, &ie31200_pci_tbl[i]);
|
||||
if (pci_rc < 0) {
|
||||
edac_dbg(0, "ie31200 init fail\n");
|
||||
|
|
@ -635,12 +636,12 @@ static int __init ie31200_init(void)
|
|||
goto fail1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
return 0;
|
||||
fail1:
|
||||
pci_unregister_driver(&ie31200_driver);
|
||||
fail0:
|
||||
pci_dev_put(mci_pdev);
|
||||
fail0:
|
||||
pci_unregister_driver(&ie31200_driver);
|
||||
|
||||
return pci_rc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ config ISCSI_IBFT
|
|||
select ISCSI_BOOT_SYSFS
|
||||
select ISCSI_IBFT_FIND if X86
|
||||
depends on ACPI && SCSI && SCSI_LOWLEVEL
|
||||
default n
|
||||
default n
|
||||
help
|
||||
This option enables support for detection and exposing of iSCSI
|
||||
Boot Firmware Table (iBFT) via sysfs to userspace. If you wish to
|
||||
|
|
|
|||
|
|
@ -266,6 +266,7 @@ static int imx_scu_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
|
||||
sc_ipc->fast_ipc = of_device_is_compatible(args.np, "fsl,imx8-mu-scu");
|
||||
of_node_put(args.np);
|
||||
|
||||
num_channel = sc_ipc->fast_ipc ? 2 : SCU_MU_CHAN_NUM;
|
||||
for (i = 0; i < num_channel; i++) {
|
||||
|
|
|
|||
|
|
@ -311,7 +311,10 @@ static ssize_t ibft_attr_show_nic(void *data, int type, char *buf)
|
|||
str += sprintf_ipaddr(str, nic->ip_addr);
|
||||
break;
|
||||
case ISCSI_BOOT_ETH_SUBNET_MASK:
|
||||
val = cpu_to_be32(~((1 << (32-nic->subnet_mask_prefix))-1));
|
||||
if (nic->subnet_mask_prefix > 32)
|
||||
val = cpu_to_be32(~0);
|
||||
else
|
||||
val = cpu_to_be32(~((1 << (32-nic->subnet_mask_prefix))-1));
|
||||
str += sprintf(str, "%pI4", &val);
|
||||
break;
|
||||
case ISCSI_BOOT_ETH_PREFIX_LEN:
|
||||
|
|
|
|||
|
|
@ -77,6 +77,22 @@ struct bcm_kona_gpio {
|
|||
struct bcm_kona_gpio_bank {
|
||||
int id;
|
||||
int irq;
|
||||
/*
|
||||
* Used to keep track of lock/unlock operations for each GPIO in the
|
||||
* bank.
|
||||
*
|
||||
* All GPIOs are locked by default (see bcm_kona_gpio_reset), and the
|
||||
* unlock count for all GPIOs is 0 by default. Each unlock increments
|
||||
* the counter, and each lock decrements the counter.
|
||||
*
|
||||
* The lock function only locks the GPIO once its unlock counter is
|
||||
* down to 0. This is necessary because the GPIO is unlocked in two
|
||||
* places in this driver: once for requested GPIOs, and once for
|
||||
* requested IRQs. Since it is possible for a GPIO to be requested
|
||||
* as both a GPIO and an IRQ, we need to ensure that we don't lock it
|
||||
* too early.
|
||||
*/
|
||||
u8 gpio_unlock_count[GPIO_PER_BANK];
|
||||
/* Used in the interrupt handler */
|
||||
struct bcm_kona_gpio *kona_gpio;
|
||||
};
|
||||
|
|
@ -94,14 +110,24 @@ static void bcm_kona_gpio_lock_gpio(struct bcm_kona_gpio *kona_gpio,
|
|||
u32 val;
|
||||
unsigned long flags;
|
||||
int bank_id = GPIO_BANK(gpio);
|
||||
int bit = GPIO_BIT(gpio);
|
||||
struct bcm_kona_gpio_bank *bank = &kona_gpio->banks[bank_id];
|
||||
|
||||
raw_spin_lock_irqsave(&kona_gpio->lock, flags);
|
||||
if (bank->gpio_unlock_count[bit] == 0) {
|
||||
dev_err(kona_gpio->gpio_chip.parent,
|
||||
"Unbalanced locks for GPIO %u\n", gpio);
|
||||
return;
|
||||
}
|
||||
|
||||
val = readl(kona_gpio->reg_base + GPIO_PWD_STATUS(bank_id));
|
||||
val |= BIT(gpio);
|
||||
bcm_kona_gpio_write_lock_regs(kona_gpio->reg_base, bank_id, val);
|
||||
if (--bank->gpio_unlock_count[bit] == 0) {
|
||||
raw_spin_lock_irqsave(&kona_gpio->lock, flags);
|
||||
|
||||
raw_spin_unlock_irqrestore(&kona_gpio->lock, flags);
|
||||
val = readl(kona_gpio->reg_base + GPIO_PWD_STATUS(bank_id));
|
||||
val |= BIT(bit);
|
||||
bcm_kona_gpio_write_lock_regs(kona_gpio->reg_base, bank_id, val);
|
||||
|
||||
raw_spin_unlock_irqrestore(&kona_gpio->lock, flags);
|
||||
}
|
||||
}
|
||||
|
||||
static void bcm_kona_gpio_unlock_gpio(struct bcm_kona_gpio *kona_gpio,
|
||||
|
|
@ -110,14 +136,20 @@ static void bcm_kona_gpio_unlock_gpio(struct bcm_kona_gpio *kona_gpio,
|
|||
u32 val;
|
||||
unsigned long flags;
|
||||
int bank_id = GPIO_BANK(gpio);
|
||||
int bit = GPIO_BIT(gpio);
|
||||
struct bcm_kona_gpio_bank *bank = &kona_gpio->banks[bank_id];
|
||||
|
||||
raw_spin_lock_irqsave(&kona_gpio->lock, flags);
|
||||
if (bank->gpio_unlock_count[bit] == 0) {
|
||||
raw_spin_lock_irqsave(&kona_gpio->lock, flags);
|
||||
|
||||
val = readl(kona_gpio->reg_base + GPIO_PWD_STATUS(bank_id));
|
||||
val &= ~BIT(gpio);
|
||||
bcm_kona_gpio_write_lock_regs(kona_gpio->reg_base, bank_id, val);
|
||||
val = readl(kona_gpio->reg_base + GPIO_PWD_STATUS(bank_id));
|
||||
val &= ~BIT(bit);
|
||||
bcm_kona_gpio_write_lock_regs(kona_gpio->reg_base, bank_id, val);
|
||||
|
||||
raw_spin_unlock_irqrestore(&kona_gpio->lock, flags);
|
||||
raw_spin_unlock_irqrestore(&kona_gpio->lock, flags);
|
||||
}
|
||||
|
||||
++bank->gpio_unlock_count[bit];
|
||||
}
|
||||
|
||||
static int bcm_kona_gpio_get_dir(struct gpio_chip *chip, unsigned gpio)
|
||||
|
|
@ -368,6 +400,7 @@ static void bcm_kona_gpio_irq_mask(struct irq_data *d)
|
|||
|
||||
kona_gpio = irq_data_get_irq_chip_data(d);
|
||||
reg_base = kona_gpio->reg_base;
|
||||
|
||||
raw_spin_lock_irqsave(&kona_gpio->lock, flags);
|
||||
|
||||
val = readl(reg_base + GPIO_INT_MASK(bank_id));
|
||||
|
|
@ -390,6 +423,7 @@ static void bcm_kona_gpio_irq_unmask(struct irq_data *d)
|
|||
|
||||
kona_gpio = irq_data_get_irq_chip_data(d);
|
||||
reg_base = kona_gpio->reg_base;
|
||||
|
||||
raw_spin_lock_irqsave(&kona_gpio->lock, flags);
|
||||
|
||||
val = readl(reg_base + GPIO_INT_MSKCLR(bank_id));
|
||||
|
|
@ -487,15 +521,26 @@ static void bcm_kona_gpio_irq_handler(struct irq_desc *desc)
|
|||
static int bcm_kona_gpio_irq_reqres(struct irq_data *d)
|
||||
{
|
||||
struct bcm_kona_gpio *kona_gpio = irq_data_get_irq_chip_data(d);
|
||||
unsigned int gpio = d->hwirq;
|
||||
|
||||
return gpiochip_reqres_irq(&kona_gpio->gpio_chip, d->hwirq);
|
||||
/*
|
||||
* We need to unlock the GPIO before any other operations are performed
|
||||
* on the relevant GPIO configuration registers
|
||||
*/
|
||||
bcm_kona_gpio_unlock_gpio(kona_gpio, gpio);
|
||||
|
||||
return gpiochip_reqres_irq(&kona_gpio->gpio_chip, gpio);
|
||||
}
|
||||
|
||||
static void bcm_kona_gpio_irq_relres(struct irq_data *d)
|
||||
{
|
||||
struct bcm_kona_gpio *kona_gpio = irq_data_get_irq_chip_data(d);
|
||||
unsigned int gpio = d->hwirq;
|
||||
|
||||
gpiochip_relres_irq(&kona_gpio->gpio_chip, d->hwirq);
|
||||
/* Once we no longer use it, lock the GPIO again */
|
||||
bcm_kona_gpio_lock_gpio(kona_gpio, gpio);
|
||||
|
||||
gpiochip_relres_irq(&kona_gpio->gpio_chip, gpio);
|
||||
}
|
||||
|
||||
static struct irq_chip bcm_gpio_irq_chip = {
|
||||
|
|
@ -629,7 +674,7 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev)
|
|||
bank->irq = platform_get_irq(pdev, i);
|
||||
bank->kona_gpio = kona_gpio;
|
||||
if (bank->irq < 0) {
|
||||
dev_err(dev, "Couldn't get IRQ for bank %d", i);
|
||||
dev_err(dev, "Couldn't get IRQ for bank %d\n", i);
|
||||
ret = -ENOENT;
|
||||
goto err_irq_domain;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -418,7 +418,12 @@ static int gpio_rcar_parse_dt(struct gpio_rcar_priv *p, unsigned int *npins)
|
|||
p->has_both_edge_trigger = info->has_both_edge_trigger;
|
||||
|
||||
ret = of_parse_phandle_with_fixed_args(np, "gpio-ranges", 3, 0, &args);
|
||||
*npins = ret == 0 ? args.args[2] : RCAR_MAX_GPIO_PER_BANK;
|
||||
if (ret) {
|
||||
*npins = RCAR_MAX_GPIO_PER_BANK;
|
||||
} else {
|
||||
*npins = args.args[2];
|
||||
of_node_put(args.np);
|
||||
}
|
||||
|
||||
if (*npins == 0 || *npins > RCAR_MAX_GPIO_PER_BANK) {
|
||||
dev_warn(p->dev, "Invalid number of gpio lines %u, using %u\n",
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ static void stmpe_gpio_irq_sync_unlock(struct irq_data *d)
|
|||
[REG_IE][CSB] = STMPE_IDX_IEGPIOR_CSB,
|
||||
[REG_IE][MSB] = STMPE_IDX_IEGPIOR_MSB,
|
||||
};
|
||||
int i, j;
|
||||
int ret, i, j;
|
||||
|
||||
/*
|
||||
* STMPE1600: to be able to get IRQ from pins,
|
||||
|
|
@ -196,8 +196,16 @@ static void stmpe_gpio_irq_sync_unlock(struct irq_data *d)
|
|||
* GPSR or GPCR registers
|
||||
*/
|
||||
if (stmpe->partnum == STMPE1600) {
|
||||
stmpe_reg_read(stmpe, stmpe->regs[STMPE_IDX_GPMR_LSB]);
|
||||
stmpe_reg_read(stmpe, stmpe->regs[STMPE_IDX_GPMR_CSB]);
|
||||
ret = stmpe_reg_read(stmpe, stmpe->regs[STMPE_IDX_GPMR_LSB]);
|
||||
if (ret < 0) {
|
||||
dev_err(stmpe->dev, "Failed to read GPMR_LSB: %d\n", ret);
|
||||
goto err;
|
||||
}
|
||||
ret = stmpe_reg_read(stmpe, stmpe->regs[STMPE_IDX_GPMR_CSB]);
|
||||
if (ret < 0) {
|
||||
dev_err(stmpe->dev, "Failed to read GPMR_CSB: %d\n", ret);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < CACHE_NR_REGS; i++) {
|
||||
|
|
@ -219,6 +227,7 @@ static void stmpe_gpio_irq_sync_unlock(struct irq_data *d)
|
|||
}
|
||||
}
|
||||
|
||||
err:
|
||||
mutex_unlock(&stmpe_gpio->irq_lock);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -766,6 +766,22 @@ int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev)
|
|||
if (amdgpu_sriov_vf(adev))
|
||||
return 0;
|
||||
|
||||
/* resizing on Dell G5 SE platforms causes problems with runtime pm */
|
||||
if ((amdgpu_runtime_pm != 0) &&
|
||||
adev->pdev->vendor == PCI_VENDOR_ID_ATI &&
|
||||
adev->pdev->device == 0x731f &&
|
||||
adev->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL)
|
||||
return 0;
|
||||
|
||||
/* PCI_EXT_CAP_ID_VNDR extended capability is located at 0x100 */
|
||||
if (!pci_find_ext_capability(adev->pdev, PCI_EXT_CAP_ID_VNDR))
|
||||
DRM_WARN("System can't access extended configuration space,please check!!\n");
|
||||
|
||||
/* skip if the bios has already enabled large BAR */
|
||||
if (adev->gmc.real_vram_size &&
|
||||
(pci_resource_len(adev->pdev, 0) >= adev->gmc.real_vram_size))
|
||||
return 0;
|
||||
|
||||
/* Check if the root BUS has 64bit memory resources */
|
||||
root = adev->pdev->bus;
|
||||
while (root->parent)
|
||||
|
|
|
|||
|
|
@ -1834,10 +1834,13 @@ static int get_norm_pix_clk(const struct dc_crtc_timing *timing)
|
|||
break;
|
||||
case COLOR_DEPTH_121212:
|
||||
normalized_pix_clk = (pix_clk * 36) / 24;
|
||||
break;
|
||||
break;
|
||||
case COLOR_DEPTH_141414:
|
||||
normalized_pix_clk = (pix_clk * 42) / 24;
|
||||
break;
|
||||
case COLOR_DEPTH_161616:
|
||||
normalized_pix_clk = (pix_clk * 48) / 24;
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
ASSERT(0);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1369,6 +1369,8 @@ int atomctrl_get_smc_sclk_range_table(struct pp_hwmgr *hwmgr, struct pp_atom_ctr
|
|||
GetIndexIntoMasterTable(DATA, SMU_Info),
|
||||
&size, &frev, &crev);
|
||||
|
||||
if (!psmu_info)
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < psmu_info->ucSclkEntryNum; i++) {
|
||||
table->entry[i].ucVco_setting = psmu_info->asSclkFcwRangeEntry[i].ucVco_setting;
|
||||
|
|
|
|||
|
|
@ -159,6 +159,10 @@ static int komeda_wb_connector_add(struct komeda_kms_dev *kms,
|
|||
formats = komeda_get_layer_fourcc_list(&mdev->fmt_tbl,
|
||||
kwb_conn->wb_layer->layer_type,
|
||||
&n_formats);
|
||||
if (!formats) {
|
||||
kfree(kwb_conn);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
err = drm_writeback_connector_init(&kms->base, wb_conn,
|
||||
&komeda_wb_connector_funcs,
|
||||
|
|
|
|||
|
|
@ -929,6 +929,10 @@ int drm_atomic_connector_commit_dpms(struct drm_atomic_state *state,
|
|||
|
||||
if (mode != DRM_MODE_DPMS_ON)
|
||||
mode = DRM_MODE_DPMS_OFF;
|
||||
|
||||
if (connector->dpms == mode)
|
||||
goto out;
|
||||
|
||||
connector->dpms = mode;
|
||||
|
||||
crtc = connector->state->crtc;
|
||||
|
|
|
|||
|
|
@ -944,6 +944,10 @@ static const struct drm_prop_enum_list dp_colorspaces[] = {
|
|||
* implemented in the DRM core. This is the only standard connector
|
||||
* property that userspace can change.
|
||||
*
|
||||
* On atomic drivers any DPMS setproperty ioctl where the value does not
|
||||
* change is completely skipped, otherwise a full atomic commit will occur.
|
||||
* On legacy drivers the exact behavior is driver specific.
|
||||
*
|
||||
* Note that this property cannot be set through the MODE_ATOMIC ioctl,
|
||||
* userspace must use "ACTIVE" on the CRTC instead.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -303,16 +303,6 @@ void drm_dp_cec_set_edid(struct drm_dp_aux *aux, const struct edid *edid)
|
|||
if (!aux->transfer)
|
||||
return;
|
||||
|
||||
#ifndef CONFIG_MEDIA_CEC_RC
|
||||
/*
|
||||
* CEC_CAP_RC is part of CEC_CAP_DEFAULTS, but it is stripped by
|
||||
* cec_allocate_adapter() if CONFIG_MEDIA_CEC_RC is undefined.
|
||||
*
|
||||
* Do this here as well to ensure the tests against cec_caps are
|
||||
* correct.
|
||||
*/
|
||||
cec_caps &= ~CEC_CAP_RC;
|
||||
#endif
|
||||
cancel_delayed_work_sync(&aux->cec.unregister_work);
|
||||
|
||||
mutex_lock(&aux->cec.lock);
|
||||
|
|
@ -329,7 +319,9 @@ void drm_dp_cec_set_edid(struct drm_dp_aux *aux, const struct edid *edid)
|
|||
num_las = CEC_MAX_LOG_ADDRS;
|
||||
|
||||
if (aux->cec.adap) {
|
||||
if (aux->cec.adap->capabilities == cec_caps &&
|
||||
/* Check if the adapter properties have changed */
|
||||
if ((aux->cec.adap->capabilities & CEC_CAP_MONITOR_ALL) ==
|
||||
(cec_caps & CEC_CAP_MONITOR_ALL) &&
|
||||
aux->cec.adap->available_log_addrs == num_las) {
|
||||
/* Unchanged, so just set the phys addr */
|
||||
cec_s_phys_addr_from_edid(aux->cec.adap, edid);
|
||||
|
|
|
|||
|
|
@ -350,6 +350,7 @@ void *etnaviv_gem_vmap(struct drm_gem_object *obj)
|
|||
static void *etnaviv_gem_vmap_impl(struct etnaviv_gem_object *obj)
|
||||
{
|
||||
struct page **pages;
|
||||
pgprot_t prot;
|
||||
|
||||
lockdep_assert_held(&obj->lock);
|
||||
|
||||
|
|
@ -357,8 +358,19 @@ static void *etnaviv_gem_vmap_impl(struct etnaviv_gem_object *obj)
|
|||
if (IS_ERR(pages))
|
||||
return NULL;
|
||||
|
||||
return vmap(pages, obj->base.size >> PAGE_SHIFT,
|
||||
VM_MAP, pgprot_writecombine(PAGE_KERNEL));
|
||||
switch (obj->flags & ETNA_BO_CACHE_MASK) {
|
||||
case ETNA_BO_CACHED:
|
||||
prot = PAGE_KERNEL;
|
||||
break;
|
||||
case ETNA_BO_UNCACHED:
|
||||
prot = pgprot_noncached(PAGE_KERNEL);
|
||||
break;
|
||||
case ETNA_BO_WC:
|
||||
default:
|
||||
prot = pgprot_writecombine(PAGE_KERNEL);
|
||||
}
|
||||
|
||||
return vmap(pages, obj->base.size >> PAGE_SHIFT, VM_MAP, prot);
|
||||
}
|
||||
|
||||
static inline enum dma_data_direction etnaviv_op_to_dma_dir(u32 op)
|
||||
|
|
|
|||
|
|
@ -277,6 +277,11 @@ static void mid_get_vbt_data(struct drm_psb_private *dev_priv)
|
|||
0, PCI_DEVFN(2, 0));
|
||||
int ret = -1;
|
||||
|
||||
if (pci_gfx_root == NULL) {
|
||||
WARN_ON(1);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Get the address of the platform config vbt */
|
||||
pci_read_config_dword(pci_gfx_root, 0xFC, &addr);
|
||||
pci_dev_put(pci_gfx_root);
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ enum hdmi_aud_channel_swap_type {
|
|||
|
||||
struct hdmi_audio_param {
|
||||
enum hdmi_audio_coding_type aud_codec;
|
||||
enum hdmi_audio_sample_size aud_sampe_size;
|
||||
enum hdmi_audio_sample_size aud_sample_size;
|
||||
enum hdmi_aud_input_type aud_input_type;
|
||||
enum hdmi_aud_i2s_fmt aud_i2s_fmt;
|
||||
enum hdmi_aud_mclk aud_mclk;
|
||||
|
|
@ -1085,7 +1085,7 @@ static int mtk_hdmi_output_init(struct mtk_hdmi *hdmi)
|
|||
|
||||
hdmi->csp = HDMI_COLORSPACE_RGB;
|
||||
aud_param->aud_codec = HDMI_AUDIO_CODING_TYPE_PCM;
|
||||
aud_param->aud_sampe_size = HDMI_AUDIO_SAMPLE_SIZE_16;
|
||||
aud_param->aud_sample_size = HDMI_AUDIO_SAMPLE_SIZE_16;
|
||||
aud_param->aud_input_type = HDMI_AUD_INPUT_I2S;
|
||||
aud_param->aud_i2s_fmt = HDMI_I2S_MODE_I2S_24BIT;
|
||||
aud_param->aud_mclk = HDMI_AUD_MCLK_128FS;
|
||||
|
|
@ -1587,14 +1587,14 @@ static int mtk_hdmi_audio_hw_params(struct device *dev, void *data,
|
|||
switch (daifmt->fmt) {
|
||||
case HDMI_I2S:
|
||||
hdmi_params.aud_codec = HDMI_AUDIO_CODING_TYPE_PCM;
|
||||
hdmi_params.aud_sampe_size = HDMI_AUDIO_SAMPLE_SIZE_16;
|
||||
hdmi_params.aud_sample_size = HDMI_AUDIO_SAMPLE_SIZE_16;
|
||||
hdmi_params.aud_input_type = HDMI_AUD_INPUT_I2S;
|
||||
hdmi_params.aud_i2s_fmt = HDMI_I2S_MODE_I2S_24BIT;
|
||||
hdmi_params.aud_mclk = HDMI_AUD_MCLK_128FS;
|
||||
break;
|
||||
case HDMI_SPDIF:
|
||||
hdmi_params.aud_codec = HDMI_AUDIO_CODING_TYPE_PCM;
|
||||
hdmi_params.aud_sampe_size = HDMI_AUDIO_SAMPLE_SIZE_16;
|
||||
hdmi_params.aud_sample_size = HDMI_AUDIO_SAMPLE_SIZE_16;
|
||||
hdmi_params.aud_input_type = HDMI_AUD_INPUT_SPDIF;
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -759,7 +759,6 @@ nouveau_connector_force(struct drm_connector *connector)
|
|||
if (!nv_encoder) {
|
||||
NV_ERROR(drm, "can't find encoder to force %s on!\n",
|
||||
connector->name);
|
||||
connector->status = connector_status_disconnected;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -361,7 +361,8 @@ int r300_mc_wait_for_idle(struct radeon_device *rdev)
|
|||
return -1;
|
||||
}
|
||||
|
||||
static void r300_gpu_init(struct radeon_device *rdev)
|
||||
/* rs400_gpu_init also calls this! */
|
||||
void r300_gpu_init(struct radeon_device *rdev)
|
||||
{
|
||||
uint32_t gb_tile_config, tmp;
|
||||
|
||||
|
|
|
|||
|
|
@ -165,6 +165,7 @@ void r200_set_safe_registers(struct radeon_device *rdev);
|
|||
*/
|
||||
extern int r300_init(struct radeon_device *rdev);
|
||||
extern void r300_fini(struct radeon_device *rdev);
|
||||
extern void r300_gpu_init(struct radeon_device *rdev);
|
||||
extern int r300_suspend(struct radeon_device *rdev);
|
||||
extern int r300_resume(struct radeon_device *rdev);
|
||||
extern int r300_asic_reset(struct radeon_device *rdev, bool hard);
|
||||
|
|
|
|||
|
|
@ -558,7 +558,7 @@ int radeon_vce_cs_parse(struct radeon_cs_parser *p)
|
|||
{
|
||||
int session_idx = -1;
|
||||
bool destroyed = false, created = false, allocated = false;
|
||||
uint32_t tmp, handle = 0;
|
||||
uint32_t tmp = 0, handle = 0;
|
||||
uint32_t *size = &tmp;
|
||||
int i, r = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -257,8 +257,22 @@ int rs400_mc_wait_for_idle(struct radeon_device *rdev)
|
|||
|
||||
static void rs400_gpu_init(struct radeon_device *rdev)
|
||||
{
|
||||
/* FIXME: is this correct ? */
|
||||
r420_pipes_init(rdev);
|
||||
/* Earlier code was calling r420_pipes_init and then
|
||||
* rs400_mc_wait_for_idle(rdev). The problem is that
|
||||
* at least on my Mobility Radeon Xpress 200M RC410 card
|
||||
* that ends up in this code path ends up num_gb_pipes == 3
|
||||
* while the card seems to have only one pipe. With the
|
||||
* r420 pipe initialization method.
|
||||
*
|
||||
* Problems shown up as HyperZ glitches, see:
|
||||
* https://bugs.freedesktop.org/show_bug.cgi?id=110897
|
||||
*
|
||||
* Delegating initialization to r300 code seems to work
|
||||
* and results in proper pipe numbers. The rs400 cards
|
||||
* are said to be not r400, but r300 kind of cards.
|
||||
*/
|
||||
r300_gpu_init(rdev);
|
||||
|
||||
if (rs400_mc_wait_for_idle(rdev)) {
|
||||
pr_warn("rs400: Failed to wait MC idle while programming pipes. Bad things might happen. %08x\n",
|
||||
RREG32(RADEON_MC_STATUS));
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#if !defined(_GPU_SCHED_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#if !defined(_GPU_SCHED_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _GPU_SCHED_TRACE_H_
|
||||
|
||||
#include <linux/stringify.h>
|
||||
|
|
@ -96,7 +96,7 @@ TRACE_EVENT(drm_sched_job_wait_dep,
|
|||
__entry->seqno)
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif /* _GPU_SCHED_TRACE_H_ */
|
||||
|
||||
/* This part must be outside protection */
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
|
|
|
|||
|
|
@ -188,11 +188,15 @@ v3d_tfu_job_run(struct drm_sched_job *sched_job)
|
|||
struct drm_device *dev = &v3d->drm;
|
||||
struct dma_fence *fence;
|
||||
|
||||
if (unlikely(job->base.base.s_fence->finished.error))
|
||||
return NULL;
|
||||
|
||||
v3d->tfu_job = job;
|
||||
|
||||
fence = v3d_fence_create(v3d, V3D_TFU);
|
||||
if (IS_ERR(fence))
|
||||
return NULL;
|
||||
|
||||
v3d->tfu_job = job;
|
||||
if (job->base.irq_fence)
|
||||
dma_fence_put(job->base.irq_fence);
|
||||
job->base.irq_fence = dma_fence_get(fence);
|
||||
|
|
@ -226,6 +230,9 @@ v3d_csd_job_run(struct drm_sched_job *sched_job)
|
|||
struct dma_fence *fence;
|
||||
int i;
|
||||
|
||||
if (unlikely(job->base.base.s_fence->finished.error))
|
||||
return NULL;
|
||||
|
||||
v3d->csd_job = job;
|
||||
|
||||
v3d_invalidate_caches(v3d);
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ static int appleir_raw_event(struct hid_device *hid, struct hid_report *report,
|
|||
static const u8 flatbattery[] = { 0x25, 0x87, 0xe0 };
|
||||
unsigned long flags;
|
||||
|
||||
if (len != 5)
|
||||
if (len != 5 || !(hid->claimed & HID_CLAIMED_INPUT))
|
||||
goto out;
|
||||
|
||||
if (!memcmp(data, keydown, sizeof(keydown))) {
|
||||
|
|
|
|||
|
|
@ -1111,6 +1111,8 @@ static void hid_apply_multiplier(struct hid_device *hid,
|
|||
while (multiplier_collection->parent_idx != -1 &&
|
||||
multiplier_collection->type != HID_COLLECTION_LOGICAL)
|
||||
multiplier_collection = &hid->collection[multiplier_collection->parent_idx];
|
||||
if (multiplier_collection->type != HID_COLLECTION_LOGICAL)
|
||||
multiplier_collection = NULL;
|
||||
|
||||
effective_multiplier = hid_calculate_multiplier(hid, multiplier);
|
||||
|
||||
|
|
|
|||
|
|
@ -258,11 +258,13 @@ static int cbas_ec_remove(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
static const struct acpi_device_id cbas_ec_acpi_ids[] = {
|
||||
{ "GOOG000B", 0 },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, cbas_ec_acpi_ids);
|
||||
#endif
|
||||
|
||||
static struct platform_driver cbas_ec_driver = {
|
||||
.probe = cbas_ec_probe,
|
||||
|
|
|
|||
|
|
@ -1010,6 +1010,7 @@
|
|||
#define USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3001 0x3001
|
||||
#define USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3003 0x3003
|
||||
#define USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3008 0x3008
|
||||
#define USB_DEVICE_ID_QUANTA_HP_5MP_CAMERA_5473 0x5473
|
||||
|
||||
#define I2C_VENDOR_ID_RAYDIUM 0x2386
|
||||
#define I2C_PRODUCT_ID_RAYDIUM_4B33 0x4b33
|
||||
|
|
|
|||
|
|
@ -1601,9 +1601,12 @@ static int mt_input_configured(struct hid_device *hdev, struct hid_input *hi)
|
|||
break;
|
||||
}
|
||||
|
||||
if (suffix)
|
||||
if (suffix) {
|
||||
hi->input->name = devm_kasprintf(&hdev->dev, GFP_KERNEL,
|
||||
"%s %s", hdev->name, suffix);
|
||||
if (!hi->input->name)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,9 +6,6 @@
|
|||
* Copyright (c) 2015-2018 Terry Junge <terry.junge@plantronics.com>
|
||||
*/
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "hid-ids.h"
|
||||
|
||||
#include <linux/hid.h>
|
||||
|
|
@ -23,30 +20,28 @@
|
|||
|
||||
#define PLT_VOL_UP 0x00b1
|
||||
#define PLT_VOL_DOWN 0x00b2
|
||||
#define PLT_MIC_MUTE 0x00b5
|
||||
|
||||
#define PLT1_VOL_UP (PLT_HID_1_0_PAGE | PLT_VOL_UP)
|
||||
#define PLT1_VOL_DOWN (PLT_HID_1_0_PAGE | PLT_VOL_DOWN)
|
||||
#define PLT1_MIC_MUTE (PLT_HID_1_0_PAGE | PLT_MIC_MUTE)
|
||||
#define PLT2_VOL_UP (PLT_HID_2_0_PAGE | PLT_VOL_UP)
|
||||
#define PLT2_VOL_DOWN (PLT_HID_2_0_PAGE | PLT_VOL_DOWN)
|
||||
#define PLT2_MIC_MUTE (PLT_HID_2_0_PAGE | PLT_MIC_MUTE)
|
||||
#define HID_TELEPHONY_MUTE (HID_UP_TELEPHONY | 0x2f)
|
||||
#define HID_CONSUMER_MUTE (HID_UP_CONSUMER | 0xe2)
|
||||
|
||||
#define PLT_DA60 0xda60
|
||||
#define PLT_BT300_MIN 0x0413
|
||||
#define PLT_BT300_MAX 0x0418
|
||||
|
||||
|
||||
#define PLT_ALLOW_CONSUMER (field->application == HID_CP_CONSUMERCONTROL && \
|
||||
(usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER)
|
||||
|
||||
#define PLT_QUIRK_DOUBLE_VOLUME_KEYS BIT(0)
|
||||
#define PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS BIT(1)
|
||||
|
||||
#define PLT_DOUBLE_KEY_TIMEOUT 5 /* ms */
|
||||
#define PLT_FOLLOWED_OPPOSITE_KEY_TIMEOUT 220 /* ms */
|
||||
|
||||
struct plt_drv_data {
|
||||
unsigned long device_type;
|
||||
unsigned long last_volume_key_ts;
|
||||
u32 quirks;
|
||||
unsigned long last_key_ts;
|
||||
unsigned long double_key_to;
|
||||
__u16 last_key;
|
||||
};
|
||||
|
||||
static int plantronics_input_mapping(struct hid_device *hdev,
|
||||
|
|
@ -58,34 +53,43 @@ static int plantronics_input_mapping(struct hid_device *hdev,
|
|||
unsigned short mapped_key;
|
||||
struct plt_drv_data *drv_data = hid_get_drvdata(hdev);
|
||||
unsigned long plt_type = drv_data->device_type;
|
||||
int allow_mute = usage->hid == HID_TELEPHONY_MUTE;
|
||||
int allow_consumer = field->application == HID_CP_CONSUMERCONTROL &&
|
||||
(usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER &&
|
||||
usage->hid != HID_CONSUMER_MUTE;
|
||||
|
||||
/* special case for PTT products */
|
||||
if (field->application == HID_GD_JOYSTICK)
|
||||
goto defaulted;
|
||||
|
||||
/* handle volume up/down mapping */
|
||||
/* non-standard types or multi-HID interfaces - plt_type is PID */
|
||||
if (!(plt_type & HID_USAGE_PAGE)) {
|
||||
switch (plt_type) {
|
||||
case PLT_DA60:
|
||||
if (PLT_ALLOW_CONSUMER)
|
||||
if (allow_consumer)
|
||||
goto defaulted;
|
||||
goto ignored;
|
||||
if (usage->hid == HID_CONSUMER_MUTE) {
|
||||
mapped_key = KEY_MICMUTE;
|
||||
goto mapped;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (PLT_ALLOW_CONSUMER)
|
||||
if (allow_consumer || allow_mute)
|
||||
goto defaulted;
|
||||
}
|
||||
goto ignored;
|
||||
}
|
||||
/* handle standard types - plt_type is 0xffa0uuuu or 0xffa2uuuu */
|
||||
/* 'basic telephony compliant' - allow default consumer page map */
|
||||
else if ((plt_type & HID_USAGE) >= PLT_BASIC_TELEPHONY &&
|
||||
(plt_type & HID_USAGE) != PLT_BASIC_EXCEPTION) {
|
||||
if (PLT_ALLOW_CONSUMER)
|
||||
goto defaulted;
|
||||
}
|
||||
/* not 'basic telephony' - apply legacy mapping */
|
||||
/* only map if the field is in the device's primary vendor page */
|
||||
else if (!((field->application ^ plt_type) & HID_USAGE_PAGE)) {
|
||||
|
||||
/* handle standard consumer control mapping */
|
||||
/* and standard telephony mic mute mapping */
|
||||
if (allow_consumer || allow_mute)
|
||||
goto defaulted;
|
||||
|
||||
/* handle vendor unique types - plt_type is 0xffa0uuuu or 0xffa2uuuu */
|
||||
/* if not 'basic telephony compliant' - map vendor unique controls */
|
||||
if (!((plt_type & HID_USAGE) >= PLT_BASIC_TELEPHONY &&
|
||||
(plt_type & HID_USAGE) != PLT_BASIC_EXCEPTION) &&
|
||||
!((field->application ^ plt_type) & HID_USAGE_PAGE))
|
||||
switch (usage->hid) {
|
||||
case PLT1_VOL_UP:
|
||||
case PLT2_VOL_UP:
|
||||
|
|
@ -95,8 +99,11 @@ static int plantronics_input_mapping(struct hid_device *hdev,
|
|||
case PLT2_VOL_DOWN:
|
||||
mapped_key = KEY_VOLUMEDOWN;
|
||||
goto mapped;
|
||||
case PLT1_MIC_MUTE:
|
||||
case PLT2_MIC_MUTE:
|
||||
mapped_key = KEY_MICMUTE;
|
||||
goto mapped;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Future mapping of call control or other usages,
|
||||
|
|
@ -105,6 +112,8 @@ static int plantronics_input_mapping(struct hid_device *hdev,
|
|||
*/
|
||||
|
||||
ignored:
|
||||
hid_dbg(hdev, "usage: %08x (appl: %08x) - ignored\n",
|
||||
usage->hid, field->application);
|
||||
return -1;
|
||||
|
||||
defaulted:
|
||||
|
|
@ -123,38 +132,26 @@ static int plantronics_event(struct hid_device *hdev, struct hid_field *field,
|
|||
struct hid_usage *usage, __s32 value)
|
||||
{
|
||||
struct plt_drv_data *drv_data = hid_get_drvdata(hdev);
|
||||
unsigned long prev_tsto, cur_ts;
|
||||
__u16 prev_key, cur_key;
|
||||
|
||||
if (drv_data->quirks & PLT_QUIRK_DOUBLE_VOLUME_KEYS) {
|
||||
unsigned long prev_ts, cur_ts;
|
||||
/* Usages are filtered in plantronics_usages. */
|
||||
|
||||
/* Usages are filtered in plantronics_usages. */
|
||||
/* HZ too low for ms resolution - double key detection disabled */
|
||||
/* or it is a key release - handle key presses only. */
|
||||
if (!drv_data->double_key_to || !value)
|
||||
return 0;
|
||||
|
||||
if (!value) /* Handle key presses only. */
|
||||
return 0;
|
||||
prev_tsto = drv_data->last_key_ts + drv_data->double_key_to;
|
||||
cur_ts = drv_data->last_key_ts = jiffies;
|
||||
prev_key = drv_data->last_key;
|
||||
cur_key = drv_data->last_key = usage->code;
|
||||
|
||||
prev_ts = drv_data->last_volume_key_ts;
|
||||
cur_ts = jiffies;
|
||||
if (jiffies_to_msecs(cur_ts - prev_ts) <= PLT_DOUBLE_KEY_TIMEOUT)
|
||||
return 1; /* Ignore the repeated key. */
|
||||
|
||||
drv_data->last_volume_key_ts = cur_ts;
|
||||
/* If the same key occurs in <= double_key_to -- ignore it */
|
||||
if (prev_key == cur_key && time_before_eq(cur_ts, prev_tsto)) {
|
||||
hid_dbg(hdev, "double key %d ignored\n", cur_key);
|
||||
return 1; /* Ignore the repeated key. */
|
||||
}
|
||||
if (drv_data->quirks & PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS) {
|
||||
unsigned long prev_ts, cur_ts;
|
||||
|
||||
/* Usages are filtered in plantronics_usages. */
|
||||
|
||||
if (!value) /* Handle key presses only. */
|
||||
return 0;
|
||||
|
||||
prev_ts = drv_data->last_volume_key_ts;
|
||||
cur_ts = jiffies;
|
||||
if (jiffies_to_msecs(cur_ts - prev_ts) <= PLT_FOLLOWED_OPPOSITE_KEY_TIMEOUT)
|
||||
return 1; /* Ignore the followed opposite volume key. */
|
||||
|
||||
drv_data->last_volume_key_ts = cur_ts;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -196,12 +193,16 @@ static int plantronics_probe(struct hid_device *hdev,
|
|||
ret = hid_parse(hdev);
|
||||
if (ret) {
|
||||
hid_err(hdev, "parse failed\n");
|
||||
goto err;
|
||||
return ret;
|
||||
}
|
||||
|
||||
drv_data->device_type = plantronics_device_type(hdev);
|
||||
drv_data->quirks = id->driver_data;
|
||||
drv_data->last_volume_key_ts = jiffies - msecs_to_jiffies(PLT_DOUBLE_KEY_TIMEOUT);
|
||||
drv_data->double_key_to = msecs_to_jiffies(PLT_DOUBLE_KEY_TIMEOUT);
|
||||
drv_data->last_key_ts = jiffies - drv_data->double_key_to;
|
||||
|
||||
/* if HZ does not allow ms resolution - disable double key detection */
|
||||
if (drv_data->double_key_to < PLT_DOUBLE_KEY_TIMEOUT)
|
||||
drv_data->double_key_to = 0;
|
||||
|
||||
hid_set_drvdata(hdev, drv_data);
|
||||
|
||||
|
|
@ -210,29 +211,10 @@ static int plantronics_probe(struct hid_device *hdev,
|
|||
if (ret)
|
||||
hid_err(hdev, "hw start failed\n");
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct hid_device_id plantronics_devices[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
|
||||
USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3210_SERIES),
|
||||
.driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
|
||||
USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3220_SERIES),
|
||||
.driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
|
||||
USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3215_SERIES),
|
||||
.driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
|
||||
USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3225_SERIES),
|
||||
.driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
|
||||
USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3325_SERIES),
|
||||
.driver_data = PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
|
||||
USB_DEVICE_ID_PLANTRONICS_ENCOREPRO_500_SERIES),
|
||||
.driver_data = PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, HID_ANY_ID) },
|
||||
{ }
|
||||
};
|
||||
|
|
@ -241,6 +223,14 @@ MODULE_DEVICE_TABLE(hid, plantronics_devices);
|
|||
static const struct hid_usage_id plantronics_usages[] = {
|
||||
{ HID_CP_VOLUMEUP, EV_KEY, HID_ANY_ID },
|
||||
{ HID_CP_VOLUMEDOWN, EV_KEY, HID_ANY_ID },
|
||||
{ HID_TELEPHONY_MUTE, EV_KEY, HID_ANY_ID },
|
||||
{ HID_CONSUMER_MUTE, EV_KEY, HID_ANY_ID },
|
||||
{ PLT2_VOL_UP, EV_KEY, HID_ANY_ID },
|
||||
{ PLT2_VOL_DOWN, EV_KEY, HID_ANY_ID },
|
||||
{ PLT2_MIC_MUTE, EV_KEY, HID_ANY_ID },
|
||||
{ PLT1_VOL_UP, EV_KEY, HID_ANY_ID },
|
||||
{ PLT1_VOL_DOWN, EV_KEY, HID_ANY_ID },
|
||||
{ PLT1_MIC_MUTE, EV_KEY, HID_ANY_ID },
|
||||
{ HID_TERMINATOR, HID_TERMINATOR, HID_TERMINATOR }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -889,6 +889,7 @@ static const struct hid_device_id hid_ignore_list[] = {
|
|||
{ HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_DPAD) },
|
||||
#endif
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_HP_5MP_CAMERA_5473) },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -730,23 +730,30 @@ err_stop_hw:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int sensor_hub_finalize_pending_fn(struct device *dev, void *data)
|
||||
{
|
||||
struct hid_sensor_hub_device *hsdev = dev->platform_data;
|
||||
|
||||
if (hsdev->pending.status)
|
||||
complete(&hsdev->pending.ready);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sensor_hub_remove(struct hid_device *hdev)
|
||||
{
|
||||
struct sensor_hub_data *data = hid_get_drvdata(hdev);
|
||||
unsigned long flags;
|
||||
int i;
|
||||
|
||||
hid_dbg(hdev, " hardware removed\n");
|
||||
hid_hw_close(hdev);
|
||||
hid_hw_stop(hdev);
|
||||
|
||||
spin_lock_irqsave(&data->lock, flags);
|
||||
for (i = 0; i < data->hid_sensor_client_cnt; ++i) {
|
||||
struct hid_sensor_hub_device *hsdev =
|
||||
data->hid_sensor_hub_client_devs[i].platform_data;
|
||||
if (hsdev->pending.status)
|
||||
complete(&hsdev->pending.ready);
|
||||
}
|
||||
device_for_each_child(&hdev->dev, NULL,
|
||||
sensor_hub_finalize_pending_fn);
|
||||
spin_unlock_irqrestore(&data->lock, flags);
|
||||
|
||||
mfd_remove_devices(&hdev->dev);
|
||||
mutex_destroy(&data->mutex);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -549,14 +549,14 @@ static void fw_reset_work_fn(struct work_struct *unused)
|
|||
static void _ish_sync_fw_clock(struct ishtp_device *dev)
|
||||
{
|
||||
static unsigned long prev_sync;
|
||||
uint64_t usec;
|
||||
struct ipc_time_update_msg time = {};
|
||||
|
||||
if (prev_sync && jiffies - prev_sync < 20 * HZ)
|
||||
return;
|
||||
|
||||
prev_sync = jiffies;
|
||||
usec = ktime_to_us(ktime_get_boottime());
|
||||
ipc_send_mng_msg(dev, MNG_SYNC_FW_CLOCK, &usec, sizeof(uint64_t));
|
||||
/* The fields of time would be updated while sending message */
|
||||
ipc_send_mng_msg(dev, MNG_SYNC_FW_CLOCK, &time, sizeof(time));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -263,12 +263,14 @@ err_hid_data:
|
|||
*/
|
||||
void ishtp_hid_remove(struct ishtp_cl_data *client_data)
|
||||
{
|
||||
void *data;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < client_data->num_hid_devices; ++i) {
|
||||
if (client_data->hid_sensor_hubs[i]) {
|
||||
kfree(client_data->hid_sensor_hubs[i]->driver_data);
|
||||
data = client_data->hid_sensor_hubs[i]->driver_data;
|
||||
hid_destroy_device(client_data->hid_sensor_hubs[i]);
|
||||
kfree(data);
|
||||
client_data->hid_sensor_hubs[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4851,6 +4851,10 @@ static const struct wacom_features wacom_features_0x94 =
|
|||
HID_DEVICE(BUS_I2C, HID_GROUP_WACOM, USB_VENDOR_ID_WACOM, prod),\
|
||||
.driver_data = (kernel_ulong_t)&wacom_features_##prod
|
||||
|
||||
#define PCI_DEVICE_WACOM(prod) \
|
||||
HID_DEVICE(BUS_PCI, HID_GROUP_WACOM, USB_VENDOR_ID_WACOM, prod),\
|
||||
.driver_data = (kernel_ulong_t)&wacom_features_##prod
|
||||
|
||||
#define USB_DEVICE_LENOVO(prod) \
|
||||
HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, prod), \
|
||||
.driver_data = (kernel_ulong_t)&wacom_features_##prod
|
||||
|
|
@ -5020,6 +5024,7 @@ const struct hid_device_id wacom_ids[] = {
|
|||
|
||||
{ USB_DEVICE_WACOM(HID_ANY_ID) },
|
||||
{ I2C_DEVICE_WACOM(HID_ANY_ID) },
|
||||
{ PCI_DEVICE_WACOM(HID_ANY_ID) },
|
||||
{ BT_DEVICE_WACOM(HID_ANY_ID) },
|
||||
{ }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ static struct notifier_block hyperv_panic_block = {
|
|||
static const char *fb_mmio_name = "fb_range";
|
||||
static struct resource *fb_mmio;
|
||||
static struct resource *hyperv_mmio;
|
||||
static DEFINE_SEMAPHORE(hyperv_mmio_lock);
|
||||
static DEFINE_MUTEX(hyperv_mmio_lock);
|
||||
|
||||
static int vmbus_exists(void)
|
||||
{
|
||||
|
|
@ -2082,7 +2082,7 @@ int vmbus_allocate_mmio(struct resource **new, struct hv_device *device_obj,
|
|||
int retval;
|
||||
|
||||
retval = -ENXIO;
|
||||
down(&hyperv_mmio_lock);
|
||||
mutex_lock(&hyperv_mmio_lock);
|
||||
|
||||
/*
|
||||
* If overlaps with frame buffers are allowed, then first attempt to
|
||||
|
|
@ -2137,7 +2137,7 @@ int vmbus_allocate_mmio(struct resource **new, struct hv_device *device_obj,
|
|||
}
|
||||
|
||||
exit:
|
||||
up(&hyperv_mmio_lock);
|
||||
mutex_unlock(&hyperv_mmio_lock);
|
||||
return retval;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(vmbus_allocate_mmio);
|
||||
|
|
@ -2154,15 +2154,28 @@ void vmbus_free_mmio(resource_size_t start, resource_size_t size)
|
|||
{
|
||||
struct resource *iter;
|
||||
|
||||
down(&hyperv_mmio_lock);
|
||||
mutex_lock(&hyperv_mmio_lock);
|
||||
|
||||
/*
|
||||
* If all bytes of the MMIO range to be released are within the
|
||||
* special case fb_mmio shadow region, skip releasing the shadow
|
||||
* region since no corresponding __request_region() was done
|
||||
* in vmbus_allocate_mmio().
|
||||
*/
|
||||
if (fb_mmio && start >= fb_mmio->start &&
|
||||
(start + size - 1 <= fb_mmio->end))
|
||||
goto skip_shadow_release;
|
||||
|
||||
for (iter = hyperv_mmio; iter; iter = iter->sibling) {
|
||||
if ((iter->start >= start + size) || (iter->end <= start))
|
||||
continue;
|
||||
|
||||
__release_region(iter, start, size);
|
||||
}
|
||||
|
||||
skip_shadow_release:
|
||||
release_mem_region(start, size);
|
||||
up(&hyperv_mmio_lock);
|
||||
mutex_unlock(&hyperv_mmio_lock);
|
||||
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(vmbus_free_mmio);
|
||||
|
|
|
|||
|
|
@ -22,11 +22,13 @@
|
|||
*/
|
||||
#define AD7314_TEMP_MASK 0x7FE0
|
||||
#define AD7314_TEMP_SHIFT 5
|
||||
#define AD7314_LEADING_ZEROS_MASK BIT(15)
|
||||
|
||||
/*
|
||||
* ADT7301 and ADT7302 temperature masks
|
||||
*/
|
||||
#define ADT7301_TEMP_MASK 0x3FFF
|
||||
#define ADT7301_LEADING_ZEROS_MASK (BIT(15) | BIT(14))
|
||||
|
||||
enum ad7314_variant {
|
||||
adt7301,
|
||||
|
|
@ -65,12 +67,20 @@ static ssize_t ad7314_temperature_show(struct device *dev,
|
|||
return ret;
|
||||
switch (spi_get_device_id(chip->spi_dev)->driver_data) {
|
||||
case ad7314:
|
||||
if (ret & AD7314_LEADING_ZEROS_MASK) {
|
||||
/* Invalid read-out, leading zero part is missing */
|
||||
return -EIO;
|
||||
}
|
||||
data = (ret & AD7314_TEMP_MASK) >> AD7314_TEMP_SHIFT;
|
||||
data = sign_extend32(data, 9);
|
||||
|
||||
return sprintf(buf, "%d\n", 250 * data);
|
||||
case adt7301:
|
||||
case adt7302:
|
||||
if (ret & ADT7301_LEADING_ZEROS_MASK) {
|
||||
/* Invalid read-out, leading zero part is missing */
|
||||
return -EIO;
|
||||
}
|
||||
/*
|
||||
* Documented as a 13 bit twos complement register
|
||||
* with a sign bit - which is a 14 bit 2's complement
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue