mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
Merge tag 'v5.4.211' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroid-5.4.y
This is the 5.4.211 stable release Change-Id: I76bb73b4a7616cdce49dbe3ad75ba4f98f5f824f
This commit is contained in:
@@ -676,8 +676,8 @@ the ``menu`` governor to be used on the systems that use the ``ladder`` governor
|
||||
by default this way, for example.
|
||||
|
||||
The other kernel command line parameters controlling CPU idle time management
|
||||
described below are only relevant for the *x86* architecture and some of
|
||||
them affect Intel processors only.
|
||||
described below are only relevant for the *x86* architecture and references
|
||||
to ``intel_idle`` affect Intel processors only.
|
||||
|
||||
The *x86* architecture support code recognizes three kernel command line
|
||||
options related to CPU idle time management: ``idle=poll``, ``idle=halt``,
|
||||
@@ -699,10 +699,13 @@ idle, so it very well may hurt single-thread computations performance as well as
|
||||
energy-efficiency. Thus using it for performance reasons may not be a good idea
|
||||
at all.]
|
||||
|
||||
The ``idle=nomwait`` option disables the ``intel_idle`` driver and causes
|
||||
``acpi_idle`` to be used (as long as all of the information needed by it is
|
||||
there in the system's ACPI tables), but it is not allowed to use the
|
||||
``MWAIT`` instruction of the CPUs to ask the hardware to enter idle states.
|
||||
The ``idle=nomwait`` option prevents the use of ``MWAIT`` instruction of
|
||||
the CPU to enter idle states. When this option is used, the ``acpi_idle``
|
||||
driver will use the ``HLT`` instruction instead of ``MWAIT``. On systems
|
||||
running Intel processors, this option disables the ``intel_idle`` driver
|
||||
and forces the use of the ``acpi_idle`` driver instead. Note that in either
|
||||
case, ``acpi_idle`` driver will function only if all the information needed
|
||||
by it is in the system's ACPI tables.
|
||||
|
||||
In addition to the architecture-level kernel command line options affecting CPU
|
||||
idle time management, there are parameters affecting individual ``CPUIdle``
|
||||
|
||||
@@ -59,7 +59,7 @@ Like with atomic_t, the rule of thumb is:
|
||||
- RMW operations that have a return value are fully ordered.
|
||||
|
||||
- RMW operations that are conditional are unordered on FAILURE,
|
||||
otherwise the above rules apply. In the case of test_and_{}_bit() operations,
|
||||
otherwise the above rules apply. In the case of test_and_set_bit_lock(),
|
||||
if the bit in memory is unchanged by the operation then it is deemed to have
|
||||
failed.
|
||||
|
||||
|
||||
@@ -112,8 +112,8 @@ properties:
|
||||
- const: qcom,msm8974
|
||||
|
||||
- items:
|
||||
- const: qcom,msm8916-mtp/1
|
||||
- const: qcom,msm8916-mtp
|
||||
- const: qcom,msm8916-mtp/1
|
||||
- const: qcom,msm8916
|
||||
|
||||
- items:
|
||||
|
||||
@@ -168,7 +168,7 @@ An error injection example::
|
||||
0x00000008 Memory Correctable
|
||||
0x00000010 Memory Uncorrectable non-fatal
|
||||
# echo 0x12345000 > param1 # Set memory address for injection
|
||||
# echo $((-1 << 12)) > param2 # Mask 0xfffffffffffff000 - anywhere in this page
|
||||
# echo 0xfffffffffffff000 > param2 # Mask - anywhere in this page
|
||||
# echo 0x8 > error_type # Choose correctable memory error
|
||||
# echo 1 > error_inject # Inject now
|
||||
|
||||
|
||||
5
Makefile
5
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 210
|
||||
SUBLEVEL = 211
|
||||
EXTRAVERSION =
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
@@ -932,6 +932,9 @@ KBUILD_CFLAGS += $(KCFLAGS)
|
||||
KBUILD_LDFLAGS_MODULE += --build-id
|
||||
LDFLAGS_vmlinux += --build-id
|
||||
|
||||
KBUILD_LDFLAGS += -z noexecstack
|
||||
KBUILD_LDFLAGS += $(call ld-option,--no-warn-rwx-segments)
|
||||
|
||||
ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
|
||||
LDFLAGS_vmlinux += $(call ld-option, -X,)
|
||||
endif
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/ {
|
||||
model = "AST2500 EVB";
|
||||
compatible = "aspeed,ast2500";
|
||||
compatible = "aspeed,ast2500-evb", "aspeed,ast2500";
|
||||
|
||||
aliases {
|
||||
serial4 = &uart5;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
/ {
|
||||
model = "AST2600 EVB";
|
||||
compatible = "aspeed,ast2600";
|
||||
compatible = "aspeed,ast2600-evb-a1", "aspeed,ast2600";
|
||||
|
||||
aliases {
|
||||
serial4 = &uart5;
|
||||
|
||||
@@ -62,20 +62,18 @@
|
||||
clock-frequency = <696000000>;
|
||||
clock-latency = <61036>; /* two CLK32 periods */
|
||||
#cooling-cells = <2>;
|
||||
operating-points = <
|
||||
operating-points =
|
||||
/* kHz uV */
|
||||
696000 1275000
|
||||
528000 1175000
|
||||
396000 1025000
|
||||
198000 950000
|
||||
>;
|
||||
fsl,soc-operating-points = <
|
||||
<696000 1275000>,
|
||||
<528000 1175000>,
|
||||
<396000 1025000>,
|
||||
<198000 950000>;
|
||||
fsl,soc-operating-points =
|
||||
/* KHz uV */
|
||||
696000 1275000
|
||||
528000 1175000
|
||||
396000 1175000
|
||||
198000 1175000
|
||||
>;
|
||||
<696000 1275000>,
|
||||
<528000 1175000>,
|
||||
<396000 1175000>,
|
||||
<198000 1175000>;
|
||||
clocks = <&clks IMX6UL_CLK_ARM>,
|
||||
<&clks IMX6UL_CLK_PLL2_BUS>,
|
||||
<&clks IMX6UL_CLK_PLL2_PFD2>,
|
||||
@@ -157,6 +155,9 @@
|
||||
ocram: sram@900000 {
|
||||
compatible = "mmio-sram";
|
||||
reg = <0x00900000 0x20000>;
|
||||
ranges = <0 0x00900000 0x20000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
};
|
||||
|
||||
intc: interrupt-controller@a01000 {
|
||||
@@ -966,7 +967,7 @@
|
||||
};
|
||||
|
||||
csi: csi@21c4000 {
|
||||
compatible = "fsl,imx6ul-csi", "fsl,imx7-csi";
|
||||
compatible = "fsl,imx6ul-csi";
|
||||
reg = <0x021c4000 0x4000>;
|
||||
interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks IMX6UL_CLK_CSI>;
|
||||
@@ -975,7 +976,7 @@
|
||||
};
|
||||
|
||||
lcdif: lcdif@21c8000 {
|
||||
compatible = "fsl,imx6ul-lcdif", "fsl,imx28-lcdif";
|
||||
compatible = "fsl,imx6ul-lcdif", "fsl,imx6sx-lcdif";
|
||||
reg = <0x021c8000 0x4000>;
|
||||
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks IMX6UL_CLK_LCDIF_PIX>,
|
||||
@@ -996,7 +997,7 @@
|
||||
qspi: spi@21e0000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "fsl,imx6ul-qspi", "fsl,imx6sx-qspi";
|
||||
compatible = "fsl,imx6ul-qspi";
|
||||
reg = <0x021e0000 0x4000>, <0x60000000 0x10000000>;
|
||||
reg-names = "QuadSPI", "QuadSPI-memory";
|
||||
interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
@@ -323,6 +323,7 @@
|
||||
|
||||
pmicgpio: gpio@150 {
|
||||
compatible = "qcom,pm8018-gpio", "qcom,ssbi-gpio";
|
||||
reg = <0x150>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
gpio-controller;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
compatible = "qcom,spmi-temp-alarm";
|
||||
reg = <0x2400>;
|
||||
interrupts = <4 0x24 0 IRQ_TYPE_EDGE_RISING>;
|
||||
#thermal-sensor-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -585,8 +585,8 @@
|
||||
compatible = "socionext,uniphier-dwc3", "snps,dwc3";
|
||||
status = "disabled";
|
||||
reg = <0x65a00000 0xcd00>;
|
||||
interrupt-names = "host", "peripheral";
|
||||
interrupts = <0 134 4>, <0 135 4>;
|
||||
interrupt-names = "dwc_usb3";
|
||||
interrupts = <0 134 4>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usb0>, <&pinctrl_usb2>;
|
||||
clock-names = "ref", "bus_early", "suspend";
|
||||
@@ -681,8 +681,8 @@
|
||||
compatible = "socionext,uniphier-dwc3", "snps,dwc3";
|
||||
status = "disabled";
|
||||
reg = <0x65c00000 0xcd00>;
|
||||
interrupt-names = "host", "peripheral";
|
||||
interrupts = <0 137 4>, <0 138 4>;
|
||||
interrupt-names = "dwc_usb3";
|
||||
interrupts = <0 137 4>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usb1>, <&pinctrl_usb3>;
|
||||
clock-names = "ref", "bus_early", "suspend";
|
||||
|
||||
@@ -40,8 +40,8 @@ ENDPROC(_find_first_zero_bit_le)
|
||||
* Prototype: int find_next_zero_bit(void *addr, unsigned int maxbit, int offset)
|
||||
*/
|
||||
ENTRY(_find_next_zero_bit_le)
|
||||
teq r1, #0
|
||||
beq 3b
|
||||
cmp r2, r1
|
||||
bhs 3b
|
||||
ands ip, r2, #7
|
||||
beq 1b @ If new byte, goto old routine
|
||||
ARM( ldrb r3, [r0, r2, lsr #3] )
|
||||
@@ -81,8 +81,8 @@ ENDPROC(_find_first_bit_le)
|
||||
* Prototype: int find_next_zero_bit(void *addr, unsigned int maxbit, int offset)
|
||||
*/
|
||||
ENTRY(_find_next_bit_le)
|
||||
teq r1, #0
|
||||
beq 3b
|
||||
cmp r2, r1
|
||||
bhs 3b
|
||||
ands ip, r2, #7
|
||||
beq 1b @ If new byte, goto old routine
|
||||
ARM( ldrb r3, [r0, r2, lsr #3] )
|
||||
@@ -115,8 +115,8 @@ ENTRY(_find_first_zero_bit_be)
|
||||
ENDPROC(_find_first_zero_bit_be)
|
||||
|
||||
ENTRY(_find_next_zero_bit_be)
|
||||
teq r1, #0
|
||||
beq 3b
|
||||
cmp r2, r1
|
||||
bhs 3b
|
||||
ands ip, r2, #7
|
||||
beq 1b @ If new byte, goto old routine
|
||||
eor r3, r2, #0x18 @ big endian byte ordering
|
||||
@@ -149,8 +149,8 @@ ENTRY(_find_first_bit_be)
|
||||
ENDPROC(_find_first_bit_be)
|
||||
|
||||
ENTRY(_find_next_bit_be)
|
||||
teq r1, #0
|
||||
beq 3b
|
||||
cmp r2, r1
|
||||
bhs 3b
|
||||
ands ip, r2, #7
|
||||
beq 1b @ If new byte, goto old routine
|
||||
eor r3, r2, #0x18 @ big endian byte ordering
|
||||
|
||||
@@ -54,6 +54,7 @@ int __init bcm_kona_smc_init(void)
|
||||
return -ENODEV;
|
||||
|
||||
prop_val = of_get_address(node, 0, &prop_size, NULL);
|
||||
of_node_put(node);
|
||||
if (!prop_val)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
@@ -211,6 +211,7 @@ static int __init omapdss_init_fbdev(void)
|
||||
node = of_find_node_by_name(NULL, "omap4_padconf_global");
|
||||
if (node)
|
||||
omap4_dsi_mux_syscon = syscon_node_to_regmap(node);
|
||||
of_node_put(node);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -259,11 +260,13 @@ static int __init omapdss_init_of(void)
|
||||
|
||||
if (!pdev) {
|
||||
pr_err("Unable to find DSS platform device\n");
|
||||
of_node_put(node);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
r = of_platform_populate(node, NULL, NULL, &pdev->dev);
|
||||
put_device(&pdev->dev);
|
||||
of_node_put(node);
|
||||
if (r) {
|
||||
pr_err("Unable to populate DSS submodule devices\n");
|
||||
return r;
|
||||
|
||||
@@ -708,6 +708,7 @@ static int omap3xxx_prm_late_init(void)
|
||||
}
|
||||
|
||||
irq_num = of_irq_get(np, 0);
|
||||
of_node_put(np);
|
||||
if (irq_num == -EPROBE_DEFER)
|
||||
return irq_num;
|
||||
|
||||
|
||||
@@ -125,6 +125,7 @@ remove:
|
||||
|
||||
list_for_each_entry_safe(pos, tmp, &quirk_list, list) {
|
||||
list_del(&pos->list);
|
||||
of_node_put(pos->np);
|
||||
kfree(pos);
|
||||
}
|
||||
|
||||
@@ -174,11 +175,12 @@ static int __init rcar_gen2_regulator_quirk(void)
|
||||
memcpy(&quirk->i2c_msg, id->data, sizeof(quirk->i2c_msg));
|
||||
|
||||
quirk->id = id;
|
||||
quirk->np = np;
|
||||
quirk->np = of_node_get(np);
|
||||
quirk->i2c_msg.addr = addr;
|
||||
|
||||
ret = of_irq_parse_one(np, 0, argsa);
|
||||
if (ret) { /* Skip invalid entry and continue */
|
||||
of_node_put(np);
|
||||
kfree(quirk);
|
||||
continue;
|
||||
}
|
||||
@@ -225,6 +227,7 @@ err_free:
|
||||
err_mem:
|
||||
list_for_each_entry_safe(pos, tmp, &quirk_list, list) {
|
||||
list_del(&pos->list);
|
||||
of_node_put(pos->np);
|
||||
kfree(pos);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ static int __init zynq_get_revision(void)
|
||||
}
|
||||
|
||||
zynq_devcfg_base = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
if (!zynq_devcfg_base) {
|
||||
pr_err("%s: Unable to map I/O memory\n", __func__);
|
||||
return -1;
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
status {
|
||||
led-0 {
|
||||
label = "orangepi:green:status";
|
||||
gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
|
||||
};
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
wps {
|
||||
label = "wps";
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
gpios = <&pio 102 GPIO_ACTIVE_HIGH>;
|
||||
gpios = <&pio 102 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
qpic_nand: nand@79b0000 {
|
||||
qpic_nand: nand-controller@79b0000 {
|
||||
compatible = "qcom,ipq8074-nand";
|
||||
reg = <0x79b0000 0x10000>;
|
||||
#address-cells = <1>;
|
||||
|
||||
@@ -544,8 +544,8 @@
|
||||
compatible = "socionext,uniphier-dwc3", "snps,dwc3";
|
||||
status = "disabled";
|
||||
reg = <0x65a00000 0xcd00>;
|
||||
interrupt-names = "host", "peripheral";
|
||||
interrupts = <0 134 4>, <0 135 4>;
|
||||
interrupt-names = "dwc_usb3";
|
||||
interrupts = <0 134 4>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usb0>, <&pinctrl_usb2>;
|
||||
clock-names = "ref", "bus_early", "suspend";
|
||||
@@ -646,8 +646,8 @@
|
||||
compatible = "socionext,uniphier-dwc3", "snps,dwc3";
|
||||
status = "disabled";
|
||||
reg = <0x65c00000 0xcd00>;
|
||||
interrupt-names = "host", "peripheral";
|
||||
interrupts = <0 137 4>, <0 138 4>;
|
||||
interrupt-names = "dwc_usb3";
|
||||
interrupts = <0 137 4>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usb1>, <&pinctrl_usb3>;
|
||||
clock-names = "ref", "bus_early", "suspend";
|
||||
|
||||
@@ -59,6 +59,7 @@ config CRYPTO_GHASH_ARM64_CE
|
||||
select CRYPTO_HASH
|
||||
select CRYPTO_GF128MUL
|
||||
select CRYPTO_LIB_AES
|
||||
select CRYPTO_AEAD
|
||||
|
||||
config CRYPTO_CRCT10DIF_ARM64_CE
|
||||
tristate "CRCT10DIF digest algorithm using PMULL instructions"
|
||||
|
||||
@@ -184,8 +184,9 @@ void tls_preserve_current_state(void);
|
||||
|
||||
static inline void start_thread_common(struct pt_regs *regs, unsigned long pc)
|
||||
{
|
||||
s32 previous_syscall = regs->syscallno;
|
||||
memset(regs, 0, sizeof(*regs));
|
||||
forget_syscall(regs);
|
||||
regs->syscallno = previous_syscall;
|
||||
regs->pc = pc;
|
||||
|
||||
if (system_uses_irq_prio_masking())
|
||||
|
||||
@@ -59,6 +59,7 @@ struct insn_emulation {
|
||||
static LIST_HEAD(insn_emulation);
|
||||
static int nr_insn_emulated __initdata;
|
||||
static DEFINE_RAW_SPINLOCK(insn_emulation_lock);
|
||||
static DEFINE_MUTEX(insn_emulation_mutex);
|
||||
|
||||
static void register_emulation_hooks(struct insn_emulation_ops *ops)
|
||||
{
|
||||
@@ -207,10 +208,10 @@ static int emulation_proc_handler(struct ctl_table *table, int write,
|
||||
loff_t *ppos)
|
||||
{
|
||||
int ret = 0;
|
||||
struct insn_emulation *insn = (struct insn_emulation *) table->data;
|
||||
struct insn_emulation *insn = container_of(table->data, struct insn_emulation, current_mode);
|
||||
enum insn_emulation_mode prev_mode = insn->current_mode;
|
||||
|
||||
table->data = &insn->current_mode;
|
||||
mutex_lock(&insn_emulation_mutex);
|
||||
ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
|
||||
|
||||
if (ret || !write || prev_mode == insn->current_mode)
|
||||
@@ -223,7 +224,7 @@ static int emulation_proc_handler(struct ctl_table *table, int write,
|
||||
update_insn_emulation_mode(insn, INSN_UNDEF);
|
||||
}
|
||||
ret:
|
||||
table->data = insn;
|
||||
mutex_unlock(&insn_emulation_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -247,7 +248,7 @@ static void __init register_insn_emulation_sysctl(void)
|
||||
sysctl->maxlen = sizeof(int);
|
||||
|
||||
sysctl->procname = insn->ops->name;
|
||||
sysctl->data = insn;
|
||||
sysctl->data = &insn->current_mode;
|
||||
sysctl->extra1 = &insn->min;
|
||||
sysctl->extra2 = &insn->max;
|
||||
sysctl->proc_handler = emulation_proc_handler;
|
||||
|
||||
@@ -552,7 +552,7 @@ ia64_get_irr(unsigned int vector)
|
||||
{
|
||||
unsigned int reg = vector / 64;
|
||||
unsigned int bit = vector % 64;
|
||||
u64 irr;
|
||||
unsigned long irr;
|
||||
|
||||
switch (reg) {
|
||||
case 0: irr = ia64_getreg(_IA64_REG_CR_IRR0); break;
|
||||
|
||||
@@ -86,11 +86,12 @@ static void octeon2_usb_clocks_start(struct device *dev)
|
||||
"refclk-frequency", &clock_rate);
|
||||
if (i) {
|
||||
dev_err(dev, "No UCTL \"refclk-frequency\"\n");
|
||||
of_node_put(uctl_node);
|
||||
goto exit;
|
||||
}
|
||||
i = of_property_read_string(uctl_node,
|
||||
"refclk-type", &clock_type);
|
||||
|
||||
of_node_put(uctl_node);
|
||||
if (!i && strcmp("crystal", clock_type) == 0)
|
||||
is_crystal_clock = true;
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ static void *c_start(struct seq_file *m, loff_t *pos)
|
||||
{
|
||||
unsigned long i = *pos;
|
||||
|
||||
return i < NR_CPUS ? (void *) (i + 1) : NULL;
|
||||
return i < nr_cpu_ids ? (void *) (i + 1) : NULL;
|
||||
}
|
||||
|
||||
static void *c_next(struct seq_file *m, void *v, loff_t *pos)
|
||||
|
||||
@@ -629,7 +629,7 @@ static __maybe_unused void build_convert_pte_to_entrylo(u32 **p,
|
||||
return;
|
||||
}
|
||||
|
||||
if (cpu_has_rixi && !!_PAGE_NO_EXEC) {
|
||||
if (cpu_has_rixi && _PAGE_NO_EXEC != 0) {
|
||||
if (fill_includes_sw_bits) {
|
||||
UASM_i_ROTR(p, reg, reg, ilog2(_PAGE_GLOBAL));
|
||||
} else {
|
||||
@@ -2568,7 +2568,7 @@ static void check_pabits(void)
|
||||
unsigned long entry;
|
||||
unsigned pabits, fillbits;
|
||||
|
||||
if (!cpu_has_rixi || !_PAGE_NO_EXEC) {
|
||||
if (!cpu_has_rixi || _PAGE_NO_EXEC == 0) {
|
||||
/*
|
||||
* We'll only be making use of the fact that we can rotate bits
|
||||
* into the fill if the CPU supports RIXI, so don't bother
|
||||
|
||||
@@ -50,7 +50,8 @@
|
||||
stw r13, PT_R13(sp)
|
||||
stw r14, PT_R14(sp)
|
||||
stw r15, PT_R15(sp)
|
||||
stw r2, PT_ORIG_R2(sp)
|
||||
movi r24, -1
|
||||
stw r24, PT_ORIG_R2(sp)
|
||||
stw r7, PT_ORIG_R7(sp)
|
||||
|
||||
stw ra, PT_RA(sp)
|
||||
|
||||
@@ -74,6 +74,8 @@ extern void show_regs(struct pt_regs *);
|
||||
((struct pt_regs *)((unsigned long)current_thread_info() + THREAD_SIZE)\
|
||||
- 1)
|
||||
|
||||
#define force_successful_syscall_return() (current_pt_regs()->orig_r2 = -1)
|
||||
|
||||
int do_syscall_trace_enter(void);
|
||||
void do_syscall_trace_exit(void);
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
@@ -185,6 +185,7 @@ ENTRY(handle_system_call)
|
||||
ldw r5, PT_R5(sp)
|
||||
|
||||
local_restart:
|
||||
stw r2, PT_ORIG_R2(sp)
|
||||
/* Check that the requested system call is within limits */
|
||||
movui r1, __NR_syscalls
|
||||
bgeu r2, r1, ret_invsyscall
|
||||
@@ -192,7 +193,6 @@ local_restart:
|
||||
movhi r11, %hiadj(sys_call_table)
|
||||
add r1, r1, r11
|
||||
ldw r1, %lo(sys_call_table)(r1)
|
||||
beq r1, r0, ret_invsyscall
|
||||
|
||||
/* Check if we are being traced */
|
||||
GET_THREAD_INFO r11
|
||||
@@ -213,6 +213,9 @@ local_restart:
|
||||
translate_rc_and_ret:
|
||||
movi r1, 0
|
||||
bge r2, zero, 3f
|
||||
ldw r1, PT_ORIG_R2(sp)
|
||||
addi r1, r1, 1
|
||||
beq r1, zero, 3f
|
||||
sub r2, zero, r2
|
||||
movi r1, 1
|
||||
3:
|
||||
@@ -255,9 +258,9 @@ traced_system_call:
|
||||
ldw r6, PT_R6(sp)
|
||||
ldw r7, PT_R7(sp)
|
||||
|
||||
/* Fetch the syscall function, we don't need to check the boundaries
|
||||
* since this is already done.
|
||||
*/
|
||||
/* Fetch the syscall function. */
|
||||
movui r1, __NR_syscalls
|
||||
bgeu r2, r1, traced_invsyscall
|
||||
slli r1, r2, 2
|
||||
movhi r11,%hiadj(sys_call_table)
|
||||
add r1, r1, r11
|
||||
@@ -276,6 +279,9 @@ traced_system_call:
|
||||
translate_rc_and_ret2:
|
||||
movi r1, 0
|
||||
bge r2, zero, 4f
|
||||
ldw r1, PT_ORIG_R2(sp)
|
||||
addi r1, r1, 1
|
||||
beq r1, zero, 4f
|
||||
sub r2, zero, r2
|
||||
movi r1, 1
|
||||
4:
|
||||
@@ -287,6 +293,11 @@ end_translate_rc_and_ret2:
|
||||
RESTORE_SWITCH_STACK
|
||||
br ret_from_exception
|
||||
|
||||
/* If the syscall number was invalid return ENOSYS */
|
||||
traced_invsyscall:
|
||||
movi r2, -ENOSYS
|
||||
br translate_rc_and_ret2
|
||||
|
||||
Luser_return:
|
||||
GET_THREAD_INFO r11 /* get thread_info pointer */
|
||||
ldw r10, TI_FLAGS(r11) /* get thread_info->flags */
|
||||
@@ -336,9 +347,6 @@ external_interrupt:
|
||||
/* skip if no interrupt is pending */
|
||||
beq r12, r0, ret_from_interrupt
|
||||
|
||||
movi r24, -1
|
||||
stw r24, PT_ORIG_R2(sp)
|
||||
|
||||
/*
|
||||
* Process an external hardware interrupt.
|
||||
*/
|
||||
|
||||
@@ -240,7 +240,7 @@ static int do_signal(struct pt_regs *regs)
|
||||
/*
|
||||
* If we were from a system call, check for system call restarting...
|
||||
*/
|
||||
if (regs->orig_r2 >= 0) {
|
||||
if (regs->orig_r2 >= 0 && regs->r1) {
|
||||
continue_addr = regs->ea;
|
||||
restart_addr = continue_addr - 4;
|
||||
retval = regs->r2;
|
||||
@@ -261,6 +261,7 @@ static int do_signal(struct pt_regs *regs)
|
||||
regs->ea = restart_addr;
|
||||
break;
|
||||
}
|
||||
regs->orig_r2 = -1;
|
||||
}
|
||||
|
||||
if (get_signal(&ksig)) {
|
||||
|
||||
@@ -13,5 +13,6 @@
|
||||
#define __SYSCALL(nr, call) [nr] = (call),
|
||||
|
||||
void *sys_call_table[__NR_syscalls] = {
|
||||
[0 ... __NR_syscalls-1] = sys_ni_syscall,
|
||||
#include <asm/unistd.h>
|
||||
};
|
||||
|
||||
@@ -520,7 +520,6 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path)
|
||||
dev->id.hversion_rev = iodc_data[1] & 0x0f;
|
||||
dev->id.sversion = ((iodc_data[4] & 0x0f) << 16) |
|
||||
(iodc_data[5] << 8) | iodc_data[6];
|
||||
dev->hpa.name = parisc_pathname(dev);
|
||||
dev->hpa.start = hpa;
|
||||
/* This is awkward. The STI spec says that gfx devices may occupy
|
||||
* 32MB or 64MB. Unfortunately, we don't know how to tell whether
|
||||
@@ -534,10 +533,10 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path)
|
||||
dev->hpa.end = hpa + 0xfff;
|
||||
}
|
||||
dev->hpa.flags = IORESOURCE_MEM;
|
||||
name = parisc_hardware_description(&dev->id);
|
||||
if (name) {
|
||||
strlcpy(dev->name, name, sizeof(dev->name));
|
||||
}
|
||||
dev->hpa.name = dev->name;
|
||||
name = parisc_hardware_description(&dev->id) ? : "unknown";
|
||||
snprintf(dev->name, sizeof(dev->name), "%s [%s]",
|
||||
name, parisc_pathname(dev));
|
||||
|
||||
/* Silently fail things like mouse ports which are subsumed within
|
||||
* the keyboard controller
|
||||
|
||||
@@ -413,7 +413,7 @@
|
||||
412 32 utimensat_time64 sys_utimensat sys_utimensat
|
||||
413 32 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64
|
||||
414 32 ppoll_time64 sys_ppoll compat_sys_ppoll_time64
|
||||
416 32 io_pgetevents_time64 sys_io_pgetevents sys_io_pgetevents
|
||||
416 32 io_pgetevents_time64 sys_io_pgetevents compat_sys_io_pgetevents_time64
|
||||
417 32 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64
|
||||
418 32 mq_timedsend_time64 sys_mq_timedsend sys_mq_timedsend
|
||||
419 32 mq_timedreceive_time64 sys_mq_timedreceive sys_mq_timedreceive
|
||||
|
||||
@@ -17,23 +17,6 @@ HAS_BIARCH := $(call cc-option-yn, -m32)
|
||||
# Set default 32 bits cross compilers for vdso and boot wrapper
|
||||
CROSS32_COMPILE ?=
|
||||
|
||||
ifeq ($(HAS_BIARCH),y)
|
||||
ifeq ($(CROSS32_COMPILE),)
|
||||
ifdef CONFIG_PPC32
|
||||
# These options will be overridden by any -mcpu option that the CPU
|
||||
# or platform code sets later on the command line, but they are needed
|
||||
# to set a sane 32-bit cpu target for the 64-bit cross compiler which
|
||||
# may default to the wrong ISA.
|
||||
KBUILD_CFLAGS += -mcpu=powerpc
|
||||
KBUILD_AFLAGS += -mcpu=powerpc
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_PPC_BOOK3S_32
|
||||
KBUILD_CFLAGS += -mcpu=powerpc
|
||||
endif
|
||||
|
||||
# If we're on a ppc/ppc64/ppc64le machine use that defconfig, otherwise just use
|
||||
# ppc64_defconfig because we have nothing better to go on.
|
||||
uname := $(shell uname -m)
|
||||
@@ -192,6 +175,7 @@ endif
|
||||
endif
|
||||
|
||||
CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU))
|
||||
AFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU))
|
||||
|
||||
# Altivec option not allowed with e500mc64 in GCC.
|
||||
ifdef CONFIG_ALTIVEC
|
||||
@@ -202,14 +186,6 @@ endif
|
||||
CFLAGS-$(CONFIG_E5500_CPU) += $(E5500_CPU)
|
||||
CFLAGS-$(CONFIG_E6500_CPU) += $(call cc-option,-mcpu=e6500,$(E5500_CPU))
|
||||
|
||||
ifdef CONFIG_PPC32
|
||||
ifdef CONFIG_PPC_E500MC
|
||||
CFLAGS-y += $(call cc-option,-mcpu=e500mc,-mcpu=powerpc)
|
||||
else
|
||||
CFLAGS-$(CONFIG_E500) += $(call cc-option,-mcpu=8540 -msoft-float,-mcpu=powerpc)
|
||||
endif
|
||||
endif
|
||||
|
||||
asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1)
|
||||
|
||||
KBUILD_CPPFLAGS += -I $(srctree)/arch/$(ARCH) $(asinstr)
|
||||
|
||||
@@ -66,23 +66,35 @@ void set_pci_dma_ops(const struct dma_map_ops *dma_ops)
|
||||
pci_dma_ops = dma_ops;
|
||||
}
|
||||
|
||||
/*
|
||||
* This function should run under locking protection, specifically
|
||||
* hose_spinlock.
|
||||
*/
|
||||
static int get_phb_number(struct device_node *dn)
|
||||
{
|
||||
int ret, phb_id = -1;
|
||||
u32 prop_32;
|
||||
u64 prop;
|
||||
|
||||
/*
|
||||
* Try fixed PHB numbering first, by checking archs and reading
|
||||
* the respective device-tree properties. Firstly, try powernv by
|
||||
* reading "ibm,opal-phbid", only present in OPAL environment.
|
||||
* the respective device-tree properties. Firstly, try reading
|
||||
* standard "linux,pci-domain", then try reading "ibm,opal-phbid"
|
||||
* (only present in powernv OPAL environment), then try device-tree
|
||||
* alias and as the last try to use lower bits of "reg" property.
|
||||
*/
|
||||
ret = of_property_read_u64(dn, "ibm,opal-phbid", &prop);
|
||||
ret = of_get_pci_domain_nr(dn);
|
||||
if (ret >= 0) {
|
||||
prop = ret;
|
||||
ret = 0;
|
||||
}
|
||||
if (ret)
|
||||
ret = of_property_read_u64(dn, "ibm,opal-phbid", &prop);
|
||||
|
||||
if (ret) {
|
||||
ret = of_alias_get_id(dn, "pci");
|
||||
if (ret >= 0) {
|
||||
prop = ret;
|
||||
ret = 0;
|
||||
}
|
||||
}
|
||||
if (ret) {
|
||||
u32 prop_32;
|
||||
ret = of_property_read_u32_index(dn, "reg", 1, &prop_32);
|
||||
prop = prop_32;
|
||||
}
|
||||
@@ -90,18 +102,20 @@ static int get_phb_number(struct device_node *dn)
|
||||
if (!ret)
|
||||
phb_id = (int)(prop & (MAX_PHBS - 1));
|
||||
|
||||
spin_lock(&hose_spinlock);
|
||||
|
||||
/* We need to be sure to not use the same PHB number twice. */
|
||||
if ((phb_id >= 0) && !test_and_set_bit(phb_id, phb_bitmap))
|
||||
return phb_id;
|
||||
goto out_unlock;
|
||||
|
||||
/*
|
||||
* If not pseries nor powernv, or if fixed PHB numbering tried to add
|
||||
* the same PHB number twice, then fallback to dynamic PHB numbering.
|
||||
*/
|
||||
/* If everything fails then fallback to dynamic PHB numbering. */
|
||||
phb_id = find_first_zero_bit(phb_bitmap, MAX_PHBS);
|
||||
BUG_ON(phb_id >= MAX_PHBS);
|
||||
set_bit(phb_id, phb_bitmap);
|
||||
|
||||
out_unlock:
|
||||
spin_unlock(&hose_spinlock);
|
||||
|
||||
return phb_id;
|
||||
}
|
||||
|
||||
@@ -112,10 +126,13 @@ struct pci_controller *pcibios_alloc_controller(struct device_node *dev)
|
||||
phb = zalloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL);
|
||||
if (phb == NULL)
|
||||
return NULL;
|
||||
spin_lock(&hose_spinlock);
|
||||
|
||||
phb->global_number = get_phb_number(dev);
|
||||
|
||||
spin_lock(&hose_spinlock);
|
||||
list_add_tail(&phb->list_node, &hose_list);
|
||||
spin_unlock(&hose_spinlock);
|
||||
|
||||
phb->dn = dev;
|
||||
phb->is_dynamic = slab_is_available();
|
||||
#ifdef CONFIG_PPC64
|
||||
|
||||
@@ -740,6 +740,13 @@ void __init early_init_devtree(void *params)
|
||||
of_scan_flat_dt(early_init_dt_scan_root, NULL);
|
||||
of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL);
|
||||
|
||||
/*
|
||||
* As generic code authors expect to be able to use static keys
|
||||
* in early_param() handlers, we initialize the static keys just
|
||||
* before parsing early params (it's fine to call jump_label_init()
|
||||
* more than once).
|
||||
*/
|
||||
jump_label_init();
|
||||
parse_early_param();
|
||||
|
||||
/* make sure we've parsed cmdline for mem= before this */
|
||||
|
||||
@@ -17,9 +17,9 @@ static const struct flag_info flag_array[] = {
|
||||
.clear = " ",
|
||||
}, {
|
||||
.mask = _PAGE_RW,
|
||||
.val = _PAGE_RW,
|
||||
.set = "rw",
|
||||
.clear = "r ",
|
||||
.val = 0,
|
||||
.set = "r ",
|
||||
.clear = "rw",
|
||||
}, {
|
||||
.mask = _PAGE_EXEC,
|
||||
.val = _PAGE_EXEC,
|
||||
|
||||
@@ -118,9 +118,9 @@ config GENERIC_CPU
|
||||
depends on PPC64 && CPU_LITTLE_ENDIAN
|
||||
select ARCH_HAS_FAST_MULTIPLIER
|
||||
|
||||
config GENERIC_CPU
|
||||
config POWERPC_CPU
|
||||
bool "Generic 32 bits powerpc"
|
||||
depends on PPC32 && !PPC_8xx
|
||||
depends on PPC32 && !PPC_8xx && !PPC_85xx
|
||||
|
||||
config CELL_CPU
|
||||
bool "Cell Broadband Engine"
|
||||
@@ -151,11 +151,11 @@ config POWER9_CPU
|
||||
|
||||
config E5500_CPU
|
||||
bool "Freescale e5500"
|
||||
depends on E500
|
||||
depends on PPC64 && E500
|
||||
|
||||
config E6500_CPU
|
||||
bool "Freescale e6500"
|
||||
depends on E500
|
||||
depends on PPC64 && E500
|
||||
|
||||
config 860_CPU
|
||||
bool "8xx family"
|
||||
@@ -174,11 +174,23 @@ config G4_CPU
|
||||
depends on PPC_BOOK3S_32
|
||||
select ALTIVEC
|
||||
|
||||
config E500_CPU
|
||||
bool "e500 (8540)"
|
||||
depends on PPC_85xx && !PPC_E500MC
|
||||
|
||||
config E500MC_CPU
|
||||
bool "e500mc"
|
||||
depends on PPC_85xx && PPC_E500MC
|
||||
|
||||
config TOOLCHAIN_DEFAULT_CPU
|
||||
bool "Rely on the toolchain's implicit default CPU"
|
||||
depends on PPC32
|
||||
|
||||
endchoice
|
||||
|
||||
config TARGET_CPU_BOOL
|
||||
bool
|
||||
default !GENERIC_CPU
|
||||
default !GENERIC_CPU && !TOOLCHAIN_DEFAULT_CPU
|
||||
|
||||
config TARGET_CPU
|
||||
string
|
||||
@@ -193,6 +205,9 @@ config TARGET_CPU
|
||||
default "e300c2" if E300C2_CPU
|
||||
default "e300c3" if E300C3_CPU
|
||||
default "G4" if G4_CPU
|
||||
default "8540" if E500_CPU
|
||||
default "e500mc" if E500MC_CPU
|
||||
default "powerpc" if POWERPC_CPU
|
||||
|
||||
config PPC_BOOK3S
|
||||
def_bool y
|
||||
|
||||
@@ -226,6 +226,7 @@ static int setup_msi_msg_address(struct pci_dev *dev, struct msi_msg *msg)
|
||||
if (!prop) {
|
||||
dev_dbg(&dev->dev,
|
||||
"axon_msi: no msi-address-(32|64) properties found\n");
|
||||
of_node_put(dn);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
|
||||
@@ -671,6 +671,7 @@ spufs_init_isolated_loader(void)
|
||||
return;
|
||||
|
||||
loader = of_get_property(dn, "loader", &size);
|
||||
of_node_put(dn);
|
||||
if (!loader)
|
||||
return;
|
||||
|
||||
|
||||
@@ -63,6 +63,8 @@ int powernv_get_random_real_mode(unsigned long *v)
|
||||
struct powernv_rng *rng;
|
||||
|
||||
rng = raw_cpu_read(powernv_rng);
|
||||
if (!rng)
|
||||
return 0;
|
||||
|
||||
*v = rng_whiten(rng, __raw_rm_readq(rng->regs_real));
|
||||
|
||||
|
||||
@@ -520,6 +520,7 @@ int fsl_add_bridge(struct platform_device *pdev, int is_primary)
|
||||
struct resource rsrc;
|
||||
const int *bus_range;
|
||||
u8 hdr_type, progif;
|
||||
u32 class_code;
|
||||
struct device_node *dev;
|
||||
struct ccsr_pci __iomem *pci;
|
||||
u16 temp;
|
||||
@@ -593,6 +594,13 @@ int fsl_add_bridge(struct platform_device *pdev, int is_primary)
|
||||
PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS;
|
||||
if (fsl_pcie_check_link(hose))
|
||||
hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK;
|
||||
/* Fix Class Code to PCI_CLASS_BRIDGE_PCI_NORMAL for pre-3.0 controller */
|
||||
if (in_be32(&pci->block_rev1) < PCIE_IP_REV_3_0) {
|
||||
early_read_config_dword(hose, 0, 0, PCIE_FSL_CSR_CLASSCODE, &class_code);
|
||||
class_code &= 0xff;
|
||||
class_code |= PCI_CLASS_BRIDGE_PCI_NORMAL << 8;
|
||||
early_write_config_dword(hose, 0, 0, PCIE_FSL_CSR_CLASSCODE, class_code);
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* Set PBFR(PCI Bus Function Register)[10] = 1 to
|
||||
|
||||
@@ -18,6 +18,7 @@ struct platform_device;
|
||||
|
||||
#define PCIE_LTSSM 0x0404 /* PCIE Link Training and Status */
|
||||
#define PCIE_LTSSM_L0 0x16 /* L0 state */
|
||||
#define PCIE_FSL_CSR_CLASSCODE 0x474 /* FSL GPEX CSR */
|
||||
#define PCIE_IP_REV_2_2 0x02080202 /* PCIE IP block version Rev2.2 */
|
||||
#define PCIE_IP_REV_3_0 0x02080300 /* PCIE IP block version Rev3.0 */
|
||||
#define PIWAR_EN 0x80000000 /* Enable */
|
||||
|
||||
@@ -683,6 +683,7 @@ static bool xive_get_max_prio(u8 *max_prio)
|
||||
}
|
||||
|
||||
reg = of_get_property(rootdn, "ibm,plat-res-int-priorities", &len);
|
||||
of_node_put(rootdn);
|
||||
if (!reg) {
|
||||
pr_err("Failed to read 'ibm,plat-res-int-priorities' property\n");
|
||||
return false;
|
||||
|
||||
@@ -18,9 +18,8 @@ static long riscv_sys_mmap(unsigned long addr, unsigned long len,
|
||||
if (unlikely(offset & (~PAGE_MASK >> page_shift_offset)))
|
||||
return -EINVAL;
|
||||
|
||||
if ((prot & PROT_WRITE) && (prot & PROT_EXEC))
|
||||
if (unlikely(!(prot & PROT_READ)))
|
||||
return -EINVAL;
|
||||
if (unlikely((prot & PROT_WRITE) && !(prot & PROT_READ)))
|
||||
return -EINVAL;
|
||||
|
||||
return ksys_mmap_pgoff(addr, len, prot, flags, fd,
|
||||
offset >> (PAGE_SHIFT - page_shift_offset));
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <linux/mm.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/kexec.h>
|
||||
|
||||
#include <asm/processor.h>
|
||||
#include <asm/ptrace.h>
|
||||
@@ -43,6 +44,9 @@ void die(struct pt_regs *regs, const char *str)
|
||||
|
||||
ret = notify_die(DIE_OOPS, str, regs, 0, regs->scause, SIGSEGV);
|
||||
|
||||
if (regs && kexec_should_crash(current))
|
||||
crash_kexec(regs);
|
||||
|
||||
bust_spinlocks(0);
|
||||
add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
|
||||
spin_unlock_irq(&die_lock);
|
||||
|
||||
@@ -29,6 +29,7 @@ int s390_verify_sig(const char *kernel, unsigned long kernel_len)
|
||||
const unsigned long marker_len = sizeof(MODULE_SIG_STRING) - 1;
|
||||
struct module_signature *ms;
|
||||
unsigned long sig_len;
|
||||
int ret;
|
||||
|
||||
/* Skip signature verification when not secure IPLed. */
|
||||
if (!ipl_secure_flag)
|
||||
@@ -63,11 +64,18 @@ int s390_verify_sig(const char *kernel, unsigned long kernel_len)
|
||||
return -EBADMSG;
|
||||
}
|
||||
|
||||
return verify_pkcs7_signature(kernel, kernel_len,
|
||||
kernel + kernel_len, sig_len,
|
||||
VERIFY_USE_PLATFORM_KEYRING,
|
||||
VERIFYING_MODULE_SIGNATURE,
|
||||
NULL, NULL);
|
||||
ret = verify_pkcs7_signature(kernel, kernel_len,
|
||||
kernel + kernel_len, sig_len,
|
||||
VERIFY_USE_SECONDARY_KEYRING,
|
||||
VERIFYING_MODULE_SIGNATURE,
|
||||
NULL, NULL);
|
||||
if (ret == -ENOKEY && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING))
|
||||
ret = verify_pkcs7_signature(kernel, kernel_len,
|
||||
kernel + kernel_len, sig_len,
|
||||
VERIFY_USE_PLATFORM_KEYRING,
|
||||
VERIFYING_MODULE_SIGNATURE,
|
||||
NULL, NULL);
|
||||
return ret;
|
||||
}
|
||||
#endif /* CONFIG_KEXEC_SIG */
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <sched.h>
|
||||
#include <errno.h>
|
||||
@@ -641,10 +642,24 @@ void halt_skas(void)
|
||||
UML_LONGJMP(&initial_jmpbuf, INIT_JMP_HALT);
|
||||
}
|
||||
|
||||
static bool noreboot;
|
||||
|
||||
static int __init noreboot_cmd_param(char *str, int *add)
|
||||
{
|
||||
noreboot = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
__uml_setup("noreboot", noreboot_cmd_param,
|
||||
"noreboot\n"
|
||||
" Rather than rebooting, exit always, akin to QEMU's -no-reboot option.\n"
|
||||
" This is useful if you're using CONFIG_PANIC_TIMEOUT in order to catch\n"
|
||||
" crashes in CI\n");
|
||||
|
||||
void reboot_skas(void)
|
||||
{
|
||||
block_signals_trace();
|
||||
UML_LONGJMP(&initial_jmpbuf, INIT_JMP_REBOOT);
|
||||
UML_LONGJMP(&initial_jmpbuf, noreboot ? INIT_JMP_HALT : INIT_JMP_REBOOT);
|
||||
}
|
||||
|
||||
void __switch_mm(struct mm_id *mm_idp)
|
||||
|
||||
@@ -100,7 +100,7 @@ $(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE
|
||||
AFLAGS_header.o += -I$(objtree)/$(obj)
|
||||
$(obj)/header.o: $(obj)/zoffset.h
|
||||
|
||||
LDFLAGS_setup.elf := -m elf_i386 -T
|
||||
LDFLAGS_setup.elf := -m elf_i386 -z noexecstack -T
|
||||
$(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
|
||||
$(call if_changed,ld)
|
||||
|
||||
|
||||
@@ -57,6 +57,10 @@ else
|
||||
KBUILD_LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \
|
||||
&& echo "-z noreloc-overflow -pie --no-dynamic-linker")
|
||||
endif
|
||||
|
||||
KBUILD_LDFLAGS += -z noexecstack
|
||||
KBUILD_LDFLAGS += $(call ld-option,--no-warn-rwx-segments)
|
||||
|
||||
LDFLAGS_vmlinux := -T
|
||||
|
||||
hostprogs-y := mkpiggy
|
||||
|
||||
@@ -178,7 +178,7 @@ quiet_cmd_vdso = VDSO $@
|
||||
sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@'
|
||||
|
||||
VDSO_LDFLAGS = -shared --hash-style=both --build-id \
|
||||
$(call ld-option, --eh-frame-hdr) -Bsymbolic
|
||||
$(call ld-option, --eh-frame-hdr) -Bsymbolic -z noexecstack
|
||||
GCOV_PROFILE := n
|
||||
|
||||
quiet_cmd_vdso_and_check = VDSO $@
|
||||
|
||||
@@ -27,6 +27,11 @@ static __init int register_e820_pmem(void)
|
||||
* simply here to trigger the module to load on demand.
|
||||
*/
|
||||
pdev = platform_device_alloc("e820_pmem", -1);
|
||||
return platform_device_add(pdev);
|
||||
|
||||
rc = platform_device_add(pdev);
|
||||
if (rc)
|
||||
platform_device_put(pdev);
|
||||
|
||||
return rc;
|
||||
}
|
||||
device_initcall(register_e820_pmem);
|
||||
|
||||
@@ -659,6 +659,10 @@ static void amd_e400_idle(void)
|
||||
*/
|
||||
static int prefer_mwait_c1_over_halt(const struct cpuinfo_x86 *c)
|
||||
{
|
||||
/* User has disallowed the use of MWAIT. Fallback to HALT */
|
||||
if (boot_option_idle_override == IDLE_NOMWAIT)
|
||||
return 0;
|
||||
|
||||
if (c->x86_vendor != X86_VENDOR_INTEL)
|
||||
return 0;
|
||||
|
||||
@@ -769,9 +773,8 @@ static int __init idle_setup(char *str)
|
||||
} else if (!strcmp(str, "nomwait")) {
|
||||
/*
|
||||
* If the boot option of "idle=nomwait" is added,
|
||||
* it means that mwait will be disabled for CPU C2/C3
|
||||
* states. In such case it won't touch the variable
|
||||
* of boot_option_idle_override.
|
||||
* it means that mwait will be disabled for CPU C1/C2/C3
|
||||
* states.
|
||||
*/
|
||||
boot_option_idle_override = IDLE_NOMWAIT;
|
||||
} else
|
||||
|
||||
@@ -1753,16 +1753,6 @@ static int __load_segment_descriptor(struct x86_emulate_ctxt *ctxt,
|
||||
case VCPU_SREG_TR:
|
||||
if (seg_desc.s || (seg_desc.type != 1 && seg_desc.type != 9))
|
||||
goto exception;
|
||||
if (!seg_desc.p) {
|
||||
err_vec = NP_VECTOR;
|
||||
goto exception;
|
||||
}
|
||||
old_desc = seg_desc;
|
||||
seg_desc.type |= 2; /* busy */
|
||||
ret = ctxt->ops->cmpxchg_emulated(ctxt, desc_addr, &old_desc, &seg_desc,
|
||||
sizeof(seg_desc), &ctxt->exception);
|
||||
if (ret != X86EMUL_CONTINUE)
|
||||
return ret;
|
||||
break;
|
||||
case VCPU_SREG_LDTR:
|
||||
if (seg_desc.s || seg_desc.type != 2)
|
||||
@@ -1800,8 +1790,17 @@ static int __load_segment_descriptor(struct x86_emulate_ctxt *ctxt,
|
||||
if (ret != X86EMUL_CONTINUE)
|
||||
return ret;
|
||||
if (emul_is_noncanonical_address(get_desc_base(&seg_desc) |
|
||||
((u64)base3 << 32), ctxt))
|
||||
return emulate_gp(ctxt, 0);
|
||||
((u64)base3 << 32), ctxt))
|
||||
return emulate_gp(ctxt, err_code);
|
||||
}
|
||||
|
||||
if (seg == VCPU_SREG_TR) {
|
||||
old_desc = seg_desc;
|
||||
seg_desc.type |= 2; /* busy */
|
||||
ret = ctxt->ops->cmpxchg_emulated(ctxt, desc_addr, &old_desc, &seg_desc,
|
||||
sizeof(seg_desc), &ctxt->exception);
|
||||
if (ret != X86EMUL_CONTINUE)
|
||||
return ret;
|
||||
}
|
||||
load:
|
||||
ctxt->ops->set_segment(ctxt, selector, &seg_desc, base3, seg);
|
||||
|
||||
@@ -309,6 +309,9 @@ static int synic_set_irq(struct kvm_vcpu_hv_synic *synic, u32 sint)
|
||||
struct kvm_lapic_irq irq;
|
||||
int ret, vector;
|
||||
|
||||
if (KVM_BUG_ON(!lapic_in_kernel(vcpu), vcpu->kvm))
|
||||
return -EINVAL;
|
||||
|
||||
if (sint >= ARRAY_SIZE(synic->sint))
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
@@ -955,6 +955,10 @@ bool kvm_irq_delivery_to_apic_fast(struct kvm *kvm, struct kvm_lapic *src,
|
||||
*r = -1;
|
||||
|
||||
if (irq->shorthand == APIC_DEST_SELF) {
|
||||
if (KVM_BUG_ON(!src, kvm)) {
|
||||
*r = 0;
|
||||
return true;
|
||||
}
|
||||
*r = kvm_apic_set_irq(src->vcpu, irq, dest_map);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -5137,8 +5137,6 @@ static void svm_set_irq(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
struct vcpu_svm *svm = to_svm(vcpu);
|
||||
|
||||
BUG_ON(!(gif_set(svm)));
|
||||
|
||||
trace_kvm_inj_virq(vcpu->arch.interrupt.nr);
|
||||
++vcpu->stat.irq_injections;
|
||||
|
||||
|
||||
@@ -1060,7 +1060,7 @@ static int vmx_restore_vmx_basic(struct vcpu_vmx *vmx, u64 data)
|
||||
BIT_ULL(49) | BIT_ULL(54) | BIT_ULL(55) |
|
||||
/* reserved */
|
||||
BIT_ULL(31) | GENMASK_ULL(47, 45) | GENMASK_ULL(63, 56);
|
||||
u64 vmx_basic = vmx->nested.msrs.basic;
|
||||
u64 vmx_basic = vmcs_config.nested.basic;
|
||||
|
||||
if (!is_bitwise_subset(vmx_basic, data, feature_and_reserved))
|
||||
return -EINVAL;
|
||||
@@ -1083,36 +1083,42 @@ static int vmx_restore_vmx_basic(struct vcpu_vmx *vmx, u64 data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
vmx_restore_control_msr(struct vcpu_vmx *vmx, u32 msr_index, u64 data)
|
||||
static void vmx_get_control_msr(struct nested_vmx_msrs *msrs, u32 msr_index,
|
||||
u32 **low, u32 **high)
|
||||
{
|
||||
u64 supported;
|
||||
u32 *lowp, *highp;
|
||||
|
||||
switch (msr_index) {
|
||||
case MSR_IA32_VMX_TRUE_PINBASED_CTLS:
|
||||
lowp = &vmx->nested.msrs.pinbased_ctls_low;
|
||||
highp = &vmx->nested.msrs.pinbased_ctls_high;
|
||||
*low = &msrs->pinbased_ctls_low;
|
||||
*high = &msrs->pinbased_ctls_high;
|
||||
break;
|
||||
case MSR_IA32_VMX_TRUE_PROCBASED_CTLS:
|
||||
lowp = &vmx->nested.msrs.procbased_ctls_low;
|
||||
highp = &vmx->nested.msrs.procbased_ctls_high;
|
||||
*low = &msrs->procbased_ctls_low;
|
||||
*high = &msrs->procbased_ctls_high;
|
||||
break;
|
||||
case MSR_IA32_VMX_TRUE_EXIT_CTLS:
|
||||
lowp = &vmx->nested.msrs.exit_ctls_low;
|
||||
highp = &vmx->nested.msrs.exit_ctls_high;
|
||||
*low = &msrs->exit_ctls_low;
|
||||
*high = &msrs->exit_ctls_high;
|
||||
break;
|
||||
case MSR_IA32_VMX_TRUE_ENTRY_CTLS:
|
||||
lowp = &vmx->nested.msrs.entry_ctls_low;
|
||||
highp = &vmx->nested.msrs.entry_ctls_high;
|
||||
*low = &msrs->entry_ctls_low;
|
||||
*high = &msrs->entry_ctls_high;
|
||||
break;
|
||||
case MSR_IA32_VMX_PROCBASED_CTLS2:
|
||||
lowp = &vmx->nested.msrs.secondary_ctls_low;
|
||||
highp = &vmx->nested.msrs.secondary_ctls_high;
|
||||
*low = &msrs->secondary_ctls_low;
|
||||
*high = &msrs->secondary_ctls_high;
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
vmx_restore_control_msr(struct vcpu_vmx *vmx, u32 msr_index, u64 data)
|
||||
{
|
||||
u32 *lowp, *highp;
|
||||
u64 supported;
|
||||
|
||||
vmx_get_control_msr(&vmcs_config.nested, msr_index, &lowp, &highp);
|
||||
|
||||
supported = vmx_control_msr(*lowp, *highp);
|
||||
|
||||
@@ -1124,6 +1130,7 @@ vmx_restore_control_msr(struct vcpu_vmx *vmx, u32 msr_index, u64 data)
|
||||
if (!is_bitwise_subset(supported, data, GENMASK_ULL(63, 32)))
|
||||
return -EINVAL;
|
||||
|
||||
vmx_get_control_msr(&vmx->nested.msrs, msr_index, &lowp, &highp);
|
||||
*lowp = data;
|
||||
*highp = data >> 32;
|
||||
return 0;
|
||||
@@ -1137,10 +1144,8 @@ static int vmx_restore_vmx_misc(struct vcpu_vmx *vmx, u64 data)
|
||||
BIT_ULL(28) | BIT_ULL(29) | BIT_ULL(30) |
|
||||
/* reserved */
|
||||
GENMASK_ULL(13, 9) | BIT_ULL(31);
|
||||
u64 vmx_misc;
|
||||
|
||||
vmx_misc = vmx_control_msr(vmx->nested.msrs.misc_low,
|
||||
vmx->nested.msrs.misc_high);
|
||||
u64 vmx_misc = vmx_control_msr(vmcs_config.nested.misc_low,
|
||||
vmcs_config.nested.misc_high);
|
||||
|
||||
if (!is_bitwise_subset(vmx_misc, data, feature_and_reserved_bits))
|
||||
return -EINVAL;
|
||||
@@ -1168,10 +1173,8 @@ static int vmx_restore_vmx_misc(struct vcpu_vmx *vmx, u64 data)
|
||||
|
||||
static int vmx_restore_vmx_ept_vpid_cap(struct vcpu_vmx *vmx, u64 data)
|
||||
{
|
||||
u64 vmx_ept_vpid_cap;
|
||||
|
||||
vmx_ept_vpid_cap = vmx_control_msr(vmx->nested.msrs.ept_caps,
|
||||
vmx->nested.msrs.vpid_caps);
|
||||
u64 vmx_ept_vpid_cap = vmx_control_msr(vmcs_config.nested.ept_caps,
|
||||
vmcs_config.nested.vpid_caps);
|
||||
|
||||
/* Every bit is either reserved or a feature bit. */
|
||||
if (!is_bitwise_subset(vmx_ept_vpid_cap, data, -1ULL))
|
||||
@@ -1182,20 +1185,21 @@ static int vmx_restore_vmx_ept_vpid_cap(struct vcpu_vmx *vmx, u64 data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vmx_restore_fixed0_msr(struct vcpu_vmx *vmx, u32 msr_index, u64 data)
|
||||
static u64 *vmx_get_fixed0_msr(struct nested_vmx_msrs *msrs, u32 msr_index)
|
||||
{
|
||||
u64 *msr;
|
||||
|
||||
switch (msr_index) {
|
||||
case MSR_IA32_VMX_CR0_FIXED0:
|
||||
msr = &vmx->nested.msrs.cr0_fixed0;
|
||||
break;
|
||||
return &msrs->cr0_fixed0;
|
||||
case MSR_IA32_VMX_CR4_FIXED0:
|
||||
msr = &vmx->nested.msrs.cr4_fixed0;
|
||||
break;
|
||||
return &msrs->cr4_fixed0;
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
}
|
||||
|
||||
static int vmx_restore_fixed0_msr(struct vcpu_vmx *vmx, u32 msr_index, u64 data)
|
||||
{
|
||||
const u64 *msr = vmx_get_fixed0_msr(&vmcs_config.nested, msr_index);
|
||||
|
||||
/*
|
||||
* 1 bits (which indicates bits which "must-be-1" during VMX operation)
|
||||
@@ -1204,7 +1208,7 @@ static int vmx_restore_fixed0_msr(struct vcpu_vmx *vmx, u32 msr_index, u64 data)
|
||||
if (!is_bitwise_subset(data, *msr, -1ULL))
|
||||
return -EINVAL;
|
||||
|
||||
*msr = data;
|
||||
*vmx_get_fixed0_msr(&vmx->nested.msrs, msr_index) = data;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1265,7 +1269,7 @@ int vmx_set_vmx_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data)
|
||||
vmx->nested.msrs.vmcs_enum = data;
|
||||
return 0;
|
||||
case MSR_IA32_VMX_VMFUNC:
|
||||
if (data & ~vmx->nested.msrs.vmfunc_controls)
|
||||
if (data & ~vmcs_config.nested.vmfunc_controls)
|
||||
return -EINVAL;
|
||||
vmx->nested.msrs.vmfunc_controls = data;
|
||||
return 0;
|
||||
@@ -3065,10 +3069,12 @@ enum nvmx_vmentry_status nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu,
|
||||
if (likely(!evaluate_pending_interrupts) && kvm_vcpu_apicv_active(vcpu))
|
||||
evaluate_pending_interrupts |= vmx_has_apicv_interrupt(vcpu);
|
||||
|
||||
if (!(vmcs12->vm_entry_controls & VM_ENTRY_LOAD_DEBUG_CONTROLS))
|
||||
if (!vmx->nested.nested_run_pending ||
|
||||
!(vmcs12->vm_entry_controls & VM_ENTRY_LOAD_DEBUG_CONTROLS))
|
||||
vmx->nested.vmcs01_debugctl = vmcs_read64(GUEST_IA32_DEBUGCTL);
|
||||
if (kvm_mpx_supported() &&
|
||||
!(vmcs12->vm_entry_controls & VM_ENTRY_LOAD_BNDCFGS))
|
||||
(!vmx->nested.nested_run_pending ||
|
||||
!(vmcs12->vm_entry_controls & VM_ENTRY_LOAD_BNDCFGS)))
|
||||
vmx->nested.vmcs01_guest_bndcfgs = vmcs_read64(GUEST_BNDCFGS);
|
||||
|
||||
/*
|
||||
|
||||
@@ -822,7 +822,7 @@ void debug_cpumask_set_cpu(int cpu, int node, bool enable)
|
||||
return;
|
||||
}
|
||||
mask = node_to_cpumask_map[node];
|
||||
if (!mask) {
|
||||
if (!cpumask_available(mask)) {
|
||||
pr_err("node_to_cpumask_map[%i] NULL\n", node);
|
||||
dump_stack();
|
||||
return;
|
||||
@@ -868,7 +868,7 @@ const struct cpumask *cpumask_of_node(int node)
|
||||
dump_stack();
|
||||
return cpu_none_mask;
|
||||
}
|
||||
if (node_to_cpumask_map[node] == NULL) {
|
||||
if (!cpumask_available(node_to_cpumask_map[node])) {
|
||||
printk(KERN_WARNING
|
||||
"cpumask_of_node(%d): no node_to_cpumask_map!\n",
|
||||
node);
|
||||
|
||||
@@ -81,7 +81,7 @@ static void send_ebook_state(void)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!!test_bit(SW_TABLET_MODE, ebook_switch_idev->sw) == state)
|
||||
if (test_bit(SW_TABLET_MODE, ebook_switch_idev->sw) == !!state)
|
||||
return; /* Nothing new to report. */
|
||||
|
||||
input_report_switch(ebook_switch_idev, SW_TABLET_MODE, state);
|
||||
|
||||
@@ -883,6 +883,9 @@ void blk_mq_debugfs_register_hctx(struct request_queue *q,
|
||||
char name[20];
|
||||
int i;
|
||||
|
||||
if (!q->debugfs_dir)
|
||||
return;
|
||||
|
||||
snprintf(name, sizeof(name), "hctx%u", hctx->queue_num);
|
||||
hctx->debugfs_dir = debugfs_create_dir(name, q->debugfs_dir);
|
||||
|
||||
|
||||
@@ -401,6 +401,9 @@ static int register_device_clock(struct acpi_device *adev,
|
||||
if (!lpss_clk_dev)
|
||||
lpt_register_clock_device();
|
||||
|
||||
if (IS_ERR(lpss_clk_dev))
|
||||
return PTR_ERR(lpss_clk_dev);
|
||||
|
||||
clk_data = platform_get_drvdata(lpss_clk_dev);
|
||||
if (!clk_data)
|
||||
return -ENODEV;
|
||||
|
||||
@@ -626,33 +626,6 @@ int pcc_data_alloc(int pcc_ss_id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Check if CPPC revision + num_ent combination is supported */
|
||||
static bool is_cppc_supported(int revision, int num_ent)
|
||||
{
|
||||
int expected_num_ent;
|
||||
|
||||
switch (revision) {
|
||||
case CPPC_V2_REV:
|
||||
expected_num_ent = CPPC_V2_NUM_ENT;
|
||||
break;
|
||||
case CPPC_V3_REV:
|
||||
expected_num_ent = CPPC_V3_NUM_ENT;
|
||||
break;
|
||||
default:
|
||||
pr_debug("Firmware exports unsupported CPPC revision: %d\n",
|
||||
revision);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (expected_num_ent != num_ent) {
|
||||
pr_debug("Firmware exports %d entries. Expected: %d for CPPC rev:%d\n",
|
||||
num_ent, expected_num_ent, revision);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* An example CPC table looks like the following.
|
||||
*
|
||||
@@ -748,7 +721,6 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
|
||||
cpc_obj->type);
|
||||
goto out_free;
|
||||
}
|
||||
cpc_ptr->num_entries = num_ent;
|
||||
|
||||
/* Second entry should be revision. */
|
||||
cpc_obj = &out_obj->package.elements[1];
|
||||
@@ -759,10 +731,32 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
|
||||
cpc_obj->type);
|
||||
goto out_free;
|
||||
}
|
||||
cpc_ptr->version = cpc_rev;
|
||||
|
||||
if (!is_cppc_supported(cpc_rev, num_ent))
|
||||
if (cpc_rev < CPPC_V2_REV) {
|
||||
pr_debug("Unsupported _CPC Revision (%d) for CPU:%d\n", cpc_rev,
|
||||
pr->id);
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
/*
|
||||
* Disregard _CPC if the number of entries in the return pachage is not
|
||||
* as expected, but support future revisions being proper supersets of
|
||||
* the v3 and only causing more entries to be returned by _CPC.
|
||||
*/
|
||||
if ((cpc_rev == CPPC_V2_REV && num_ent != CPPC_V2_NUM_ENT) ||
|
||||
(cpc_rev == CPPC_V3_REV && num_ent != CPPC_V3_NUM_ENT) ||
|
||||
(cpc_rev > CPPC_V3_REV && num_ent <= CPPC_V3_NUM_ENT)) {
|
||||
pr_debug("Unexpected number of _CPC return package entries (%d) for CPU:%d\n",
|
||||
num_ent, pr->id);
|
||||
goto out_free;
|
||||
}
|
||||
if (cpc_rev > CPPC_V3_REV) {
|
||||
num_ent = CPPC_V3_NUM_ENT;
|
||||
cpc_rev = CPPC_V3_REV;
|
||||
}
|
||||
|
||||
cpc_ptr->num_entries = num_ent;
|
||||
cpc_ptr->version = cpc_rev;
|
||||
|
||||
/* Iterate through remaining entries in _CPC */
|
||||
for (i = 2; i < num_ent; i++) {
|
||||
|
||||
@@ -2118,13 +2118,6 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_FAMILY, "Thinkpad X1 Carbon 6th"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.ident = "ThinkPad X1 Carbon 6th",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_FAMILY, "ThinkPad X1 Carbon 6th"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.ident = "ThinkPad X1 Yoga 3rd",
|
||||
.matches = {
|
||||
|
||||
@@ -41,6 +41,8 @@ struct mcfg_fixup {
|
||||
static struct mcfg_fixup mcfg_quirks[] = {
|
||||
/* { OEM_ID, OEM_TABLE_ID, REV, SEGMENT, BUS_RANGE, ops, cfgres }, */
|
||||
|
||||
#ifdef CONFIG_ARM64
|
||||
|
||||
#define AL_ECAM(table_id, rev, seg, ops) \
|
||||
{ "AMAZON", table_id, rev, seg, MCFG_BUS_ANY, ops }
|
||||
|
||||
@@ -162,6 +164,7 @@ static struct mcfg_fixup mcfg_quirks[] = {
|
||||
ALTRA_ECAM_QUIRK(1, 13),
|
||||
ALTRA_ECAM_QUIRK(1, 14),
|
||||
ALTRA_ECAM_QUIRK(1, 15),
|
||||
#endif /* ARM64 */
|
||||
};
|
||||
|
||||
static char mcfg_oem_id[ACPI_OEM_ID_SIZE];
|
||||
|
||||
@@ -152,10 +152,10 @@ static bool acpi_nondev_subnode_ok(acpi_handle scope,
|
||||
return acpi_nondev_subnode_data_ok(handle, link, list, parent);
|
||||
}
|
||||
|
||||
static int acpi_add_nondev_subnodes(acpi_handle scope,
|
||||
const union acpi_object *links,
|
||||
struct list_head *list,
|
||||
struct fwnode_handle *parent)
|
||||
static bool acpi_add_nondev_subnodes(acpi_handle scope,
|
||||
const union acpi_object *links,
|
||||
struct list_head *list,
|
||||
struct fwnode_handle *parent)
|
||||
{
|
||||
bool ret = false;
|
||||
int i;
|
||||
|
||||
@@ -361,6 +361,14 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "80E3"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = init_nvs_save_s3,
|
||||
.ident = "Lenovo G40-45",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "80E1"),
|
||||
},
|
||||
},
|
||||
/*
|
||||
* ThinkPad X1 Tablet(2016) cannot do suspend-to-idle using
|
||||
* the Low Power S0 Idle firmware interface (see
|
||||
|
||||
@@ -2329,6 +2329,7 @@ const char *ata_get_cmd_descript(u8 command)
|
||||
{ ATA_CMD_WRITE_QUEUED_FUA_EXT, "WRITE DMA QUEUED FUA EXT" },
|
||||
{ ATA_CMD_FPDMA_READ, "READ FPDMA QUEUED" },
|
||||
{ ATA_CMD_FPDMA_WRITE, "WRITE FPDMA QUEUED" },
|
||||
{ ATA_CMD_NCQ_NON_DATA, "NCQ NON-DATA" },
|
||||
{ ATA_CMD_FPDMA_SEND, "SEND FPDMA QUEUED" },
|
||||
{ ATA_CMD_FPDMA_RECV, "RECEIVE FPDMA QUEUED" },
|
||||
{ ATA_CMD_PIO_READ, "READ SECTOR(S)" },
|
||||
|
||||
@@ -3766,6 +3766,7 @@ static void __exit idt77252_exit(void)
|
||||
card = idt77252_chain;
|
||||
dev = card->atmdev;
|
||||
idt77252_chain = card->next;
|
||||
del_timer_sync(&card->tst_timer);
|
||||
|
||||
if (dev->phy->stop)
|
||||
dev->phy->stop(dev);
|
||||
|
||||
@@ -1037,6 +1037,7 @@ static void __driver_attach_async_helper(void *_dev, async_cookie_t cookie)
|
||||
static int __driver_attach(struct device *dev, void *data)
|
||||
{
|
||||
struct device_driver *drv = data;
|
||||
bool async = false;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
@@ -1074,9 +1075,11 @@ static int __driver_attach(struct device *dev, void *data)
|
||||
if (!dev->driver) {
|
||||
get_device(dev);
|
||||
dev->p->async_driver = drv;
|
||||
async_schedule_dev(__driver_attach_async_helper, dev);
|
||||
async = true;
|
||||
}
|
||||
device_unlock(dev);
|
||||
if (async)
|
||||
async_schedule_dev(__driver_attach_async_helper, dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1711,8 +1711,13 @@ static int null_add_dev(struct nullb_device *dev)
|
||||
blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, nullb->q);
|
||||
|
||||
mutex_lock(&lock);
|
||||
nullb->index = ida_simple_get(&nullb_indexes, 0, 0, GFP_KERNEL);
|
||||
dev->index = nullb->index;
|
||||
rv = ida_simple_get(&nullb_indexes, 0, 0, GFP_KERNEL);
|
||||
if (rv < 0) {
|
||||
mutex_unlock(&lock);
|
||||
goto out_cleanup_zone;
|
||||
}
|
||||
nullb->index = rv;
|
||||
dev->index = rv;
|
||||
mutex_unlock(&lock);
|
||||
|
||||
blk_queue_logical_block_size(nullb->q, dev->blocksize);
|
||||
@@ -1724,13 +1729,16 @@ static int null_add_dev(struct nullb_device *dev)
|
||||
|
||||
rv = null_gendisk_register(nullb);
|
||||
if (rv)
|
||||
goto out_cleanup_zone;
|
||||
goto out_ida_free;
|
||||
|
||||
mutex_lock(&lock);
|
||||
list_add_tail(&nullb->list, &nullb_list);
|
||||
mutex_unlock(&lock);
|
||||
|
||||
return 0;
|
||||
|
||||
out_ida_free:
|
||||
ida_free(&nullb_indexes, nullb->index);
|
||||
out_cleanup_zone:
|
||||
if (dev->zoned)
|
||||
null_zone_exit(dev);
|
||||
|
||||
@@ -1230,7 +1230,11 @@ static struct platform_driver intel_driver = {
|
||||
|
||||
int __init intel_init(void)
|
||||
{
|
||||
platform_driver_register(&intel_driver);
|
||||
int err;
|
||||
|
||||
err = platform_driver_register(&intel_driver);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
return hci_uart_register_proto(&intel_proto);
|
||||
}
|
||||
|
||||
@@ -504,13 +504,13 @@ static int hisi_lpc_acpi_probe(struct device *hostdev)
|
||||
{
|
||||
struct acpi_device *adev = ACPI_COMPANION(hostdev);
|
||||
struct acpi_device *child;
|
||||
struct platform_device *pdev;
|
||||
int ret;
|
||||
|
||||
/* Only consider the children of the host */
|
||||
list_for_each_entry(child, &adev->children, node) {
|
||||
const char *hid = acpi_device_hid(child);
|
||||
const struct hisi_lpc_acpi_cell *cell;
|
||||
struct platform_device *pdev;
|
||||
const struct resource *res;
|
||||
bool found = false;
|
||||
int num_res;
|
||||
@@ -572,22 +572,24 @@ static int hisi_lpc_acpi_probe(struct device *hostdev)
|
||||
|
||||
ret = platform_device_add_resources(pdev, res, num_res);
|
||||
if (ret)
|
||||
goto fail;
|
||||
goto fail_put_device;
|
||||
|
||||
ret = platform_device_add_data(pdev, cell->pdata,
|
||||
cell->pdata_size);
|
||||
if (ret)
|
||||
goto fail;
|
||||
goto fail_put_device;
|
||||
|
||||
ret = platform_device_add(pdev);
|
||||
if (ret)
|
||||
goto fail;
|
||||
goto fail_put_device;
|
||||
|
||||
acpi_device_set_enumerated(child);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
fail_put_device:
|
||||
platform_device_put(pdev);
|
||||
fail:
|
||||
hisi_lpc_acpi_remove(hostdev);
|
||||
return ret;
|
||||
|
||||
@@ -25,7 +25,7 @@ static int mtk_reset_assert_set_clr(struct reset_controller_dev *rcdev,
|
||||
struct mtk_reset *data = container_of(rcdev, struct mtk_reset, rcdev);
|
||||
unsigned int reg = data->regofs + ((id / 32) << 4);
|
||||
|
||||
return regmap_write(data->regmap, reg, 1);
|
||||
return regmap_write(data->regmap, reg, BIT(id % 32));
|
||||
}
|
||||
|
||||
static int mtk_reset_deassert_set_clr(struct reset_controller_dev *rcdev,
|
||||
@@ -34,7 +34,7 @@ static int mtk_reset_deassert_set_clr(struct reset_controller_dev *rcdev,
|
||||
struct mtk_reset *data = container_of(rcdev, struct mtk_reset, rcdev);
|
||||
unsigned int reg = data->regofs + ((id / 32) << 4) + 0x4;
|
||||
|
||||
return regmap_write(data->regmap, reg, 1);
|
||||
return regmap_write(data->regmap, reg, BIT(id % 32));
|
||||
}
|
||||
|
||||
static int mtk_reset_assert(struct reset_controller_dev *rcdev,
|
||||
|
||||
@@ -1521,6 +1521,8 @@ static struct clk_branch cam_cc_sys_tmr_clk = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct gdsc titan_top_gdsc;
|
||||
|
||||
static struct gdsc bps_gdsc = {
|
||||
.gdscr = 0x6004,
|
||||
.pd = {
|
||||
@@ -1554,6 +1556,7 @@ static struct gdsc ife_0_gdsc = {
|
||||
.name = "ife_0_gdsc",
|
||||
},
|
||||
.flags = POLL_CFG_GDSCR,
|
||||
.parent = &titan_top_gdsc.pd,
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
};
|
||||
|
||||
@@ -1563,6 +1566,7 @@ static struct gdsc ife_1_gdsc = {
|
||||
.name = "ife_1_gdsc",
|
||||
},
|
||||
.flags = POLL_CFG_GDSCR,
|
||||
.parent = &titan_top_gdsc.pd,
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
};
|
||||
|
||||
|
||||
@@ -32,11 +32,16 @@ static void __krait_mux_set_sel(struct krait_mux_clk *mux, int sel)
|
||||
regval |= (sel & mux->mask) << (mux->shift + LPL_SHIFT);
|
||||
}
|
||||
krait_set_l2_indirect_reg(mux->offset, regval);
|
||||
spin_unlock_irqrestore(&krait_clock_reg_lock, flags);
|
||||
|
||||
/* Wait for switch to complete. */
|
||||
mb();
|
||||
udelay(1);
|
||||
|
||||
/*
|
||||
* Unlock now to make sure the mux register is not
|
||||
* modified while switching to the new parent.
|
||||
*/
|
||||
spin_unlock_irqrestore(&krait_clock_reg_lock, flags);
|
||||
}
|
||||
|
||||
static int krait_mux_set_parent(struct clk_hw *hw, u8 index)
|
||||
|
||||
@@ -667,6 +667,7 @@ static struct clk_branch gcc_sleep_clk_src = {
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch2_ops,
|
||||
.flags = CLK_IS_CRITICAL,
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -1788,8 +1789,10 @@ static struct clk_regmap_div nss_port4_tx_div_clk_src = {
|
||||
static const struct freq_tbl ftbl_nss_port5_rx_clk_src[] = {
|
||||
F(19200000, P_XO, 1, 0, 0),
|
||||
F(25000000, P_UNIPHY1_RX, 12.5, 0, 0),
|
||||
F(25000000, P_UNIPHY0_RX, 5, 0, 0),
|
||||
F(78125000, P_UNIPHY1_RX, 4, 0, 0),
|
||||
F(125000000, P_UNIPHY1_RX, 2.5, 0, 0),
|
||||
F(125000000, P_UNIPHY0_RX, 1, 0, 0),
|
||||
F(156250000, P_UNIPHY1_RX, 2, 0, 0),
|
||||
F(312500000, P_UNIPHY1_RX, 1, 0, 0),
|
||||
{ }
|
||||
@@ -1828,8 +1831,10 @@ static struct clk_regmap_div nss_port5_rx_div_clk_src = {
|
||||
static const struct freq_tbl ftbl_nss_port5_tx_clk_src[] = {
|
||||
F(19200000, P_XO, 1, 0, 0),
|
||||
F(25000000, P_UNIPHY1_TX, 12.5, 0, 0),
|
||||
F(25000000, P_UNIPHY0_TX, 5, 0, 0),
|
||||
F(78125000, P_UNIPHY1_TX, 4, 0, 0),
|
||||
F(125000000, P_UNIPHY1_TX, 2.5, 0, 0),
|
||||
F(125000000, P_UNIPHY0_TX, 1, 0, 0),
|
||||
F(156250000, P_UNIPHY1_TX, 2, 0, 0),
|
||||
F(312500000, P_UNIPHY1_TX, 1, 0, 0),
|
||||
{ }
|
||||
@@ -1867,8 +1872,10 @@ static struct clk_regmap_div nss_port5_tx_div_clk_src = {
|
||||
|
||||
static const struct freq_tbl ftbl_nss_port6_rx_clk_src[] = {
|
||||
F(19200000, P_XO, 1, 0, 0),
|
||||
F(25000000, P_UNIPHY2_RX, 5, 0, 0),
|
||||
F(25000000, P_UNIPHY2_RX, 12.5, 0, 0),
|
||||
F(78125000, P_UNIPHY2_RX, 4, 0, 0),
|
||||
F(125000000, P_UNIPHY2_RX, 1, 0, 0),
|
||||
F(125000000, P_UNIPHY2_RX, 2.5, 0, 0),
|
||||
F(156250000, P_UNIPHY2_RX, 2, 0, 0),
|
||||
F(312500000, P_UNIPHY2_RX, 1, 0, 0),
|
||||
@@ -1907,8 +1914,10 @@ static struct clk_regmap_div nss_port6_rx_div_clk_src = {
|
||||
|
||||
static const struct freq_tbl ftbl_nss_port6_tx_clk_src[] = {
|
||||
F(19200000, P_XO, 1, 0, 0),
|
||||
F(25000000, P_UNIPHY2_TX, 5, 0, 0),
|
||||
F(25000000, P_UNIPHY2_TX, 12.5, 0, 0),
|
||||
F(78125000, P_UNIPHY2_TX, 4, 0, 0),
|
||||
F(125000000, P_UNIPHY2_TX, 1, 0, 0),
|
||||
F(125000000, P_UNIPHY2_TX, 2.5, 0, 0),
|
||||
F(156250000, P_UNIPHY2_TX, 2, 0, 0),
|
||||
F(312500000, P_UNIPHY2_TX, 1, 0, 0),
|
||||
@@ -3346,6 +3355,7 @@ static struct clk_branch gcc_nssnoc_ubi1_ahb_clk = {
|
||||
|
||||
static struct clk_branch gcc_ubi0_ahb_clk = {
|
||||
.halt_reg = 0x6820c,
|
||||
.halt_check = BRANCH_HALT_DELAY,
|
||||
.clkr = {
|
||||
.enable_reg = 0x6820c,
|
||||
.enable_mask = BIT(0),
|
||||
@@ -3363,6 +3373,7 @@ static struct clk_branch gcc_ubi0_ahb_clk = {
|
||||
|
||||
static struct clk_branch gcc_ubi0_axi_clk = {
|
||||
.halt_reg = 0x68200,
|
||||
.halt_check = BRANCH_HALT_DELAY,
|
||||
.clkr = {
|
||||
.enable_reg = 0x68200,
|
||||
.enable_mask = BIT(0),
|
||||
@@ -3380,6 +3391,7 @@ static struct clk_branch gcc_ubi0_axi_clk = {
|
||||
|
||||
static struct clk_branch gcc_ubi0_nc_axi_clk = {
|
||||
.halt_reg = 0x68204,
|
||||
.halt_check = BRANCH_HALT_DELAY,
|
||||
.clkr = {
|
||||
.enable_reg = 0x68204,
|
||||
.enable_mask = BIT(0),
|
||||
@@ -3397,6 +3409,7 @@ static struct clk_branch gcc_ubi0_nc_axi_clk = {
|
||||
|
||||
static struct clk_branch gcc_ubi0_core_clk = {
|
||||
.halt_reg = 0x68210,
|
||||
.halt_check = BRANCH_HALT_DELAY,
|
||||
.clkr = {
|
||||
.enable_reg = 0x68210,
|
||||
.enable_mask = BIT(0),
|
||||
@@ -3414,6 +3427,7 @@ static struct clk_branch gcc_ubi0_core_clk = {
|
||||
|
||||
static struct clk_branch gcc_ubi0_mpt_clk = {
|
||||
.halt_reg = 0x68208,
|
||||
.halt_check = BRANCH_HALT_DELAY,
|
||||
.clkr = {
|
||||
.enable_reg = 0x68208,
|
||||
.enable_mask = BIT(0),
|
||||
@@ -3431,6 +3445,7 @@ static struct clk_branch gcc_ubi0_mpt_clk = {
|
||||
|
||||
static struct clk_branch gcc_ubi1_ahb_clk = {
|
||||
.halt_reg = 0x6822c,
|
||||
.halt_check = BRANCH_HALT_DELAY,
|
||||
.clkr = {
|
||||
.enable_reg = 0x6822c,
|
||||
.enable_mask = BIT(0),
|
||||
@@ -3448,6 +3463,7 @@ static struct clk_branch gcc_ubi1_ahb_clk = {
|
||||
|
||||
static struct clk_branch gcc_ubi1_axi_clk = {
|
||||
.halt_reg = 0x68220,
|
||||
.halt_check = BRANCH_HALT_DELAY,
|
||||
.clkr = {
|
||||
.enable_reg = 0x68220,
|
||||
.enable_mask = BIT(0),
|
||||
@@ -3465,6 +3481,7 @@ static struct clk_branch gcc_ubi1_axi_clk = {
|
||||
|
||||
static struct clk_branch gcc_ubi1_nc_axi_clk = {
|
||||
.halt_reg = 0x68224,
|
||||
.halt_check = BRANCH_HALT_DELAY,
|
||||
.clkr = {
|
||||
.enable_reg = 0x68224,
|
||||
.enable_mask = BIT(0),
|
||||
@@ -3482,6 +3499,7 @@ static struct clk_branch gcc_ubi1_nc_axi_clk = {
|
||||
|
||||
static struct clk_branch gcc_ubi1_core_clk = {
|
||||
.halt_reg = 0x68230,
|
||||
.halt_check = BRANCH_HALT_DELAY,
|
||||
.clkr = {
|
||||
.enable_reg = 0x68230,
|
||||
.enable_mask = BIT(0),
|
||||
@@ -3499,6 +3517,7 @@ static struct clk_branch gcc_ubi1_core_clk = {
|
||||
|
||||
static struct clk_branch gcc_ubi1_mpt_clk = {
|
||||
.halt_reg = 0x68228,
|
||||
.halt_check = BRANCH_HALT_DELAY,
|
||||
.clkr = {
|
||||
.enable_reg = 0x68228,
|
||||
.enable_mask = BIT(0),
|
||||
|
||||
@@ -286,8 +286,8 @@ static const struct r9a06g032_clkdesc r9a06g032_clocks[] = {
|
||||
.name = "uart_group_012",
|
||||
.type = K_BITSEL,
|
||||
.source = 1 + R9A06G032_DIV_UART,
|
||||
/* R9A06G032_SYSCTRL_REG_PWRCTRL_PG1_PR2 */
|
||||
.dual.sel = ((0xec / 4) << 5) | 24,
|
||||
/* R9A06G032_SYSCTRL_REG_PWRCTRL_PG0_0 */
|
||||
.dual.sel = ((0x34 / 4) << 5) | 30,
|
||||
.dual.group = 0,
|
||||
},
|
||||
{
|
||||
@@ -295,8 +295,8 @@ static const struct r9a06g032_clkdesc r9a06g032_clocks[] = {
|
||||
.name = "uart_group_34567",
|
||||
.type = K_BITSEL,
|
||||
.source = 1 + R9A06G032_DIV_P2_PG,
|
||||
/* R9A06G032_SYSCTRL_REG_PWRCTRL_PG0_0 */
|
||||
.dual.sel = ((0x34 / 4) << 5) | 30,
|
||||
/* R9A06G032_SYSCTRL_REG_PWRCTRL_PG1_PR2 */
|
||||
.dual.sel = ((0xec / 4) << 5) | 24,
|
||||
.dual.group = 1,
|
||||
},
|
||||
D_UGATE(CLK_UART0, "clk_uart0", UART_GROUP_012, 0, 0, 0x1b2, 0x1b3, 0x1b4, 0x1b5),
|
||||
|
||||
@@ -751,6 +751,7 @@ static const char *const rk3188_critical_clocks[] __initconst = {
|
||||
"pclk_peri",
|
||||
"hclk_cpubus",
|
||||
"hclk_vio_bus",
|
||||
"sclk_mac_lbtest",
|
||||
};
|
||||
|
||||
static struct rockchip_clk_provider *__init rk3188_common_clk_init(struct device_node *np)
|
||||
|
||||
@@ -449,7 +449,7 @@ static void sec_skcipher_alg_callback(struct sec_bd_info *sec_resp,
|
||||
*/
|
||||
}
|
||||
|
||||
mutex_lock(&ctx->queue->queuelock);
|
||||
spin_lock_bh(&ctx->queue->queuelock);
|
||||
/* Put the IV in place for chained cases */
|
||||
switch (ctx->cipher_alg) {
|
||||
case SEC_C_AES_CBC_128:
|
||||
@@ -509,7 +509,7 @@ static void sec_skcipher_alg_callback(struct sec_bd_info *sec_resp,
|
||||
list_del(&backlog_req->backlog_head);
|
||||
}
|
||||
}
|
||||
mutex_unlock(&ctx->queue->queuelock);
|
||||
spin_unlock_bh(&ctx->queue->queuelock);
|
||||
|
||||
mutex_lock(&sec_req->lock);
|
||||
list_del(&sec_req_el->head);
|
||||
@@ -798,7 +798,7 @@ static int sec_alg_skcipher_crypto(struct skcipher_request *skreq,
|
||||
*/
|
||||
|
||||
/* Grab a big lock for a long time to avoid concurrency issues */
|
||||
mutex_lock(&queue->queuelock);
|
||||
spin_lock_bh(&queue->queuelock);
|
||||
|
||||
/*
|
||||
* Can go on to queue if we have space in either:
|
||||
@@ -814,15 +814,15 @@ static int sec_alg_skcipher_crypto(struct skcipher_request *skreq,
|
||||
ret = -EBUSY;
|
||||
if ((skreq->base.flags & CRYPTO_TFM_REQ_MAY_BACKLOG)) {
|
||||
list_add_tail(&sec_req->backlog_head, &ctx->backlog);
|
||||
mutex_unlock(&queue->queuelock);
|
||||
spin_unlock_bh(&queue->queuelock);
|
||||
goto out;
|
||||
}
|
||||
|
||||
mutex_unlock(&queue->queuelock);
|
||||
spin_unlock_bh(&queue->queuelock);
|
||||
goto err_free_elements;
|
||||
}
|
||||
ret = sec_send_request(sec_req, queue);
|
||||
mutex_unlock(&queue->queuelock);
|
||||
spin_unlock_bh(&queue->queuelock);
|
||||
if (ret)
|
||||
goto err_free_elements;
|
||||
|
||||
@@ -881,7 +881,7 @@ static int sec_alg_skcipher_init(struct crypto_skcipher *tfm)
|
||||
if (IS_ERR(ctx->queue))
|
||||
return PTR_ERR(ctx->queue);
|
||||
|
||||
mutex_init(&ctx->queue->queuelock);
|
||||
spin_lock_init(&ctx->queue->queuelock);
|
||||
ctx->queue->havesoftqueue = false;
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -347,7 +347,7 @@ struct sec_queue {
|
||||
DECLARE_BITMAP(unprocessed, SEC_QUEUE_LEN);
|
||||
DECLARE_KFIFO_PTR(softqueue, typeof(struct sec_request_el *));
|
||||
bool havesoftqueue;
|
||||
struct mutex queuelock;
|
||||
spinlock_t queuelock;
|
||||
void *shadow[SEC_QUEUE_LEN];
|
||||
};
|
||||
|
||||
|
||||
@@ -1658,6 +1658,8 @@ static const struct of_device_id safexcel_of_match_table[] = {
|
||||
{},
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(of, safexcel_of_match_table);
|
||||
|
||||
static struct platform_driver crypto_safexcel = {
|
||||
.probe = safexcel_probe,
|
||||
.remove = safexcel_remove,
|
||||
|
||||
@@ -1201,11 +1201,8 @@ static int sprd_dma_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct sprd_dma_dev *sdev = platform_get_drvdata(pdev);
|
||||
struct sprd_dma_chn *c, *cn;
|
||||
int ret;
|
||||
|
||||
ret = pm_runtime_get_sync(&pdev->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
pm_runtime_get_sync(&pdev->dev);
|
||||
|
||||
/* explicitly free the irq */
|
||||
if (sdev->irq > 0)
|
||||
|
||||
@@ -815,7 +815,7 @@ static int scpi_init_versions(struct scpi_drvinfo *info)
|
||||
info->firmware_version = le32_to_cpu(caps.platform_version);
|
||||
}
|
||||
/* Ignore error if not implemented */
|
||||
if (scpi_info->is_legacy && ret == -EOPNOTSUPP)
|
||||
if (info->is_legacy && ret == -EOPNOTSUPP)
|
||||
return 0;
|
||||
|
||||
return ret;
|
||||
@@ -905,13 +905,14 @@ static int scpi_probe(struct platform_device *pdev)
|
||||
struct resource res;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct device_node *np = dev->of_node;
|
||||
struct scpi_drvinfo *scpi_drvinfo;
|
||||
|
||||
scpi_info = devm_kzalloc(dev, sizeof(*scpi_info), GFP_KERNEL);
|
||||
if (!scpi_info)
|
||||
scpi_drvinfo = devm_kzalloc(dev, sizeof(*scpi_drvinfo), GFP_KERNEL);
|
||||
if (!scpi_drvinfo)
|
||||
return -ENOMEM;
|
||||
|
||||
if (of_match_device(legacy_scpi_of_match, &pdev->dev))
|
||||
scpi_info->is_legacy = true;
|
||||
scpi_drvinfo->is_legacy = true;
|
||||
|
||||
count = of_count_phandle_with_args(np, "mboxes", "#mbox-cells");
|
||||
if (count < 0) {
|
||||
@@ -919,19 +920,19 @@ static int scpi_probe(struct platform_device *pdev)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
scpi_info->channels = devm_kcalloc(dev, count, sizeof(struct scpi_chan),
|
||||
GFP_KERNEL);
|
||||
if (!scpi_info->channels)
|
||||
scpi_drvinfo->channels =
|
||||
devm_kcalloc(dev, count, sizeof(struct scpi_chan), GFP_KERNEL);
|
||||
if (!scpi_drvinfo->channels)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = devm_add_action(dev, scpi_free_channels, scpi_info);
|
||||
ret = devm_add_action(dev, scpi_free_channels, scpi_drvinfo);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
for (; scpi_info->num_chans < count; scpi_info->num_chans++) {
|
||||
for (; scpi_drvinfo->num_chans < count; scpi_drvinfo->num_chans++) {
|
||||
resource_size_t size;
|
||||
int idx = scpi_info->num_chans;
|
||||
struct scpi_chan *pchan = scpi_info->channels + idx;
|
||||
int idx = scpi_drvinfo->num_chans;
|
||||
struct scpi_chan *pchan = scpi_drvinfo->channels + idx;
|
||||
struct mbox_client *cl = &pchan->cl;
|
||||
struct device_node *shmem = of_parse_phandle(np, "shmem", idx);
|
||||
|
||||
@@ -975,45 +976,53 @@ static int scpi_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
scpi_info->commands = scpi_std_commands;
|
||||
scpi_drvinfo->commands = scpi_std_commands;
|
||||
|
||||
platform_set_drvdata(pdev, scpi_info);
|
||||
platform_set_drvdata(pdev, scpi_drvinfo);
|
||||
|
||||
if (scpi_info->is_legacy) {
|
||||
if (scpi_drvinfo->is_legacy) {
|
||||
/* Replace with legacy variants */
|
||||
scpi_ops.clk_set_val = legacy_scpi_clk_set_val;
|
||||
scpi_info->commands = scpi_legacy_commands;
|
||||
scpi_drvinfo->commands = scpi_legacy_commands;
|
||||
|
||||
/* Fill priority bitmap */
|
||||
for (idx = 0; idx < ARRAY_SIZE(legacy_hpriority_cmds); idx++)
|
||||
set_bit(legacy_hpriority_cmds[idx],
|
||||
scpi_info->cmd_priority);
|
||||
scpi_drvinfo->cmd_priority);
|
||||
}
|
||||
|
||||
ret = scpi_init_versions(scpi_info);
|
||||
scpi_info = scpi_drvinfo;
|
||||
|
||||
ret = scpi_init_versions(scpi_drvinfo);
|
||||
if (ret) {
|
||||
dev_err(dev, "incorrect or no SCP firmware found\n");
|
||||
scpi_info = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (scpi_info->is_legacy && !scpi_info->protocol_version &&
|
||||
!scpi_info->firmware_version)
|
||||
if (scpi_drvinfo->is_legacy && !scpi_drvinfo->protocol_version &&
|
||||
!scpi_drvinfo->firmware_version)
|
||||
dev_info(dev, "SCP Protocol legacy pre-1.0 firmware\n");
|
||||
else
|
||||
dev_info(dev, "SCP Protocol %lu.%lu Firmware %lu.%lu.%lu version\n",
|
||||
FIELD_GET(PROTO_REV_MAJOR_MASK,
|
||||
scpi_info->protocol_version),
|
||||
scpi_drvinfo->protocol_version),
|
||||
FIELD_GET(PROTO_REV_MINOR_MASK,
|
||||
scpi_info->protocol_version),
|
||||
scpi_drvinfo->protocol_version),
|
||||
FIELD_GET(FW_REV_MAJOR_MASK,
|
||||
scpi_info->firmware_version),
|
||||
scpi_drvinfo->firmware_version),
|
||||
FIELD_GET(FW_REV_MINOR_MASK,
|
||||
scpi_info->firmware_version),
|
||||
scpi_drvinfo->firmware_version),
|
||||
FIELD_GET(FW_REV_PATCH_MASK,
|
||||
scpi_info->firmware_version));
|
||||
scpi_info->scpi_ops = &scpi_ops;
|
||||
scpi_drvinfo->firmware_version));
|
||||
|
||||
return devm_of_platform_populate(dev);
|
||||
scpi_drvinfo->scpi_ops = &scpi_ops;
|
||||
|
||||
ret = devm_of_platform_populate(dev);
|
||||
if (ret)
|
||||
scpi_info = NULL;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct of_device_id scpi_of_match[] = {
|
||||
|
||||
@@ -108,7 +108,7 @@ static int alt_pr_fpga_write(struct fpga_manager *mgr, const char *buf,
|
||||
u32 *buffer_32 = (u32 *)buf;
|
||||
size_t i = 0;
|
||||
|
||||
if (count <= 0)
|
||||
if (!count)
|
||||
return -EINVAL;
|
||||
|
||||
/* Write out the complete 32-bit chunks */
|
||||
|
||||
@@ -734,7 +734,8 @@ int of_mm_gpiochip_add_data(struct device_node *np,
|
||||
if (mm_gc->save_regs)
|
||||
mm_gc->save_regs(mm_gc);
|
||||
|
||||
mm_gc->gc.of_node = np;
|
||||
of_node_put(mm_gc->gc.of_node);
|
||||
mm_gc->gc.of_node = of_node_get(np);
|
||||
|
||||
ret = gpiochip_add_data(gc, data);
|
||||
if (ret)
|
||||
@@ -742,6 +743,7 @@ int of_mm_gpiochip_add_data(struct device_node *np,
|
||||
|
||||
return 0;
|
||||
err2:
|
||||
of_node_put(np);
|
||||
iounmap(mm_gc->regs);
|
||||
err1:
|
||||
kfree(gc->label);
|
||||
|
||||
@@ -892,6 +892,10 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,
|
||||
if (WARN_ON_ONCE(min_offset > max_offset))
|
||||
return -EINVAL;
|
||||
|
||||
/* Check domain to be pinned to against preferred domains */
|
||||
if (bo->preferred_domains & domain)
|
||||
domain = bo->preferred_domains & domain;
|
||||
|
||||
/* A shared bo cannot be migrated to VRAM */
|
||||
if (bo->prime_shared_count) {
|
||||
if (domain & AMDGPU_GEM_DOMAIN_GTT)
|
||||
|
||||
@@ -985,6 +985,10 @@ static int adv7511_init_cec_regmap(struct adv7511 *adv)
|
||||
ADV7511_CEC_I2C_ADDR_DEFAULT);
|
||||
if (IS_ERR(adv->i2c_cec))
|
||||
return PTR_ERR(adv->i2c_cec);
|
||||
|
||||
regmap_write(adv->regmap, ADV7511_REG_CEC_I2C_ADDR,
|
||||
adv->i2c_cec->addr << 1);
|
||||
|
||||
i2c_set_clientdata(adv->i2c_cec, adv);
|
||||
|
||||
adv->regmap_cec = devm_regmap_init_i2c(adv->i2c_cec,
|
||||
@@ -1189,9 +1193,6 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
|
||||
if (ret)
|
||||
goto err_i2c_unregister_packet;
|
||||
|
||||
regmap_write(adv7511->regmap, ADV7511_REG_CEC_I2C_ADDR,
|
||||
adv7511->i2c_cec->addr << 1);
|
||||
|
||||
INIT_WORK(&adv7511->hpd_work, adv7511_hpd_work);
|
||||
|
||||
if (i2c->irq) {
|
||||
@@ -1301,10 +1302,21 @@ static struct i2c_driver adv7511_driver = {
|
||||
|
||||
static int __init adv7511_init(void)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_DRM_MIPI_DSI))
|
||||
mipi_dsi_driver_register(&adv7533_dsi_driver);
|
||||
int ret;
|
||||
|
||||
return i2c_add_driver(&adv7511_driver);
|
||||
if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) {
|
||||
ret = mipi_dsi_driver_register(&adv7533_dsi_driver);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = i2c_add_driver(&adv7511_driver);
|
||||
if (ret) {
|
||||
if (IS_ENABLED(CONFIG_DRM_MIPI_DSI))
|
||||
mipi_dsi_driver_unregister(&adv7533_dsi_driver);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
module_init(adv7511_init);
|
||||
|
||||
|
||||
@@ -604,7 +604,7 @@ static void *sii8620_burst_get_tx_buf(struct sii8620 *ctx, int len)
|
||||
u8 *buf = &ctx->burst.tx_buf[ctx->burst.tx_count];
|
||||
int size = len + 2;
|
||||
|
||||
if (ctx->burst.tx_count + size > ARRAY_SIZE(ctx->burst.tx_buf)) {
|
||||
if (ctx->burst.tx_count + size >= ARRAY_SIZE(ctx->burst.tx_buf)) {
|
||||
dev_err(ctx->dev, "TX-BLK buffer exhausted\n");
|
||||
ctx->error = -EINVAL;
|
||||
return NULL;
|
||||
@@ -621,7 +621,7 @@ static u8 *sii8620_burst_get_rx_buf(struct sii8620 *ctx, int len)
|
||||
u8 *buf = &ctx->burst.rx_buf[ctx->burst.rx_count];
|
||||
int size = len + 1;
|
||||
|
||||
if (ctx->burst.tx_count + size > ARRAY_SIZE(ctx->burst.tx_buf)) {
|
||||
if (ctx->burst.rx_count + size >= ARRAY_SIZE(ctx->burst.rx_buf)) {
|
||||
dev_err(ctx->dev, "RX-BLK buffer exhausted\n");
|
||||
ctx->error = -EINVAL;
|
||||
return NULL;
|
||||
|
||||
@@ -1292,7 +1292,7 @@ retry:
|
||||
ret = dma_resv_lock_slow_interruptible(obj->resv,
|
||||
acquire_ctx);
|
||||
if (ret) {
|
||||
ww_acquire_done(acquire_ctx);
|
||||
ww_acquire_fini(acquire_ctx);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@@ -1317,7 +1317,7 @@ retry:
|
||||
goto retry;
|
||||
}
|
||||
|
||||
ww_acquire_done(acquire_ctx);
|
||||
ww_acquire_fini(acquire_ctx);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1156,6 +1156,13 @@ int mipi_dbi_spi_transfer(struct spi_device *spi, u32 speed_hz,
|
||||
size_t chunk;
|
||||
int ret;
|
||||
|
||||
/* In __spi_validate, there's a validation that no partial transfers
|
||||
* are accepted (xfer->len % w_size must be zero).
|
||||
* Here we align max_chunk to multiple of 2 (16bits),
|
||||
* to prevent transfers from being rejected.
|
||||
*/
|
||||
max_chunk = ALIGN_DOWN(max_chunk, 2);
|
||||
|
||||
spi_message_init_with_transfers(&m, &tr, 1);
|
||||
|
||||
while (len) {
|
||||
|
||||
@@ -800,31 +800,40 @@ static int exynos7_decon_resume(struct device *dev)
|
||||
if (ret < 0) {
|
||||
DRM_DEV_ERROR(dev, "Failed to prepare_enable the pclk [%d]\n",
|
||||
ret);
|
||||
return ret;
|
||||
goto err_pclk_enable;
|
||||
}
|
||||
|
||||
ret = clk_prepare_enable(ctx->aclk);
|
||||
if (ret < 0) {
|
||||
DRM_DEV_ERROR(dev, "Failed to prepare_enable the aclk [%d]\n",
|
||||
ret);
|
||||
return ret;
|
||||
goto err_aclk_enable;
|
||||
}
|
||||
|
||||
ret = clk_prepare_enable(ctx->eclk);
|
||||
if (ret < 0) {
|
||||
DRM_DEV_ERROR(dev, "Failed to prepare_enable the eclk [%d]\n",
|
||||
ret);
|
||||
return ret;
|
||||
goto err_eclk_enable;
|
||||
}
|
||||
|
||||
ret = clk_prepare_enable(ctx->vclk);
|
||||
if (ret < 0) {
|
||||
DRM_DEV_ERROR(dev, "Failed to prepare_enable the vclk [%d]\n",
|
||||
ret);
|
||||
return ret;
|
||||
goto err_vclk_enable;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_vclk_enable:
|
||||
clk_disable_unprepare(ctx->eclk);
|
||||
err_eclk_enable:
|
||||
clk_disable_unprepare(ctx->aclk);
|
||||
err_aclk_enable:
|
||||
clk_disable_unprepare(ctx->pclk);
|
||||
err_pclk_enable:
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -942,6 +942,7 @@ static int mcde_dsi_bind(struct device *dev, struct device *master,
|
||||
bridge = of_drm_find_bridge(child);
|
||||
if (!bridge) {
|
||||
dev_err(dev, "failed to find bridge\n");
|
||||
of_node_put(child);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,13 +50,7 @@ enum mtk_dpi_out_channel_swap {
|
||||
};
|
||||
|
||||
enum mtk_dpi_out_color_format {
|
||||
MTK_DPI_COLOR_FORMAT_RGB,
|
||||
MTK_DPI_COLOR_FORMAT_RGB_FULL,
|
||||
MTK_DPI_COLOR_FORMAT_YCBCR_444,
|
||||
MTK_DPI_COLOR_FORMAT_YCBCR_422,
|
||||
MTK_DPI_COLOR_FORMAT_XV_YCC,
|
||||
MTK_DPI_COLOR_FORMAT_YCBCR_444_FULL,
|
||||
MTK_DPI_COLOR_FORMAT_YCBCR_422_FULL
|
||||
MTK_DPI_COLOR_FORMAT_RGB
|
||||
};
|
||||
|
||||
struct mtk_dpi {
|
||||
@@ -355,24 +349,11 @@ static void mtk_dpi_config_disable_edge(struct mtk_dpi *dpi)
|
||||
static void mtk_dpi_config_color_format(struct mtk_dpi *dpi,
|
||||
enum mtk_dpi_out_color_format format)
|
||||
{
|
||||
if ((format == MTK_DPI_COLOR_FORMAT_YCBCR_444) ||
|
||||
(format == MTK_DPI_COLOR_FORMAT_YCBCR_444_FULL)) {
|
||||
mtk_dpi_config_yuv422_enable(dpi, false);
|
||||
mtk_dpi_config_csc_enable(dpi, true);
|
||||
mtk_dpi_config_swap_input(dpi, false);
|
||||
mtk_dpi_config_channel_swap(dpi, MTK_DPI_OUT_CHANNEL_SWAP_BGR);
|
||||
} else if ((format == MTK_DPI_COLOR_FORMAT_YCBCR_422) ||
|
||||
(format == MTK_DPI_COLOR_FORMAT_YCBCR_422_FULL)) {
|
||||
mtk_dpi_config_yuv422_enable(dpi, true);
|
||||
mtk_dpi_config_csc_enable(dpi, true);
|
||||
mtk_dpi_config_swap_input(dpi, true);
|
||||
mtk_dpi_config_channel_swap(dpi, MTK_DPI_OUT_CHANNEL_SWAP_RGB);
|
||||
} else {
|
||||
mtk_dpi_config_yuv422_enable(dpi, false);
|
||||
mtk_dpi_config_csc_enable(dpi, false);
|
||||
mtk_dpi_config_swap_input(dpi, false);
|
||||
mtk_dpi_config_channel_swap(dpi, MTK_DPI_OUT_CHANNEL_SWAP_RGB);
|
||||
}
|
||||
/* only support RGB888 */
|
||||
mtk_dpi_config_yuv422_enable(dpi, false);
|
||||
mtk_dpi_config_csc_enable(dpi, false);
|
||||
mtk_dpi_config_swap_input(dpi, false);
|
||||
mtk_dpi_config_channel_swap(dpi, MTK_DPI_OUT_CHANNEL_SWAP_RGB);
|
||||
}
|
||||
|
||||
static void mtk_dpi_power_off(struct mtk_dpi *dpi)
|
||||
@@ -413,7 +394,6 @@ static int mtk_dpi_power_on(struct mtk_dpi *dpi)
|
||||
if (dpi->pinctrl && dpi->pins_dpi)
|
||||
pinctrl_select_state(dpi->pinctrl, dpi->pins_dpi);
|
||||
|
||||
mtk_dpi_enable(dpi);
|
||||
return 0;
|
||||
|
||||
err_pixel:
|
||||
@@ -557,6 +537,7 @@ static void mtk_dpi_encoder_enable(struct drm_encoder *encoder)
|
||||
|
||||
mtk_dpi_power_on(dpi);
|
||||
mtk_dpi_set_display_mode(dpi, &dpi->mode);
|
||||
mtk_dpi_enable(dpi);
|
||||
}
|
||||
|
||||
static int mtk_dpi_atomic_check(struct drm_encoder *encoder,
|
||||
|
||||
@@ -645,6 +645,8 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi)
|
||||
mtk_dsi_reset_engine(dsi);
|
||||
mtk_dsi_lane0_ulp_mode_enter(dsi);
|
||||
mtk_dsi_clk_ulp_mode_enter(dsi);
|
||||
/* set the lane number as 0 to pull down mipi */
|
||||
writel(0, dsi->regs + DSI_TXRX_CTRL);
|
||||
|
||||
mtk_dsi_disable(dsi);
|
||||
|
||||
|
||||
@@ -124,8 +124,11 @@ static bool meson_vpu_has_available_connectors(struct device *dev)
|
||||
for_each_endpoint_of_node(dev->of_node, ep) {
|
||||
/* If the endpoint node exists, consider it enabled */
|
||||
remote = of_graph_get_remote_port(ep);
|
||||
if (remote)
|
||||
if (remote) {
|
||||
of_node_put(remote);
|
||||
of_node_put(ep);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -400,17 +400,17 @@ void meson_viu_init(struct meson_drm *priv)
|
||||
priv->io_base + _REG(VD2_IF0_LUMA_FIFO_SIZE));
|
||||
|
||||
if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A)) {
|
||||
writel_relaxed(VIU_OSD_BLEND_REORDER(0, 1) |
|
||||
VIU_OSD_BLEND_REORDER(1, 0) |
|
||||
VIU_OSD_BLEND_REORDER(2, 0) |
|
||||
VIU_OSD_BLEND_REORDER(3, 0) |
|
||||
VIU_OSD_BLEND_DIN_EN(1) |
|
||||
VIU_OSD_BLEND1_DIN3_BYPASS_TO_DOUT1 |
|
||||
VIU_OSD_BLEND1_DOUT_BYPASS_TO_BLEND2 |
|
||||
VIU_OSD_BLEND_DIN0_BYPASS_TO_DOUT0 |
|
||||
VIU_OSD_BLEND_BLEN2_PREMULT_EN(1) |
|
||||
VIU_OSD_BLEND_HOLD_LINES(4),
|
||||
priv->io_base + _REG(VIU_OSD_BLEND_CTRL));
|
||||
u32 val = (u32)VIU_OSD_BLEND_REORDER(0, 1) |
|
||||
(u32)VIU_OSD_BLEND_REORDER(1, 0) |
|
||||
(u32)VIU_OSD_BLEND_REORDER(2, 0) |
|
||||
(u32)VIU_OSD_BLEND_REORDER(3, 0) |
|
||||
(u32)VIU_OSD_BLEND_DIN_EN(1) |
|
||||
(u32)VIU_OSD_BLEND1_DIN3_BYPASS_TO_DOUT1 |
|
||||
(u32)VIU_OSD_BLEND1_DOUT_BYPASS_TO_BLEND2 |
|
||||
(u32)VIU_OSD_BLEND_DIN0_BYPASS_TO_DOUT0 |
|
||||
(u32)VIU_OSD_BLEND_BLEN2_PREMULT_EN(1) |
|
||||
(u32)VIU_OSD_BLEND_HOLD_LINES(4);
|
||||
writel_relaxed(val, priv->io_base + _REG(VIU_OSD_BLEND_CTRL));
|
||||
|
||||
writel_relaxed(OSD_BLEND_PATH_SEL_ENABLE,
|
||||
priv->io_base + _REG(OSD1_BLEND_SRC_CTRL));
|
||||
|
||||
@@ -123,12 +123,13 @@ int mdp5_pipe_release(struct drm_atomic_state *s, struct mdp5_hw_pipe *hwpipe)
|
||||
{
|
||||
struct msm_drm_private *priv = s->dev->dev_private;
|
||||
struct mdp5_kms *mdp5_kms = to_mdp5_kms(to_mdp_kms(priv->kms));
|
||||
struct mdp5_global_state *state = mdp5_get_global_state(s);
|
||||
struct mdp5_global_state *state;
|
||||
struct mdp5_hw_pipe_state *new_state;
|
||||
|
||||
if (!hwpipe)
|
||||
return 0;
|
||||
|
||||
state = mdp5_get_global_state(s);
|
||||
if (IS_ERR(state))
|
||||
return PTR_ERR(state);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user