mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
Merge 2c1e2dbb72 ("platform/x86: panasonic-laptop: Return errno correctly in show callback") into android14-6.1-lts
Steps on the way to 6.1.121 Change-Id: I608327eb0d84d7ed2f441989bf0fc3cf717b1976 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -243,7 +243,7 @@ ticks this GP)" indicates that this CPU has not taken any scheduling-clock
|
||||
interrupts during the current stalled grace period.
|
||||
|
||||
The "idle=" portion of the message prints the dyntick-idle state.
|
||||
The hex number before the first "/" is the low-order 12 bits of the
|
||||
The hex number before the first "/" is the low-order 16 bits of the
|
||||
dynticks counter, which will have an even-numbered value if the CPU
|
||||
is in dyntick-idle mode and an odd-numbered value otherwise. The hex
|
||||
number between the two "/"s is the value of the nesting, which will be
|
||||
|
||||
@@ -6,9 +6,12 @@ API to implement a new FPGA bridge
|
||||
|
||||
* struct fpga_bridge - The FPGA Bridge structure
|
||||
* struct fpga_bridge_ops - Low level Bridge driver ops
|
||||
* fpga_bridge_register() - Create and register a bridge
|
||||
* __fpga_bridge_register() - Create and register a bridge
|
||||
* fpga_bridge_unregister() - Unregister a bridge
|
||||
|
||||
The helper macro ``fpga_bridge_register()`` automatically sets
|
||||
the module that registers the FPGA bridge as the owner.
|
||||
|
||||
.. kernel-doc:: include/linux/fpga/fpga-bridge.h
|
||||
:functions: fpga_bridge
|
||||
|
||||
@@ -16,7 +19,7 @@ API to implement a new FPGA bridge
|
||||
:functions: fpga_bridge_ops
|
||||
|
||||
.. kernel-doc:: drivers/fpga/fpga-bridge.c
|
||||
:functions: fpga_bridge_register
|
||||
:functions: __fpga_bridge_register
|
||||
|
||||
.. kernel-doc:: drivers/fpga/fpga-bridge.c
|
||||
:functions: fpga_bridge_unregister
|
||||
|
||||
@@ -24,7 +24,8 @@ How to support a new FPGA device
|
||||
--------------------------------
|
||||
|
||||
To add another FPGA manager, write a driver that implements a set of ops. The
|
||||
probe function calls fpga_mgr_register() or fpga_mgr_register_full(), such as::
|
||||
probe function calls ``fpga_mgr_register()`` or ``fpga_mgr_register_full()``,
|
||||
such as::
|
||||
|
||||
static const struct fpga_manager_ops socfpga_fpga_ops = {
|
||||
.write_init = socfpga_fpga_ops_configure_init,
|
||||
@@ -69,10 +70,11 @@ probe function calls fpga_mgr_register() or fpga_mgr_register_full(), such as::
|
||||
}
|
||||
|
||||
Alternatively, the probe function could call one of the resource managed
|
||||
register functions, devm_fpga_mgr_register() or devm_fpga_mgr_register_full().
|
||||
When these functions are used, the parameter syntax is the same, but the call
|
||||
to fpga_mgr_unregister() should be removed. In the above example, the
|
||||
socfpga_fpga_remove() function would not be required.
|
||||
register functions, ``devm_fpga_mgr_register()`` or
|
||||
``devm_fpga_mgr_register_full()``. When these functions are used, the
|
||||
parameter syntax is the same, but the call to ``fpga_mgr_unregister()`` should be
|
||||
removed. In the above example, the ``socfpga_fpga_remove()`` function would not be
|
||||
required.
|
||||
|
||||
The ops will implement whatever device specific register writes are needed to
|
||||
do the programming sequence for this particular FPGA. These ops return 0 for
|
||||
@@ -125,15 +127,19 @@ API for implementing a new FPGA Manager driver
|
||||
* struct fpga_manager - the FPGA manager struct
|
||||
* struct fpga_manager_ops - Low level FPGA manager driver ops
|
||||
* struct fpga_manager_info - Parameter structure for fpga_mgr_register_full()
|
||||
* fpga_mgr_register_full() - Create and register an FPGA manager using the
|
||||
* __fpga_mgr_register_full() - Create and register an FPGA manager using the
|
||||
fpga_mgr_info structure to provide the full flexibility of options
|
||||
* fpga_mgr_register() - Create and register an FPGA manager using standard
|
||||
* __fpga_mgr_register() - Create and register an FPGA manager using standard
|
||||
arguments
|
||||
* devm_fpga_mgr_register_full() - Resource managed version of
|
||||
fpga_mgr_register_full()
|
||||
* devm_fpga_mgr_register() - Resource managed version of fpga_mgr_register()
|
||||
* __devm_fpga_mgr_register_full() - Resource managed version of
|
||||
__fpga_mgr_register_full()
|
||||
* __devm_fpga_mgr_register() - Resource managed version of __fpga_mgr_register()
|
||||
* fpga_mgr_unregister() - Unregister an FPGA manager
|
||||
|
||||
Helper macros ``fpga_mgr_register_full()``, ``fpga_mgr_register()``,
|
||||
``devm_fpga_mgr_register_full()``, and ``devm_fpga_mgr_register()`` are available
|
||||
to ease the registration.
|
||||
|
||||
.. kernel-doc:: include/linux/fpga/fpga-mgr.h
|
||||
:functions: fpga_mgr_states
|
||||
|
||||
@@ -147,16 +153,16 @@ API for implementing a new FPGA Manager driver
|
||||
:functions: fpga_manager_info
|
||||
|
||||
.. kernel-doc:: drivers/fpga/fpga-mgr.c
|
||||
:functions: fpga_mgr_register_full
|
||||
:functions: __fpga_mgr_register_full
|
||||
|
||||
.. kernel-doc:: drivers/fpga/fpga-mgr.c
|
||||
:functions: fpga_mgr_register
|
||||
:functions: __fpga_mgr_register
|
||||
|
||||
.. kernel-doc:: drivers/fpga/fpga-mgr.c
|
||||
:functions: devm_fpga_mgr_register_full
|
||||
:functions: __devm_fpga_mgr_register_full
|
||||
|
||||
.. kernel-doc:: drivers/fpga/fpga-mgr.c
|
||||
:functions: devm_fpga_mgr_register
|
||||
:functions: __devm_fpga_mgr_register
|
||||
|
||||
.. kernel-doc:: drivers/fpga/fpga-mgr.c
|
||||
:functions: fpga_mgr_unregister
|
||||
|
||||
@@ -153,7 +153,7 @@ Use seqcount_latch_t when the write side sections cannot be protected
|
||||
from interruption by readers. This is typically the case when the read
|
||||
side can be invoked from NMI handlers.
|
||||
|
||||
Check `raw_write_seqcount_latch()` for more information.
|
||||
Check `write_seqcount_latch()` for more information.
|
||||
|
||||
|
||||
.. _seqlock_t:
|
||||
|
||||
@@ -121,7 +121,7 @@ format, the Group Extension is set in the PS-field.
|
||||
|
||||
On the other hand, when using PDU1 format, the PS-field contains a so-called
|
||||
Destination Address, which is _not_ part of the PGN. When communicating a PGN
|
||||
from user space to kernel (or vice versa) and PDU2 format is used, the PS-field
|
||||
from user space to kernel (or vice versa) and PDU1 format is used, the PS-field
|
||||
of the PGN shall be set to zero. The Destination Address shall be set
|
||||
elsewhere.
|
||||
|
||||
|
||||
@@ -280,8 +280,8 @@
|
||||
|
||||
reg_dcdc5: dcdc5 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1425000>;
|
||||
regulator-max-microvolt = <1575000>;
|
||||
regulator-min-microvolt = <1450000>;
|
||||
regulator-max-microvolt = <1550000>;
|
||||
regulator-name = "vcc-dram";
|
||||
};
|
||||
|
||||
|
||||
@@ -411,7 +411,11 @@ ENTRY(secondary_startup)
|
||||
/*
|
||||
* Use the page tables supplied from __cpu_up.
|
||||
*/
|
||||
#ifdef CONFIG_XIP_KERNEL
|
||||
ldr r3, =(secondary_data + PLAT_PHYS_OFFSET - PAGE_OFFSET)
|
||||
#else
|
||||
adr_l r3, secondary_data
|
||||
#endif
|
||||
mov_l r12, __secondary_switched
|
||||
ldrd r4, r5, [r3, #0] @ get secondary_data.pgdir
|
||||
ARM_BE8(eor r4, r4, r5) @ Swap r5 and r4 in BE:
|
||||
|
||||
@@ -45,8 +45,15 @@ extern void secondary_startup(void);
|
||||
static int psci_boot_secondary(unsigned int cpu, struct task_struct *idle)
|
||||
{
|
||||
if (psci_ops.cpu_on)
|
||||
#ifdef CONFIG_XIP_KERNEL
|
||||
return psci_ops.cpu_on(cpu_logical_map(cpu),
|
||||
((phys_addr_t)(&secondary_startup)
|
||||
- XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR)
|
||||
+ CONFIG_XIP_PHYS_ADDR));
|
||||
#else
|
||||
return psci_ops.cpu_on(cpu_logical_map(cpu),
|
||||
virt_to_idmap(&secondary_startup));
|
||||
#endif
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,8 +84,15 @@ static void identity_mapping_add(pgd_t *pgd, const char *text_start,
|
||||
unsigned long addr, end;
|
||||
unsigned long next;
|
||||
|
||||
#ifdef CONFIG_XIP_KERNEL
|
||||
addr = (phys_addr_t)(text_start) - XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR)
|
||||
+ CONFIG_XIP_PHYS_ADDR;
|
||||
end = (phys_addr_t)(text_end) - XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR)
|
||||
+ CONFIG_XIP_PHYS_ADDR;
|
||||
#else
|
||||
addr = virt_to_idmap(text_start);
|
||||
end = virt_to_idmap(text_end);
|
||||
#endif
|
||||
pr_info("Setting up static identity map for 0x%lx - 0x%lx\n", addr, end);
|
||||
|
||||
prot |= PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AF;
|
||||
|
||||
@@ -43,6 +43,14 @@
|
||||
interrupts = <117 IRQ_TYPE_LEVEL_LOW>;
|
||||
reg = <0x2c>;
|
||||
hid-descr-addr = <0x0020>;
|
||||
/*
|
||||
* The trackpad needs a post-power-on delay of 100ms,
|
||||
* but at time of writing, the power supply for it on
|
||||
* this board is always on. The delay is therefore not
|
||||
* added to avoid impacting the readiness of the
|
||||
* trackpad.
|
||||
*/
|
||||
vdd-supply = <&mt6397_vgp6_reg>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,3 +29,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
i2c-scl-internal-delay-ns = <4100>;
|
||||
};
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
i2c-scl-internal-delay-ns = <25000>;
|
||||
|
||||
trackpad@2c {
|
||||
compatible = "hid-over-i2c";
|
||||
reg = <0x2c>;
|
||||
|
||||
@@ -30,3 +30,6 @@
|
||||
qcom,ath10k-calibration-variant = "GO_DAMU";
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
i2c-scl-internal-delay-ns = <20000>;
|
||||
};
|
||||
|
||||
@@ -25,3 +25,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
i2c-scl-internal-delay-ns = <21500>;
|
||||
};
|
||||
|
||||
@@ -8,40 +8,32 @@
|
||||
#include <arm/cros-ec-keyboard.dtsi>
|
||||
|
||||
/ {
|
||||
panel: panel {
|
||||
compatible = "auo,b116xw03";
|
||||
power-supply = <&pp3300_panel>;
|
||||
backlight = <&backlight_lcd0>;
|
||||
|
||||
port {
|
||||
panel_in: endpoint {
|
||||
remote-endpoint = <&anx7625_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
pp1200_mipibrdg: pp1200-mipibrdg {
|
||||
pp1000_mipibrdg: pp1000-mipibrdg {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "pp1200_mipibrdg";
|
||||
regulator-name = "pp1000_mipibrdg";
|
||||
regulator-min-microvolt = <1000000>;
|
||||
regulator-max-microvolt = <1000000>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pp1200_mipibrdg_en>;
|
||||
pinctrl-0 = <&pp1000_mipibrdg_en>;
|
||||
|
||||
enable-active-high;
|
||||
regulator-boot-on;
|
||||
|
||||
gpio = <&pio 54 GPIO_ACTIVE_HIGH>;
|
||||
vin-supply = <&pp1800_alw>;
|
||||
};
|
||||
|
||||
pp1800_mipibrdg: pp1800-mipibrdg {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "pp1800_mipibrdg";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pp1800_lcd_en>;
|
||||
pinctrl-0 = <&pp1800_mipibrdg_en>;
|
||||
|
||||
enable-active-high;
|
||||
regulator-boot-on;
|
||||
|
||||
gpio = <&pio 36 GPIO_ACTIVE_HIGH>;
|
||||
vin-supply = <&pp1800_alw>;
|
||||
};
|
||||
|
||||
pp3300_panel: pp3300-panel {
|
||||
@@ -56,18 +48,20 @@
|
||||
regulator-boot-on;
|
||||
|
||||
gpio = <&pio 35 GPIO_ACTIVE_HIGH>;
|
||||
vin-supply = <&pp3300_alw>;
|
||||
};
|
||||
|
||||
vddio_mipibrdg: vddio-mipibrdg {
|
||||
pp3300_mipibrdg: pp3300-mipibrdg {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vddio_mipibrdg";
|
||||
regulator-name = "pp3300_mipibrdg";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vddio_mipibrdg_en>;
|
||||
pinctrl-0 = <&pp3300_mipibrdg_en>;
|
||||
|
||||
enable-active-high;
|
||||
regulator-boot-on;
|
||||
|
||||
gpio = <&pio 37 GPIO_ACTIVE_HIGH>;
|
||||
vin-supply = <&pp3300_alw>;
|
||||
};
|
||||
|
||||
volume_buttons: volume-buttons {
|
||||
@@ -164,9 +158,9 @@
|
||||
panel_flags = <1>;
|
||||
enable-gpios = <&pio 45 GPIO_ACTIVE_HIGH>;
|
||||
reset-gpios = <&pio 73 GPIO_ACTIVE_HIGH>;
|
||||
vdd10-supply = <&pp1200_mipibrdg>;
|
||||
vdd10-supply = <&pp1000_mipibrdg>;
|
||||
vdd18-supply = <&pp1800_mipibrdg>;
|
||||
vdd33-supply = <&vddio_mipibrdg>;
|
||||
vdd33-supply = <&pp3300_mipibrdg>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
@@ -188,6 +182,20 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
aux-bus {
|
||||
panel: panel {
|
||||
compatible = "edp-panel";
|
||||
power-supply = <&pp3300_panel>;
|
||||
backlight = <&backlight_lcd0>;
|
||||
|
||||
port {
|
||||
panel_in: endpoint {
|
||||
remote-endpoint = <&anx7625_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -395,14 +403,14 @@
|
||||
"",
|
||||
"";
|
||||
|
||||
pp1200_mipibrdg_en: pp1200-mipibrdg-en {
|
||||
pp1000_mipibrdg_en: pp1000-mipibrdg-en {
|
||||
pins1 {
|
||||
pinmux = <PINMUX_GPIO54__FUNC_GPIO54>;
|
||||
output-low;
|
||||
};
|
||||
};
|
||||
|
||||
pp1800_lcd_en: pp1800-lcd-en {
|
||||
pp1800_mipibrdg_en: pp1800-mipibrdg-en {
|
||||
pins1 {
|
||||
pinmux = <PINMUX_GPIO36__FUNC_GPIO36>;
|
||||
output-low;
|
||||
@@ -464,7 +472,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
vddio_mipibrdg_en: vddio-mipibrdg-en {
|
||||
pp3300_mipibrdg_en: pp3300-mipibrdg-en {
|
||||
pins1 {
|
||||
pinmux = <PINMUX_GPIO37__FUNC_GPIO37>;
|
||||
output-low;
|
||||
|
||||
@@ -105,9 +105,9 @@
|
||||
clock-frequency = <400000>;
|
||||
vbus-supply = <&mt6358_vcn18_reg>;
|
||||
|
||||
eeprom@54 {
|
||||
eeprom@50 {
|
||||
compatible = "atmel,24c32";
|
||||
reg = <0x54>;
|
||||
reg = <0x50>;
|
||||
pagesize = <32>;
|
||||
vcc-supply = <&mt6358_vcn18_reg>;
|
||||
};
|
||||
|
||||
@@ -80,9 +80,9 @@
|
||||
clock-frequency = <400000>;
|
||||
vbus-supply = <&mt6358_vcn18_reg>;
|
||||
|
||||
eeprom@54 {
|
||||
eeprom@50 {
|
||||
compatible = "atmel,24c64";
|
||||
reg = <0x54>;
|
||||
reg = <0x50>;
|
||||
pagesize = <32>;
|
||||
vcc-supply = <&mt6358_vcn18_reg>;
|
||||
};
|
||||
|
||||
@@ -89,9 +89,9 @@
|
||||
clock-frequency = <400000>;
|
||||
vbus-supply = <&mt6358_vcn18_reg>;
|
||||
|
||||
eeprom@54 {
|
||||
eeprom@50 {
|
||||
compatible = "atmel,24c32";
|
||||
reg = <0x54>;
|
||||
reg = <0x50>;
|
||||
pagesize = <32>;
|
||||
vcc-supply = <&mt6358_vcn18_reg>;
|
||||
};
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
};
|
||||
|
||||
infracfg_ao: syscon@10001000 {
|
||||
compatible = "mediatek,mt8195-infracfg_ao", "syscon", "simple-mfd";
|
||||
compatible = "mediatek,mt8195-infracfg_ao", "syscon";
|
||||
reg = <0 0x10001000 0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
|
||||
@@ -315,6 +315,9 @@ SECTIONS
|
||||
__initdata_end = .;
|
||||
__init_end = .;
|
||||
|
||||
.data.rel.ro : { *(.data.rel.ro) }
|
||||
ASSERT(SIZEOF(.data.rel.ro) == 0, "Unexpected RELRO detected!")
|
||||
|
||||
_data = .;
|
||||
_sdata = .;
|
||||
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_ALIGN)
|
||||
@@ -368,9 +371,6 @@ SECTIONS
|
||||
*(.plt) *(.plt.*) *(.iplt) *(.igot .igot.plt)
|
||||
}
|
||||
ASSERT(SIZEOF(.plt) == 0, "Unexpected run-time procedure linkages detected!")
|
||||
|
||||
.data.rel.ro : { *(.data.rel.ro) }
|
||||
ASSERT(SIZEOF(.data.rel.ro) == 0, "Unexpected RELRO detected!")
|
||||
}
|
||||
|
||||
#include "image-vars.h"
|
||||
|
||||
@@ -102,10 +102,7 @@ static inline int pfn_valid(unsigned long pfn)
|
||||
extern int __virt_addr_valid(volatile void *kaddr);
|
||||
#define virt_addr_valid(kaddr) __virt_addr_valid((volatile void *)(kaddr))
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS \
|
||||
(VM_READ | VM_WRITE | \
|
||||
((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
@@ -93,8 +93,8 @@ struct pcc_regs {
|
||||
#define M147_SCC_B_ADDR 0xfffe3000
|
||||
#define M147_SCC_PCLK 5000000
|
||||
|
||||
#define MVME147_IRQ_SCSI_PORT (IRQ_USER+0x45)
|
||||
#define MVME147_IRQ_SCSI_DMA (IRQ_USER+0x46)
|
||||
#define MVME147_IRQ_SCSI_PORT (IRQ_USER + 5)
|
||||
#define MVME147_IRQ_SCSI_DMA (IRQ_USER + 6)
|
||||
|
||||
/* SCC interrupts, for MVME147 */
|
||||
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
#include <linux/string.h>
|
||||
#include <asm/setup.h>
|
||||
|
||||
extern void mvme16x_cons_write(struct console *co,
|
||||
const char *str, unsigned count);
|
||||
|
||||
#include "../mvme147/mvme147.h"
|
||||
#include "../mvme16x/mvme16x.h"
|
||||
|
||||
asmlinkage void __init debug_cons_nputs(const char *s, unsigned n);
|
||||
|
||||
@@ -22,7 +23,9 @@ static void __ref debug_cons_write(struct console *c,
|
||||
{
|
||||
#if !(defined(CONFIG_SUN3) || defined(CONFIG_M68000) || \
|
||||
defined(CONFIG_COLDFIRE))
|
||||
if (MACH_IS_MVME16x)
|
||||
if (MACH_IS_MVME147)
|
||||
mvme147_scc_write(c, s, n);
|
||||
else if (MACH_IS_MVME16x)
|
||||
mvme16x_cons_write(c, s, n);
|
||||
else
|
||||
debug_cons_nputs(s, n);
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <asm/mvme147hw.h>
|
||||
#include <asm/config.h>
|
||||
|
||||
#include "mvme147.h"
|
||||
|
||||
static void mvme147_get_model(char *model);
|
||||
extern void mvme147_sched_init(void);
|
||||
@@ -188,3 +189,32 @@ int mvme147_hwclk(int op, struct rtc_time *t)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void scc_delay(void)
|
||||
{
|
||||
__asm__ __volatile__ ("nop; nop;");
|
||||
}
|
||||
|
||||
static void scc_write(char ch)
|
||||
{
|
||||
do {
|
||||
scc_delay();
|
||||
} while (!(in_8(M147_SCC_A_ADDR) & BIT(2)));
|
||||
scc_delay();
|
||||
out_8(M147_SCC_A_ADDR, 8);
|
||||
scc_delay();
|
||||
out_8(M147_SCC_A_ADDR, ch);
|
||||
}
|
||||
|
||||
void mvme147_scc_write(struct console *co, const char *str, unsigned int count)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
while (count--) {
|
||||
if (*str == '\n')
|
||||
scc_write('\r');
|
||||
scc_write(*str++);
|
||||
}
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
6
arch/m68k/mvme147/mvme147.h
Normal file
6
arch/m68k/mvme147/mvme147.h
Normal file
@@ -0,0 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
struct console;
|
||||
|
||||
/* config.c */
|
||||
void mvme147_scc_write(struct console *co, const char *str, unsigned int count);
|
||||
@@ -38,6 +38,8 @@
|
||||
#include <asm/mvme16xhw.h>
|
||||
#include <asm/config.h>
|
||||
|
||||
#include "mvme16x.h"
|
||||
|
||||
extern t_bdid mvme_bdid;
|
||||
|
||||
static MK48T08ptr_t volatile rtc = (MK48T08ptr_t)MVME_RTC_BASE;
|
||||
|
||||
6
arch/m68k/mvme16x/mvme16x.h
Normal file
6
arch/m68k/mvme16x/mvme16x.h
Normal file
@@ -0,0 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
struct console;
|
||||
|
||||
/* config.c */
|
||||
void mvme16x_cons_write(struct console *co, const char *str, unsigned count);
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <asm/page.h>
|
||||
#include <linux/ftrace.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/xilinx_mb_manager.h>
|
||||
|
||||
#ifdef CONFIG_FUNCTION_TRACER
|
||||
extern void _mcount(void);
|
||||
@@ -46,3 +47,12 @@ extern void __udivsi3(void);
|
||||
EXPORT_SYMBOL(__udivsi3);
|
||||
extern void __umodsi3(void);
|
||||
EXPORT_SYMBOL(__umodsi3);
|
||||
|
||||
#ifdef CONFIG_MB_MANAGER
|
||||
extern void xmb_manager_register(uintptr_t phys_baseaddr, u32 cr_val,
|
||||
void (*callback)(void *data),
|
||||
void *priv, void (*reset_callback)(void *data));
|
||||
EXPORT_SYMBOL(xmb_manager_register);
|
||||
extern asmlinkage void xmb_inject_err(void);
|
||||
EXPORT_SYMBOL(xmb_inject_err);
|
||||
#endif
|
||||
|
||||
@@ -97,7 +97,7 @@ do { \
|
||||
} \
|
||||
} while (0)
|
||||
#else
|
||||
# define __sanitize_fcr31(next)
|
||||
# define __sanitize_fcr31(next) do { (void) (next); } while (0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -12,7 +12,7 @@ kapi-hdrs-y := $(kapi)/unistd_nr.h
|
||||
uapi-hdrs-y := $(uapi)/unistd_32.h
|
||||
uapi-hdrs-y += $(uapi)/unistd_64.h
|
||||
|
||||
targets += $(addprefix ../../../,$(gen-y) $(kapi-hdrs-y) $(uapi-hdrs-y))
|
||||
targets += $(addprefix ../../../../,$(gen-y) $(kapi-hdrs-y) $(uapi-hdrs-y))
|
||||
|
||||
PHONY += kapi uapi
|
||||
|
||||
|
||||
@@ -116,7 +116,10 @@ static inline bool amd_gart_present(void)
|
||||
|
||||
#define amd_nb_num(x) 0
|
||||
#define amd_nb_has_feature(x) false
|
||||
#define node_to_amd_nb(x) NULL
|
||||
static inline struct amd_northbridge *node_to_amd_nb(int node)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#define amd_gart_present(x) false
|
||||
|
||||
#endif
|
||||
|
||||
@@ -81,22 +81,4 @@ do { \
|
||||
|
||||
#include <asm-generic/barrier.h>
|
||||
|
||||
/*
|
||||
* Make previous memory operations globally visible before
|
||||
* a WRMSR.
|
||||
*
|
||||
* MFENCE makes writes visible, but only affects load/store
|
||||
* instructions. WRMSR is unfortunately not a load/store
|
||||
* instruction and is unaffected by MFENCE. The LFENCE ensures
|
||||
* that the WRMSR is not reordered.
|
||||
*
|
||||
* Most WRMSRs are full serializing instructions themselves and
|
||||
* do not require this barrier. This is only required for the
|
||||
* IA32_TSC_DEADLINE and X2APIC MSRs.
|
||||
*/
|
||||
static inline void weak_wrmsr_fence(void)
|
||||
{
|
||||
asm volatile("mfence; lfence" : : : "memory");
|
||||
}
|
||||
|
||||
#endif /* _ASM_X86_BARRIER_H */
|
||||
|
||||
@@ -311,6 +311,7 @@
|
||||
#define X86_FEATURE_SRSO (11*32+24) /* "" AMD BTB untrain RETs */
|
||||
#define X86_FEATURE_SRSO_ALIAS (11*32+25) /* "" AMD BTB untrain RETs through aliasing */
|
||||
#define X86_FEATURE_IBPB_ON_VMEXIT (11*32+26) /* "" Issue an IBPB only on VMEXIT */
|
||||
#define X86_FEATURE_APIC_MSRS_FENCE (11*32+27) /* "" IA32_TSC_DEADLINE and X2APIC MSRs need fencing */
|
||||
|
||||
/* Intel-defined CPU features, CPUID level 0x00000007:1 (EAX), word 12 */
|
||||
#define X86_FEATURE_AVX_VNNI (12*32+ 4) /* AVX VNNI instructions */
|
||||
|
||||
@@ -868,4 +868,22 @@ bool arch_is_platform_page(u64 paddr);
|
||||
|
||||
extern bool gds_ucode_mitigated(void);
|
||||
|
||||
/*
|
||||
* Make previous memory operations globally visible before
|
||||
* a WRMSR.
|
||||
*
|
||||
* MFENCE makes writes visible, but only affects load/store
|
||||
* instructions. WRMSR is unfortunately not a load/store
|
||||
* instruction and is unaffected by MFENCE. The LFENCE ensures
|
||||
* that the WRMSR is not reordered.
|
||||
*
|
||||
* Most WRMSRs are full serializing instructions themselves and
|
||||
* do not require this barrier. This is only required for the
|
||||
* IA32_TSC_DEADLINE and X2APIC MSRs.
|
||||
*/
|
||||
static inline void weak_wrmsr_fence(void)
|
||||
{
|
||||
alternative("mfence; lfence", "", ALT_NOT(X86_FEATURE_APIC_MSRS_FENCE));
|
||||
}
|
||||
|
||||
#endif /* _ASM_X86_PROCESSOR_H */
|
||||
|
||||
@@ -1133,6 +1133,9 @@ static void init_amd(struct cpuinfo_x86 *c)
|
||||
if (!cpu_has(c, X86_FEATURE_HYPERVISOR) &&
|
||||
cpu_has_amd_erratum(c, amd_erratum_1485))
|
||||
msr_set_bit(MSR_ZEN4_BP_CFG, MSR_ZEN4_BP_CFG_SHARED_BTB_FIX_BIT);
|
||||
|
||||
/* AMD CPUs don't need fencing after x2APIC/TSC_DEADLINE MSR writes. */
|
||||
clear_cpu_cap(c, X86_FEATURE_APIC_MSRS_FENCE);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
|
||||
@@ -1883,6 +1883,13 @@ static void identify_cpu(struct cpuinfo_x86 *c)
|
||||
c->apicid = apic->phys_pkg_id(c->initial_apicid, 0);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Set default APIC and TSC_DEADLINE MSR fencing flag. AMD and
|
||||
* Hygon will clear it in ->c_init() below.
|
||||
*/
|
||||
set_cpu_cap(c, X86_FEATURE_APIC_MSRS_FENCE);
|
||||
|
||||
/*
|
||||
* Vendor-specific initialization. In this section we
|
||||
* canonicalize the feature flags, meaning if there are
|
||||
|
||||
@@ -347,6 +347,9 @@ static void init_hygon(struct cpuinfo_x86 *c)
|
||||
set_cpu_bug(c, X86_BUG_SYSRET_SS_ATTRS);
|
||||
|
||||
check_null_seg_clears_base(c);
|
||||
|
||||
/* Hygon CPUs don't need fencing after x2APIC/TSC_DEADLINE MSR writes. */
|
||||
clear_cpu_cap(c, X86_FEATURE_APIC_MSRS_FENCE);
|
||||
}
|
||||
|
||||
static void cpu_detect_tlb_hygon(struct cpuinfo_x86 *c)
|
||||
|
||||
@@ -247,6 +247,14 @@ static bool bvec_split_segs(struct queue_limits *lim, const struct bio_vec *bv,
|
||||
return len > 0 || bv->bv_len > max_len;
|
||||
}
|
||||
|
||||
static unsigned int bio_split_alignment(struct bio *bio,
|
||||
const struct queue_limits *lim)
|
||||
{
|
||||
if (op_is_write(bio_op(bio)) && lim->zone_write_granularity)
|
||||
return lim->zone_write_granularity;
|
||||
return lim->logical_block_size;
|
||||
}
|
||||
|
||||
/**
|
||||
* bio_split_rw - split a bio in two bios
|
||||
* @bio: [in] bio to be split
|
||||
@@ -318,7 +326,7 @@ split:
|
||||
* split size so that each bio is properly block size aligned, even if
|
||||
* we do not use the full hardware limits.
|
||||
*/
|
||||
bytes = ALIGN_DOWN(bytes, lim->logical_block_size);
|
||||
bytes = ALIGN_DOWN(bytes, bio_split_alignment(bio, lim));
|
||||
|
||||
/*
|
||||
* Bio splitting may cause subtle trouble such as hang when doing sync
|
||||
|
||||
@@ -117,8 +117,10 @@ static int pcrypt_aead_encrypt(struct aead_request *req)
|
||||
err = padata_do_parallel(ictx->psenc, padata, &ctx->cb_cpu);
|
||||
if (!err)
|
||||
return -EINPROGRESS;
|
||||
if (err == -EBUSY)
|
||||
return -EAGAIN;
|
||||
if (err == -EBUSY) {
|
||||
/* try non-parallel mode */
|
||||
return crypto_aead_encrypt(creq);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
@@ -166,8 +168,10 @@ static int pcrypt_aead_decrypt(struct aead_request *req)
|
||||
err = padata_do_parallel(ictx->psdec, padata, &ctx->cb_cpu);
|
||||
if (!err)
|
||||
return -EINPROGRESS;
|
||||
if (err == -EBUSY)
|
||||
return -EAGAIN;
|
||||
if (err == -EBUSY) {
|
||||
/* try non-parallel mode */
|
||||
return crypto_aead_decrypt(creq);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ error:
|
||||
if (frame->virt_irq > 0)
|
||||
acpi_unregister_gsi(gtdt_frame->virtual_timer_interrupt);
|
||||
frame->virt_irq = 0;
|
||||
} while (i-- >= 0 && gtdt_frame--);
|
||||
} while (i-- > 0 && gtdt_frame--);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1136,7 +1136,6 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)
|
||||
return -EFAULT;
|
||||
}
|
||||
val = MASK_VAL_WRITE(reg, prev_val, val);
|
||||
val |= prev_val;
|
||||
}
|
||||
|
||||
switch (size) {
|
||||
|
||||
@@ -591,12 +591,16 @@ exit:
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
static struct lock_class_key regmap_irq_lock_class;
|
||||
static struct lock_class_key regmap_irq_request_class;
|
||||
|
||||
static int regmap_irq_map(struct irq_domain *h, unsigned int virq,
|
||||
irq_hw_number_t hw)
|
||||
{
|
||||
struct regmap_irq_chip_data *data = h->host_data;
|
||||
|
||||
irq_set_chip_data(virq, data);
|
||||
irq_set_lockdep_class(virq, ®map_irq_lock_class, ®map_irq_request_class);
|
||||
irq_set_chip(virq, &data->irq_chip);
|
||||
irq_set_nested_thread(virq, 1);
|
||||
irq_set_parent(virq, data->irq);
|
||||
|
||||
@@ -368,8 +368,40 @@ __setup("ramdisk_size=", ramdisk_size);
|
||||
* (should share code eventually).
|
||||
*/
|
||||
static LIST_HEAD(brd_devices);
|
||||
static DEFINE_MUTEX(brd_devices_mutex);
|
||||
static struct dentry *brd_debugfs_dir;
|
||||
|
||||
static struct brd_device *brd_find_or_alloc_device(int i)
|
||||
{
|
||||
struct brd_device *brd;
|
||||
|
||||
mutex_lock(&brd_devices_mutex);
|
||||
list_for_each_entry(brd, &brd_devices, brd_list) {
|
||||
if (brd->brd_number == i) {
|
||||
mutex_unlock(&brd_devices_mutex);
|
||||
return ERR_PTR(-EEXIST);
|
||||
}
|
||||
}
|
||||
|
||||
brd = kzalloc(sizeof(*brd), GFP_KERNEL);
|
||||
if (!brd) {
|
||||
mutex_unlock(&brd_devices_mutex);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
brd->brd_number = i;
|
||||
list_add_tail(&brd->brd_list, &brd_devices);
|
||||
mutex_unlock(&brd_devices_mutex);
|
||||
return brd;
|
||||
}
|
||||
|
||||
static void brd_free_device(struct brd_device *brd)
|
||||
{
|
||||
mutex_lock(&brd_devices_mutex);
|
||||
list_del(&brd->brd_list);
|
||||
mutex_unlock(&brd_devices_mutex);
|
||||
kfree(brd);
|
||||
}
|
||||
|
||||
static int brd_alloc(int i)
|
||||
{
|
||||
struct brd_device *brd;
|
||||
@@ -377,14 +409,9 @@ static int brd_alloc(int i)
|
||||
char buf[DISK_NAME_LEN];
|
||||
int err = -ENOMEM;
|
||||
|
||||
list_for_each_entry(brd, &brd_devices, brd_list)
|
||||
if (brd->brd_number == i)
|
||||
return -EEXIST;
|
||||
brd = kzalloc(sizeof(*brd), GFP_KERNEL);
|
||||
if (!brd)
|
||||
return -ENOMEM;
|
||||
brd->brd_number = i;
|
||||
list_add_tail(&brd->brd_list, &brd_devices);
|
||||
brd = brd_find_or_alloc_device(i);
|
||||
if (IS_ERR(brd))
|
||||
return PTR_ERR(brd);
|
||||
|
||||
spin_lock_init(&brd->brd_lock);
|
||||
INIT_RADIX_TREE(&brd->brd_pages, GFP_ATOMIC);
|
||||
@@ -428,8 +455,7 @@ static int brd_alloc(int i)
|
||||
out_cleanup_disk:
|
||||
put_disk(disk);
|
||||
out_free_dev:
|
||||
list_del(&brd->brd_list);
|
||||
kfree(brd);
|
||||
brd_free_device(brd);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -448,8 +474,7 @@ static void brd_cleanup(void)
|
||||
del_gendisk(brd->brd_disk);
|
||||
put_disk(brd->brd_disk);
|
||||
brd_free_pages(brd);
|
||||
list_del(&brd->brd_list);
|
||||
kfree(brd);
|
||||
brd_free_device(brd);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -476,16 +501,6 @@ static int __init brd_init(void)
|
||||
{
|
||||
int err, i;
|
||||
|
||||
brd_check_and_reset_par();
|
||||
|
||||
brd_debugfs_dir = debugfs_create_dir("ramdisk_pages", NULL);
|
||||
|
||||
for (i = 0; i < rd_nr; i++) {
|
||||
err = brd_alloc(i);
|
||||
if (err)
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
/*
|
||||
* brd module now has a feature to instantiate underlying device
|
||||
* structure on-demand, provided that there is an access dev node.
|
||||
@@ -501,11 +516,18 @@ static int __init brd_init(void)
|
||||
* dynamically.
|
||||
*/
|
||||
|
||||
brd_check_and_reset_par();
|
||||
|
||||
brd_debugfs_dir = debugfs_create_dir("ramdisk_pages", NULL);
|
||||
|
||||
if (__register_blkdev(RAMDISK_MAJOR, "ramdisk", brd_probe)) {
|
||||
err = -EIO;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
for (i = 0; i < rd_nr; i++)
|
||||
brd_alloc(i);
|
||||
|
||||
pr_info("brd: module loaded\n");
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -399,18 +399,18 @@ static bool virtblk_prep_rq_batch(struct request *req)
|
||||
return virtblk_prep_rq(req->mq_hctx, vblk, req, vbr) == BLK_STS_OK;
|
||||
}
|
||||
|
||||
static bool virtblk_add_req_batch(struct virtio_blk_vq *vq,
|
||||
static void virtblk_add_req_batch(struct virtio_blk_vq *vq,
|
||||
struct request **rqlist)
|
||||
{
|
||||
struct request *req;
|
||||
unsigned long flags;
|
||||
int err;
|
||||
bool kick;
|
||||
|
||||
spin_lock_irqsave(&vq->lock, flags);
|
||||
|
||||
while (!rq_list_empty(*rqlist)) {
|
||||
struct request *req = rq_list_pop(rqlist);
|
||||
while ((req = rq_list_pop(rqlist))) {
|
||||
struct virtblk_req *vbr = blk_mq_rq_to_pdu(req);
|
||||
int err;
|
||||
|
||||
err = virtblk_add_req(vq->vq, vbr);
|
||||
if (err) {
|
||||
@@ -423,37 +423,33 @@ static bool virtblk_add_req_batch(struct virtio_blk_vq *vq,
|
||||
kick = virtqueue_kick_prepare(vq->vq);
|
||||
spin_unlock_irqrestore(&vq->lock, flags);
|
||||
|
||||
return kick;
|
||||
if (kick)
|
||||
virtqueue_notify(vq->vq);
|
||||
}
|
||||
|
||||
static void virtio_queue_rqs(struct request **rqlist)
|
||||
{
|
||||
struct request *req, *next, *prev = NULL;
|
||||
struct request *submit_list = NULL;
|
||||
struct request *requeue_list = NULL;
|
||||
struct request **requeue_lastp = &requeue_list;
|
||||
struct virtio_blk_vq *vq = NULL;
|
||||
struct request *req;
|
||||
|
||||
rq_list_for_each_safe(rqlist, req, next) {
|
||||
struct virtio_blk_vq *vq = get_virtio_blk_vq(req->mq_hctx);
|
||||
bool kick;
|
||||
while ((req = rq_list_pop(rqlist))) {
|
||||
struct virtio_blk_vq *this_vq = get_virtio_blk_vq(req->mq_hctx);
|
||||
|
||||
if (!virtblk_prep_rq_batch(req)) {
|
||||
rq_list_move(rqlist, &requeue_list, req, prev);
|
||||
req = prev;
|
||||
if (!req)
|
||||
continue;
|
||||
}
|
||||
if (vq && vq != this_vq)
|
||||
virtblk_add_req_batch(vq, &submit_list);
|
||||
vq = this_vq;
|
||||
|
||||
if (!next || req->mq_hctx != next->mq_hctx) {
|
||||
req->rq_next = NULL;
|
||||
kick = virtblk_add_req_batch(vq, rqlist);
|
||||
if (kick)
|
||||
virtqueue_notify(vq->vq);
|
||||
|
||||
*rqlist = next;
|
||||
prev = NULL;
|
||||
} else
|
||||
prev = req;
|
||||
if (virtblk_prep_rq_batch(req))
|
||||
rq_list_add(&submit_list, req); /* reverse order */
|
||||
else
|
||||
rq_list_add_tail(&requeue_lastp, req);
|
||||
}
|
||||
|
||||
if (vq)
|
||||
virtblk_add_req_batch(vq, &submit_list);
|
||||
*rqlist = requeue_list;
|
||||
}
|
||||
|
||||
|
||||
@@ -390,7 +390,8 @@ config ARM_GT_INITIAL_PRESCALER_VAL
|
||||
This affects CPU_FREQ max delta from the initial frequency.
|
||||
|
||||
config ARM_TIMER_SP804
|
||||
bool "Support for Dual Timer SP804 module" if COMPILE_TEST
|
||||
bool "Support for Dual Timer SP804 module"
|
||||
depends on ARM || ARM64 || COMPILE_TEST
|
||||
depends on GENERIC_SCHED_CLOCK && HAVE_CLK
|
||||
select CLKSRC_MMIO
|
||||
select TIMER_OF if OF
|
||||
|
||||
@@ -688,9 +688,9 @@ subsys_initcall(dmtimer_percpu_timer_startup);
|
||||
|
||||
static int __init dmtimer_percpu_quirk_init(struct device_node *np, u32 pa)
|
||||
{
|
||||
struct device_node *arm_timer;
|
||||
struct device_node *arm_timer __free(device_node) =
|
||||
of_find_compatible_node(NULL, NULL, "arm,armv7-timer");
|
||||
|
||||
arm_timer = of_find_compatible_node(NULL, NULL, "arm,armv7-timer");
|
||||
if (of_device_is_available(arm_timer)) {
|
||||
pr_warn_once("ARM architected timer wrap issue i940 detected\n");
|
||||
return 0;
|
||||
|
||||
@@ -2415,6 +2415,7 @@ static int ahash_hmac_setkey(struct crypto_ahash *ahash, const u8 *key,
|
||||
|
||||
static int ahash_hmac_init(struct ahash_request *req)
|
||||
{
|
||||
int ret;
|
||||
struct iproc_reqctx_s *rctx = ahash_request_ctx(req);
|
||||
struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
|
||||
struct iproc_ctx_s *ctx = crypto_ahash_ctx(tfm);
|
||||
@@ -2424,7 +2425,9 @@ static int ahash_hmac_init(struct ahash_request *req)
|
||||
flow_log("ahash_hmac_init()\n");
|
||||
|
||||
/* init the context as a hash */
|
||||
ahash_init(req);
|
||||
ret = ahash_init(req);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (!spu_no_incr_hash(ctx)) {
|
||||
/* SPU-M can do incr hashing but needs sw for outer HMAC */
|
||||
|
||||
@@ -979,7 +979,7 @@ err:
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static void caam_rsa_set_priv_key_form(struct caam_rsa_ctx *ctx,
|
||||
static int caam_rsa_set_priv_key_form(struct caam_rsa_ctx *ctx,
|
||||
struct rsa_key *raw_key)
|
||||
{
|
||||
struct caam_rsa_key *rsa_key = &ctx->key;
|
||||
@@ -988,7 +988,7 @@ static void caam_rsa_set_priv_key_form(struct caam_rsa_ctx *ctx,
|
||||
|
||||
rsa_key->p = caam_read_raw_data(raw_key->p, &p_sz);
|
||||
if (!rsa_key->p)
|
||||
return;
|
||||
return -ENOMEM;
|
||||
rsa_key->p_sz = p_sz;
|
||||
|
||||
rsa_key->q = caam_read_raw_data(raw_key->q, &q_sz);
|
||||
@@ -1021,7 +1021,7 @@ static void caam_rsa_set_priv_key_form(struct caam_rsa_ctx *ctx,
|
||||
|
||||
rsa_key->priv_form = FORM3;
|
||||
|
||||
return;
|
||||
return 0;
|
||||
|
||||
free_dq:
|
||||
kfree_sensitive(rsa_key->dq);
|
||||
@@ -1035,6 +1035,7 @@ free_q:
|
||||
kfree_sensitive(rsa_key->q);
|
||||
free_p:
|
||||
kfree_sensitive(rsa_key->p);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static int caam_rsa_set_priv_key(struct crypto_akcipher *tfm, const void *key,
|
||||
@@ -1080,7 +1081,9 @@ static int caam_rsa_set_priv_key(struct crypto_akcipher *tfm, const void *key,
|
||||
rsa_key->e_sz = raw_key.e_sz;
|
||||
rsa_key->n_sz = raw_key.n_sz;
|
||||
|
||||
caam_rsa_set_priv_key_form(ctx, &raw_key);
|
||||
ret = caam_rsa_set_priv_key_form(ctx, &raw_key);
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -765,7 +765,7 @@ int caam_qi_init(struct platform_device *caam_pdev)
|
||||
|
||||
caam_debugfs_qi_init(ctrlpriv);
|
||||
|
||||
err = devm_add_action_or_reset(qidev, caam_qi_shutdown, ctrlpriv);
|
||||
err = devm_add_action_or_reset(qidev, caam_qi_shutdown, qidev);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ static void cpt_disable_cores(struct cpt_device *cpt, u64 coremask,
|
||||
dev_err(dev, "Cores still busy %llx", coremask);
|
||||
grp = cpt_read_csr64(cpt->reg_base,
|
||||
CPTX_PF_EXEC_BUSY(0));
|
||||
if (timeout--)
|
||||
if (!timeout--)
|
||||
break;
|
||||
|
||||
udelay(CSR_DELAY);
|
||||
@@ -302,6 +302,8 @@ static int cpt_ucode_load_fw(struct cpt_device *cpt, const u8 *fw, bool is_ae)
|
||||
|
||||
ret = do_cpt_init(cpt, mcode);
|
||||
if (ret) {
|
||||
dma_free_coherent(&cpt->pdev->dev, mcode->code_size,
|
||||
mcode->code, mcode->phys_base);
|
||||
dev_err(dev, "do_cpt_init failed with ret: %d\n", ret);
|
||||
goto fw_release;
|
||||
}
|
||||
@@ -394,7 +396,7 @@ static void cpt_disable_all_cores(struct cpt_device *cpt)
|
||||
dev_err(dev, "Cores still busy");
|
||||
grp = cpt_read_csr64(cpt->reg_base,
|
||||
CPTX_PF_EXEC_BUSY(0));
|
||||
if (timeout--)
|
||||
if (!timeout--)
|
||||
break;
|
||||
|
||||
udelay(CSR_DELAY);
|
||||
|
||||
@@ -1281,11 +1281,15 @@ static u32 hpre_get_hw_err_status(struct hisi_qm *qm)
|
||||
|
||||
static void hpre_clear_hw_err_status(struct hisi_qm *qm, u32 err_sts)
|
||||
{
|
||||
u32 nfe;
|
||||
|
||||
writel(err_sts, qm->io_base + HPRE_HAC_SOURCE_INT);
|
||||
nfe = hisi_qm_get_hw_info(qm, hpre_basic_info, HPRE_NFE_MASK_CAP, qm->cap_ver);
|
||||
writel(nfe, qm->io_base + HPRE_RAS_NFE_ENB);
|
||||
}
|
||||
|
||||
static void hpre_disable_error_report(struct hisi_qm *qm, u32 err_type)
|
||||
{
|
||||
u32 nfe_mask;
|
||||
|
||||
nfe_mask = hisi_qm_get_hw_info(qm, hpre_basic_info, HPRE_NFE_MASK_CAP, qm->cap_ver);
|
||||
writel(nfe_mask & (~err_type), qm->io_base + HPRE_RAS_NFE_ENB);
|
||||
}
|
||||
|
||||
static void hpre_open_axi_master_ooo(struct hisi_qm *qm)
|
||||
@@ -1299,6 +1303,27 @@ static void hpre_open_axi_master_ooo(struct hisi_qm *qm)
|
||||
qm->io_base + HPRE_AM_OOO_SHUTDOWN_ENB);
|
||||
}
|
||||
|
||||
static enum acc_err_result hpre_get_err_result(struct hisi_qm *qm)
|
||||
{
|
||||
u32 err_status;
|
||||
|
||||
err_status = hpre_get_hw_err_status(qm);
|
||||
if (err_status) {
|
||||
if (err_status & qm->err_info.ecc_2bits_mask)
|
||||
qm->err_status.is_dev_ecc_mbit = true;
|
||||
hpre_log_hw_error(qm, err_status);
|
||||
|
||||
if (err_status & qm->err_info.dev_reset_mask) {
|
||||
/* Disable the same error reporting until device is recovered. */
|
||||
hpre_disable_error_report(qm, err_status);
|
||||
return ACC_ERR_NEED_RESET;
|
||||
}
|
||||
hpre_clear_hw_err_status(qm, err_status);
|
||||
}
|
||||
|
||||
return ACC_ERR_RECOVERED;
|
||||
}
|
||||
|
||||
static void hpre_err_info_init(struct hisi_qm *qm)
|
||||
{
|
||||
struct hisi_qm_err_info *err_info = &qm->err_info;
|
||||
@@ -1325,12 +1350,12 @@ static const struct hisi_qm_err_ini hpre_err_ini = {
|
||||
.hw_err_disable = hpre_hw_error_disable,
|
||||
.get_dev_hw_err_status = hpre_get_hw_err_status,
|
||||
.clear_dev_hw_err_status = hpre_clear_hw_err_status,
|
||||
.log_dev_hw_err = hpre_log_hw_error,
|
||||
.open_axi_master_ooo = hpre_open_axi_master_ooo,
|
||||
.open_sva_prefetch = hpre_open_sva_prefetch,
|
||||
.close_sva_prefetch = hpre_close_sva_prefetch,
|
||||
.show_last_dfx_regs = hpre_show_last_dfx_regs,
|
||||
.err_info_init = hpre_err_info_init,
|
||||
.get_err_result = hpre_get_err_result,
|
||||
};
|
||||
|
||||
static int hpre_pf_probe_init(struct hpre *hpre)
|
||||
|
||||
@@ -281,12 +281,6 @@ enum vft_type {
|
||||
SHAPER_VFT,
|
||||
};
|
||||
|
||||
enum acc_err_result {
|
||||
ACC_ERR_NONE,
|
||||
ACC_ERR_NEED_RESET,
|
||||
ACC_ERR_RECOVERED,
|
||||
};
|
||||
|
||||
enum qm_alg_type {
|
||||
ALG_TYPE_0,
|
||||
ALG_TYPE_1,
|
||||
@@ -1503,22 +1497,25 @@ static void qm_log_hw_error(struct hisi_qm *qm, u32 error_status)
|
||||
|
||||
static enum acc_err_result qm_hw_error_handle_v2(struct hisi_qm *qm)
|
||||
{
|
||||
u32 error_status, tmp;
|
||||
u32 error_status;
|
||||
|
||||
/* read err sts */
|
||||
tmp = readl(qm->io_base + QM_ABNORMAL_INT_STATUS);
|
||||
error_status = qm->error_mask & tmp;
|
||||
|
||||
if (error_status) {
|
||||
error_status = qm_get_hw_error_status(qm);
|
||||
if (error_status & qm->error_mask) {
|
||||
if (error_status & QM_ECC_MBIT)
|
||||
qm->err_status.is_qm_ecc_mbit = true;
|
||||
|
||||
qm_log_hw_error(qm, error_status);
|
||||
if (error_status & qm->err_info.qm_reset_mask)
|
||||
if (error_status & qm->err_info.qm_reset_mask) {
|
||||
/* Disable the same error reporting until device is recovered. */
|
||||
writel(qm->err_info.nfe & (~error_status),
|
||||
qm->io_base + QM_RAS_NFE_ENABLE);
|
||||
return ACC_ERR_NEED_RESET;
|
||||
}
|
||||
|
||||
/* Clear error source if not need reset. */
|
||||
writel(error_status, qm->io_base + QM_ABNORMAL_INT_SOURCE);
|
||||
writel(qm->err_info.nfe, qm->io_base + QM_RAS_NFE_ENABLE);
|
||||
writel(qm->err_info.ce, qm->io_base + QM_RAS_CE_ENABLE);
|
||||
}
|
||||
|
||||
return ACC_ERR_RECOVERED;
|
||||
@@ -3868,30 +3865,12 @@ EXPORT_SYMBOL_GPL(hisi_qm_sriov_configure);
|
||||
|
||||
static enum acc_err_result qm_dev_err_handle(struct hisi_qm *qm)
|
||||
{
|
||||
u32 err_sts;
|
||||
|
||||
if (!qm->err_ini->get_dev_hw_err_status) {
|
||||
dev_err(&qm->pdev->dev, "Device doesn't support get hw error status!\n");
|
||||
if (!qm->err_ini->get_err_result) {
|
||||
dev_err(&qm->pdev->dev, "Device doesn't support reset!\n");
|
||||
return ACC_ERR_NONE;
|
||||
}
|
||||
|
||||
/* get device hardware error status */
|
||||
err_sts = qm->err_ini->get_dev_hw_err_status(qm);
|
||||
if (err_sts) {
|
||||
if (err_sts & qm->err_info.ecc_2bits_mask)
|
||||
qm->err_status.is_dev_ecc_mbit = true;
|
||||
|
||||
if (qm->err_ini->log_dev_hw_err)
|
||||
qm->err_ini->log_dev_hw_err(qm, err_sts);
|
||||
|
||||
if (err_sts & qm->err_info.dev_reset_mask)
|
||||
return ACC_ERR_NEED_RESET;
|
||||
|
||||
if (qm->err_ini->clear_dev_hw_err_status)
|
||||
qm->err_ini->clear_dev_hw_err_status(qm, err_sts);
|
||||
}
|
||||
|
||||
return ACC_ERR_RECOVERED;
|
||||
return qm->err_ini->get_err_result(qm);
|
||||
}
|
||||
|
||||
static enum acc_err_result qm_process_dev_error(struct hisi_qm *qm)
|
||||
|
||||
@@ -1008,11 +1008,15 @@ static u32 sec_get_hw_err_status(struct hisi_qm *qm)
|
||||
|
||||
static void sec_clear_hw_err_status(struct hisi_qm *qm, u32 err_sts)
|
||||
{
|
||||
u32 nfe;
|
||||
|
||||
writel(err_sts, qm->io_base + SEC_CORE_INT_SOURCE);
|
||||
nfe = hisi_qm_get_hw_info(qm, sec_basic_info, SEC_NFE_MASK_CAP, qm->cap_ver);
|
||||
writel(nfe, qm->io_base + SEC_RAS_NFE_REG);
|
||||
}
|
||||
|
||||
static void sec_disable_error_report(struct hisi_qm *qm, u32 err_type)
|
||||
{
|
||||
u32 nfe_mask;
|
||||
|
||||
nfe_mask = hisi_qm_get_hw_info(qm, sec_basic_info, SEC_NFE_MASK_CAP, qm->cap_ver);
|
||||
writel(nfe_mask & (~err_type), qm->io_base + SEC_RAS_NFE_REG);
|
||||
}
|
||||
|
||||
static void sec_open_axi_master_ooo(struct hisi_qm *qm)
|
||||
@@ -1024,6 +1028,27 @@ static void sec_open_axi_master_ooo(struct hisi_qm *qm)
|
||||
writel(val | SEC_AXI_SHUTDOWN_ENABLE, qm->io_base + SEC_CONTROL_REG);
|
||||
}
|
||||
|
||||
static enum acc_err_result sec_get_err_result(struct hisi_qm *qm)
|
||||
{
|
||||
u32 err_status;
|
||||
|
||||
err_status = sec_get_hw_err_status(qm);
|
||||
if (err_status) {
|
||||
if (err_status & qm->err_info.ecc_2bits_mask)
|
||||
qm->err_status.is_dev_ecc_mbit = true;
|
||||
sec_log_hw_error(qm, err_status);
|
||||
|
||||
if (err_status & qm->err_info.dev_reset_mask) {
|
||||
/* Disable the same error reporting until device is recovered. */
|
||||
sec_disable_error_report(qm, err_status);
|
||||
return ACC_ERR_NEED_RESET;
|
||||
}
|
||||
sec_clear_hw_err_status(qm, err_status);
|
||||
}
|
||||
|
||||
return ACC_ERR_RECOVERED;
|
||||
}
|
||||
|
||||
static void sec_err_info_init(struct hisi_qm *qm)
|
||||
{
|
||||
struct hisi_qm_err_info *err_info = &qm->err_info;
|
||||
@@ -1050,12 +1075,12 @@ static const struct hisi_qm_err_ini sec_err_ini = {
|
||||
.hw_err_disable = sec_hw_error_disable,
|
||||
.get_dev_hw_err_status = sec_get_hw_err_status,
|
||||
.clear_dev_hw_err_status = sec_clear_hw_err_status,
|
||||
.log_dev_hw_err = sec_log_hw_error,
|
||||
.open_axi_master_ooo = sec_open_axi_master_ooo,
|
||||
.open_sva_prefetch = sec_open_sva_prefetch,
|
||||
.close_sva_prefetch = sec_close_sva_prefetch,
|
||||
.show_last_dfx_regs = sec_show_last_dfx_regs,
|
||||
.err_info_init = sec_err_info_init,
|
||||
.get_err_result = sec_get_err_result,
|
||||
};
|
||||
|
||||
static int sec_pf_probe_init(struct sec_dev *sec)
|
||||
|
||||
@@ -1069,11 +1069,15 @@ static u32 hisi_zip_get_hw_err_status(struct hisi_qm *qm)
|
||||
|
||||
static void hisi_zip_clear_hw_err_status(struct hisi_qm *qm, u32 err_sts)
|
||||
{
|
||||
u32 nfe;
|
||||
|
||||
writel(err_sts, qm->io_base + HZIP_CORE_INT_SOURCE);
|
||||
nfe = hisi_qm_get_hw_info(qm, zip_basic_cap_info, ZIP_NFE_MASK_CAP, qm->cap_ver);
|
||||
writel(nfe, qm->io_base + HZIP_CORE_INT_RAS_NFE_ENB);
|
||||
}
|
||||
|
||||
static void hisi_zip_disable_error_report(struct hisi_qm *qm, u32 err_type)
|
||||
{
|
||||
u32 nfe_mask;
|
||||
|
||||
nfe_mask = hisi_qm_get_hw_info(qm, zip_basic_cap_info, ZIP_NFE_MASK_CAP, qm->cap_ver);
|
||||
writel(nfe_mask & (~err_type), qm->io_base + HZIP_CORE_INT_RAS_NFE_ENB);
|
||||
}
|
||||
|
||||
static void hisi_zip_open_axi_master_ooo(struct hisi_qm *qm)
|
||||
@@ -1103,6 +1107,27 @@ static void hisi_zip_close_axi_master_ooo(struct hisi_qm *qm)
|
||||
qm->io_base + HZIP_CORE_INT_SET);
|
||||
}
|
||||
|
||||
static enum acc_err_result hisi_zip_get_err_result(struct hisi_qm *qm)
|
||||
{
|
||||
u32 err_status;
|
||||
|
||||
err_status = hisi_zip_get_hw_err_status(qm);
|
||||
if (err_status) {
|
||||
if (err_status & qm->err_info.ecc_2bits_mask)
|
||||
qm->err_status.is_dev_ecc_mbit = true;
|
||||
hisi_zip_log_hw_error(qm, err_status);
|
||||
|
||||
if (err_status & qm->err_info.dev_reset_mask) {
|
||||
/* Disable the same error reporting until device is recovered. */
|
||||
hisi_zip_disable_error_report(qm, err_status);
|
||||
return ACC_ERR_NEED_RESET;
|
||||
}
|
||||
hisi_zip_clear_hw_err_status(qm, err_status);
|
||||
}
|
||||
|
||||
return ACC_ERR_RECOVERED;
|
||||
}
|
||||
|
||||
static void hisi_zip_err_info_init(struct hisi_qm *qm)
|
||||
{
|
||||
struct hisi_qm_err_info *err_info = &qm->err_info;
|
||||
@@ -1130,13 +1155,13 @@ static const struct hisi_qm_err_ini hisi_zip_err_ini = {
|
||||
.hw_err_disable = hisi_zip_hw_error_disable,
|
||||
.get_dev_hw_err_status = hisi_zip_get_hw_err_status,
|
||||
.clear_dev_hw_err_status = hisi_zip_clear_hw_err_status,
|
||||
.log_dev_hw_err = hisi_zip_log_hw_error,
|
||||
.open_axi_master_ooo = hisi_zip_open_axi_master_ooo,
|
||||
.close_axi_master_ooo = hisi_zip_close_axi_master_ooo,
|
||||
.open_sva_prefetch = hisi_zip_open_sva_prefetch,
|
||||
.close_sva_prefetch = hisi_zip_close_sva_prefetch,
|
||||
.show_last_dfx_regs = hisi_zip_show_last_dfx_regs,
|
||||
.err_info_init = hisi_zip_err_info_init,
|
||||
.get_err_result = hisi_zip_get_err_result,
|
||||
};
|
||||
|
||||
static int hisi_zip_pf_probe_init(struct hisi_zip *hisi_zip)
|
||||
|
||||
@@ -2119,7 +2119,7 @@ static int safexcel_xcbcmac_cra_init(struct crypto_tfm *tfm)
|
||||
|
||||
safexcel_ahash_cra_init(tfm);
|
||||
ctx->aes = kmalloc(sizeof(*ctx->aes), GFP_KERNEL);
|
||||
return PTR_ERR_OR_ZERO(ctx->aes);
|
||||
return ctx->aes == NULL ? -ENOMEM : 0;
|
||||
}
|
||||
|
||||
static void safexcel_xcbcmac_cra_exit(struct crypto_tfm *tfm)
|
||||
|
||||
@@ -90,10 +90,6 @@ void adf_exit_arb(struct adf_accel_dev *accel_dev)
|
||||
|
||||
hw_data->get_arb_info(&info);
|
||||
|
||||
/* Reset arbiter configuration */
|
||||
for (i = 0; i < ADF_ARB_NUM; i++)
|
||||
WRITE_CSR_ARB_SARCONFIG(csr, arb_off, i, 0);
|
||||
|
||||
/* Unmap worker threads to service arbiters */
|
||||
for (i = 0; i < hw_data->num_engines; i++)
|
||||
WRITE_CSR_ARB_WT2SAM(csr, arb_off, wt_off, i, 0);
|
||||
|
||||
@@ -180,7 +180,7 @@ static void bluefield_edac_check(struct mem_ctl_info *mci)
|
||||
static void bluefield_edac_init_dimms(struct mem_ctl_info *mci)
|
||||
{
|
||||
struct bluefield_edac_priv *priv = mci->pvt_info;
|
||||
int mem_ctrl_idx = mci->mc_idx;
|
||||
u64 mem_ctrl_idx = mci->mc_idx;
|
||||
struct dimm_info *dimm;
|
||||
u64 smc_info, smc_arg;
|
||||
int is_empty = 1, i;
|
||||
|
||||
@@ -329,21 +329,25 @@ static void fsl_mc_check(struct mem_ctl_info *mci)
|
||||
* TODO: Add support for 32-bit wide buses
|
||||
*/
|
||||
if ((err_detect & DDR_EDE_SBE) && (bus_width == 64)) {
|
||||
u64 cap = (u64)cap_high << 32 | cap_low;
|
||||
u32 s = syndrome;
|
||||
|
||||
sbe_ecc_decode(cap_high, cap_low, syndrome,
|
||||
&bad_data_bit, &bad_ecc_bit);
|
||||
|
||||
if (bad_data_bit != -1)
|
||||
fsl_mc_printk(mci, KERN_ERR,
|
||||
"Faulty Data bit: %d\n", bad_data_bit);
|
||||
if (bad_ecc_bit != -1)
|
||||
fsl_mc_printk(mci, KERN_ERR,
|
||||
"Faulty ECC bit: %d\n", bad_ecc_bit);
|
||||
if (bad_data_bit >= 0) {
|
||||
fsl_mc_printk(mci, KERN_ERR, "Faulty Data bit: %d\n", bad_data_bit);
|
||||
cap ^= 1ULL << bad_data_bit;
|
||||
}
|
||||
|
||||
if (bad_ecc_bit >= 0) {
|
||||
fsl_mc_printk(mci, KERN_ERR, "Faulty ECC bit: %d\n", bad_ecc_bit);
|
||||
s ^= 1 << bad_ecc_bit;
|
||||
}
|
||||
|
||||
fsl_mc_printk(mci, KERN_ERR,
|
||||
"Expected Data / ECC:\t%#8.8x_%08x / %#2.2x\n",
|
||||
cap_high ^ (1 << (bad_data_bit - 32)),
|
||||
cap_low ^ (1 << bad_data_bit),
|
||||
syndrome ^ (1 << bad_ecc_bit));
|
||||
upper_32_bits(cap), lower_32_bits(cap), s);
|
||||
}
|
||||
|
||||
fsl_mc_printk(mci, KERN_ERR,
|
||||
|
||||
@@ -1075,6 +1075,7 @@ static int igen6_register_mci(int mc, u64 mchbar, struct pci_dev *pdev)
|
||||
imc->mci = mci;
|
||||
return 0;
|
||||
fail3:
|
||||
mci->pvt_info = NULL;
|
||||
kfree(mci->ctl_name);
|
||||
fail2:
|
||||
edac_mc_free(mci);
|
||||
@@ -1099,6 +1100,7 @@ static void igen6_unregister_mcis(void)
|
||||
|
||||
edac_mc_del_mc(mci->pdev);
|
||||
kfree(mci->ctl_name);
|
||||
mci->pvt_info = NULL;
|
||||
edac_mc_free(mci);
|
||||
iounmap(imc->window);
|
||||
}
|
||||
|
||||
@@ -627,6 +627,9 @@ static struct scpi_dvfs_info *scpi_dvfs_get_info(u8 domain)
|
||||
if (ret)
|
||||
return ERR_PTR(ret);
|
||||
|
||||
if (!buf.opp_count)
|
||||
return ERR_PTR(-ENOENT);
|
||||
|
||||
info = kmalloc(sizeof(*info), GFP_KERNEL);
|
||||
if (!info)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
@@ -40,7 +40,8 @@ int __init efi_tpm_eventlog_init(void)
|
||||
{
|
||||
struct linux_efi_tpm_eventlog *log_tbl;
|
||||
struct efi_tcg2_final_events_table *final_tbl;
|
||||
int tbl_size;
|
||||
unsigned int tbl_size;
|
||||
int final_tbl_size;
|
||||
int ret = 0;
|
||||
|
||||
if (efi.tpm_log == EFI_INVALID_TABLE_ADDR) {
|
||||
@@ -80,26 +81,26 @@ int __init efi_tpm_eventlog_init(void)
|
||||
goto out;
|
||||
}
|
||||
|
||||
tbl_size = 0;
|
||||
final_tbl_size = 0;
|
||||
if (final_tbl->nr_events != 0) {
|
||||
void *events = (void *)efi.tpm_final_log
|
||||
+ sizeof(final_tbl->version)
|
||||
+ sizeof(final_tbl->nr_events);
|
||||
|
||||
tbl_size = tpm2_calc_event_log_size(events,
|
||||
final_tbl->nr_events,
|
||||
log_tbl->log);
|
||||
final_tbl_size = tpm2_calc_event_log_size(events,
|
||||
final_tbl->nr_events,
|
||||
log_tbl->log);
|
||||
}
|
||||
|
||||
if (tbl_size < 0) {
|
||||
if (final_tbl_size < 0) {
|
||||
pr_err(FW_BUG "Failed to parse event in TPM Final Events Log\n");
|
||||
ret = -EINVAL;
|
||||
goto out_calc;
|
||||
}
|
||||
|
||||
memblock_reserve(efi.tpm_final_log,
|
||||
tbl_size + sizeof(*final_tbl));
|
||||
efi_tpm_final_log_size = tbl_size;
|
||||
final_tbl_size + sizeof(*final_tbl));
|
||||
efi_tpm_final_log_size = final_tbl_size;
|
||||
|
||||
out_calc:
|
||||
early_memunmap(final_tbl, sizeof(*final_tbl));
|
||||
|
||||
@@ -918,7 +918,8 @@ static __init int gsmi_init(void)
|
||||
gsmi_dev.pdev = platform_device_register_full(&gsmi_dev_info);
|
||||
if (IS_ERR(gsmi_dev.pdev)) {
|
||||
printk(KERN_ERR "gsmi: unable to register platform device\n");
|
||||
return PTR_ERR(gsmi_dev.pdev);
|
||||
ret = PTR_ERR(gsmi_dev.pdev);
|
||||
goto out_unregister;
|
||||
}
|
||||
|
||||
/* SMI access needs to be serialized */
|
||||
@@ -1056,10 +1057,11 @@ out_err:
|
||||
gsmi_buf_free(gsmi_dev.name_buf);
|
||||
kmem_cache_destroy(gsmi_dev.mem_pool);
|
||||
platform_device_unregister(gsmi_dev.pdev);
|
||||
pr_info("gsmi: failed to load: %d\n", ret);
|
||||
out_unregister:
|
||||
#ifdef CONFIG_PM
|
||||
platform_driver_unregister(&gsmi_driver_info);
|
||||
#endif
|
||||
pr_info("gsmi: failed to load: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,33 +55,26 @@ int fpga_bridge_disable(struct fpga_bridge *bridge)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fpga_bridge_disable);
|
||||
|
||||
static struct fpga_bridge *__fpga_bridge_get(struct device *dev,
|
||||
static struct fpga_bridge *__fpga_bridge_get(struct device *bridge_dev,
|
||||
struct fpga_image_info *info)
|
||||
{
|
||||
struct fpga_bridge *bridge;
|
||||
int ret = -ENODEV;
|
||||
|
||||
bridge = to_fpga_bridge(dev);
|
||||
bridge = to_fpga_bridge(bridge_dev);
|
||||
|
||||
bridge->info = info;
|
||||
|
||||
if (!mutex_trylock(&bridge->mutex)) {
|
||||
ret = -EBUSY;
|
||||
goto err_dev;
|
||||
}
|
||||
if (!mutex_trylock(&bridge->mutex))
|
||||
return ERR_PTR(-EBUSY);
|
||||
|
||||
if (!try_module_get(dev->parent->driver->owner))
|
||||
goto err_ll_mod;
|
||||
if (!try_module_get(bridge->br_ops_owner)) {
|
||||
mutex_unlock(&bridge->mutex);
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
|
||||
dev_dbg(&bridge->dev, "get\n");
|
||||
|
||||
return bridge;
|
||||
|
||||
err_ll_mod:
|
||||
mutex_unlock(&bridge->mutex);
|
||||
err_dev:
|
||||
put_device(dev);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,13 +90,18 @@ err_dev:
|
||||
struct fpga_bridge *of_fpga_bridge_get(struct device_node *np,
|
||||
struct fpga_image_info *info)
|
||||
{
|
||||
struct device *dev;
|
||||
struct fpga_bridge *bridge;
|
||||
struct device *bridge_dev;
|
||||
|
||||
dev = class_find_device_by_of_node(fpga_bridge_class, np);
|
||||
if (!dev)
|
||||
bridge_dev = class_find_device_by_of_node(fpga_bridge_class, np);
|
||||
if (!bridge_dev)
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
return __fpga_bridge_get(dev, info);
|
||||
bridge = __fpga_bridge_get(bridge_dev, info);
|
||||
if (IS_ERR(bridge))
|
||||
put_device(bridge_dev);
|
||||
|
||||
return bridge;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(of_fpga_bridge_get);
|
||||
|
||||
@@ -124,6 +122,7 @@ static int fpga_bridge_dev_match(struct device *dev, const void *data)
|
||||
struct fpga_bridge *fpga_bridge_get(struct device *dev,
|
||||
struct fpga_image_info *info)
|
||||
{
|
||||
struct fpga_bridge *bridge;
|
||||
struct device *bridge_dev;
|
||||
|
||||
bridge_dev = class_find_device(fpga_bridge_class, NULL, dev,
|
||||
@@ -131,7 +130,11 @@ struct fpga_bridge *fpga_bridge_get(struct device *dev,
|
||||
if (!bridge_dev)
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
return __fpga_bridge_get(bridge_dev, info);
|
||||
bridge = __fpga_bridge_get(bridge_dev, info);
|
||||
if (IS_ERR(bridge))
|
||||
put_device(bridge_dev);
|
||||
|
||||
return bridge;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fpga_bridge_get);
|
||||
|
||||
@@ -145,7 +148,7 @@ void fpga_bridge_put(struct fpga_bridge *bridge)
|
||||
dev_dbg(&bridge->dev, "put\n");
|
||||
|
||||
bridge->info = NULL;
|
||||
module_put(bridge->dev.parent->driver->owner);
|
||||
module_put(bridge->br_ops_owner);
|
||||
mutex_unlock(&bridge->mutex);
|
||||
put_device(&bridge->dev);
|
||||
}
|
||||
@@ -312,18 +315,19 @@ static struct attribute *fpga_bridge_attrs[] = {
|
||||
ATTRIBUTE_GROUPS(fpga_bridge);
|
||||
|
||||
/**
|
||||
* fpga_bridge_register - create and register an FPGA Bridge device
|
||||
* __fpga_bridge_register - create and register an FPGA Bridge device
|
||||
* @parent: FPGA bridge device from pdev
|
||||
* @name: FPGA bridge name
|
||||
* @br_ops: pointer to structure of fpga bridge ops
|
||||
* @priv: FPGA bridge private data
|
||||
* @owner: owner module containing the br_ops
|
||||
*
|
||||
* Return: struct fpga_bridge pointer or ERR_PTR()
|
||||
*/
|
||||
struct fpga_bridge *
|
||||
fpga_bridge_register(struct device *parent, const char *name,
|
||||
const struct fpga_bridge_ops *br_ops,
|
||||
void *priv)
|
||||
__fpga_bridge_register(struct device *parent, const char *name,
|
||||
const struct fpga_bridge_ops *br_ops,
|
||||
void *priv, struct module *owner)
|
||||
{
|
||||
struct fpga_bridge *bridge;
|
||||
int id, ret;
|
||||
@@ -353,6 +357,7 @@ fpga_bridge_register(struct device *parent, const char *name,
|
||||
|
||||
bridge->name = name;
|
||||
bridge->br_ops = br_ops;
|
||||
bridge->br_ops_owner = owner;
|
||||
bridge->priv = priv;
|
||||
|
||||
bridge->dev.groups = br_ops->groups;
|
||||
@@ -382,7 +387,7 @@ error_kfree:
|
||||
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fpga_bridge_register);
|
||||
EXPORT_SYMBOL_GPL(__fpga_bridge_register);
|
||||
|
||||
/**
|
||||
* fpga_bridge_unregister - unregister an FPGA bridge
|
||||
|
||||
@@ -664,20 +664,16 @@ static struct attribute *fpga_mgr_attrs[] = {
|
||||
};
|
||||
ATTRIBUTE_GROUPS(fpga_mgr);
|
||||
|
||||
static struct fpga_manager *__fpga_mgr_get(struct device *dev)
|
||||
static struct fpga_manager *__fpga_mgr_get(struct device *mgr_dev)
|
||||
{
|
||||
struct fpga_manager *mgr;
|
||||
|
||||
mgr = to_fpga_manager(dev);
|
||||
mgr = to_fpga_manager(mgr_dev);
|
||||
|
||||
if (!try_module_get(dev->parent->driver->owner))
|
||||
goto err_dev;
|
||||
if (!try_module_get(mgr->mops_owner))
|
||||
mgr = ERR_PTR(-ENODEV);
|
||||
|
||||
return mgr;
|
||||
|
||||
err_dev:
|
||||
put_device(dev);
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
|
||||
static int fpga_mgr_dev_match(struct device *dev, const void *data)
|
||||
@@ -693,12 +689,18 @@ static int fpga_mgr_dev_match(struct device *dev, const void *data)
|
||||
*/
|
||||
struct fpga_manager *fpga_mgr_get(struct device *dev)
|
||||
{
|
||||
struct device *mgr_dev = class_find_device(fpga_mgr_class, NULL, dev,
|
||||
fpga_mgr_dev_match);
|
||||
struct fpga_manager *mgr;
|
||||
struct device *mgr_dev;
|
||||
|
||||
mgr_dev = class_find_device(fpga_mgr_class, NULL, dev, fpga_mgr_dev_match);
|
||||
if (!mgr_dev)
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
return __fpga_mgr_get(mgr_dev);
|
||||
mgr = __fpga_mgr_get(mgr_dev);
|
||||
if (IS_ERR(mgr))
|
||||
put_device(mgr_dev);
|
||||
|
||||
return mgr;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fpga_mgr_get);
|
||||
|
||||
@@ -711,13 +713,18 @@ EXPORT_SYMBOL_GPL(fpga_mgr_get);
|
||||
*/
|
||||
struct fpga_manager *of_fpga_mgr_get(struct device_node *node)
|
||||
{
|
||||
struct device *dev;
|
||||
struct fpga_manager *mgr;
|
||||
struct device *mgr_dev;
|
||||
|
||||
dev = class_find_device_by_of_node(fpga_mgr_class, node);
|
||||
if (!dev)
|
||||
mgr_dev = class_find_device_by_of_node(fpga_mgr_class, node);
|
||||
if (!mgr_dev)
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
return __fpga_mgr_get(dev);
|
||||
mgr = __fpga_mgr_get(mgr_dev);
|
||||
if (IS_ERR(mgr))
|
||||
put_device(mgr_dev);
|
||||
|
||||
return mgr;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(of_fpga_mgr_get);
|
||||
|
||||
@@ -727,7 +734,7 @@ EXPORT_SYMBOL_GPL(of_fpga_mgr_get);
|
||||
*/
|
||||
void fpga_mgr_put(struct fpga_manager *mgr)
|
||||
{
|
||||
module_put(mgr->dev.parent->driver->owner);
|
||||
module_put(mgr->mops_owner);
|
||||
put_device(&mgr->dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fpga_mgr_put);
|
||||
@@ -766,9 +773,10 @@ void fpga_mgr_unlock(struct fpga_manager *mgr)
|
||||
EXPORT_SYMBOL_GPL(fpga_mgr_unlock);
|
||||
|
||||
/**
|
||||
* fpga_mgr_register_full - create and register an FPGA Manager device
|
||||
* __fpga_mgr_register_full - create and register an FPGA Manager device
|
||||
* @parent: fpga manager device from pdev
|
||||
* @info: parameters for fpga manager
|
||||
* @owner: owner module containing the ops
|
||||
*
|
||||
* The caller of this function is responsible for calling fpga_mgr_unregister().
|
||||
* Using devm_fpga_mgr_register_full() instead is recommended.
|
||||
@@ -776,7 +784,8 @@ EXPORT_SYMBOL_GPL(fpga_mgr_unlock);
|
||||
* Return: pointer to struct fpga_manager pointer or ERR_PTR()
|
||||
*/
|
||||
struct fpga_manager *
|
||||
fpga_mgr_register_full(struct device *parent, const struct fpga_manager_info *info)
|
||||
__fpga_mgr_register_full(struct device *parent, const struct fpga_manager_info *info,
|
||||
struct module *owner)
|
||||
{
|
||||
const struct fpga_manager_ops *mops = info->mops;
|
||||
struct fpga_manager *mgr;
|
||||
@@ -804,6 +813,8 @@ fpga_mgr_register_full(struct device *parent, const struct fpga_manager_info *in
|
||||
|
||||
mutex_init(&mgr->ref_mutex);
|
||||
|
||||
mgr->mops_owner = owner;
|
||||
|
||||
mgr->name = info->name;
|
||||
mgr->mops = info->mops;
|
||||
mgr->priv = info->priv;
|
||||
@@ -841,14 +852,15 @@ error_kfree:
|
||||
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fpga_mgr_register_full);
|
||||
EXPORT_SYMBOL_GPL(__fpga_mgr_register_full);
|
||||
|
||||
/**
|
||||
* fpga_mgr_register - create and register an FPGA Manager device
|
||||
* __fpga_mgr_register - create and register an FPGA Manager device
|
||||
* @parent: fpga manager device from pdev
|
||||
* @name: fpga manager name
|
||||
* @mops: pointer to structure of fpga manager ops
|
||||
* @priv: fpga manager private data
|
||||
* @owner: owner module containing the ops
|
||||
*
|
||||
* The caller of this function is responsible for calling fpga_mgr_unregister().
|
||||
* Using devm_fpga_mgr_register() instead is recommended. This simple
|
||||
@@ -859,8 +871,8 @@ EXPORT_SYMBOL_GPL(fpga_mgr_register_full);
|
||||
* Return: pointer to struct fpga_manager pointer or ERR_PTR()
|
||||
*/
|
||||
struct fpga_manager *
|
||||
fpga_mgr_register(struct device *parent, const char *name,
|
||||
const struct fpga_manager_ops *mops, void *priv)
|
||||
__fpga_mgr_register(struct device *parent, const char *name,
|
||||
const struct fpga_manager_ops *mops, void *priv, struct module *owner)
|
||||
{
|
||||
struct fpga_manager_info info = { 0 };
|
||||
|
||||
@@ -868,9 +880,9 @@ fpga_mgr_register(struct device *parent, const char *name,
|
||||
info.mops = mops;
|
||||
info.priv = priv;
|
||||
|
||||
return fpga_mgr_register_full(parent, &info);
|
||||
return __fpga_mgr_register_full(parent, &info, owner);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fpga_mgr_register);
|
||||
EXPORT_SYMBOL_GPL(__fpga_mgr_register);
|
||||
|
||||
/**
|
||||
* fpga_mgr_unregister - unregister an FPGA manager
|
||||
@@ -900,9 +912,10 @@ static void devm_fpga_mgr_unregister(struct device *dev, void *res)
|
||||
}
|
||||
|
||||
/**
|
||||
* devm_fpga_mgr_register_full - resource managed variant of fpga_mgr_register()
|
||||
* __devm_fpga_mgr_register_full - resource managed variant of fpga_mgr_register()
|
||||
* @parent: fpga manager device from pdev
|
||||
* @info: parameters for fpga manager
|
||||
* @owner: owner module containing the ops
|
||||
*
|
||||
* Return: fpga manager pointer on success, negative error code otherwise.
|
||||
*
|
||||
@@ -910,7 +923,8 @@ static void devm_fpga_mgr_unregister(struct device *dev, void *res)
|
||||
* function will be called automatically when the managing device is detached.
|
||||
*/
|
||||
struct fpga_manager *
|
||||
devm_fpga_mgr_register_full(struct device *parent, const struct fpga_manager_info *info)
|
||||
__devm_fpga_mgr_register_full(struct device *parent, const struct fpga_manager_info *info,
|
||||
struct module *owner)
|
||||
{
|
||||
struct fpga_mgr_devres *dr;
|
||||
struct fpga_manager *mgr;
|
||||
@@ -919,7 +933,7 @@ devm_fpga_mgr_register_full(struct device *parent, const struct fpga_manager_inf
|
||||
if (!dr)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
mgr = fpga_mgr_register_full(parent, info);
|
||||
mgr = __fpga_mgr_register_full(parent, info, owner);
|
||||
if (IS_ERR(mgr)) {
|
||||
devres_free(dr);
|
||||
return mgr;
|
||||
@@ -930,14 +944,15 @@ devm_fpga_mgr_register_full(struct device *parent, const struct fpga_manager_inf
|
||||
|
||||
return mgr;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(devm_fpga_mgr_register_full);
|
||||
EXPORT_SYMBOL_GPL(__devm_fpga_mgr_register_full);
|
||||
|
||||
/**
|
||||
* devm_fpga_mgr_register - resource managed variant of fpga_mgr_register()
|
||||
* __devm_fpga_mgr_register - resource managed variant of fpga_mgr_register()
|
||||
* @parent: fpga manager device from pdev
|
||||
* @name: fpga manager name
|
||||
* @mops: pointer to structure of fpga manager ops
|
||||
* @priv: fpga manager private data
|
||||
* @owner: owner module containing the ops
|
||||
*
|
||||
* Return: fpga manager pointer on success, negative error code otherwise.
|
||||
*
|
||||
@@ -946,8 +961,9 @@ EXPORT_SYMBOL_GPL(devm_fpga_mgr_register_full);
|
||||
* device is detached.
|
||||
*/
|
||||
struct fpga_manager *
|
||||
devm_fpga_mgr_register(struct device *parent, const char *name,
|
||||
const struct fpga_manager_ops *mops, void *priv)
|
||||
__devm_fpga_mgr_register(struct device *parent, const char *name,
|
||||
const struct fpga_manager_ops *mops, void *priv,
|
||||
struct module *owner)
|
||||
{
|
||||
struct fpga_manager_info info = { 0 };
|
||||
|
||||
@@ -955,9 +971,9 @@ devm_fpga_mgr_register(struct device *parent, const char *name,
|
||||
info.mops = mops;
|
||||
info.priv = priv;
|
||||
|
||||
return devm_fpga_mgr_register_full(parent, &info);
|
||||
return __devm_fpga_mgr_register_full(parent, &info, owner);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(devm_fpga_mgr_register);
|
||||
EXPORT_SYMBOL_GPL(__devm_fpga_mgr_register);
|
||||
|
||||
static void fpga_mgr_dev_release(struct device *dev)
|
||||
{
|
||||
|
||||
@@ -667,7 +667,9 @@ bool dcn32_set_output_transfer_func(struct dc *dc,
|
||||
}
|
||||
}
|
||||
|
||||
mpc->funcs->set_output_gamma(mpc, mpcc_id, params);
|
||||
if (mpc->funcs->set_output_gamma)
|
||||
mpc->funcs->set_output_gamma(mpc, mpcc_id, params);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ static void calculate_ttu_cursor(struct display_mode_lib *mode_lib,
|
||||
|
||||
static unsigned int get_bytes_per_element(enum source_format_class source_format, bool is_chroma)
|
||||
{
|
||||
unsigned int ret_val = 0;
|
||||
unsigned int ret_val = 1;
|
||||
|
||||
if (source_format == dm_444_16) {
|
||||
if (!is_chroma)
|
||||
|
||||
@@ -900,8 +900,9 @@ static bool subvp_drr_schedulable(struct dc *dc, struct dc_state *context, struc
|
||||
* for VBLANK: (VACTIVE region of the SubVP pipe can fit the MALL prefetch, VBLANK frame time,
|
||||
* and the max of (VBLANK blanking time, MALL region)).
|
||||
*/
|
||||
if (stretched_drr_us < (1 / (double)drr_timing->min_refresh_in_uhz) * 1000000 * 1000000 &&
|
||||
subvp_active_us - prefetch_us - stretched_drr_us - max_vblank_mallregion > 0)
|
||||
if (drr_timing &&
|
||||
stretched_drr_us < (1 / (double)drr_timing->min_refresh_in_uhz) * 1000000 * 1000000 &&
|
||||
subvp_active_us - prefetch_us - stretched_drr_us - max_vblank_mallregion > 0)
|
||||
schedulable = true;
|
||||
|
||||
return schedulable;
|
||||
@@ -966,7 +967,7 @@ static bool subvp_vblank_schedulable(struct dc *dc, struct dc_state *context)
|
||||
if (found && context->res_ctx.pipe_ctx[vblank_index].stream->ignore_msa_timing_param) {
|
||||
// SUBVP + DRR case
|
||||
schedulable = subvp_drr_schedulable(dc, context, &context->res_ctx.pipe_ctx[vblank_index]);
|
||||
} else if (found) {
|
||||
} else if (found && subvp_pipe) {
|
||||
main_timing = &subvp_pipe->stream->timing;
|
||||
phantom_timing = &subvp_pipe->stream->mall_stream_config.paired_stream->timing;
|
||||
vblank_timing = &context->res_ctx.pipe_ctx[vblank_index].stream->timing;
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
static unsigned int get_bytes_per_element(enum source_format_class source_format, bool is_chroma)
|
||||
{
|
||||
unsigned int ret_val = 0;
|
||||
unsigned int ret_val = 1;
|
||||
|
||||
if (source_format == dm_444_16) {
|
||||
if (!is_chroma)
|
||||
|
||||
@@ -403,7 +403,6 @@ static const struct dmi_system_id orientation_data[] = {
|
||||
}, { /* Lenovo Yoga Tab 3 X90F */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "Blade3-10A-001"),
|
||||
},
|
||||
.driver_data = (void *)&lcd1600x2560_rightside_up,
|
||||
|
||||
@@ -2787,8 +2787,7 @@ store_target_temp(struct device *dev, struct device_attribute *attr,
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0,
|
||||
data->target_temp_mask);
|
||||
val = DIV_ROUND_CLOSEST(clamp_val(val, 0, data->target_temp_mask * 1000), 1000);
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
data->target_temp[nr] = val;
|
||||
@@ -2868,7 +2867,7 @@ store_temp_tolerance(struct device *dev, struct device_attribute *attr,
|
||||
return err;
|
||||
|
||||
/* Limit tolerance as needed */
|
||||
val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, data->tolerance_mask);
|
||||
val = DIV_ROUND_CLOSEST(clamp_val(val, 0, data->tolerance_mask * 1000), 1000);
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
data->temp_tolerance[index][nr] = val;
|
||||
@@ -2994,7 +2993,7 @@ store_weight_temp(struct device *dev, struct device_attribute *attr,
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, 255);
|
||||
val = DIV_ROUND_CLOSEST(clamp_val(val, 0, 255000), 1000);
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
data->weight_temp[index][nr] = val;
|
||||
|
||||
@@ -17,10 +17,16 @@ static inline void closure_put_after_sub(struct closure *cl, int flags)
|
||||
{
|
||||
int r = flags & CLOSURE_REMAINING_MASK;
|
||||
|
||||
BUG_ON(flags & CLOSURE_GUARD_MASK);
|
||||
BUG_ON(!r && (flags & ~CLOSURE_DESTRUCTOR));
|
||||
if (WARN(flags & CLOSURE_GUARD_MASK,
|
||||
"closure has guard bits set: %x (%u)",
|
||||
flags & CLOSURE_GUARD_MASK, (unsigned) __fls(r)))
|
||||
r &= ~CLOSURE_GUARD_MASK;
|
||||
|
||||
if (!r) {
|
||||
WARN(flags & ~CLOSURE_DESTRUCTOR,
|
||||
"closure ref hit 0 with incorrect flags set: %x (%u)",
|
||||
flags & ~CLOSURE_DESTRUCTOR, (unsigned) __fls(flags));
|
||||
|
||||
if (cl->fn && !(flags & CLOSURE_DESTRUCTOR)) {
|
||||
atomic_set(&cl->remaining,
|
||||
CLOSURE_REMAINING_INITIALIZER);
|
||||
|
||||
@@ -317,6 +317,14 @@ enum venus_dec_state {
|
||||
VENUS_DEC_STATE_DRC = 7,
|
||||
};
|
||||
|
||||
enum venus_enc_state {
|
||||
VENUS_ENC_STATE_DEINIT = 0,
|
||||
VENUS_ENC_STATE_INIT = 1,
|
||||
VENUS_ENC_STATE_ENCODING = 2,
|
||||
VENUS_ENC_STATE_STOPPED = 3,
|
||||
VENUS_ENC_STATE_DRAIN = 4,
|
||||
};
|
||||
|
||||
struct venus_ts_metadata {
|
||||
bool used;
|
||||
u64 ts_ns;
|
||||
@@ -382,6 +390,7 @@ enum venus_inst_modes {
|
||||
* @sequence_out: a sequence counter for output queue
|
||||
* @m2m_dev: a reference to m2m device structure
|
||||
* @m2m_ctx: a reference to m2m context structure
|
||||
* @ctx_q_lock: a lock to serialize video device ioctl calls
|
||||
* @state: current state of the instance
|
||||
* @done: a completion for sync HFI operation
|
||||
* @error: an error returned during last HFI sync operation
|
||||
@@ -428,6 +437,7 @@ struct venus_inst {
|
||||
u8 quantization;
|
||||
u8 xfer_func;
|
||||
enum venus_dec_state codec_state;
|
||||
enum venus_enc_state enc_state;
|
||||
wait_queue_head_t reconf_wait;
|
||||
unsigned int subscriptions;
|
||||
int buf_count;
|
||||
@@ -452,6 +462,7 @@ struct venus_inst {
|
||||
u32 sequence_out;
|
||||
struct v4l2_m2m_dev *m2m_dev;
|
||||
struct v4l2_m2m_ctx *m2m_ctx;
|
||||
struct mutex ctx_q_lock;
|
||||
unsigned int state;
|
||||
struct completion done;
|
||||
unsigned int error;
|
||||
|
||||
@@ -1604,6 +1604,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
|
||||
src_vq->allow_zero_bytesused = 1;
|
||||
src_vq->min_buffers_needed = 0;
|
||||
src_vq->dev = inst->core->dev;
|
||||
src_vq->lock = &inst->ctx_q_lock;
|
||||
ret = vb2_queue_init(src_vq);
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -1618,6 +1619,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
|
||||
dst_vq->allow_zero_bytesused = 1;
|
||||
dst_vq->min_buffers_needed = 0;
|
||||
dst_vq->dev = inst->core->dev;
|
||||
dst_vq->lock = &inst->ctx_q_lock;
|
||||
return vb2_queue_init(dst_vq);
|
||||
}
|
||||
|
||||
@@ -1636,6 +1638,7 @@ static int vdec_open(struct file *file)
|
||||
INIT_LIST_HEAD(&inst->internalbufs);
|
||||
INIT_LIST_HEAD(&inst->list);
|
||||
mutex_init(&inst->lock);
|
||||
mutex_init(&inst->ctx_q_lock);
|
||||
|
||||
inst->core = core;
|
||||
inst->session_type = VIDC_SESSION_TYPE_DEC;
|
||||
@@ -1712,6 +1715,7 @@ static int vdec_close(struct file *file)
|
||||
ida_destroy(&inst->dpb_ids);
|
||||
hfi_session_destroy(inst);
|
||||
mutex_destroy(&inst->lock);
|
||||
mutex_destroy(&inst->ctx_q_lock);
|
||||
v4l2_fh_del(&inst->fh);
|
||||
v4l2_fh_exit(&inst->fh);
|
||||
|
||||
|
||||
@@ -520,6 +520,51 @@ static int venc_subscribe_event(struct v4l2_fh *fh,
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
venc_encoder_cmd(struct file *file, void *fh, struct v4l2_encoder_cmd *cmd)
|
||||
{
|
||||
struct venus_inst *inst = to_inst(file);
|
||||
struct hfi_frame_data fdata = {0};
|
||||
int ret = 0;
|
||||
|
||||
ret = v4l2_m2m_ioctl_try_encoder_cmd(file, fh, cmd);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
mutex_lock(&inst->lock);
|
||||
|
||||
if (cmd->cmd == V4L2_ENC_CMD_STOP &&
|
||||
inst->enc_state == VENUS_ENC_STATE_ENCODING) {
|
||||
/*
|
||||
* Implement V4L2_ENC_CMD_STOP by enqueue an empty buffer on
|
||||
* encoder input to signal EOS.
|
||||
*/
|
||||
if (!(inst->streamon_out && inst->streamon_cap))
|
||||
goto unlock;
|
||||
|
||||
fdata.buffer_type = HFI_BUFFER_INPUT;
|
||||
fdata.flags |= HFI_BUFFERFLAG_EOS;
|
||||
fdata.device_addr = 0xdeadb000;
|
||||
|
||||
ret = hfi_session_process_buf(inst, &fdata);
|
||||
|
||||
inst->enc_state = VENUS_ENC_STATE_DRAIN;
|
||||
} else if (cmd->cmd == V4L2_ENC_CMD_START) {
|
||||
if (inst->enc_state == VENUS_ENC_STATE_DRAIN) {
|
||||
ret = -EBUSY;
|
||||
goto unlock;
|
||||
}
|
||||
if (inst->enc_state == VENUS_ENC_STATE_STOPPED) {
|
||||
vb2_clear_last_buffer_dequeued(&inst->fh.m2m_ctx->cap_q_ctx.q);
|
||||
inst->enc_state = VENUS_ENC_STATE_ENCODING;
|
||||
}
|
||||
}
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&inst->lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct v4l2_ioctl_ops venc_ioctl_ops = {
|
||||
.vidioc_querycap = venc_querycap,
|
||||
.vidioc_enum_fmt_vid_cap = venc_enum_fmt,
|
||||
@@ -548,6 +593,7 @@ static const struct v4l2_ioctl_ops venc_ioctl_ops = {
|
||||
.vidioc_subscribe_event = venc_subscribe_event,
|
||||
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
|
||||
.vidioc_try_encoder_cmd = v4l2_m2m_ioctl_try_encoder_cmd,
|
||||
.vidioc_encoder_cmd = venc_encoder_cmd,
|
||||
};
|
||||
|
||||
static int venc_pm_get(struct venus_inst *inst)
|
||||
@@ -1196,6 +1242,8 @@ static int venc_start_streaming(struct vb2_queue *q, unsigned int count)
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
inst->enc_state = VENUS_ENC_STATE_ENCODING;
|
||||
|
||||
mutex_unlock(&inst->lock);
|
||||
|
||||
return 0;
|
||||
@@ -1215,10 +1263,21 @@ error:
|
||||
static void venc_vb2_buf_queue(struct vb2_buffer *vb)
|
||||
{
|
||||
struct venus_inst *inst = vb2_get_drv_priv(vb->vb2_queue);
|
||||
struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
|
||||
|
||||
venc_pm_get_put(inst);
|
||||
|
||||
mutex_lock(&inst->lock);
|
||||
|
||||
if (inst->enc_state == VENUS_ENC_STATE_STOPPED) {
|
||||
vbuf->sequence = inst->sequence_cap++;
|
||||
vbuf->field = V4L2_FIELD_NONE;
|
||||
vb2_set_plane_payload(vb, 0, 0);
|
||||
v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_DONE);
|
||||
mutex_unlock(&inst->lock);
|
||||
return;
|
||||
}
|
||||
|
||||
venus_helper_vb2_buf_queue(vb);
|
||||
mutex_unlock(&inst->lock);
|
||||
}
|
||||
@@ -1260,6 +1319,10 @@ static void venc_buf_done(struct venus_inst *inst, unsigned int buf_type,
|
||||
vb->planes[0].data_offset = data_offset;
|
||||
vb->timestamp = timestamp_us * NSEC_PER_USEC;
|
||||
vbuf->sequence = inst->sequence_cap++;
|
||||
if ((vbuf->flags & V4L2_BUF_FLAG_LAST) &&
|
||||
inst->enc_state == VENUS_ENC_STATE_DRAIN) {
|
||||
inst->enc_state = VENUS_ENC_STATE_STOPPED;
|
||||
}
|
||||
} else {
|
||||
vbuf->sequence = inst->sequence_out++;
|
||||
}
|
||||
@@ -1307,6 +1370,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
|
||||
src_vq->allow_zero_bytesused = 1;
|
||||
src_vq->min_buffers_needed = 1;
|
||||
src_vq->dev = inst->core->dev;
|
||||
src_vq->lock = &inst->ctx_q_lock;
|
||||
if (inst->core->res->hfi_version == HFI_VERSION_1XX)
|
||||
src_vq->bidirectional = 1;
|
||||
ret = vb2_queue_init(src_vq);
|
||||
@@ -1323,6 +1387,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
|
||||
dst_vq->allow_zero_bytesused = 1;
|
||||
dst_vq->min_buffers_needed = 1;
|
||||
dst_vq->dev = inst->core->dev;
|
||||
dst_vq->lock = &inst->ctx_q_lock;
|
||||
return vb2_queue_init(dst_vq);
|
||||
}
|
||||
|
||||
@@ -1355,6 +1420,7 @@ static int venc_open(struct file *file)
|
||||
INIT_LIST_HEAD(&inst->internalbufs);
|
||||
INIT_LIST_HEAD(&inst->list);
|
||||
mutex_init(&inst->lock);
|
||||
mutex_init(&inst->ctx_q_lock);
|
||||
|
||||
inst->core = core;
|
||||
inst->session_type = VIDC_SESSION_TYPE_ENC;
|
||||
@@ -1362,6 +1428,9 @@ static int venc_open(struct file *file)
|
||||
inst->core_acquired = false;
|
||||
inst->nonblock = file->f_flags & O_NONBLOCK;
|
||||
|
||||
if (inst->enc_state == VENUS_ENC_STATE_DEINIT)
|
||||
inst->enc_state = VENUS_ENC_STATE_INIT;
|
||||
|
||||
venus_helper_init_instance(inst);
|
||||
|
||||
ret = venc_ctrl_init(inst);
|
||||
@@ -1421,9 +1490,12 @@ static int venc_close(struct file *file)
|
||||
venc_ctrl_deinit(inst);
|
||||
hfi_session_destroy(inst);
|
||||
mutex_destroy(&inst->lock);
|
||||
mutex_destroy(&inst->ctx_q_lock);
|
||||
v4l2_fh_del(&inst->fh);
|
||||
v4l2_fh_exit(&inst->fh);
|
||||
|
||||
inst->enc_state = VENUS_ENC_STATE_DEINIT;
|
||||
|
||||
venc_pm_put(inst, false);
|
||||
|
||||
kfree(inst);
|
||||
|
||||
@@ -223,10 +223,6 @@ static int mmc_spi_response_get(struct mmc_spi_host *host,
|
||||
u8 leftover = 0;
|
||||
unsigned short rotator;
|
||||
int i;
|
||||
char tag[32];
|
||||
|
||||
snprintf(tag, sizeof(tag), " ... CMD%d response SPI_%s",
|
||||
cmd->opcode, maptype(cmd));
|
||||
|
||||
/* Except for data block reads, the whole response will already
|
||||
* be stored in the scratch buffer. It's somewhere after the
|
||||
@@ -379,8 +375,9 @@ checkstatus:
|
||||
}
|
||||
|
||||
if (value < 0)
|
||||
dev_dbg(&host->spi->dev, "%s: resp %04x %08x\n",
|
||||
tag, cmd->resp[0], cmd->resp[1]);
|
||||
dev_dbg(&host->spi->dev,
|
||||
" ... CMD%d response SPI_%s: resp %04x %08x\n",
|
||||
cmd->opcode, maptype(cmd), cmd->resp[0], cmd->resp[1]);
|
||||
|
||||
/* disable chipselect on errors and some success cases */
|
||||
if (value >= 0 && cs_on)
|
||||
|
||||
@@ -1083,6 +1083,7 @@ static const struct usb_device_id products[] = {
|
||||
USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x581d, USB_CLASS_VENDOR_SPEC, 1, 7),
|
||||
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||
},
|
||||
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0122)}, /* Quectel RG650V */
|
||||
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0125)}, /* Quectel EC25, EC20 R2.0 Mini PCIe */
|
||||
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0306)}, /* Quectel EP06/EG06/EM06 */
|
||||
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0512)}, /* Quectel EG12/EM12 */
|
||||
|
||||
@@ -9870,6 +9870,7 @@ static const struct usb_device_id rtl8152_table[] = {
|
||||
{ USB_DEVICE(VENDOR_ID_LENOVO, 0x3062) },
|
||||
{ USB_DEVICE(VENDOR_ID_LENOVO, 0x3069) },
|
||||
{ USB_DEVICE(VENDOR_ID_LENOVO, 0x3082) },
|
||||
{ USB_DEVICE(VENDOR_ID_LENOVO, 0x3098) },
|
||||
{ USB_DEVICE(VENDOR_ID_LENOVO, 0x7205) },
|
||||
{ USB_DEVICE(VENDOR_ID_LENOVO, 0x720c) },
|
||||
{ USB_DEVICE(VENDOR_ID_LENOVO, 0x7214) },
|
||||
|
||||
@@ -39,10 +39,12 @@ void iwl_fw_runtime_init(struct iwl_fw_runtime *fwrt, struct iwl_trans *trans,
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_fw_runtime_init);
|
||||
|
||||
/* Assumes the appropriate lock is held by the caller */
|
||||
void iwl_fw_runtime_suspend(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
iwl_fw_suspend_timestamp(fwrt);
|
||||
iwl_dbg_tlv_time_point(fwrt, IWL_FW_INI_TIME_POINT_HOST_D3_START, NULL);
|
||||
iwl_dbg_tlv_time_point_sync(fwrt, IWL_FW_INI_TIME_POINT_HOST_D3_START,
|
||||
NULL);
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_fw_runtime_suspend);
|
||||
|
||||
|
||||
@@ -1375,7 +1375,9 @@ int iwl_mvm_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
|
||||
|
||||
iwl_mvm_pause_tcm(mvm, true);
|
||||
|
||||
mutex_lock(&mvm->mutex);
|
||||
iwl_fw_runtime_suspend(&mvm->fwrt);
|
||||
mutex_unlock(&mvm->mutex);
|
||||
|
||||
return __iwl_mvm_suspend(hw, wowlan, false);
|
||||
}
|
||||
|
||||
@@ -105,7 +105,9 @@ static int rtw89_ops_add_interface(struct ieee80211_hw *hw,
|
||||
|
||||
mutex_lock(&rtwdev->mutex);
|
||||
rtwvif->rtwdev = rtwdev;
|
||||
list_add_tail(&rtwvif->list, &rtwdev->rtwvifs_list);
|
||||
if (!rtw89_rtwvif_in_list(rtwdev, rtwvif))
|
||||
list_add_tail(&rtwvif->list, &rtwdev->rtwvifs_list);
|
||||
|
||||
INIT_WORK(&rtwvif->update_beacon_work, rtw89_core_update_beacon_work);
|
||||
rtw89_leave_ps_mode(rtwdev);
|
||||
|
||||
|
||||
@@ -14,6 +14,24 @@
|
||||
#define rtw89_for_each_rtwvif(rtwdev, rtwvif) \
|
||||
list_for_each_entry(rtwvif, &(rtwdev)->rtwvifs_list, list)
|
||||
|
||||
/* Before adding rtwvif to list, we need to check if it already exist, beacase
|
||||
* in some case such as SER L2 happen during WoWLAN flow, calling reconfig
|
||||
* twice cause the list to be added twice.
|
||||
*/
|
||||
static inline bool rtw89_rtwvif_in_list(struct rtw89_dev *rtwdev,
|
||||
struct rtw89_vif *new)
|
||||
{
|
||||
struct rtw89_vif *rtwvif;
|
||||
|
||||
lockdep_assert_held(&rtwdev->mutex);
|
||||
|
||||
rtw89_for_each_rtwvif(rtwdev, rtwvif)
|
||||
if (rtwvif == new)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/* The result of negative dividend and positive divisor is undefined, but it
|
||||
* should be one case of round-down or round-up. So, make it round-down if the
|
||||
* result is round-up.
|
||||
|
||||
@@ -153,6 +153,7 @@ struct nvme_dev {
|
||||
/* host memory buffer support: */
|
||||
u64 host_mem_size;
|
||||
u32 nr_host_mem_descs;
|
||||
u32 host_mem_descs_size;
|
||||
dma_addr_t host_mem_descs_dma;
|
||||
struct nvme_host_mem_buf_desc *host_mem_descs;
|
||||
void **host_mem_desc_bufs;
|
||||
@@ -951,9 +952,10 @@ static blk_status_t nvme_queue_rq(struct blk_mq_hw_ctx *hctx,
|
||||
|
||||
static void nvme_submit_cmds(struct nvme_queue *nvmeq, struct request **rqlist)
|
||||
{
|
||||
struct request *req;
|
||||
|
||||
spin_lock(&nvmeq->sq_lock);
|
||||
while (!rq_list_empty(*rqlist)) {
|
||||
struct request *req = rq_list_pop(rqlist);
|
||||
while ((req = rq_list_pop(rqlist))) {
|
||||
struct nvme_iod *iod = blk_mq_rq_to_pdu(req);
|
||||
|
||||
nvme_sq_copy_cmd(nvmeq, &iod->cmd);
|
||||
@@ -979,31 +981,25 @@ static bool nvme_prep_rq_batch(struct nvme_queue *nvmeq, struct request *req)
|
||||
|
||||
static void nvme_queue_rqs(struct request **rqlist)
|
||||
{
|
||||
struct request *req, *next, *prev = NULL;
|
||||
struct request *submit_list = NULL;
|
||||
struct request *requeue_list = NULL;
|
||||
struct request **requeue_lastp = &requeue_list;
|
||||
struct nvme_queue *nvmeq = NULL;
|
||||
struct request *req;
|
||||
|
||||
rq_list_for_each_safe(rqlist, req, next) {
|
||||
struct nvme_queue *nvmeq = req->mq_hctx->driver_data;
|
||||
while ((req = rq_list_pop(rqlist))) {
|
||||
if (nvmeq && nvmeq != req->mq_hctx->driver_data)
|
||||
nvme_submit_cmds(nvmeq, &submit_list);
|
||||
nvmeq = req->mq_hctx->driver_data;
|
||||
|
||||
if (!nvme_prep_rq_batch(nvmeq, req)) {
|
||||
/* detach 'req' and add to remainder list */
|
||||
rq_list_move(rqlist, &requeue_list, req, prev);
|
||||
|
||||
req = prev;
|
||||
if (!req)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!next || req->mq_hctx != next->mq_hctx) {
|
||||
/* detach rest of list, and submit */
|
||||
req->rq_next = NULL;
|
||||
nvme_submit_cmds(nvmeq, rqlist);
|
||||
*rqlist = next;
|
||||
prev = NULL;
|
||||
} else
|
||||
prev = req;
|
||||
if (nvme_prep_rq_batch(nvmeq, req))
|
||||
rq_list_add(&submit_list, req); /* reverse order */
|
||||
else
|
||||
rq_list_add_tail(&requeue_lastp, req);
|
||||
}
|
||||
|
||||
if (nvmeq)
|
||||
nvme_submit_cmds(nvmeq, &submit_list);
|
||||
*rqlist = requeue_list;
|
||||
}
|
||||
|
||||
@@ -2008,10 +2004,10 @@ static void nvme_free_host_mem(struct nvme_dev *dev)
|
||||
|
||||
kfree(dev->host_mem_desc_bufs);
|
||||
dev->host_mem_desc_bufs = NULL;
|
||||
dma_free_coherent(dev->dev,
|
||||
dev->nr_host_mem_descs * sizeof(*dev->host_mem_descs),
|
||||
dma_free_coherent(dev->dev, dev->host_mem_descs_size,
|
||||
dev->host_mem_descs, dev->host_mem_descs_dma);
|
||||
dev->host_mem_descs = NULL;
|
||||
dev->host_mem_descs_size = 0;
|
||||
dev->nr_host_mem_descs = 0;
|
||||
}
|
||||
|
||||
@@ -2019,7 +2015,7 @@ static int __nvme_alloc_host_mem(struct nvme_dev *dev, u64 preferred,
|
||||
u32 chunk_size)
|
||||
{
|
||||
struct nvme_host_mem_buf_desc *descs;
|
||||
u32 max_entries, len;
|
||||
u32 max_entries, len, descs_size;
|
||||
dma_addr_t descs_dma;
|
||||
int i = 0;
|
||||
void **bufs;
|
||||
@@ -2032,8 +2028,9 @@ static int __nvme_alloc_host_mem(struct nvme_dev *dev, u64 preferred,
|
||||
if (dev->ctrl.hmmaxd && dev->ctrl.hmmaxd < max_entries)
|
||||
max_entries = dev->ctrl.hmmaxd;
|
||||
|
||||
descs = dma_alloc_coherent(dev->dev, max_entries * sizeof(*descs),
|
||||
&descs_dma, GFP_KERNEL);
|
||||
descs_size = max_entries * sizeof(*descs);
|
||||
descs = dma_alloc_coherent(dev->dev, descs_size, &descs_dma,
|
||||
GFP_KERNEL);
|
||||
if (!descs)
|
||||
goto out;
|
||||
|
||||
@@ -2062,6 +2059,7 @@ static int __nvme_alloc_host_mem(struct nvme_dev *dev, u64 preferred,
|
||||
dev->host_mem_size = size;
|
||||
dev->host_mem_descs = descs;
|
||||
dev->host_mem_descs_dma = descs_dma;
|
||||
dev->host_mem_descs_size = descs_size;
|
||||
dev->host_mem_desc_bufs = bufs;
|
||||
return 0;
|
||||
|
||||
@@ -2076,8 +2074,7 @@ out_free_bufs:
|
||||
|
||||
kfree(bufs);
|
||||
out_free_descs:
|
||||
dma_free_coherent(dev->dev, max_entries * sizeof(*descs), descs,
|
||||
descs_dma);
|
||||
dma_free_coherent(dev->dev, descs_size, descs, descs_dma);
|
||||
out:
|
||||
dev->host_mem_descs = NULL;
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -544,6 +544,7 @@ static int __init dell_smbios_init(void)
|
||||
int ret, wmi, smm;
|
||||
|
||||
if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) &&
|
||||
!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Alienware", NULL) &&
|
||||
!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) {
|
||||
pr_err("Unable to run on non-Dell system\n");
|
||||
return -ENODEV;
|
||||
|
||||
@@ -80,6 +80,12 @@ static const struct dmi_system_id dell_wmi_smbios_list[] __initconst = {
|
||||
static const struct key_entry dell_wmi_keymap_type_0000[] = {
|
||||
{ KE_IGNORE, 0x003a, { KEY_CAPSLOCK } },
|
||||
|
||||
/* Meta key lock */
|
||||
{ KE_IGNORE, 0xe000, { KEY_RIGHTMETA } },
|
||||
|
||||
/* Meta key unlock */
|
||||
{ KE_IGNORE, 0xe001, { KEY_RIGHTMETA } },
|
||||
|
||||
/* Key code is followed by brightness level */
|
||||
{ KE_KEY, 0xe005, { KEY_BRIGHTNESSDOWN } },
|
||||
{ KE_KEY, 0xe006, { KEY_BRIGHTNESSUP } },
|
||||
|
||||
@@ -602,8 +602,7 @@ static ssize_t eco_mode_show(struct device *dev, struct device_attribute *attr,
|
||||
result = 1;
|
||||
break;
|
||||
default:
|
||||
result = -EIO;
|
||||
break;
|
||||
return -EIO;
|
||||
}
|
||||
return sysfs_emit(buf, "%u\n", result);
|
||||
}
|
||||
@@ -749,7 +748,12 @@ static ssize_t current_brightness_store(struct device *dev, struct device_attrib
|
||||
static ssize_t cdpower_show(struct device *dev, struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
return sysfs_emit(buf, "%d\n", get_optd_power_state());
|
||||
int state = get_optd_power_state();
|
||||
|
||||
if (state < 0)
|
||||
return state;
|
||||
|
||||
return sysfs_emit(buf, "%d\n", state);
|
||||
}
|
||||
|
||||
static ssize_t cdpower_store(struct device *dev, struct device_attribute *attr,
|
||||
|
||||
@@ -8213,6 +8213,7 @@ static u8 fan_control_resume_level;
|
||||
static int fan_watchdog_maxinterval;
|
||||
|
||||
static bool fan_with_ns_addr;
|
||||
static bool ecfw_with_fan_dec_rpm;
|
||||
|
||||
static struct mutex fan_mutex;
|
||||
|
||||
@@ -8856,7 +8857,11 @@ static ssize_t fan_fan1_input_show(struct device *dev,
|
||||
if (res < 0)
|
||||
return res;
|
||||
|
||||
return sysfs_emit(buf, "%u\n", speed);
|
||||
/* Check for fan speeds displayed in hexadecimal */
|
||||
if (!ecfw_with_fan_dec_rpm)
|
||||
return sysfs_emit(buf, "%u\n", speed);
|
||||
else
|
||||
return sysfs_emit(buf, "%x\n", speed);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(fan1_input, S_IRUGO, fan_fan1_input_show, NULL);
|
||||
@@ -8873,7 +8878,11 @@ static ssize_t fan_fan2_input_show(struct device *dev,
|
||||
if (res < 0)
|
||||
return res;
|
||||
|
||||
return sysfs_emit(buf, "%u\n", speed);
|
||||
/* Check for fan speeds displayed in hexadecimal */
|
||||
if (!ecfw_with_fan_dec_rpm)
|
||||
return sysfs_emit(buf, "%u\n", speed);
|
||||
else
|
||||
return sysfs_emit(buf, "%x\n", speed);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(fan2_input, S_IRUGO, fan_fan2_input_show, NULL);
|
||||
@@ -8949,6 +8958,7 @@ static const struct attribute_group fan_driver_attr_group = {
|
||||
#define TPACPI_FAN_2CTL 0x0004 /* selects fan2 control */
|
||||
#define TPACPI_FAN_NOFAN 0x0008 /* no fan available */
|
||||
#define TPACPI_FAN_NS 0x0010 /* For EC with non-Standard register addresses */
|
||||
#define TPACPI_FAN_DECRPM 0x0020 /* For ECFW's with RPM in register as decimal */
|
||||
|
||||
static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
|
||||
TPACPI_QEC_IBM('1', 'Y', TPACPI_FAN_Q1),
|
||||
@@ -8970,6 +8980,7 @@ static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
|
||||
TPACPI_Q_LNV3('R', '1', 'F', TPACPI_FAN_NS), /* L13 Yoga Gen 2 */
|
||||
TPACPI_Q_LNV3('N', '2', 'U', TPACPI_FAN_NS), /* X13 Yoga Gen 2*/
|
||||
TPACPI_Q_LNV3('N', '1', 'O', TPACPI_FAN_NOFAN), /* X1 Tablet (2nd gen) */
|
||||
TPACPI_Q_LNV3('R', '0', 'Q', TPACPI_FAN_DECRPM),/* L480 */
|
||||
};
|
||||
|
||||
static int __init fan_init(struct ibm_init_struct *iibm)
|
||||
@@ -9010,6 +9021,13 @@ static int __init fan_init(struct ibm_init_struct *iibm)
|
||||
tp_features.fan_ctrl_status_undef = 1;
|
||||
}
|
||||
|
||||
/* Check for the EC/BIOS with RPM reported in decimal*/
|
||||
if (quirks & TPACPI_FAN_DECRPM) {
|
||||
pr_info("ECFW with fan RPM as decimal in EC register\n");
|
||||
ecfw_with_fan_dec_rpm = 1;
|
||||
tp_features.fan_ctrl_status_undef = 1;
|
||||
}
|
||||
|
||||
if (gfan_handle) {
|
||||
/* 570, 600e/x, 770e, 770x */
|
||||
fan_status_access_mode = TPACPI_FAN_RD_ACPI_GFAN;
|
||||
@@ -9221,7 +9239,11 @@ static int fan_read(struct seq_file *m)
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
seq_printf(m, "speed:\t\t%d\n", speed);
|
||||
/* Check for fan speeds displayed in hexadecimal */
|
||||
if (!ecfw_with_fan_dec_rpm)
|
||||
seq_printf(m, "speed:\t\t%d\n", speed);
|
||||
else
|
||||
seq_printf(m, "speed:\t\t%x\n", speed);
|
||||
|
||||
if (fan_status_access_mode == TPACPI_FAN_RD_TPEC_NS) {
|
||||
/*
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#define MX3_PWMSR 0x04 /* PWM Status Register */
|
||||
#define MX3_PWMSAR 0x0C /* PWM Sample Register */
|
||||
#define MX3_PWMPR 0x10 /* PWM Period Register */
|
||||
#define MX3_PWMCNR 0x14 /* PWM Counter Register */
|
||||
|
||||
#define MX3_PWMCR_FWM GENMASK(27, 26)
|
||||
#define MX3_PWMCR_STOPEN BIT(25)
|
||||
@@ -217,11 +218,13 @@ static void pwm_imx27_wait_fifo_slot(struct pwm_chip *chip,
|
||||
static int pwm_imx27_apply(struct pwm_chip *chip, struct pwm_device *pwm,
|
||||
const struct pwm_state *state)
|
||||
{
|
||||
unsigned long period_cycles, duty_cycles, prescale;
|
||||
unsigned long period_cycles, duty_cycles, prescale, period_us, tmp;
|
||||
struct pwm_imx27_chip *imx = to_pwm_imx27_chip(chip);
|
||||
struct pwm_state cstate;
|
||||
unsigned long long c;
|
||||
unsigned long long clkrate;
|
||||
unsigned long flags;
|
||||
int val;
|
||||
int ret;
|
||||
u32 cr;
|
||||
|
||||
@@ -264,7 +267,98 @@ static int pwm_imx27_apply(struct pwm_chip *chip, struct pwm_device *pwm,
|
||||
pwm_imx27_sw_reset(chip);
|
||||
}
|
||||
|
||||
writel(duty_cycles, imx->mmio_base + MX3_PWMSAR);
|
||||
val = readl(imx->mmio_base + MX3_PWMPR);
|
||||
val = val >= MX3_PWMPR_MAX ? MX3_PWMPR_MAX : val;
|
||||
cr = readl(imx->mmio_base + MX3_PWMCR);
|
||||
tmp = NSEC_PER_SEC * (u64)(val + 2) * MX3_PWMCR_PRESCALER_GET(cr);
|
||||
tmp = DIV_ROUND_UP_ULL(tmp, clkrate);
|
||||
period_us = DIV_ROUND_UP_ULL(tmp, 1000);
|
||||
|
||||
/*
|
||||
* ERR051198:
|
||||
* PWM: PWM output may not function correctly if the FIFO is empty when
|
||||
* a new SAR value is programmed
|
||||
*
|
||||
* Description:
|
||||
* When the PWM FIFO is empty, a new value programmed to the PWM Sample
|
||||
* register (PWM_PWMSAR) will be directly applied even if the current
|
||||
* timer period has not expired.
|
||||
*
|
||||
* If the new SAMPLE value programmed in the PWM_PWMSAR register is
|
||||
* less than the previous value, and the PWM counter register
|
||||
* (PWM_PWMCNR) that contains the current COUNT value is greater than
|
||||
* the new programmed SAMPLE value, the current period will not flip
|
||||
* the level. This may result in an output pulse with a duty cycle of
|
||||
* 100%.
|
||||
*
|
||||
* Consider a change from
|
||||
* ________
|
||||
* / \______/
|
||||
* ^ * ^
|
||||
* to
|
||||
* ____
|
||||
* / \__________/
|
||||
* ^ ^
|
||||
* At the time marked by *, the new write value will be directly applied
|
||||
* to SAR even the current period is not over if FIFO is empty.
|
||||
*
|
||||
* ________ ____________________
|
||||
* / \______/ \__________/
|
||||
* ^ ^ * ^ ^
|
||||
* |<-- old SAR -->| |<-- new SAR -->|
|
||||
*
|
||||
* That is the output is active for a whole period.
|
||||
*
|
||||
* Workaround:
|
||||
* Check new SAR less than old SAR and current counter is in errata
|
||||
* windows, write extra old SAR into FIFO and new SAR will effect at
|
||||
* next period.
|
||||
*
|
||||
* Sometime period is quite long, such as over 1 second. If add old SAR
|
||||
* into FIFO unconditional, new SAR have to wait for next period. It
|
||||
* may be too long.
|
||||
*
|
||||
* Turn off the interrupt to ensure that not IRQ and schedule happen
|
||||
* during above operations. If any irq and schedule happen, counter
|
||||
* in PWM will be out of data and take wrong action.
|
||||
*
|
||||
* Add a safety margin 1.5us because it needs some time to complete
|
||||
* IO write.
|
||||
*
|
||||
* Use writel_relaxed() to minimize the interval between two writes to
|
||||
* the SAR register to increase the fastest PWM frequency supported.
|
||||
*
|
||||
* When the PWM period is longer than 2us(or <500kHz), this workaround
|
||||
* can solve this problem. No software workaround is available if PWM
|
||||
* period is shorter than IO write. Just try best to fill old data
|
||||
* into FIFO.
|
||||
*/
|
||||
c = clkrate * 1500;
|
||||
do_div(c, NSEC_PER_SEC);
|
||||
|
||||
local_irq_save(flags);
|
||||
val = FIELD_GET(MX3_PWMSR_FIFOAV, readl_relaxed(imx->mmio_base + MX3_PWMSR));
|
||||
|
||||
if (duty_cycles < imx->duty_cycle && (cr & MX3_PWMCR_EN)) {
|
||||
if (period_us < 2) { /* 2us = 500 kHz */
|
||||
/* Best effort attempt to fix up >500 kHz case */
|
||||
udelay(3 * period_us);
|
||||
writel_relaxed(imx->duty_cycle, imx->mmio_base + MX3_PWMSAR);
|
||||
writel_relaxed(imx->duty_cycle, imx->mmio_base + MX3_PWMSAR);
|
||||
} else if (val < MX3_PWMSR_FIFOAV_2WORDS) {
|
||||
val = readl_relaxed(imx->mmio_base + MX3_PWMCNR);
|
||||
/*
|
||||
* If counter is close to period, controller may roll over when
|
||||
* next IO write.
|
||||
*/
|
||||
if ((val + c >= duty_cycles && val < imx->duty_cycle) ||
|
||||
val + c >= period_cycles)
|
||||
writel_relaxed(imx->duty_cycle, imx->mmio_base + MX3_PWMSAR);
|
||||
}
|
||||
}
|
||||
writel_relaxed(duty_cycles, imx->mmio_base + MX3_PWMSAR);
|
||||
local_irq_restore(flags);
|
||||
|
||||
writel(period_cycles, imx->mmio_base + MX3_PWMPR);
|
||||
|
||||
/*
|
||||
|
||||
@@ -906,6 +906,8 @@ static const struct regulator_desc rk809_reg[] = {
|
||||
.n_linear_ranges = ARRAY_SIZE(rk817_buck1_voltage_ranges),
|
||||
.vsel_reg = RK817_BUCK3_ON_VSEL_REG,
|
||||
.vsel_mask = RK817_BUCK_VSEL_MASK,
|
||||
.apply_reg = RK817_POWER_CONFIG,
|
||||
.apply_bit = RK817_BUCK3_FB_RES_INTER,
|
||||
.enable_reg = RK817_POWER_EN_REG(0),
|
||||
.enable_mask = ENABLE_MASK(RK817_ID_DCDC3),
|
||||
.enable_val = ENABLE_MASK(RK817_ID_DCDC3),
|
||||
|
||||
@@ -459,10 +459,14 @@ int cio_update_schib(struct subchannel *sch)
|
||||
{
|
||||
struct schib schib;
|
||||
|
||||
if (stsch(sch->schid, &schib) || !css_sch_is_valid(&schib))
|
||||
if (stsch(sch->schid, &schib))
|
||||
return -ENODEV;
|
||||
|
||||
memcpy(&sch->schib, &schib, sizeof(schib));
|
||||
|
||||
if (!css_sch_is_valid(&schib))
|
||||
return -EACCES;
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cio_update_schib);
|
||||
|
||||
@@ -1378,14 +1378,18 @@ enum io_sch_action {
|
||||
IO_SCH_VERIFY,
|
||||
IO_SCH_DISC,
|
||||
IO_SCH_NOP,
|
||||
IO_SCH_ORPH_CDEV,
|
||||
};
|
||||
|
||||
static enum io_sch_action sch_get_action(struct subchannel *sch)
|
||||
{
|
||||
struct ccw_device *cdev;
|
||||
int rc;
|
||||
|
||||
cdev = sch_get_cdev(sch);
|
||||
if (cio_update_schib(sch)) {
|
||||
rc = cio_update_schib(sch);
|
||||
|
||||
if (rc == -ENODEV) {
|
||||
/* Not operational. */
|
||||
if (!cdev)
|
||||
return IO_SCH_UNREG;
|
||||
@@ -1393,6 +1397,16 @@ static enum io_sch_action sch_get_action(struct subchannel *sch)
|
||||
return IO_SCH_UNREG;
|
||||
return IO_SCH_ORPH_UNREG;
|
||||
}
|
||||
|
||||
/* Avoid unregistering subchannels without working device. */
|
||||
if (rc == -EACCES) {
|
||||
if (!cdev)
|
||||
return IO_SCH_NOP;
|
||||
if (ccw_device_notify(cdev, CIO_GONE) != NOTIFY_OK)
|
||||
return IO_SCH_UNREG_CDEV;
|
||||
return IO_SCH_ORPH_CDEV;
|
||||
}
|
||||
|
||||
/* Operational. */
|
||||
if (!cdev)
|
||||
return IO_SCH_ATTACH;
|
||||
@@ -1462,6 +1476,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process)
|
||||
rc = 0;
|
||||
goto out_unlock;
|
||||
case IO_SCH_ORPH_UNREG:
|
||||
case IO_SCH_ORPH_CDEV:
|
||||
case IO_SCH_ORPH_ATTACH:
|
||||
ccw_device_set_disconnected(cdev);
|
||||
break;
|
||||
@@ -1493,6 +1508,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process)
|
||||
/* Handle attached ccw device. */
|
||||
switch (action) {
|
||||
case IO_SCH_ORPH_UNREG:
|
||||
case IO_SCH_ORPH_CDEV:
|
||||
case IO_SCH_ORPH_ATTACH:
|
||||
/* Move ccw device to orphanage. */
|
||||
rc = ccw_device_move_to_orph(cdev);
|
||||
|
||||
@@ -586,7 +586,8 @@ int geni_se_clk_tbl_get(struct geni_se *se, unsigned long **tbl)
|
||||
|
||||
for (i = 0; i < MAX_CLK_PERF_LEVEL; i++) {
|
||||
freq = clk_round_rate(se->clk, freq + 1);
|
||||
if (freq <= 0 || freq == se->clk_perf_tbl[i - 1])
|
||||
if (freq <= 0 ||
|
||||
(i > 0 && freq == se->clk_perf_tbl[i - 1]))
|
||||
break;
|
||||
se->clk_perf_tbl[i] = freq;
|
||||
}
|
||||
|
||||
@@ -649,10 +649,16 @@ static int qcom_socinfo_probe(struct platform_device *pdev)
|
||||
qs->attr.revision = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%u.%u",
|
||||
SOCINFO_MAJOR(le32_to_cpu(info->ver)),
|
||||
SOCINFO_MINOR(le32_to_cpu(info->ver)));
|
||||
if (offsetof(struct socinfo, serial_num) <= item_size)
|
||||
if (!qs->attr.soc_id || qs->attr.revision)
|
||||
return -ENOMEM;
|
||||
|
||||
if (offsetof(struct socinfo, serial_num) <= item_size) {
|
||||
qs->attr.serial_number = devm_kasprintf(&pdev->dev, GFP_KERNEL,
|
||||
"%u",
|
||||
le32_to_cpu(info->serial_num));
|
||||
if (!qs->attr.serial_number)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
qs->soc_dev = soc_device_register(&qs->attr);
|
||||
if (IS_ERR(qs->soc_dev))
|
||||
|
||||
@@ -203,10 +203,10 @@ static int sr_late_init(struct omap_sr *sr_info)
|
||||
|
||||
if (sr_class->notify && sr_class->notify_flags && sr_info->irq) {
|
||||
ret = devm_request_irq(&sr_info->pdev->dev, sr_info->irq,
|
||||
sr_interrupt, 0, sr_info->name, sr_info);
|
||||
sr_interrupt, IRQF_NO_AUTOEN,
|
||||
sr_info->name, sr_info);
|
||||
if (ret)
|
||||
goto error;
|
||||
disable_irq(sr_info->irq);
|
||||
}
|
||||
|
||||
if (pdata && pdata->enable_on_init)
|
||||
|
||||
@@ -165,6 +165,7 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev)
|
||||
break;
|
||||
|
||||
if (args.args_count >= 1 && args.np == dev->of_node) {
|
||||
of_node_put(args.np);
|
||||
if (args.args[0] > max_id) {
|
||||
max_id = args.args[0];
|
||||
} else {
|
||||
@@ -192,7 +193,10 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev)
|
||||
pm_genpd_init(&pd->pd, NULL, true);
|
||||
|
||||
list_add(&pd->node, &pd_provider->pd_list);
|
||||
} else {
|
||||
of_node_put(args.np);
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,8 +174,10 @@ static int xlnx_add_cb_for_suspend(event_cb_func_t cb_fun, void *data)
|
||||
INIT_LIST_HEAD(&eve_data->cb_list_head);
|
||||
|
||||
cb_data = kmalloc(sizeof(*cb_data), GFP_KERNEL);
|
||||
if (!cb_data)
|
||||
if (!cb_data) {
|
||||
kfree(eve_data);
|
||||
return -ENOMEM;
|
||||
}
|
||||
cb_data->eve_cb = cb_fun;
|
||||
cb_data->agent_data = data;
|
||||
|
||||
|
||||
@@ -870,7 +870,7 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
|
||||
goto out_controller_put;
|
||||
}
|
||||
|
||||
ret = devm_request_irq(&pdev->dev, irq, fsl_lpspi_isr, 0,
|
||||
ret = devm_request_irq(&pdev->dev, irq, fsl_lpspi_isr, IRQF_NO_AUTOEN,
|
||||
dev_name(&pdev->dev), fsl_lpspi);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "can't get irq%d: %d\n", irq, ret);
|
||||
@@ -907,14 +907,10 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
|
||||
ret = fsl_lpspi_dma_init(&pdev->dev, fsl_lpspi, controller);
|
||||
if (ret == -EPROBE_DEFER)
|
||||
goto out_pm_get;
|
||||
if (ret < 0)
|
||||
dev_err(&pdev->dev, "dma setup error %d, use pio\n", ret);
|
||||
else
|
||||
/*
|
||||
* disable LPSPI module IRQ when enable DMA mode successfully,
|
||||
* to prevent the unexpected LPSPI module IRQ events.
|
||||
*/
|
||||
disable_irq(irq);
|
||||
if (ret < 0) {
|
||||
dev_warn(&pdev->dev, "dma setup error %d, use pio\n", ret);
|
||||
enable_irq(irq);
|
||||
}
|
||||
|
||||
ret = devm_spi_register_controller(&pdev->dev, controller);
|
||||
if (ret < 0) {
|
||||
|
||||
@@ -340,7 +340,7 @@ tegra_qspi_fill_tx_fifo_from_client_txbuf(struct tegra_qspi *tqspi, struct spi_t
|
||||
for (count = 0; count < max_n_32bit; count++) {
|
||||
u32 x = 0;
|
||||
|
||||
for (i = 0; len && (i < bytes_per_word); i++, len--)
|
||||
for (i = 0; len && (i < min(4, bytes_per_word)); i++, len--)
|
||||
x |= (u32)(*tx_buf++) << (i * 8);
|
||||
tegra_qspi_writel(tqspi, x, QSPI_TX_FIFO);
|
||||
}
|
||||
|
||||
@@ -1219,6 +1219,7 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
|
||||
|
||||
clk_dis_all:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
pm_runtime_dont_use_autosuspend(&pdev->dev);
|
||||
pm_runtime_put_noidle(&pdev->dev);
|
||||
pm_runtime_set_suspended(&pdev->dev);
|
||||
clk_disable_unprepare(xqspi->refclk);
|
||||
@@ -1249,6 +1250,7 @@ static int zynqmp_qspi_remove(struct platform_device *pdev)
|
||||
zynqmp_gqspi_write(xqspi, GQSPI_EN_OFST, 0x0);
|
||||
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
pm_runtime_dont_use_autosuspend(&pdev->dev);
|
||||
pm_runtime_put_noidle(&pdev->dev);
|
||||
pm_runtime_set_suspended(&pdev->dev);
|
||||
clk_disable_unprepare(xqspi->refclk);
|
||||
|
||||
@@ -4137,6 +4137,8 @@ ia_css_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid)
|
||||
goto err;
|
||||
/* No weighted histogram, no structure, treat the histogram data as a byte dump in a byte array */
|
||||
me->rgby_data = kvmalloc(sizeof_hmem(HMEM0_ID), GFP_KERNEL);
|
||||
if (!me->rgby_data)
|
||||
goto err;
|
||||
|
||||
IA_CSS_LEAVE("return=%p", me);
|
||||
return me;
|
||||
|
||||
@@ -1275,6 +1275,7 @@ thermal_zone_device_register_with_trips(const char *type, struct thermal_trip *t
|
||||
thermal_zone_destroy_device_groups(tz);
|
||||
goto remove_id;
|
||||
}
|
||||
thermal_zone_device_init(tz);
|
||||
result = device_register(&tz->device);
|
||||
if (result)
|
||||
goto release_device;
|
||||
@@ -1317,7 +1318,6 @@ thermal_zone_device_register_with_trips(const char *type, struct thermal_trip *t
|
||||
|
||||
INIT_DELAYED_WORK(&tz->poll_queue, thermal_zone_device_check);
|
||||
|
||||
thermal_zone_device_init(tz);
|
||||
/* Update the new thermal zone and mark it as already updated. */
|
||||
if (atomic_cmpxchg(&tz->need_update, 1, 0))
|
||||
thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user