Merge tag 'ASB-2023-12-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2023-12-01 * tag 'ASB-2023-12-05_4.19-stable' of https://android.googlesource.com/kernel/common: Revert "macsec: use DEV_STATS_INC()" Revert "net: add DEV_STATS_READ() helper" Linux 4.19.300 net: sched: fix race condition in qdisc_graft() iomap: Set all uptodate bits for an Uptodate page scsi: virtio_scsi: limit number of hw queues by nr_cpu_ids drm/amdgpu: fix error handling in amdgpu_bo_list_get() ext4: remove gdb backup copy for meta bg in setup_new_flex_group_blocks ext4: correct return value of ext4_convert_meta_bg ext4: correct offset of gdb backup in non meta_bg group to update_backups ext4: apply umask if ACL support is disabled Revert "net: r8169: Disable multicast filter for RTL8168H and RTL8107E" media: venus: hfi: add checks to handle capabilities from firmware media: venus: hfi: fix the check to handle session buffer requirement media: venus: hfi_parser: Add check to keep the number of codecs within range media: sharp: fix sharp encoding media: lirc: drop trailing space from scancode transmit i2c: i801: fix potential race in i801_block_transaction_byte_by_byte net: dsa: lan9303: consequently nested-lock physical MDIO tty: serial: meson: fix hard LOCKUP on crtscts mode serial: meson: Use platform_get_irq() to get the interrupt tty: serial: meson: retrieve port FIFO size from DT serial: meson: remove redundant initialization of variable id tty: serial: meson: if no alias specified use an available id ALSA: hda/realtek - Enable internal speaker of ASUS K6500ZC ALSA: info: Fix potential deadlock at disconnection parisc/pgtable: Do not drop upper 5 address bits of physical address parisc: Prevent booting 64-bit kernels on PA1.x machines dmaengine: stm32-mdma: correct desc prep when channel running mcb: fix error handling for different scenarios when parsing quota: explicitly forbid quota files from being encrypted jbd2: fix potential data lost in recovering journal raced with synchronizing fs bdev PM: hibernate: Clean up sync_read handling in snapshot_write_next() PM: hibernate: Use __get_safe_page() rather than touching the list mmc: vub300: fix an error code clk: qcom: ipq8074: drop the CLK_SET_RATE_PARENT flag from PLL clocks parisc/pdc: Add width field to struct pdc_model PCI: keystone: Don't discard .probe() callback PCI: keystone: Don't discard .remove() callback genirq/generic_chip: Make irq_remove_generic_chip() irqdomain aware mmc: meson-gx: Remove setting of CMD_CFG_ERROR PCI/sysfs: Protect driver's D3cold preference from user space hvc/xen: fix error path in xen_hvc_init() to always register frontend driver audit: don't WARN_ON_ONCE(!current->mm) in audit_exe_compare() audit: don't take task_lock() in audit_exe_compare() code path KVM: x86: Ignore MSR_AMD64_TW_CFG access randstruct: Fix gcc-plugin performance mode to stay in group media: venus: hfi: add checks to perform sanity on queue pointers cifs: spnego: add ';' in HOST_KEY_LEN macvlan: Don't propagate promisc change to lower dev in passthru net: ethernet: cortina: Fix MTU max setting net: ethernet: cortina: Handle large frames net: ethernet: cortina: Fix max RX frame define ptp: annotate data-race around q->head and q->tail xen/events: fix delayed eoi list handling ppp: limit MRU to 64K tipc: Fix kernel-infoleak due to uninitialized TLV value tty: Fix uninit-value access in ppp_sync_receive() ipvlan: add ipvlan_route_v6_outbound() helper NFSv4.1: fix SP4_MACH_CRED protection for pnfs IO pwm: Fix double shift bug drm/amd/display: Avoid NULL dereference of timing generator gfs2: ignore negated quota changes media: vivid: avoid integer overflow media: gspca: cpia1: shift-out-of-bounds in set_flicker i2c: sun6i-p2wi: Prevent potential division by zero usb: gadget: f_ncm: Always set current gadget in ncm_bind() tty: vcc: Add check for kstrdup() in vcc_probe() HID: Add quirk for Dell Pro Wireless Keyboard and Mouse KM5221W scsi: libfc: Fix potential NULL pointer dereference in fc_lport_ptp_setup() atm: iphase: Do PCI error checks on own line ALSA: hda: Fix possible null-ptr-deref when assigning a stream ARM: 9320/1: fix stack depot IRQ stack filter jfs: fix array-index-out-of-bounds in diAlloc jfs: fix array-index-out-of-bounds in dbFindLeaf fs/jfs: Add validity check for db_maxag and db_agpref fs/jfs: Add check for negative db_l2nbperpage RDMA/hfi1: Use FIELD_GET() to extract Link Width crypto: pcrypt - Fix hungtask for PADATA_RESET selftests/efivarfs: create-read: fix a resource leak drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7 platform/x86: thinkpad_acpi: Add battery quirk for Thinkpad X120e Bluetooth: Fix double free in hci_conn_cleanup net: annotate data-races around sk->sk_dst_pending_confirm net: annotate data-races around sk->sk_tx_queue_mapping wifi: ath10k: fix clang-specific fortify warning wifi: ath9k: fix clang-specific fortify warnings wifi: mac80211: don't return unset power in ieee80211_get_tx_power() x86/mm: Drop the 4 MB restriction on minimal NUMA node memory size clocksource/drivers/timer-atmel-tcb: Fix initialization on SAM9 hardware clocksource/drivers/timer-imx-gpt: Fix potential memory leak perf/core: Bail out early if the request AUX area is out of bound locking/ww_mutex/test: Fix potential workqueue corruption Revert "ipvlan: properly track tx_errors" ANDROID: fix up platform_device ABI break Linux 4.19.299 btrfs: use u64 for buffer sizes in the tree search ioctls Revert "mmc: core: Capture correct oemid-bits for eMMC cards" fbdev: fsl-diu-fb: mark wr_reg_wa() static fbdev: imsttfb: fix a resource leak in probe fbdev: imsttfb: Fix error path of imsttfb_probe() netfilter: xt_recent: fix (increase) ipv6 literal buffer length r8169: respect userspace disabling IFF_MULTICAST tg3: power down device only on SYSTEM_POWER_OFF net/smc: fix dangling sock under state SMC_APPFINCLOSEWAIT net/smc: wait for pending work before clcsock release_sock net/smc: postpone release of clcsock net: r8169: Disable multicast filter for RTL8168H and RTL8107E r8169: improve rtl_set_rx_mode dccp/tcp: Call security_inet_conn_request() after setting IPv6 addresses. dccp: Call security_inet_conn_request() after setting IPv4 addresses. tipc: Change nla_policy for bearer-related names to NLA_NUL_STRING llc: verify mac len before reading mac header Input: synaptics-rmi4 - fix use after free in rmi_unregister_function() pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume pwm: sti: Reduce number of allocations and drop usage of chip_data pwm: sti: Avoid conditional gotos media: dvb-usb-v2: af9035: fix missing unlock media: s3c-camif: Avoid inappropriate kfree() media: bttv: fix use after free error due to btv->timeout timer pcmcia: ds: fix possible name leak in error path in pcmcia_device_add() pcmcia: ds: fix refcount leak in pcmcia_device_add() pcmcia: cs: fix possible hung task and memory leak pccardd() f2fs: fix to initialize map.m_pblk in f2fs_precache_extents() dmaengine: pxa_dma: Remove an erroneous BUG_ON() in pxad_free_desc() USB: usbip: fix stub_dev hub disconnect tools: iio: iio_generic_buffer ensure alignment tools: iio: iio_generic_buffer: Fix some integer type and calculation tools: iio: privatize globals and functions in iio_generic_buffer.c file misc: st_core: Do not call kfree_skb() under spin_lock_irqsave() dmaengine: ti: edma: handle irq_of_parse_and_map() errors usb: dwc2: fix possible NULL pointer dereference caused by driver concurrency tty: tty_jobctrl: fix pid memleak in disassociate_ctty() leds: trigger: ledtrig-cpu:: Fix 'output may be truncated' issue for 'cpu' ledtrig-cpu: Limit to 8 CPUs leds: pwm: Don't disable the PWM when the LED should be off leds: pwm: convert to atomic PWM API leds: pwm: simplify if condition mfd: dln2: Fix double put in dln2_probe ASoC: ams-delta.c: use component after check ASoC: Intel: Skylake: Fix mem leak when parsing UUIDs fails sh: bios: Revive earlyprintk support RDMA/hfi1: Workaround truncation compilation error ext4: move 'ix' sanity check to corrent position ARM: 9321/1: memset: cast the constant byte to unsigned char hid: cp2112: Fix duplicate workqueue initialization HID: cp2112: Use irqchip template nd_btt: Make BTT lanes preemptible sched/rt: Provide migrate_disable/enable() inlines hwrng: geode - fix accessing registers clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped firmware: ti_sci: Mark driver as non removable ARM: dts: qcom: mdm9615: populate vsdcc fixed regulator drm/rockchip: cdn-dp: Fix some error handling paths in cdn_dp_probe() drm/radeon: possible buffer overflow drm/rockchip: vop: Fix reset of state in duplicate state crtc funcs hwmon: (coretemp) Fix potentially truncated sysfs attribute name platform/x86: wmi: Fix opening of char device platform/x86: wmi: remove unnecessary initializations platform/x86: wmi: Fix probe failure when failing to register WMI devices clk: mediatek: clk-mt2701: Add check for mtk_alloc_clk_data clk: mediatek: clk-mt6797: Add check for mtk_alloc_clk_data clk: npcm7xx: Fix incorrect kfree clk: keystone: pll: fix a couple NULL vs IS_ERR() checks clk: qcom: clk-rcg2: Fix clock rate overflow for high parent frequencies regmap: debugfs: Fix a erroneous check after snprintf() ipvlan: properly track tx_errors net: add DEV_STATS_READ() helper macsec: use DEV_STATS_INC() macsec: Fix traffic counters/statistics ipv6: avoid atomic fragment on GSO packets ACPI: sysfs: Fix create_pnp_modalias() and create_of_modalias() chtls: fix tp->rcv_tstamp initialization thermal: core: prevent potential string overflow can: dev: can_restart(): fix race condition between controller restart and netif_carrier_on() can: dev: can_restart(): don't crash kernel if carrier is OK can: dev: move driver related infrastructure into separate subdir wifi: rtlwifi: fix EDCA limit set by BT coexistence tcp_metrics: do not create an entry from tcp_init_metrics() tcp_metrics: properly set tp->snd_ssthresh in tcp_init_metrics() tcp_metrics: add missing barriers on delete i40e: fix potential memory leaks in i40e_remove() genirq/matrix: Exclude managed interrupts in irq_matrix_allocated() vfs: fix readahead(2) on block devices Linux 4.19.298 tty: 8250: Add support for Intashield IS-100 tty: 8250: Add support for Brainboxes UP cards tty: 8250: Add support for additional Brainboxes UC cards tty: 8250: Remove UC-257 and UC-431 usb: storage: set 1.50 as the lower bcdDevice for older "Super Top" compatibility PCI: Prevent xHCI driver from claiming AMD VanGogh USB3 DRD device remove the sx8 block driver ata: ahci: fix enum constants for gcc-13 net: chelsio: cxgb4: add an error code check in t4_load_phy_fw platform/x86: asus-wmi: Change ASUS_WMI_BRN_DOWN code from 0x20 to 0x2e scsi: mpt3sas: Fix in error path fbdev: uvesafb: Call cn_del_callback() at the end of uvesafb_exit() ASoC: rt5650: fix the wrong result of key button netfilter: nfnetlink_log: silence bogus compiler warning fbdev: atyfb: only use ioremap_uc() on i386 and ia64 Input: synaptics-rmi4 - handle reset delay when using SMBus trsnsport dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe irqchip/stm32-exti: add missing DT IRQ flag translation Input: i8042 - add Fujitsu Lifebook E5411 to i8042 quirk table ASoC: simple-card: fixup asoc_simple_probe() error handling MAINTAINERS: r8169: Update path to the driver x86: Fix .brk attribute in linker script rpmsg: Fix possible refcount leak in rpmsg_register_device_override() rpmsg: glink: Release driver_override rpmsg: Fix calling device_lock() on non-initialized device rpmsg: Fix kfree() of static memory on setting driver_override rpmsg: Constify local variable in field store macro driver: platform: Add helper for safer setting of driver_override x86/mm: Fix RESERVE_BRK() for older binutils x86/mm: Simplify RESERVE_BRK() nfsd: lock_rename() needs both directories to live on the same fs f2fs: fix to do sanity check on inode type during garbage collection smbdirect: missing rc checks while waiting for rdma events kobject: Fix slab-out-of-bounds in fill_kobj_path() arm64: fix a concurrency issue in emulation_proc_handler() drm/dp_mst: Fix NULL deref in get_mst_branch_device_by_guid_helper() ARM: 8933/1: replace Sun/Solaris style flag on section directive NFS: Don't call generic_error_remove_page() while holding locks x86/i8259: Skip probing when ACPI/MADT advertises PCAT compatibility iio: exynos-adc: request second interupt only when touchscreen mode is used perf/core: Fix potential NULL deref nvmem: imx: correct nregs for i.MX6UL nvmem: imx: correct nregs for i.MX6SLL i2c: stm32f7: Fix PEC handling in case of SMBUS transfers i2c: muxes: i2c-demux-pinctrl: Use of_get_i2c_adapter_by_node() i2c: muxes: i2c-mux-gpmux: Use of_get_i2c_adapter_by_node() i2c: muxes: i2c-mux-pinctrl: Use of_get_i2c_adapter_by_node() i40e: Fix wrong check for I40E_TXR_FLAGS_WB_ON_ITR gtp: fix fragmentation needed check with gso igb: Fix potential memory leak in igb_add_ethtool_nfc_entry treewide: Spelling fix in comment r8169: fix the KCSAN reported data race in rtl_rx while reading desc->opts1 r8169: fix the KCSAN reported data-race in rtl_tx while reading TxDescArray[entry].opts1 r8169: rename r8169.c to r8169_main.c virtio-mmio: fix memory leak of vm_dev virtio_balloon: Fix endless deflation and inflation on arm64 mcb-lpc: Reallocate memory region to avoid memory overlapping mcb: Return actual parsed size when reading chameleon table selftests/ftrace: Add new test case which checks non unique symbol mmc: core: sdio: hold retuning if sdio in 1-bit mode mmc: sdio: Don't re-initialize powered-on removable SDIO cards at resume Conflicts: drivers/clk/qcom/clk-rcg2.c drivers/leds/leds-pwm.c drivers/mmc/core/sdio.c drivers/rpmsg/qcom_glink_native.c drivers/thermal/thermal_core.c drivers/usb/gadget/function/f_ncm.c Change-Id: I230a2c820e39dd863a874bfc0c7a411896b0ba9c
This commit is contained in:
commit
33ef102789
254 changed files with 1681 additions and 2714 deletions
|
@ -182,7 +182,7 @@ F: drivers/net/hamradio/6pack.c
|
||||||
M: Realtek linux nic maintainers <nic_swsd@realtek.com>
|
M: Realtek linux nic maintainers <nic_swsd@realtek.com>
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/net/ethernet/realtek/r8169.c
|
F: drivers/net/ethernet/realtek/r8169*
|
||||||
|
|
||||||
8250/16?50 (AND CLONE UARTS) SERIAL DRIVER
|
8250/16?50 (AND CLONE UARTS) SERIAL DRIVER
|
||||||
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 19
|
PATCHLEVEL = 19
|
||||||
SUBLEVEL = 297
|
SUBLEVEL = 300
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = "People's Front"
|
NAME = "People's Front"
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* size immediately following the kernel, we could build this into
|
* size immediately following the kernel, we could build this into
|
||||||
* a binary blob, and concatenate the zImage using the cat command.
|
* a binary blob, and concatenate the zImage using the cat command.
|
||||||
*/
|
*/
|
||||||
.section .start,#alloc,#execinstr
|
.section .start, "ax"
|
||||||
.type _start, #function
|
.type _start, #function
|
||||||
.globl _start
|
.globl _start
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* Author: Nicolas Pitre
|
* Author: Nicolas Pitre
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.section ".start", #alloc, #execinstr
|
.section ".start", "ax"
|
||||||
|
|
||||||
mrc p15, 0, r0, c1, c0, 0 @ read control reg
|
mrc p15, 0, r0, c1, c0, 0 @ read control reg
|
||||||
orr r0, r0, #(1 << 7) @ enable big endian mode
|
orr r0, r0, #(1 << 7) @ enable big endian mode
|
||||||
|
|
|
@ -121,7 +121,7 @@
|
||||||
#endif
|
#endif
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.section ".start", #alloc, #execinstr
|
.section ".start", "ax"
|
||||||
/*
|
/*
|
||||||
* sort out different calling conventions
|
* sort out different calling conventions
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
.section .piggydata,#alloc
|
.section .piggydata, "a"
|
||||||
.globl input_data
|
.globl input_data
|
||||||
input_data:
|
input_data:
|
||||||
.incbin "arch/arm/boot/compressed/piggy_data"
|
.incbin "arch/arm/boot/compressed/piggy_data"
|
||||||
|
|
|
@ -82,14 +82,12 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
regulators {
|
vsdcc_fixed: vsdcc-regulator {
|
||||||
vsdcc_fixed: vsdcc-regulator {
|
compatible = "regulator-fixed";
|
||||||
compatible = "regulator-fixed";
|
regulator-name = "SDCC Power";
|
||||||
regulator-name = "SDCC Power";
|
regulator-min-microvolt = <2700000>;
|
||||||
regulator-min-microvolt = <2700000>;
|
regulator-max-microvolt = <2700000>;
|
||||||
regulator-max-microvolt = <2700000>;
|
regulator-always-on;
|
||||||
regulator-always-on;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
soc: soc {
|
soc: soc {
|
||||||
|
|
|
@ -10,10 +10,6 @@
|
||||||
|
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
|
|
||||||
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
|
||||||
#define __exception_irq_entry __irq_entry
|
#define __exception_irq_entry __irq_entry
|
||||||
#else
|
|
||||||
#define __exception_irq_entry
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* __ASM_ARM_EXCEPTION_H */
|
#endif /* __ASM_ARM_EXCEPTION_H */
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
ENTRY(mmioset)
|
ENTRY(mmioset)
|
||||||
ENTRY(memset)
|
ENTRY(memset)
|
||||||
UNWIND( .fnstart )
|
UNWIND( .fnstart )
|
||||||
|
and r1, r1, #255 @ cast to unsigned char
|
||||||
ands r3, r0, #3 @ 1 unaligned?
|
ands r3, r0, #3 @ 1 unaligned?
|
||||||
mov ip, r0 @ preserve r0 as return value
|
mov ip, r0 @ preserve r0 as return value
|
||||||
bne 6f @ 1
|
bne 6f @ 1
|
||||||
|
|
|
@ -505,7 +505,7 @@ cpu_arm1020_name:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.type __arm1020_proc_info,#object
|
.type __arm1020_proc_info,#object
|
||||||
__arm1020_proc_info:
|
__arm1020_proc_info:
|
||||||
|
|
|
@ -463,7 +463,7 @@ arm1020e_crval:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.type __arm1020e_proc_info,#object
|
.type __arm1020e_proc_info,#object
|
||||||
__arm1020e_proc_info:
|
__arm1020e_proc_info:
|
||||||
|
|
|
@ -448,7 +448,7 @@ arm1022_crval:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.type __arm1022_proc_info,#object
|
.type __arm1022_proc_info,#object
|
||||||
__arm1022_proc_info:
|
__arm1022_proc_info:
|
||||||
|
|
|
@ -442,7 +442,7 @@ arm1026_crval:
|
||||||
string cpu_arm1026_name, "ARM1026EJ-S"
|
string cpu_arm1026_name, "ARM1026EJ-S"
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.type __arm1026_proc_info,#object
|
.type __arm1026_proc_info,#object
|
||||||
__arm1026_proc_info:
|
__arm1026_proc_info:
|
||||||
|
|
|
@ -186,7 +186,7 @@ arm720_crval:
|
||||||
* See <asm/procinfo.h> for a definition of this structure.
|
* See <asm/procinfo.h> for a definition of this structure.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.macro arm720_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cpu_flush:req
|
.macro arm720_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cpu_flush:req
|
||||||
.type __\name\()_proc_info,#object
|
.type __\name\()_proc_info,#object
|
||||||
|
|
|
@ -132,7 +132,7 @@ __arm740_setup:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
.type __arm740_proc_info,#object
|
.type __arm740_proc_info,#object
|
||||||
__arm740_proc_info:
|
__arm740_proc_info:
|
||||||
.long 0x41807400
|
.long 0x41807400
|
||||||
|
|
|
@ -76,7 +76,7 @@ __arm7tdmi_setup:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.macro arm7tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, \
|
.macro arm7tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, \
|
||||||
extra_hwcaps=0
|
extra_hwcaps=0
|
||||||
|
|
|
@ -448,7 +448,7 @@ arm920_crval:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.type __arm920_proc_info,#object
|
.type __arm920_proc_info,#object
|
||||||
__arm920_proc_info:
|
__arm920_proc_info:
|
||||||
|
|
|
@ -426,7 +426,7 @@ arm922_crval:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.type __arm922_proc_info,#object
|
.type __arm922_proc_info,#object
|
||||||
__arm922_proc_info:
|
__arm922_proc_info:
|
||||||
|
|
|
@ -491,7 +491,7 @@ arm925_crval:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.macro arm925_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache
|
.macro arm925_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache
|
||||||
.type __\name\()_proc_info,#object
|
.type __\name\()_proc_info,#object
|
||||||
|
|
|
@ -474,7 +474,7 @@ arm926_crval:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.type __arm926_proc_info,#object
|
.type __arm926_proc_info,#object
|
||||||
__arm926_proc_info:
|
__arm926_proc_info:
|
||||||
|
|
|
@ -344,7 +344,7 @@ __arm940_setup:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.type __arm940_proc_info,#object
|
.type __arm940_proc_info,#object
|
||||||
__arm940_proc_info:
|
__arm940_proc_info:
|
||||||
|
|
|
@ -399,7 +399,7 @@ __arm946_setup:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
.type __arm946_proc_info,#object
|
.type __arm946_proc_info,#object
|
||||||
__arm946_proc_info:
|
__arm946_proc_info:
|
||||||
.long 0x41009460
|
.long 0x41009460
|
||||||
|
|
|
@ -70,7 +70,7 @@ __arm9tdmi_setup:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.macro arm9tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req
|
.macro arm9tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req
|
||||||
.type __\name\()_proc_info, #object
|
.type __\name\()_proc_info, #object
|
||||||
|
|
|
@ -190,7 +190,7 @@ fa526_cr1_set:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.type __fa526_proc_info,#object
|
.type __fa526_proc_info,#object
|
||||||
__fa526_proc_info:
|
__fa526_proc_info:
|
||||||
|
|
|
@ -584,7 +584,7 @@ feroceon_crval:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.macro feroceon_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache:req
|
.macro feroceon_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache:req
|
||||||
.type __\name\()_proc_info,#object
|
.type __\name\()_proc_info,#object
|
||||||
|
|
|
@ -429,7 +429,7 @@ mohawk_crval:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.type __88sv331x_proc_info,#object
|
.type __88sv331x_proc_info,#object
|
||||||
__88sv331x_proc_info:
|
__88sv331x_proc_info:
|
||||||
|
|
|
@ -199,7 +199,7 @@ sa110_crval:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.type __sa110_proc_info,#object
|
.type __sa110_proc_info,#object
|
||||||
__sa110_proc_info:
|
__sa110_proc_info:
|
||||||
|
|
|
@ -242,7 +242,7 @@ sa1100_crval:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.macro sa1100_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req
|
.macro sa1100_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req
|
||||||
.type __\name\()_proc_info,#object
|
.type __\name\()_proc_info,#object
|
||||||
|
|
|
@ -264,7 +264,7 @@ v6_crval:
|
||||||
string cpu_elf_name, "v6"
|
string cpu_elf_name, "v6"
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Match any ARMv6 processor core.
|
* Match any ARMv6 processor core.
|
||||||
|
|
|
@ -638,7 +638,7 @@ __v7_setup_stack:
|
||||||
string cpu_elf_name, "v7"
|
string cpu_elf_name, "v7"
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Standard v7 proc info content
|
* Standard v7 proc info content
|
||||||
|
|
|
@ -96,7 +96,7 @@ ENTRY(cpu_cm7_proc_fin)
|
||||||
ret lr
|
ret lr
|
||||||
ENDPROC(cpu_cm7_proc_fin)
|
ENDPROC(cpu_cm7_proc_fin)
|
||||||
|
|
||||||
.section ".init.text", #alloc, #execinstr
|
.section ".init.text", "ax"
|
||||||
|
|
||||||
__v7m_cm7_setup:
|
__v7m_cm7_setup:
|
||||||
mov r8, #(V7M_SCB_CCR_DC | V7M_SCB_CCR_IC| V7M_SCB_CCR_BP)
|
mov r8, #(V7M_SCB_CCR_DC | V7M_SCB_CCR_IC| V7M_SCB_CCR_BP)
|
||||||
|
@ -180,7 +180,7 @@ ENDPROC(__v7m_setup)
|
||||||
string cpu_elf_name "v7m"
|
string cpu_elf_name "v7m"
|
||||||
string cpu_v7m_name "ARMv7-M"
|
string cpu_v7m_name "ARMv7-M"
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.macro __v7m_proc name, initfunc, cache_fns = nop_cache_fns, hwcaps = 0, proc_fns = v7m_processor_functions
|
.macro __v7m_proc name, initfunc, cache_fns = nop_cache_fns, hwcaps = 0, proc_fns = v7m_processor_functions
|
||||||
.long 0 /* proc_info_list.__cpu_mm_mmu_flags */
|
.long 0 /* proc_info_list.__cpu_mm_mmu_flags */
|
||||||
|
|
|
@ -499,7 +499,7 @@ xsc3_crval:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.macro xsc3_proc_info name:req, cpu_val:req, cpu_mask:req
|
.macro xsc3_proc_info name:req, cpu_val:req, cpu_mask:req
|
||||||
.type __\name\()_proc_info,#object
|
.type __\name\()_proc_info,#object
|
||||||
|
|
|
@ -613,7 +613,7 @@ xscale_crval:
|
||||||
|
|
||||||
.align
|
.align
|
||||||
|
|
||||||
.section ".proc.info.init", #alloc
|
.section ".proc.info.init", "a"
|
||||||
|
|
||||||
.macro xscale_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache
|
.macro xscale_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache
|
||||||
.type __\name\()_proc_info,#object
|
.type __\name\()_proc_info,#object
|
||||||
|
|
|
@ -211,10 +211,12 @@ static int emulation_proc_handler(struct ctl_table *table, int write,
|
||||||
loff_t *ppos)
|
loff_t *ppos)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct insn_emulation *insn = container_of(table->data, struct insn_emulation, current_mode);
|
struct insn_emulation *insn;
|
||||||
enum insn_emulation_mode prev_mode = insn->current_mode;
|
enum insn_emulation_mode prev_mode;
|
||||||
|
|
||||||
mutex_lock(&insn_emulation_mutex);
|
mutex_lock(&insn_emulation_mutex);
|
||||||
|
insn = container_of(table->data, struct insn_emulation, current_mode);
|
||||||
|
prev_mode = insn->current_mode;
|
||||||
ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
|
ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
|
||||||
|
|
||||||
if (ret || !write || prev_mode == insn->current_mode)
|
if (ret || !write || prev_mode == insn->current_mode)
|
||||||
|
|
|
@ -443,6 +443,7 @@ struct pdc_model { /* for PDC_MODEL */
|
||||||
unsigned long arch_rev;
|
unsigned long arch_rev;
|
||||||
unsigned long pot_key;
|
unsigned long pot_key;
|
||||||
unsigned long curr_key;
|
unsigned long curr_key;
|
||||||
|
unsigned long width; /* default of PSW_W bit (1=enabled) */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct pdc_cache_cf { /* for PDC_CACHE (I/D-caches) */
|
struct pdc_cache_cf { /* for PDC_CACHE (I/D-caches) */
|
||||||
|
|
|
@ -522,13 +522,13 @@
|
||||||
* to a CPU TLB 4k PFN (4k => 12 bits to shift) */
|
* to a CPU TLB 4k PFN (4k => 12 bits to shift) */
|
||||||
#define PAGE_ADD_SHIFT (PAGE_SHIFT-12)
|
#define PAGE_ADD_SHIFT (PAGE_SHIFT-12)
|
||||||
#define PAGE_ADD_HUGE_SHIFT (REAL_HPAGE_SHIFT-12)
|
#define PAGE_ADD_HUGE_SHIFT (REAL_HPAGE_SHIFT-12)
|
||||||
|
#define PFN_START_BIT (63-ASM_PFN_PTE_SHIFT+(63-58)-PAGE_ADD_SHIFT)
|
||||||
|
|
||||||
/* Drop prot bits and convert to page addr for iitlbt and idtlbt */
|
/* Drop prot bits and convert to page addr for iitlbt and idtlbt */
|
||||||
.macro convert_for_tlb_insert20 pte,tmp
|
.macro convert_for_tlb_insert20 pte,tmp
|
||||||
#ifdef CONFIG_HUGETLB_PAGE
|
#ifdef CONFIG_HUGETLB_PAGE
|
||||||
copy \pte,\tmp
|
copy \pte,\tmp
|
||||||
extrd,u \tmp,(63-ASM_PFN_PTE_SHIFT)+(63-58)+PAGE_ADD_SHIFT,\
|
extrd,u \tmp,PFN_START_BIT,PFN_START_BIT+1,\pte
|
||||||
64-PAGE_SHIFT-PAGE_ADD_SHIFT,\pte
|
|
||||||
|
|
||||||
depdi _PAGE_SIZE_ENCODING_DEFAULT,63,\
|
depdi _PAGE_SIZE_ENCODING_DEFAULT,63,\
|
||||||
(63-58)+PAGE_ADD_SHIFT,\pte
|
(63-58)+PAGE_ADD_SHIFT,\pte
|
||||||
|
@ -536,8 +536,7 @@
|
||||||
depdi _HUGE_PAGE_SIZE_ENCODING_DEFAULT,63,\
|
depdi _HUGE_PAGE_SIZE_ENCODING_DEFAULT,63,\
|
||||||
(63-58)+PAGE_ADD_HUGE_SHIFT,\pte
|
(63-58)+PAGE_ADD_HUGE_SHIFT,\pte
|
||||||
#else /* Huge pages disabled */
|
#else /* Huge pages disabled */
|
||||||
extrd,u \pte,(63-ASM_PFN_PTE_SHIFT)+(63-58)+PAGE_ADD_SHIFT,\
|
extrd,u \pte,PFN_START_BIT,PFN_START_BIT+1,\pte
|
||||||
64-PAGE_SHIFT-PAGE_ADD_SHIFT,\pte
|
|
||||||
depdi _PAGE_SIZE_ENCODING_DEFAULT,63,\
|
depdi _PAGE_SIZE_ENCODING_DEFAULT,63,\
|
||||||
(63-58)+PAGE_ADD_SHIFT,\pte
|
(63-58)+PAGE_ADD_SHIFT,\pte
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -69,9 +69,8 @@ $bss_loop:
|
||||||
stw,ma %arg2,4(%r1)
|
stw,ma %arg2,4(%r1)
|
||||||
stw,ma %arg3,4(%r1)
|
stw,ma %arg3,4(%r1)
|
||||||
|
|
||||||
#if !defined(CONFIG_64BIT) && defined(CONFIG_PA20)
|
#if defined(CONFIG_PA20)
|
||||||
/* This 32-bit kernel was compiled for PA2.0 CPUs. Check current CPU
|
/* check for 64-bit capable CPU as required by current kernel */
|
||||||
* and halt kernel if we detect a PA1.x CPU. */
|
|
||||||
ldi 32,%r10
|
ldi 32,%r10
|
||||||
mtctl %r10,%cr11
|
mtctl %r10,%cr11
|
||||||
.level 2.0
|
.level 2.0
|
||||||
|
|
|
@ -26,6 +26,17 @@ config STACK_DEBUG
|
||||||
every function call and will therefore incur a major
|
every function call and will therefore incur a major
|
||||||
performance hit. Most users should say N.
|
performance hit. Most users should say N.
|
||||||
|
|
||||||
|
config EARLY_PRINTK
|
||||||
|
bool "Early printk"
|
||||||
|
depends on SH_STANDARD_BIOS
|
||||||
|
help
|
||||||
|
Say Y here to redirect kernel printk messages to the serial port
|
||||||
|
used by the SH-IPL bootloader, starting very early in the boot
|
||||||
|
process and ending when the kernel's serial console is initialised.
|
||||||
|
This option is only useful while porting the kernel to a new machine,
|
||||||
|
when the kernel may crash or hang before the serial console is
|
||||||
|
initialised. If unsure, say N.
|
||||||
|
|
||||||
config 4KSTACKS
|
config 4KSTACKS
|
||||||
bool "Use 4Kb for kernel stacks instead of 8Kb"
|
bool "Use 4Kb for kernel stacks instead of 8Kb"
|
||||||
depends on DEBUG_KERNEL && (MMU || BROKEN) && !PAGE_SIZE_64KB
|
depends on DEBUG_KERNEL && (MMU || BROKEN) && !PAGE_SIZE_64KB
|
||||||
|
|
|
@ -67,6 +67,8 @@ struct legacy_pic {
|
||||||
void (*make_irq)(unsigned int irq);
|
void (*make_irq)(unsigned int irq);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void legacy_pic_pcat_compat(void);
|
||||||
|
|
||||||
extern struct legacy_pic *legacy_pic;
|
extern struct legacy_pic *legacy_pic;
|
||||||
extern struct legacy_pic null_legacy_pic;
|
extern struct legacy_pic null_legacy_pic;
|
||||||
|
|
||||||
|
|
|
@ -414,6 +414,7 @@
|
||||||
#define MSR_AMD64_OSVW_STATUS 0xc0010141
|
#define MSR_AMD64_OSVW_STATUS 0xc0010141
|
||||||
#define MSR_AMD64_LS_CFG 0xc0011020
|
#define MSR_AMD64_LS_CFG 0xc0011020
|
||||||
#define MSR_AMD64_DC_CFG 0xc0011022
|
#define MSR_AMD64_DC_CFG 0xc0011022
|
||||||
|
#define MSR_AMD64_TW_CFG 0xc0011023
|
||||||
|
|
||||||
#define MSR_AMD64_DE_CFG 0xc0011029
|
#define MSR_AMD64_DE_CFG 0xc0011029
|
||||||
#define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT 1
|
#define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT 1
|
||||||
|
|
|
@ -11,13 +11,6 @@
|
||||||
|
|
||||||
#define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
|
#define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
|
||||||
|
|
||||||
/*
|
|
||||||
* Too small node sizes may confuse the VM badly. Usually they
|
|
||||||
* result from BIOS bugs. So dont recognize nodes as standalone
|
|
||||||
* NUMA entities that have less than this amount of RAM listed:
|
|
||||||
*/
|
|
||||||
#define NODE_MIN_SIZE (4*1024*1024)
|
|
||||||
|
|
||||||
extern int numa_off;
|
extern int numa_off;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -91,27 +91,16 @@ extern unsigned long _brk_end;
|
||||||
void *extend_brk(size_t size, size_t align);
|
void *extend_brk(size_t size, size_t align);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reserve space in the brk section. The name must be unique within
|
* Reserve space in the .brk section, which is a block of memory from which the
|
||||||
* the file, and somewhat descriptive. The size is in bytes. Must be
|
* caller is allowed to allocate very early (before even memblock is available)
|
||||||
* used at file scope.
|
* by calling extend_brk(). All allocated memory will be eventually converted
|
||||||
|
* to memblock. Any leftover unallocated memory will be freed.
|
||||||
*
|
*
|
||||||
* (This uses a temp function to wrap the asm so we can pass it the
|
* The size is in bytes.
|
||||||
* size parameter; otherwise we wouldn't be able to. We can't use a
|
|
||||||
* "section" attribute on a normal variable because it always ends up
|
|
||||||
* being @progbits, which ends up allocating space in the vmlinux
|
|
||||||
* executable.)
|
|
||||||
*/
|
*/
|
||||||
#define RESERVE_BRK(name,sz) \
|
#define RESERVE_BRK(name, size) \
|
||||||
static void __section(.discard.text) __used notrace \
|
__section(.bss..brk) __aligned(1) __used \
|
||||||
__brk_reservation_fn_##name##__(void) { \
|
static char __brk_##name[size]
|
||||||
asm volatile ( \
|
|
||||||
".pushsection .brk_reservation,\"aw\",@nobits;" \
|
|
||||||
".brk." #name ":" \
|
|
||||||
" 1:.skip %c0;" \
|
|
||||||
" .size .brk." #name ", . - 1b;" \
|
|
||||||
" .popsection" \
|
|
||||||
: : "i" (sz)); \
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Helper for reserving space for arrays of things */
|
/* Helper for reserving space for arrays of things */
|
||||||
#define RESERVE_BRK_ARRAY(type, name, entries) \
|
#define RESERVE_BRK_ARRAY(type, name, entries) \
|
||||||
|
@ -129,12 +118,19 @@ asmlinkage void __init x86_64_start_reservations(char *real_mode_data);
|
||||||
|
|
||||||
#endif /* __i386__ */
|
#endif /* __i386__ */
|
||||||
#endif /* _SETUP */
|
#endif /* _SETUP */
|
||||||
#else
|
|
||||||
#define RESERVE_BRK(name,sz) \
|
#else /* __ASSEMBLY */
|
||||||
.pushsection .brk_reservation,"aw",@nobits; \
|
|
||||||
.brk.name: \
|
.macro __RESERVE_BRK name, size
|
||||||
1: .skip sz; \
|
.pushsection .bss..brk, "aw"
|
||||||
.size .brk.name,.-1b; \
|
GLOBAL(__brk_\name)
|
||||||
|
.skip \size
|
||||||
|
END(__brk_\name)
|
||||||
.popsection
|
.popsection
|
||||||
|
.endm
|
||||||
|
|
||||||
|
#define RESERVE_BRK(name, size) __RESERVE_BRK name, size
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
||||||
#endif /* _ASM_X86_SETUP_H */
|
#endif /* _ASM_X86_SETUP_H */
|
||||||
|
|
|
@ -156,6 +156,9 @@ static int __init acpi_parse_madt(struct acpi_table_header *table)
|
||||||
madt->address);
|
madt->address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (madt->flags & ACPI_MADT_PCAT_COMPAT)
|
||||||
|
legacy_pic_pcat_compat();
|
||||||
|
|
||||||
default_acpi_madt_oem_check(madt->header.oem_id,
|
default_acpi_madt_oem_check(madt->header.oem_id,
|
||||||
madt->header.oem_table_id);
|
madt->header.oem_table_id);
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
*/
|
*/
|
||||||
static void init_8259A(int auto_eoi);
|
static void init_8259A(int auto_eoi);
|
||||||
|
|
||||||
|
static bool pcat_compat __ro_after_init;
|
||||||
static int i8259A_auto_eoi;
|
static int i8259A_auto_eoi;
|
||||||
DEFINE_RAW_SPINLOCK(i8259A_lock);
|
DEFINE_RAW_SPINLOCK(i8259A_lock);
|
||||||
|
|
||||||
|
@ -301,15 +302,32 @@ static void unmask_8259A(void)
|
||||||
|
|
||||||
static int probe_8259A(void)
|
static int probe_8259A(void)
|
||||||
{
|
{
|
||||||
|
unsigned char new_val, probe_val = ~(1 << PIC_CASCADE_IR);
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned char probe_val = ~(1 << PIC_CASCADE_IR);
|
|
||||||
unsigned char new_val;
|
|
||||||
/*
|
/*
|
||||||
* Check to see if we have a PIC.
|
* If MADT has the PCAT_COMPAT flag set, then do not bother probing
|
||||||
* Mask all except the cascade and read
|
* for the PIC. Some BIOSes leave the PIC uninitialized and probing
|
||||||
* back the value we just wrote. If we don't
|
* fails.
|
||||||
* have a PIC, we will read 0xff as opposed to the
|
*
|
||||||
* value we wrote.
|
* Right now this causes problems as quite some code depends on
|
||||||
|
* nr_legacy_irqs() > 0 or has_legacy_pic() == true. This is silly
|
||||||
|
* when the system has an IO/APIC because then PIC is not required
|
||||||
|
* at all, except for really old machines where the timer interrupt
|
||||||
|
* must be routed through the PIC. So just pretend that the PIC is
|
||||||
|
* there and let legacy_pic->init() initialize it for nothing.
|
||||||
|
*
|
||||||
|
* Alternatively this could just try to initialize the PIC and
|
||||||
|
* repeat the probe, but for cases where there is no PIC that's
|
||||||
|
* just pointless.
|
||||||
|
*/
|
||||||
|
if (pcat_compat)
|
||||||
|
return nr_legacy_irqs();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check to see if we have a PIC. Mask all except the cascade and
|
||||||
|
* read back the value we just wrote. If we don't have a PIC, we
|
||||||
|
* will read 0xff as opposed to the value we wrote.
|
||||||
*/
|
*/
|
||||||
raw_spin_lock_irqsave(&i8259A_lock, flags);
|
raw_spin_lock_irqsave(&i8259A_lock, flags);
|
||||||
|
|
||||||
|
@ -431,5 +449,9 @@ static int __init i8259A_init_ops(void)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
device_initcall(i8259A_init_ops);
|
device_initcall(i8259A_init_ops);
|
||||||
|
|
||||||
|
void __init legacy_pic_pcat_compat(void)
|
||||||
|
{
|
||||||
|
pcat_compat = true;
|
||||||
|
}
|
||||||
|
|
|
@ -389,7 +389,7 @@ SECTIONS
|
||||||
.brk : AT(ADDR(.brk) - LOAD_OFFSET) {
|
.brk : AT(ADDR(.brk) - LOAD_OFFSET) {
|
||||||
__brk_base = .;
|
__brk_base = .;
|
||||||
. += 64 * 1024; /* 64k alignment slop space */
|
. += 64 * 1024; /* 64k alignment slop space */
|
||||||
*(.brk_reservation) /* areas brk users have reserved */
|
*(.bss..brk) /* areas brk users have reserved */
|
||||||
__brk_limit = .;
|
__brk_limit = .;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2460,6 +2460,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
||||||
case MSR_AMD64_PATCH_LOADER:
|
case MSR_AMD64_PATCH_LOADER:
|
||||||
case MSR_AMD64_BU_CFG2:
|
case MSR_AMD64_BU_CFG2:
|
||||||
case MSR_AMD64_DC_CFG:
|
case MSR_AMD64_DC_CFG:
|
||||||
|
case MSR_AMD64_TW_CFG:
|
||||||
case MSR_F15H_EX_CFG:
|
case MSR_F15H_EX_CFG:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -2763,6 +2764,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
||||||
case MSR_AMD64_BU_CFG2:
|
case MSR_AMD64_BU_CFG2:
|
||||||
case MSR_IA32_PERF_CTL:
|
case MSR_IA32_PERF_CTL:
|
||||||
case MSR_AMD64_DC_CFG:
|
case MSR_AMD64_DC_CFG:
|
||||||
|
case MSR_AMD64_TW_CFG:
|
||||||
case MSR_F15H_EX_CFG:
|
case MSR_F15H_EX_CFG:
|
||||||
msr_info->data = 0;
|
msr_info->data = 0;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -585,13 +585,6 @@ static int __init numa_register_memblks(struct numa_meminfo *mi)
|
||||||
if (start >= end)
|
if (start >= end)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/*
|
|
||||||
* Don't confuse VM with a node that doesn't have the
|
|
||||||
* minimum amount of memory:
|
|
||||||
*/
|
|
||||||
if (end && (end - start) < NODE_MIN_SIZE)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
alloc_node_data(nid);
|
alloc_node_data(nid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -174,6 +174,8 @@ static int pcrypt_aead_encrypt(struct aead_request *req)
|
||||||
err = pcrypt_do_parallel(padata, &ctx->cb_cpu, &pencrypt);
|
err = pcrypt_do_parallel(padata, &ctx->cb_cpu, &pencrypt);
|
||||||
if (!err)
|
if (!err)
|
||||||
return -EINPROGRESS;
|
return -EINPROGRESS;
|
||||||
|
if (err == -EBUSY)
|
||||||
|
return -EAGAIN;
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
@ -218,6 +220,8 @@ static int pcrypt_aead_decrypt(struct aead_request *req)
|
||||||
err = pcrypt_do_parallel(padata, &ctx->cb_cpu, &pdecrypt);
|
err = pcrypt_do_parallel(padata, &ctx->cb_cpu, &pdecrypt);
|
||||||
if (!err)
|
if (!err)
|
||||||
return -EINPROGRESS;
|
return -EINPROGRESS;
|
||||||
|
if (err == -EBUSY)
|
||||||
|
return -EAGAIN;
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,8 +164,8 @@ static int create_pnp_modalias(struct acpi_device *acpi_dev, char *modalias,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
len = snprintf(modalias, size, "acpi:");
|
len = snprintf(modalias, size, "acpi:");
|
||||||
if (len <= 0)
|
if (len >= size)
|
||||||
return len;
|
return -ENOMEM;
|
||||||
|
|
||||||
size -= len;
|
size -= len;
|
||||||
|
|
||||||
|
@ -218,8 +218,10 @@ static int create_of_modalias(struct acpi_device *acpi_dev, char *modalias,
|
||||||
len = snprintf(modalias, size, "of:N%sT", (char *)buf.pointer);
|
len = snprintf(modalias, size, "of:N%sT", (char *)buf.pointer);
|
||||||
ACPI_FREE(buf.pointer);
|
ACPI_FREE(buf.pointer);
|
||||||
|
|
||||||
if (len <= 0)
|
if (len >= size)
|
||||||
return len;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
size -= len;
|
||||||
|
|
||||||
of_compatible = acpi_dev->data.of_compatible;
|
of_compatible = acpi_dev->data.of_compatible;
|
||||||
if (of_compatible->type == ACPI_TYPE_PACKAGE) {
|
if (of_compatible->type == ACPI_TYPE_PACKAGE) {
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include <linux/libata.h>
|
#include <linux/libata.h>
|
||||||
#include <linux/phy/phy.h>
|
#include <linux/phy/phy.h>
|
||||||
#include <linux/regulator/consumer.h>
|
#include <linux/regulator/consumer.h>
|
||||||
|
#include <linux/bits.h>
|
||||||
|
|
||||||
/* Enclosure Management Control */
|
/* Enclosure Management Control */
|
||||||
#define EM_CTRL_MSG_TYPE 0x000f0000
|
#define EM_CTRL_MSG_TYPE 0x000f0000
|
||||||
|
@ -70,12 +71,12 @@ enum {
|
||||||
AHCI_PORT_PRIV_FBS_DMA_SZ = AHCI_CMD_SLOT_SZ +
|
AHCI_PORT_PRIV_FBS_DMA_SZ = AHCI_CMD_SLOT_SZ +
|
||||||
AHCI_CMD_TBL_AR_SZ +
|
AHCI_CMD_TBL_AR_SZ +
|
||||||
(AHCI_RX_FIS_SZ * 16),
|
(AHCI_RX_FIS_SZ * 16),
|
||||||
AHCI_IRQ_ON_SG = (1 << 31),
|
AHCI_IRQ_ON_SG = BIT(31),
|
||||||
AHCI_CMD_ATAPI = (1 << 5),
|
AHCI_CMD_ATAPI = BIT(5),
|
||||||
AHCI_CMD_WRITE = (1 << 6),
|
AHCI_CMD_WRITE = BIT(6),
|
||||||
AHCI_CMD_PREFETCH = (1 << 7),
|
AHCI_CMD_PREFETCH = BIT(7),
|
||||||
AHCI_CMD_RESET = (1 << 8),
|
AHCI_CMD_RESET = BIT(8),
|
||||||
AHCI_CMD_CLR_BUSY = (1 << 10),
|
AHCI_CMD_CLR_BUSY = BIT(10),
|
||||||
|
|
||||||
RX_FIS_PIO_SETUP = 0x20, /* offset of PIO Setup FIS data */
|
RX_FIS_PIO_SETUP = 0x20, /* offset of PIO Setup FIS data */
|
||||||
RX_FIS_D2H_REG = 0x40, /* offset of D2H Register FIS data */
|
RX_FIS_D2H_REG = 0x40, /* offset of D2H Register FIS data */
|
||||||
|
@ -93,37 +94,37 @@ enum {
|
||||||
HOST_CAP2 = 0x24, /* host capabilities, extended */
|
HOST_CAP2 = 0x24, /* host capabilities, extended */
|
||||||
|
|
||||||
/* HOST_CTL bits */
|
/* HOST_CTL bits */
|
||||||
HOST_RESET = (1 << 0), /* reset controller; self-clear */
|
HOST_RESET = BIT(0), /* reset controller; self-clear */
|
||||||
HOST_IRQ_EN = (1 << 1), /* global IRQ enable */
|
HOST_IRQ_EN = BIT(1), /* global IRQ enable */
|
||||||
HOST_MRSM = (1 << 2), /* MSI Revert to Single Message */
|
HOST_MRSM = BIT(2), /* MSI Revert to Single Message */
|
||||||
HOST_AHCI_EN = (1 << 31), /* AHCI enabled */
|
HOST_AHCI_EN = BIT(31), /* AHCI enabled */
|
||||||
|
|
||||||
/* HOST_CAP bits */
|
/* HOST_CAP bits */
|
||||||
HOST_CAP_SXS = (1 << 5), /* Supports External SATA */
|
HOST_CAP_SXS = BIT(5), /* Supports External SATA */
|
||||||
HOST_CAP_EMS = (1 << 6), /* Enclosure Management support */
|
HOST_CAP_EMS = BIT(6), /* Enclosure Management support */
|
||||||
HOST_CAP_CCC = (1 << 7), /* Command Completion Coalescing */
|
HOST_CAP_CCC = BIT(7), /* Command Completion Coalescing */
|
||||||
HOST_CAP_PART = (1 << 13), /* Partial state capable */
|
HOST_CAP_PART = BIT(13), /* Partial state capable */
|
||||||
HOST_CAP_SSC = (1 << 14), /* Slumber state capable */
|
HOST_CAP_SSC = BIT(14), /* Slumber state capable */
|
||||||
HOST_CAP_PIO_MULTI = (1 << 15), /* PIO multiple DRQ support */
|
HOST_CAP_PIO_MULTI = BIT(15), /* PIO multiple DRQ support */
|
||||||
HOST_CAP_FBS = (1 << 16), /* FIS-based switching support */
|
HOST_CAP_FBS = BIT(16), /* FIS-based switching support */
|
||||||
HOST_CAP_PMP = (1 << 17), /* Port Multiplier support */
|
HOST_CAP_PMP = BIT(17), /* Port Multiplier support */
|
||||||
HOST_CAP_ONLY = (1 << 18), /* Supports AHCI mode only */
|
HOST_CAP_ONLY = BIT(18), /* Supports AHCI mode only */
|
||||||
HOST_CAP_CLO = (1 << 24), /* Command List Override support */
|
HOST_CAP_CLO = BIT(24), /* Command List Override support */
|
||||||
HOST_CAP_LED = (1 << 25), /* Supports activity LED */
|
HOST_CAP_LED = BIT(25), /* Supports activity LED */
|
||||||
HOST_CAP_ALPM = (1 << 26), /* Aggressive Link PM support */
|
HOST_CAP_ALPM = BIT(26), /* Aggressive Link PM support */
|
||||||
HOST_CAP_SSS = (1 << 27), /* Staggered Spin-up */
|
HOST_CAP_SSS = BIT(27), /* Staggered Spin-up */
|
||||||
HOST_CAP_MPS = (1 << 28), /* Mechanical presence switch */
|
HOST_CAP_MPS = BIT(28), /* Mechanical presence switch */
|
||||||
HOST_CAP_SNTF = (1 << 29), /* SNotification register */
|
HOST_CAP_SNTF = BIT(29), /* SNotification register */
|
||||||
HOST_CAP_NCQ = (1 << 30), /* Native Command Queueing */
|
HOST_CAP_NCQ = BIT(30), /* Native Command Queueing */
|
||||||
HOST_CAP_64 = (1 << 31), /* PCI DAC (64-bit DMA) support */
|
HOST_CAP_64 = BIT(31), /* PCI DAC (64-bit DMA) support */
|
||||||
|
|
||||||
/* HOST_CAP2 bits */
|
/* HOST_CAP2 bits */
|
||||||
HOST_CAP2_BOH = (1 << 0), /* BIOS/OS handoff supported */
|
HOST_CAP2_BOH = BIT(0), /* BIOS/OS handoff supported */
|
||||||
HOST_CAP2_NVMHCI = (1 << 1), /* NVMHCI supported */
|
HOST_CAP2_NVMHCI = BIT(1), /* NVMHCI supported */
|
||||||
HOST_CAP2_APST = (1 << 2), /* Automatic partial to slumber */
|
HOST_CAP2_APST = BIT(2), /* Automatic partial to slumber */
|
||||||
HOST_CAP2_SDS = (1 << 3), /* Support device sleep */
|
HOST_CAP2_SDS = BIT(3), /* Support device sleep */
|
||||||
HOST_CAP2_SADM = (1 << 4), /* Support aggressive DevSlp */
|
HOST_CAP2_SADM = BIT(4), /* Support aggressive DevSlp */
|
||||||
HOST_CAP2_DESO = (1 << 5), /* DevSlp from slumber only */
|
HOST_CAP2_DESO = BIT(5), /* DevSlp from slumber only */
|
||||||
|
|
||||||
/* registers for each SATA port */
|
/* registers for each SATA port */
|
||||||
PORT_LST_ADDR = 0x00, /* command list DMA addr */
|
PORT_LST_ADDR = 0x00, /* command list DMA addr */
|
||||||
|
@ -145,24 +146,25 @@ enum {
|
||||||
PORT_DEVSLP = 0x44, /* device sleep */
|
PORT_DEVSLP = 0x44, /* device sleep */
|
||||||
|
|
||||||
/* PORT_IRQ_{STAT,MASK} bits */
|
/* PORT_IRQ_{STAT,MASK} bits */
|
||||||
PORT_IRQ_COLD_PRES = (1 << 31), /* cold presence detect */
|
PORT_IRQ_COLD_PRES = BIT(31), /* cold presence detect */
|
||||||
PORT_IRQ_TF_ERR = (1 << 30), /* task file error */
|
PORT_IRQ_TF_ERR = BIT(30), /* task file error */
|
||||||
PORT_IRQ_HBUS_ERR = (1 << 29), /* host bus fatal error */
|
PORT_IRQ_HBUS_ERR = BIT(29), /* host bus fatal error */
|
||||||
PORT_IRQ_HBUS_DATA_ERR = (1 << 28), /* host bus data error */
|
PORT_IRQ_HBUS_DATA_ERR = BIT(28), /* host bus data error */
|
||||||
PORT_IRQ_IF_ERR = (1 << 27), /* interface fatal error */
|
PORT_IRQ_IF_ERR = BIT(27), /* interface fatal error */
|
||||||
PORT_IRQ_IF_NONFATAL = (1 << 26), /* interface non-fatal error */
|
PORT_IRQ_IF_NONFATAL = BIT(26), /* interface non-fatal error */
|
||||||
PORT_IRQ_OVERFLOW = (1 << 24), /* xfer exhausted available S/G */
|
PORT_IRQ_OVERFLOW = BIT(24), /* xfer exhausted available S/G */
|
||||||
PORT_IRQ_BAD_PMP = (1 << 23), /* incorrect port multiplier */
|
PORT_IRQ_BAD_PMP = BIT(23), /* incorrect port multiplier */
|
||||||
|
|
||||||
PORT_IRQ_PHYRDY = (1 << 22), /* PhyRdy changed */
|
PORT_IRQ_PHYRDY = BIT(22), /* PhyRdy changed */
|
||||||
PORT_IRQ_DEV_ILCK = (1 << 7), /* device interlock */
|
PORT_IRQ_DEV_ILCK = BIT(7), /* device interlock */
|
||||||
PORT_IRQ_CONNECT = (1 << 6), /* port connect change status */
|
PORT_IRQ_DMPS = BIT(7), /* mechanical presence status */
|
||||||
PORT_IRQ_SG_DONE = (1 << 5), /* descriptor processed */
|
PORT_IRQ_CONNECT = BIT(6), /* port connect change status */
|
||||||
PORT_IRQ_UNK_FIS = (1 << 4), /* unknown FIS rx'd */
|
PORT_IRQ_SG_DONE = BIT(5), /* descriptor processed */
|
||||||
PORT_IRQ_SDB_FIS = (1 << 3), /* Set Device Bits FIS rx'd */
|
PORT_IRQ_UNK_FIS = BIT(4), /* unknown FIS rx'd */
|
||||||
PORT_IRQ_DMAS_FIS = (1 << 2), /* DMA Setup FIS rx'd */
|
PORT_IRQ_SDB_FIS = BIT(3), /* Set Device Bits FIS rx'd */
|
||||||
PORT_IRQ_PIOS_FIS = (1 << 1), /* PIO Setup FIS rx'd */
|
PORT_IRQ_DMAS_FIS = BIT(2), /* DMA Setup FIS rx'd */
|
||||||
PORT_IRQ_D2H_REG_FIS = (1 << 0), /* D2H Register FIS rx'd */
|
PORT_IRQ_PIOS_FIS = BIT(1), /* PIO Setup FIS rx'd */
|
||||||
|
PORT_IRQ_D2H_REG_FIS = BIT(0), /* D2H Register FIS rx'd */
|
||||||
|
|
||||||
PORT_IRQ_FREEZE = PORT_IRQ_HBUS_ERR |
|
PORT_IRQ_FREEZE = PORT_IRQ_HBUS_ERR |
|
||||||
PORT_IRQ_IF_ERR |
|
PORT_IRQ_IF_ERR |
|
||||||
|
@ -178,34 +180,34 @@ enum {
|
||||||
PORT_IRQ_PIOS_FIS | PORT_IRQ_D2H_REG_FIS,
|
PORT_IRQ_PIOS_FIS | PORT_IRQ_D2H_REG_FIS,
|
||||||
|
|
||||||
/* PORT_CMD bits */
|
/* PORT_CMD bits */
|
||||||
PORT_CMD_ASP = (1 << 27), /* Aggressive Slumber/Partial */
|
PORT_CMD_ASP = BIT(27), /* Aggressive Slumber/Partial */
|
||||||
PORT_CMD_ALPE = (1 << 26), /* Aggressive Link PM enable */
|
PORT_CMD_ALPE = BIT(26), /* Aggressive Link PM enable */
|
||||||
PORT_CMD_ATAPI = (1 << 24), /* Device is ATAPI */
|
PORT_CMD_ATAPI = BIT(24), /* Device is ATAPI */
|
||||||
PORT_CMD_FBSCP = (1 << 22), /* FBS Capable Port */
|
PORT_CMD_FBSCP = BIT(22), /* FBS Capable Port */
|
||||||
PORT_CMD_ESP = (1 << 21), /* External Sata Port */
|
PORT_CMD_ESP = BIT(21), /* External Sata Port */
|
||||||
PORT_CMD_HPCP = (1 << 18), /* HotPlug Capable Port */
|
PORT_CMD_HPCP = BIT(18), /* HotPlug Capable Port */
|
||||||
PORT_CMD_PMP = (1 << 17), /* PMP attached */
|
PORT_CMD_PMP = BIT(17), /* PMP attached */
|
||||||
PORT_CMD_LIST_ON = (1 << 15), /* cmd list DMA engine running */
|
PORT_CMD_LIST_ON = BIT(15), /* cmd list DMA engine running */
|
||||||
PORT_CMD_FIS_ON = (1 << 14), /* FIS DMA engine running */
|
PORT_CMD_FIS_ON = BIT(14), /* FIS DMA engine running */
|
||||||
PORT_CMD_FIS_RX = (1 << 4), /* Enable FIS receive DMA engine */
|
PORT_CMD_FIS_RX = BIT(4), /* Enable FIS receive DMA engine */
|
||||||
PORT_CMD_CLO = (1 << 3), /* Command list override */
|
PORT_CMD_CLO = BIT(3), /* Command list override */
|
||||||
PORT_CMD_POWER_ON = (1 << 2), /* Power up device */
|
PORT_CMD_POWER_ON = BIT(2), /* Power up device */
|
||||||
PORT_CMD_SPIN_UP = (1 << 1), /* Spin up device */
|
PORT_CMD_SPIN_UP = BIT(1), /* Spin up device */
|
||||||
PORT_CMD_START = (1 << 0), /* Enable port DMA engine */
|
PORT_CMD_START = BIT(0), /* Enable port DMA engine */
|
||||||
|
|
||||||
PORT_CMD_ICC_MASK = (0xf << 28), /* i/f ICC state mask */
|
PORT_CMD_ICC_MASK = (0xfu << 28), /* i/f ICC state mask */
|
||||||
PORT_CMD_ICC_ACTIVE = (0x1 << 28), /* Put i/f in active state */
|
PORT_CMD_ICC_ACTIVE = (0x1u << 28), /* Put i/f in active state */
|
||||||
PORT_CMD_ICC_PARTIAL = (0x2 << 28), /* Put i/f in partial state */
|
PORT_CMD_ICC_PARTIAL = (0x2u << 28), /* Put i/f in partial state */
|
||||||
PORT_CMD_ICC_SLUMBER = (0x6 << 28), /* Put i/f in slumber state */
|
PORT_CMD_ICC_SLUMBER = (0x6u << 28), /* Put i/f in slumber state */
|
||||||
|
|
||||||
/* PORT_FBS bits */
|
/* PORT_FBS bits */
|
||||||
PORT_FBS_DWE_OFFSET = 16, /* FBS device with error offset */
|
PORT_FBS_DWE_OFFSET = 16, /* FBS device with error offset */
|
||||||
PORT_FBS_ADO_OFFSET = 12, /* FBS active dev optimization offset */
|
PORT_FBS_ADO_OFFSET = 12, /* FBS active dev optimization offset */
|
||||||
PORT_FBS_DEV_OFFSET = 8, /* FBS device to issue offset */
|
PORT_FBS_DEV_OFFSET = 8, /* FBS device to issue offset */
|
||||||
PORT_FBS_DEV_MASK = (0xf << PORT_FBS_DEV_OFFSET), /* FBS.DEV */
|
PORT_FBS_DEV_MASK = (0xf << PORT_FBS_DEV_OFFSET), /* FBS.DEV */
|
||||||
PORT_FBS_SDE = (1 << 2), /* FBS single device error */
|
PORT_FBS_SDE = BIT(2), /* FBS single device error */
|
||||||
PORT_FBS_DEC = (1 << 1), /* FBS device error clear */
|
PORT_FBS_DEC = BIT(1), /* FBS device error clear */
|
||||||
PORT_FBS_EN = (1 << 0), /* Enable FBS */
|
PORT_FBS_EN = BIT(0), /* Enable FBS */
|
||||||
|
|
||||||
/* PORT_DEVSLP bits */
|
/* PORT_DEVSLP bits */
|
||||||
PORT_DEVSLP_DM_OFFSET = 25, /* DITO multiplier offset */
|
PORT_DEVSLP_DM_OFFSET = 25, /* DITO multiplier offset */
|
||||||
|
@ -213,45 +215,45 @@ enum {
|
||||||
PORT_DEVSLP_DITO_OFFSET = 15, /* DITO offset */
|
PORT_DEVSLP_DITO_OFFSET = 15, /* DITO offset */
|
||||||
PORT_DEVSLP_MDAT_OFFSET = 10, /* Minimum assertion time */
|
PORT_DEVSLP_MDAT_OFFSET = 10, /* Minimum assertion time */
|
||||||
PORT_DEVSLP_DETO_OFFSET = 2, /* DevSlp exit timeout */
|
PORT_DEVSLP_DETO_OFFSET = 2, /* DevSlp exit timeout */
|
||||||
PORT_DEVSLP_DSP = (1 << 1), /* DevSlp present */
|
PORT_DEVSLP_DSP = BIT(1), /* DevSlp present */
|
||||||
PORT_DEVSLP_ADSE = (1 << 0), /* Aggressive DevSlp enable */
|
PORT_DEVSLP_ADSE = BIT(0), /* Aggressive DevSlp enable */
|
||||||
|
|
||||||
/* hpriv->flags bits */
|
/* hpriv->flags bits */
|
||||||
|
|
||||||
#define AHCI_HFLAGS(flags) .private_data = (void *)(flags)
|
#define AHCI_HFLAGS(flags) .private_data = (void *)(flags)
|
||||||
|
|
||||||
AHCI_HFLAG_NO_NCQ = (1 << 0),
|
AHCI_HFLAG_NO_NCQ = BIT(0),
|
||||||
AHCI_HFLAG_IGN_IRQ_IF_ERR = (1 << 1), /* ignore IRQ_IF_ERR */
|
AHCI_HFLAG_IGN_IRQ_IF_ERR = BIT(1), /* ignore IRQ_IF_ERR */
|
||||||
AHCI_HFLAG_IGN_SERR_INTERNAL = (1 << 2), /* ignore SERR_INTERNAL */
|
AHCI_HFLAG_IGN_SERR_INTERNAL = BIT(2), /* ignore SERR_INTERNAL */
|
||||||
AHCI_HFLAG_32BIT_ONLY = (1 << 3), /* force 32bit */
|
AHCI_HFLAG_32BIT_ONLY = BIT(3), /* force 32bit */
|
||||||
AHCI_HFLAG_MV_PATA = (1 << 4), /* PATA port */
|
AHCI_HFLAG_MV_PATA = BIT(4), /* PATA port */
|
||||||
AHCI_HFLAG_NO_MSI = (1 << 5), /* no PCI MSI */
|
AHCI_HFLAG_NO_MSI = BIT(5), /* no PCI MSI */
|
||||||
AHCI_HFLAG_NO_PMP = (1 << 6), /* no PMP */
|
AHCI_HFLAG_NO_PMP = BIT(6), /* no PMP */
|
||||||
AHCI_HFLAG_SECT255 = (1 << 8), /* max 255 sectors */
|
AHCI_HFLAG_SECT255 = BIT(8), /* max 255 sectors */
|
||||||
AHCI_HFLAG_YES_NCQ = (1 << 9), /* force NCQ cap on */
|
AHCI_HFLAG_YES_NCQ = BIT(9), /* force NCQ cap on */
|
||||||
AHCI_HFLAG_NO_SUSPEND = (1 << 10), /* don't suspend */
|
AHCI_HFLAG_NO_SUSPEND = BIT(10), /* don't suspend */
|
||||||
AHCI_HFLAG_SRST_TOUT_IS_OFFLINE = (1 << 11), /* treat SRST timeout as
|
AHCI_HFLAG_SRST_TOUT_IS_OFFLINE = BIT(11), /* treat SRST timeout as
|
||||||
link offline */
|
link offline */
|
||||||
AHCI_HFLAG_NO_SNTF = (1 << 12), /* no sntf */
|
AHCI_HFLAG_NO_SNTF = BIT(12), /* no sntf */
|
||||||
AHCI_HFLAG_NO_FPDMA_AA = (1 << 13), /* no FPDMA AA */
|
AHCI_HFLAG_NO_FPDMA_AA = BIT(13), /* no FPDMA AA */
|
||||||
AHCI_HFLAG_YES_FBS = (1 << 14), /* force FBS cap on */
|
AHCI_HFLAG_YES_FBS = BIT(14), /* force FBS cap on */
|
||||||
AHCI_HFLAG_DELAY_ENGINE = (1 << 15), /* do not start engine on
|
AHCI_HFLAG_DELAY_ENGINE = BIT(15), /* do not start engine on
|
||||||
port start (wait until
|
port start (wait until
|
||||||
error-handling stage) */
|
error-handling stage) */
|
||||||
AHCI_HFLAG_NO_DEVSLP = (1 << 17), /* no device sleep */
|
AHCI_HFLAG_NO_DEVSLP = BIT(17), /* no device sleep */
|
||||||
AHCI_HFLAG_NO_FBS = (1 << 18), /* no FBS */
|
AHCI_HFLAG_NO_FBS = BIT(18), /* no FBS */
|
||||||
|
|
||||||
#ifdef CONFIG_PCI_MSI
|
#ifdef CONFIG_PCI_MSI
|
||||||
AHCI_HFLAG_MULTI_MSI = (1 << 20), /* per-port MSI(-X) */
|
AHCI_HFLAG_MULTI_MSI = BIT(20), /* per-port MSI(-X) */
|
||||||
#else
|
#else
|
||||||
/* compile out MSI infrastructure */
|
/* compile out MSI infrastructure */
|
||||||
AHCI_HFLAG_MULTI_MSI = 0,
|
AHCI_HFLAG_MULTI_MSI = 0,
|
||||||
#endif
|
#endif
|
||||||
AHCI_HFLAG_WAKE_BEFORE_STOP = (1 << 22), /* wake before DMA stop */
|
AHCI_HFLAG_WAKE_BEFORE_STOP = BIT(22), /* wake before DMA stop */
|
||||||
AHCI_HFLAG_YES_ALPM = (1 << 23), /* force ALPM cap on */
|
AHCI_HFLAG_YES_ALPM = BIT(23), /* force ALPM cap on */
|
||||||
AHCI_HFLAG_NO_WRITE_TO_RO = (1 << 24), /* don't write to read
|
AHCI_HFLAG_NO_WRITE_TO_RO = BIT(24), /* don't write to read
|
||||||
only registers */
|
only registers */
|
||||||
AHCI_HFLAG_IS_MOBILE = (1 << 25), /* mobile chipset, use
|
AHCI_HFLAG_IS_MOBILE = BIT(25), /* mobile chipset, use
|
||||||
SATA_MOBILE_LPM_POLICY
|
SATA_MOBILE_LPM_POLICY
|
||||||
as default lpm_policy */
|
as default lpm_policy */
|
||||||
|
|
||||||
|
@ -269,22 +271,22 @@ enum {
|
||||||
EM_MAX_RETRY = 5,
|
EM_MAX_RETRY = 5,
|
||||||
|
|
||||||
/* em_ctl bits */
|
/* em_ctl bits */
|
||||||
EM_CTL_RST = (1 << 9), /* Reset */
|
EM_CTL_RST = BIT(9), /* Reset */
|
||||||
EM_CTL_TM = (1 << 8), /* Transmit Message */
|
EM_CTL_TM = BIT(8), /* Transmit Message */
|
||||||
EM_CTL_MR = (1 << 0), /* Message Received */
|
EM_CTL_MR = BIT(0), /* Message Received */
|
||||||
EM_CTL_ALHD = (1 << 26), /* Activity LED */
|
EM_CTL_ALHD = BIT(26), /* Activity LED */
|
||||||
EM_CTL_XMT = (1 << 25), /* Transmit Only */
|
EM_CTL_XMT = BIT(25), /* Transmit Only */
|
||||||
EM_CTL_SMB = (1 << 24), /* Single Message Buffer */
|
EM_CTL_SMB = BIT(24), /* Single Message Buffer */
|
||||||
EM_CTL_SGPIO = (1 << 19), /* SGPIO messages supported */
|
EM_CTL_SGPIO = BIT(19), /* SGPIO messages supported */
|
||||||
EM_CTL_SES = (1 << 18), /* SES-2 messages supported */
|
EM_CTL_SES = BIT(18), /* SES-2 messages supported */
|
||||||
EM_CTL_SAFTE = (1 << 17), /* SAF-TE messages supported */
|
EM_CTL_SAFTE = BIT(17), /* SAF-TE messages supported */
|
||||||
EM_CTL_LED = (1 << 16), /* LED messages supported */
|
EM_CTL_LED = BIT(16), /* LED messages supported */
|
||||||
|
|
||||||
/* em message type */
|
/* em message type */
|
||||||
EM_MSG_TYPE_LED = (1 << 0), /* LED */
|
EM_MSG_TYPE_LED = BIT(0), /* LED */
|
||||||
EM_MSG_TYPE_SAFTE = (1 << 1), /* SAF-TE */
|
EM_MSG_TYPE_SAFTE = BIT(1), /* SAF-TE */
|
||||||
EM_MSG_TYPE_SES2 = (1 << 2), /* SES-2 */
|
EM_MSG_TYPE_SES2 = BIT(2), /* SES-2 */
|
||||||
EM_MSG_TYPE_SGPIO = (1 << 3), /* SGPIO */
|
EM_MSG_TYPE_SGPIO = BIT(3), /* SGPIO */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ahci_cmd_hdr {
|
struct ahci_cmd_hdr {
|
||||||
|
|
|
@ -2290,19 +2290,21 @@ static int get_esi(struct atm_dev *dev)
|
||||||
static int reset_sar(struct atm_dev *dev)
|
static int reset_sar(struct atm_dev *dev)
|
||||||
{
|
{
|
||||||
IADEV *iadev;
|
IADEV *iadev;
|
||||||
int i, error = 1;
|
int i, error;
|
||||||
unsigned int pci[64];
|
unsigned int pci[64];
|
||||||
|
|
||||||
iadev = INPH_IA_DEV(dev);
|
iadev = INPH_IA_DEV(dev);
|
||||||
for(i=0; i<64; i++)
|
for (i = 0; i < 64; i++) {
|
||||||
if ((error = pci_read_config_dword(iadev->pci,
|
error = pci_read_config_dword(iadev->pci, i * 4, &pci[i]);
|
||||||
i*4, &pci[i])) != PCIBIOS_SUCCESSFUL)
|
if (error != PCIBIOS_SUCCESSFUL)
|
||||||
return error;
|
return error;
|
||||||
|
}
|
||||||
writel(0, iadev->reg+IPHASE5575_EXT_RESET);
|
writel(0, iadev->reg+IPHASE5575_EXT_RESET);
|
||||||
for(i=0; i<64; i++)
|
for (i = 0; i < 64; i++) {
|
||||||
if ((error = pci_write_config_dword(iadev->pci,
|
error = pci_write_config_dword(iadev->pci, i * 4, pci[i]);
|
||||||
i*4, pci[i])) != PCIBIOS_SUCCESSFUL)
|
if (error != PCIBIOS_SUCCESSFUL)
|
||||||
return error;
|
return error;
|
||||||
|
}
|
||||||
udelay(5);
|
udelay(5);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,75 @@ static struct device *next_device(struct klist_iter *i)
|
||||||
return dev;
|
return dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* driver_set_override() - Helper to set or clear driver override.
|
||||||
|
* @dev: Device to change
|
||||||
|
* @override: Address of string to change (e.g. &device->driver_override);
|
||||||
|
* The contents will be freed and hold newly allocated override.
|
||||||
|
* @s: NUL-terminated string, new driver name to force a match, pass empty
|
||||||
|
* string to clear it ("" or "\n", where the latter is only for sysfs
|
||||||
|
* interface).
|
||||||
|
* @len: length of @s
|
||||||
|
*
|
||||||
|
* Helper to set or clear driver override in a device, intended for the cases
|
||||||
|
* when the driver_override field is allocated by driver/bus code.
|
||||||
|
*
|
||||||
|
* Returns: 0 on success or a negative error code on failure.
|
||||||
|
*/
|
||||||
|
int driver_set_override(struct device *dev, const char **override,
|
||||||
|
const char *s, size_t len)
|
||||||
|
{
|
||||||
|
const char *new, *old;
|
||||||
|
char *cp;
|
||||||
|
|
||||||
|
if (!override || !s)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The stored value will be used in sysfs show callback (sysfs_emit()),
|
||||||
|
* which has a length limit of PAGE_SIZE and adds a trailing newline.
|
||||||
|
* Thus we can store one character less to avoid truncation during sysfs
|
||||||
|
* show.
|
||||||
|
*/
|
||||||
|
if (len >= (PAGE_SIZE - 1))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (!len) {
|
||||||
|
/* Empty string passed - clear override */
|
||||||
|
device_lock(dev);
|
||||||
|
old = *override;
|
||||||
|
*override = NULL;
|
||||||
|
device_unlock(dev);
|
||||||
|
kfree(old);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
cp = strnchr(s, len, '\n');
|
||||||
|
if (cp)
|
||||||
|
len = cp - s;
|
||||||
|
|
||||||
|
new = kstrndup(s, len, GFP_KERNEL);
|
||||||
|
if (!new)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
device_lock(dev);
|
||||||
|
old = *override;
|
||||||
|
if (cp != s) {
|
||||||
|
*override = new;
|
||||||
|
} else {
|
||||||
|
/* "\n" passed - clear override */
|
||||||
|
kfree(new);
|
||||||
|
*override = NULL;
|
||||||
|
}
|
||||||
|
device_unlock(dev);
|
||||||
|
|
||||||
|
kfree(old);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(driver_set_override);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* driver_for_each_device - Iterator for devices bound to a driver.
|
* driver_for_each_device - Iterator for devices bound to a driver.
|
||||||
* @drv: Driver we're iterating.
|
* @drv: Driver we're iterating.
|
||||||
|
|
|
@ -891,31 +891,11 @@ static ssize_t driver_override_store(struct device *dev,
|
||||||
const char *buf, size_t count)
|
const char *buf, size_t count)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct platform_device *pdev = to_platform_device(dev);
|
||||||
char *driver_override, *old, *cp;
|
int ret;
|
||||||
|
|
||||||
/* We need to keep extra room for a newline */
|
ret = driver_set_override(dev, (const char **)&pdev->driver_override, buf, count);
|
||||||
if (count >= (PAGE_SIZE - 1))
|
if (ret)
|
||||||
return -EINVAL;
|
return ret;
|
||||||
|
|
||||||
driver_override = kstrndup(buf, count, GFP_KERNEL);
|
|
||||||
if (!driver_override)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
cp = strchr(driver_override, '\n');
|
|
||||||
if (cp)
|
|
||||||
*cp = '\0';
|
|
||||||
|
|
||||||
device_lock(dev);
|
|
||||||
old = pdev->driver_override;
|
|
||||||
if (strlen(driver_override)) {
|
|
||||||
pdev->driver_override = driver_override;
|
|
||||||
} else {
|
|
||||||
kfree(driver_override);
|
|
||||||
pdev->driver_override = NULL;
|
|
||||||
}
|
|
||||||
device_unlock(dev);
|
|
||||||
|
|
||||||
kfree(old);
|
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ static ssize_t regmap_name_read_file(struct file *file,
|
||||||
name = map->dev->driver->name;
|
name = map->dev->driver->name;
|
||||||
|
|
||||||
ret = snprintf(buf, PAGE_SIZE, "%s\n", name);
|
ret = snprintf(buf, PAGE_SIZE, "%s\n", name);
|
||||||
if (ret < 0) {
|
if (ret >= PAGE_SIZE) {
|
||||||
kfree(buf);
|
kfree(buf);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -311,15 +311,6 @@ config BLK_DEV_SKD
|
||||||
|
|
||||||
Use device /dev/skd$N amd /dev/skd$Np$M.
|
Use device /dev/skd$N amd /dev/skd$Np$M.
|
||||||
|
|
||||||
config BLK_DEV_SX8
|
|
||||||
tristate "Promise SATA SX8 support"
|
|
||||||
depends on PCI
|
|
||||||
---help---
|
|
||||||
Saying Y or M here will enable support for the
|
|
||||||
Promise SATA SX8 controllers.
|
|
||||||
|
|
||||||
Use devices /dev/sx8/$N and /dev/sx8/$Np$M.
|
|
||||||
|
|
||||||
config BLK_DEV_RAM
|
config BLK_DEV_RAM
|
||||||
tristate "RAM block device support"
|
tristate "RAM block device support"
|
||||||
---help---
|
---help---
|
||||||
|
|
|
@ -27,8 +27,6 @@ obj-$(CONFIG_BLK_DEV_NBD) += nbd.o
|
||||||
obj-$(CONFIG_BLK_DEV_CRYPTOLOOP) += cryptoloop.o
|
obj-$(CONFIG_BLK_DEV_CRYPTOLOOP) += cryptoloop.o
|
||||||
obj-$(CONFIG_VIRTIO_BLK) += virtio_blk.o
|
obj-$(CONFIG_VIRTIO_BLK) += virtio_blk.o
|
||||||
|
|
||||||
obj-$(CONFIG_BLK_DEV_SX8) += sx8.o
|
|
||||||
|
|
||||||
obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += xen-blkfront.o
|
obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += xen-blkfront.o
|
||||||
obj-$(CONFIG_XEN_BLKDEV_BACKEND) += xen-blkback/
|
obj-$(CONFIG_XEN_BLKDEV_BACKEND) += xen-blkback/
|
||||||
obj-$(CONFIG_BLK_DEV_DRBD) += drbd/
|
obj-$(CONFIG_BLK_DEV_DRBD) += drbd/
|
||||||
|
|
1746
drivers/block/sx8.c
1746
drivers/block/sx8.c
File diff suppressed because it is too large
Load diff
|
@ -58,7 +58,8 @@ struct amd_geode_priv {
|
||||||
|
|
||||||
static int geode_rng_data_read(struct hwrng *rng, u32 *data)
|
static int geode_rng_data_read(struct hwrng *rng, u32 *data)
|
||||||
{
|
{
|
||||||
void __iomem *mem = (void __iomem *)rng->priv;
|
struct amd_geode_priv *priv = (struct amd_geode_priv *)rng->priv;
|
||||||
|
void __iomem *mem = priv->membase;
|
||||||
|
|
||||||
*data = readl(mem + GEODE_RNG_DATA_REG);
|
*data = readl(mem + GEODE_RNG_DATA_REG);
|
||||||
|
|
||||||
|
@ -67,7 +68,8 @@ static int geode_rng_data_read(struct hwrng *rng, u32 *data)
|
||||||
|
|
||||||
static int geode_rng_data_present(struct hwrng *rng, int wait)
|
static int geode_rng_data_present(struct hwrng *rng, int wait)
|
||||||
{
|
{
|
||||||
void __iomem *mem = (void __iomem *)rng->priv;
|
struct amd_geode_priv *priv = (struct amd_geode_priv *)rng->priv;
|
||||||
|
void __iomem *mem = priv->membase;
|
||||||
int data, i;
|
int data, i;
|
||||||
|
|
||||||
for (i = 0; i < 20; i++) {
|
for (i = 0; i < 20; i++) {
|
||||||
|
|
|
@ -647,7 +647,7 @@ static void __init npcm7xx_clk_init(struct device_node *clk_np)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
npcm7xx_init_fail:
|
npcm7xx_init_fail:
|
||||||
kfree(npcm7xx_clk_data->hws);
|
kfree(npcm7xx_clk_data);
|
||||||
npcm7xx_init_np_err:
|
npcm7xx_init_np_err:
|
||||||
iounmap(clk_base);
|
iounmap(clk_base);
|
||||||
npcm7xx_init_error:
|
npcm7xx_init_error:
|
||||||
|
|
|
@ -170,6 +170,7 @@ static int scmi_clocks_probe(struct scmi_device *sdev)
|
||||||
sclk->info = handle->clk_ops->info_get(handle, idx);
|
sclk->info = handle->clk_ops->info_get(handle, idx);
|
||||||
if (!sclk->info) {
|
if (!sclk->info) {
|
||||||
dev_dbg(dev, "invalid clock info for idx %d\n", idx);
|
dev_dbg(dev, "invalid clock info for idx %d\n", idx);
|
||||||
|
devm_kfree(dev, sclk);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -285,12 +285,13 @@ static void __init of_pll_div_clk_init(struct device_node *node)
|
||||||
|
|
||||||
clk = clk_register_divider(NULL, clk_name, parent_name, 0, reg, shift,
|
clk = clk_register_divider(NULL, clk_name, parent_name, 0, reg, shift,
|
||||||
mask, 0, NULL);
|
mask, 0, NULL);
|
||||||
if (clk) {
|
if (IS_ERR(clk)) {
|
||||||
of_clk_add_provider(node, of_clk_src_simple_get, clk);
|
|
||||||
} else {
|
|
||||||
pr_err("%s: error registering divider %s\n", __func__, clk_name);
|
pr_err("%s: error registering divider %s\n", __func__, clk_name);
|
||||||
iounmap(reg);
|
iounmap(reg);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
of_clk_add_provider(node, of_clk_src_simple_get, clk);
|
||||||
}
|
}
|
||||||
CLK_OF_DECLARE(pll_divider_clock, "ti,keystone,pll-divider-clock", of_pll_div_clk_init);
|
CLK_OF_DECLARE(pll_divider_clock, "ti,keystone,pll-divider-clock", of_pll_div_clk_init);
|
||||||
|
|
||||||
|
@ -332,9 +333,11 @@ static void __init of_pll_mux_clk_init(struct device_node *node)
|
||||||
clk = clk_register_mux(NULL, clk_name, (const char **)&parents,
|
clk = clk_register_mux(NULL, clk_name, (const char **)&parents,
|
||||||
ARRAY_SIZE(parents) , 0, reg, shift, mask,
|
ARRAY_SIZE(parents) , 0, reg, shift, mask,
|
||||||
0, NULL);
|
0, NULL);
|
||||||
if (clk)
|
if (IS_ERR(clk)) {
|
||||||
of_clk_add_provider(node, of_clk_src_simple_get, clk);
|
|
||||||
else
|
|
||||||
pr_err("%s: error registering mux %s\n", __func__, clk_name);
|
pr_err("%s: error registering mux %s\n", __func__, clk_name);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
of_clk_add_provider(node, of_clk_src_simple_get, clk);
|
||||||
}
|
}
|
||||||
CLK_OF_DECLARE(pll_mux_clock, "ti,keystone,pll-mux-clock", of_pll_mux_clk_init);
|
CLK_OF_DECLARE(pll_mux_clock, "ti,keystone,pll-mux-clock", of_pll_mux_clk_init);
|
||||||
|
|
|
@ -688,6 +688,8 @@ static int mtk_topckgen_init(struct platform_device *pdev)
|
||||||
return PTR_ERR(base);
|
return PTR_ERR(base);
|
||||||
|
|
||||||
clk_data = mtk_alloc_clk_data(CLK_TOP_NR);
|
clk_data = mtk_alloc_clk_data(CLK_TOP_NR);
|
||||||
|
if (!clk_data)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
mtk_clk_register_fixed_clks(top_fixed_clks, ARRAY_SIZE(top_fixed_clks),
|
mtk_clk_register_fixed_clks(top_fixed_clks, ARRAY_SIZE(top_fixed_clks),
|
||||||
clk_data);
|
clk_data);
|
||||||
|
@ -755,6 +757,8 @@ static void __init mtk_infrasys_init_early(struct device_node *node)
|
||||||
|
|
||||||
if (!infra_clk_data) {
|
if (!infra_clk_data) {
|
||||||
infra_clk_data = mtk_alloc_clk_data(CLK_INFRA_NR);
|
infra_clk_data = mtk_alloc_clk_data(CLK_INFRA_NR);
|
||||||
|
if (!infra_clk_data)
|
||||||
|
return;
|
||||||
|
|
||||||
for (i = 0; i < CLK_INFRA_NR; i++)
|
for (i = 0; i < CLK_INFRA_NR; i++)
|
||||||
infra_clk_data->clks[i] = ERR_PTR(-EPROBE_DEFER);
|
infra_clk_data->clks[i] = ERR_PTR(-EPROBE_DEFER);
|
||||||
|
@ -781,6 +785,8 @@ static int mtk_infrasys_init(struct platform_device *pdev)
|
||||||
|
|
||||||
if (!infra_clk_data) {
|
if (!infra_clk_data) {
|
||||||
infra_clk_data = mtk_alloc_clk_data(CLK_INFRA_NR);
|
infra_clk_data = mtk_alloc_clk_data(CLK_INFRA_NR);
|
||||||
|
if (!infra_clk_data)
|
||||||
|
return -ENOMEM;
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < CLK_INFRA_NR; i++) {
|
for (i = 0; i < CLK_INFRA_NR; i++) {
|
||||||
if (infra_clk_data->clks[i] == ERR_PTR(-EPROBE_DEFER))
|
if (infra_clk_data->clks[i] == ERR_PTR(-EPROBE_DEFER))
|
||||||
|
@ -909,6 +915,8 @@ static int mtk_pericfg_init(struct platform_device *pdev)
|
||||||
return PTR_ERR(base);
|
return PTR_ERR(base);
|
||||||
|
|
||||||
clk_data = mtk_alloc_clk_data(CLK_PERI_NR);
|
clk_data = mtk_alloc_clk_data(CLK_PERI_NR);
|
||||||
|
if (!clk_data)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks),
|
mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks),
|
||||||
clk_data);
|
clk_data);
|
||||||
|
|
|
@ -396,6 +396,8 @@ static int mtk_topckgen_init(struct platform_device *pdev)
|
||||||
return PTR_ERR(base);
|
return PTR_ERR(base);
|
||||||
|
|
||||||
clk_data = mtk_alloc_clk_data(CLK_TOP_NR);
|
clk_data = mtk_alloc_clk_data(CLK_TOP_NR);
|
||||||
|
if (!clk_data)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
mtk_clk_register_factors(top_fixed_divs, ARRAY_SIZE(top_fixed_divs),
|
mtk_clk_register_factors(top_fixed_divs, ARRAY_SIZE(top_fixed_divs),
|
||||||
clk_data);
|
clk_data);
|
||||||
|
@ -554,6 +556,8 @@ static void mtk_infrasys_init_early(struct device_node *node)
|
||||||
|
|
||||||
if (!infra_clk_data) {
|
if (!infra_clk_data) {
|
||||||
infra_clk_data = mtk_alloc_clk_data(CLK_INFRA_NR);
|
infra_clk_data = mtk_alloc_clk_data(CLK_INFRA_NR);
|
||||||
|
if (!infra_clk_data)
|
||||||
|
return;
|
||||||
|
|
||||||
for (i = 0; i < CLK_INFRA_NR; i++)
|
for (i = 0; i < CLK_INFRA_NR; i++)
|
||||||
infra_clk_data->clks[i] = ERR_PTR(-EPROBE_DEFER);
|
infra_clk_data->clks[i] = ERR_PTR(-EPROBE_DEFER);
|
||||||
|
@ -578,6 +582,8 @@ static int mtk_infrasys_init(struct platform_device *pdev)
|
||||||
|
|
||||||
if (!infra_clk_data) {
|
if (!infra_clk_data) {
|
||||||
infra_clk_data = mtk_alloc_clk_data(CLK_INFRA_NR);
|
infra_clk_data = mtk_alloc_clk_data(CLK_INFRA_NR);
|
||||||
|
if (!infra_clk_data)
|
||||||
|
return -ENOMEM;
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < CLK_INFRA_NR; i++) {
|
for (i = 0; i < CLK_INFRA_NR; i++) {
|
||||||
if (infra_clk_data->clks[i] == ERR_PTR(-EPROBE_DEFER))
|
if (infra_clk_data->clks[i] == ERR_PTR(-EPROBE_DEFER))
|
||||||
|
|
|
@ -239,19 +239,13 @@ static void disable_unprepare_rcg_srcs(struct clk *curr, struct clk *new)
|
||||||
static unsigned long
|
static unsigned long
|
||||||
calc_rate(unsigned long rate, u32 m, u32 n, u32 mode, u32 hid_div)
|
calc_rate(unsigned long rate, u32 m, u32 n, u32 mode, u32 hid_div)
|
||||||
{
|
{
|
||||||
u64 tmp = rate;
|
if (hid_div)
|
||||||
|
rate = mult_frac(rate, 2, hid_div + 1);
|
||||||
|
|
||||||
if (hid_div) {
|
if (mode)
|
||||||
tmp *= 2;
|
rate = mult_frac(rate, m, n);
|
||||||
do_div(tmp, hid_div + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mode) {
|
return rate;
|
||||||
tmp *= m;
|
|
||||||
do_div(tmp, n);
|
|
||||||
}
|
|
||||||
|
|
||||||
return tmp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned long
|
static unsigned long
|
||||||
|
|
|
@ -431,7 +431,6 @@ static struct clk_fixed_factor gpll0_out_main_div2 = {
|
||||||
},
|
},
|
||||||
.num_parents = 1,
|
.num_parents = 1,
|
||||||
.ops = &clk_fixed_factor_ops,
|
.ops = &clk_fixed_factor_ops,
|
||||||
.flags = CLK_SET_RATE_PARENT,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -478,7 +477,6 @@ static struct clk_alpha_pll_postdiv gpll2 = {
|
||||||
},
|
},
|
||||||
.num_parents = 1,
|
.num_parents = 1,
|
||||||
.ops = &clk_alpha_pll_postdiv_ro_ops,
|
.ops = &clk_alpha_pll_postdiv_ro_ops,
|
||||||
.flags = CLK_SET_RATE_PARENT,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -511,7 +509,6 @@ static struct clk_alpha_pll_postdiv gpll4 = {
|
||||||
},
|
},
|
||||||
.num_parents = 1,
|
.num_parents = 1,
|
||||||
.ops = &clk_alpha_pll_postdiv_ro_ops,
|
.ops = &clk_alpha_pll_postdiv_ro_ops,
|
||||||
.flags = CLK_SET_RATE_PARENT,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -545,7 +542,6 @@ static struct clk_alpha_pll_postdiv gpll6 = {
|
||||||
},
|
},
|
||||||
.num_parents = 1,
|
.num_parents = 1,
|
||||||
.ops = &clk_alpha_pll_postdiv_ro_ops,
|
.ops = &clk_alpha_pll_postdiv_ro_ops,
|
||||||
.flags = CLK_SET_RATE_PARENT,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -559,7 +555,6 @@ static struct clk_fixed_factor gpll6_out_main_div2 = {
|
||||||
},
|
},
|
||||||
.num_parents = 1,
|
.num_parents = 1,
|
||||||
.ops = &clk_fixed_factor_ops,
|
.ops = &clk_fixed_factor_ops,
|
||||||
.flags = CLK_SET_RATE_PARENT,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -624,7 +619,6 @@ static struct clk_alpha_pll_postdiv nss_crypto_pll = {
|
||||||
},
|
},
|
||||||
.num_parents = 1,
|
.num_parents = 1,
|
||||||
.ops = &clk_alpha_pll_postdiv_ro_ops,
|
.ops = &clk_alpha_pll_postdiv_ro_ops,
|
||||||
.flags = CLK_SET_RATE_PARENT,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -294,6 +294,7 @@ static void __init tcb_setup_dual_chan(struct atmel_tc *tc, int mck_divisor_idx)
|
||||||
writel(mck_divisor_idx /* likely divide-by-8 */
|
writel(mck_divisor_idx /* likely divide-by-8 */
|
||||||
| ATMEL_TC_WAVE
|
| ATMEL_TC_WAVE
|
||||||
| ATMEL_TC_WAVESEL_UP /* free-run */
|
| ATMEL_TC_WAVESEL_UP /* free-run */
|
||||||
|
| ATMEL_TC_ASWTRG_SET /* TIOA0 rises at software trigger */
|
||||||
| ATMEL_TC_ACPA_SET /* TIOA0 rises at 0 */
|
| ATMEL_TC_ACPA_SET /* TIOA0 rises at 0 */
|
||||||
| ATMEL_TC_ACPC_CLEAR, /* (duty cycle 50%) */
|
| ATMEL_TC_ACPC_CLEAR, /* (duty cycle 50%) */
|
||||||
tcaddr + ATMEL_TC_REG(0, CMR));
|
tcaddr + ATMEL_TC_REG(0, CMR));
|
||||||
|
|
|
@ -473,12 +473,16 @@ static int __init mxc_timer_init_dt(struct device_node *np, enum imx_gpt_type t
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
imxtm->base = of_iomap(np, 0);
|
imxtm->base = of_iomap(np, 0);
|
||||||
if (!imxtm->base)
|
if (!imxtm->base) {
|
||||||
return -ENXIO;
|
ret = -ENXIO;
|
||||||
|
goto err_kfree;
|
||||||
|
}
|
||||||
|
|
||||||
imxtm->irq = irq_of_parse_and_map(np, 0);
|
imxtm->irq = irq_of_parse_and_map(np, 0);
|
||||||
if (imxtm->irq <= 0)
|
if (imxtm->irq <= 0) {
|
||||||
return -EINVAL;
|
ret = -EINVAL;
|
||||||
|
goto err_kfree;
|
||||||
|
}
|
||||||
|
|
||||||
imxtm->clk_ipg = of_clk_get_by_name(np, "ipg");
|
imxtm->clk_ipg = of_clk_get_by_name(np, "ipg");
|
||||||
|
|
||||||
|
@ -491,11 +495,15 @@ static int __init mxc_timer_init_dt(struct device_node *np, enum imx_gpt_type t
|
||||||
|
|
||||||
ret = _mxc_timer_init(imxtm);
|
ret = _mxc_timer_init(imxtm);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto err_kfree;
|
||||||
|
|
||||||
initialized = 1;
|
initialized = 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
err_kfree:
|
||||||
|
kfree(imxtm);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init imx1_timer_init_dt(struct device_node *np)
|
static int __init imx1_timer_init_dt(struct device_node *np)
|
||||||
|
|
|
@ -2071,7 +2071,7 @@ static void chtls_rx_ack(struct sock *sk, struct sk_buff *skb)
|
||||||
|
|
||||||
if (tp->snd_una != snd_una) {
|
if (tp->snd_una != snd_una) {
|
||||||
tp->snd_una = snd_una;
|
tp->snd_una = snd_una;
|
||||||
tp->rcv_tstamp = tcp_time_stamp(tp);
|
tp->rcv_tstamp = tcp_jiffies32;
|
||||||
if (tp->snd_una == tp->snd_nxt &&
|
if (tp->snd_una == tp->snd_nxt &&
|
||||||
!csk_flag_nochk(csk, CSK_TX_FAILOVER))
|
!csk_flag_nochk(csk, CSK_TX_FAILOVER))
|
||||||
csk_reset_flag(csk, CSK_TX_WAIT_IDLE);
|
csk_reset_flag(csk, CSK_TX_WAIT_IDLE);
|
||||||
|
|
|
@ -772,7 +772,6 @@ static void pxad_free_desc(struct virt_dma_desc *vd)
|
||||||
dma_addr_t dma;
|
dma_addr_t dma;
|
||||||
struct pxad_desc_sw *sw_desc = to_pxad_sw_desc(vd);
|
struct pxad_desc_sw *sw_desc = to_pxad_sw_desc(vd);
|
||||||
|
|
||||||
BUG_ON(sw_desc->nb_desc == 0);
|
|
||||||
for (i = sw_desc->nb_desc - 1; i >= 0; i--) {
|
for (i = sw_desc->nb_desc - 1; i >= 0; i--) {
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
dma = sw_desc->hw_desc[i - 1]->ddadr;
|
dma = sw_desc->hw_desc[i - 1]->ddadr;
|
||||||
|
|
|
@ -3685,6 +3685,7 @@ static int __init d40_probe(struct platform_device *pdev)
|
||||||
regulator_disable(base->lcpa_regulator);
|
regulator_disable(base->lcpa_regulator);
|
||||||
regulator_put(base->lcpa_regulator);
|
regulator_put(base->lcpa_regulator);
|
||||||
}
|
}
|
||||||
|
pm_runtime_disable(base->dev);
|
||||||
|
|
||||||
kfree(base->lcla_pool.alloc_map);
|
kfree(base->lcla_pool.alloc_map);
|
||||||
kfree(base->lookup_log_chans);
|
kfree(base->lookup_log_chans);
|
||||||
|
|
|
@ -520,7 +520,7 @@ static int stm32_mdma_set_xfer_param(struct stm32_mdma_chan *chan,
|
||||||
src_maxburst = chan->dma_config.src_maxburst;
|
src_maxburst = chan->dma_config.src_maxburst;
|
||||||
dst_maxburst = chan->dma_config.dst_maxburst;
|
dst_maxburst = chan->dma_config.dst_maxburst;
|
||||||
|
|
||||||
ccr = stm32_mdma_read(dmadev, STM32_MDMA_CCR(chan->id));
|
ccr = stm32_mdma_read(dmadev, STM32_MDMA_CCR(chan->id)) & ~STM32_MDMA_CCR_EN;
|
||||||
ctcr = stm32_mdma_read(dmadev, STM32_MDMA_CTCR(chan->id));
|
ctcr = stm32_mdma_read(dmadev, STM32_MDMA_CTCR(chan->id));
|
||||||
ctbr = stm32_mdma_read(dmadev, STM32_MDMA_CTBR(chan->id));
|
ctbr = stm32_mdma_read(dmadev, STM32_MDMA_CTBR(chan->id));
|
||||||
|
|
||||||
|
@ -948,7 +948,7 @@ stm32_mdma_prep_dma_memcpy(struct dma_chan *c, dma_addr_t dest, dma_addr_t src,
|
||||||
if (!desc)
|
if (!desc)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
ccr = stm32_mdma_read(dmadev, STM32_MDMA_CCR(chan->id));
|
ccr = stm32_mdma_read(dmadev, STM32_MDMA_CCR(chan->id)) & ~STM32_MDMA_CCR_EN;
|
||||||
ctcr = stm32_mdma_read(dmadev, STM32_MDMA_CTCR(chan->id));
|
ctcr = stm32_mdma_read(dmadev, STM32_MDMA_CTCR(chan->id));
|
||||||
ctbr = stm32_mdma_read(dmadev, STM32_MDMA_CTBR(chan->id));
|
ctbr = stm32_mdma_read(dmadev, STM32_MDMA_CTBR(chan->id));
|
||||||
cbndtr = stm32_mdma_read(dmadev, STM32_MDMA_CBNDTR(chan->id));
|
cbndtr = stm32_mdma_read(dmadev, STM32_MDMA_CBNDTR(chan->id));
|
||||||
|
|
|
@ -2303,7 +2303,7 @@ static int edma_probe(struct platform_device *pdev)
|
||||||
if (irq < 0 && node)
|
if (irq < 0 && node)
|
||||||
irq = irq_of_parse_and_map(node, 0);
|
irq = irq_of_parse_and_map(node, 0);
|
||||||
|
|
||||||
if (irq >= 0) {
|
if (irq > 0) {
|
||||||
irq_name = devm_kasprintf(dev, GFP_KERNEL, "%s_ccint",
|
irq_name = devm_kasprintf(dev, GFP_KERNEL, "%s_ccint",
|
||||||
dev_name(dev));
|
dev_name(dev));
|
||||||
ret = devm_request_irq(dev, irq, dma_irq_handler, 0, irq_name,
|
ret = devm_request_irq(dev, irq, dma_irq_handler, 0, irq_name,
|
||||||
|
@ -2319,7 +2319,7 @@ static int edma_probe(struct platform_device *pdev)
|
||||||
if (irq < 0 && node)
|
if (irq < 0 && node)
|
||||||
irq = irq_of_parse_and_map(node, 2);
|
irq = irq_of_parse_and_map(node, 2);
|
||||||
|
|
||||||
if (irq >= 0) {
|
if (irq > 0) {
|
||||||
irq_name = devm_kasprintf(dev, GFP_KERNEL, "%s_ccerrint",
|
irq_name = devm_kasprintf(dev, GFP_KERNEL, "%s_ccerrint",
|
||||||
dev_name(dev));
|
dev_name(dev));
|
||||||
ret = devm_request_irq(dev, irq, dma_ccerr_handler, 0, irq_name,
|
ret = devm_request_irq(dev, irq, dma_ccerr_handler, 0, irq_name,
|
||||||
|
|
|
@ -205,19 +205,6 @@ static int ti_sci_debugfs_create(struct platform_device *pdev,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ti_sci_debugfs_destroy() - clean up log debug file
|
|
||||||
* @pdev: platform device pointer
|
|
||||||
* @info: Pointer to SCI entity information
|
|
||||||
*/
|
|
||||||
static void ti_sci_debugfs_destroy(struct platform_device *pdev,
|
|
||||||
struct ti_sci_info *info)
|
|
||||||
{
|
|
||||||
if (IS_ERR(info->debug_region))
|
|
||||||
return;
|
|
||||||
|
|
||||||
debugfs_remove(info->d);
|
|
||||||
}
|
|
||||||
#else /* CONFIG_DEBUG_FS */
|
#else /* CONFIG_DEBUG_FS */
|
||||||
static inline int ti_sci_debugfs_create(struct platform_device *dev,
|
static inline int ti_sci_debugfs_create(struct platform_device *dev,
|
||||||
struct ti_sci_info *info)
|
struct ti_sci_info *info)
|
||||||
|
@ -1937,43 +1924,12 @@ out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ti_sci_remove(struct platform_device *pdev)
|
|
||||||
{
|
|
||||||
struct ti_sci_info *info;
|
|
||||||
struct device *dev = &pdev->dev;
|
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
of_platform_depopulate(dev);
|
|
||||||
|
|
||||||
info = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
if (info->nb.notifier_call)
|
|
||||||
unregister_restart_handler(&info->nb);
|
|
||||||
|
|
||||||
mutex_lock(&ti_sci_list_mutex);
|
|
||||||
if (info->users)
|
|
||||||
ret = -EBUSY;
|
|
||||||
else
|
|
||||||
list_del(&info->node);
|
|
||||||
mutex_unlock(&ti_sci_list_mutex);
|
|
||||||
|
|
||||||
if (!ret) {
|
|
||||||
ti_sci_debugfs_destroy(pdev, info);
|
|
||||||
|
|
||||||
/* Safe to free channels since no more users */
|
|
||||||
mbox_free_channel(info->chan_tx);
|
|
||||||
mbox_free_channel(info->chan_rx);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct platform_driver ti_sci_driver = {
|
static struct platform_driver ti_sci_driver = {
|
||||||
.probe = ti_sci_probe,
|
.probe = ti_sci_probe,
|
||||||
.remove = ti_sci_remove,
|
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "ti-sci",
|
.name = "ti-sci",
|
||||||
.of_match_table = of_match_ptr(ti_sci_of_match),
|
.of_match_table = of_match_ptr(ti_sci_of_match),
|
||||||
|
.suppress_bind_attrs = true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
module_platform_driver(ti_sci_driver);
|
module_platform_driver(ti_sci_driver);
|
||||||
|
|
|
@ -168,6 +168,7 @@ int amdgpu_bo_list_get(struct amdgpu_fpriv *fpriv, int id,
|
||||||
}
|
}
|
||||||
|
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
|
*result = NULL;
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -391,6 +391,9 @@ static ssize_t amdgpu_debugfs_regs_smc_read(struct file *f, char __user *buf,
|
||||||
ssize_t result = 0;
|
ssize_t result = 0;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
if (!adev->smc_rreg)
|
||||||
|
return -EPERM;
|
||||||
|
|
||||||
if (size & 0x3 || *pos & 0x3)
|
if (size & 0x3 || *pos & 0x3)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -430,6 +433,9 @@ static ssize_t amdgpu_debugfs_regs_smc_write(struct file *f, const char __user *
|
||||||
ssize_t result = 0;
|
ssize_t result = 0;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
if (!adev->smc_wreg)
|
||||||
|
return -EPERM;
|
||||||
|
|
||||||
if (size & 0x3 || *pos & 0x3)
|
if (size & 0x3 || *pos & 0x3)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
|
|
@ -281,7 +281,7 @@ uint32_t dc_stream_get_vblank_counter(const struct dc_stream_state *stream)
|
||||||
for (i = 0; i < MAX_PIPES; i++) {
|
for (i = 0; i < MAX_PIPES; i++) {
|
||||||
struct timing_generator *tg = res_ctx->pipe_ctx[i].stream_res.tg;
|
struct timing_generator *tg = res_ctx->pipe_ctx[i].stream_res.tg;
|
||||||
|
|
||||||
if (res_ctx->pipe_ctx[i].stream != stream)
|
if (res_ctx->pipe_ctx[i].stream != stream || !tg)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
return tg->funcs->get_frame_count(tg);
|
return tg->funcs->get_frame_count(tg);
|
||||||
|
@ -305,7 +305,7 @@ bool dc_stream_get_scanoutpos(const struct dc_stream_state *stream,
|
||||||
for (i = 0; i < MAX_PIPES; i++) {
|
for (i = 0; i < MAX_PIPES; i++) {
|
||||||
struct timing_generator *tg = res_ctx->pipe_ctx[i].stream_res.tg;
|
struct timing_generator *tg = res_ctx->pipe_ctx[i].stream_res.tg;
|
||||||
|
|
||||||
if (res_ctx->pipe_ctx[i].stream != stream)
|
if (res_ctx->pipe_ctx[i].stream != stream || !tg)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
tg->funcs->get_scanoutpos(tg,
|
tg->funcs->get_scanoutpos(tg,
|
||||||
|
|
|
@ -78,7 +78,7 @@ typedef struct _ATOM_PPLIB_THERMALCONTROLLER
|
||||||
typedef struct _ATOM_PPLIB_STATE
|
typedef struct _ATOM_PPLIB_STATE
|
||||||
{
|
{
|
||||||
UCHAR ucNonClockStateIndex;
|
UCHAR ucNonClockStateIndex;
|
||||||
UCHAR ucClockStateIndices[1]; // variable-sized
|
UCHAR ucClockStateIndices[]; // variable-sized
|
||||||
} ATOM_PPLIB_STATE;
|
} ATOM_PPLIB_STATE;
|
||||||
|
|
||||||
|
|
||||||
|
@ -473,7 +473,7 @@ typedef struct _ATOM_PPLIB_STATE_V2
|
||||||
/**
|
/**
|
||||||
* Driver will read the first ucNumDPMLevels in this array
|
* Driver will read the first ucNumDPMLevels in this array
|
||||||
*/
|
*/
|
||||||
UCHAR clockInfoIndex[1];
|
UCHAR clockInfoIndex[];
|
||||||
} ATOM_PPLIB_STATE_V2;
|
} ATOM_PPLIB_STATE_V2;
|
||||||
|
|
||||||
typedef struct _StateArray{
|
typedef struct _StateArray{
|
||||||
|
|
|
@ -164,7 +164,7 @@ typedef struct _ATOM_Tonga_State {
|
||||||
typedef struct _ATOM_Tonga_State_Array {
|
typedef struct _ATOM_Tonga_State_Array {
|
||||||
UCHAR ucRevId;
|
UCHAR ucRevId;
|
||||||
UCHAR ucNumEntries; /* Number of entries. */
|
UCHAR ucNumEntries; /* Number of entries. */
|
||||||
ATOM_Tonga_State entries[1]; /* Dynamically allocate entries. */
|
ATOM_Tonga_State entries[]; /* Dynamically allocate entries. */
|
||||||
} ATOM_Tonga_State_Array;
|
} ATOM_Tonga_State_Array;
|
||||||
|
|
||||||
typedef struct _ATOM_Tonga_MCLK_Dependency_Record {
|
typedef struct _ATOM_Tonga_MCLK_Dependency_Record {
|
||||||
|
@ -179,7 +179,7 @@ typedef struct _ATOM_Tonga_MCLK_Dependency_Record {
|
||||||
typedef struct _ATOM_Tonga_MCLK_Dependency_Table {
|
typedef struct _ATOM_Tonga_MCLK_Dependency_Table {
|
||||||
UCHAR ucRevId;
|
UCHAR ucRevId;
|
||||||
UCHAR ucNumEntries; /* Number of entries. */
|
UCHAR ucNumEntries; /* Number of entries. */
|
||||||
ATOM_Tonga_MCLK_Dependency_Record entries[1]; /* Dynamically allocate entries. */
|
ATOM_Tonga_MCLK_Dependency_Record entries[]; /* Dynamically allocate entries. */
|
||||||
} ATOM_Tonga_MCLK_Dependency_Table;
|
} ATOM_Tonga_MCLK_Dependency_Table;
|
||||||
|
|
||||||
typedef struct _ATOM_Tonga_SCLK_Dependency_Record {
|
typedef struct _ATOM_Tonga_SCLK_Dependency_Record {
|
||||||
|
@ -194,7 +194,7 @@ typedef struct _ATOM_Tonga_SCLK_Dependency_Record {
|
||||||
typedef struct _ATOM_Tonga_SCLK_Dependency_Table {
|
typedef struct _ATOM_Tonga_SCLK_Dependency_Table {
|
||||||
UCHAR ucRevId;
|
UCHAR ucRevId;
|
||||||
UCHAR ucNumEntries; /* Number of entries. */
|
UCHAR ucNumEntries; /* Number of entries. */
|
||||||
ATOM_Tonga_SCLK_Dependency_Record entries[1]; /* Dynamically allocate entries. */
|
ATOM_Tonga_SCLK_Dependency_Record entries[]; /* Dynamically allocate entries. */
|
||||||
} ATOM_Tonga_SCLK_Dependency_Table;
|
} ATOM_Tonga_SCLK_Dependency_Table;
|
||||||
|
|
||||||
typedef struct _ATOM_Polaris_SCLK_Dependency_Record {
|
typedef struct _ATOM_Polaris_SCLK_Dependency_Record {
|
||||||
|
@ -210,7 +210,7 @@ typedef struct _ATOM_Polaris_SCLK_Dependency_Record {
|
||||||
typedef struct _ATOM_Polaris_SCLK_Dependency_Table {
|
typedef struct _ATOM_Polaris_SCLK_Dependency_Table {
|
||||||
UCHAR ucRevId;
|
UCHAR ucRevId;
|
||||||
UCHAR ucNumEntries; /* Number of entries. */
|
UCHAR ucNumEntries; /* Number of entries. */
|
||||||
ATOM_Polaris_SCLK_Dependency_Record entries[1]; /* Dynamically allocate entries. */
|
ATOM_Polaris_SCLK_Dependency_Record entries[]; /* Dynamically allocate entries. */
|
||||||
} ATOM_Polaris_SCLK_Dependency_Table;
|
} ATOM_Polaris_SCLK_Dependency_Table;
|
||||||
|
|
||||||
typedef struct _ATOM_Tonga_PCIE_Record {
|
typedef struct _ATOM_Tonga_PCIE_Record {
|
||||||
|
@ -222,7 +222,7 @@ typedef struct _ATOM_Tonga_PCIE_Record {
|
||||||
typedef struct _ATOM_Tonga_PCIE_Table {
|
typedef struct _ATOM_Tonga_PCIE_Table {
|
||||||
UCHAR ucRevId;
|
UCHAR ucRevId;
|
||||||
UCHAR ucNumEntries; /* Number of entries. */
|
UCHAR ucNumEntries; /* Number of entries. */
|
||||||
ATOM_Tonga_PCIE_Record entries[1]; /* Dynamically allocate entries. */
|
ATOM_Tonga_PCIE_Record entries[]; /* Dynamically allocate entries. */
|
||||||
} ATOM_Tonga_PCIE_Table;
|
} ATOM_Tonga_PCIE_Table;
|
||||||
|
|
||||||
typedef struct _ATOM_Polaris10_PCIE_Record {
|
typedef struct _ATOM_Polaris10_PCIE_Record {
|
||||||
|
@ -235,7 +235,7 @@ typedef struct _ATOM_Polaris10_PCIE_Record {
|
||||||
typedef struct _ATOM_Polaris10_PCIE_Table {
|
typedef struct _ATOM_Polaris10_PCIE_Table {
|
||||||
UCHAR ucRevId;
|
UCHAR ucRevId;
|
||||||
UCHAR ucNumEntries; /* Number of entries. */
|
UCHAR ucNumEntries; /* Number of entries. */
|
||||||
ATOM_Polaris10_PCIE_Record entries[1]; /* Dynamically allocate entries. */
|
ATOM_Polaris10_PCIE_Record entries[]; /* Dynamically allocate entries. */
|
||||||
} ATOM_Polaris10_PCIE_Table;
|
} ATOM_Polaris10_PCIE_Table;
|
||||||
|
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ typedef struct _ATOM_Tonga_MM_Dependency_Record {
|
||||||
typedef struct _ATOM_Tonga_MM_Dependency_Table {
|
typedef struct _ATOM_Tonga_MM_Dependency_Table {
|
||||||
UCHAR ucRevId;
|
UCHAR ucRevId;
|
||||||
UCHAR ucNumEntries; /* Number of entries. */
|
UCHAR ucNumEntries; /* Number of entries. */
|
||||||
ATOM_Tonga_MM_Dependency_Record entries[1]; /* Dynamically allocate entries. */
|
ATOM_Tonga_MM_Dependency_Record entries[]; /* Dynamically allocate entries. */
|
||||||
} ATOM_Tonga_MM_Dependency_Table;
|
} ATOM_Tonga_MM_Dependency_Table;
|
||||||
|
|
||||||
typedef struct _ATOM_Tonga_Voltage_Lookup_Record {
|
typedef struct _ATOM_Tonga_Voltage_Lookup_Record {
|
||||||
|
@ -265,7 +265,7 @@ typedef struct _ATOM_Tonga_Voltage_Lookup_Record {
|
||||||
typedef struct _ATOM_Tonga_Voltage_Lookup_Table {
|
typedef struct _ATOM_Tonga_Voltage_Lookup_Table {
|
||||||
UCHAR ucRevId;
|
UCHAR ucRevId;
|
||||||
UCHAR ucNumEntries; /* Number of entries. */
|
UCHAR ucNumEntries; /* Number of entries. */
|
||||||
ATOM_Tonga_Voltage_Lookup_Record entries[1]; /* Dynamically allocate entries. */
|
ATOM_Tonga_Voltage_Lookup_Record entries[]; /* Dynamically allocate entries. */
|
||||||
} ATOM_Tonga_Voltage_Lookup_Table;
|
} ATOM_Tonga_Voltage_Lookup_Table;
|
||||||
|
|
||||||
typedef struct _ATOM_Tonga_Fan_Table {
|
typedef struct _ATOM_Tonga_Fan_Table {
|
||||||
|
|
|
@ -1331,14 +1331,14 @@ static struct drm_dp_mst_branch *get_mst_branch_device_by_guid_helper(
|
||||||
struct drm_dp_mst_branch *found_mstb;
|
struct drm_dp_mst_branch *found_mstb;
|
||||||
struct drm_dp_mst_port *port;
|
struct drm_dp_mst_port *port;
|
||||||
|
|
||||||
|
if (!mstb)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (memcmp(mstb->guid, guid, 16) == 0)
|
if (memcmp(mstb->guid, guid, 16) == 0)
|
||||||
return mstb;
|
return mstb;
|
||||||
|
|
||||||
|
|
||||||
list_for_each_entry(port, &mstb->ports, next) {
|
list_for_each_entry(port, &mstb->ports, next) {
|
||||||
if (!port->mstb)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
found_mstb = get_mst_branch_device_by_guid_helper(port->mstb, guid);
|
found_mstb = get_mst_branch_device_by_guid_helper(port->mstb, guid);
|
||||||
|
|
||||||
if (found_mstb)
|
if (found_mstb)
|
||||||
|
|
|
@ -4815,14 +4815,15 @@ restart_ih:
|
||||||
break;
|
break;
|
||||||
case 44: /* hdmi */
|
case 44: /* hdmi */
|
||||||
afmt_idx = src_data;
|
afmt_idx = src_data;
|
||||||
if (!(afmt_status[afmt_idx] & AFMT_AZ_FORMAT_WTRIG))
|
|
||||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
|
||||||
|
|
||||||
if (afmt_idx > 5) {
|
if (afmt_idx > 5) {
|
||||||
DRM_ERROR("Unhandled interrupt: %d %d\n",
|
DRM_ERROR("Unhandled interrupt: %d %d\n",
|
||||||
src_id, src_data);
|
src_id, src_data);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(afmt_status[afmt_idx] & AFMT_AZ_FORMAT_WTRIG))
|
||||||
|
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||||
|
|
||||||
afmt_status[afmt_idx] &= ~AFMT_AZ_FORMAT_WTRIG;
|
afmt_status[afmt_idx] &= ~AFMT_AZ_FORMAT_WTRIG;
|
||||||
queue_hdmi = true;
|
queue_hdmi = true;
|
||||||
DRM_DEBUG("IH: HDMI%d\n", afmt_idx + 1);
|
DRM_DEBUG("IH: HDMI%d\n", afmt_idx + 1);
|
||||||
|
|
|
@ -1156,6 +1156,7 @@ static int cdn_dp_probe(struct platform_device *pdev)
|
||||||
struct cdn_dp_device *dp;
|
struct cdn_dp_device *dp;
|
||||||
struct extcon_dev *extcon;
|
struct extcon_dev *extcon;
|
||||||
struct phy *phy;
|
struct phy *phy;
|
||||||
|
int ret;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
dp = devm_kzalloc(dev, sizeof(*dp), GFP_KERNEL);
|
dp = devm_kzalloc(dev, sizeof(*dp), GFP_KERNEL);
|
||||||
|
@ -1196,9 +1197,19 @@ static int cdn_dp_probe(struct platform_device *pdev)
|
||||||
mutex_init(&dp->lock);
|
mutex_init(&dp->lock);
|
||||||
dev_set_drvdata(dev, dp);
|
dev_set_drvdata(dev, dp);
|
||||||
|
|
||||||
cdn_dp_audio_codec_init(dp, dev);
|
ret = cdn_dp_audio_codec_init(dp, dev);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
return component_add(dev, &cdn_dp_component_ops);
|
ret = component_add(dev, &cdn_dp_component_ops);
|
||||||
|
if (ret)
|
||||||
|
goto err_audio_deinit;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
err_audio_deinit:
|
||||||
|
platform_device_unregister(dp->audio_pdev);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cdn_dp_remove(struct platform_device *pdev)
|
static int cdn_dp_remove(struct platform_device *pdev)
|
||||||
|
|
|
@ -1091,7 +1091,8 @@ static struct drm_crtc_state *vop_crtc_duplicate_state(struct drm_crtc *crtc)
|
||||||
if (WARN_ON(!crtc->state))
|
if (WARN_ON(!crtc->state))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
rockchip_state = kzalloc(sizeof(*rockchip_state), GFP_KERNEL);
|
rockchip_state = kmemdup(to_rockchip_crtc_state(crtc->state),
|
||||||
|
sizeof(*rockchip_state), GFP_KERNEL);
|
||||||
if (!rockchip_state)
|
if (!rockchip_state)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
|
@ -1163,8 +1163,6 @@ static unsigned int cp2112_gpio_irq_startup(struct irq_data *d)
|
||||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||||
struct cp2112_device *dev = gpiochip_get_data(gc);
|
struct cp2112_device *dev = gpiochip_get_data(gc);
|
||||||
|
|
||||||
INIT_DELAYED_WORK(&dev->gpio_poll_worker, cp2112_gpio_poll_callback);
|
|
||||||
|
|
||||||
if (!dev->gpio_poll) {
|
if (!dev->gpio_poll) {
|
||||||
dev->gpio_poll = true;
|
dev->gpio_poll = true;
|
||||||
schedule_delayed_work(&dev->gpio_poll_worker, 0);
|
schedule_delayed_work(&dev->gpio_poll_worker, 0);
|
||||||
|
@ -1245,6 +1243,7 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||||
struct cp2112_device *dev;
|
struct cp2112_device *dev;
|
||||||
u8 buf[3];
|
u8 buf[3];
|
||||||
struct cp2112_smbus_config_report config;
|
struct cp2112_smbus_config_report config;
|
||||||
|
struct gpio_irq_chip *girq;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
dev = devm_kzalloc(&hdev->dev, sizeof(*dev), GFP_KERNEL);
|
dev = devm_kzalloc(&hdev->dev, sizeof(*dev), GFP_KERNEL);
|
||||||
|
@ -1348,6 +1347,17 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||||
dev->gc.can_sleep = 1;
|
dev->gc.can_sleep = 1;
|
||||||
dev->gc.parent = &hdev->dev;
|
dev->gc.parent = &hdev->dev;
|
||||||
|
|
||||||
|
girq = &dev->gc.irq;
|
||||||
|
girq->chip = &cp2112_gpio_irqchip;
|
||||||
|
/* The event comes from the outside so no parent handler */
|
||||||
|
girq->parent_handler = NULL;
|
||||||
|
girq->num_parents = 0;
|
||||||
|
girq->parents = NULL;
|
||||||
|
girq->default_type = IRQ_TYPE_NONE;
|
||||||
|
girq->handler = handle_simple_irq;
|
||||||
|
|
||||||
|
INIT_DELAYED_WORK(&dev->gpio_poll_worker, cp2112_gpio_poll_callback);
|
||||||
|
|
||||||
ret = gpiochip_add_data(&dev->gc, dev);
|
ret = gpiochip_add_data(&dev->gc, dev);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
hid_err(hdev, "error registering gpio chip\n");
|
hid_err(hdev, "error registering gpio chip\n");
|
||||||
|
@ -1363,17 +1373,8 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||||
chmod_sysfs_attrs(hdev);
|
chmod_sysfs_attrs(hdev);
|
||||||
hid_hw_power(hdev, PM_HINT_NORMAL);
|
hid_hw_power(hdev, PM_HINT_NORMAL);
|
||||||
|
|
||||||
ret = gpiochip_irqchip_add(&dev->gc, &cp2112_gpio_irqchip, 0,
|
|
||||||
handle_simple_irq, IRQ_TYPE_NONE);
|
|
||||||
if (ret) {
|
|
||||||
dev_err(dev->gc.parent, "failed to add IRQ chip\n");
|
|
||||||
goto err_sysfs_remove;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
err_sysfs_remove:
|
|
||||||
sysfs_remove_group(&hdev->dev.kobj, &cp2112_attr_group);
|
|
||||||
err_gpiochip_remove:
|
err_gpiochip_remove:
|
||||||
gpiochip_remove(&dev->gc);
|
gpiochip_remove(&dev->gc);
|
||||||
err_free_i2c:
|
err_free_i2c:
|
||||||
|
|
|
@ -343,6 +343,7 @@
|
||||||
|
|
||||||
#define USB_VENDOR_ID_DELL 0x413c
|
#define USB_VENDOR_ID_DELL 0x413c
|
||||||
#define USB_DEVICE_ID_DELL_PIXART_USB_OPTICAL_MOUSE 0x301a
|
#define USB_DEVICE_ID_DELL_PIXART_USB_OPTICAL_MOUSE 0x301a
|
||||||
|
#define USB_DEVICE_ID_DELL_PRO_WIRELESS_KM5221W 0x4503
|
||||||
|
|
||||||
#define USB_VENDOR_ID_DELORME 0x1163
|
#define USB_VENDOR_ID_DELORME 0x1163
|
||||||
#define USB_DEVICE_ID_DELORME_EARTHMATE 0x0100
|
#define USB_DEVICE_ID_DELORME_EARTHMATE 0x0100
|
||||||
|
|
|
@ -68,6 +68,7 @@ static const struct hid_device_id hid_quirks[] = {
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_STRAFE), HID_QUIRK_NO_INIT_REPORTS | HID_QUIRK_ALWAYS_POLL },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_STRAFE), HID_QUIRK_NO_INIT_REPORTS | HID_QUIRK_ALWAYS_POLL },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_CREATIVE_SB_OMNI_SURROUND_51), HID_QUIRK_NOGET },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_CREATIVE_SB_OMNI_SURROUND_51), HID_QUIRK_NOGET },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_PRO_WIRELESS_KM5221W), HID_QUIRK_ALWAYS_POLL },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC), HID_QUIRK_NOGET },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC), HID_QUIRK_NOGET },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_2NES2SNES), HID_QUIRK_MULTI_INPUT },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_2NES2SNES), HID_QUIRK_MULTI_INPUT },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_4NES4SNES), HID_QUIRK_MULTI_INPUT },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_4NES4SNES), HID_QUIRK_MULTI_INPUT },
|
||||||
|
|
|
@ -54,7 +54,7 @@ MODULE_PARM_DESC(tjmax, "TjMax value in degrees Celsius");
|
||||||
#define PKG_SYSFS_ATTR_NO 1 /* Sysfs attribute for package temp */
|
#define PKG_SYSFS_ATTR_NO 1 /* Sysfs attribute for package temp */
|
||||||
#define BASE_SYSFS_ATTR_NO 2 /* Sysfs Base attr no for coretemp */
|
#define BASE_SYSFS_ATTR_NO 2 /* Sysfs Base attr no for coretemp */
|
||||||
#define NUM_REAL_CORES 128 /* Number of Real cores per cpu */
|
#define NUM_REAL_CORES 128 /* Number of Real cores per cpu */
|
||||||
#define CORETEMP_NAME_LENGTH 19 /* String Length of attrs */
|
#define CORETEMP_NAME_LENGTH 28 /* String Length of attrs */
|
||||||
#define MAX_CORE_ATTRS 4 /* Maximum no of basic attrs */
|
#define MAX_CORE_ATTRS 4 /* Maximum no of basic attrs */
|
||||||
#define TOTAL_ATTRS (MAX_CORE_ATTRS + 1)
|
#define TOTAL_ATTRS (MAX_CORE_ATTRS + 1)
|
||||||
#define MAX_CORE_DATA (NUM_REAL_CORES + BASE_SYSFS_ATTR_NO)
|
#define MAX_CORE_DATA (NUM_REAL_CORES + BASE_SYSFS_ATTR_NO)
|
||||||
|
|
|
@ -712,15 +712,11 @@ static int i801_block_transaction_byte_by_byte(struct i801_priv *priv,
|
||||||
return i801_check_post(priv, status);
|
return i801_check_post(priv, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (len == 1 && read_write == I2C_SMBUS_READ)
|
||||||
|
smbcmd |= SMBHSTCNT_LAST_BYTE;
|
||||||
|
outb_p(smbcmd | SMBHSTCNT_START, SMBHSTCNT(priv));
|
||||||
|
|
||||||
for (i = 1; i <= len; i++) {
|
for (i = 1; i <= len; i++) {
|
||||||
if (i == len && read_write == I2C_SMBUS_READ)
|
|
||||||
smbcmd |= SMBHSTCNT_LAST_BYTE;
|
|
||||||
outb_p(smbcmd, SMBHSTCNT(priv));
|
|
||||||
|
|
||||||
if (i == 1)
|
|
||||||
outb_p(inb(SMBHSTCNT(priv)) | SMBHSTCNT_START,
|
|
||||||
SMBHSTCNT(priv));
|
|
||||||
|
|
||||||
status = i801_wait_byte_done(priv);
|
status = i801_wait_byte_done(priv);
|
||||||
if (status)
|
if (status)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@ -743,9 +739,12 @@ static int i801_block_transaction_byte_by_byte(struct i801_priv *priv,
|
||||||
data->block[0] = len;
|
data->block[0] = len;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Retrieve/store value in SMBBLKDAT */
|
if (read_write == I2C_SMBUS_READ) {
|
||||||
if (read_write == I2C_SMBUS_READ)
|
|
||||||
data->block[i] = inb_p(SMBBLKDAT(priv));
|
data->block[i] = inb_p(SMBBLKDAT(priv));
|
||||||
|
if (i == len - 1)
|
||||||
|
outb_p(smbcmd | SMBHSTCNT_LAST_BYTE, SMBHSTCNT(priv));
|
||||||
|
}
|
||||||
|
|
||||||
if (read_write == I2C_SMBUS_WRITE && i+1 <= len)
|
if (read_write == I2C_SMBUS_WRITE && i+1 <= len)
|
||||||
outb_p(data->block[i+1], SMBBLKDAT(priv));
|
outb_p(data->block[i+1], SMBBLKDAT(priv));
|
||||||
|
|
||||||
|
|
|
@ -959,9 +959,10 @@ static int stm32f7_i2c_smbus_xfer_msg(struct stm32f7_i2c_dev *i2c_dev,
|
||||||
/* Configure PEC */
|
/* Configure PEC */
|
||||||
if ((flags & I2C_CLIENT_PEC) && f7_msg->size != I2C_SMBUS_QUICK) {
|
if ((flags & I2C_CLIENT_PEC) && f7_msg->size != I2C_SMBUS_QUICK) {
|
||||||
cr1 |= STM32F7_I2C_CR1_PECEN;
|
cr1 |= STM32F7_I2C_CR1_PECEN;
|
||||||
cr2 |= STM32F7_I2C_CR2_PECBYTE;
|
if (!f7_msg->read_write) {
|
||||||
if (!f7_msg->read_write)
|
cr2 |= STM32F7_I2C_CR2_PECBYTE;
|
||||||
f7_msg->count++;
|
f7_msg->count++;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
cr1 &= ~STM32F7_I2C_CR1_PECEN;
|
cr1 &= ~STM32F7_I2C_CR1_PECEN;
|
||||||
cr2 &= ~STM32F7_I2C_CR2_PECBYTE;
|
cr2 &= ~STM32F7_I2C_CR2_PECBYTE;
|
||||||
|
@ -1049,8 +1050,10 @@ static void stm32f7_i2c_smbus_rep_start(struct stm32f7_i2c_dev *i2c_dev)
|
||||||
f7_msg->stop = true;
|
f7_msg->stop = true;
|
||||||
|
|
||||||
/* Add one byte for PEC if needed */
|
/* Add one byte for PEC if needed */
|
||||||
if (cr1 & STM32F7_I2C_CR1_PECEN)
|
if (cr1 & STM32F7_I2C_CR1_PECEN) {
|
||||||
|
cr2 |= STM32F7_I2C_CR2_PECBYTE;
|
||||||
f7_msg->count++;
|
f7_msg->count++;
|
||||||
|
}
|
||||||
|
|
||||||
/* Set number of bytes to be transferred */
|
/* Set number of bytes to be transferred */
|
||||||
cr2 &= ~(STM32F7_I2C_CR2_NBYTES_MASK);
|
cr2 &= ~(STM32F7_I2C_CR2_NBYTES_MASK);
|
||||||
|
|
|
@ -202,6 +202,11 @@ static int p2wi_probe(struct platform_device *pdev)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (clk_freq == 0) {
|
||||||
|
dev_err(dev, "clock-frequency is set to 0 in DT\n");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (of_get_child_count(np) > 1) {
|
if (of_get_child_count(np) > 1) {
|
||||||
dev_err(dev, "P2WI only supports one slave device\n");
|
dev_err(dev, "P2WI only supports one slave device\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
|
@ -64,7 +64,7 @@ static int i2c_demux_activate_master(struct i2c_demux_pinctrl_priv *priv, u32 ne
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
adap = of_find_i2c_adapter_by_node(priv->chan[new_chan].parent_np);
|
adap = of_get_i2c_adapter_by_node(priv->chan[new_chan].parent_np);
|
||||||
if (!adap) {
|
if (!adap) {
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
goto err_with_revert;
|
goto err_with_revert;
|
||||||
|
|
|
@ -55,7 +55,7 @@ static struct i2c_adapter *mux_parent_adapter(struct device *dev)
|
||||||
dev_err(dev, "Cannot parse i2c-parent\n");
|
dev_err(dev, "Cannot parse i2c-parent\n");
|
||||||
return ERR_PTR(-ENODEV);
|
return ERR_PTR(-ENODEV);
|
||||||
}
|
}
|
||||||
parent = of_find_i2c_adapter_by_node(parent_np);
|
parent = of_get_i2c_adapter_by_node(parent_np);
|
||||||
of_node_put(parent_np);
|
of_node_put(parent_np);
|
||||||
if (!parent)
|
if (!parent)
|
||||||
return ERR_PTR(-EPROBE_DEFER);
|
return ERR_PTR(-EPROBE_DEFER);
|
||||||
|
|
|
@ -73,7 +73,7 @@ static struct i2c_adapter *i2c_mux_pinctrl_parent_adapter(struct device *dev)
|
||||||
dev_err(dev, "Cannot parse i2c-parent\n");
|
dev_err(dev, "Cannot parse i2c-parent\n");
|
||||||
return ERR_PTR(-ENODEV);
|
return ERR_PTR(-ENODEV);
|
||||||
}
|
}
|
||||||
parent = of_find_i2c_adapter_by_node(parent_np);
|
parent = of_get_i2c_adapter_by_node(parent_np);
|
||||||
of_node_put(parent_np);
|
of_node_put(parent_np);
|
||||||
if (!parent)
|
if (!parent)
|
||||||
return ERR_PTR(-EPROBE_DEFER);
|
return ERR_PTR(-EPROBE_DEFER);
|
||||||
|
|
|
@ -817,6 +817,12 @@ static int exynos_adc_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* leave out any TS related code if unreachable */
|
||||||
|
if (IS_REACHABLE(CONFIG_INPUT)) {
|
||||||
|
has_ts = of_property_read_bool(pdev->dev.of_node,
|
||||||
|
"has-touchscreen") || pdata;
|
||||||
|
}
|
||||||
|
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq < 0) {
|
if (irq < 0) {
|
||||||
dev_err(&pdev->dev, "no irq resource?\n");
|
dev_err(&pdev->dev, "no irq resource?\n");
|
||||||
|
@ -824,11 +830,15 @@ static int exynos_adc_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
info->irq = irq;
|
info->irq = irq;
|
||||||
|
|
||||||
irq = platform_get_irq(pdev, 1);
|
if (has_ts) {
|
||||||
if (irq == -EPROBE_DEFER)
|
irq = platform_get_irq(pdev, 1);
|
||||||
return irq;
|
if (irq == -EPROBE_DEFER)
|
||||||
|
return irq;
|
||||||
|
|
||||||
info->tsirq = irq;
|
info->tsirq = irq;
|
||||||
|
} else {
|
||||||
|
info->tsirq = -1;
|
||||||
|
}
|
||||||
|
|
||||||
info->dev = &pdev->dev;
|
info->dev = &pdev->dev;
|
||||||
|
|
||||||
|
@ -895,12 +905,6 @@ static int exynos_adc_probe(struct platform_device *pdev)
|
||||||
if (info->data->init_hw)
|
if (info->data->init_hw)
|
||||||
info->data->init_hw(info);
|
info->data->init_hw(info);
|
||||||
|
|
||||||
/* leave out any TS related code if unreachable */
|
|
||||||
if (IS_REACHABLE(CONFIG_INPUT)) {
|
|
||||||
has_ts = of_property_read_bool(pdev->dev.of_node,
|
|
||||||
"has-touchscreen") || pdata;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pdata)
|
if (pdata)
|
||||||
info->delay = pdata->delay;
|
info->delay = pdata->delay;
|
||||||
else
|
else
|
||||||
|
|
|
@ -152,7 +152,7 @@ int read_hfi1_efi_var(struct hfi1_devdata *dd, const char *kind,
|
||||||
unsigned long *size, void **return_data)
|
unsigned long *size, void **return_data)
|
||||||
{
|
{
|
||||||
char prefix_name[64];
|
char prefix_name[64];
|
||||||
char name[64];
|
char name[128];
|
||||||
int result;
|
int result;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <linux/bitfield.h>
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
|
@ -273,12 +274,6 @@ static u32 extract_speed(u16 linkstat)
|
||||||
return speed;
|
return speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* return the PCIe link speed from the given link status */
|
|
||||||
static u32 extract_width(u16 linkstat)
|
|
||||||
{
|
|
||||||
return (linkstat & PCI_EXP_LNKSTA_NLW) >> PCI_EXP_LNKSTA_NLW_SHIFT;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* read the link status and set dd->{lbus_width,lbus_speed,lbus_info} */
|
/* read the link status and set dd->{lbus_width,lbus_speed,lbus_info} */
|
||||||
static void update_lbus_info(struct hfi1_devdata *dd)
|
static void update_lbus_info(struct hfi1_devdata *dd)
|
||||||
{
|
{
|
||||||
|
@ -291,7 +286,7 @@ static void update_lbus_info(struct hfi1_devdata *dd)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dd->lbus_width = extract_width(linkstat);
|
dd->lbus_width = FIELD_GET(PCI_EXP_LNKSTA_NLW, linkstat);
|
||||||
dd->lbus_speed = extract_speed(linkstat);
|
dd->lbus_speed = extract_speed(linkstat);
|
||||||
snprintf(dd->lbus_info, sizeof(dd->lbus_info),
|
snprintf(dd->lbus_info, sizeof(dd->lbus_info),
|
||||||
"PCIe,%uMHz,x%u", dd->lbus_speed, dd->lbus_width);
|
"PCIe,%uMHz,x%u", dd->lbus_speed, dd->lbus_width);
|
||||||
|
|
|
@ -1750,6 +1750,7 @@ static int synaptics_create_intertouch(struct psmouse *psmouse,
|
||||||
psmouse_matches_pnp_id(psmouse, topbuttonpad_pnp_ids) &&
|
psmouse_matches_pnp_id(psmouse, topbuttonpad_pnp_ids) &&
|
||||||
!SYN_CAP_EXT_BUTTONS_STICK(info->ext_cap_10);
|
!SYN_CAP_EXT_BUTTONS_STICK(info->ext_cap_10);
|
||||||
const struct rmi_device_platform_data pdata = {
|
const struct rmi_device_platform_data pdata = {
|
||||||
|
.reset_delay_ms = 30,
|
||||||
.sensor_pdata = {
|
.sensor_pdata = {
|
||||||
.sensor_type = rmi_sensor_touchpad,
|
.sensor_type = rmi_sensor_touchpad,
|
||||||
.axis_align.flip_y = true,
|
.axis_align.flip_y = true,
|
||||||
|
|
|
@ -279,11 +279,11 @@ void rmi_unregister_function(struct rmi_function *fn)
|
||||||
|
|
||||||
device_del(&fn->dev);
|
device_del(&fn->dev);
|
||||||
of_node_put(fn->dev.of_node);
|
of_node_put(fn->dev.of_node);
|
||||||
put_device(&fn->dev);
|
|
||||||
|
|
||||||
for (i = 0; i < fn->num_of_irqs; i++)
|
for (i = 0; i < fn->num_of_irqs; i++)
|
||||||
irq_dispose_mapping(fn->irq[i]);
|
irq_dispose_mapping(fn->irq[i]);
|
||||||
|
|
||||||
|
put_device(&fn->dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -238,12 +238,29 @@ static void rmi_smb_clear_state(struct rmi_smb_xport *rmi_smb)
|
||||||
|
|
||||||
static int rmi_smb_enable_smbus_mode(struct rmi_smb_xport *rmi_smb)
|
static int rmi_smb_enable_smbus_mode(struct rmi_smb_xport *rmi_smb)
|
||||||
{
|
{
|
||||||
int retval;
|
struct i2c_client *client = rmi_smb->client;
|
||||||
|
int smbus_version;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* psmouse driver resets the controller, we only need to wait
|
||||||
|
* to give the firmware chance to fully reinitialize.
|
||||||
|
*/
|
||||||
|
if (rmi_smb->xport.pdata.reset_delay_ms)
|
||||||
|
msleep(rmi_smb->xport.pdata.reset_delay_ms);
|
||||||
|
|
||||||
/* we need to get the smbus version to activate the touchpad */
|
/* we need to get the smbus version to activate the touchpad */
|
||||||
retval = rmi_smb_get_version(rmi_smb);
|
smbus_version = rmi_smb_get_version(rmi_smb);
|
||||||
if (retval < 0)
|
if (smbus_version < 0)
|
||||||
return retval;
|
return smbus_version;
|
||||||
|
|
||||||
|
rmi_dbg(RMI_DEBUG_XPORT, &client->dev, "Smbus version is %d",
|
||||||
|
smbus_version);
|
||||||
|
|
||||||
|
if (smbus_version != 2 && smbus_version != 3) {
|
||||||
|
dev_err(&client->dev, "Unrecognized SMB version %d\n",
|
||||||
|
smbus_version);
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -256,11 +273,10 @@ static int rmi_smb_reset(struct rmi_transport_dev *xport, u16 reset_addr)
|
||||||
rmi_smb_clear_state(rmi_smb);
|
rmi_smb_clear_state(rmi_smb);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* we do not call the actual reset command, it has to be handled in
|
* We do not call the actual reset command, it has to be handled in
|
||||||
* PS/2 or there will be races between PS/2 and SMBus.
|
* PS/2 or there will be races between PS/2 and SMBus. PS/2 should
|
||||||
* PS/2 should ensure that a psmouse_reset is called before
|
* ensure that a psmouse_reset is called before initializing the
|
||||||
* intializing the device and after it has been removed to be in a known
|
* device and after it has been removed to be in a known state.
|
||||||
* state.
|
|
||||||
*/
|
*/
|
||||||
return rmi_smb_enable_smbus_mode(rmi_smb);
|
return rmi_smb_enable_smbus_mode(rmi_smb);
|
||||||
}
|
}
|
||||||
|
@ -276,7 +292,6 @@ static int rmi_smb_probe(struct i2c_client *client,
|
||||||
{
|
{
|
||||||
struct rmi_device_platform_data *pdata = dev_get_platdata(&client->dev);
|
struct rmi_device_platform_data *pdata = dev_get_platdata(&client->dev);
|
||||||
struct rmi_smb_xport *rmi_smb;
|
struct rmi_smb_xport *rmi_smb;
|
||||||
int smbus_version;
|
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
if (!pdata) {
|
if (!pdata) {
|
||||||
|
@ -315,18 +330,9 @@ static int rmi_smb_probe(struct i2c_client *client,
|
||||||
rmi_smb->xport.proto_name = "smb";
|
rmi_smb->xport.proto_name = "smb";
|
||||||
rmi_smb->xport.ops = &rmi_smb_ops;
|
rmi_smb->xport.ops = &rmi_smb_ops;
|
||||||
|
|
||||||
smbus_version = rmi_smb_get_version(rmi_smb);
|
error = rmi_smb_enable_smbus_mode(rmi_smb);
|
||||||
if (smbus_version < 0)
|
if (error)
|
||||||
return smbus_version;
|
return error;
|
||||||
|
|
||||||
rmi_dbg(RMI_DEBUG_XPORT, &client->dev, "Smbus version is %d",
|
|
||||||
smbus_version);
|
|
||||||
|
|
||||||
if (smbus_version != 2 && smbus_version != 3) {
|
|
||||||
dev_err(&client->dev, "Unrecognized SMB version %d\n",
|
|
||||||
smbus_version);
|
|
||||||
return -ENODEV;
|
|
||||||
}
|
|
||||||
|
|
||||||
i2c_set_clientdata(client, rmi_smb);
|
i2c_set_clientdata(client, rmi_smb);
|
||||||
|
|
||||||
|
|
|
@ -613,6 +613,14 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
|
||||||
},
|
},
|
||||||
.driver_data = (void *)(SERIO_QUIRK_NOMUX)
|
.driver_data = (void *)(SERIO_QUIRK_NOMUX)
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
/* Fujitsu Lifebook E5411 */
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU CLIENT COMPUTING LIMITED"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E5411"),
|
||||||
|
},
|
||||||
|
.driver_data = (void *)(SERIO_QUIRK_NOAUX)
|
||||||
|
},
|
||||||
{
|
{
|
||||||
/* Gigabyte M912 */
|
/* Gigabyte M912 */
|
||||||
.matches = {
|
.matches = {
|
||||||
|
|
|
@ -365,6 +365,7 @@ static const struct irq_domain_ops irq_exti_domain_ops = {
|
||||||
.map = irq_map_generic_chip,
|
.map = irq_map_generic_chip,
|
||||||
.alloc = stm32_exti_alloc,
|
.alloc = stm32_exti_alloc,
|
||||||
.free = stm32_exti_free,
|
.free = stm32_exti_free,
|
||||||
|
.xlate = irq_domain_xlate_twocell,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void stm32_irq_ack(struct irq_data *d)
|
static void stm32_irq_ack(struct irq_data *d)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue