This is the 5.4.243 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmRkoEsACgkQONu9yGCS aT6nbBAAxLX8QMuKuA8fcSFqQTZwrGAW/x7aOih1Sgkw/pttE8t8/q9sxlPZHljK UnZWzy/xjBayWA4aEskkd8pvZh7uXqcQH56UuiuzTiZwNtKQfAlvbVjsibzOk8mt leuNP1F/Kod7CFYi/o8yoo4tUrWPmNLgc5ZaAvR/FYapanpYLB/6I9u2mf8HPjRP tF1PwYPl9V7NdiAx5Liw6mczBI+v05FY7+G2tsUrnE/XM3SFOg8mwKNTksBeiZ8a vZxCwQgTohUR2yKMjSrsKnZ2sQAoskOlpc8YpdwSk2s7KZKf+QcI6Y2BhneK/A7+ BU9vQr8Y0qrciBrpZvBGLcBhcmXUQwgZBh4VKUwJCUWijSQRSjhs/3+rAyvj74rF w8hP6EDgyAb5fKSU//MAZiFqdQfzowGne2Uin/rgyhyK9l+zxRCRtY1Ra+T75Jvl 2MNU+VwvfRzzGJtP4BiuA2qoHsTqmLK2SUUrqmhyRm2D3cK17NuIJeGMwt3BXDzw g+FpXoVGmkmfl+HHQLWdqpJ654APpJgxjhK6Hjca5608V+FIW7FGScAWX2CRmpUK rTAUPloptXIuo41CI+z7hdmYSfFtJymOgd650p5ntmro+7tMRQkhhjnEDDF8y1Jr 703VIa3QkRWRE5/xGi2KM2GgEH81j0s2Nyo/7JQtiitOjqtpgJ4= =SrzM -----END PGP SIGNATURE----- Merge 5.4.243 into android11-5.4-lts Changes in 5.4.243 counter: 104-quad-8: Fix race condition between FLAG and CNTR reads wifi: brcmfmac: slab-out-of-bounds read in brcmf_get_assoc_ies() drm/fb-helper: set x/yres_virtual in drm_fb_helper_check_var bluetooth: Perform careful capability checks in hci_sock_ioctl() USB: serial: option: add UNISOC vendor and TOZED LT70C product iio: adc: palmas_gpadc: fix NULL dereference on rmmod ASoC: Intel: bytcr_rt5640: Add quirk for the Acer Iconia One 7 B1-750 asm-generic/io.h: suppress endianness warnings for readq() and writeq() USB: dwc3: fix runtime pm imbalance on probe errors USB: dwc3: fix runtime pm imbalance on unbind perf sched: Cast PTHREAD_STACK_MIN to int as it may turn into sysconf(__SC_THREAD_STACK_MIN_VALUE) staging: iio: resolver: ads1210: fix config mode debugfs: regset32: Add Runtime PM support xhci: fix debugfs register accesses while suspended MIPS: fw: Allow firmware to pass a empty env ipmi:ssif: Add send_retries increment ipmi: fix SSIF not responding under certain cond. kheaders: Use array declaration instead of char pwm: meson: Fix axg ao mux parents pwm: meson: Fix g12a ao clk81 name ring-buffer: Sync IRQ works before buffer destruction reiserfs: Add security prefix to xattr name in reiserfs_security_write() KVM: nVMX: Emulate NOPs in L2, and PAUSE if it's not intercepted i2c: omap: Fix standard mode false ACK readings Revert "ubifs: dirty_cow_znode: Fix memleak in error handling path" ubifs: Fix memleak when insert_old_idx() failed ubi: Fix return value overwrite issue in try_write_vid_and_data() ubifs: Free memory for tmpfile name selinux: fix Makefile dependencies of flask.h selinux: ensure av_permissions.h is built when needed tpm, tpm_tis: Do not skip reset of original interrupt vector erofs: stop parsing non-compact HEAD index if clusterofs is invalid erofs: fix potential overflow calculating xattr_isize drm/rockchip: Drop unbalanced obj unref drm/vgem: add missing mutex_destroy drm/probe-helper: Cancel previous job before starting new one arm64: dts: renesas: r8a77990: Remove bogus voltages from OPP table arm64: dts: renesas: r8a774c0: Remove bogus voltages from OPP table EDAC/skx: Fix overflows on the DRAM row address mapping arrays ARM: dts: qcom: ipq4019: Fix the PCI I/O port range ARM: dts: qcom: ipq8064: reduce pci IO size to 64K ARM: dts: qcom: ipq8064: Fix the PCI I/O port range media: bdisp: Add missing check for create_workqueue media: uapi: add MEDIA_BUS_FMT_METADATA_FIXED media bus format. media: av7110: prevent underflow in write_ts_to_decoder() firmware: qcom_scm: Clear download bit during reboot drm/msm: fix unbalanced pm_runtime_enable in adreno_gpu_{init, cleanup} drm/msm/adreno: Defer enabling runpm until hw_init() drm/msm/adreno: drop bogus pm_runtime_set_active() mmc: sdhci-of-esdhc: fix quirk to ignore command inhibit for data drm/lima/lima_drv: Add missing unwind goto in lima_pdev_probe() regulator: core: Consistently set mutex_owner when using ww_mutex_lock_slow() regulator: core: Avoid lockdep reports when resolving supplies x86/apic: Fix atomic update of offset in reserve_eilvt_offset() media: dm1105: Fix use after free bug in dm1105_remove due to race condition media: saa7134: fix use after free bug in saa7134_finidev due to race condition media: rcar_fdp1: simplify error check logic at fdp_open() media: rcar_fdp1: fix pm_runtime_get_sync() usage count media: rcar_fdp1: Make use of the helper function devm_platform_ioremap_resource() media: rcar_fdp1: Fix the correct variable assignments media: rcar_fdp1: Fix refcount leak in probe and remove function media: rc: gpio-ir-recv: Fix support for wake-up regulator: stm32-pwr: fix of_iomap leak x86/ioapic: Don't return 0 from arch_dynirq_lower_bound() arm64: kgdb: Set PSTATE.SS to 1 to re-enable single-step debugobject: Prevent init race with static objects timekeeping: Split jiffies seqlock tick/sched: Use tick_next_period for lockless quick check tick/sched: Reduce seqcount held scope in tick_do_update_jiffies64() tick/sched: Optimize tick_do_update_jiffies64() further tick: Get rid of tick_period tick/common: Align tick period with the HZ tick. wifi: ath6kl: minor fix for allocation size wifi: ath9k: hif_usb: fix memory leak of remain_skbs wifi: ath5k: fix an off by one check in ath5k_eeprom_read_freq_list() wifi: ath6kl: reduce WARN to dev_dbg() in callback tools: bpftool: Remove invalid \' json escape wifi: rtw88: mac: Return the original error from rtw_pwr_seq_parser() wifi: rtw88: mac: Return the original error from rtw_mac_power_switch() scm: fix MSG_CTRUNC setting condition for SO_PASSSEC vlan: partially enable SIOCSHWTSTAMP in container net/packet: annotate accesses to po->xmit net/packet: convert po->origdev to an atomic flag net/packet: convert po->auxdata to an atomic flag scsi: target: iscsit: Fix TAS handling during conn cleanup scsi: megaraid: Fix mega_cmd_done() CMDID_INT_CMDS f2fs: handle dqget error in f2fs_transfer_project_quota() rtlwifi: Start changing RT_TRACE into rtl_dbg rtlwifi: Replace RT_TRACE with rtl_dbg wifi: rtlwifi: fix incorrect error codes in rtl_debugfs_set_write_rfreg() wifi: rtlwifi: fix incorrect error codes in rtl_debugfs_set_write_reg() bpftool: Fix bug for long instructions in program CFG dumps crypto: drbg - make drbg_prepare_hrng() handle jent instantiation errors crypto: drbg - Only fail when jent is unavailable in FIPS mode scsi: lpfc: Fix ioremap issues in lpfc_sli4_pci_mem_setup() bpf, sockmap: fix deadlocks in the sockhash and sockmap nvme: handle the persistent internal error AER nvme: fix async event trace event nvme-fcloop: fix "inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage" bpf, sockmap: Revert buggy deadlock fix in the sockhash and sockmap md/raid10: fix leak of 'r10bio->remaining' for recovery md/raid10: fix memleak for 'conf->bio_split' md: update the optimal I/O size on reshape md/raid10: fix memleak of md thread wifi: iwlwifi: make the loop for card preparation effective wifi: iwlwifi: mvm: check firmware response size ixgbe: Allow flow hash to be set via ethtool ixgbe: Enable setting RSS table to default values bpf: Don't EFAULT for getsockopt with optval=NULL netfilter: nf_tables: don't write table validation state without mutex ipv4: Fix potential uninit variable access bug in __ip_make_skb() Revert "Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work" netlink: Use copy_to_user() for optval in netlink_getsockopt(). net: amd: Fix link leak when verifying config failed tcp/udp: Fix memleaks of sk and zerocopy skbs with TX timestamp. pstore: Revert pmsg_lock back to a normal mutex usb: host: xhci-rcar: remove leftover quirk handling fpga: bridge: fix kernel-doc parameter description iio: light: max44009: add missing OF device matching usb: gadget: udc: renesas_usb3: Fix use after free bug in renesas_usb3_remove due to race condition PCI: imx6: Install the fault handler only on compatible match genirq: Add IRQF_NO_AUTOEN for request_irq/nmi() ASoC: es8316: Use IRQF_NO_AUTOEN when requesting the IRQ ASoC: es8316: Handle optional IRQ assignment linux/vt_buffer.h: allow either builtin or modular for macros spi: qup: Don't skip cleanup in remove's error path spi: fsl-spi: Fix CPM/QE mode Litte Endian vmci_host: fix a race condition in vmci_host_poll() causing GPF of: Fix modalias string generation ia64: mm/contig: fix section mismatch warning/error ia64: salinfo: placate defined-but-not-used warning scripts/gdb: bail early if there are no clocks PM: domains: Fix up terminology with parent/child scripts/gdb: bail early if there are no generic PD mtd: spi-nor: cadence-quadspi: Make driver independent of flash geometry mtd: spi-nor: cadence-quadspi: Provide a way to disable DAC mode mtd: spi-nor: cadence-quadspi: Don't initialize rx_dma_complete on failure mtd: spi-nor: cadence-quadspi: Handle probe deferral while requesting DMA channel spi: cadence-quadspi: fix suspend-resume implementations uapi/linux/const.h: prefer ISO-friendly __typeof__ sh: sq: Fix incorrect element size for allocating bitmap buffer usb: chipidea: fix missing goto in `ci_hdrc_probe` usb: mtu3: fix kernel panic at qmu transfer done irq handler firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in probe tty: serial: fsl_lpuart: adjust buffer length to the intended size serial: 8250: Add missing wakeup event reporting staging: rtl8192e: Fix W_DISABLE# does not work after stop/start spmi: Add a check for remove callback when removing a SPMI driver macintosh/windfarm_smu_sat: Add missing of_node_put() powerpc/mpc512x: fix resource printk format warning powerpc/wii: fix resource printk format warnings powerpc/sysdev/tsi108: fix resource printk format warnings macintosh: via-pmu-led: requires ATA to be set powerpc/rtas: use memmove for potentially overlapping buffer copy perf/core: Fix hardlockup failure caused by perf throttle RDMA/siw: Fix potential page_array out of range access RDMA/rdmavt: Delete unnecessary NULL check rtc: omap: include header for omap_rtc_power_off_program prototype RDMA/mlx4: Prevent shift wrapping in set_user_sq_size() rtc: meson-vrtc: Use ktime_get_real_ts64() to get the current time power: supply: generic-adc-battery: fix unit scaling clk: add missing of_node_put() in "assigned-clocks" property parsing RDMA/siw: Remove namespace check from siw_netdev_event() IB/hfi1: Fix SDMA mmu_rb_node not being evicted in LRU order NFSv4.1: Always send a RECLAIM_COMPLETE after establishing lease firmware: raspberrypi: Keep count of all consumers firmware: raspberrypi: Introduce devm_rpi_firmware_get() input: raspberrypi-ts: Release firmware handle when not needed Input: raspberrypi-ts - fix refcount leak in rpi_ts_probe SUNRPC: remove the maximum number of retries in call_bind_status RDMA/mlx5: Use correct device num_ports when modify DC clocksource/drivers/davinci: Avoid trailing '\n' hidden in pr_fmt() clocksource: davinci: axe a pointless __GFP_NOFAIL clocksource/drivers/davinci: Fix memory leak in davinci_timer_register when init fails openrisc: Properly store r31 to pt_regs on unhandled exceptions ext4: fix use-after-free read in ext4_find_extent for bigalloc + inline leds: TI_LMU_COMMON: select REGMAP instead of depending on it dmaengine: mv_xor_v2: Fix an error code. pwm: mtk-disp: Don't check the return code of pwmchip_remove() pwm: mtk-disp: Adjust the clocks to avoid them mismatch pwm: mtk-disp: Disable shadow registers before setting backlight values phy: tegra: xusb: Add missing tegra_xusb_port_unregister for usb2_port and ulpi_port dmaengine: dw-edma: Fix to change for continuous transfer dmaengine: dw-edma: Fix to enable to issue dma request on DMA processing dmaengine: at_xdmac: do not enable all cyclic channels afs: Fix updating of i_size with dv jump from server parisc: Fix argument pointer in real64_call_asm() nilfs2: do not write dirty data after degenerating to read-only nilfs2: fix infinite loop in nilfs_mdt_get_block() md/raid10: fix null-ptr-deref in raid10_sync_request mailbox: zynqmp: Fix IPI isr handling mailbox: zynqmp: Fix typo in IPI documentation wifi: rtl8xxxu: RTL8192EU always needs full init clk: rockchip: rk3399: allow clk_cifout to force clk_cifout_src to reparent scripts/gdb: fix lx-timerlist for Python3 btrfs: scrub: reject unsupported scrub flags s390/dasd: fix hanging blockdevice after request requeue dm clone: call kmem_cache_destroy() in dm_clone_init() error path dm integrity: call kmem_cache_destroy() in dm_integrity_init() error path dm flakey: fix a crash with invalid table line dm ioctl: fix nested locking in table_clear() to remove deadlock concern perf auxtrace: Fix address filter entire kernel size perf intel-pt: Fix CYC timestamps after standalone CBR debugobject: Ensure pool refill (again) netfilter: nf_tables: deactivate anonymous set from preparation phase nohz: Add TICK_DEP_BIT_RCU tick/nohz: Fix cpu_is_hotpluggable() by checking with nohz subsystem mailbox: zynq: Switch to flexible array to simplify code mailbox: zynqmp: Fix counts of child nodes dm verity: skip redundant verity_handle_err() on I/O errors dm verity: fix error handling for check_at_most_once on FEC crypto: inside-secure - irq balance crypto: safexcel - Cleanup ring IRQ workqueues on load failure kernel/relay.c: fix read_pos error when multiple readers relayfs: fix out-of-bounds access in relay_file_read net/ncsi: clear Tx enable mode when handling a Config required AEN net/sched: cls_api: remove block_cb from driver_list before freeing sit: update dev->needed_headroom in ipip6_tunnel_bind_dev() net: dsa: mv88e6xxx: add mv88e6321 rsvd2cpu writeback: fix call of incorrect macro net/sched: act_mirred: Add carrier check rxrpc: Fix hard call timeout units ionic: remove noise from ethtool rxnfc error msg af_packet: Don't send zero-byte data in packet_sendmsg_spkt(). drm/amdgpu: add a missing lock for AMDGPU_SCHED ALSA: caiaq: input: Add error handling for unsupported input methods in `snd_usb_caiaq_input_init` net: dsa: mt7530: fix corrupt frames using trgmii on 40 MHz XTAL MT7621 virtio_net: split free_unused_bufs() virtio_net: suppress cpu stall when free_unused_bufs perf vendor events power9: Remove UTF-8 characters from JSON files perf map: Delete two variable initialisations before null pointer checks in sort__sym_from_cmp() perf symbols: Fix return incorrect build_id size in elf_read_build_id() btrfs: fix btrfs_prev_leaf() to not return the same key twice btrfs: don't free qgroup space unless specified btrfs: print-tree: parent bytenr must be aligned to sector size cifs: fix pcchunk length type in smb2_copychunk_range platform/x86: touchscreen_dmi: Add info for the Dexp Ursus KX210i inotify: Avoid reporting event with invalid wd sh: math-emu: fix macro redefined warning sh: init: use OF_EARLY_FLATTREE for early init sh: nmi_debug: fix return value of __setup handler remoteproc: stm32: Call of_node_put() on iteration error remoteproc: st: Call of_node_put() on iteration error ARM: dts: exynos: fix WM8960 clock name in Itop Elite ARM: dts: s5pv210: correct MIPI CSIS clock name f2fs: fix potential corruption when moving a directory drm/panel: otm8009a: Set backlight parent to panel device drm/amdgpu: fix an amdgpu_irq_put() issue in gmc_v9_0_hw_fini() drm/amdgpu/gfx: disable gfx9 cp_ecc_error_irq only when enabling legacy gfx ras drm/amdgpu: disable sdma ecc irq only when sdma RAS is enabled in suspend HID: wacom: Set a default resolution for older tablets HID: wacom: insert timestamp to packed Bluetooth (BT) events ext4: fix WARNING in mb_find_extent ext4: avoid a potential slab-out-of-bounds in ext4_group_desc_csum ext4: fix data races when using cached status extents ext4: improve error recovery code paths in __ext4_remount() ext4: fix deadlock when converting an inline directory in nojournal mode ext4: add bounds checking in get_max_inline_xattr_value_size() ext4: bail out of ext4_xattr_ibody_get() fails for any reason ext4: remove a BUG_ON in ext4_mb_release_group_pa() ext4: fix invalid free tracking in ext4_xattr_move_to_block() tty: Prevent writing chars during tcsetattr TCSADRAIN/FLUSH serial: 8250: Fix serial8250_tx_empty() race with DMA Tx drbd: correctly submit flush bio on barrier PCI: pciehp: Use down_read/write_nested(reset_lock) to fix lockdep errors PCI: pciehp: Fix AB-BA deadlock between reset_lock and device_lock printk: declare printk_deferred_{enter,safe}() in include/linux/printk.h PM: domains: Restore comment indentation for generic_pm_domain.child_links drm/msm: Fix double pm_runtime_disable() call firmware: raspberrypi: fix possible memory leak in rpi_firmware_probe() drm/msm/adreno: Fix null ptr access in adreno_gpu_cleanup() drm/exynos: move to use request_irq by IRQF_NO_AUTOEN flag mm/page_alloc: fix potential deadlock on zonelist_update_seq seqlock drm/amd/display: Fix hang when skipping modeset Linux 5.4.243 Change-Id: I103e06e639a82ddc7ca60ffed98c898946b81542 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
88ac2d9193
@ -7794,3 +7794,30 @@ formats.
|
||||
- 0x5001
|
||||
- Interleaved raw UYVY and JPEG image format with embedded meta-data
|
||||
used by Samsung S3C73MX camera sensors.
|
||||
|
||||
.. _v4l2-mbus-metadata-fmts:
|
||||
|
||||
Metadata Formats
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This section lists all metadata formats.
|
||||
|
||||
The following table lists the existing metadata formats.
|
||||
|
||||
.. tabularcolumns:: |p{8.0cm}|p{1.4cm}|p{7.7cm}|
|
||||
|
||||
.. flat-table:: Metadata formats
|
||||
:header-rows: 1
|
||||
:stub-columns: 0
|
||||
|
||||
* - Identifier
|
||||
- Code
|
||||
- Comments
|
||||
* .. _MEDIA-BUS-FMT-METADATA-FIXED:
|
||||
|
||||
- MEDIA_BUS_FMT_METADATA_FIXED
|
||||
- 0x7001
|
||||
- This format should be used when the same driver handles
|
||||
both sides of the link and the bus format is a fixed
|
||||
metadata format that is not configurable from userspace.
|
||||
Width and height will be set to 0 for this format.
|
||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 242
|
||||
SUBLEVEL = 243
|
||||
EXTRAVERSION =
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
|
@ -179,7 +179,7 @@
|
||||
compatible = "wlf,wm8960";
|
||||
reg = <0x1a>;
|
||||
clocks = <&pmu_system_controller 0>;
|
||||
clock-names = "MCLK1";
|
||||
clock-names = "mclk";
|
||||
wlf,shared-lrclk;
|
||||
#sound-dai-cells = <0>;
|
||||
};
|
||||
|
@ -393,8 +393,8 @@
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
ranges = <0x81000000 0 0x40200000 0x40200000 0 0x00100000>,
|
||||
<0x82000000 0 0x40300000 0x40300000 0 0x00d00000>;
|
||||
ranges = <0x81000000 0x0 0x00000000 0x40200000 0x0 0x00100000>,
|
||||
<0x82000000 0x0 0x40300000 0x40300000 0x0 0x00d00000>;
|
||||
|
||||
interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
|
@ -451,8 +451,8 @@
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
ranges = <0x81000000 0 0x0fe00000 0x0fe00000 0 0x00100000 /* downstream I/O */
|
||||
0x82000000 0 0x08000000 0x08000000 0 0x07e00000>; /* non-prefetchable memory */
|
||||
ranges = <0x81000000 0x0 0x00000000 0x0fe00000 0x0 0x00010000 /* I/O */
|
||||
0x82000000 0x0 0x08000000 0x08000000 0x0 0x07e00000>; /* MEM */
|
||||
|
||||
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
@ -502,8 +502,8 @@
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
ranges = <0x81000000 0 0x31e00000 0x31e00000 0 0x00100000 /* downstream I/O */
|
||||
0x82000000 0 0x2e000000 0x2e000000 0 0x03e00000>; /* non-prefetchable memory */
|
||||
ranges = <0x81000000 0x0 0x00000000 0x31e00000 0x0 0x00010000 /* I/O */
|
||||
0x82000000 0x0 0x2e000000 0x2e000000 0x0 0x03e00000>; /* MEM */
|
||||
|
||||
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
@ -553,8 +553,8 @@
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
ranges = <0x81000000 0 0x35e00000 0x35e00000 0 0x00100000 /* downstream I/O */
|
||||
0x82000000 0 0x32000000 0x32000000 0 0x03e00000>; /* non-prefetchable memory */
|
||||
ranges = <0x81000000 0x0 0x00000000 0x35e00000 0x0 0x00010000 /* I/O */
|
||||
0x82000000 0x0 0x32000000 0x32000000 0x0 0x03e00000>; /* MEM */
|
||||
|
||||
interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
|
@ -571,7 +571,7 @@
|
||||
interrupts = <29>;
|
||||
clocks = <&clocks CLK_CSIS>,
|
||||
<&clocks SCLK_CSIS>;
|
||||
clock-names = "clk_csis",
|
||||
clock-names = "csis",
|
||||
"sclk_csis";
|
||||
bus-width = <4>;
|
||||
status = "disabled";
|
||||
|
@ -49,17 +49,14 @@
|
||||
opp-shared;
|
||||
opp-800000000 {
|
||||
opp-hz = /bits/ 64 <800000000>;
|
||||
opp-microvolt = <820000>;
|
||||
clock-latency-ns = <300000>;
|
||||
};
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
opp-microvolt = <820000>;
|
||||
clock-latency-ns = <300000>;
|
||||
};
|
||||
opp-1200000000 {
|
||||
opp-hz = /bits/ 64 <1200000000>;
|
||||
opp-microvolt = <820000>;
|
||||
clock-latency-ns = <300000>;
|
||||
opp-suspend;
|
||||
};
|
||||
|
@ -60,17 +60,14 @@
|
||||
opp-shared;
|
||||
opp-800000000 {
|
||||
opp-hz = /bits/ 64 <800000000>;
|
||||
opp-microvolt = <820000>;
|
||||
clock-latency-ns = <300000>;
|
||||
};
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
opp-microvolt = <820000>;
|
||||
clock-latency-ns = <300000>;
|
||||
};
|
||||
opp-1200000000 {
|
||||
opp-hz = /bits/ 64 <1200000000>;
|
||||
opp-microvolt = <820000>;
|
||||
clock-latency-ns = <300000>;
|
||||
opp-suspend;
|
||||
};
|
||||
|
@ -116,6 +116,7 @@ void user_regs_reset_single_step(struct user_pt_regs *regs,
|
||||
void kernel_enable_single_step(struct pt_regs *regs);
|
||||
void kernel_disable_single_step(void);
|
||||
int kernel_active_single_step(void);
|
||||
void kernel_rewind_single_step(struct pt_regs *regs);
|
||||
|
||||
#ifdef CONFIG_HAVE_HW_BREAKPOINT
|
||||
int reinstall_suspended_bps(struct pt_regs *regs);
|
||||
|
@ -441,6 +441,11 @@ int kernel_active_single_step(void)
|
||||
}
|
||||
NOKPROBE_SYMBOL(kernel_active_single_step);
|
||||
|
||||
void kernel_rewind_single_step(struct pt_regs *regs)
|
||||
{
|
||||
set_regs_spsr_ss(regs);
|
||||
}
|
||||
|
||||
/* ptrace API */
|
||||
void user_enable_single_step(struct task_struct *task)
|
||||
{
|
||||
|
@ -223,6 +223,8 @@ int kgdb_arch_handle_exception(int exception_vector, int signo,
|
||||
*/
|
||||
if (!kernel_active_single_step())
|
||||
kernel_enable_single_step(linux_regs);
|
||||
else
|
||||
kernel_rewind_single_step(linux_regs);
|
||||
err = 0;
|
||||
break;
|
||||
default:
|
||||
|
@ -581,7 +581,7 @@ static int salinfo_cpu_pre_down(unsigned int cpu)
|
||||
* 'data' contains an integer that corresponds to the feature we're
|
||||
* testing
|
||||
*/
|
||||
static int proc_salinfo_show(struct seq_file *m, void *v)
|
||||
static int __maybe_unused proc_salinfo_show(struct seq_file *m, void *v)
|
||||
{
|
||||
unsigned long data = (unsigned long)v;
|
||||
seq_puts(m, (sal_platform_features & data) ? "1\n" : "0\n");
|
||||
|
@ -81,7 +81,7 @@ skip:
|
||||
return __per_cpu_start + __per_cpu_offset[smp_processor_id()];
|
||||
}
|
||||
|
||||
static inline void
|
||||
static inline __init void
|
||||
alloc_per_cpu_data(void)
|
||||
{
|
||||
size_t size = PERCPU_PAGE_SIZE * num_possible_cpus();
|
||||
|
@ -51,7 +51,7 @@ char *fw_getenv(char *envname)
|
||||
{
|
||||
char *result = NULL;
|
||||
|
||||
if (_fw_envp != NULL) {
|
||||
if (_fw_envp != NULL && fw_envp(0) != NULL) {
|
||||
/*
|
||||
* Return a pointer to the given environment variable.
|
||||
* YAMON uses "name", "value" pairs, while U-Boot uses
|
||||
|
@ -173,7 +173,6 @@ handler: ;\
|
||||
l.sw PT_GPR28(r1),r28 ;\
|
||||
l.sw PT_GPR29(r1),r29 ;\
|
||||
/* r30 already save */ ;\
|
||||
/* l.sw PT_GPR30(r1),r30*/ ;\
|
||||
l.sw PT_GPR31(r1),r31 ;\
|
||||
TRACE_IRQS_OFF_ENTRY ;\
|
||||
/* Store -1 in orig_gpr11 for non-syscall exceptions */ ;\
|
||||
@ -211,9 +210,8 @@ handler: ;\
|
||||
l.sw PT_GPR27(r1),r27 ;\
|
||||
l.sw PT_GPR28(r1),r28 ;\
|
||||
l.sw PT_GPR29(r1),r29 ;\
|
||||
/* r31 already saved */ ;\
|
||||
l.sw PT_GPR30(r1),r30 ;\
|
||||
/* l.sw PT_GPR31(r1),r31 */ ;\
|
||||
/* r30 already saved */ ;\
|
||||
l.sw PT_GPR31(r1),r31 ;\
|
||||
/* Store -1 in orig_gpr11 for non-syscall exceptions */ ;\
|
||||
l.addi r30,r0,-1 ;\
|
||||
l.sw PT_ORIG_GPR11(r1),r30 ;\
|
||||
|
@ -248,9 +248,6 @@ ENTRY_CFI(real64_call_asm)
|
||||
/* save fn */
|
||||
copy %arg2, %r31
|
||||
|
||||
/* set up the new ap */
|
||||
ldo 64(%arg1), %r29
|
||||
|
||||
/* load up the arg registers from the saved arg area */
|
||||
/* 32-bit calling convention passes first 4 args in registers */
|
||||
ldd 0*REG_SZ(%arg1), %arg0 /* note overwriting arg0 */
|
||||
@ -262,7 +259,9 @@ ENTRY_CFI(real64_call_asm)
|
||||
ldd 7*REG_SZ(%arg1), %r19
|
||||
ldd 1*REG_SZ(%arg1), %arg1 /* do this one last! */
|
||||
|
||||
/* set up real-mode stack and real-mode ap */
|
||||
tophys_r1 %sp
|
||||
ldo -16(%sp), %r29 /* Reference param save area */
|
||||
|
||||
b,l rfi_virt2real,%r2
|
||||
nop
|
||||
|
@ -398,7 +398,7 @@ static char *__fetch_rtas_last_error(char *altbuf)
|
||||
buf = kmalloc(RTAS_ERROR_LOG_MAX, GFP_ATOMIC);
|
||||
}
|
||||
if (buf)
|
||||
memcpy(buf, rtas_err_buf, RTAS_ERROR_LOG_MAX);
|
||||
memmove(buf, rtas_err_buf, RTAS_ERROR_LOG_MAX);
|
||||
}
|
||||
|
||||
return buf;
|
||||
|
@ -984,7 +984,7 @@ static void mpc5121_clk_provide_migration_support(void)
|
||||
|
||||
#define NODE_PREP do { \
|
||||
of_address_to_resource(np, 0, &res); \
|
||||
snprintf(devname, sizeof(devname), "%08x.%s", res.start, np->name); \
|
||||
snprintf(devname, sizeof(devname), "%pa.%s", &res.start, np->name); \
|
||||
} while (0)
|
||||
|
||||
#define NODE_CHK(clkname, clkitem, regnode, regflag) do { \
|
||||
|
@ -144,7 +144,7 @@ static struct irq_domain * __init flipper_pic_init(struct device_node *np)
|
||||
}
|
||||
io_base = ioremap(res.start, resource_size(&res));
|
||||
|
||||
pr_info("controller at 0x%08x mapped to 0x%p\n", res.start, io_base);
|
||||
pr_info("controller at 0x%pa mapped to 0x%p\n", &res.start, io_base);
|
||||
|
||||
__flipper_quiesce(io_base);
|
||||
|
||||
|
@ -173,7 +173,7 @@ static struct irq_domain *hlwd_pic_init(struct device_node *np)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pr_info("controller at 0x%08x mapped to 0x%p\n", res.start, io_base);
|
||||
pr_info("controller at 0x%pa mapped to 0x%p\n", &res.start, io_base);
|
||||
|
||||
__hlwd_quiesce(io_base);
|
||||
|
||||
|
@ -89,8 +89,8 @@ static void __iomem *wii_ioremap_hw_regs(char *name, char *compatible)
|
||||
|
||||
hw_regs = ioremap(res.start, resource_size(&res));
|
||||
if (hw_regs) {
|
||||
pr_info("%s at 0x%08x mapped to 0x%p\n", name,
|
||||
res.start, hw_regs);
|
||||
pr_info("%s at 0x%pa mapped to 0x%p\n", name,
|
||||
&res.start, hw_regs);
|
||||
}
|
||||
|
||||
out_put:
|
||||
|
@ -216,9 +216,8 @@ int __init tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary)
|
||||
|
||||
(hose)->ops = &tsi108_direct_pci_ops;
|
||||
|
||||
printk(KERN_INFO "Found tsi108 PCI host bridge at 0x%08x. "
|
||||
"Firmware bus number: %d->%d\n",
|
||||
rsrc.start, hose->first_busno, hose->last_busno);
|
||||
pr_info("Found tsi108 PCI host bridge at 0x%pa. Firmware bus number: %d->%d\n",
|
||||
&rsrc.start, hose->first_busno, hose->last_busno);
|
||||
|
||||
/* Interpret the "ranges" property */
|
||||
/* This also maps the I/O region and sets isa_io/mem_base */
|
||||
|
@ -380,7 +380,7 @@ static int __init sq_api_init(void)
|
||||
if (unlikely(!sq_cache))
|
||||
return ret;
|
||||
|
||||
sq_bitmap = kzalloc(size, GFP_KERNEL);
|
||||
sq_bitmap = kcalloc(size, sizeof(long), GFP_KERNEL);
|
||||
if (unlikely(!sq_bitmap))
|
||||
goto out;
|
||||
|
||||
|
@ -64,7 +64,7 @@ ENTRY(_stext)
|
||||
ldc r0, r6_bank
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_OF_FLATTREE
|
||||
#ifdef CONFIG_OF_EARLY_FLATTREE
|
||||
mov r4, r12 ! Store device tree blob pointer in r12
|
||||
#endif
|
||||
|
||||
@ -315,7 +315,7 @@ ENTRY(_stext)
|
||||
10:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_OF_FLATTREE
|
||||
#ifdef CONFIG_OF_EARLY_FLATTREE
|
||||
mov.l 8f, r0 ! Make flat device tree available early.
|
||||
jsr @r0
|
||||
mov r12, r4
|
||||
@ -346,7 +346,7 @@ ENTRY(stack_start)
|
||||
5: .long start_kernel
|
||||
6: .long cpu_init
|
||||
7: .long init_thread_union
|
||||
#if defined(CONFIG_OF_FLATTREE)
|
||||
#if defined(CONFIG_OF_EARLY_FLATTREE)
|
||||
8: .long sh_fdt_init
|
||||
#endif
|
||||
|
||||
|
@ -49,7 +49,7 @@ static int __init nmi_debug_setup(char *str)
|
||||
register_die_notifier(&nmi_debug_nb);
|
||||
|
||||
if (*str != '=')
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
for (p = str + 1; *p; p = sep + 1) {
|
||||
sep = strchr(p, ',');
|
||||
@ -70,6 +70,6 @@ static int __init nmi_debug_setup(char *str)
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
__setup("nmi_debug", nmi_debug_setup);
|
||||
|
@ -243,7 +243,7 @@ void __init __weak plat_early_device_setup(void)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef CONFIG_OF_FLATTREE
|
||||
#ifdef CONFIG_OF_EARLY_FLATTREE
|
||||
void __ref sh_fdt_init(phys_addr_t dt_phys)
|
||||
{
|
||||
static int done = 0;
|
||||
@ -330,7 +330,7 @@ void __init setup_arch(char **cmdline_p)
|
||||
/* Let earlyprintk output early console messages */
|
||||
early_platform_driver_probe("earlyprintk", 1, 1);
|
||||
|
||||
#ifdef CONFIG_OF_FLATTREE
|
||||
#ifdef CONFIG_OF_EARLY_FLATTREE
|
||||
#ifdef CONFIG_USE_BUILTIN_DTB
|
||||
unflatten_and_copy_device_tree();
|
||||
#else
|
||||
|
@ -67,7 +67,3 @@
|
||||
} while (0)
|
||||
|
||||
#define abort() return 0
|
||||
|
||||
#define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
|
||||
|
||||
|
@ -410,10 +410,9 @@ static unsigned int reserve_eilvt_offset(int offset, unsigned int new)
|
||||
if (vector && !eilvt_entry_is_changeable(vector, new))
|
||||
/* may not change if vectors are different */
|
||||
return rsvd;
|
||||
rsvd = atomic_cmpxchg(&eilvt_offsets[offset], rsvd, new);
|
||||
} while (rsvd != new);
|
||||
} while (!atomic_try_cmpxchg(&eilvt_offsets[offset], &rsvd, new));
|
||||
|
||||
rsvd &= ~APIC_EILVT_MASKED;
|
||||
rsvd = new & ~APIC_EILVT_MASKED;
|
||||
if (rsvd && rsvd != vector)
|
||||
pr_info("LVT offset %d assigned for vector 0x%02x\n",
|
||||
offset, rsvd);
|
||||
|
@ -2455,17 +2455,21 @@ static int io_apic_get_redir_entries(int ioapic)
|
||||
|
||||
unsigned int arch_dynirq_lower_bound(unsigned int from)
|
||||
{
|
||||
unsigned int ret;
|
||||
|
||||
/*
|
||||
* dmar_alloc_hwirq() may be called before setup_IO_APIC(), so use
|
||||
* gsi_top if ioapic_dynirq_base hasn't been initialized yet.
|
||||
*/
|
||||
if (!ioapic_initialized)
|
||||
return gsi_top;
|
||||
ret = ioapic_dynirq_base ? : gsi_top;
|
||||
|
||||
/*
|
||||
* For DT enabled machines ioapic_dynirq_base is irrelevant and not
|
||||
* updated. So simply return @from if ioapic_dynirq_base == 0.
|
||||
* For DT enabled machines ioapic_dynirq_base is irrelevant and
|
||||
* always 0. gsi_top can be 0 if there is no IO/APIC registered.
|
||||
* 0 is an invalid interrupt number for dynamic allocations. Return
|
||||
* @from instead.
|
||||
*/
|
||||
return ioapic_dynirq_base ? : from;
|
||||
return ret ? : from;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
|
@ -7266,6 +7266,21 @@ static int vmx_check_intercept(struct kvm_vcpu *vcpu,
|
||||
/* FIXME: produce nested vmexit and return X86EMUL_INTERCEPTED. */
|
||||
break;
|
||||
|
||||
case x86_intercept_pause:
|
||||
/*
|
||||
* PAUSE is a single-byte NOP with a REPE prefix, i.e. collides
|
||||
* with vanilla NOPs in the emulator. Apply the interception
|
||||
* check only to actual PAUSE instructions. Don't check
|
||||
* PAUSE-loop-exiting, software can't expect a given PAUSE to
|
||||
* exit, i.e. KVM is within its rights to allow L2 to execute
|
||||
* the PAUSE.
|
||||
*/
|
||||
if ((info->rep_prefix != REPE_PREFIX) ||
|
||||
!nested_cpu_has2(vmcs12, CPU_BASED_PAUSE_EXITING))
|
||||
return X86EMUL_CONTINUE;
|
||||
|
||||
break;
|
||||
|
||||
/* TODO: check more intercepts... */
|
||||
default:
|
||||
break;
|
||||
|
@ -1515,6 +1515,14 @@ static int drbg_prepare_hrng(struct drbg_state *drbg)
|
||||
return 0;
|
||||
|
||||
drbg->jent = crypto_alloc_rng("jitterentropy_rng", 0, 0);
|
||||
if (IS_ERR(drbg->jent)) {
|
||||
const int err = PTR_ERR(drbg->jent);
|
||||
|
||||
drbg->jent = NULL;
|
||||
if (fips_enabled)
|
||||
return err;
|
||||
pr_info("DRBG: Continuing without Jitter RNG\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1570,14 +1578,6 @@ static int drbg_instantiate(struct drbg_state *drbg, struct drbg_string *pers,
|
||||
if (ret)
|
||||
goto free_everything;
|
||||
|
||||
if (IS_ERR(drbg->jent)) {
|
||||
ret = PTR_ERR(drbg->jent);
|
||||
drbg->jent = NULL;
|
||||
if (fips_enabled || ret != -ENOENT)
|
||||
goto free_everything;
|
||||
pr_info("DRBG: Continuing without Jitter RNG\n");
|
||||
}
|
||||
|
||||
reseed = false;
|
||||
}
|
||||
|
||||
|
@ -491,7 +491,8 @@ static const struct attribute_group *cpu_root_attr_groups[] = {
|
||||
bool cpu_is_hotpluggable(unsigned cpu)
|
||||
{
|
||||
struct device *dev = get_cpu_device(cpu);
|
||||
return dev && container_of(dev, struct cpu, dev)->hotpluggable;
|
||||
return dev && container_of(dev, struct cpu, dev)->hotpluggable
|
||||
&& tick_nohz_cpu_hotpluggable(cpu);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cpu_is_hotpluggable);
|
||||
|
||||
|
@ -263,18 +263,18 @@ static int _genpd_reeval_performance_state(struct generic_pm_domain *genpd,
|
||||
/*
|
||||
* Traverse all sub-domains within the domain. This can be
|
||||
* done without any additional locking as the link->performance_state
|
||||
* field is protected by the master genpd->lock, which is already taken.
|
||||
* field is protected by the parent genpd->lock, which is already taken.
|
||||
*
|
||||
* Also note that link->performance_state (subdomain's performance state
|
||||
* requirement to master domain) is different from
|
||||
* link->slave->performance_state (current performance state requirement
|
||||
* requirement to parent domain) is different from
|
||||
* link->child->performance_state (current performance state requirement
|
||||
* of the devices/sub-domains of the subdomain) and so can have a
|
||||
* different value.
|
||||
*
|
||||
* Note that we also take vote from powered-off sub-domains into account
|
||||
* as the same is done for devices right now.
|
||||
*/
|
||||
list_for_each_entry(link, &genpd->master_links, master_node) {
|
||||
list_for_each_entry(link, &genpd->parent_links, parent_node) {
|
||||
if (link->performance_state > state)
|
||||
state = link->performance_state;
|
||||
}
|
||||
@ -285,40 +285,40 @@ static int _genpd_reeval_performance_state(struct generic_pm_domain *genpd,
|
||||
static int _genpd_set_performance_state(struct generic_pm_domain *genpd,
|
||||
unsigned int state, int depth)
|
||||
{
|
||||
struct generic_pm_domain *master;
|
||||
struct generic_pm_domain *parent;
|
||||
struct gpd_link *link;
|
||||
int master_state, ret;
|
||||
int parent_state, ret;
|
||||
|
||||
if (state == genpd->performance_state)
|
||||
return 0;
|
||||
|
||||
/* Propagate to masters of genpd */
|
||||
list_for_each_entry(link, &genpd->slave_links, slave_node) {
|
||||
master = link->master;
|
||||
/* Propagate to parents of genpd */
|
||||
list_for_each_entry(link, &genpd->child_links, child_node) {
|
||||
parent = link->parent;
|
||||
|
||||
if (!master->set_performance_state)
|
||||
if (!parent->set_performance_state)
|
||||
continue;
|
||||
|
||||
/* Find master's performance state */
|
||||
/* Find parent's performance state */
|
||||
ret = dev_pm_opp_xlate_performance_state(genpd->opp_table,
|
||||
master->opp_table,
|
||||
parent->opp_table,
|
||||
state);
|
||||
if (unlikely(ret < 0))
|
||||
goto err;
|
||||
|
||||
master_state = ret;
|
||||
parent_state = ret;
|
||||
|
||||
genpd_lock_nested(master, depth + 1);
|
||||
genpd_lock_nested(parent, depth + 1);
|
||||
|
||||
link->prev_performance_state = link->performance_state;
|
||||
link->performance_state = master_state;
|
||||
master_state = _genpd_reeval_performance_state(master,
|
||||
master_state);
|
||||
ret = _genpd_set_performance_state(master, master_state, depth + 1);
|
||||
link->performance_state = parent_state;
|
||||
parent_state = _genpd_reeval_performance_state(parent,
|
||||
parent_state);
|
||||
ret = _genpd_set_performance_state(parent, parent_state, depth + 1);
|
||||
if (ret)
|
||||
link->performance_state = link->prev_performance_state;
|
||||
|
||||
genpd_unlock(master);
|
||||
genpd_unlock(parent);
|
||||
|
||||
if (ret)
|
||||
goto err;
|
||||
@ -333,26 +333,26 @@ static int _genpd_set_performance_state(struct generic_pm_domain *genpd,
|
||||
|
||||
err:
|
||||
/* Encountered an error, lets rollback */
|
||||
list_for_each_entry_continue_reverse(link, &genpd->slave_links,
|
||||
slave_node) {
|
||||
master = link->master;
|
||||
list_for_each_entry_continue_reverse(link, &genpd->child_links,
|
||||
child_node) {
|
||||
parent = link->parent;
|
||||
|
||||
if (!master->set_performance_state)
|
||||
if (!parent->set_performance_state)
|
||||
continue;
|
||||
|
||||
genpd_lock_nested(master, depth + 1);
|
||||
genpd_lock_nested(parent, depth + 1);
|
||||
|
||||
master_state = link->prev_performance_state;
|
||||
link->performance_state = master_state;
|
||||
parent_state = link->prev_performance_state;
|
||||
link->performance_state = parent_state;
|
||||
|
||||
master_state = _genpd_reeval_performance_state(master,
|
||||
master_state);
|
||||
if (_genpd_set_performance_state(master, master_state, depth + 1)) {
|
||||
parent_state = _genpd_reeval_performance_state(parent,
|
||||
parent_state);
|
||||
if (_genpd_set_performance_state(parent, parent_state, depth + 1)) {
|
||||
pr_err("%s: Failed to roll back to %d performance state\n",
|
||||
master->name, master_state);
|
||||
parent->name, parent_state);
|
||||
}
|
||||
|
||||
genpd_unlock(master);
|
||||
genpd_unlock(parent);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@ -552,7 +552,7 @@ static int genpd_power_off(struct generic_pm_domain *genpd, bool one_dev_on,
|
||||
|
||||
/*
|
||||
* If sd_count > 0 at this point, one of the subdomains hasn't
|
||||
* managed to call genpd_power_on() for the master yet after
|
||||
* managed to call genpd_power_on() for the parent yet after
|
||||
* incrementing it. In that case genpd_power_on() will wait
|
||||
* for us to drop the lock, so we can call .power_off() and let
|
||||
* the genpd_power_on() restore power for us (this shouldn't
|
||||
@ -566,22 +566,22 @@ static int genpd_power_off(struct generic_pm_domain *genpd, bool one_dev_on,
|
||||
genpd->status = GPD_STATE_POWER_OFF;
|
||||
genpd_update_accounting(genpd);
|
||||
|
||||
list_for_each_entry(link, &genpd->slave_links, slave_node) {
|
||||
genpd_sd_counter_dec(link->master);
|
||||
genpd_lock_nested(link->master, depth + 1);
|
||||
genpd_power_off(link->master, false, depth + 1);
|
||||
genpd_unlock(link->master);
|
||||
list_for_each_entry(link, &genpd->child_links, child_node) {
|
||||
genpd_sd_counter_dec(link->parent);
|
||||
genpd_lock_nested(link->parent, depth + 1);
|
||||
genpd_power_off(link->parent, false, depth + 1);
|
||||
genpd_unlock(link->parent);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* genpd_power_on - Restore power to a given PM domain and its masters.
|
||||
* genpd_power_on - Restore power to a given PM domain and its parents.
|
||||
* @genpd: PM domain to power up.
|
||||
* @depth: nesting count for lockdep.
|
||||
*
|
||||
* Restore power to @genpd and all of its masters so that it is possible to
|
||||
* Restore power to @genpd and all of its parents so that it is possible to
|
||||
* resume a device belonging to it.
|
||||
*/
|
||||
static int genpd_power_on(struct generic_pm_domain *genpd, unsigned int depth)
|
||||
@ -594,20 +594,20 @@ static int genpd_power_on(struct generic_pm_domain *genpd, unsigned int depth)
|
||||
|
||||
/*
|
||||
* The list is guaranteed not to change while the loop below is being
|
||||
* executed, unless one of the masters' .power_on() callbacks fiddles
|
||||
* executed, unless one of the parents' .power_on() callbacks fiddles
|
||||
* with it.
|
||||
*/
|
||||
list_for_each_entry(link, &genpd->slave_links, slave_node) {
|
||||
struct generic_pm_domain *master = link->master;
|
||||
list_for_each_entry(link, &genpd->child_links, child_node) {
|
||||
struct generic_pm_domain *parent = link->parent;
|
||||
|
||||
genpd_sd_counter_inc(master);
|
||||
genpd_sd_counter_inc(parent);
|
||||
|
||||
genpd_lock_nested(master, depth + 1);
|
||||
ret = genpd_power_on(master, depth + 1);
|
||||
genpd_unlock(master);
|
||||
genpd_lock_nested(parent, depth + 1);
|
||||
ret = genpd_power_on(parent, depth + 1);
|
||||
genpd_unlock(parent);
|
||||
|
||||
if (ret) {
|
||||
genpd_sd_counter_dec(master);
|
||||
genpd_sd_counter_dec(parent);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
@ -623,12 +623,12 @@ static int genpd_power_on(struct generic_pm_domain *genpd, unsigned int depth)
|
||||
|
||||
err:
|
||||
list_for_each_entry_continue_reverse(link,
|
||||
&genpd->slave_links,
|
||||
slave_node) {
|
||||
genpd_sd_counter_dec(link->master);
|
||||
genpd_lock_nested(link->master, depth + 1);
|
||||
genpd_power_off(link->master, false, depth + 1);
|
||||
genpd_unlock(link->master);
|
||||
&genpd->child_links,
|
||||
child_node) {
|
||||
genpd_sd_counter_dec(link->parent);
|
||||
genpd_lock_nested(link->parent, depth + 1);
|
||||
genpd_power_off(link->parent, false, depth + 1);
|
||||
genpd_unlock(link->parent);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@ -943,13 +943,13 @@ static bool genpd_present(const struct generic_pm_domain *genpd)
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
|
||||
/**
|
||||
* genpd_sync_power_off - Synchronously power off a PM domain and its masters.
|
||||
* genpd_sync_power_off - Synchronously power off a PM domain and its parents.
|
||||
* @genpd: PM domain to power off, if possible.
|
||||
* @use_lock: use the lock.
|
||||
* @depth: nesting count for lockdep.
|
||||
*
|
||||
* Check if the given PM domain can be powered off (during system suspend or
|
||||
* hibernation) and do that if so. Also, in that case propagate to its masters.
|
||||
* hibernation) and do that if so. Also, in that case propagate to its parents.
|
||||
*
|
||||
* This function is only called in "noirq" and "syscore" stages of system power
|
||||
* transitions. The "noirq" callbacks may be executed asynchronously, thus in
|
||||
@ -974,21 +974,21 @@ static void genpd_sync_power_off(struct generic_pm_domain *genpd, bool use_lock,
|
||||
|
||||
genpd->status = GPD_STATE_POWER_OFF;
|
||||
|
||||
list_for_each_entry(link, &genpd->slave_links, slave_node) {
|
||||
genpd_sd_counter_dec(link->master);
|
||||
list_for_each_entry(link, &genpd->child_links, child_node) {
|
||||
genpd_sd_counter_dec(link->parent);
|
||||
|
||||
if (use_lock)
|
||||
genpd_lock_nested(link->master, depth + 1);
|
||||
genpd_lock_nested(link->parent, depth + 1);
|
||||
|
||||
genpd_sync_power_off(link->master, use_lock, depth + 1);
|
||||
genpd_sync_power_off(link->parent, use_lock, depth + 1);
|
||||
|
||||
if (use_lock)
|
||||
genpd_unlock(link->master);
|
||||
genpd_unlock(link->parent);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* genpd_sync_power_on - Synchronously power on a PM domain and its masters.
|
||||
* genpd_sync_power_on - Synchronously power on a PM domain and its parents.
|
||||
* @genpd: PM domain to power on.
|
||||
* @use_lock: use the lock.
|
||||
* @depth: nesting count for lockdep.
|
||||
@ -1005,16 +1005,16 @@ static void genpd_sync_power_on(struct generic_pm_domain *genpd, bool use_lock,
|
||||
if (genpd_status_on(genpd))
|
||||
return;
|
||||
|
||||
list_for_each_entry(link, &genpd->slave_links, slave_node) {
|
||||
genpd_sd_counter_inc(link->master);
|
||||
list_for_each_entry(link, &genpd->child_links, child_node) {
|
||||
genpd_sd_counter_inc(link->parent);
|
||||
|
||||
if (use_lock)
|
||||
genpd_lock_nested(link->master, depth + 1);
|
||||
genpd_lock_nested(link->parent, depth + 1);
|
||||
|
||||
genpd_sync_power_on(link->master, use_lock, depth + 1);
|
||||
genpd_sync_power_on(link->parent, use_lock, depth + 1);
|
||||
|
||||
if (use_lock)
|
||||
genpd_unlock(link->master);
|
||||
genpd_unlock(link->parent);
|
||||
}
|
||||
|
||||
_genpd_power_on(genpd, false);
|
||||
@ -1454,12 +1454,12 @@ static void genpd_update_cpumask(struct generic_pm_domain *genpd,
|
||||
if (!genpd_is_cpu_domain(genpd))
|
||||
return;
|
||||
|
||||
list_for_each_entry(link, &genpd->slave_links, slave_node) {
|
||||
struct generic_pm_domain *master = link->master;
|
||||
list_for_each_entry(link, &genpd->child_links, child_node) {
|
||||
struct generic_pm_domain *parent = link->parent;
|
||||
|
||||
genpd_lock_nested(master, depth + 1);
|
||||
genpd_update_cpumask(master, cpu, set, depth + 1);
|
||||
genpd_unlock(master);
|
||||
genpd_lock_nested(parent, depth + 1);
|
||||
genpd_update_cpumask(parent, cpu, set, depth + 1);
|
||||
genpd_unlock(parent);
|
||||
}
|
||||
|
||||
if (set)
|
||||
@ -1647,17 +1647,17 @@ static int genpd_add_subdomain(struct generic_pm_domain *genpd,
|
||||
goto out;
|
||||
}
|
||||
|
||||
list_for_each_entry(itr, &genpd->master_links, master_node) {
|
||||
if (itr->slave == subdomain && itr->master == genpd) {
|
||||
list_for_each_entry(itr, &genpd->parent_links, parent_node) {
|
||||
if (itr->child == subdomain && itr->parent == genpd) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
link->master = genpd;
|
||||
list_add_tail(&link->master_node, &genpd->master_links);
|
||||
link->slave = subdomain;
|
||||
list_add_tail(&link->slave_node, &subdomain->slave_links);
|
||||
link->parent = genpd;
|
||||
list_add_tail(&link->parent_node, &genpd->parent_links);
|
||||
link->child = subdomain;
|
||||
list_add_tail(&link->child_node, &subdomain->child_links);
|
||||
if (genpd_status_on(subdomain))
|
||||
genpd_sd_counter_inc(genpd);
|
||||
|
||||
@ -1671,7 +1671,7 @@ static int genpd_add_subdomain(struct generic_pm_domain *genpd,
|
||||
|
||||
/**
|
||||
* pm_genpd_add_subdomain - Add a subdomain to an I/O PM domain.
|
||||
* @genpd: Master PM domain to add the subdomain to.
|
||||
* @genpd: Leader PM domain to add the subdomain to.
|
||||
* @subdomain: Subdomain to be added.
|
||||
*/
|
||||
int pm_genpd_add_subdomain(struct generic_pm_domain *genpd,
|
||||
@ -1689,7 +1689,7 @@ EXPORT_SYMBOL_GPL(pm_genpd_add_subdomain);
|
||||
|
||||
/**
|
||||
* pm_genpd_remove_subdomain - Remove a subdomain from an I/O PM domain.
|
||||
* @genpd: Master PM domain to remove the subdomain from.
|
||||
* @genpd: Leader PM domain to remove the subdomain from.
|
||||
* @subdomain: Subdomain to be removed.
|
||||
*/
|
||||
int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd,
|
||||
@ -1704,19 +1704,19 @@ int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd,
|
||||
genpd_lock(subdomain);
|
||||
genpd_lock_nested(genpd, SINGLE_DEPTH_NESTING);
|
||||
|
||||
if (!list_empty(&subdomain->master_links) || subdomain->device_count) {
|
||||
if (!list_empty(&subdomain->parent_links) || subdomain->device_count) {
|
||||
pr_warn("%s: unable to remove subdomain %s\n",
|
||||
genpd->name, subdomain->name);
|
||||
ret = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
|
||||
list_for_each_entry_safe(link, l, &genpd->master_links, master_node) {
|
||||
if (link->slave != subdomain)
|
||||
list_for_each_entry_safe(link, l, &genpd->parent_links, parent_node) {
|
||||
if (link->child != subdomain)
|
||||
continue;
|
||||
|
||||
list_del(&link->master_node);
|
||||
list_del(&link->slave_node);
|
||||
list_del(&link->parent_node);
|
||||
list_del(&link->child_node);
|
||||
kfree(link);
|
||||
if (genpd_status_on(subdomain))
|
||||
genpd_sd_counter_dec(genpd);
|
||||
@ -1781,8 +1781,8 @@ int pm_genpd_init(struct generic_pm_domain *genpd,
|
||||
if (IS_ERR_OR_NULL(genpd))
|
||||
return -EINVAL;
|
||||
|
||||
INIT_LIST_HEAD(&genpd->master_links);
|
||||
INIT_LIST_HEAD(&genpd->slave_links);
|
||||
INIT_LIST_HEAD(&genpd->parent_links);
|
||||
INIT_LIST_HEAD(&genpd->child_links);
|
||||
INIT_LIST_HEAD(&genpd->dev_list);
|
||||
genpd_lock_init(genpd);
|
||||
genpd->gov = gov;
|
||||
@ -1858,15 +1858,15 @@ static int genpd_remove(struct generic_pm_domain *genpd)
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
if (!list_empty(&genpd->master_links) || genpd->device_count) {
|
||||
if (!list_empty(&genpd->parent_links) || genpd->device_count) {
|
||||
genpd_unlock(genpd);
|
||||
pr_err("%s: unable to remove %s\n", __func__, genpd->name);
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
list_for_each_entry_safe(link, l, &genpd->slave_links, slave_node) {
|
||||
list_del(&link->master_node);
|
||||
list_del(&link->slave_node);
|
||||
list_for_each_entry_safe(link, l, &genpd->child_links, child_node) {
|
||||
list_del(&link->parent_node);
|
||||
list_del(&link->child_node);
|
||||
kfree(link);
|
||||
}
|
||||
|
||||
@ -2793,12 +2793,12 @@ static int genpd_summary_one(struct seq_file *s,
|
||||
|
||||
/*
|
||||
* Modifications on the list require holding locks on both
|
||||
* master and slave, so we are safe.
|
||||
* parent and child, so we are safe.
|
||||
* Also genpd->name is immutable.
|
||||
*/
|
||||
list_for_each_entry(link, &genpd->master_links, master_node) {
|
||||
seq_printf(s, "%s", link->slave->name);
|
||||
if (!list_is_last(&link->master_node, &genpd->master_links))
|
||||
list_for_each_entry(link, &genpd->parent_links, parent_node) {
|
||||
seq_printf(s, "%s", link->child->name);
|
||||
if (!list_is_last(&link->parent_node, &genpd->parent_links))
|
||||
seq_puts(s, ", ");
|
||||
}
|
||||
|
||||
@ -2826,7 +2826,7 @@ static int summary_show(struct seq_file *s, void *data)
|
||||
struct generic_pm_domain *genpd;
|
||||
int ret = 0;
|
||||
|
||||
seq_puts(s, "domain status slaves\n");
|
||||
seq_puts(s, "domain status children\n");
|
||||
seq_puts(s, " /device runtime status\n");
|
||||
seq_puts(s, "----------------------------------------------------------------------\n");
|
||||
|
||||
@ -2881,8 +2881,8 @@ static int sub_domains_show(struct seq_file *s, void *data)
|
||||
if (ret)
|
||||
return -ERESTARTSYS;
|
||||
|
||||
list_for_each_entry(link, &genpd->master_links, master_node)
|
||||
seq_printf(s, "%s\n", link->slave->name);
|
||||
list_for_each_entry(link, &genpd->parent_links, parent_node)
|
||||
seq_printf(s, "%s\n", link->child->name);
|
||||
|
||||
genpd_unlock(genpd);
|
||||
return ret;
|
||||
|
@ -135,8 +135,8 @@ static bool __default_power_down_ok(struct dev_pm_domain *pd,
|
||||
*
|
||||
* All subdomains have been powered off already at this point.
|
||||
*/
|
||||
list_for_each_entry(link, &genpd->master_links, master_node) {
|
||||
struct generic_pm_domain *sd = link->slave;
|
||||
list_for_each_entry(link, &genpd->parent_links, parent_node) {
|
||||
struct generic_pm_domain *sd = link->child;
|
||||
s64 sd_max_off_ns = sd->max_off_time_ns;
|
||||
|
||||
if (sd_max_off_ns < 0)
|
||||
@ -217,13 +217,13 @@ static bool default_power_down_ok(struct dev_pm_domain *pd)
|
||||
}
|
||||
|
||||
/*
|
||||
* We have to invalidate the cached results for the masters, so
|
||||
* We have to invalidate the cached results for the parents, so
|
||||
* use the observation that default_power_down_ok() is not
|
||||
* going to be called for any master until this instance
|
||||
* going to be called for any parent until this instance
|
||||
* returns.
|
||||
*/
|
||||
list_for_each_entry(link, &genpd->slave_links, slave_node)
|
||||
link->master->max_off_time_changed = true;
|
||||
list_for_each_entry(link, &genpd->child_links, child_node)
|
||||
link->parent->max_off_time_changed = true;
|
||||
|
||||
genpd->max_off_time_ns = -1;
|
||||
genpd->max_off_time_changed = false;
|
||||
|
@ -1298,7 +1298,7 @@ static void submit_one_flush(struct drbd_device *device, struct issue_flush_cont
|
||||
bio_set_dev(bio, device->ldev->backing_bdev);
|
||||
bio->bi_private = octx;
|
||||
bio->bi_end_io = one_flush_endio;
|
||||
bio->bi_opf = REQ_OP_FLUSH | REQ_PREFLUSH;
|
||||
bio->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH;
|
||||
|
||||
device->flush_jif = jiffies;
|
||||
set_bit(FLUSH_PENDING, &device->flags);
|
||||
|
@ -343,7 +343,6 @@ static void btsdio_remove(struct sdio_func *func)
|
||||
|
||||
BT_DBG("func %p", func);
|
||||
|
||||
cancel_work_sync(&data->work);
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
|
@ -562,8 +562,10 @@ static void retry_timeout(struct timer_list *t)
|
||||
|
||||
if (waiting)
|
||||
start_get(ssif_info);
|
||||
if (resend)
|
||||
if (resend) {
|
||||
start_resend(ssif_info);
|
||||
ssif_inc_stat(ssif_info, send_retries);
|
||||
}
|
||||
}
|
||||
|
||||
static void watch_timeout(struct timer_list *t)
|
||||
@ -789,9 +791,9 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
|
||||
} else if (data[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2
|
||||
|| data[1] != IPMI_GET_MSG_FLAGS_CMD) {
|
||||
/*
|
||||
* Don't abort here, maybe it was a queued
|
||||
* response to a previous command.
|
||||
* Recv error response, give up.
|
||||
*/
|
||||
ssif_info->ssif_state = SSIF_IDLE;
|
||||
ipmi_ssif_unlock_cond(ssif_info, flags);
|
||||
dev_warn(&ssif_info->client->dev,
|
||||
"Invalid response getting flags: %x %x\n",
|
||||
|
@ -613,7 +613,7 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int tpm_tis_gen_interrupt(struct tpm_chip *chip)
|
||||
static void tpm_tis_gen_interrupt(struct tpm_chip *chip)
|
||||
{
|
||||
const char *desc = "attempting to generate an interrupt";
|
||||
u32 cap2;
|
||||
@ -622,7 +622,7 @@ static int tpm_tis_gen_interrupt(struct tpm_chip *chip)
|
||||
|
||||
ret = request_locality(chip, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
return;
|
||||
|
||||
if (chip->flags & TPM_CHIP_FLAG_TPM2)
|
||||
ret = tpm2_get_tpm_pt(chip, 0x100, &cap2, desc);
|
||||
@ -630,8 +630,6 @@ static int tpm_tis_gen_interrupt(struct tpm_chip *chip)
|
||||
ret = tpm1_getcap(chip, TPM_CAP_PROP_TIS_TIMEOUT, &cap, desc, 0);
|
||||
|
||||
release_locality(chip, 0);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Register the IRQ and issue a command that will cause an interrupt. If an
|
||||
@ -661,42 +659,37 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask,
|
||||
|
||||
rc = tpm_tis_write8(priv, TPM_INT_VECTOR(priv->locality), irq);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
goto restore_irqs;
|
||||
|
||||
rc = tpm_tis_read32(priv, TPM_INT_STATUS(priv->locality), &int_status);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
goto restore_irqs;
|
||||
|
||||
/* Clear all existing */
|
||||
rc = tpm_tis_write32(priv, TPM_INT_STATUS(priv->locality), int_status);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
goto restore_irqs;
|
||||
/* Turn on */
|
||||
rc = tpm_tis_write32(priv, TPM_INT_ENABLE(priv->locality),
|
||||
intmask | TPM_GLOBAL_INT_ENABLE);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
goto restore_irqs;
|
||||
|
||||
priv->irq_tested = false;
|
||||
|
||||
/* Generate an interrupt by having the core call through to
|
||||
* tpm_tis_send
|
||||
*/
|
||||
rc = tpm_tis_gen_interrupt(chip);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
tpm_tis_gen_interrupt(chip);
|
||||
|
||||
restore_irqs:
|
||||
/* tpm_tis_send will either confirm the interrupt is working or it
|
||||
* will call disable_irq which undoes all of the above.
|
||||
*/
|
||||
if (!(chip->flags & TPM_CHIP_FLAG_IRQ)) {
|
||||
rc = tpm_tis_write8(priv, original_int_vec,
|
||||
TPM_INT_VECTOR(priv->locality));
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
return 1;
|
||||
tpm_tis_write8(priv, original_int_vec,
|
||||
TPM_INT_VECTOR(priv->locality));
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -33,9 +33,12 @@ static int __set_clk_parents(struct device_node *node, bool clk_supplier)
|
||||
else
|
||||
return rc;
|
||||
}
|
||||
if (clkspec.np == node && !clk_supplier)
|
||||
if (clkspec.np == node && !clk_supplier) {
|
||||
of_node_put(clkspec.np);
|
||||
return 0;
|
||||
}
|
||||
pclk = of_clk_get_from_provider(&clkspec);
|
||||
of_node_put(clkspec.np);
|
||||
if (IS_ERR(pclk)) {
|
||||
if (PTR_ERR(pclk) != -EPROBE_DEFER)
|
||||
pr_warn("clk: couldn't get parent clock %d for %pOF\n",
|
||||
@ -48,10 +51,12 @@ static int __set_clk_parents(struct device_node *node, bool clk_supplier)
|
||||
if (rc < 0)
|
||||
goto err;
|
||||
if (clkspec.np == node && !clk_supplier) {
|
||||
of_node_put(clkspec.np);
|
||||
rc = 0;
|
||||
goto err;
|
||||
}
|
||||
clk = of_clk_get_from_provider(&clkspec);
|
||||
of_node_put(clkspec.np);
|
||||
if (IS_ERR(clk)) {
|
||||
if (PTR_ERR(clk) != -EPROBE_DEFER)
|
||||
pr_warn("clk: couldn't get assigned clock %d for %pOF\n",
|
||||
@ -93,10 +98,13 @@ static int __set_clk_rates(struct device_node *node, bool clk_supplier)
|
||||
else
|
||||
return rc;
|
||||
}
|
||||
if (clkspec.np == node && !clk_supplier)
|
||||
if (clkspec.np == node && !clk_supplier) {
|
||||
of_node_put(clkspec.np);
|
||||
return 0;
|
||||
}
|
||||
|
||||
clk = of_clk_get_from_provider(&clkspec);
|
||||
of_node_put(clkspec.np);
|
||||
if (IS_ERR(clk)) {
|
||||
if (PTR_ERR(clk) != -EPROBE_DEFER)
|
||||
pr_warn("clk: couldn't get clock %d for %pOF\n",
|
||||
|
@ -1259,7 +1259,7 @@ static struct rockchip_clk_branch rk3399_clk_branches[] __initdata = {
|
||||
RK3399_CLKSEL_CON(56), 6, 2, MFLAGS,
|
||||
RK3399_CLKGATE_CON(10), 7, GFLAGS),
|
||||
|
||||
COMPOSITE_NOGATE(SCLK_CIF_OUT, "clk_cifout", mux_clk_cif_p, 0,
|
||||
COMPOSITE_NOGATE(SCLK_CIF_OUT, "clk_cifout", mux_clk_cif_p, CLK_SET_RATE_PARENT,
|
||||
RK3399_CLKSEL_CON(56), 5, 1, MFLAGS, 0, 5, DFLAGS),
|
||||
|
||||
/* gic */
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <clocksource/timer-davinci.h>
|
||||
|
||||
#undef pr_fmt
|
||||
#define pr_fmt(fmt) "%s: " fmt "\n", __func__
|
||||
#define pr_fmt(fmt) "%s: " fmt, __func__
|
||||
|
||||
#define DAVINCI_TIMER_REG_TIM12 0x10
|
||||
#define DAVINCI_TIMER_REG_TIM34 0x14
|
||||
@ -250,30 +250,32 @@ int __init davinci_timer_register(struct clk *clk,
|
||||
|
||||
rv = clk_prepare_enable(clk);
|
||||
if (rv) {
|
||||
pr_err("Unable to prepare and enable the timer clock");
|
||||
pr_err("Unable to prepare and enable the timer clock\n");
|
||||
return rv;
|
||||
}
|
||||
|
||||
if (!request_mem_region(timer_cfg->reg.start,
|
||||
resource_size(&timer_cfg->reg),
|
||||
"davinci-timer")) {
|
||||
pr_err("Unable to request memory region");
|
||||
return -EBUSY;
|
||||
pr_err("Unable to request memory region\n");
|
||||
rv = -EBUSY;
|
||||
goto exit_clk_disable;
|
||||
}
|
||||
|
||||
base = ioremap(timer_cfg->reg.start, resource_size(&timer_cfg->reg));
|
||||
if (!base) {
|
||||
pr_err("Unable to map the register range");
|
||||
return -ENOMEM;
|
||||
pr_err("Unable to map the register range\n");
|
||||
rv = -ENOMEM;
|
||||
goto exit_mem_region;
|
||||
}
|
||||
|
||||
davinci_timer_init(base);
|
||||
tick_rate = clk_get_rate(clk);
|
||||
|
||||
clockevent = kzalloc(sizeof(*clockevent), GFP_KERNEL | __GFP_NOFAIL);
|
||||
clockevent = kzalloc(sizeof(*clockevent), GFP_KERNEL);
|
||||
if (!clockevent) {
|
||||
pr_err("Error allocating memory for clockevent data");
|
||||
return -ENOMEM;
|
||||
rv = -ENOMEM;
|
||||
goto exit_iounmap_base;
|
||||
}
|
||||
|
||||
clockevent->dev.name = "tim12";
|
||||
@ -298,8 +300,8 @@ int __init davinci_timer_register(struct clk *clk,
|
||||
davinci_timer_irq_timer, IRQF_TIMER,
|
||||
"clockevent/tim12", clockevent);
|
||||
if (rv) {
|
||||
pr_err("Unable to request the clockevent interrupt");
|
||||
return rv;
|
||||
pr_err("Unable to request the clockevent interrupt\n");
|
||||
goto exit_free_clockevent;
|
||||
}
|
||||
|
||||
davinci_clocksource.dev.rating = 300;
|
||||
@ -325,14 +327,28 @@ int __init davinci_timer_register(struct clk *clk,
|
||||
|
||||
rv = clocksource_register_hz(&davinci_clocksource.dev, tick_rate);
|
||||
if (rv) {
|
||||
pr_err("Unable to register clocksource");
|
||||
return rv;
|
||||
pr_err("Unable to register clocksource\n");
|
||||
goto exit_free_irq;
|
||||
}
|
||||
|
||||
sched_clock_register(davinci_timer_read_sched_clock,
|
||||
DAVINCI_TIMER_CLKSRC_BITS, tick_rate);
|
||||
|
||||
return 0;
|
||||
|
||||
exit_free_irq:
|
||||
free_irq(timer_cfg->irq[DAVINCI_TIMER_CLOCKEVENT_IRQ].start,
|
||||
clockevent);
|
||||
exit_free_clockevent:
|
||||
kfree(clockevent);
|
||||
exit_iounmap_base:
|
||||
iounmap(base);
|
||||
exit_mem_region:
|
||||
release_mem_region(timer_cfg->reg.start,
|
||||
resource_size(&timer_cfg->reg));
|
||||
exit_clk_disable:
|
||||
clk_disable_unprepare(clk);
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int __init of_davinci_timer_register(struct device_node *np)
|
||||
@ -343,20 +359,20 @@ static int __init of_davinci_timer_register(struct device_node *np)
|
||||
|
||||
rv = of_address_to_resource(np, 0, &timer_cfg.reg);
|
||||
if (rv) {
|
||||
pr_err("Unable to get the register range for timer");
|
||||
pr_err("Unable to get the register range for timer\n");
|
||||
return rv;
|
||||
}
|
||||
|
||||
rv = of_irq_to_resource_table(np, timer_cfg.irq,
|
||||
DAVINCI_TIMER_NUM_IRQS);
|
||||
if (rv != DAVINCI_TIMER_NUM_IRQS) {
|
||||
pr_err("Unable to get the interrupts for timer");
|
||||
pr_err("Unable to get the interrupts for timer\n");
|
||||
return rv;
|
||||
}
|
||||
|
||||
clk = of_clk_get(np, 0);
|
||||
if (IS_ERR(clk)) {
|
||||
pr_err("Unable to get the timer clock");
|
||||
pr_err("Unable to get the timer clock\n");
|
||||
return PTR_ERR(clk);
|
||||
}
|
||||
|
||||
|
@ -57,10 +57,6 @@ struct quad8_iio {
|
||||
|
||||
#define QUAD8_REG_CHAN_OP 0x11
|
||||
#define QUAD8_REG_INDEX_INPUT_LEVELS 0x16
|
||||
/* Borrow Toggle flip-flop */
|
||||
#define QUAD8_FLAG_BT BIT(0)
|
||||
/* Carry Toggle flip-flop */
|
||||
#define QUAD8_FLAG_CT BIT(1)
|
||||
/* Error flag */
|
||||
#define QUAD8_FLAG_E BIT(4)
|
||||
/* Up/Down flag */
|
||||
@ -97,9 +93,6 @@ static int quad8_read_raw(struct iio_dev *indio_dev,
|
||||
{
|
||||
struct quad8_iio *const priv = iio_priv(indio_dev);
|
||||
const int base_offset = priv->base + 2 * chan->channel;
|
||||
unsigned int flags;
|
||||
unsigned int borrow;
|
||||
unsigned int carry;
|
||||
int i;
|
||||
|
||||
switch (mask) {
|
||||
@ -110,12 +103,7 @@ static int quad8_read_raw(struct iio_dev *indio_dev,
|
||||
return IIO_VAL_INT;
|
||||
}
|
||||
|
||||
flags = inb(base_offset + 1);
|
||||
borrow = flags & QUAD8_FLAG_BT;
|
||||
carry = !!(flags & QUAD8_FLAG_CT);
|
||||
|
||||
/* Borrow XOR Carry effectively doubles count range */
|
||||
*val = (borrow ^ carry) << 24;
|
||||
*val = 0;
|
||||
|
||||
mutex_lock(&priv->lock);
|
||||
|
||||
@ -639,19 +627,9 @@ static int quad8_count_read(struct counter_device *counter,
|
||||
{
|
||||
struct quad8_iio *const priv = counter->priv;
|
||||
const int base_offset = priv->base + 2 * count->id;
|
||||
unsigned int flags;
|
||||
unsigned int borrow;
|
||||
unsigned int carry;
|
||||
unsigned long position;
|
||||
unsigned long position = 0;
|
||||
int i;
|
||||
|
||||
flags = inb(base_offset + 1);
|
||||
borrow = flags & QUAD8_FLAG_BT;
|
||||
carry = !!(flags & QUAD8_FLAG_CT);
|
||||
|
||||
/* Borrow XOR Carry effectively doubles count range */
|
||||
position = (unsigned long)(borrow ^ carry) << 24;
|
||||
|
||||
mutex_lock(&priv->lock);
|
||||
|
||||
/* Reset Byte Pointer; transfer Counter to Output Latch */
|
||||
@ -1204,8 +1182,8 @@ static ssize_t quad8_count_ceiling_read(struct counter_device *counter,
|
||||
|
||||
mutex_unlock(&priv->lock);
|
||||
|
||||
/* By default 0x1FFFFFF (25 bits unsigned) is maximum count */
|
||||
return sprintf(buf, "33554431\n");
|
||||
/* By default 0xFFFFFF (24 bits unsigned) is maximum count */
|
||||
return sprintf(buf, "16777215\n");
|
||||
}
|
||||
|
||||
static ssize_t quad8_count_ceiling_write(struct counter_device *counter,
|
||||
|
@ -1090,11 +1090,12 @@ static irqreturn_t safexcel_irq_ring_thread(int irq, void *data)
|
||||
|
||||
static int safexcel_request_ring_irq(void *pdev, int irqid,
|
||||
int is_pci_dev,
|
||||
int ring_id,
|
||||
irq_handler_t handler,
|
||||
irq_handler_t threaded_handler,
|
||||
struct safexcel_ring_irq_data *ring_irq_priv)
|
||||
{
|
||||
int ret, irq;
|
||||
int ret, irq, cpu;
|
||||
struct device *dev;
|
||||
|
||||
if (IS_ENABLED(CONFIG_PCI) && is_pci_dev) {
|
||||
@ -1132,6 +1133,10 @@ static int safexcel_request_ring_irq(void *pdev, int irqid,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Set affinity */
|
||||
cpu = cpumask_local_spread(ring_id, NUMA_NO_NODE);
|
||||
irq_set_affinity_hint(irq, get_cpu_mask(cpu));
|
||||
|
||||
return irq;
|
||||
}
|
||||
|
||||
@ -1462,19 +1467,23 @@ static int safexcel_probe_generic(void *pdev,
|
||||
&priv->ring[i].rdr);
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to initialize rings\n");
|
||||
return ret;
|
||||
goto err_cleanup_rings;
|
||||
}
|
||||
|
||||
priv->ring[i].rdr_req = devm_kcalloc(dev,
|
||||
EIP197_DEFAULT_RING_SIZE,
|
||||
sizeof(*priv->ring[i].rdr_req),
|
||||
GFP_KERNEL);
|
||||
if (!priv->ring[i].rdr_req)
|
||||
return -ENOMEM;
|
||||
if (!priv->ring[i].rdr_req) {
|
||||
ret = -ENOMEM;
|
||||
goto err_cleanup_rings;
|
||||
}
|
||||
|
||||
ring_irq = devm_kzalloc(dev, sizeof(*ring_irq), GFP_KERNEL);
|
||||
if (!ring_irq)
|
||||
return -ENOMEM;
|
||||
if (!ring_irq) {
|
||||
ret = -ENOMEM;
|
||||
goto err_cleanup_rings;
|
||||
}
|
||||
|
||||
ring_irq->priv = priv;
|
||||
ring_irq->ring = i;
|
||||
@ -1482,14 +1491,17 @@ static int safexcel_probe_generic(void *pdev,
|
||||
irq = safexcel_request_ring_irq(pdev,
|
||||
EIP197_IRQ_NUMBER(i, is_pci_dev),
|
||||
is_pci_dev,
|
||||
i,
|
||||
safexcel_irq_ring,
|
||||
safexcel_irq_ring_thread,
|
||||
ring_irq);
|
||||
if (irq < 0) {
|
||||
dev_err(dev, "Failed to get IRQ ID for ring %d\n", i);
|
||||
return irq;
|
||||
ret = irq;
|
||||
goto err_cleanup_rings;
|
||||
}
|
||||
|
||||
priv->ring[i].irq = irq;
|
||||
priv->ring[i].work_data.priv = priv;
|
||||
priv->ring[i].work_data.ring = i;
|
||||
INIT_WORK(&priv->ring[i].work_data.work,
|
||||
@ -1498,8 +1510,10 @@ static int safexcel_probe_generic(void *pdev,
|
||||
snprintf(wq_name, 9, "wq_ring%d", i);
|
||||
priv->ring[i].workqueue =
|
||||
create_singlethread_workqueue(wq_name);
|
||||
if (!priv->ring[i].workqueue)
|
||||
return -ENOMEM;
|
||||
if (!priv->ring[i].workqueue) {
|
||||
ret = -ENOMEM;
|
||||
goto err_cleanup_rings;
|
||||
}
|
||||
|
||||
priv->ring[i].requests = 0;
|
||||
priv->ring[i].busy = false;
|
||||
@ -1516,16 +1530,26 @@ static int safexcel_probe_generic(void *pdev,
|
||||
ret = safexcel_hw_init(priv);
|
||||
if (ret) {
|
||||
dev_err(dev, "HW init failed (%d)\n", ret);
|
||||
return ret;
|
||||
goto err_cleanup_rings;
|
||||
}
|
||||
|
||||
ret = safexcel_register_algorithms(priv);
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to register algorithms (%d)\n", ret);
|
||||
return ret;
|
||||
goto err_cleanup_rings;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_cleanup_rings:
|
||||
for (i = 0; i < priv->config.rings; i++) {
|
||||
if (priv->ring[i].irq)
|
||||
irq_set_affinity_hint(priv->ring[i].irq, NULL);
|
||||
if (priv->ring[i].workqueue)
|
||||
destroy_workqueue(priv->ring[i].workqueue);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void safexcel_hw_reset_rings(struct safexcel_crypto_priv *priv)
|
||||
@ -1627,8 +1651,10 @@ static int safexcel_remove(struct platform_device *pdev)
|
||||
|
||||
clk_disable_unprepare(priv->clk);
|
||||
|
||||
for (i = 0; i < priv->config.rings; i++)
|
||||
for (i = 0; i < priv->config.rings; i++) {
|
||||
irq_set_affinity_hint(priv->ring[i].irq, NULL);
|
||||
destroy_workqueue(priv->ring[i].workqueue);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -640,6 +640,9 @@ struct safexcel_ring {
|
||||
*/
|
||||
struct crypto_async_request *req;
|
||||
struct crypto_async_request *backlog;
|
||||
|
||||
/* irq of this ring */
|
||||
int irq;
|
||||
};
|
||||
|
||||
/* EIP integration context flags */
|
||||
|
@ -212,6 +212,7 @@ struct at_xdmac {
|
||||
int irq;
|
||||
struct clk *clk;
|
||||
u32 save_gim;
|
||||
u32 save_gs;
|
||||
struct dma_pool *at_xdmac_desc_pool;
|
||||
struct at_xdmac_chan chan[0];
|
||||
};
|
||||
@ -1922,6 +1923,7 @@ static int atmel_xdmac_suspend(struct device *dev)
|
||||
}
|
||||
}
|
||||
atxdmac->save_gim = at_xdmac_read(atxdmac, AT_XDMAC_GIM);
|
||||
atxdmac->save_gs = at_xdmac_read(atxdmac, AT_XDMAC_GS);
|
||||
|
||||
at_xdmac_off(atxdmac);
|
||||
clk_disable_unprepare(atxdmac->clk);
|
||||
@ -1958,7 +1960,8 @@ static int atmel_xdmac_resume(struct device *dev)
|
||||
at_xdmac_chan_write(atchan, AT_XDMAC_CNDC, atchan->save_cndc);
|
||||
at_xdmac_chan_write(atchan, AT_XDMAC_CIE, atchan->save_cim);
|
||||
wmb();
|
||||
at_xdmac_write(atxdmac, AT_XDMAC_GE, atchan->mask);
|
||||
if (atxdmac->save_gs & atchan->mask)
|
||||
at_xdmac_write(atxdmac, AT_XDMAC_GE, atchan->mask);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -165,7 +165,7 @@ static void vchan_free_desc(struct virt_dma_desc *vdesc)
|
||||
dw_edma_free_desc(vd2dw_edma_desc(vdesc));
|
||||
}
|
||||
|
||||
static void dw_edma_start_transfer(struct dw_edma_chan *chan)
|
||||
static int dw_edma_start_transfer(struct dw_edma_chan *chan)
|
||||
{
|
||||
struct dw_edma_chunk *child;
|
||||
struct dw_edma_desc *desc;
|
||||
@ -173,16 +173,16 @@ static void dw_edma_start_transfer(struct dw_edma_chan *chan)
|
||||
|
||||
vd = vchan_next_desc(&chan->vc);
|
||||
if (!vd)
|
||||
return;
|
||||
return 0;
|
||||
|
||||
desc = vd2dw_edma_desc(vd);
|
||||
if (!desc)
|
||||
return;
|
||||
return 0;
|
||||
|
||||
child = list_first_entry_or_null(&desc->chunk->list,
|
||||
struct dw_edma_chunk, list);
|
||||
if (!child)
|
||||
return;
|
||||
return 0;
|
||||
|
||||
dw_edma_v0_core_start(child, !desc->xfer_sz);
|
||||
desc->xfer_sz += child->ll_region.sz;
|
||||
@ -190,6 +190,8 @@ static void dw_edma_start_transfer(struct dw_edma_chan *chan)
|
||||
list_del(&child->list);
|
||||
kfree(child);
|
||||
desc->chunks_alloc--;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int dw_edma_device_config(struct dma_chan *dchan,
|
||||
@ -273,9 +275,12 @@ static void dw_edma_device_issue_pending(struct dma_chan *dchan)
|
||||
struct dw_edma_chan *chan = dchan2dw_edma_chan(dchan);
|
||||
unsigned long flags;
|
||||
|
||||
if (!chan->configured)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&chan->vc.lock, flags);
|
||||
if (chan->configured && chan->request == EDMA_REQ_NONE &&
|
||||
chan->status == EDMA_ST_IDLE && vchan_issue_pending(&chan->vc)) {
|
||||
if (vchan_issue_pending(&chan->vc) && chan->request == EDMA_REQ_NONE &&
|
||||
chan->status == EDMA_ST_IDLE) {
|
||||
chan->status = EDMA_ST_BUSY;
|
||||
dw_edma_start_transfer(chan);
|
||||
}
|
||||
@ -483,14 +488,14 @@ static void dw_edma_done_interrupt(struct dw_edma_chan *chan)
|
||||
switch (chan->request) {
|
||||
case EDMA_REQ_NONE:
|
||||
desc = vd2dw_edma_desc(vd);
|
||||
if (desc->chunks_alloc) {
|
||||
chan->status = EDMA_ST_BUSY;
|
||||
dw_edma_start_transfer(chan);
|
||||
} else {
|
||||
if (!desc->chunks_alloc) {
|
||||
list_del(&vd->node);
|
||||
vchan_cookie_complete(vd);
|
||||
chan->status = EDMA_ST_IDLE;
|
||||
}
|
||||
|
||||
/* Continue transferring if there are remaining chunks or issued requests.
|
||||
*/
|
||||
chan->status = dw_edma_start_transfer(chan) ? EDMA_ST_BUSY : EDMA_ST_IDLE;
|
||||
break;
|
||||
|
||||
case EDMA_REQ_STOP:
|
||||
|
@ -751,7 +751,7 @@ static int mv_xor_v2_probe(struct platform_device *pdev)
|
||||
|
||||
xor_dev->clk = devm_clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(xor_dev->clk) && PTR_ERR(xor_dev->clk) == -EPROBE_DEFER) {
|
||||
ret = EPROBE_DEFER;
|
||||
ret = -EPROBE_DEFER;
|
||||
goto disable_reg_clk;
|
||||
}
|
||||
if (!IS_ERR(xor_dev->clk)) {
|
||||
|
@ -459,7 +459,7 @@ rir_found:
|
||||
}
|
||||
|
||||
static u8 skx_close_row[] = {
|
||||
15, 16, 17, 18, 20, 21, 22, 28, 10, 11, 12, 13, 29, 30, 31, 32, 33
|
||||
15, 16, 17, 18, 20, 21, 22, 28, 10, 11, 12, 13, 29, 30, 31, 32, 33, 34
|
||||
};
|
||||
|
||||
static u8 skx_close_column[] = {
|
||||
@ -467,7 +467,7 @@ static u8 skx_close_column[] = {
|
||||
};
|
||||
|
||||
static u8 skx_open_row[] = {
|
||||
14, 15, 16, 20, 28, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33
|
||||
14, 15, 16, 20, 28, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34
|
||||
};
|
||||
|
||||
static u8 skx_open_column[] = {
|
||||
|
@ -591,8 +591,7 @@ static int qcom_scm_probe(struct platform_device *pdev)
|
||||
static void qcom_scm_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
/* Clean shutdown, disable download mode to allow normal restart */
|
||||
if (download_mode)
|
||||
qcom_scm_set_download_mode(false);
|
||||
qcom_scm_set_download_mode(false);
|
||||
}
|
||||
|
||||
static const struct of_device_id qcom_scm_dt_match[] = {
|
||||
|
@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/kref.h>
|
||||
#include <linux/mailbox_client.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_platform.h>
|
||||
@ -27,6 +28,8 @@ struct rpi_firmware {
|
||||
struct mbox_chan *chan; /* The property channel. */
|
||||
struct completion c;
|
||||
u32 enabled;
|
||||
|
||||
struct kref consumers;
|
||||
};
|
||||
|
||||
static DEFINE_MUTEX(transaction_lock);
|
||||
@ -214,12 +217,38 @@ static void rpi_register_clk_driver(struct device *dev)
|
||||
-1, NULL, 0);
|
||||
}
|
||||
|
||||
static void rpi_firmware_delete(struct kref *kref)
|
||||
{
|
||||
struct rpi_firmware *fw = container_of(kref, struct rpi_firmware,
|
||||
consumers);
|
||||
|
||||
mbox_free_channel(fw->chan);
|
||||
kfree(fw);
|
||||
}
|
||||
|
||||
void rpi_firmware_put(struct rpi_firmware *fw)
|
||||
{
|
||||
kref_put(&fw->consumers, rpi_firmware_delete);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rpi_firmware_put);
|
||||
|
||||
static void devm_rpi_firmware_put(void *data)
|
||||
{
|
||||
struct rpi_firmware *fw = data;
|
||||
|
||||
rpi_firmware_put(fw);
|
||||
}
|
||||
|
||||
static int rpi_firmware_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct rpi_firmware *fw;
|
||||
|
||||
fw = devm_kzalloc(dev, sizeof(*fw), GFP_KERNEL);
|
||||
/*
|
||||
* Memory will be freed by rpi_firmware_delete() once all users have
|
||||
* released their firmware handles. Don't use devm_kzalloc() here.
|
||||
*/
|
||||
fw = kzalloc(sizeof(*fw), GFP_KERNEL);
|
||||
if (!fw)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -232,10 +261,12 @@ static int rpi_firmware_probe(struct platform_device *pdev)
|
||||
int ret = PTR_ERR(fw->chan);
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(dev, "Failed to get mbox channel: %d\n", ret);
|
||||
kfree(fw);
|
||||
return ret;
|
||||
}
|
||||
|
||||
init_completion(&fw->c);
|
||||
kref_init(&fw->consumers);
|
||||
|
||||
platform_set_drvdata(pdev, fw);
|
||||
|
||||
@ -264,7 +295,8 @@ static int rpi_firmware_remove(struct platform_device *pdev)
|
||||
rpi_hwmon = NULL;
|
||||
platform_device_unregister(rpi_clk);
|
||||
rpi_clk = NULL;
|
||||
mbox_free_channel(fw->chan);
|
||||
|
||||
rpi_firmware_put(fw);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -273,19 +305,51 @@ static int rpi_firmware_remove(struct platform_device *pdev)
|
||||
* rpi_firmware_get - Get pointer to rpi_firmware structure.
|
||||
* @firmware_node: Pointer to the firmware Device Tree node.
|
||||
*
|
||||
* The reference to rpi_firmware has to be released with rpi_firmware_put().
|
||||
*
|
||||
* Returns NULL is the firmware device is not ready.
|
||||
*/
|
||||
struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node)
|
||||
{
|
||||
struct platform_device *pdev = of_find_device_by_node(firmware_node);
|
||||
struct rpi_firmware *fw;
|
||||
|
||||
if (!pdev)
|
||||
return NULL;
|
||||
|
||||
return platform_get_drvdata(pdev);
|
||||
fw = platform_get_drvdata(pdev);
|
||||
if (!fw)
|
||||
return NULL;
|
||||
|
||||
if (!kref_get_unless_zero(&fw->consumers))
|
||||
return NULL;
|
||||
|
||||
return fw;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rpi_firmware_get);
|
||||
|
||||
/**
|
||||
* devm_rpi_firmware_get - Get pointer to rpi_firmware structure.
|
||||
* @firmware_node: Pointer to the firmware Device Tree node.
|
||||
*
|
||||
* Returns NULL is the firmware device is not ready.
|
||||
*/
|
||||
struct rpi_firmware *devm_rpi_firmware_get(struct device *dev,
|
||||
struct device_node *firmware_node)
|
||||
{
|
||||
struct rpi_firmware *fw;
|
||||
|
||||
fw = rpi_firmware_get(firmware_node);
|
||||
if (!fw)
|
||||
return NULL;
|
||||
|
||||
if (devm_add_action_or_reset(dev, devm_rpi_firmware_put, fw))
|
||||
return NULL;
|
||||
|
||||
return fw;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(devm_rpi_firmware_get);
|
||||
|
||||
static const struct of_device_id rpi_firmware_of_match[] = {
|
||||
{ .compatible = "raspberrypi,bcm2835-firmware", },
|
||||
{},
|
||||
|
@ -981,8 +981,8 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
|
||||
genpool = svc_create_memory_pool(pdev, sh_memory);
|
||||
if (!genpool)
|
||||
return -ENOMEM;
|
||||
if (IS_ERR(genpool))
|
||||
return PTR_ERR(genpool);
|
||||
|
||||
/* allocate service controller and supporting channel */
|
||||
controller = devm_kzalloc(dev, sizeof(*controller), GFP_KERNEL);
|
||||
|
@ -115,7 +115,7 @@ static int fpga_bridge_dev_match(struct device *dev, const void *data)
|
||||
/**
|
||||
* fpga_bridge_get - get an exclusive reference to a fpga bridge
|
||||
* @dev: parent device that fpga bridge was registered with
|
||||
* @info: fpga manager info
|
||||
* @info: fpga image specific information
|
||||
*
|
||||
* Given a device, get an exclusive reference to a fpga bridge.
|
||||
*
|
||||
|
@ -58,6 +58,7 @@ static int amdgpu_sched_process_priority_override(struct amdgpu_device *adev,
|
||||
{
|
||||
struct fd f = fdget(fd);
|
||||
struct amdgpu_fpriv *fpriv;
|
||||
struct amdgpu_ctx_mgr *mgr;
|
||||
struct amdgpu_ctx *ctx;
|
||||
uint32_t id;
|
||||
int r;
|
||||
@ -71,8 +72,11 @@ static int amdgpu_sched_process_priority_override(struct amdgpu_device *adev,
|
||||
return r;
|
||||
}
|
||||
|
||||
idr_for_each_entry(&fpriv->ctx_mgr.ctx_handles, ctx, id)
|
||||
mgr = &fpriv->ctx_mgr;
|
||||
mutex_lock(&mgr->lock);
|
||||
idr_for_each_entry(&mgr->ctx_handles, ctx, id)
|
||||
amdgpu_ctx_priority_override(ctx, priority);
|
||||
mutex_unlock(&mgr->lock);
|
||||
|
||||
fdput(f);
|
||||
return 0;
|
||||
|
@ -3908,7 +3908,8 @@ static int gfx_v9_0_hw_fini(void *handle)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
|
||||
amdgpu_irq_put(adev, &adev->gfx.cp_ecc_error_irq, 0);
|
||||
if (amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__GFX))
|
||||
amdgpu_irq_put(adev, &adev->gfx.cp_ecc_error_irq, 0);
|
||||
amdgpu_irq_put(adev, &adev->gfx.priv_reg_irq, 0);
|
||||
amdgpu_irq_put(adev, &adev->gfx.priv_inst_irq, 0);
|
||||
|
||||
|
@ -1534,7 +1534,6 @@ static int gmc_v9_0_hw_fini(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
amdgpu_irq_put(adev, &adev->gmc.ecc_irq, 0);
|
||||
amdgpu_irq_put(adev, &adev->gmc.vm_fault, 0);
|
||||
|
||||
return 0;
|
||||
|
@ -1911,9 +1911,11 @@ static int sdma_v4_0_hw_fini(void *handle)
|
||||
if (amdgpu_sriov_vf(adev))
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < adev->sdma.num_instances; i++) {
|
||||
amdgpu_irq_put(adev, &adev->sdma.ecc_irq,
|
||||
AMDGPU_SDMA_IRQ_INSTANCE0 + i);
|
||||
if (amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__SDMA)) {
|
||||
for (i = 0; i < adev->sdma.num_instances; i++) {
|
||||
amdgpu_irq_put(adev, &adev->sdma.ecc_irq,
|
||||
AMDGPU_SDMA_IRQ_INSTANCE0 + i);
|
||||
}
|
||||
}
|
||||
|
||||
sdma_v4_0_ctx_switch_enable(adev, false);
|
||||
|
@ -5776,6 +5776,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
|
||||
continue;
|
||||
|
||||
dc_plane = dm_new_plane_state->dc_state;
|
||||
if (!dc_plane)
|
||||
continue;
|
||||
|
||||
bundle->surface_updates[planes_count].surface = dc_plane;
|
||||
if (new_pcrtc_state->color_mgmt_changed) {
|
||||
@ -7029,8 +7031,9 @@ static int dm_update_plane_state(struct dc *dc,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (dm_old_plane_state->dc_state)
|
||||
dc_plane_state_release(dm_old_plane_state->dc_state);
|
||||
|
||||
dc_plane_state_release(dm_old_plane_state->dc_state);
|
||||
dm_new_plane_state->dc_state = NULL;
|
||||
|
||||
*lock_and_validation_needed = true;
|
||||
|
@ -1315,6 +1315,9 @@ bool dc_remove_plane_from_context(
|
||||
struct dc_stream_status *stream_status = NULL;
|
||||
struct resource_pool *pool = dc->res_pool;
|
||||
|
||||
if (!plane_state)
|
||||
return true;
|
||||
|
||||
for (i = 0; i < context->stream_count; i++)
|
||||
if (context->streams[i] == stream) {
|
||||
stream_status = &context->stream_status[i];
|
||||
|
@ -1336,6 +1336,9 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
var->xres_virtual = fb->width;
|
||||
var->yres_virtual = fb->height;
|
||||
|
||||
/*
|
||||
* Workaround for SDL 1.2, which is known to be setting all pixel format
|
||||
* fields values to zero in some cases. We treat this situation as a
|
||||
|
@ -460,8 +460,9 @@ retry:
|
||||
*/
|
||||
dev->mode_config.delayed_event = true;
|
||||
if (dev->mode_config.poll_enabled)
|
||||
schedule_delayed_work(&dev->mode_config.output_poll_work,
|
||||
0);
|
||||
mod_delayed_work(system_wq,
|
||||
&dev->mode_config.output_poll_work,
|
||||
0);
|
||||
}
|
||||
|
||||
/* Re-enable polling in case the global poll config changed. */
|
||||
|
@ -775,8 +775,8 @@ static int decon_conf_irq(struct decon_context *ctx, const char *name,
|
||||
return irq;
|
||||
}
|
||||
}
|
||||
irq_set_status_flags(irq, IRQ_NOAUTOEN);
|
||||
ret = devm_request_irq(ctx->dev, irq, handler, flags, "drm_decon", ctx);
|
||||
ret = devm_request_irq(ctx->dev, irq, handler,
|
||||
flags | IRQF_NO_AUTOEN, "drm_decon", ctx);
|
||||
if (ret < 0) {
|
||||
dev_err(ctx->dev, "IRQ %s request failed\n", name);
|
||||
return ret;
|
||||
|
@ -1350,10 +1350,9 @@ static int exynos_dsi_register_te_irq(struct exynos_dsi *dsi,
|
||||
}
|
||||
|
||||
te_gpio_irq = gpio_to_irq(dsi->te_gpio);
|
||||
irq_set_status_flags(te_gpio_irq, IRQ_NOAUTOEN);
|
||||
|
||||
ret = request_threaded_irq(te_gpio_irq, exynos_dsi_te_irq_handler, NULL,
|
||||
IRQF_TRIGGER_RISING, "TE", dsi);
|
||||
IRQF_TRIGGER_RISING | IRQF_NO_AUTOEN, "TE", dsi);
|
||||
if (ret) {
|
||||
dev_err(dsi->dev, "request interrupt failed with %d\n", ret);
|
||||
gpio_free(dsi->te_gpio);
|
||||
@ -1792,9 +1791,9 @@ static int exynos_dsi_probe(struct platform_device *pdev)
|
||||
return dsi->irq;
|
||||
}
|
||||
|
||||
irq_set_status_flags(dsi->irq, IRQ_NOAUTOEN);
|
||||
ret = devm_request_threaded_irq(dev, dsi->irq, NULL,
|
||||
exynos_dsi_irq, IRQF_ONESHOT,
|
||||
exynos_dsi_irq,
|
||||
IRQF_ONESHOT | IRQF_NO_AUTOEN,
|
||||
dev_name(dev), dsi);
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to request dsi irq\n");
|
||||
|
@ -300,8 +300,10 @@ static int lima_pdev_probe(struct platform_device *pdev)
|
||||
|
||||
/* Allocate and initialize the DRM device. */
|
||||
ddev = drm_dev_alloc(&lima_drm_driver, &pdev->dev);
|
||||
if (IS_ERR(ddev))
|
||||
return PTR_ERR(ddev);
|
||||
if (IS_ERR(ddev)) {
|
||||
err = PTR_ERR(ddev);
|
||||
goto err_out0;
|
||||
}
|
||||
|
||||
ddev->dev_private = ldev;
|
||||
ldev->ddev = ddev;
|
||||
|
@ -233,8 +233,11 @@ struct msm_gpu *adreno_load_gpu(struct drm_device *dev)
|
||||
if (ret)
|
||||
return NULL;
|
||||
|
||||
/* Make sure pm runtime is active and reset any previous errors */
|
||||
pm_runtime_set_active(&pdev->dev);
|
||||
/*
|
||||
* Now that we have firmware loaded, and are ready to begin
|
||||
* booting the gpu, go ahead and enable runpm:
|
||||
*/
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
ret = pm_runtime_get_sync(&pdev->dev);
|
||||
if (ret < 0) {
|
||||
|
@ -899,7 +899,6 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
|
||||
pm_runtime_set_autosuspend_delay(&pdev->dev,
|
||||
adreno_gpu->info->inactive_period);
|
||||
pm_runtime_use_autosuspend(&pdev->dev);
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
return msm_gpu_init(drm, pdev, &adreno_gpu->base, &funcs->base,
|
||||
adreno_gpu->info->name, &adreno_gpu_config);
|
||||
@ -908,11 +907,15 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
|
||||
void adreno_gpu_cleanup(struct adreno_gpu *adreno_gpu)
|
||||
{
|
||||
struct msm_gpu *gpu = &adreno_gpu->base;
|
||||
struct msm_drm_private *priv = gpu->dev ? gpu->dev->dev_private : NULL;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(adreno_gpu->info->fw); i++)
|
||||
release_firmware(adreno_gpu->fw[i]);
|
||||
|
||||
if (priv && pm_runtime_enabled(&priv->gpu_pdev->dev))
|
||||
pm_runtime_disable(&priv->gpu_pdev->dev);
|
||||
|
||||
icc_put(gpu->icc_path);
|
||||
|
||||
msm_gpu_cleanup(&adreno_gpu->base);
|
||||
|
@ -460,7 +460,7 @@ static int otm8009a_probe(struct mipi_dsi_device *dsi)
|
||||
ctx->panel.funcs = &otm8009a_drm_funcs;
|
||||
|
||||
ctx->bl_dev = devm_backlight_device_register(dev, dev_name(dev),
|
||||
dsi->host->dev, ctx,
|
||||
dev, ctx,
|
||||
&otm8009a_backlight_ops,
|
||||
NULL);
|
||||
if (IS_ERR(ctx->bl_dev)) {
|
||||
|
@ -249,9 +249,6 @@ static int rockchip_drm_gem_object_mmap(struct drm_gem_object *obj,
|
||||
else
|
||||
ret = rockchip_drm_gem_object_mmap_dma(obj, vma);
|
||||
|
||||
if (ret)
|
||||
drm_gem_vm_close(vma);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -249,4 +249,5 @@ void vgem_fence_close(struct vgem_file *vfile)
|
||||
{
|
||||
idr_for_each(&vfile->fence_idr, __vgem_fence_idr_fini, vfile);
|
||||
idr_destroy(&vfile->fence_idr);
|
||||
mutex_destroy(&vfile->fence_mutex);
|
||||
}
|
||||
|
@ -1265,6 +1265,9 @@ static void wacom_intuos_pro2_bt_pen(struct wacom_wac *wacom)
|
||||
|
||||
struct input_dev *pen_input = wacom->pen_input;
|
||||
unsigned char *data = wacom->data;
|
||||
int number_of_valid_frames = 0;
|
||||
int time_interval = 15000000;
|
||||
ktime_t time_packet_received = ktime_get();
|
||||
int i;
|
||||
|
||||
if (wacom->features.type == INTUOSP2_BT ||
|
||||
@ -1285,12 +1288,30 @@ static void wacom_intuos_pro2_bt_pen(struct wacom_wac *wacom)
|
||||
wacom->id[0] |= (wacom->serial[0] >> 32) & 0xFFFFF;
|
||||
}
|
||||
|
||||
/* number of valid frames */
|
||||
for (i = 0; i < pen_frames; i++) {
|
||||
unsigned char *frame = &data[i*pen_frame_len + 1];
|
||||
bool valid = frame[0] & 0x80;
|
||||
|
||||
if (valid)
|
||||
number_of_valid_frames++;
|
||||
}
|
||||
|
||||
if (number_of_valid_frames) {
|
||||
if (wacom->hid_data.time_delayed)
|
||||
time_interval = ktime_get() - wacom->hid_data.time_delayed;
|
||||
time_interval /= number_of_valid_frames;
|
||||
wacom->hid_data.time_delayed = time_packet_received;
|
||||
}
|
||||
|
||||
for (i = 0; i < number_of_valid_frames; i++) {
|
||||
unsigned char *frame = &data[i*pen_frame_len + 1];
|
||||
bool valid = frame[0] & 0x80;
|
||||
bool prox = frame[0] & 0x40;
|
||||
bool range = frame[0] & 0x20;
|
||||
bool invert = frame[0] & 0x10;
|
||||
int frames_number_reversed = number_of_valid_frames - i - 1;
|
||||
int event_timestamp = time_packet_received - frames_number_reversed * time_interval;
|
||||
|
||||
if (!valid)
|
||||
continue;
|
||||
@ -1303,6 +1324,7 @@ static void wacom_intuos_pro2_bt_pen(struct wacom_wac *wacom)
|
||||
wacom->tool[0] = 0;
|
||||
wacom->id[0] = 0;
|
||||
wacom->serial[0] = 0;
|
||||
wacom->hid_data.time_delayed = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1339,6 +1361,7 @@ static void wacom_intuos_pro2_bt_pen(struct wacom_wac *wacom)
|
||||
get_unaligned_le16(&frame[11]));
|
||||
}
|
||||
}
|
||||
|
||||
if (wacom->tool[0]) {
|
||||
input_report_abs(pen_input, ABS_PRESSURE, get_unaligned_le16(&frame[5]));
|
||||
if (wacom->features.type == INTUOSP2_BT ||
|
||||
@ -1362,6 +1385,9 @@ static void wacom_intuos_pro2_bt_pen(struct wacom_wac *wacom)
|
||||
|
||||
wacom->shared->stylus_in_proximity = prox;
|
||||
|
||||
/* add timestamp to unpack the frames */
|
||||
input_set_timestamp(pen_input, event_timestamp);
|
||||
|
||||
input_sync(pen_input);
|
||||
}
|
||||
}
|
||||
@ -1853,6 +1879,7 @@ static void wacom_map_usage(struct input_dev *input, struct hid_usage *usage,
|
||||
int fmax = field->logical_maximum;
|
||||
unsigned int equivalent_usage = wacom_equivalent_usage(usage->hid);
|
||||
int resolution_code = code;
|
||||
int resolution = hidinput_calc_abs_res(field, resolution_code);
|
||||
|
||||
if (equivalent_usage == HID_DG_TWIST) {
|
||||
resolution_code = ABS_RZ;
|
||||
@ -1875,8 +1902,15 @@ static void wacom_map_usage(struct input_dev *input, struct hid_usage *usage,
|
||||
switch (type) {
|
||||
case EV_ABS:
|
||||
input_set_abs_params(input, code, fmin, fmax, fuzz, 0);
|
||||
input_abs_set_res(input, code,
|
||||
hidinput_calc_abs_res(field, resolution_code));
|
||||
|
||||
/* older tablet may miss physical usage */
|
||||
if ((code == ABS_X || code == ABS_Y) && !resolution) {
|
||||
resolution = WACOM_INTUOS_RES;
|
||||
hid_warn(input,
|
||||
"Wacom usage (%d) missing resolution \n",
|
||||
code);
|
||||
}
|
||||
input_abs_set_res(input, code, resolution);
|
||||
break;
|
||||
case EV_KEY:
|
||||
input_set_capability(input, EV_KEY, code);
|
||||
|
@ -320,6 +320,7 @@ struct hid_data {
|
||||
int bat_connected;
|
||||
int ps_connected;
|
||||
bool pad_input_event_flag;
|
||||
int time_delayed;
|
||||
};
|
||||
|
||||
struct wacom_remote_data {
|
||||
|
@ -1058,7 +1058,7 @@ omap_i2c_isr(int irq, void *dev_id)
|
||||
u16 stat;
|
||||
|
||||
stat = omap_i2c_read_reg(omap, OMAP_I2C_STAT_REG);
|
||||
mask = omap_i2c_read_reg(omap, OMAP_I2C_IE_REG);
|
||||
mask = omap_i2c_read_reg(omap, OMAP_I2C_IE_REG) & ~OMAP_I2C_STAT_NACK;
|
||||
|
||||
if (stat & mask)
|
||||
ret = IRQ_WAKE_THREAD;
|
||||
|
@ -630,7 +630,7 @@ out:
|
||||
|
||||
static int palmas_gpadc_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct iio_dev *indio_dev = dev_to_iio_dev(&pdev->dev);
|
||||
struct iio_dev *indio_dev = dev_get_drvdata(&pdev->dev);
|
||||
struct palmas_gpadc *adc = iio_priv(indio_dev);
|
||||
|
||||
if (adc->wakeup1_enable || adc->wakeup2_enable)
|
||||
|
@ -529,6 +529,12 @@ static int max44009_probe(struct i2c_client *client,
|
||||
return devm_iio_device_register(&client->dev, indio_dev);
|
||||
}
|
||||
|
||||
static const struct of_device_id max44009_of_match[] = {
|
||||
{ .compatible = "maxim,max44009" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, max44009_of_match);
|
||||
|
||||
static const struct i2c_device_id max44009_id[] = {
|
||||
{ "max44009", 0 },
|
||||
{ }
|
||||
@ -538,18 +544,13 @@ MODULE_DEVICE_TABLE(i2c, max44009_id);
|
||||
static struct i2c_driver max44009_driver = {
|
||||
.driver = {
|
||||
.name = MAX44009_DRV_NAME,
|
||||
.of_match_table = max44009_of_match,
|
||||
},
|
||||
.probe = max44009_probe,
|
||||
.id_table = max44009_id,
|
||||
};
|
||||
module_i2c_driver(max44009_driver);
|
||||
|
||||
static const struct of_device_id max44009_of_match[] = {
|
||||
{ .compatible = "maxim,max44009" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, max44009_of_match);
|
||||
|
||||
MODULE_AUTHOR("Robert Eshleman <bobbyeshleman@gmail.com>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DESCRIPTION("MAX44009 ambient light sensor driver");
|
||||
|
@ -173,7 +173,7 @@ int hfi1_mmu_rb_insert(struct mmu_rb_handler *handler,
|
||||
goto unlock;
|
||||
}
|
||||
__mmu_int_rb_insert(mnode, &handler->root);
|
||||
list_add(&mnode->list, &handler->lru_list);
|
||||
list_add_tail(&mnode->list, &handler->lru_list);
|
||||
|
||||
ret = handler->ops->insert(handler->ops_arg, mnode);
|
||||
if (ret) {
|
||||
@ -220,8 +220,10 @@ bool hfi1_mmu_rb_remove_unless_exact(struct mmu_rb_handler *handler,
|
||||
spin_lock_irqsave(&handler->lock, flags);
|
||||
node = __mmu_rb_search(handler, addr, len);
|
||||
if (node) {
|
||||
if (node->addr == addr && node->len == len)
|
||||
if (node->addr == addr && node->len == len) {
|
||||
list_move_tail(&node->list, &handler->lru_list);
|
||||
goto unlock;
|
||||
}
|
||||
__mmu_int_rb_remove(node, &handler->root);
|
||||
list_del(&node->list); /* remove from LRU list */
|
||||
ret = true;
|
||||
@ -242,8 +244,7 @@ void hfi1_mmu_rb_evict(struct mmu_rb_handler *handler, void *evict_arg)
|
||||
INIT_LIST_HEAD(&del_list);
|
||||
|
||||
spin_lock_irqsave(&handler->lock, flags);
|
||||
list_for_each_entry_safe_reverse(rbnode, ptr, &handler->lru_list,
|
||||
list) {
|
||||
list_for_each_entry_safe(rbnode, ptr, &handler->lru_list, list) {
|
||||
if (handler->ops->evict(handler->ops_arg, rbnode, evict_arg,
|
||||
&stop)) {
|
||||
__mmu_int_rb_remove(rbnode, &handler->root);
|
||||
@ -255,9 +256,7 @@ void hfi1_mmu_rb_evict(struct mmu_rb_handler *handler, void *evict_arg)
|
||||
}
|
||||
spin_unlock_irqrestore(&handler->lock, flags);
|
||||
|
||||
while (!list_empty(&del_list)) {
|
||||
rbnode = list_first_entry(&del_list, struct mmu_rb_node, list);
|
||||
list_del(&rbnode->list);
|
||||
list_for_each_entry_safe(rbnode, ptr, &del_list, list) {
|
||||
handler->ops->remove(handler->ops_arg, rbnode);
|
||||
}
|
||||
}
|
||||
|
@ -438,9 +438,13 @@ static int set_user_sq_size(struct mlx4_ib_dev *dev,
|
||||
struct mlx4_ib_qp *qp,
|
||||
struct mlx4_ib_create_qp *ucmd)
|
||||
{
|
||||
u32 cnt;
|
||||
|
||||
/* Sanity check SQ size before proceeding */
|
||||
if ((1 << ucmd->log_sq_bb_count) > dev->dev->caps.max_wqes ||
|
||||
ucmd->log_sq_stride >
|
||||
if (check_shl_overflow(1, ucmd->log_sq_bb_count, &cnt) ||
|
||||
cnt > dev->dev->caps.max_wqes)
|
||||
return -EINVAL;
|
||||
if (ucmd->log_sq_stride >
|
||||
ilog2(roundup_pow_of_two(dev->dev->caps.max_sq_desc_sz)) ||
|
||||
ucmd->log_sq_stride < MLX4_IB_MIN_SQ_STRIDE)
|
||||
return -EINVAL;
|
||||
|
@ -3821,7 +3821,7 @@ static int mlx5_ib_modify_dct(struct ib_qp *ibqp, struct ib_qp_attr *attr,
|
||||
return -EINVAL;
|
||||
|
||||
if (attr->port_num == 0 ||
|
||||
attr->port_num > MLX5_CAP_GEN(dev->mdev, num_ports)) {
|
||||
attr->port_num > dev->num_ports) {
|
||||
mlx5_ib_dbg(dev, "invalid port number %d. number of ports is %d\n",
|
||||
attr->port_num, dev->num_ports);
|
||||
return -EINVAL;
|
||||
|
@ -505,8 +505,6 @@ void rvt_qp_exit(struct rvt_dev_info *rdi)
|
||||
if (qps_inuse)
|
||||
rvt_pr_err(rdi, "QP memory leak! %u still in use\n",
|
||||
qps_inuse);
|
||||
if (!rdi->qp_dev)
|
||||
return;
|
||||
|
||||
kfree(rdi->qp_dev->qp_table);
|
||||
free_qpn_table(&rdi->qp_dev->qpn_table);
|
||||
|
@ -472,9 +472,6 @@ static int siw_netdev_event(struct notifier_block *nb, unsigned long event,
|
||||
|
||||
dev_dbg(&netdev->dev, "siw: event %lu\n", event);
|
||||
|
||||
if (dev_net(netdev) != &init_net)
|
||||
return NOTIFY_OK;
|
||||
|
||||
base_dev = ib_device_get_by_netdev(netdev, RDMA_DRIVER_SIW);
|
||||
if (!base_dev)
|
||||
return NOTIFY_OK;
|
||||
|
@ -548,7 +548,7 @@ static int siw_tx_hdt(struct siw_iwarp_tx *c_tx, struct socket *s)
|
||||
data_len -= plen;
|
||||
fp_off = 0;
|
||||
|
||||
if (++seg > (int)MAX_ARRAY) {
|
||||
if (++seg >= (int)MAX_ARRAY) {
|
||||
siw_dbg_qp(tx_qp(c_tx), "to many fragments\n");
|
||||
siw_unmap_pages(page_array, kmap_mask);
|
||||
wqe->processed -= c_tx->bytes_unsent;
|
||||
|
@ -137,7 +137,7 @@ static int rpi_ts_probe(struct platform_device *pdev)
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
fw = rpi_firmware_get(fw_node);
|
||||
fw = devm_rpi_firmware_get(&pdev->dev, fw_node);
|
||||
of_node_put(fw_node);
|
||||
if (!fw)
|
||||
return -EPROBE_DEFER;
|
||||
@ -164,7 +164,6 @@ static int rpi_ts_probe(struct platform_device *pdev)
|
||||
touchbuf = (u32)ts->fw_regs_phys;
|
||||
error = rpi_firmware_property(fw, RPI_FIRMWARE_FRAMEBUFFER_SET_TOUCHBUF,
|
||||
&touchbuf, sizeof(touchbuf));
|
||||
|
||||
if (error || touchbuf != 0) {
|
||||
dev_warn(dev, "Failed to set touchbuf, %d\n", error);
|
||||
return error;
|
||||
|
@ -812,7 +812,7 @@ config LEDS_SPI_BYTE
|
||||
config LEDS_TI_LMU_COMMON
|
||||
tristate "LED driver for TI LMU"
|
||||
depends on LEDS_CLASS
|
||||
depends on REGMAP
|
||||
select REGMAP
|
||||
help
|
||||
Say Y to enable the LED driver for TI LMU devices.
|
||||
This supports common features between the TI LM3532, LM3631, LM3632,
|
||||
|
@ -86,6 +86,7 @@ config ADB_PMU_LED
|
||||
|
||||
config ADB_PMU_LED_DISK
|
||||
bool "Use front LED as DISK LED by default"
|
||||
depends on ATA
|
||||
depends on ADB_PMU_LED
|
||||
depends on LEDS_CLASS
|
||||
select LEDS_TRIGGERS
|
||||
|
@ -171,6 +171,7 @@ static void wf_sat_release(struct kref *ref)
|
||||
|
||||
if (sat->nr >= 0)
|
||||
sats[sat->nr] = NULL;
|
||||
of_node_put(sat->node);
|
||||
kfree(sat);
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ struct zynqmp_ipi_pdata {
|
||||
unsigned int method;
|
||||
u32 local_id;
|
||||
int num_mboxes;
|
||||
struct zynqmp_ipi_mbox *ipi_mboxes;
|
||||
struct zynqmp_ipi_mbox ipi_mboxes[];
|
||||
};
|
||||
|
||||
static struct device_driver zynqmp_ipi_mbox_driver = {
|
||||
@ -152,7 +152,7 @@ static irqreturn_t zynqmp_ipi_interrupt(int irq, void *data)
|
||||
struct zynqmp_ipi_message *msg;
|
||||
u64 arg0, arg3;
|
||||
struct arm_smccc_res res;
|
||||
int ret, i;
|
||||
int ret, i, status = IRQ_NONE;
|
||||
|
||||
(void)irq;
|
||||
arg0 = SMC_IPI_MAILBOX_STATUS_ENQUIRY;
|
||||
@ -170,11 +170,11 @@ static irqreturn_t zynqmp_ipi_interrupt(int irq, void *data)
|
||||
memcpy_fromio(msg->data, mchan->req_buf,
|
||||
msg->len);
|
||||
mbox_chan_received_data(chan, (void *)msg);
|
||||
return IRQ_HANDLED;
|
||||
status = IRQ_HANDLED;
|
||||
}
|
||||
}
|
||||
}
|
||||
return IRQ_NONE;
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -634,8 +634,13 @@ static int zynqmp_ipi_probe(struct platform_device *pdev)
|
||||
struct zynqmp_ipi_mbox *mbox;
|
||||
int num_mboxes, ret = -EINVAL;
|
||||
|
||||
num_mboxes = of_get_child_count(np);
|
||||
pdata = devm_kzalloc(dev, sizeof(*pdata) + (num_mboxes * sizeof(*mbox)),
|
||||
num_mboxes = of_get_available_child_count(np);
|
||||
if (num_mboxes == 0) {
|
||||
dev_err(dev, "mailbox nodes not available\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pdata = devm_kzalloc(dev, struct_size(pdata, ipi_mboxes, num_mboxes),
|
||||
GFP_KERNEL);
|
||||
if (!pdata)
|
||||
return -ENOMEM;
|
||||
@ -649,8 +654,6 @@ static int zynqmp_ipi_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
pdata->num_mboxes = num_mboxes;
|
||||
pdata->ipi_mboxes = (struct zynqmp_ipi_mbox *)
|
||||
((char *)pdata + sizeof(*pdata));
|
||||
|
||||
mbox = pdata->ipi_mboxes;
|
||||
for_each_available_child_of_node(np, nc) {
|
||||
|
@ -2232,6 +2232,7 @@ static int __init dm_clone_init(void)
|
||||
r = dm_register_target(&clone_target);
|
||||
if (r < 0) {
|
||||
DMERR("Failed to register clone target");
|
||||
kmem_cache_destroy(_hydration_cache);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -124,9 +124,9 @@ static int parse_features(struct dm_arg_set *as, struct flakey_c *fc,
|
||||
* Direction r or w?
|
||||
*/
|
||||
arg_name = dm_shift_arg(as);
|
||||
if (!strcasecmp(arg_name, "w"))
|
||||
if (arg_name && !strcasecmp(arg_name, "w"))
|
||||
fc->corrupt_bio_rw = WRITE;
|
||||
else if (!strcasecmp(arg_name, "r"))
|
||||
else if (arg_name && !strcasecmp(arg_name, "r"))
|
||||
fc->corrupt_bio_rw = READ;
|
||||
else {
|
||||
ti->error = "Invalid corrupt bio direction (r or w)";
|
||||
|
@ -4288,11 +4288,13 @@ static int __init dm_integrity_init(void)
|
||||
}
|
||||
|
||||
r = dm_register_target(&integrity_target);
|
||||
|
||||
if (r < 0)
|
||||
if (r < 0) {
|
||||
DMERR("register failed %d", r);
|
||||
kmem_cache_destroy(journal_io_cache);
|
||||
return r;
|
||||
}
|
||||
|
||||
return r;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit dm_integrity_exit(void)
|
||||
|
@ -1435,11 +1435,12 @@ static int table_clear(struct file *filp, struct dm_ioctl *param, size_t param_s
|
||||
hc->new_map = NULL;
|
||||
}
|
||||
|
||||
param->flags &= ~DM_INACTIVE_PRESENT_FLAG;
|
||||
|
||||
__dev_status(hc->md, param);
|
||||
md = hc->md;
|
||||
up_write(&_hash_lock);
|
||||
|
||||
param->flags &= ~DM_INACTIVE_PRESENT_FLAG;
|
||||
__dev_status(md, param);
|
||||
|
||||
if (old_map) {
|
||||
dm_sync_table(md);
|
||||
dm_table_destroy(old_map);
|
||||
|
@ -475,13 +475,14 @@ static int verity_verify_io(struct dm_verity_io *io)
|
||||
struct bvec_iter start;
|
||||
unsigned b;
|
||||
struct crypto_wait wait;
|
||||
struct bio *bio = dm_bio_from_per_bio_data(io, v->ti->per_io_data_size);
|
||||
|
||||
for (b = 0; b < io->n_blocks; b++) {
|
||||
int r;
|
||||
sector_t cur_block = io->block + b;
|
||||
struct ahash_request *req = verity_io_hash_req(v, io);
|
||||
|
||||
if (v->validated_blocks &&
|
||||
if (v->validated_blocks && bio->bi_status == BLK_STS_OK &&
|
||||
likely(test_bit(cur_block, v->validated_blocks))) {
|
||||
verity_bv_skip_block(v, io, &io->iter);
|
||||
continue;
|
||||
@ -529,9 +530,17 @@ static int verity_verify_io(struct dm_verity_io *io)
|
||||
else if (verity_fec_decode(v, io, DM_VERITY_BLOCK_TYPE_DATA,
|
||||
cur_block, NULL, &start) == 0)
|
||||
continue;
|
||||
else if (verity_handle_err(v, DM_VERITY_BLOCK_TYPE_DATA,
|
||||
cur_block))
|
||||
return -EIO;
|
||||
else {
|
||||
if (bio->bi_status) {
|
||||
/*
|
||||
* Error correction failed; Just return error
|
||||
*/
|
||||
return -EIO;
|
||||
}
|
||||
if (verity_handle_err(v, DM_VERITY_BLOCK_TYPE_DATA,
|
||||
cur_block))
|
||||
return -EIO;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -2229,11 +2229,22 @@ static void recovery_request_write(struct mddev *mddev, struct r10bio *r10_bio)
|
||||
{
|
||||
struct r10conf *conf = mddev->private;
|
||||
int d;
|
||||
struct bio *wbio, *wbio2;
|
||||
struct bio *wbio = r10_bio->devs[1].bio;
|
||||
struct bio *wbio2 = r10_bio->devs[1].repl_bio;
|
||||
|
||||
/* Need to test wbio2->bi_end_io before we call
|
||||
* generic_make_request as if the former is NULL,
|
||||
* the latter is free to free wbio2.
|
||||
*/
|
||||
if (wbio2 && !wbio2->bi_end_io)
|
||||
wbio2 = NULL;
|
||||
|
||||
if (!test_bit(R10BIO_Uptodate, &r10_bio->state)) {
|
||||
fix_recovery_read_error(r10_bio);
|
||||
end_sync_request(r10_bio);
|
||||
if (wbio->bi_end_io)
|
||||
end_sync_request(r10_bio);
|
||||
if (wbio2)
|
||||
end_sync_request(r10_bio);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2242,14 +2253,6 @@ static void recovery_request_write(struct mddev *mddev, struct r10bio *r10_bio)
|
||||
* and submit the write request
|
||||
*/
|
||||
d = r10_bio->devs[1].devnum;
|
||||
wbio = r10_bio->devs[1].bio;
|
||||
wbio2 = r10_bio->devs[1].repl_bio;
|
||||
/* Need to test wbio2->bi_end_io before we call
|
||||
* generic_make_request as if the former is NULL,
|
||||
* the latter is free to free wbio2.
|
||||
*/
|
||||
if (wbio2 && !wbio2->bi_end_io)
|
||||
wbio2 = NULL;
|
||||
if (wbio->bi_end_io) {
|
||||
atomic_inc(&conf->mirrors[d].rdev->nr_pending);
|
||||
md_sync_acct(conf->mirrors[d].rdev->bdev, bio_sectors(wbio));
|
||||
@ -2917,10 +2920,6 @@ static sector_t raid10_sync_request(struct mddev *mddev, sector_t sector_nr,
|
||||
sector_t chunk_mask = conf->geo.chunk_mask;
|
||||
int page_idx = 0;
|
||||
|
||||
if (!mempool_initialized(&conf->r10buf_pool))
|
||||
if (init_resync(conf))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Allow skipping a full rebuild for incremental assembly
|
||||
* of a clean array, like RAID1 does.
|
||||
@ -2936,6 +2935,10 @@ static sector_t raid10_sync_request(struct mddev *mddev, sector_t sector_nr,
|
||||
return mddev->dev_sectors - sector_nr;
|
||||
}
|
||||
|
||||
if (!mempool_initialized(&conf->r10buf_pool))
|
||||
if (init_resync(conf))
|
||||
return 0;
|
||||
|
||||
skipped:
|
||||
max_sector = mddev->dev_sectors;
|
||||
if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery) ||
|
||||
@ -3632,6 +3635,20 @@ static int setup_geo(struct geom *geo, struct mddev *mddev, enum geo_type new)
|
||||
return nc*fc;
|
||||
}
|
||||
|
||||
static void raid10_free_conf(struct r10conf *conf)
|
||||
{
|
||||
if (!conf)
|
||||
return;
|
||||
|
||||
mempool_exit(&conf->r10bio_pool);
|
||||
kfree(conf->mirrors);
|
||||
kfree(conf->mirrors_old);
|
||||
kfree(conf->mirrors_new);
|
||||
safe_put_page(conf->tmppage);
|
||||
bioset_exit(&conf->bio_split);
|
||||
kfree(conf);
|
||||
}
|
||||
|
||||
static struct r10conf *setup_conf(struct mddev *mddev)
|
||||
{
|
||||
struct r10conf *conf = NULL;
|
||||
@ -3714,20 +3731,24 @@ static struct r10conf *setup_conf(struct mddev *mddev)
|
||||
return conf;
|
||||
|
||||
out:
|
||||
if (conf) {
|
||||
mempool_exit(&conf->r10bio_pool);
|
||||
kfree(conf->mirrors);
|
||||
safe_put_page(conf->tmppage);
|
||||
bioset_exit(&conf->bio_split);
|
||||
kfree(conf);
|
||||
}
|
||||
raid10_free_conf(conf);
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
|
||||
static void raid10_set_io_opt(struct r10conf *conf)
|
||||
{
|
||||
int raid_disks = conf->geo.raid_disks;
|
||||
|
||||
if (!(conf->geo.raid_disks % conf->geo.near_copies))
|
||||
raid_disks /= conf->geo.near_copies;
|
||||
blk_queue_io_opt(conf->mddev->queue, (conf->mddev->chunk_sectors << 9) *
|
||||
raid_disks);
|
||||
}
|
||||
|
||||
static int raid10_run(struct mddev *mddev)
|
||||
{
|
||||
struct r10conf *conf;
|
||||
int i, disk_idx, chunk_size;
|
||||
int i, disk_idx;
|
||||
struct raid10_info *disk;
|
||||
struct md_rdev *rdev;
|
||||
sector_t size;
|
||||
@ -3748,6 +3769,9 @@ static int raid10_run(struct mddev *mddev)
|
||||
if (!conf)
|
||||
goto out;
|
||||
|
||||
mddev->thread = conf->thread;
|
||||
conf->thread = NULL;
|
||||
|
||||
if (mddev_is_clustered(conf->mddev)) {
|
||||
int fc, fo;
|
||||
|
||||
@ -3760,21 +3784,13 @@ static int raid10_run(struct mddev *mddev)
|
||||
}
|
||||
}
|
||||
|
||||
mddev->thread = conf->thread;
|
||||
conf->thread = NULL;
|
||||
|
||||
chunk_size = mddev->chunk_sectors << 9;
|
||||
if (mddev->queue) {
|
||||
blk_queue_max_discard_sectors(mddev->queue,
|
||||
mddev->chunk_sectors);
|
||||
blk_queue_max_write_same_sectors(mddev->queue, 0);
|
||||
blk_queue_max_write_zeroes_sectors(mddev->queue, 0);
|
||||
blk_queue_io_min(mddev->queue, chunk_size);
|
||||
if (conf->geo.raid_disks % conf->geo.near_copies)
|
||||
blk_queue_io_opt(mddev->queue, chunk_size * conf->geo.raid_disks);
|
||||
else
|
||||
blk_queue_io_opt(mddev->queue, chunk_size *
|
||||
(conf->geo.raid_disks / conf->geo.near_copies));
|
||||
blk_queue_io_min(mddev->queue, mddev->chunk_sectors << 9);
|
||||
raid10_set_io_opt(conf);
|
||||
}
|
||||
|
||||
rdev_for_each(rdev, mddev) {
|
||||
@ -3934,10 +3950,7 @@ static int raid10_run(struct mddev *mddev)
|
||||
|
||||
out_free_conf:
|
||||
md_unregister_thread(&mddev->thread);
|
||||
mempool_exit(&conf->r10bio_pool);
|
||||
safe_put_page(conf->tmppage);
|
||||
kfree(conf->mirrors);
|
||||
kfree(conf);
|
||||
raid10_free_conf(conf);
|
||||
mddev->private = NULL;
|
||||
out:
|
||||
return -EIO;
|
||||
@ -3945,15 +3958,7 @@ out:
|
||||
|
||||
static void raid10_free(struct mddev *mddev, void *priv)
|
||||
{
|
||||
struct r10conf *conf = priv;
|
||||
|
||||
mempool_exit(&conf->r10bio_pool);
|
||||
safe_put_page(conf->tmppage);
|
||||
kfree(conf->mirrors);
|
||||
kfree(conf->mirrors_old);
|
||||
kfree(conf->mirrors_new);
|
||||
bioset_exit(&conf->bio_split);
|
||||
kfree(conf);
|
||||
raid10_free_conf(priv);
|
||||
}
|
||||
|
||||
static void raid10_quiesce(struct mddev *mddev, int quiesce)
|
||||
@ -4748,6 +4753,7 @@ static void end_reshape(struct r10conf *conf)
|
||||
stripe /= conf->geo.near_copies;
|
||||
if (conf->mddev->queue->backing_dev_info->ra_pages < 2 * stripe)
|
||||
conf->mddev->queue->backing_dev_info->ra_pages = 2 * stripe;
|
||||
raid10_set_io_opt(conf);
|
||||
}
|
||||
conf->fullsync = 0;
|
||||
}
|
||||
|
@ -7159,6 +7159,12 @@ static int only_parity(int raid_disk, int algo, int raid_disks, int max_degraded
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void raid5_set_io_opt(struct r5conf *conf)
|
||||
{
|
||||
blk_queue_io_opt(conf->mddev->queue, (conf->chunk_sectors << 9) *
|
||||
(conf->raid_disks - conf->max_degraded));
|
||||
}
|
||||
|
||||
static int raid5_run(struct mddev *mddev)
|
||||
{
|
||||
struct r5conf *conf;
|
||||
@ -7448,8 +7454,7 @@ static int raid5_run(struct mddev *mddev)
|
||||
|
||||
chunk_size = mddev->chunk_sectors << 9;
|
||||
blk_queue_io_min(mddev->queue, chunk_size);
|
||||
blk_queue_io_opt(mddev->queue, chunk_size *
|
||||
(conf->raid_disks - conf->max_degraded));
|
||||
raid5_set_io_opt(conf);
|
||||
mddev->queue->limits.raid_partial_stripes_expensive = 1;
|
||||
/*
|
||||
* We can only discard a whole stripe. It doesn't make sense to
|
||||
@ -8043,6 +8048,7 @@ static void end_reshape(struct r5conf *conf)
|
||||
/ PAGE_SIZE);
|
||||
if (conf->mddev->queue->backing_dev_info->ra_pages < 2 * stripe)
|
||||
conf->mddev->queue->backing_dev_info->ra_pages = 2 * stripe;
|
||||
raid5_set_io_opt(conf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1179,6 +1179,7 @@ static void dm1105_remove(struct pci_dev *pdev)
|
||||
struct dvb_demux *dvbdemux = &dev->demux;
|
||||
struct dmx_demux *dmx = &dvbdemux->dmx;
|
||||
|
||||
cancel_work_sync(&dev->ir.work);
|
||||
dm1105_ir_exit(dev);
|
||||
dmx->close(dmx);
|
||||
dvb_net_release(&dev->dvbnet);
|
||||
|
@ -300,6 +300,7 @@ int saa7134_ts_start(struct saa7134_dev *dev)
|
||||
|
||||
int saa7134_ts_fini(struct saa7134_dev *dev)
|
||||
{
|
||||
del_timer_sync(&dev->ts_q.timeout);
|
||||
saa7134_pgtable_free(dev->pci, &dev->ts_q.pt);
|
||||
return 0;
|
||||
}
|
||||
|
@ -185,6 +185,7 @@ int saa7134_vbi_init1(struct saa7134_dev *dev)
|
||||
int saa7134_vbi_fini(struct saa7134_dev *dev)
|
||||
{
|
||||
/* nothing */
|
||||
del_timer_sync(&dev->vbi_q.timeout);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2154,6 +2154,7 @@ int saa7134_video_init1(struct saa7134_dev *dev)
|
||||
|
||||
void saa7134_video_fini(struct saa7134_dev *dev)
|
||||
{
|
||||
del_timer_sync(&dev->video_q.timeout);
|
||||
/* free stuff */
|
||||
vb2_queue_release(&dev->video_vbq);
|
||||
saa7134_pgtable_free(dev->pci, &dev->video_q.pt);
|
||||
|
@ -822,10 +822,10 @@ static int write_ts_to_decoder(struct av7110 *av7110, int type, const u8 *buf, s
|
||||
av7110_ipack_flush(ipack);
|
||||
|
||||
if (buf[3] & ADAPT_FIELD) {
|
||||
if (buf[4] > len - 1 - 4)
|
||||
return 0;
|
||||
len -= buf[4] + 1;
|
||||
buf += buf[4] + 1;
|
||||
if (!len)
|
||||
return 0;
|
||||
}
|
||||
|
||||
av7110_ipack_instant_repack(buf + 4, len - 4, ipack);
|
||||
|
@ -2121,9 +2121,7 @@ static int fdp1_open(struct file *file)
|
||||
|
||||
if (ctx->hdl.error) {
|
||||
ret = ctx->hdl.error;
|
||||
v4l2_ctrl_handler_free(&ctx->hdl);
|
||||
kfree(ctx);
|
||||
goto done;
|
||||
goto error_ctx;
|
||||
}
|
||||
|
||||
ctx->fh.ctrl_handler = &ctx->hdl;
|
||||
@ -2137,20 +2135,27 @@ static int fdp1_open(struct file *file)
|
||||
|
||||
if (IS_ERR(ctx->fh.m2m_ctx)) {
|
||||
ret = PTR_ERR(ctx->fh.m2m_ctx);
|
||||
|
||||
v4l2_ctrl_handler_free(&ctx->hdl);
|
||||
kfree(ctx);
|
||||
goto done;
|
||||
goto error_ctx;
|
||||
}
|
||||
|
||||
/* Perform any power management required */
|
||||
pm_runtime_get_sync(fdp1->dev);
|
||||
ret = pm_runtime_resume_and_get(fdp1->dev);
|
||||
if (ret < 0)
|
||||
goto error_pm;
|
||||
|
||||
v4l2_fh_add(&ctx->fh);
|
||||
|
||||
dprintk(fdp1, "Created instance: %p, m2m_ctx: %p\n",
|
||||
ctx, ctx->fh.m2m_ctx);
|
||||
|
||||
mutex_unlock(&fdp1->dev_mutex);
|
||||
return 0;
|
||||
|
||||
error_pm:
|
||||
v4l2_m2m_ctx_release(ctx->fh.m2m_ctx);
|
||||
error_ctx:
|
||||
v4l2_ctrl_handler_free(&ctx->hdl);
|
||||
kfree(ctx);
|
||||
done:
|
||||
mutex_unlock(&fdp1->dev_mutex);
|
||||
return ret;
|
||||
@ -2255,7 +2260,6 @@ static int fdp1_probe(struct platform_device *pdev)
|
||||
struct fdp1_dev *fdp1;
|
||||
struct video_device *vfd;
|
||||
struct device_node *fcp_node;
|
||||
struct resource *res;
|
||||
struct clk *clk;
|
||||
unsigned int i;
|
||||
|
||||
@ -2282,17 +2286,15 @@ static int fdp1_probe(struct platform_device *pdev)
|
||||
platform_set_drvdata(pdev, fdp1);
|
||||
|
||||
/* Memory-mapped registers */
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
fdp1->regs = devm_ioremap_resource(&pdev->dev, res);
|
||||
fdp1->regs = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(fdp1->regs))
|
||||
return PTR_ERR(fdp1->regs);
|
||||
|
||||
/* Interrupt service routine registration */
|
||||
fdp1->irq = ret = platform_get_irq(pdev, 0);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "cannot find IRQ\n");
|
||||
ret = platform_get_irq(pdev, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
fdp1->irq = ret;
|
||||
|
||||
ret = devm_request_irq(&pdev->dev, fdp1->irq, fdp1_irq_handler, 0,
|
||||
dev_name(&pdev->dev), fdp1);
|
||||
@ -2315,8 +2317,10 @@ static int fdp1_probe(struct platform_device *pdev)
|
||||
|
||||
/* Determine our clock rate */
|
||||
clk = clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(clk))
|
||||
return PTR_ERR(clk);
|
||||
if (IS_ERR(clk)) {
|
||||
ret = PTR_ERR(clk);
|
||||
goto put_dev;
|
||||
}
|
||||
|
||||
fdp1->clk_rate = clk_get_rate(clk);
|
||||
clk_put(clk);
|
||||
@ -2325,7 +2329,7 @@ static int fdp1_probe(struct platform_device *pdev)
|
||||
ret = v4l2_device_register(&pdev->dev, &fdp1->v4l2_dev);
|
||||
if (ret) {
|
||||
v4l2_err(&fdp1->v4l2_dev, "Failed to register video device\n");
|
||||
return ret;
|
||||
goto put_dev;
|
||||
}
|
||||
|
||||
/* M2M registration */
|
||||
@ -2355,7 +2359,9 @@ static int fdp1_probe(struct platform_device *pdev)
|
||||
|
||||
/* Power up the cells to read HW */
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
pm_runtime_get_sync(fdp1->dev);
|
||||
ret = pm_runtime_resume_and_get(fdp1->dev);
|
||||
if (ret < 0)
|
||||
goto disable_pm;
|
||||
|
||||
hw_version = fdp1_read(fdp1, FD1_IP_INTDATA);
|
||||
switch (hw_version) {
|
||||
@ -2384,12 +2390,17 @@ static int fdp1_probe(struct platform_device *pdev)
|
||||
|
||||
return 0;
|
||||
|
||||
disable_pm:
|
||||
pm_runtime_disable(fdp1->dev);
|
||||
|
||||
release_m2m:
|
||||
v4l2_m2m_release(fdp1->m2m_dev);
|
||||
|
||||
unreg_dev:
|
||||
v4l2_device_unregister(&fdp1->v4l2_dev);
|
||||
|
||||
put_dev:
|
||||
rcar_fcp_put(fdp1->fcp);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -2401,6 +2412,7 @@ static int fdp1_remove(struct platform_device *pdev)
|
||||
video_unregister_device(&fdp1->vfd);
|
||||
v4l2_device_unregister(&fdp1->v4l2_dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
rcar_fcp_put(fdp1->fcp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1308,6 +1308,8 @@ static int bdisp_probe(struct platform_device *pdev)
|
||||
init_waitqueue_head(&bdisp->irq_queue);
|
||||
INIT_DELAYED_WORK(&bdisp->timeout_work, bdisp_irq_timeout);
|
||||
bdisp->work_queue = create_workqueue(BDISP_NAME);
|
||||
if (!bdisp->work_queue)
|
||||
return -ENOMEM;
|
||||
|
||||
spin_lock_init(&bdisp->slock);
|
||||
mutex_init(&bdisp->lock);
|
||||
|
@ -83,6 +83,8 @@ static int gpio_ir_recv_probe(struct platform_device *pdev)
|
||||
rcdev->map_name = RC_MAP_EMPTY;
|
||||
|
||||
gpio_dev->rcdev = rcdev;
|
||||
if (of_property_read_bool(np, "wakeup-source"))
|
||||
device_init_wakeup(dev, true);
|
||||
|
||||
rc = devm_rc_register_device(dev, rcdev);
|
||||
if (rc < 0) {
|
||||
|
@ -160,10 +160,16 @@ static int vmci_host_close(struct inode *inode, struct file *filp)
|
||||
static __poll_t vmci_host_poll(struct file *filp, poll_table *wait)
|
||||
{
|
||||
struct vmci_host_dev *vmci_host_dev = filp->private_data;
|
||||
struct vmci_ctx *context = vmci_host_dev->context;
|
||||
struct vmci_ctx *context;
|
||||
__poll_t mask = 0;
|
||||
|
||||
if (vmci_host_dev->ct_type == VMCIOBJ_CONTEXT) {
|
||||
/*
|
||||
* Read context only if ct_type == VMCIOBJ_CONTEXT to make
|
||||
* sure that context is initialized
|
||||
*/
|
||||
context = vmci_host_dev->context;
|
||||
|
||||
/* Check for VMCI calls to this VM context. */
|
||||
if (wait)
|
||||
poll_wait(filp, &context->host_context.wait_queue,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user