mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-24 19:12:14 +00:00
Compare commits
1 Commits
raspberryp
...
pull/2638/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e4aa51491 |
@@ -2,10 +2,7 @@
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: should be one of:
|
||||
"qca,qca8334"
|
||||
"qca,qca8337"
|
||||
|
||||
- compatible: should be "qca,qca8337"
|
||||
- #size-cells: must be 0
|
||||
- #address-cells: must be 1
|
||||
|
||||
@@ -17,20 +14,6 @@ port and PHY id, each subnode describing a port needs to have a valid phandle
|
||||
referencing the internal PHY connected to it. The CPU port of this switch is
|
||||
always port 0.
|
||||
|
||||
A CPU port node has the following optional node:
|
||||
|
||||
- fixed-link : Fixed-link subnode describing a link to a non-MDIO
|
||||
managed entity. See
|
||||
Documentation/devicetree/bindings/net/fixed-link.txt
|
||||
for details.
|
||||
|
||||
For QCA8K the 'fixed-link' sub-node supports only the following properties:
|
||||
|
||||
- 'speed' (integer, mandatory), to indicate the link speed. Accepted
|
||||
values are 10, 100 and 1000
|
||||
- 'full-duplex' (boolean, optional), to indicate that full duplex is
|
||||
used. When absent, half duplex is assumed.
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
@@ -70,10 +53,6 @@ Example:
|
||||
label = "cpu";
|
||||
ethernet = <&gmac1>;
|
||||
phy-mode = "rgmii";
|
||||
fixed-link {
|
||||
speed = 1000;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
|
||||
@@ -10,7 +10,6 @@ Required properties on all platforms:
|
||||
- "amlogic,meson6-dwmac"
|
||||
- "amlogic,meson8b-dwmac"
|
||||
- "amlogic,meson-gxbb-dwmac"
|
||||
- "amlogic,meson-axg-dwmac"
|
||||
Additionally "snps,dwmac" and any applicable more
|
||||
detailed version number described in net/stmmac.txt
|
||||
should be used.
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
Required properties for the root node:
|
||||
- compatible: one of "amlogic,meson8-cbus-pinctrl"
|
||||
"amlogic,meson8b-cbus-pinctrl"
|
||||
"amlogic,meson8m2-cbus-pinctrl"
|
||||
"amlogic,meson8-aobus-pinctrl"
|
||||
"amlogic,meson8b-aobus-pinctrl"
|
||||
"amlogic,meson8m2-aobus-pinctrl"
|
||||
"amlogic,meson-gxbb-periphs-pinctrl"
|
||||
"amlogic,meson-gxbb-aobus-pinctrl"
|
||||
"amlogic,meson-gxl-periphs-pinctrl"
|
||||
|
||||
@@ -145,11 +145,6 @@ The functions in the mdev_parent_ops structure are as follows:
|
||||
* create: allocate basic resources in a driver for a mediated device
|
||||
* remove: free resources in a driver when a mediated device is destroyed
|
||||
|
||||
(Note that mdev-core provides no implicit serialization of create/remove
|
||||
callbacks per mdev parent device, per mdev type, or any other categorization.
|
||||
Vendor drivers are expected to be fully asynchronous in this respect or
|
||||
provide their own internal resource protection.)
|
||||
|
||||
The callbacks in the mdev_parent_ops structure are as follows:
|
||||
|
||||
* open: open callback of mediated device
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 14
|
||||
SUBLEVEL = 62
|
||||
SUBLEVEL = 59
|
||||
EXTRAVERSION =
|
||||
NAME = Petit Gorille
|
||||
|
||||
|
||||
@@ -31,13 +31,13 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cpu0: cpu@0 {
|
||||
cpu@0 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a9";
|
||||
reg = <0>;
|
||||
clock-frequency = <533000000>;
|
||||
};
|
||||
cpu1: cpu@1 {
|
||||
cpu@1 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a9";
|
||||
reg = <1>;
|
||||
@@ -57,7 +57,6 @@
|
||||
compatible = "arm,cortex-a9-pmu";
|
||||
interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-affinity = <&cpu0>, <&cpu1>;
|
||||
};
|
||||
|
||||
clocks@e0110000 {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cpu0: cpu@0 {
|
||||
cpu@0 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a9";
|
||||
reg = <0>;
|
||||
@@ -30,7 +30,7 @@
|
||||
power-domains = <&pd_a2sl>;
|
||||
next-level-cache = <&L2>;
|
||||
};
|
||||
cpu1: cpu@1 {
|
||||
cpu@1 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a9";
|
||||
reg = <1>;
|
||||
@@ -89,7 +89,6 @@
|
||||
compatible = "arm,cortex-a9-pmu";
|
||||
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-affinity = <&cpu0>, <&cpu1>;
|
||||
};
|
||||
|
||||
cmt1: timer@e6138000 {
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
st,syscfg = <&syscfg_sbc>;
|
||||
reg = <0x0961f080 0x4>;
|
||||
reg-names = "irqmux";
|
||||
interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_SPI 188 IRQ_TYPE_NONE>;
|
||||
interrupt-names = "irqmux";
|
||||
ranges = <0 0x09610000 0x6000>;
|
||||
|
||||
@@ -376,7 +376,7 @@
|
||||
st,syscfg = <&syscfg_front>;
|
||||
reg = <0x0920f080 0x4>;
|
||||
reg-names = "irqmux";
|
||||
interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_SPI 189 IRQ_TYPE_NONE>;
|
||||
interrupt-names = "irqmux";
|
||||
ranges = <0 0x09200000 0x10000>;
|
||||
|
||||
@@ -936,7 +936,7 @@
|
||||
st,syscfg = <&syscfg_front>;
|
||||
reg = <0x0921f080 0x4>;
|
||||
reg-names = "irqmux";
|
||||
interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_SPI 190 IRQ_TYPE_NONE>;
|
||||
interrupt-names = "irqmux";
|
||||
ranges = <0 0x09210000 0x10000>;
|
||||
|
||||
@@ -969,7 +969,7 @@
|
||||
st,syscfg = <&syscfg_rear>;
|
||||
reg = <0x0922f080 0x4>;
|
||||
reg-names = "irqmux";
|
||||
interrupts = <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_SPI 191 IRQ_TYPE_NONE>;
|
||||
interrupt-names = "irqmux";
|
||||
ranges = <0 0x09220000 0x6000>;
|
||||
|
||||
@@ -1164,7 +1164,7 @@
|
||||
st,syscfg = <&syscfg_flash>;
|
||||
reg = <0x0923f080 0x4>;
|
||||
reg-names = "irqmux";
|
||||
interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_SPI 192 IRQ_TYPE_NONE>;
|
||||
interrupt-names = "irqmux";
|
||||
ranges = <0 0x09230000 0x3000>;
|
||||
|
||||
|
||||
@@ -718,7 +718,7 @@ static inline void emit_a32_arsh_r64(const u8 dst[], const u8 src[], bool dstk,
|
||||
}
|
||||
|
||||
/* dst = dst >> src */
|
||||
static inline void emit_a32_rsh_r64(const u8 dst[], const u8 src[], bool dstk,
|
||||
static inline void emit_a32_lsr_r64(const u8 dst[], const u8 src[], bool dstk,
|
||||
bool sstk, struct jit_ctx *ctx) {
|
||||
const u8 *tmp = bpf2a32[TMP_REG_1];
|
||||
const u8 *tmp2 = bpf2a32[TMP_REG_2];
|
||||
@@ -734,7 +734,7 @@ static inline void emit_a32_rsh_r64(const u8 dst[], const u8 src[], bool dstk,
|
||||
emit(ARM_LDR_I(rm, ARM_SP, STACK_VAR(dst_hi)), ctx);
|
||||
}
|
||||
|
||||
/* Do RSH operation */
|
||||
/* Do LSH operation */
|
||||
emit(ARM_RSB_I(ARM_IP, rt, 32), ctx);
|
||||
emit(ARM_SUBS_I(tmp2[0], rt, 32), ctx);
|
||||
emit(ARM_MOV_SR(ARM_LR, rd, SRTYPE_LSR, rt), ctx);
|
||||
@@ -784,7 +784,7 @@ static inline void emit_a32_lsh_i64(const u8 dst[], bool dstk,
|
||||
}
|
||||
|
||||
/* dst = dst >> val */
|
||||
static inline void emit_a32_rsh_i64(const u8 dst[], bool dstk,
|
||||
static inline void emit_a32_lsr_i64(const u8 dst[], bool dstk,
|
||||
const u32 val, struct jit_ctx *ctx) {
|
||||
const u8 *tmp = bpf2a32[TMP_REG_1];
|
||||
const u8 *tmp2 = bpf2a32[TMP_REG_2];
|
||||
@@ -1340,7 +1340,7 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx)
|
||||
case BPF_ALU64 | BPF_RSH | BPF_K:
|
||||
if (unlikely(imm > 63))
|
||||
return -EINVAL;
|
||||
emit_a32_rsh_i64(dst, dstk, imm, ctx);
|
||||
emit_a32_lsr_i64(dst, dstk, imm, ctx);
|
||||
break;
|
||||
/* dst = dst << src */
|
||||
case BPF_ALU64 | BPF_LSH | BPF_X:
|
||||
@@ -1348,7 +1348,7 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx)
|
||||
break;
|
||||
/* dst = dst >> src */
|
||||
case BPF_ALU64 | BPF_RSH | BPF_X:
|
||||
emit_a32_rsh_r64(dst, src, dstk, sstk, ctx);
|
||||
emit_a32_lsr_r64(dst, src, dstk, sstk, ctx);
|
||||
break;
|
||||
/* dst = dst >> src (signed) */
|
||||
case BPF_ALU64 | BPF_ARSH | BPF_X:
|
||||
|
||||
@@ -9,8 +9,6 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM2709) += bcm2710-rpi-3-b.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM2709) += bcm2710-rpi-cm3.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-cm3.dtb
|
||||
|
||||
dts-dirs += ../overlays
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#define RPI364
|
||||
|
||||
#include "../../../../arm/boot/dts/bcm2710-rpi-cm3.dts"
|
||||
@@ -93,12 +93,20 @@
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
sound_card: sound {
|
||||
compatible = "audio-graph-card";
|
||||
rsnd_ak4613: sound {
|
||||
compatible = "simple-audio-card";
|
||||
|
||||
label = "rcar-sound";
|
||||
simple-audio-card,format = "left_j";
|
||||
simple-audio-card,bitclock-master = <&sndcpu>;
|
||||
simple-audio-card,frame-master = <&sndcpu>;
|
||||
|
||||
dais = <&rsnd_port0>;
|
||||
sndcpu: simple-audio-card,cpu {
|
||||
sound-dai = <&rcar_sound>;
|
||||
};
|
||||
|
||||
sndcodec: simple-audio-card,codec {
|
||||
sound-dai = <&ak4613>;
|
||||
};
|
||||
};
|
||||
|
||||
vbus0_usb2: regulator-vbus0-usb2 {
|
||||
@@ -312,12 +320,6 @@
|
||||
asahi-kasei,out4-single-end;
|
||||
asahi-kasei,out5-single-end;
|
||||
asahi-kasei,out6-single-end;
|
||||
|
||||
port {
|
||||
ak4613_endpoint: endpoint {
|
||||
remote-endpoint = <&rsnd_endpoint0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
cs2000: clk_multiplier@4f {
|
||||
@@ -536,18 +538,10 @@
|
||||
<&audio_clk_c>,
|
||||
<&cpg CPG_CORE CPG_AUDIO_CLK_I>;
|
||||
|
||||
ports {
|
||||
rsnd_port0: port@0 {
|
||||
rsnd_endpoint0: endpoint {
|
||||
remote-endpoint = <&ak4613_endpoint>;
|
||||
|
||||
dai-format = "left_j";
|
||||
bitclock-master = <&rsnd_endpoint0>;
|
||||
frame-master = <&rsnd_endpoint0>;
|
||||
|
||||
playback = <&ssi0 &src0 &dvc0>;
|
||||
capture = <&ssi1 &src1 &dvc1>;
|
||||
};
|
||||
rcar_sound,dai {
|
||||
dai0 {
|
||||
playback = <&ssi0 &src0 &dvc0>;
|
||||
capture = <&ssi1 &src1 &dvc1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -302,8 +302,6 @@ CONFIG_GPIO_XGENE_SB=y
|
||||
CONFIG_GPIO_PCA953X=y
|
||||
CONFIG_GPIO_PCA953X_IRQ=y
|
||||
CONFIG_GPIO_MAX77620=y
|
||||
CONFIG_POWER_AVS=y
|
||||
CONFIG_ROCKCHIP_IODOMAIN=y
|
||||
CONFIG_POWER_RESET_MSM=y
|
||||
CONFIG_POWER_RESET_XGENE=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
|
||||
@@ -229,9 +229,7 @@ static inline void __cmpwait_case_##name(volatile void *ptr, \
|
||||
unsigned long tmp; \
|
||||
\
|
||||
asm volatile( \
|
||||
" sevl\n" \
|
||||
" wfe\n" \
|
||||
" ldxr" #sz "\t%" #w "[tmp], %[v]\n" \
|
||||
" ldxr" #sz "\t%" #w "[tmp], %[v]\n" \
|
||||
" eor %" #w "[tmp], %" #w "[tmp], %" #w "[val]\n" \
|
||||
" cbnz %" #w "[tmp], 1f\n" \
|
||||
" wfe\n" \
|
||||
|
||||
@@ -651,13 +651,11 @@ void __init mem_init(void)
|
||||
BUILD_BUG_ON(TASK_SIZE_32 > TASK_SIZE_64);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SPARSEMEM_VMEMMAP
|
||||
/*
|
||||
* Make sure we chose the upper bound of sizeof(struct page)
|
||||
* correctly when sizing the VMEMMAP array.
|
||||
* correctly.
|
||||
*/
|
||||
BUILD_BUG_ON(sizeof(struct page) > (1 << STRUCT_PAGE_MAX_SHIFT));
|
||||
#endif
|
||||
|
||||
if (PAGE_SIZE >= 16384 && get_num_physpages() <= 128) {
|
||||
extern int sysctl_overcommit_memory;
|
||||
|
||||
@@ -22,19 +22,17 @@ $(obj)/linux.bin.gz: $(obj)/linux.bin FORCE
|
||||
quiet_cmd_cp = CP $< $@$2
|
||||
cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
|
||||
|
||||
quiet_cmd_strip = STRIP $< $@$2
|
||||
quiet_cmd_strip = STRIP $@
|
||||
cmd_strip = $(STRIP) -K microblaze_start -K _end -K __log_buf \
|
||||
-K _fdt_start $< -o $@$2
|
||||
-K _fdt_start vmlinux -o $@
|
||||
|
||||
UIMAGE_LOADADDR = $(CONFIG_KERNEL_BASE_ADDR)
|
||||
UIMAGE_IN = $@
|
||||
UIMAGE_OUT = $@.ub
|
||||
|
||||
$(obj)/simpleImage.%: vmlinux FORCE
|
||||
$(call if_changed,cp,.unstrip)
|
||||
$(call if_changed,objcopy)
|
||||
$(call if_changed,uimage)
|
||||
$(call if_changed,strip,.strip)
|
||||
@echo 'Kernel: $(UIMAGE_OUT) is ready' ' (#'`cat .version`')'
|
||||
$(call if_changed,strip)
|
||||
@echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
|
||||
|
||||
clean-files += simpleImage.*.unstrip linux.bin.ub dts/*.dtb
|
||||
|
||||
@@ -76,21 +76,6 @@ do { \
|
||||
___p1; \
|
||||
})
|
||||
|
||||
#ifdef CONFIG_PPC_BOOK3S_64
|
||||
/*
|
||||
* Prevent execution of subsequent instructions until preceding branches have
|
||||
* been fully resolved and are no longer executing speculatively.
|
||||
*/
|
||||
#define barrier_nospec_asm ori 31,31,0
|
||||
|
||||
// This also acts as a compiler barrier due to the memory clobber.
|
||||
#define barrier_nospec() asm (stringify_in_c(barrier_nospec_asm) ::: "memory")
|
||||
|
||||
#else /* !CONFIG_PPC_BOOK3S_64 */
|
||||
#define barrier_nospec_asm
|
||||
#define barrier_nospec()
|
||||
#endif
|
||||
|
||||
#include <asm-generic/barrier.h>
|
||||
|
||||
#endif /* _ASM_POWERPC_BARRIER_H */
|
||||
|
||||
@@ -9,14 +9,11 @@
|
||||
#if defined(CONFIG_PPC_8xx) || defined(CONFIG_403GCX)
|
||||
#define L1_CACHE_SHIFT 4
|
||||
#define MAX_COPY_PREFETCH 1
|
||||
#define IFETCH_ALIGN_SHIFT 2
|
||||
#elif defined(CONFIG_PPC_E500MC)
|
||||
#define L1_CACHE_SHIFT 6
|
||||
#define MAX_COPY_PREFETCH 4
|
||||
#define IFETCH_ALIGN_SHIFT 3
|
||||
#elif defined(CONFIG_PPC32)
|
||||
#define MAX_COPY_PREFETCH 4
|
||||
#define IFETCH_ALIGN_SHIFT 3 /* 603 fetches 2 insn at a time */
|
||||
#if defined(CONFIG_PPC_47x)
|
||||
#define L1_CACHE_SHIFT 7
|
||||
#else
|
||||
|
||||
@@ -450,11 +450,9 @@ static void *eeh_add_virt_device(void *data, void *userdata)
|
||||
|
||||
driver = eeh_pcid_get(dev);
|
||||
if (driver) {
|
||||
if (driver->err_handler) {
|
||||
eeh_pcid_put(dev);
|
||||
return NULL;
|
||||
}
|
||||
eeh_pcid_put(dev);
|
||||
if (driver->err_handler)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PPC_POWERNV
|
||||
@@ -491,19 +489,17 @@ static void *eeh_rmv_device(void *data, void *userdata)
|
||||
if (eeh_dev_removed(edev))
|
||||
return NULL;
|
||||
|
||||
if (removed) {
|
||||
if (eeh_pe_passed(edev->pe))
|
||||
driver = eeh_pcid_get(dev);
|
||||
if (driver) {
|
||||
eeh_pcid_put(dev);
|
||||
if (removed &&
|
||||
eeh_pe_passed(edev->pe))
|
||||
return NULL;
|
||||
if (removed &&
|
||||
driver->err_handler &&
|
||||
driver->err_handler->error_detected &&
|
||||
driver->err_handler->slot_reset)
|
||||
return NULL;
|
||||
driver = eeh_pcid_get(dev);
|
||||
if (driver) {
|
||||
if (driver->err_handler &&
|
||||
driver->err_handler->error_detected &&
|
||||
driver->err_handler->slot_reset) {
|
||||
eeh_pcid_put(dev);
|
||||
return NULL;
|
||||
}
|
||||
eeh_pcid_put(dev);
|
||||
}
|
||||
}
|
||||
|
||||
/* Remove it from PCI subsystem */
|
||||
|
||||
@@ -958,7 +958,7 @@ start_here:
|
||||
tovirt(r6,r6)
|
||||
lis r5, abatron_pteptrs@h
|
||||
ori r5, r5, abatron_pteptrs@l
|
||||
stw r5, 0xf0(0) /* Must match your Abatron config file */
|
||||
stw r5, 0xf0(r0) /* Must match your Abatron config file */
|
||||
tophys(r5,r5)
|
||||
stw r6, 0(r5)
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/bootmem.h>
|
||||
#include <linux/syscalls.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
@@ -334,7 +334,6 @@ static void __init prom_print_dec(unsigned long val)
|
||||
call_prom("write", 3, 1, prom.stdout, buf+i, size);
|
||||
}
|
||||
|
||||
__printf(1, 2)
|
||||
static void __init prom_printf(const char *format, ...)
|
||||
{
|
||||
const char *p, *q, *s;
|
||||
@@ -1149,7 +1148,7 @@ static void __init prom_send_capabilities(void)
|
||||
*/
|
||||
|
||||
cores = DIV_ROUND_UP(NR_CPUS, prom_count_smt_threads());
|
||||
prom_printf("Max number of cores passed to firmware: %u (NR_CPUS = %d)\n",
|
||||
prom_printf("Max number of cores passed to firmware: %lu (NR_CPUS = %lu)\n",
|
||||
cores, NR_CPUS);
|
||||
|
||||
ibm_architecture_vec.vec5.max_cpus = cpu_to_be32(cores);
|
||||
@@ -1231,7 +1230,7 @@ static unsigned long __init alloc_up(unsigned long size, unsigned long align)
|
||||
|
||||
if (align)
|
||||
base = _ALIGN_UP(base, align);
|
||||
prom_debug("%s(%lx, %lx)\n", __func__, size, align);
|
||||
prom_debug("alloc_up(%x, %x)\n", size, align);
|
||||
if (ram_top == 0)
|
||||
prom_panic("alloc_up() called with mem not initialized\n");
|
||||
|
||||
@@ -1242,7 +1241,7 @@ static unsigned long __init alloc_up(unsigned long size, unsigned long align)
|
||||
|
||||
for(; (base + size) <= alloc_top;
|
||||
base = _ALIGN_UP(base + 0x100000, align)) {
|
||||
prom_debug(" trying: 0x%lx\n\r", base);
|
||||
prom_debug(" trying: 0x%x\n\r", base);
|
||||
addr = (unsigned long)prom_claim(base, size, 0);
|
||||
if (addr != PROM_ERROR && addr != 0)
|
||||
break;
|
||||
@@ -1254,12 +1253,12 @@ static unsigned long __init alloc_up(unsigned long size, unsigned long align)
|
||||
return 0;
|
||||
alloc_bottom = addr + size;
|
||||
|
||||
prom_debug(" -> %lx\n", addr);
|
||||
prom_debug(" alloc_bottom : %lx\n", alloc_bottom);
|
||||
prom_debug(" alloc_top : %lx\n", alloc_top);
|
||||
prom_debug(" alloc_top_hi : %lx\n", alloc_top_high);
|
||||
prom_debug(" rmo_top : %lx\n", rmo_top);
|
||||
prom_debug(" ram_top : %lx\n", ram_top);
|
||||
prom_debug(" -> %x\n", addr);
|
||||
prom_debug(" alloc_bottom : %x\n", alloc_bottom);
|
||||
prom_debug(" alloc_top : %x\n", alloc_top);
|
||||
prom_debug(" alloc_top_hi : %x\n", alloc_top_high);
|
||||
prom_debug(" rmo_top : %x\n", rmo_top);
|
||||
prom_debug(" ram_top : %x\n", ram_top);
|
||||
|
||||
return addr;
|
||||
}
|
||||
@@ -1274,7 +1273,7 @@ static unsigned long __init alloc_down(unsigned long size, unsigned long align,
|
||||
{
|
||||
unsigned long base, addr = 0;
|
||||
|
||||
prom_debug("%s(%lx, %lx, %s)\n", __func__, size, align,
|
||||
prom_debug("alloc_down(%x, %x, %s)\n", size, align,
|
||||
highmem ? "(high)" : "(low)");
|
||||
if (ram_top == 0)
|
||||
prom_panic("alloc_down() called with mem not initialized\n");
|
||||
@@ -1302,7 +1301,7 @@ static unsigned long __init alloc_down(unsigned long size, unsigned long align,
|
||||
base = _ALIGN_DOWN(alloc_top - size, align);
|
||||
for (; base > alloc_bottom;
|
||||
base = _ALIGN_DOWN(base - 0x100000, align)) {
|
||||
prom_debug(" trying: 0x%lx\n\r", base);
|
||||
prom_debug(" trying: 0x%x\n\r", base);
|
||||
addr = (unsigned long)prom_claim(base, size, 0);
|
||||
if (addr != PROM_ERROR && addr != 0)
|
||||
break;
|
||||
@@ -1313,12 +1312,12 @@ static unsigned long __init alloc_down(unsigned long size, unsigned long align,
|
||||
alloc_top = addr;
|
||||
|
||||
bail:
|
||||
prom_debug(" -> %lx\n", addr);
|
||||
prom_debug(" alloc_bottom : %lx\n", alloc_bottom);
|
||||
prom_debug(" alloc_top : %lx\n", alloc_top);
|
||||
prom_debug(" alloc_top_hi : %lx\n", alloc_top_high);
|
||||
prom_debug(" rmo_top : %lx\n", rmo_top);
|
||||
prom_debug(" ram_top : %lx\n", ram_top);
|
||||
prom_debug(" -> %x\n", addr);
|
||||
prom_debug(" alloc_bottom : %x\n", alloc_bottom);
|
||||
prom_debug(" alloc_top : %x\n", alloc_top);
|
||||
prom_debug(" alloc_top_hi : %x\n", alloc_top_high);
|
||||
prom_debug(" rmo_top : %x\n", rmo_top);
|
||||
prom_debug(" ram_top : %x\n", ram_top);
|
||||
|
||||
return addr;
|
||||
}
|
||||
@@ -1444,7 +1443,7 @@ static void __init prom_init_mem(void)
|
||||
|
||||
if (size == 0)
|
||||
continue;
|
||||
prom_debug(" %lx %lx\n", base, size);
|
||||
prom_debug(" %x %x\n", base, size);
|
||||
if (base == 0 && (of_platform & PLATFORM_LPAR))
|
||||
rmo_top = size;
|
||||
if ((base + size) > ram_top)
|
||||
@@ -1464,12 +1463,12 @@ static void __init prom_init_mem(void)
|
||||
|
||||
if (prom_memory_limit) {
|
||||
if (prom_memory_limit <= alloc_bottom) {
|
||||
prom_printf("Ignoring mem=%lx <= alloc_bottom.\n",
|
||||
prom_memory_limit);
|
||||
prom_printf("Ignoring mem=%x <= alloc_bottom.\n",
|
||||
prom_memory_limit);
|
||||
prom_memory_limit = 0;
|
||||
} else if (prom_memory_limit >= ram_top) {
|
||||
prom_printf("Ignoring mem=%lx >= ram_top.\n",
|
||||
prom_memory_limit);
|
||||
prom_printf("Ignoring mem=%x >= ram_top.\n",
|
||||
prom_memory_limit);
|
||||
prom_memory_limit = 0;
|
||||
} else {
|
||||
ram_top = prom_memory_limit;
|
||||
@@ -1501,13 +1500,12 @@ static void __init prom_init_mem(void)
|
||||
alloc_bottom = PAGE_ALIGN(prom_initrd_end);
|
||||
|
||||
prom_printf("memory layout at init:\n");
|
||||
prom_printf(" memory_limit : %lx (16 MB aligned)\n",
|
||||
prom_memory_limit);
|
||||
prom_printf(" alloc_bottom : %lx\n", alloc_bottom);
|
||||
prom_printf(" alloc_top : %lx\n", alloc_top);
|
||||
prom_printf(" alloc_top_hi : %lx\n", alloc_top_high);
|
||||
prom_printf(" rmo_top : %lx\n", rmo_top);
|
||||
prom_printf(" ram_top : %lx\n", ram_top);
|
||||
prom_printf(" memory_limit : %x (16 MB aligned)\n", prom_memory_limit);
|
||||
prom_printf(" alloc_bottom : %x\n", alloc_bottom);
|
||||
prom_printf(" alloc_top : %x\n", alloc_top);
|
||||
prom_printf(" alloc_top_hi : %x\n", alloc_top_high);
|
||||
prom_printf(" rmo_top : %x\n", rmo_top);
|
||||
prom_printf(" ram_top : %x\n", ram_top);
|
||||
}
|
||||
|
||||
static void __init prom_close_stdin(void)
|
||||
@@ -1568,7 +1566,7 @@ static void __init prom_instantiate_opal(void)
|
||||
return;
|
||||
}
|
||||
|
||||
prom_printf("instantiating opal at 0x%llx...", base);
|
||||
prom_printf("instantiating opal at 0x%x...", base);
|
||||
|
||||
if (call_prom_ret("call-method", 4, 3, rets,
|
||||
ADDR("load-opal-runtime"),
|
||||
@@ -1584,10 +1582,10 @@ static void __init prom_instantiate_opal(void)
|
||||
|
||||
reserve_mem(base, size);
|
||||
|
||||
prom_debug("opal base = 0x%llx\n", base);
|
||||
prom_debug("opal align = 0x%llx\n", align);
|
||||
prom_debug("opal entry = 0x%llx\n", entry);
|
||||
prom_debug("opal size = 0x%llx\n", size);
|
||||
prom_debug("opal base = 0x%x\n", base);
|
||||
prom_debug("opal align = 0x%x\n", align);
|
||||
prom_debug("opal entry = 0x%x\n", entry);
|
||||
prom_debug("opal size = 0x%x\n", (long)size);
|
||||
|
||||
prom_setprop(opal_node, "/ibm,opal", "opal-base-address",
|
||||
&base, sizeof(base));
|
||||
@@ -1664,7 +1662,7 @@ static void __init prom_instantiate_rtas(void)
|
||||
|
||||
prom_debug("rtas base = 0x%x\n", base);
|
||||
prom_debug("rtas entry = 0x%x\n", entry);
|
||||
prom_debug("rtas size = 0x%x\n", size);
|
||||
prom_debug("rtas size = 0x%x\n", (long)size);
|
||||
|
||||
prom_debug("prom_instantiate_rtas: end...\n");
|
||||
}
|
||||
@@ -1722,7 +1720,7 @@ static void __init prom_instantiate_sml(void)
|
||||
if (base == 0)
|
||||
prom_panic("Could not allocate memory for sml\n");
|
||||
|
||||
prom_printf("instantiating sml at 0x%llx...", base);
|
||||
prom_printf("instantiating sml at 0x%x...", base);
|
||||
|
||||
memset((void *)base, 0, size);
|
||||
|
||||
@@ -1741,8 +1739,8 @@ static void __init prom_instantiate_sml(void)
|
||||
prom_setprop(ibmvtpm_node, "/vdevice/vtpm", "linux,sml-size",
|
||||
&size, sizeof(size));
|
||||
|
||||
prom_debug("sml base = 0x%llx\n", base);
|
||||
prom_debug("sml size = 0x%x\n", size);
|
||||
prom_debug("sml base = 0x%x\n", base);
|
||||
prom_debug("sml size = 0x%x\n", (long)size);
|
||||
|
||||
prom_debug("prom_instantiate_sml: end...\n");
|
||||
}
|
||||
@@ -1843,7 +1841,7 @@ static void __init prom_initialize_tce_table(void)
|
||||
|
||||
prom_debug("TCE table: %s\n", path);
|
||||
prom_debug("\tnode = 0x%x\n", node);
|
||||
prom_debug("\tbase = 0x%llx\n", base);
|
||||
prom_debug("\tbase = 0x%x\n", base);
|
||||
prom_debug("\tsize = 0x%x\n", minsize);
|
||||
|
||||
/* Initialize the table to have a one-to-one mapping
|
||||
@@ -1930,12 +1928,12 @@ static void __init prom_hold_cpus(void)
|
||||
}
|
||||
|
||||
prom_debug("prom_hold_cpus: start...\n");
|
||||
prom_debug(" 1) spinloop = 0x%lx\n", (unsigned long)spinloop);
|
||||
prom_debug(" 1) *spinloop = 0x%lx\n", *spinloop);
|
||||
prom_debug(" 1) acknowledge = 0x%lx\n",
|
||||
prom_debug(" 1) spinloop = 0x%x\n", (unsigned long)spinloop);
|
||||
prom_debug(" 1) *spinloop = 0x%x\n", *spinloop);
|
||||
prom_debug(" 1) acknowledge = 0x%x\n",
|
||||
(unsigned long)acknowledge);
|
||||
prom_debug(" 1) *acknowledge = 0x%lx\n", *acknowledge);
|
||||
prom_debug(" 1) secondary_hold = 0x%lx\n", secondary_hold);
|
||||
prom_debug(" 1) *acknowledge = 0x%x\n", *acknowledge);
|
||||
prom_debug(" 1) secondary_hold = 0x%x\n", secondary_hold);
|
||||
|
||||
/* Set the common spinloop variable, so all of the secondary cpus
|
||||
* will block when they are awakened from their OF spinloop.
|
||||
@@ -1963,7 +1961,7 @@ static void __init prom_hold_cpus(void)
|
||||
prom_getprop(node, "reg", ®, sizeof(reg));
|
||||
cpu_no = be32_to_cpu(reg);
|
||||
|
||||
prom_debug("cpu hw idx = %u\n", cpu_no);
|
||||
prom_debug("cpu hw idx = %lu\n", cpu_no);
|
||||
|
||||
/* Init the acknowledge var which will be reset by
|
||||
* the secondary cpu when it awakens from its OF
|
||||
@@ -1973,7 +1971,7 @@ static void __init prom_hold_cpus(void)
|
||||
|
||||
if (cpu_no != prom.cpu) {
|
||||
/* Primary Thread of non-boot cpu or any thread */
|
||||
prom_printf("starting cpu hw idx %u... ", cpu_no);
|
||||
prom_printf("starting cpu hw idx %lu... ", cpu_no);
|
||||
call_prom("start-cpu", 3, 0, node,
|
||||
secondary_hold, cpu_no);
|
||||
|
||||
@@ -1984,11 +1982,11 @@ static void __init prom_hold_cpus(void)
|
||||
if (*acknowledge == cpu_no)
|
||||
prom_printf("done\n");
|
||||
else
|
||||
prom_printf("failed: %lx\n", *acknowledge);
|
||||
prom_printf("failed: %x\n", *acknowledge);
|
||||
}
|
||||
#ifdef CONFIG_SMP
|
||||
else
|
||||
prom_printf("boot cpu hw idx %u\n", cpu_no);
|
||||
prom_printf("boot cpu hw idx %lu\n", cpu_no);
|
||||
#endif /* CONFIG_SMP */
|
||||
}
|
||||
|
||||
@@ -2266,7 +2264,7 @@ static void __init *make_room(unsigned long *mem_start, unsigned long *mem_end,
|
||||
while ((*mem_start + needed) > *mem_end) {
|
||||
unsigned long room, chunk;
|
||||
|
||||
prom_debug("Chunk exhausted, claiming more at %lx...\n",
|
||||
prom_debug("Chunk exhausted, claiming more at %x...\n",
|
||||
alloc_bottom);
|
||||
room = alloc_top - alloc_bottom;
|
||||
if (room > DEVTREE_CHUNK_SIZE)
|
||||
@@ -2492,7 +2490,7 @@ static void __init flatten_device_tree(void)
|
||||
room = alloc_top - alloc_bottom - 0x4000;
|
||||
if (room > DEVTREE_CHUNK_SIZE)
|
||||
room = DEVTREE_CHUNK_SIZE;
|
||||
prom_debug("starting device tree allocs at %lx\n", alloc_bottom);
|
||||
prom_debug("starting device tree allocs at %x\n", alloc_bottom);
|
||||
|
||||
/* Now try to claim that */
|
||||
mem_start = (unsigned long)alloc_up(room, PAGE_SIZE);
|
||||
@@ -2555,7 +2553,7 @@ static void __init flatten_device_tree(void)
|
||||
int i;
|
||||
prom_printf("reserved memory map:\n");
|
||||
for (i = 0; i < mem_reserve_cnt; i++)
|
||||
prom_printf(" %llx - %llx\n",
|
||||
prom_printf(" %x - %x\n",
|
||||
be64_to_cpu(mem_reserve_map[i].base),
|
||||
be64_to_cpu(mem_reserve_map[i].size));
|
||||
}
|
||||
@@ -2565,9 +2563,9 @@ static void __init flatten_device_tree(void)
|
||||
*/
|
||||
mem_reserve_cnt = MEM_RESERVE_MAP_SIZE;
|
||||
|
||||
prom_printf("Device tree strings 0x%lx -> 0x%lx\n",
|
||||
prom_printf("Device tree strings 0x%x -> 0x%x\n",
|
||||
dt_string_start, dt_string_end);
|
||||
prom_printf("Device tree struct 0x%lx -> 0x%lx\n",
|
||||
prom_printf("Device tree struct 0x%x -> 0x%x\n",
|
||||
dt_struct_start, dt_struct_end);
|
||||
}
|
||||
|
||||
@@ -2999,7 +2997,7 @@ static void __init prom_find_boot_cpu(void)
|
||||
prom_getprop(cpu_pkg, "reg", &rval, sizeof(rval));
|
||||
prom.cpu = be32_to_cpu(rval);
|
||||
|
||||
prom_debug("Booting CPU hw index = %d\n", prom.cpu);
|
||||
prom_debug("Booting CPU hw index = %lu\n", prom.cpu);
|
||||
}
|
||||
|
||||
static void __init prom_check_initrd(unsigned long r3, unsigned long r4)
|
||||
@@ -3021,8 +3019,8 @@ static void __init prom_check_initrd(unsigned long r3, unsigned long r4)
|
||||
reserve_mem(prom_initrd_start,
|
||||
prom_initrd_end - prom_initrd_start);
|
||||
|
||||
prom_debug("initrd_start=0x%lx\n", prom_initrd_start);
|
||||
prom_debug("initrd_end=0x%lx\n", prom_initrd_end);
|
||||
prom_debug("initrd_start=0x%x\n", prom_initrd_start);
|
||||
prom_debug("initrd_end=0x%x\n", prom_initrd_end);
|
||||
}
|
||||
#endif /* CONFIG_BLK_DEV_INITRD */
|
||||
}
|
||||
@@ -3275,7 +3273,7 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
|
||||
/* Don't print anything after quiesce under OPAL, it crashes OFW */
|
||||
if (of_platform != PLATFORM_OPAL) {
|
||||
prom_printf("Booting Linux via __start() @ 0x%lx ...\n", kbase);
|
||||
prom_debug("->dt_header_start=0x%lx\n", hdr);
|
||||
prom_debug("->dt_header_start=0x%x\n", hdr);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PPC32
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include <asm/errno.h>
|
||||
#include <asm/ppc_asm.h>
|
||||
#include <asm/export.h>
|
||||
#include <asm/cache.h>
|
||||
|
||||
.text
|
||||
|
||||
@@ -24,7 +23,7 @@ _GLOBAL(strncpy)
|
||||
mtctr r5
|
||||
addi r6,r3,-1
|
||||
addi r4,r4,-1
|
||||
.balign IFETCH_ALIGN_BYTES
|
||||
.balign 16
|
||||
1: lbzu r0,1(r4)
|
||||
cmpwi 0,r0,0
|
||||
stbu r0,1(r6)
|
||||
@@ -44,7 +43,7 @@ _GLOBAL(strncmp)
|
||||
mtctr r5
|
||||
addi r5,r3,-1
|
||||
addi r4,r4,-1
|
||||
.balign IFETCH_ALIGN_BYTES
|
||||
.balign 16
|
||||
1: lbzu r3,1(r5)
|
||||
cmpwi 1,r3,0
|
||||
lbzu r0,1(r4)
|
||||
@@ -78,7 +77,7 @@ _GLOBAL(memchr)
|
||||
beq- 2f
|
||||
mtctr r5
|
||||
addi r3,r3,-1
|
||||
.balign IFETCH_ALIGN_BYTES
|
||||
.balign 16
|
||||
1: lbzu r0,1(r3)
|
||||
cmpw 0,r0,r4
|
||||
bdnzf 2,1b
|
||||
|
||||
@@ -62,14 +62,14 @@ static inline void slb_shadow_update(unsigned long ea, int ssize,
|
||||
* updating it. No write barriers are needed here, provided
|
||||
* we only update the current CPU's SLB shadow buffer.
|
||||
*/
|
||||
WRITE_ONCE(p->save_area[index].esid, 0);
|
||||
WRITE_ONCE(p->save_area[index].vsid, cpu_to_be64(mk_vsid_data(ea, ssize, flags)));
|
||||
WRITE_ONCE(p->save_area[index].esid, cpu_to_be64(mk_esid_data(ea, ssize, index)));
|
||||
p->save_area[index].esid = 0;
|
||||
p->save_area[index].vsid = cpu_to_be64(mk_vsid_data(ea, ssize, flags));
|
||||
p->save_area[index].esid = cpu_to_be64(mk_esid_data(ea, ssize, index));
|
||||
}
|
||||
|
||||
static inline void slb_shadow_clear(enum slb_index index)
|
||||
{
|
||||
WRITE_ONCE(get_slb_shadow()->save_area[index].esid, 0);
|
||||
get_slb_shadow()->save_area[index].esid = 0;
|
||||
}
|
||||
|
||||
static inline void create_shadowed_slbe(unsigned long ea, int ssize,
|
||||
|
||||
@@ -203,37 +203,25 @@ static void bpf_jit_build_epilogue(u32 *image, struct codegen_context *ctx)
|
||||
|
||||
static void bpf_jit_emit_func_call(u32 *image, struct codegen_context *ctx, u64 func)
|
||||
{
|
||||
unsigned int i, ctx_idx = ctx->idx;
|
||||
|
||||
/* Load function address into r12 */
|
||||
PPC_LI64(12, func);
|
||||
|
||||
/* For bpf-to-bpf function calls, the callee's address is unknown
|
||||
* until the last extra pass. As seen above, we use PPC_LI64() to
|
||||
* load the callee's address, but this may optimize the number of
|
||||
* instructions required based on the nature of the address.
|
||||
*
|
||||
* Since we don't want the number of instructions emitted to change,
|
||||
* we pad the optimized PPC_LI64() call with NOPs to guarantee that
|
||||
* we always have a five-instruction sequence, which is the maximum
|
||||
* that PPC_LI64() can emit.
|
||||
*/
|
||||
for (i = ctx->idx - ctx_idx; i < 5; i++)
|
||||
PPC_NOP();
|
||||
|
||||
#ifdef PPC64_ELF_ABI_v1
|
||||
/* func points to the function descriptor */
|
||||
PPC_LI64(b2p[TMP_REG_2], func);
|
||||
/* Load actual entry point from function descriptor */
|
||||
PPC_BPF_LL(b2p[TMP_REG_1], b2p[TMP_REG_2], 0);
|
||||
/* ... and move it to LR */
|
||||
PPC_MTLR(b2p[TMP_REG_1]);
|
||||
/*
|
||||
* Load TOC from function descriptor at offset 8.
|
||||
* We can clobber r2 since we get called through a
|
||||
* function pointer (so caller will save/restore r2)
|
||||
* and since we don't use a TOC ourself.
|
||||
*/
|
||||
PPC_BPF_LL(2, 12, 8);
|
||||
/* Load actual entry point from function descriptor */
|
||||
PPC_BPF_LL(12, 12, 0);
|
||||
#endif
|
||||
|
||||
PPC_BPF_LL(2, b2p[TMP_REG_2], 8);
|
||||
#else
|
||||
/* We can clobber r12 */
|
||||
PPC_FUNC_ADDR(12, func);
|
||||
PPC_MTLR(12);
|
||||
#endif
|
||||
PPC_BLRL();
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
#include <asm/sections.h>
|
||||
#include <asm/time.h>
|
||||
|
||||
#include <platforms/chrp/chrp.h>
|
||||
|
||||
extern spinlock_t rtc_lock;
|
||||
|
||||
#define NVRAM_AS0 0x74
|
||||
@@ -65,7 +63,7 @@ long __init chrp_time_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int chrp_cmos_clock_read(int addr)
|
||||
int chrp_cmos_clock_read(int addr)
|
||||
{
|
||||
if (nvram_as1 != 0)
|
||||
outb(addr>>8, nvram_as1);
|
||||
@@ -73,7 +71,7 @@ static int chrp_cmos_clock_read(int addr)
|
||||
return (inb(nvram_data));
|
||||
}
|
||||
|
||||
static void chrp_cmos_clock_write(unsigned long val, int addr)
|
||||
void chrp_cmos_clock_write(unsigned long val, int addr)
|
||||
{
|
||||
if (nvram_as1 != 0)
|
||||
outb(addr>>8, nvram_as1);
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
*/
|
||||
#define HW_BROADWAY_ICR 0x00
|
||||
#define HW_BROADWAY_IMR 0x04
|
||||
#define HW_STARLET_ICR 0x08
|
||||
#define HW_STARLET_IMR 0x0c
|
||||
|
||||
|
||||
/*
|
||||
@@ -76,9 +74,6 @@ static void hlwd_pic_unmask(struct irq_data *d)
|
||||
void __iomem *io_base = irq_data_get_irq_chip_data(d);
|
||||
|
||||
setbits32(io_base + HW_BROADWAY_IMR, 1 << irq);
|
||||
|
||||
/* Make sure the ARM (aka. Starlet) doesn't handle this interrupt. */
|
||||
clrbits32(io_base + HW_STARLET_IMR, 1 << irq);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -468,7 +468,7 @@ void __init bootx_init(unsigned long r3, unsigned long r4)
|
||||
boot_infos_t *bi = (boot_infos_t *) r4;
|
||||
unsigned long hdr;
|
||||
unsigned long space;
|
||||
unsigned long ptr;
|
||||
unsigned long ptr, x;
|
||||
char *model;
|
||||
unsigned long offset = reloc_offset();
|
||||
|
||||
@@ -562,8 +562,6 @@ void __init bootx_init(unsigned long r3, unsigned long r4)
|
||||
* MMU switched OFF, so this should not be useful anymore.
|
||||
*/
|
||||
if (bi->version < 4) {
|
||||
unsigned long x __maybe_unused;
|
||||
|
||||
bootx_printf("Touching pages...\n");
|
||||
|
||||
/*
|
||||
|
||||
@@ -352,7 +352,6 @@ static int pmac_late_init(void)
|
||||
}
|
||||
machine_late_initcall(powermac, pmac_late_init);
|
||||
|
||||
void note_bootable_part(dev_t dev, int part, int goodness);
|
||||
/*
|
||||
* This is __ref because we check for "initializing" before
|
||||
* touching any of the __init sensitive things and "initializing"
|
||||
|
||||
@@ -116,7 +116,7 @@ struct hws_basic_entry {
|
||||
|
||||
struct hws_diag_entry {
|
||||
unsigned int def:16; /* 0-15 Data Entry Format */
|
||||
unsigned int R:15; /* 16-19 and 20-30 reserved */
|
||||
unsigned int R:14; /* 16-19 and 20-30 reserved */
|
||||
unsigned int I:1; /* 31 entry valid or invalid */
|
||||
u8 data[]; /* Machine-dependent sample data */
|
||||
} __packed;
|
||||
@@ -132,9 +132,7 @@ struct hws_trailer_entry {
|
||||
unsigned int f:1; /* 0 - Block Full Indicator */
|
||||
unsigned int a:1; /* 1 - Alert request control */
|
||||
unsigned int t:1; /* 2 - Timestamp format */
|
||||
unsigned int :29; /* 3 - 31: Reserved */
|
||||
unsigned int bsdes:16; /* 32-47: size of basic SDE */
|
||||
unsigned int dsdes:16; /* 48-63: size of diagnostic SDE */
|
||||
unsigned long long:61; /* 3 - 63: Reserved */
|
||||
};
|
||||
unsigned long long flags; /* 0 - 63: All indicators */
|
||||
};
|
||||
|
||||
@@ -933,7 +933,7 @@ ENTRY(\sym)
|
||||
|
||||
call \do_sym
|
||||
|
||||
jmp error_exit
|
||||
jmp error_exit /* %ebx: no swapgs flag */
|
||||
.endif
|
||||
END(\sym)
|
||||
.endm
|
||||
@@ -1166,6 +1166,7 @@ END(paranoid_exit)
|
||||
|
||||
/*
|
||||
* Save all registers in pt_regs, and switch GS if needed.
|
||||
* Return: EBX=0: came from user mode; EBX=1: otherwise
|
||||
*/
|
||||
ENTRY(error_entry)
|
||||
UNWIND_HINT_FUNC
|
||||
@@ -1212,6 +1213,7 @@ ENTRY(error_entry)
|
||||
* for these here too.
|
||||
*/
|
||||
.Lerror_kernelspace:
|
||||
incl %ebx
|
||||
leaq native_irq_return_iret(%rip), %rcx
|
||||
cmpq %rcx, RIP+8(%rsp)
|
||||
je .Lerror_bad_iret
|
||||
@@ -1245,20 +1247,28 @@ ENTRY(error_entry)
|
||||
|
||||
/*
|
||||
* Pretend that the exception came from user mode: set up pt_regs
|
||||
* as if we faulted immediately after IRET.
|
||||
* as if we faulted immediately after IRET and clear EBX so that
|
||||
* error_exit knows that we will be returning to user mode.
|
||||
*/
|
||||
mov %rsp, %rdi
|
||||
call fixup_bad_iret
|
||||
mov %rax, %rsp
|
||||
decl %ebx
|
||||
jmp .Lerror_entry_from_usermode_after_swapgs
|
||||
END(error_entry)
|
||||
|
||||
|
||||
/*
|
||||
* On entry, EBX is a "return to kernel mode" flag:
|
||||
* 1: already in kernel mode, don't need SWAPGS
|
||||
* 0: user gsbase is loaded, we need SWAPGS and standard preparation for return to usermode
|
||||
*/
|
||||
ENTRY(error_exit)
|
||||
UNWIND_HINT_REGS
|
||||
DISABLE_INTERRUPTS(CLBR_ANY)
|
||||
TRACE_IRQS_OFF
|
||||
testb $3, CS(%rsp)
|
||||
jz retint_kernel
|
||||
testl %ebx, %ebx
|
||||
jnz retint_kernel
|
||||
jmp retint_user
|
||||
END(error_exit)
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ void uncore_perf_event_update(struct intel_uncore_box *box, struct perf_event *e
|
||||
u64 prev_count, new_count, delta;
|
||||
int shift;
|
||||
|
||||
if (event->hw.idx == UNCORE_PMC_IDX_FIXED)
|
||||
if (event->hw.idx >= UNCORE_PMC_IDX_FIXED)
|
||||
shift = 64 - uncore_fixed_ctr_bits(box);
|
||||
else
|
||||
shift = 64 - uncore_perf_ctr_bits(box);
|
||||
|
||||
@@ -246,7 +246,7 @@ static void nhmex_uncore_msr_enable_event(struct intel_uncore_box *box, struct p
|
||||
{
|
||||
struct hw_perf_event *hwc = &event->hw;
|
||||
|
||||
if (hwc->idx == UNCORE_PMC_IDX_FIXED)
|
||||
if (hwc->idx >= UNCORE_PMC_IDX_FIXED)
|
||||
wrmsrl(hwc->config_base, NHMEX_PMON_CTL_EN_BIT0);
|
||||
else if (box->pmu->type->event_mask & NHMEX_PMON_CTL_EN_BIT0)
|
||||
wrmsrl(hwc->config_base, hwc->config | NHMEX_PMON_CTL_EN_BIT22);
|
||||
|
||||
@@ -580,9 +580,6 @@ static u32 skx_deadline_rev(void)
|
||||
case 0x04: return 0x02000014;
|
||||
}
|
||||
|
||||
if (boot_cpu_data.x86_stepping > 4)
|
||||
return 0;
|
||||
|
||||
return ~0U;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ static DEFINE_MUTEX(microcode_mutex);
|
||||
/*
|
||||
* Serialize late loading so that CPUs get updated one-by-one.
|
||||
*/
|
||||
static DEFINE_RAW_SPINLOCK(update_lock);
|
||||
static DEFINE_SPINLOCK(update_lock);
|
||||
|
||||
struct ucode_cpu_info ucode_cpu_info[NR_CPUS];
|
||||
|
||||
@@ -560,9 +560,9 @@ static int __reload_late(void *info)
|
||||
if (__wait_for_cpus(&late_cpus_in, NSEC_PER_SEC))
|
||||
return -1;
|
||||
|
||||
raw_spin_lock(&update_lock);
|
||||
spin_lock(&update_lock);
|
||||
apply_microcode_local(&err);
|
||||
raw_spin_unlock(&update_lock);
|
||||
spin_unlock(&update_lock);
|
||||
|
||||
/* siblings return UCODE_OK because their engine got updated already */
|
||||
if (err > UCODE_NFOUND) {
|
||||
|
||||
@@ -890,7 +890,7 @@ static int mmu_topup_memory_cache_page(struct kvm_mmu_memory_cache *cache,
|
||||
if (cache->nobjs >= min)
|
||||
return 0;
|
||||
while (cache->nobjs < ARRAY_SIZE(cache->objects)) {
|
||||
page = (void *)__get_free_page(GFP_KERNEL_ACCOUNT);
|
||||
page = (void *)__get_free_page(GFP_KERNEL);
|
||||
if (!page)
|
||||
return -ENOMEM;
|
||||
cache->objects[cache->nobjs++] = page;
|
||||
|
||||
@@ -7354,8 +7354,6 @@ static int enter_vmx_operation(struct kvm_vcpu *vcpu)
|
||||
HRTIMER_MODE_REL_PINNED);
|
||||
vmx->nested.preemption_timer.function = vmx_preemption_timer_fn;
|
||||
|
||||
vmx->nested.vpid02 = allocate_vpid();
|
||||
|
||||
vmx->nested.vmxon = true;
|
||||
return 0;
|
||||
|
||||
@@ -9804,8 +9802,10 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id)
|
||||
goto free_vmcs;
|
||||
}
|
||||
|
||||
if (nested)
|
||||
if (nested) {
|
||||
nested_vmx_setup_ctls_msrs(vmx);
|
||||
vmx->nested.vpid02 = allocate_vpid();
|
||||
}
|
||||
|
||||
vmx->nested.posted_intr_nv = -1;
|
||||
vmx->nested.current_vmptr = -1ull;
|
||||
@@ -9822,6 +9822,7 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id)
|
||||
return &vmx->vcpu;
|
||||
|
||||
free_vmcs:
|
||||
free_vpid(vmx->nested.vpid02);
|
||||
free_loaded_vmcs(vmx->loaded_vmcs);
|
||||
free_msrs:
|
||||
kfree(vmx->guest_msrs);
|
||||
|
||||
@@ -1678,6 +1678,7 @@ static void bfq_requests_merged(struct request_queue *q, struct request *rq,
|
||||
|
||||
if (!RB_EMPTY_NODE(&rq->rb_node))
|
||||
goto end;
|
||||
spin_lock_irq(&bfqq->bfqd->lock);
|
||||
|
||||
/*
|
||||
* If next and rq belong to the same bfq_queue and next is older
|
||||
@@ -1701,6 +1702,7 @@ static void bfq_requests_merged(struct request_queue *q, struct request *rq,
|
||||
|
||||
bfq_remove_request(q, next);
|
||||
|
||||
spin_unlock_irq(&bfqq->bfqd->lock);
|
||||
end:
|
||||
bfqg_stats_update_io_merged(bfqq_group(bfqq), next->cmd_flags);
|
||||
}
|
||||
|
||||
19
block/bio.c
19
block/bio.c
@@ -881,16 +881,16 @@ EXPORT_SYMBOL(bio_add_page);
|
||||
*/
|
||||
int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)
|
||||
{
|
||||
unsigned short nr_pages = bio->bi_max_vecs - bio->bi_vcnt, idx;
|
||||
unsigned short nr_pages = bio->bi_max_vecs - bio->bi_vcnt;
|
||||
struct bio_vec *bv = bio->bi_io_vec + bio->bi_vcnt;
|
||||
struct page **pages = (struct page **)bv;
|
||||
size_t offset;
|
||||
size_t offset, diff;
|
||||
ssize_t size;
|
||||
|
||||
size = iov_iter_get_pages(iter, pages, LONG_MAX, nr_pages, &offset);
|
||||
if (unlikely(size <= 0))
|
||||
return size ? size : -EFAULT;
|
||||
idx = nr_pages = (size + offset + PAGE_SIZE - 1) / PAGE_SIZE;
|
||||
nr_pages = (size + offset + PAGE_SIZE - 1) / PAGE_SIZE;
|
||||
|
||||
/*
|
||||
* Deep magic below: We need to walk the pinned pages backwards
|
||||
@@ -903,15 +903,17 @@ int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)
|
||||
bio->bi_iter.bi_size += size;
|
||||
bio->bi_vcnt += nr_pages;
|
||||
|
||||
while (idx--) {
|
||||
bv[idx].bv_page = pages[idx];
|
||||
bv[idx].bv_len = PAGE_SIZE;
|
||||
bv[idx].bv_offset = 0;
|
||||
diff = (nr_pages * PAGE_SIZE - offset) - size;
|
||||
while (nr_pages--) {
|
||||
bv[nr_pages].bv_page = pages[nr_pages];
|
||||
bv[nr_pages].bv_len = PAGE_SIZE;
|
||||
bv[nr_pages].bv_offset = 0;
|
||||
}
|
||||
|
||||
bv[0].bv_offset += offset;
|
||||
bv[0].bv_len -= offset;
|
||||
bv[nr_pages - 1].bv_len -= nr_pages * PAGE_SIZE - offset - size;
|
||||
if (diff)
|
||||
bv[bio->bi_vcnt - 1].bv_len -= diff;
|
||||
|
||||
iov_iter_advance(iter, size);
|
||||
return 0;
|
||||
@@ -1889,7 +1891,6 @@ struct bio *bio_split(struct bio *bio, int sectors,
|
||||
bio_integrity_trim(split);
|
||||
|
||||
bio_advance(bio, split->bi_iter.bi_size);
|
||||
bio->bi_iter.bi_done = 0;
|
||||
|
||||
if (bio_flagged(bio, BIO_TRACE_COMPLETION))
|
||||
bio_set_flag(split, BIO_TRACE_COMPLETION);
|
||||
|
||||
@@ -108,7 +108,6 @@ static int crypto_authenc_setkey(struct crypto_aead *authenc, const u8 *key,
|
||||
CRYPTO_TFM_RES_MASK);
|
||||
|
||||
out:
|
||||
memzero_explicit(&keys, sizeof(keys));
|
||||
return err;
|
||||
|
||||
badkey:
|
||||
|
||||
@@ -90,7 +90,6 @@ static int crypto_authenc_esn_setkey(struct crypto_aead *authenc_esn, const u8 *
|
||||
CRYPTO_TFM_RES_MASK);
|
||||
|
||||
out:
|
||||
memzero_explicit(&keys, sizeof(keys));
|
||||
return err;
|
||||
|
||||
badkey:
|
||||
|
||||
@@ -69,10 +69,6 @@ ACPI_MODULE_NAME("acpi_lpss");
|
||||
#define LPSS_SAVE_CTX BIT(4)
|
||||
#define LPSS_NO_D3_DELAY BIT(5)
|
||||
|
||||
/* Crystal Cove PMIC shares same ACPI ID between different platforms */
|
||||
#define BYT_CRC_HRV 2
|
||||
#define CHT_CRC_HRV 3
|
||||
|
||||
struct lpss_private_data;
|
||||
|
||||
struct lpss_device_desc {
|
||||
@@ -166,7 +162,7 @@ static void byt_pwm_setup(struct lpss_private_data *pdata)
|
||||
if (!adev->pnp.unique_id || strcmp(adev->pnp.unique_id, "1"))
|
||||
return;
|
||||
|
||||
if (!acpi_dev_present("INT33FD", NULL, BYT_CRC_HRV))
|
||||
if (!acpi_dev_present("INT33FD", NULL, -1))
|
||||
pwm_add_table(byt_pwm_lookup, ARRAY_SIZE(byt_pwm_lookup));
|
||||
}
|
||||
|
||||
|
||||
@@ -472,11 +472,9 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm)
|
||||
}
|
||||
|
||||
control = OSC_PCI_EXPRESS_CAPABILITY_CONTROL
|
||||
| OSC_PCI_EXPRESS_NATIVE_HP_CONTROL
|
||||
| OSC_PCI_EXPRESS_PME_CONTROL;
|
||||
|
||||
if (IS_ENABLED(CONFIG_HOTPLUG_PCI_PCIE))
|
||||
control |= OSC_PCI_EXPRESS_NATIVE_HP_CONTROL;
|
||||
|
||||
if (pci_aer_available()) {
|
||||
if (aer_acpi_firmware_first())
|
||||
dev_info(&device->dev,
|
||||
|
||||
@@ -2217,16 +2217,12 @@ static void ata_eh_link_autopsy(struct ata_link *link)
|
||||
if (qc->err_mask & ~AC_ERR_OTHER)
|
||||
qc->err_mask &= ~AC_ERR_OTHER;
|
||||
|
||||
/*
|
||||
* SENSE_VALID trumps dev/unknown error and revalidation. Upper
|
||||
* layers will determine whether the command is worth retrying
|
||||
* based on the sense data and device class/type. Otherwise,
|
||||
* determine directly if the command is worth retrying using its
|
||||
* error mask and flags.
|
||||
*/
|
||||
/* SENSE_VALID trumps dev/unknown error and revalidation */
|
||||
if (qc->flags & ATA_QCFLAG_SENSE_VALID)
|
||||
qc->err_mask &= ~(AC_ERR_DEV | AC_ERR_OTHER);
|
||||
else if (ata_eh_worth_retry(qc))
|
||||
|
||||
/* determine whether the command is worth retrying */
|
||||
if (ata_eh_worth_retry(qc))
|
||||
qc->flags |= ATA_QCFLAG_RETRY;
|
||||
|
||||
/* accumulate error info */
|
||||
|
||||
@@ -279,7 +279,6 @@ static const struct usb_device_id blacklist_table[] = {
|
||||
{ USB_DEVICE(0x04ca, 0x3011), .driver_info = BTUSB_QCA_ROME },
|
||||
{ USB_DEVICE(0x04ca, 0x3015), .driver_info = BTUSB_QCA_ROME },
|
||||
{ USB_DEVICE(0x04ca, 0x3016), .driver_info = BTUSB_QCA_ROME },
|
||||
{ USB_DEVICE(0x04ca, 0x301a), .driver_info = BTUSB_QCA_ROME },
|
||||
|
||||
/* Broadcom BCM2035 */
|
||||
{ USB_DEVICE(0x0a5c, 0x2009), .driver_info = BTUSB_BCM92035 },
|
||||
@@ -374,9 +373,6 @@ static const struct usb_device_id blacklist_table[] = {
|
||||
/* Additional Realtek 8723BU Bluetooth devices */
|
||||
{ USB_DEVICE(0x7392, 0xa611), .driver_info = BTUSB_REALTEK },
|
||||
|
||||
/* Additional Realtek 8723DE Bluetooth devices */
|
||||
{ USB_DEVICE(0x2ff8, 0xb011), .driver_info = BTUSB_REALTEK },
|
||||
|
||||
/* Additional Realtek 8821AE Bluetooth devices */
|
||||
{ USB_DEVICE(0x0b05, 0x17dc), .driver_info = BTUSB_REALTEK },
|
||||
{ USB_DEVICE(0x13d3, 0x3414), .driver_info = BTUSB_REALTEK },
|
||||
|
||||
@@ -881,7 +881,7 @@ static int qca_set_baudrate(struct hci_dev *hdev, uint8_t baudrate)
|
||||
*/
|
||||
set_current_state(TASK_UNINTERRUPTIBLE);
|
||||
schedule_timeout(msecs_to_jiffies(BAUDRATE_SETTLE_TIMEOUT_MS));
|
||||
set_current_state(TASK_RUNNING);
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -736,7 +736,7 @@ static int arm_ccn_pmu_event_init(struct perf_event *event)
|
||||
ccn = pmu_to_arm_ccn(event->pmu);
|
||||
|
||||
if (hw->sample_period) {
|
||||
dev_dbg(ccn->dev, "Sampling not supported!\n");
|
||||
dev_warn(ccn->dev, "Sampling not supported!\n");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
@@ -744,12 +744,12 @@ static int arm_ccn_pmu_event_init(struct perf_event *event)
|
||||
event->attr.exclude_kernel || event->attr.exclude_hv ||
|
||||
event->attr.exclude_idle || event->attr.exclude_host ||
|
||||
event->attr.exclude_guest) {
|
||||
dev_dbg(ccn->dev, "Can't exclude execution levels!\n");
|
||||
dev_warn(ccn->dev, "Can't exclude execution levels!\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (event->cpu < 0) {
|
||||
dev_dbg(ccn->dev, "Can't provide per-task data!\n");
|
||||
dev_warn(ccn->dev, "Can't provide per-task data!\n");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
/*
|
||||
@@ -771,13 +771,13 @@ static int arm_ccn_pmu_event_init(struct perf_event *event)
|
||||
switch (type) {
|
||||
case CCN_TYPE_MN:
|
||||
if (node_xp != ccn->mn_id) {
|
||||
dev_dbg(ccn->dev, "Invalid MN ID %d!\n", node_xp);
|
||||
dev_warn(ccn->dev, "Invalid MN ID %d!\n", node_xp);
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
case CCN_TYPE_XP:
|
||||
if (node_xp >= ccn->num_xps) {
|
||||
dev_dbg(ccn->dev, "Invalid XP ID %d!\n", node_xp);
|
||||
dev_warn(ccn->dev, "Invalid XP ID %d!\n", node_xp);
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
@@ -785,11 +785,11 @@ static int arm_ccn_pmu_event_init(struct perf_event *event)
|
||||
break;
|
||||
default:
|
||||
if (node_xp >= ccn->num_nodes) {
|
||||
dev_dbg(ccn->dev, "Invalid node ID %d!\n", node_xp);
|
||||
dev_warn(ccn->dev, "Invalid node ID %d!\n", node_xp);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!arm_ccn_pmu_type_eq(type, ccn->node[node_xp].type)) {
|
||||
dev_dbg(ccn->dev, "Invalid type 0x%x for node %d!\n",
|
||||
dev_warn(ccn->dev, "Invalid type 0x%x for node %d!\n",
|
||||
type, node_xp);
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -808,19 +808,19 @@ static int arm_ccn_pmu_event_init(struct perf_event *event)
|
||||
if (event_id != e->event)
|
||||
continue;
|
||||
if (e->num_ports && port >= e->num_ports) {
|
||||
dev_dbg(ccn->dev, "Invalid port %d for node/XP %d!\n",
|
||||
dev_warn(ccn->dev, "Invalid port %d for node/XP %d!\n",
|
||||
port, node_xp);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (e->num_vcs && vc >= e->num_vcs) {
|
||||
dev_dbg(ccn->dev, "Invalid vc %d for node/XP %d!\n",
|
||||
dev_warn(ccn->dev, "Invalid vc %d for node/XP %d!\n",
|
||||
vc, node_xp);
|
||||
return -EINVAL;
|
||||
}
|
||||
valid = 1;
|
||||
}
|
||||
if (!valid) {
|
||||
dev_dbg(ccn->dev, "Invalid event 0x%x for node/XP %d!\n",
|
||||
dev_warn(ccn->dev, "Invalid event 0x%x for node/XP %d!\n",
|
||||
event_id, node_xp);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1897,22 +1897,14 @@ static int
|
||||
write_pool(struct entropy_store *r, const char __user *buffer, size_t count)
|
||||
{
|
||||
size_t bytes;
|
||||
__u32 t, buf[16];
|
||||
__u32 buf[16];
|
||||
const char __user *p = buffer;
|
||||
|
||||
while (count > 0) {
|
||||
int b, i = 0;
|
||||
|
||||
bytes = min(count, sizeof(buf));
|
||||
if (copy_from_user(&buf, p, bytes))
|
||||
return -EFAULT;
|
||||
|
||||
for (b = bytes ; b > 0 ; b -= sizeof(__u32), i++) {
|
||||
if (!arch_get_random_int(&t))
|
||||
break;
|
||||
buf[i] ^= t;
|
||||
}
|
||||
|
||||
count -= bytes;
|
||||
p += bytes;
|
||||
|
||||
|
||||
@@ -266,8 +266,6 @@ static inline void padlock_xcrypt_ecb(const u8 *input, u8 *output, void *key,
|
||||
return;
|
||||
}
|
||||
|
||||
count -= initial;
|
||||
|
||||
if (initial)
|
||||
asm volatile (".byte 0xf3,0x0f,0xa7,0xc8" /* rep xcryptecb */
|
||||
: "+S"(input), "+D"(output)
|
||||
@@ -275,7 +273,7 @@ static inline void padlock_xcrypt_ecb(const u8 *input, u8 *output, void *key,
|
||||
|
||||
asm volatile (".byte 0xf3,0x0f,0xa7,0xc8" /* rep xcryptecb */
|
||||
: "+S"(input), "+D"(output)
|
||||
: "d"(control_word), "b"(key), "c"(count));
|
||||
: "d"(control_word), "b"(key), "c"(count - initial));
|
||||
}
|
||||
|
||||
static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key,
|
||||
@@ -286,8 +284,6 @@ static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key,
|
||||
if (count < cbc_fetch_blocks)
|
||||
return cbc_crypt(input, output, key, iv, control_word, count);
|
||||
|
||||
count -= initial;
|
||||
|
||||
if (initial)
|
||||
asm volatile (".byte 0xf3,0x0f,0xa7,0xd0" /* rep xcryptcbc */
|
||||
: "+S" (input), "+D" (output), "+a" (iv)
|
||||
@@ -295,7 +291,7 @@ static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key,
|
||||
|
||||
asm volatile (".byte 0xf3,0x0f,0xa7,0xd0" /* rep xcryptcbc */
|
||||
: "+S" (input), "+D" (output), "+a" (iv)
|
||||
: "d" (control_word), "b" (key), "c" (count));
|
||||
: "d" (control_word), "b" (key), "c" (count-initial));
|
||||
return iv;
|
||||
}
|
||||
|
||||
|
||||
@@ -1106,7 +1106,7 @@ static void *ocram_alloc_mem(size_t size, void **other)
|
||||
|
||||
static void ocram_free_mem(void *p, size_t size, void *other)
|
||||
{
|
||||
gen_pool_free((struct gen_pool *)other, (unsigned long)p, size);
|
||||
gen_pool_free((struct gen_pool *)other, (u32)p, size);
|
||||
}
|
||||
|
||||
static const struct edac_device_prv_data ocramecc_data = {
|
||||
|
||||
@@ -683,12 +683,8 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,
|
||||
return -EINVAL;
|
||||
|
||||
/* A shared bo cannot be migrated to VRAM */
|
||||
if (bo->prime_shared_count) {
|
||||
if (domain & AMDGPU_GEM_DOMAIN_GTT)
|
||||
domain = AMDGPU_GEM_DOMAIN_GTT;
|
||||
else
|
||||
return -EINVAL;
|
||||
}
|
||||
if (bo->prime_shared_count && (domain == AMDGPU_GEM_DOMAIN_VRAM))
|
||||
return -EINVAL;
|
||||
|
||||
if (bo->pin_count) {
|
||||
uint32_t mem_type = bo->tbo.mem.mem_type;
|
||||
|
||||
@@ -1355,9 +1355,7 @@ drm_atomic_set_crtc_for_plane(struct drm_plane_state *plane_state,
|
||||
{
|
||||
struct drm_plane *plane = plane_state->plane;
|
||||
struct drm_crtc_state *crtc_state;
|
||||
/* Nothing to do for same crtc*/
|
||||
if (plane_state->crtc == crtc)
|
||||
return 0;
|
||||
|
||||
if (plane_state->crtc) {
|
||||
crtc_state = drm_atomic_get_crtc_state(plane_state->state,
|
||||
plane_state->crtc);
|
||||
|
||||
@@ -2683,9 +2683,31 @@ commit:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __drm_atomic_helper_disable_all(struct drm_device *dev,
|
||||
struct drm_modeset_acquire_ctx *ctx,
|
||||
bool clean_old_fbs)
|
||||
/**
|
||||
* drm_atomic_helper_disable_all - disable all currently active outputs
|
||||
* @dev: DRM device
|
||||
* @ctx: lock acquisition context
|
||||
*
|
||||
* Loops through all connectors, finding those that aren't turned off and then
|
||||
* turns them off by setting their DPMS mode to OFF and deactivating the CRTC
|
||||
* that they are connected to.
|
||||
*
|
||||
* This is used for example in suspend/resume to disable all currently active
|
||||
* functions when suspending. If you just want to shut down everything at e.g.
|
||||
* driver unload, look at drm_atomic_helper_shutdown().
|
||||
*
|
||||
* Note that if callers haven't already acquired all modeset locks this might
|
||||
* return -EDEADLK, which must be handled by calling drm_modeset_backoff().
|
||||
*
|
||||
* Returns:
|
||||
* 0 on success or a negative error code on failure.
|
||||
*
|
||||
* See also:
|
||||
* drm_atomic_helper_suspend(), drm_atomic_helper_resume() and
|
||||
* drm_atomic_helper_shutdown().
|
||||
*/
|
||||
int drm_atomic_helper_disable_all(struct drm_device *dev,
|
||||
struct drm_modeset_acquire_ctx *ctx)
|
||||
{
|
||||
struct drm_atomic_state *state;
|
||||
struct drm_connector_state *conn_state;
|
||||
@@ -2737,11 +2759,8 @@ static int __drm_atomic_helper_disable_all(struct drm_device *dev,
|
||||
goto free;
|
||||
|
||||
drm_atomic_set_fb_for_plane(plane_state, NULL);
|
||||
|
||||
if (clean_old_fbs) {
|
||||
plane->old_fb = plane->fb;
|
||||
plane_mask |= BIT(drm_plane_index(plane));
|
||||
}
|
||||
plane_mask |= BIT(drm_plane_index(plane));
|
||||
plane->old_fb = plane->fb;
|
||||
}
|
||||
|
||||
ret = drm_atomic_commit(state);
|
||||
@@ -2752,34 +2771,6 @@ free:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* drm_atomic_helper_disable_all - disable all currently active outputs
|
||||
* @dev: DRM device
|
||||
* @ctx: lock acquisition context
|
||||
*
|
||||
* Loops through all connectors, finding those that aren't turned off and then
|
||||
* turns them off by setting their DPMS mode to OFF and deactivating the CRTC
|
||||
* that they are connected to.
|
||||
*
|
||||
* This is used for example in suspend/resume to disable all currently active
|
||||
* functions when suspending. If you just want to shut down everything at e.g.
|
||||
* driver unload, look at drm_atomic_helper_shutdown().
|
||||
*
|
||||
* Note that if callers haven't already acquired all modeset locks this might
|
||||
* return -EDEADLK, which must be handled by calling drm_modeset_backoff().
|
||||
*
|
||||
* Returns:
|
||||
* 0 on success or a negative error code on failure.
|
||||
*
|
||||
* See also:
|
||||
* drm_atomic_helper_suspend(), drm_atomic_helper_resume() and
|
||||
* drm_atomic_helper_shutdown().
|
||||
*/
|
||||
int drm_atomic_helper_disable_all(struct drm_device *dev,
|
||||
struct drm_modeset_acquire_ctx *ctx)
|
||||
{
|
||||
return __drm_atomic_helper_disable_all(dev, ctx, false);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_atomic_helper_disable_all);
|
||||
|
||||
/**
|
||||
@@ -2802,7 +2793,7 @@ void drm_atomic_helper_shutdown(struct drm_device *dev)
|
||||
while (1) {
|
||||
ret = drm_modeset_lock_all_ctx(dev, &ctx);
|
||||
if (!ret)
|
||||
ret = __drm_atomic_helper_disable_all(dev, &ctx, true);
|
||||
ret = drm_atomic_helper_disable_all(dev, &ctx);
|
||||
|
||||
if (ret != -EDEADLK)
|
||||
break;
|
||||
@@ -2906,11 +2897,16 @@ int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state,
|
||||
struct drm_connector_state *new_conn_state;
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *new_crtc_state;
|
||||
unsigned plane_mask = 0;
|
||||
struct drm_device *dev = state->dev;
|
||||
int ret;
|
||||
|
||||
state->acquire_ctx = ctx;
|
||||
|
||||
for_each_new_plane_in_state(state, plane, new_plane_state, i)
|
||||
for_each_new_plane_in_state(state, plane, new_plane_state, i) {
|
||||
plane_mask |= BIT(drm_plane_index(plane));
|
||||
state->planes[i].old_state = plane->state;
|
||||
}
|
||||
|
||||
for_each_new_crtc_in_state(state, crtc, new_crtc_state, i)
|
||||
state->crtcs[i].old_state = crtc->state;
|
||||
@@ -2918,7 +2914,11 @@ int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state,
|
||||
for_each_new_connector_in_state(state, connector, new_conn_state, i)
|
||||
state->connectors[i].old_state = connector->state;
|
||||
|
||||
return drm_atomic_commit(state);
|
||||
ret = drm_atomic_commit(state);
|
||||
if (plane_mask)
|
||||
drm_atomic_clean_old_fb(dev, plane_mask, ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(drm_atomic_helper_commit_duplicated_state);
|
||||
|
||||
|
||||
@@ -2862,14 +2862,12 @@ static void drm_dp_mst_dump_mstb(struct seq_file *m,
|
||||
}
|
||||
}
|
||||
|
||||
#define DP_PAYLOAD_TABLE_SIZE 64
|
||||
|
||||
static bool dump_dp_payload_table(struct drm_dp_mst_topology_mgr *mgr,
|
||||
char *buf)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < DP_PAYLOAD_TABLE_SIZE; i += 16) {
|
||||
for (i = 0; i < 64; i += 16) {
|
||||
if (drm_dp_dpcd_read(mgr->aux,
|
||||
DP_PAYLOAD_TABLE_UPDATE_STATUS + i,
|
||||
&buf[i], 16) != 16)
|
||||
@@ -2938,7 +2936,7 @@ void drm_dp_mst_dump_topology(struct seq_file *m,
|
||||
|
||||
mutex_lock(&mgr->lock);
|
||||
if (mgr->mst_primary) {
|
||||
u8 buf[DP_PAYLOAD_TABLE_SIZE];
|
||||
u8 buf[64];
|
||||
int ret;
|
||||
|
||||
ret = drm_dp_dpcd_read(mgr->aux, DP_DPCD_REV, buf, DP_RECEIVER_CAP_SIZE);
|
||||
@@ -2956,7 +2954,8 @@ void drm_dp_mst_dump_topology(struct seq_file *m,
|
||||
seq_printf(m, " revision: hw: %x.%x sw: %x.%x\n",
|
||||
buf[0x9] >> 4, buf[0x9] & 0xf, buf[0xa], buf[0xb]);
|
||||
if (dump_dp_payload_table(mgr, buf))
|
||||
seq_printf(m, "payload table: %*ph\n", DP_PAYLOAD_TABLE_SIZE, buf);
|
||||
seq_printf(m, "payload table: %*ph\n", 63, buf);
|
||||
|
||||
}
|
||||
|
||||
mutex_unlock(&mgr->lock);
|
||||
|
||||
@@ -255,7 +255,7 @@ extern int intelfb_remove(struct drm_device *dev,
|
||||
extern bool psb_intel_lvds_mode_fixup(struct drm_encoder *encoder,
|
||||
const struct drm_display_mode *mode,
|
||||
struct drm_display_mode *adjusted_mode);
|
||||
extern enum drm_mode_status psb_intel_lvds_mode_valid(struct drm_connector *connector,
|
||||
extern int psb_intel_lvds_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode);
|
||||
extern int psb_intel_lvds_set_property(struct drm_connector *connector,
|
||||
struct drm_property *property,
|
||||
|
||||
@@ -343,7 +343,7 @@ static void psb_intel_lvds_restore(struct drm_connector *connector)
|
||||
}
|
||||
}
|
||||
|
||||
enum drm_mode_status psb_intel_lvds_mode_valid(struct drm_connector *connector,
|
||||
int psb_intel_lvds_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
struct drm_psb_private *dev_priv = connector->dev->dev_private;
|
||||
|
||||
@@ -155,10 +155,10 @@ gk104_fifo_runlist_commit(struct gk104_fifo *fifo, int runl)
|
||||
(target << 28));
|
||||
nvkm_wr32(device, 0x002274, (runl << 20) | nr);
|
||||
|
||||
if (nvkm_msec(device, 2000,
|
||||
if (!(nvkm_rd32(device, 0x002284 + (runl * 0x08)) & 0x00100000))
|
||||
break;
|
||||
) < 0)
|
||||
if (wait_event_timeout(fifo->runlist[runl].wait,
|
||||
!(nvkm_rd32(device, 0x002284 + (runl * 0x08))
|
||||
& 0x00100000),
|
||||
msecs_to_jiffies(2000)) == 0)
|
||||
nvkm_error(subdev, "runlist %d update timeout\n", runl);
|
||||
unlock:
|
||||
mutex_unlock(&subdev->mutex);
|
||||
|
||||
@@ -853,7 +853,7 @@ static int radeon_lvds_get_modes(struct drm_connector *connector)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static enum drm_mode_status radeon_lvds_mode_valid(struct drm_connector *connector,
|
||||
static int radeon_lvds_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
struct drm_encoder *encoder = radeon_best_single_encoder(connector);
|
||||
@@ -1013,7 +1013,7 @@ static int radeon_vga_get_modes(struct drm_connector *connector)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static enum drm_mode_status radeon_vga_mode_valid(struct drm_connector *connector,
|
||||
static int radeon_vga_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
struct drm_device *dev = connector->dev;
|
||||
@@ -1157,7 +1157,7 @@ static int radeon_tv_get_modes(struct drm_connector *connector)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static enum drm_mode_status radeon_tv_mode_valid(struct drm_connector *connector,
|
||||
static int radeon_tv_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
if ((mode->hdisplay > 1024) || (mode->vdisplay > 768))
|
||||
@@ -1499,7 +1499,7 @@ static void radeon_dvi_force(struct drm_connector *connector)
|
||||
radeon_connector->use_digital = true;
|
||||
}
|
||||
|
||||
static enum drm_mode_status radeon_dvi_mode_valid(struct drm_connector *connector,
|
||||
static int radeon_dvi_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
struct drm_device *dev = connector->dev;
|
||||
@@ -1801,7 +1801,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static enum drm_mode_status radeon_dp_mode_valid(struct drm_connector *connector,
|
||||
static int radeon_dp_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
struct drm_device *dev = connector->dev;
|
||||
|
||||
@@ -320,9 +320,6 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state)
|
||||
vc4_state->x_scaling[0] = VC4_SCALING_TPZ;
|
||||
if (vc4_state->y_scaling[0] == VC4_SCALING_NONE)
|
||||
vc4_state->y_scaling[0] = VC4_SCALING_TPZ;
|
||||
} else {
|
||||
vc4_state->x_scaling[1] = VC4_SCALING_NONE;
|
||||
vc4_state->y_scaling[1] = VC4_SCALING_NONE;
|
||||
}
|
||||
|
||||
vc4_state->is_unity = (vc4_state->x_scaling[0] == VC4_SCALING_NONE &&
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Plantronics USB HID Driver
|
||||
*
|
||||
* Copyright (c) 2014 JD Cole <jd.cole@plantronics.com>
|
||||
* Copyright (c) 2015-2018 Terry Junge <terry.junge@plantronics.com>
|
||||
* Copyright (c) 2015 Terry Junge <terry.junge@plantronics.com>
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -48,10 +48,6 @@ static int plantronics_input_mapping(struct hid_device *hdev,
|
||||
unsigned short mapped_key;
|
||||
unsigned long plt_type = (unsigned long)hid_get_drvdata(hdev);
|
||||
|
||||
/* special case for PTT products */
|
||||
if (field->application == HID_GD_JOYSTICK)
|
||||
goto defaulted;
|
||||
|
||||
/* handle volume up/down mapping */
|
||||
/* non-standard types or multi-HID interfaces - plt_type is PID */
|
||||
if (!(plt_type & HID_USAGE_PAGE)) {
|
||||
|
||||
@@ -1036,14 +1036,6 @@ static int i2c_hid_probe(struct i2c_client *client,
|
||||
pm_runtime_enable(&client->dev);
|
||||
device_enable_async_suspend(&client->dev);
|
||||
|
||||
/* Make sure there is something at this address */
|
||||
ret = i2c_smbus_read_byte(client);
|
||||
if (ret < 0) {
|
||||
dev_dbg(&client->dev, "nothing at this address: %d\n", ret);
|
||||
ret = -ENXIO;
|
||||
goto err_pm;
|
||||
}
|
||||
|
||||
ret = i2c_hid_fetch_hid_descriptor(ihid);
|
||||
if (ret < 0)
|
||||
goto err_pm;
|
||||
|
||||
@@ -376,7 +376,6 @@ static int i2c_imx_dma_xfer(struct imx_i2c_struct *i2c_imx,
|
||||
goto err_desc;
|
||||
}
|
||||
|
||||
reinit_completion(&dma->cmd_complete);
|
||||
txdesc->callback = i2c_imx_dma_callback;
|
||||
txdesc->callback_param = i2c_imx;
|
||||
if (dma_submit_error(dmaengine_submit(txdesc))) {
|
||||
@@ -620,6 +619,7 @@ static int i2c_imx_dma_write(struct imx_i2c_struct *i2c_imx,
|
||||
* The first byte must be transmitted by the CPU.
|
||||
*/
|
||||
imx_i2c_write_reg(msgs->addr << 1, i2c_imx, IMX_I2C_I2DR);
|
||||
reinit_completion(&i2c_imx->dma->cmd_complete);
|
||||
time_left = wait_for_completion_timeout(
|
||||
&i2c_imx->dma->cmd_complete,
|
||||
msecs_to_jiffies(DMA_TIMEOUT));
|
||||
@@ -678,6 +678,7 @@ static int i2c_imx_dma_read(struct imx_i2c_struct *i2c_imx,
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
reinit_completion(&i2c_imx->dma->cmd_complete);
|
||||
time_left = wait_for_completion_timeout(
|
||||
&i2c_imx->dma->cmd_complete,
|
||||
msecs_to_jiffies(DMA_TIMEOUT));
|
||||
|
||||
@@ -808,11 +808,8 @@ EXPORT_SYMBOL_GPL(i2c_new_device);
|
||||
*/
|
||||
void i2c_unregister_device(struct i2c_client *client)
|
||||
{
|
||||
if (client->dev.of_node) {
|
||||
if (client->dev.of_node)
|
||||
of_node_clear_flag(client->dev.of_node, OF_POPULATED);
|
||||
of_node_put(client->dev.of_node);
|
||||
}
|
||||
|
||||
if (ACPI_COMPANION(&client->dev))
|
||||
acpi_device_clear_enumerated(ACPI_COMPANION(&client->dev));
|
||||
device_unregister(&client->dev);
|
||||
|
||||
@@ -1061,7 +1061,7 @@ static const struct idle_cpu idle_cpu_dnv = {
|
||||
};
|
||||
|
||||
#define ICPU(model, cpu) \
|
||||
{ X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, (unsigned long)&cpu }
|
||||
{ X86_VENDOR_INTEL, 6, model, X86_FEATURE_MWAIT, (unsigned long)&cpu }
|
||||
|
||||
static const struct x86_cpu_id intel_idle_ids[] __initconst = {
|
||||
ICPU(INTEL_FAM6_NEHALEM_EP, idle_cpu_nehalem),
|
||||
@@ -1125,11 +1125,6 @@ static int __init intel_idle_probe(void)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (!boot_cpu_has(X86_FEATURE_MWAIT)) {
|
||||
pr_debug("Please enable MWAIT in BIOS SETUP\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (boot_cpu_data.cpuid_level < CPUID_MWAIT_LEAF)
|
||||
return -ENODEV;
|
||||
|
||||
|
||||
@@ -1558,8 +1558,7 @@ static int add_oui_reg_req(struct ib_mad_reg_req *mad_reg_req,
|
||||
mad_reg_req->oui, 3)) {
|
||||
method = &(*vendor_table)->vendor_class[
|
||||
vclass]->method_table[i];
|
||||
if (!*method)
|
||||
goto error3;
|
||||
BUG_ON(!*method);
|
||||
goto check_in_use;
|
||||
}
|
||||
}
|
||||
@@ -1569,12 +1568,10 @@ static int add_oui_reg_req(struct ib_mad_reg_req *mad_reg_req,
|
||||
vclass]->oui[i])) {
|
||||
method = &(*vendor_table)->vendor_class[
|
||||
vclass]->method_table[i];
|
||||
BUG_ON(*method);
|
||||
/* Allocate method table for this OUI */
|
||||
if (!*method) {
|
||||
ret = allocate_method_table(method);
|
||||
if (ret)
|
||||
goto error3;
|
||||
}
|
||||
if ((ret = allocate_method_table(method)))
|
||||
goto error3;
|
||||
memcpy((*vendor_table)->vendor_class[vclass]->oui[i],
|
||||
mad_reg_req->oui, 3);
|
||||
goto check_in_use;
|
||||
|
||||
@@ -218,7 +218,7 @@ static struct ucma_multicast* ucma_alloc_multicast(struct ucma_context *ctx)
|
||||
return NULL;
|
||||
|
||||
mutex_lock(&mut);
|
||||
mc->id = idr_alloc(&multicast_idr, NULL, 0, 0, GFP_KERNEL);
|
||||
mc->id = idr_alloc(&multicast_idr, mc, 0, 0, GFP_KERNEL);
|
||||
mutex_unlock(&mut);
|
||||
if (mc->id < 0)
|
||||
goto error;
|
||||
@@ -1404,10 +1404,6 @@ static ssize_t ucma_process_join(struct ucma_file *file,
|
||||
goto err3;
|
||||
}
|
||||
|
||||
mutex_lock(&mut);
|
||||
idr_replace(&multicast_idr, mc, mc->id);
|
||||
mutex_unlock(&mut);
|
||||
|
||||
mutex_unlock(&file->mut);
|
||||
ucma_put_ctx(ctx);
|
||||
return 0;
|
||||
|
||||
@@ -1981,64 +1981,15 @@ static int modify_qp(struct ib_uverbs_file *file,
|
||||
goto release_qp;
|
||||
}
|
||||
|
||||
if ((cmd->base.attr_mask & IB_QP_AV)) {
|
||||
if (!rdma_is_port_valid(qp->device, cmd->base.dest.port_num)) {
|
||||
ret = -EINVAL;
|
||||
goto release_qp;
|
||||
}
|
||||
|
||||
if (cmd->base.attr_mask & IB_QP_STATE &&
|
||||
cmd->base.qp_state == IB_QPS_RTR) {
|
||||
/* We are in INIT->RTR TRANSITION (if we are not,
|
||||
* this transition will be rejected in subsequent checks).
|
||||
* In the INIT->RTR transition, we cannot have IB_QP_PORT set,
|
||||
* but the IB_QP_STATE flag is required.
|
||||
*
|
||||
* Since kernel 3.14 (commit dbf727de7440), the uverbs driver,
|
||||
* when IB_QP_AV is set, has required inclusion of a valid
|
||||
* port number in the primary AV. (AVs are created and handled
|
||||
* differently for infiniband and ethernet (RoCE) ports).
|
||||
*
|
||||
* Check the port number included in the primary AV against
|
||||
* the port number in the qp struct, which was set (and saved)
|
||||
* in the RST->INIT transition.
|
||||
*/
|
||||
if (cmd->base.dest.port_num != qp->real_qp->port) {
|
||||
ret = -EINVAL;
|
||||
goto release_qp;
|
||||
}
|
||||
} else {
|
||||
/* We are in SQD->SQD. (If we are not, this transition will
|
||||
* be rejected later in the verbs layer checks).
|
||||
* Check for both IB_QP_PORT and IB_QP_AV, these can be set
|
||||
* together in the SQD->SQD transition.
|
||||
*
|
||||
* If only IP_QP_AV was set, add in IB_QP_PORT as well (the
|
||||
* verbs layer driver does not track primary port changes
|
||||
* resulting from path migration. Thus, in SQD, if the primary
|
||||
* AV is modified, the primary port should also be modified).
|
||||
*
|
||||
* Note that in this transition, the IB_QP_STATE flag
|
||||
* is not allowed.
|
||||
*/
|
||||
if (((cmd->base.attr_mask & (IB_QP_AV | IB_QP_PORT))
|
||||
== (IB_QP_AV | IB_QP_PORT)) &&
|
||||
cmd->base.port_num != cmd->base.dest.port_num) {
|
||||
ret = -EINVAL;
|
||||
goto release_qp;
|
||||
}
|
||||
if ((cmd->base.attr_mask & (IB_QP_AV | IB_QP_PORT))
|
||||
== IB_QP_AV) {
|
||||
cmd->base.attr_mask |= IB_QP_PORT;
|
||||
cmd->base.port_num = cmd->base.dest.port_num;
|
||||
}
|
||||
}
|
||||
if ((cmd->base.attr_mask & IB_QP_AV) &&
|
||||
!rdma_is_port_valid(qp->device, cmd->base.dest.port_num)) {
|
||||
ret = -EINVAL;
|
||||
goto release_qp;
|
||||
}
|
||||
|
||||
if ((cmd->base.attr_mask & IB_QP_ALT_PATH) &&
|
||||
(!rdma_is_port_valid(qp->device, cmd->base.alt_port_num) ||
|
||||
!rdma_is_port_valid(qp->device, cmd->base.alt_dest.port_num) ||
|
||||
cmd->base.alt_port_num != cmd->base.alt_dest.port_num)) {
|
||||
!rdma_is_port_valid(qp->device, cmd->base.alt_dest.port_num))) {
|
||||
ret = -EINVAL;
|
||||
goto release_qp;
|
||||
}
|
||||
@@ -3425,11 +3376,6 @@ int ib_uverbs_ex_create_flow(struct ib_uverbs_file *file,
|
||||
goto err_uobj;
|
||||
}
|
||||
|
||||
if (qp->qp_type != IB_QPT_UD && qp->qp_type != IB_QPT_RAW_PACKET) {
|
||||
err = -EINVAL;
|
||||
goto err_put;
|
||||
}
|
||||
|
||||
flow_attr = kzalloc(sizeof(*flow_attr) + cmd.flow_attr.num_of_specs *
|
||||
sizeof(union ib_flow_spec), GFP_KERNEL);
|
||||
if (!flow_attr) {
|
||||
|
||||
@@ -2115,16 +2115,10 @@ static void __ib_drain_sq(struct ib_qp *qp)
|
||||
struct ib_cq *cq = qp->send_cq;
|
||||
struct ib_qp_attr attr = { .qp_state = IB_QPS_ERR };
|
||||
struct ib_drain_cqe sdrain;
|
||||
struct ib_send_wr *bad_swr;
|
||||
struct ib_rdma_wr swr = {
|
||||
.wr = {
|
||||
.next = NULL,
|
||||
{ .wr_cqe = &sdrain.cqe, },
|
||||
.opcode = IB_WR_RDMA_WRITE,
|
||||
},
|
||||
};
|
||||
struct ib_send_wr swr = {}, *bad_swr;
|
||||
int ret;
|
||||
|
||||
swr.wr_cqe = &sdrain.cqe;
|
||||
sdrain.cqe.done = ib_drain_qp_done;
|
||||
init_completion(&sdrain.done);
|
||||
|
||||
@@ -2134,7 +2128,7 @@ static void __ib_drain_sq(struct ib_qp *qp)
|
||||
return;
|
||||
}
|
||||
|
||||
ret = ib_post_send(qp, &swr.wr, &bad_swr);
|
||||
ret = ib_post_send(qp, &swr, &bad_swr);
|
||||
if (ret) {
|
||||
WARN_ONCE(ret, "failed to drain send queue: %d\n", ret);
|
||||
return;
|
||||
|
||||
@@ -787,17 +787,13 @@ static int srpt_post_recv(struct srpt_device *sdev,
|
||||
*/
|
||||
static int srpt_zerolength_write(struct srpt_rdma_ch *ch)
|
||||
{
|
||||
struct ib_send_wr *bad_wr;
|
||||
struct ib_rdma_wr wr = {
|
||||
.wr = {
|
||||
.next = NULL,
|
||||
{ .wr_cqe = &ch->zw_cqe, },
|
||||
.opcode = IB_WR_RDMA_WRITE,
|
||||
.send_flags = IB_SEND_SIGNALED,
|
||||
}
|
||||
};
|
||||
struct ib_send_wr wr, *bad_wr;
|
||||
|
||||
return ib_post_send(ch->qp, &wr.wr, &bad_wr);
|
||||
memset(&wr, 0, sizeof(wr));
|
||||
wr.opcode = IB_WR_RDMA_WRITE;
|
||||
wr.wr_cqe = &ch->zw_cqe;
|
||||
wr.send_flags = IB_SEND_SIGNALED;
|
||||
return ib_post_send(ch->qp, &wr, &bad_wr);
|
||||
}
|
||||
|
||||
static void srpt_zerolength_write_done(struct ib_cq *cq, struct ib_wc *wc)
|
||||
|
||||
@@ -1262,8 +1262,6 @@ static const struct acpi_device_id elan_acpi_id[] = {
|
||||
{ "ELAN0611", 0 },
|
||||
{ "ELAN0612", 0 },
|
||||
{ "ELAN0618", 0 },
|
||||
{ "ELAN061D", 0 },
|
||||
{ "ELAN0622", 0 },
|
||||
{ "ELAN1000", 0 },
|
||||
{ }
|
||||
};
|
||||
|
||||
@@ -527,13 +527,6 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "N24_25BU"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Lenovo LaVie Z */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo LaVie Z"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <linux/of_pci.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/dma-iommu.h>
|
||||
|
||||
#define MSI_IRQS_PER_MSIR 32
|
||||
#define MSI_MSIR_OFFSET 4
|
||||
@@ -95,8 +94,6 @@ static void ls_scfg_msi_compose_msg(struct irq_data *data, struct msi_msg *msg)
|
||||
|
||||
if (msi_affinity_flag)
|
||||
msg->data |= cpumask_first(data->common->affinity);
|
||||
|
||||
iommu_dma_map_msi_msg(data->irq, msg);
|
||||
}
|
||||
|
||||
static int ls_scfg_msi_set_affinity(struct irq_data *irq_data,
|
||||
|
||||
@@ -142,9 +142,10 @@ static void clean_wctx(struct pblk_w_ctx *w_ctx)
|
||||
{
|
||||
int flags;
|
||||
|
||||
try:
|
||||
flags = READ_ONCE(w_ctx->flags);
|
||||
WARN_ONCE(!(flags & PBLK_SUBMITTED_ENTRY),
|
||||
"pblk: overwriting unsubmitted data\n");
|
||||
if (!(flags & PBLK_SUBMITTED_ENTRY))
|
||||
goto try;
|
||||
|
||||
/* Release flags on context. Protect from writes and reads */
|
||||
smp_store_release(&w_ctx->flags, PBLK_WRITABLE_ENTRY);
|
||||
|
||||
@@ -6498,9 +6498,6 @@ static int hot_remove_disk(struct mddev *mddev, dev_t dev)
|
||||
char b[BDEVNAME_SIZE];
|
||||
struct md_rdev *rdev;
|
||||
|
||||
if (!mddev->pers)
|
||||
return -ENODEV;
|
||||
|
||||
rdev = find_rdev(mddev, dev);
|
||||
if (!rdev)
|
||||
return -ENXIO;
|
||||
|
||||
@@ -2462,8 +2462,6 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
|
||||
fix_read_error(conf, r1_bio->read_disk,
|
||||
r1_bio->sector, r1_bio->sectors);
|
||||
unfreeze_array(conf);
|
||||
} else if (mddev->ro == 0 && test_bit(FailFast, &rdev->flags)) {
|
||||
md_error(mddev, rdev);
|
||||
} else {
|
||||
r1_bio->bios[r1_bio->read_disk] = IO_BLOCKED;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ void smsendian_handle_tx_message(void *buffer)
|
||||
switch (msg->x_msg_header.msg_type) {
|
||||
case MSG_SMS_DATA_DOWNLOAD_REQ:
|
||||
{
|
||||
msg->msg_data[0] = le32_to_cpu((__force __le32)(msg->msg_data[0]));
|
||||
msg->msg_data[0] = le32_to_cpu(msg->msg_data[0]);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ void smsendian_handle_tx_message(void *buffer)
|
||||
sizeof(struct sms_msg_hdr))/4;
|
||||
|
||||
for (i = 0; i < msg_words; i++)
|
||||
msg->msg_data[i] = le32_to_cpu((__force __le32)msg->msg_data[i]);
|
||||
msg->msg_data[i] = le32_to_cpu(msg->msg_data[i]);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -64,7 +64,7 @@ void smsendian_handle_rx_message(void *buffer)
|
||||
{
|
||||
struct sms_version_res *ver =
|
||||
(struct sms_version_res *) msg;
|
||||
ver->chip_model = le16_to_cpu((__force __le16)ver->chip_model);
|
||||
ver->chip_model = le16_to_cpu(ver->chip_model);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ void smsendian_handle_rx_message(void *buffer)
|
||||
sizeof(struct sms_msg_hdr))/4;
|
||||
|
||||
for (i = 0; i < msg_words; i++)
|
||||
msg->msg_data[i] = le32_to_cpu((__force __le32)msg->msg_data[i]);
|
||||
msg->msg_data[i] = le32_to_cpu(msg->msg_data[i]);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -95,9 +95,9 @@ void smsendian_handle_message_header(void *msg)
|
||||
#ifdef __BIG_ENDIAN
|
||||
struct sms_msg_hdr *phdr = (struct sms_msg_hdr *)msg;
|
||||
|
||||
phdr->msg_type = le16_to_cpu((__force __le16)phdr->msg_type);
|
||||
phdr->msg_length = le16_to_cpu((__force __le16)phdr->msg_length);
|
||||
phdr->msg_flags = le16_to_cpu((__force __le16)phdr->msg_flags);
|
||||
phdr->msg_type = le16_to_cpu(phdr->msg_type);
|
||||
phdr->msg_length = le16_to_cpu(phdr->msg_length);
|
||||
phdr->msg_flags = le16_to_cpu(phdr->msg_flags);
|
||||
#endif /* __BIG_ENDIAN */
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(smsendian_handle_message_header);
|
||||
|
||||
@@ -1001,7 +1001,7 @@ static int smiapp_read_nvm(struct smiapp_sensor *sensor,
|
||||
if (rval)
|
||||
goto out;
|
||||
|
||||
for (i = 1000; i > 0; i--) {
|
||||
for (i = 0; i < 1000; i++) {
|
||||
rval = smiapp_read(
|
||||
sensor,
|
||||
SMIAPP_REG_U8_DATA_TRANSFER_IF_1_STATUS, &s);
|
||||
@@ -1012,10 +1012,11 @@ static int smiapp_read_nvm(struct smiapp_sensor *sensor,
|
||||
if (s & SMIAPP_DATA_TRANSFER_IF_1_STATUS_RD_READY)
|
||||
break;
|
||||
|
||||
}
|
||||
if (!i) {
|
||||
rval = -ETIMEDOUT;
|
||||
goto out;
|
||||
if (--i == 0) {
|
||||
rval = -ETIMEDOUT;
|
||||
goto out;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (i = 0; i < SMIAPP_NVM_PAGE_SIZE; i++) {
|
||||
|
||||
@@ -54,10 +54,9 @@ static int media_device_close(struct file *filp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long media_device_get_info(struct media_device *dev, void *arg)
|
||||
static int media_device_get_info(struct media_device *dev,
|
||||
struct media_device_info *info)
|
||||
{
|
||||
struct media_device_info *info = arg;
|
||||
|
||||
memset(info, 0, sizeof(*info));
|
||||
|
||||
if (dev->driver_name[0])
|
||||
@@ -94,9 +93,9 @@ static struct media_entity *find_entity(struct media_device *mdev, u32 id)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static long media_device_enum_entities(struct media_device *mdev, void *arg)
|
||||
static long media_device_enum_entities(struct media_device *mdev,
|
||||
struct media_entity_desc *entd)
|
||||
{
|
||||
struct media_entity_desc *entd = arg;
|
||||
struct media_entity *ent;
|
||||
|
||||
ent = find_entity(mdev, entd->id);
|
||||
@@ -147,9 +146,9 @@ static void media_device_kpad_to_upad(const struct media_pad *kpad,
|
||||
upad->flags = kpad->flags;
|
||||
}
|
||||
|
||||
static long media_device_enum_links(struct media_device *mdev, void *arg)
|
||||
static long media_device_enum_links(struct media_device *mdev,
|
||||
struct media_links_enum *links)
|
||||
{
|
||||
struct media_links_enum *links = arg;
|
||||
struct media_entity *entity;
|
||||
|
||||
entity = find_entity(mdev, links->entity);
|
||||
@@ -195,9 +194,9 @@ static long media_device_enum_links(struct media_device *mdev, void *arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long media_device_setup_link(struct media_device *mdev, void *arg)
|
||||
static long media_device_setup_link(struct media_device *mdev,
|
||||
struct media_link_desc *linkd)
|
||||
{
|
||||
struct media_link_desc *linkd = arg;
|
||||
struct media_link *link = NULL;
|
||||
struct media_entity *source;
|
||||
struct media_entity *sink;
|
||||
@@ -223,9 +222,9 @@ static long media_device_setup_link(struct media_device *mdev, void *arg)
|
||||
return __media_entity_setup_link(link, linkd->flags);
|
||||
}
|
||||
|
||||
static long media_device_get_topology(struct media_device *mdev, void *arg)
|
||||
static long media_device_get_topology(struct media_device *mdev,
|
||||
struct media_v2_topology *topo)
|
||||
{
|
||||
struct media_v2_topology *topo = arg;
|
||||
struct media_entity *entity;
|
||||
struct media_interface *intf;
|
||||
struct media_pad *pad;
|
||||
|
||||
@@ -426,8 +426,7 @@ int saa7164_downloadfirmware(struct saa7164_dev *dev)
|
||||
__func__, fw->size);
|
||||
|
||||
if (fw->size != fwlength) {
|
||||
printk(KERN_ERR "saa7164: firmware incorrect size %zu != %u\n",
|
||||
fw->size, fwlength);
|
||||
printk(KERN_ERR "xc5000: firmware incorrect size\n");
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -1228,8 +1228,7 @@ int tw686x_video_init(struct tw686x_dev *dev)
|
||||
vc->vidq.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
|
||||
vc->vidq.min_buffers_needed = 2;
|
||||
vc->vidq.lock = &vc->vb_mutex;
|
||||
vc->vidq.gfp_flags = dev->dma_mode != TW686X_DMA_MODE_MEMCPY ?
|
||||
GFP_DMA32 : 0;
|
||||
vc->vidq.gfp_flags = GFP_DMA32;
|
||||
vc->vidq.dev = &dev->pci_dev->dev;
|
||||
|
||||
err = vb2_queue_init(&vc->vidq);
|
||||
|
||||
@@ -1945,7 +1945,6 @@ error_csi2:
|
||||
|
||||
static void isp_detach_iommu(struct isp_device *isp)
|
||||
{
|
||||
arm_iommu_detach_device(isp->dev);
|
||||
arm_iommu_release_mapping(isp->mapping);
|
||||
isp->mapping = NULL;
|
||||
}
|
||||
@@ -1962,7 +1961,8 @@ static int isp_attach_iommu(struct isp_device *isp)
|
||||
mapping = arm_iommu_create_mapping(&platform_bus_type, SZ_1G, SZ_2G);
|
||||
if (IS_ERR(mapping)) {
|
||||
dev_err(isp->dev, "failed to create ARM IOMMU mapping\n");
|
||||
return PTR_ERR(mapping);
|
||||
ret = PTR_ERR(mapping);
|
||||
goto error;
|
||||
}
|
||||
|
||||
isp->mapping = mapping;
|
||||
@@ -1977,8 +1977,7 @@ static int isp_attach_iommu(struct isp_device *isp)
|
||||
return 0;
|
||||
|
||||
error:
|
||||
arm_iommu_release_mapping(isp->mapping);
|
||||
isp->mapping = NULL;
|
||||
isp_detach_iommu(isp);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -1280,7 +1280,7 @@ static int jpu_open(struct file *file)
|
||||
/* ...issue software reset */
|
||||
ret = jpu_reset(jpu);
|
||||
if (ret)
|
||||
goto jpu_reset_rollback;
|
||||
goto device_prepare_rollback;
|
||||
}
|
||||
|
||||
jpu->ref_count++;
|
||||
@@ -1288,8 +1288,6 @@ static int jpu_open(struct file *file)
|
||||
mutex_unlock(&jpu->mutex);
|
||||
return 0;
|
||||
|
||||
jpu_reset_rollback:
|
||||
clk_disable_unprepare(jpu->clk);
|
||||
device_prepare_rollback:
|
||||
mutex_unlock(&jpu->mutex);
|
||||
v4l_prepare_rollback:
|
||||
|
||||
@@ -92,7 +92,7 @@ MODULE_PARM_DESC(max_rds_errors, "RDS maximum block errors: *1*");
|
||||
*/
|
||||
int si470x_get_register(struct si470x_device *radio, int regnr)
|
||||
{
|
||||
__be16 buf[READ_REG_NUM];
|
||||
u16 buf[READ_REG_NUM];
|
||||
struct i2c_msg msgs[1] = {
|
||||
{
|
||||
.addr = radio->client->addr,
|
||||
@@ -117,7 +117,7 @@ int si470x_get_register(struct si470x_device *radio, int regnr)
|
||||
int si470x_set_register(struct si470x_device *radio, int regnr)
|
||||
{
|
||||
int i;
|
||||
__be16 buf[WRITE_REG_NUM];
|
||||
u16 buf[WRITE_REG_NUM];
|
||||
struct i2c_msg msgs[1] = {
|
||||
{
|
||||
.addr = radio->client->addr,
|
||||
@@ -147,7 +147,7 @@ int si470x_set_register(struct si470x_device *radio, int regnr)
|
||||
static int si470x_get_all_registers(struct si470x_device *radio)
|
||||
{
|
||||
int i;
|
||||
__be16 buf[READ_REG_NUM];
|
||||
u16 buf[READ_REG_NUM];
|
||||
struct i2c_msg msgs[1] = {
|
||||
{
|
||||
.addr = radio->client->addr,
|
||||
|
||||
@@ -912,12 +912,9 @@ void vb2_buffer_done(struct vb2_buffer *vb, enum vb2_buffer_state state)
|
||||
dprintk(4, "done processing on buffer %d, state: %d\n",
|
||||
vb->index, state);
|
||||
|
||||
if (state != VB2_BUF_STATE_QUEUED &&
|
||||
state != VB2_BUF_STATE_REQUEUEING) {
|
||||
/* sync buffers */
|
||||
for (plane = 0; plane < vb->num_planes; ++plane)
|
||||
call_void_memop(vb, finish, vb->planes[plane].mem_priv);
|
||||
}
|
||||
/* sync buffers */
|
||||
for (plane = 0; plane < vb->num_planes; ++plane)
|
||||
call_void_memop(vb, finish, vb->planes[plane].mem_priv);
|
||||
|
||||
spin_lock_irqsave(&q->done_lock, flags);
|
||||
if (state == VB2_BUF_STATE_QUEUED ||
|
||||
|
||||
@@ -20,6 +20,14 @@
|
||||
#include "mc.h"
|
||||
|
||||
#define MC_INTSTATUS 0x000
|
||||
#define MC_INT_DECERR_MTS (1 << 16)
|
||||
#define MC_INT_SECERR_SEC (1 << 13)
|
||||
#define MC_INT_DECERR_VPR (1 << 12)
|
||||
#define MC_INT_INVALID_APB_ASID_UPDATE (1 << 11)
|
||||
#define MC_INT_INVALID_SMMU_PAGE (1 << 10)
|
||||
#define MC_INT_ARBITRATION_EMEM (1 << 9)
|
||||
#define MC_INT_SECURITY_VIOLATION (1 << 8)
|
||||
#define MC_INT_DECERR_EMEM (1 << 6)
|
||||
|
||||
#define MC_INTMASK 0x004
|
||||
|
||||
@@ -240,13 +248,12 @@ static const char *const error_names[8] = {
|
||||
static irqreturn_t tegra_mc_irq(int irq, void *data)
|
||||
{
|
||||
struct tegra_mc *mc = data;
|
||||
unsigned long status;
|
||||
unsigned long status, mask;
|
||||
unsigned int bit;
|
||||
|
||||
/* mask all interrupts to avoid flooding */
|
||||
status = mc_readl(mc, MC_INTSTATUS) & mc->soc->intmask;
|
||||
if (!status)
|
||||
return IRQ_NONE;
|
||||
status = mc_readl(mc, MC_INTSTATUS);
|
||||
mask = mc_readl(mc, MC_INTMASK);
|
||||
|
||||
for_each_set_bit(bit, &status, 32) {
|
||||
const char *error = status_names[bit] ?: "unknown";
|
||||
@@ -339,6 +346,7 @@ static int tegra_mc_probe(struct platform_device *pdev)
|
||||
const struct of_device_id *match;
|
||||
struct resource *res;
|
||||
struct tegra_mc *mc;
|
||||
u32 value;
|
||||
int err;
|
||||
|
||||
match = of_match_node(tegra_mc_of_match, pdev->dev.of_node);
|
||||
@@ -406,7 +414,11 @@ static int tegra_mc_probe(struct platform_device *pdev)
|
||||
|
||||
WARN(!mc->soc->client_id_mask, "Missing client ID mask for this SoC\n");
|
||||
|
||||
mc_writel(mc, mc->soc->intmask, MC_INTMASK);
|
||||
value = MC_INT_DECERR_MTS | MC_INT_SECERR_SEC | MC_INT_DECERR_VPR |
|
||||
MC_INT_INVALID_APB_ASID_UPDATE | MC_INT_INVALID_SMMU_PAGE |
|
||||
MC_INT_SECURITY_VIOLATION | MC_INT_DECERR_EMEM;
|
||||
|
||||
mc_writel(mc, value, MC_INTMASK);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -14,15 +14,6 @@
|
||||
|
||||
#include <soc/tegra/mc.h>
|
||||
|
||||
#define MC_INT_DECERR_MTS (1 << 16)
|
||||
#define MC_INT_SECERR_SEC (1 << 13)
|
||||
#define MC_INT_DECERR_VPR (1 << 12)
|
||||
#define MC_INT_INVALID_APB_ASID_UPDATE (1 << 11)
|
||||
#define MC_INT_INVALID_SMMU_PAGE (1 << 10)
|
||||
#define MC_INT_ARBITRATION_EMEM (1 << 9)
|
||||
#define MC_INT_SECURITY_VIOLATION (1 << 8)
|
||||
#define MC_INT_DECERR_EMEM (1 << 6)
|
||||
|
||||
static inline u32 mc_readl(struct tegra_mc *mc, unsigned long offset)
|
||||
{
|
||||
return readl(mc->regs + offset);
|
||||
|
||||
@@ -930,6 +930,4 @@ const struct tegra_mc_soc tegra114_mc_soc = {
|
||||
.atom_size = 32,
|
||||
.client_id_mask = 0x7f,
|
||||
.smmu = &tegra114_smmu_soc,
|
||||
.intmask = MC_INT_INVALID_SMMU_PAGE | MC_INT_SECURITY_VIOLATION |
|
||||
MC_INT_DECERR_EMEM,
|
||||
};
|
||||
|
||||
@@ -1020,9 +1020,6 @@ const struct tegra_mc_soc tegra124_mc_soc = {
|
||||
.smmu = &tegra124_smmu_soc,
|
||||
.emem_regs = tegra124_mc_emem_regs,
|
||||
.num_emem_regs = ARRAY_SIZE(tegra124_mc_emem_regs),
|
||||
.intmask = MC_INT_DECERR_MTS | MC_INT_SECERR_SEC | MC_INT_DECERR_VPR |
|
||||
MC_INT_INVALID_APB_ASID_UPDATE | MC_INT_INVALID_SMMU_PAGE |
|
||||
MC_INT_SECURITY_VIOLATION | MC_INT_DECERR_EMEM,
|
||||
};
|
||||
#endif /* CONFIG_ARCH_TEGRA_124_SOC */
|
||||
|
||||
@@ -1045,8 +1042,5 @@ const struct tegra_mc_soc tegra132_mc_soc = {
|
||||
.atom_size = 32,
|
||||
.client_id_mask = 0x7f,
|
||||
.smmu = &tegra132_smmu_soc,
|
||||
.intmask = MC_INT_DECERR_MTS | MC_INT_SECERR_SEC | MC_INT_DECERR_VPR |
|
||||
MC_INT_INVALID_APB_ASID_UPDATE | MC_INT_INVALID_SMMU_PAGE |
|
||||
MC_INT_SECURITY_VIOLATION | MC_INT_DECERR_EMEM,
|
||||
};
|
||||
#endif /* CONFIG_ARCH_TEGRA_132_SOC */
|
||||
|
||||
@@ -1077,7 +1077,4 @@ const struct tegra_mc_soc tegra210_mc_soc = {
|
||||
.atom_size = 64,
|
||||
.client_id_mask = 0xff,
|
||||
.smmu = &tegra210_smmu_soc,
|
||||
.intmask = MC_INT_DECERR_MTS | MC_INT_SECERR_SEC | MC_INT_DECERR_VPR |
|
||||
MC_INT_INVALID_APB_ASID_UPDATE | MC_INT_INVALID_SMMU_PAGE |
|
||||
MC_INT_SECURITY_VIOLATION | MC_INT_DECERR_EMEM,
|
||||
};
|
||||
|
||||
@@ -952,6 +952,4 @@ const struct tegra_mc_soc tegra30_mc_soc = {
|
||||
.atom_size = 16,
|
||||
.client_id_mask = 0x7f,
|
||||
.smmu = &tegra30_smmu_soc,
|
||||
.intmask = MC_INT_INVALID_SMMU_PAGE | MC_INT_SECURITY_VIOLATION |
|
||||
MC_INT_DECERR_EMEM,
|
||||
};
|
||||
|
||||
@@ -112,11 +112,7 @@ int cros_ec_register(struct cros_ec_device *ec_dev)
|
||||
|
||||
mutex_init(&ec_dev->lock);
|
||||
|
||||
err = cros_ec_query_all(ec_dev);
|
||||
if (err) {
|
||||
dev_err(dev, "Cannot identify the EC: error %d\n", err);
|
||||
return err;
|
||||
}
|
||||
cros_ec_query_all(ec_dev);
|
||||
|
||||
if (ec_dev->irq) {
|
||||
err = request_threaded_irq(ec_dev->irq, NULL, ec_irq_thread,
|
||||
|
||||
@@ -40,18 +40,14 @@ static void mmc_pwrseq_simple_set_gpios_value(struct mmc_pwrseq_simple *pwrseq,
|
||||
struct gpio_descs *reset_gpios = pwrseq->reset_gpios;
|
||||
|
||||
if (!IS_ERR(reset_gpios)) {
|
||||
int i, *values;
|
||||
int nvalues = reset_gpios->ndescs;
|
||||
int i;
|
||||
int values[reset_gpios->ndescs];
|
||||
|
||||
values = kmalloc_array(nvalues, sizeof(int), GFP_KERNEL);
|
||||
if (!values)
|
||||
return;
|
||||
|
||||
for (i = 0; i < nvalues; i++)
|
||||
for (i = 0; i < reset_gpios->ndescs; i++)
|
||||
values[i] = value;
|
||||
|
||||
gpiod_set_array_value_cansleep(nvalues, reset_gpios->desc, values);
|
||||
kfree(values);
|
||||
gpiod_set_array_value_cansleep(
|
||||
reset_gpios->ndescs, reset_gpios->desc, values);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1255,8 +1255,6 @@ static void dw_mci_setup_bus(struct dw_mci_slot *slot, bool force_clkinit)
|
||||
if (host->state == STATE_WAITING_CMD11_DONE)
|
||||
sdmmc_cmd_bits |= SDMMC_CMD_VOLT_SWITCH;
|
||||
|
||||
slot->mmc->actual_clock = 0;
|
||||
|
||||
if (!clock) {
|
||||
mci_writel(host, CLKENA, 0);
|
||||
mci_send_cmd(slot, sdmmc_cmd_bits, 0);
|
||||
@@ -1315,8 +1313,6 @@ static void dw_mci_setup_bus(struct dw_mci_slot *slot, bool force_clkinit)
|
||||
|
||||
/* keep the last clock value that was requested from core */
|
||||
slot->__clk_old = clock;
|
||||
slot->mmc->actual_clock = div ? ((host->bus_hz / div) >> 1) :
|
||||
host->bus_hz;
|
||||
}
|
||||
|
||||
host->current_speed = clock;
|
||||
|
||||
@@ -342,16 +342,9 @@ static void fsl_ifc_cmdfunc(struct mtd_info *mtd, unsigned int command,
|
||||
|
||||
case NAND_CMD_READID:
|
||||
case NAND_CMD_PARAM: {
|
||||
/*
|
||||
* For READID, read 8 bytes that are currently used.
|
||||
* For PARAM, read all 3 copies of 256-bytes pages.
|
||||
*/
|
||||
int len = 8;
|
||||
int timing = IFC_FIR_OP_RB;
|
||||
if (command == NAND_CMD_PARAM) {
|
||||
if (command == NAND_CMD_PARAM)
|
||||
timing = IFC_FIR_OP_RBCD;
|
||||
len = 256 * 3;
|
||||
}
|
||||
|
||||
ifc_out32((IFC_FIR_OP_CW0 << IFC_NAND_FIR0_OP0_SHIFT) |
|
||||
(IFC_FIR_OP_UA << IFC_NAND_FIR0_OP1_SHIFT) |
|
||||
@@ -361,8 +354,12 @@ static void fsl_ifc_cmdfunc(struct mtd_info *mtd, unsigned int command,
|
||||
&ifc->ifc_nand.nand_fcr0);
|
||||
ifc_out32(column, &ifc->ifc_nand.row3);
|
||||
|
||||
ifc_out32(len, &ifc->ifc_nand.nand_fbcr);
|
||||
ifc_nand_ctrl->read_bytes = len;
|
||||
/*
|
||||
* although currently it's 8 bytes for READID, we always read
|
||||
* the maximum 256 bytes(for PARAM)
|
||||
*/
|
||||
ifc_out32(256, &ifc->ifc_nand.nand_fbcr);
|
||||
ifc_nand_ctrl->read_bytes = 256;
|
||||
|
||||
set_addr(mtd, 0, 0, 0);
|
||||
fsl_ifc_run_command(mtd);
|
||||
|
||||
@@ -1687,8 +1687,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
|
||||
goto err_upper_unlink;
|
||||
}
|
||||
|
||||
bond->nest_level = dev_get_nest_level(bond_dev) + 1;
|
||||
|
||||
/* If the mode uses primary, then the following is handled by
|
||||
* bond_change_active_slave().
|
||||
*/
|
||||
@@ -1736,6 +1734,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
|
||||
if (bond_mode_uses_xmit_hash(bond))
|
||||
bond_update_slave_arr(bond, NULL);
|
||||
|
||||
bond->nest_level = dev_get_nest_level(bond_dev);
|
||||
|
||||
netdev_info(bond_dev, "Enslaving %s as %s interface with %s link\n",
|
||||
slave_dev->name,
|
||||
@@ -3380,13 +3379,6 @@ static void bond_fold_stats(struct rtnl_link_stats64 *_res,
|
||||
}
|
||||
}
|
||||
|
||||
static int bond_get_nest_level(struct net_device *bond_dev)
|
||||
{
|
||||
struct bonding *bond = netdev_priv(bond_dev);
|
||||
|
||||
return bond->nest_level;
|
||||
}
|
||||
|
||||
static void bond_get_stats(struct net_device *bond_dev,
|
||||
struct rtnl_link_stats64 *stats)
|
||||
{
|
||||
@@ -3395,7 +3387,7 @@ static void bond_get_stats(struct net_device *bond_dev,
|
||||
struct list_head *iter;
|
||||
struct slave *slave;
|
||||
|
||||
spin_lock_nested(&bond->stats_lock, bond_get_nest_level(bond_dev));
|
||||
spin_lock(&bond->stats_lock);
|
||||
memcpy(stats, &bond->bond_stats, sizeof(*stats));
|
||||
|
||||
rcu_read_lock();
|
||||
@@ -4190,7 +4182,6 @@ static const struct net_device_ops bond_netdev_ops = {
|
||||
.ndo_neigh_setup = bond_neigh_setup,
|
||||
.ndo_vlan_rx_add_vid = bond_vlan_rx_add_vid,
|
||||
.ndo_vlan_rx_kill_vid = bond_vlan_rx_kill_vid,
|
||||
.ndo_get_lock_subclass = bond_get_nest_level,
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
.ndo_netpoll_setup = bond_netpoll_setup,
|
||||
.ndo_netpoll_cleanup = bond_netpoll_cleanup,
|
||||
@@ -4689,7 +4680,6 @@ static int bond_init(struct net_device *bond_dev)
|
||||
if (!bond->wq)
|
||||
return -ENOMEM;
|
||||
|
||||
bond->nest_level = SINGLE_DEPTH_NESTING;
|
||||
netdev_lockdep_set_classes(bond_dev);
|
||||
|
||||
list_add_tail(&bond->bond_list, &bn->dev_list);
|
||||
|
||||
@@ -1071,7 +1071,6 @@ static void ems_usb_disconnect(struct usb_interface *intf)
|
||||
usb_free_urb(dev->intr_urb);
|
||||
|
||||
kfree(dev->intr_in_buffer);
|
||||
kfree(dev->tx_msg_buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -473,7 +473,7 @@ qca8k_set_pad_ctrl(struct qca8k_priv *priv, int port, int mode)
|
||||
static void
|
||||
qca8k_port_set_status(struct qca8k_priv *priv, int port, int enable)
|
||||
{
|
||||
u32 mask = QCA8K_PORT_STATUS_TXMAC | QCA8K_PORT_STATUS_RXMAC;
|
||||
u32 mask = QCA8K_PORT_STATUS_TXMAC;
|
||||
|
||||
/* Port 0 and 6 have no internal PHY */
|
||||
if ((port > 0) && (port < 6))
|
||||
@@ -490,7 +490,6 @@ qca8k_setup(struct dsa_switch *ds)
|
||||
{
|
||||
struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
|
||||
int ret, i, phy_mode = -1;
|
||||
u32 mask;
|
||||
|
||||
/* Make sure that port 0 is the cpu port */
|
||||
if (!dsa_is_cpu_port(ds, 0)) {
|
||||
@@ -516,10 +515,7 @@ qca8k_setup(struct dsa_switch *ds)
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
/* Enable CPU Port, force it to maximum bandwidth and full-duplex */
|
||||
mask = QCA8K_PORT_STATUS_SPEED_1000 | QCA8K_PORT_STATUS_TXFLOW |
|
||||
QCA8K_PORT_STATUS_RXFLOW | QCA8K_PORT_STATUS_DUPLEX;
|
||||
qca8k_write(priv, QCA8K_REG_PORT_STATUS(QCA8K_CPU_PORT), mask);
|
||||
/* Enable CPU Port */
|
||||
qca8k_reg_set(priv, QCA8K_REG_GLOBAL_FW_CTRL0,
|
||||
QCA8K_GLOBAL_FW_CTRL0_CPU_PORT_EN);
|
||||
qca8k_port_set_status(priv, QCA8K_CPU_PORT, 1);
|
||||
@@ -588,47 +584,6 @@ qca8k_setup(struct dsa_switch *ds)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
qca8k_adjust_link(struct dsa_switch *ds, int port, struct phy_device *phy)
|
||||
{
|
||||
struct qca8k_priv *priv = ds->priv;
|
||||
u32 reg;
|
||||
|
||||
/* Force fixed-link setting for CPU port, skip others. */
|
||||
if (!phy_is_pseudo_fixed_link(phy))
|
||||
return;
|
||||
|
||||
/* Set port speed */
|
||||
switch (phy->speed) {
|
||||
case 10:
|
||||
reg = QCA8K_PORT_STATUS_SPEED_10;
|
||||
break;
|
||||
case 100:
|
||||
reg = QCA8K_PORT_STATUS_SPEED_100;
|
||||
break;
|
||||
case 1000:
|
||||
reg = QCA8K_PORT_STATUS_SPEED_1000;
|
||||
break;
|
||||
default:
|
||||
dev_dbg(priv->dev, "port%d link speed %dMbps not supported.\n",
|
||||
port, phy->speed);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Set duplex mode */
|
||||
if (phy->duplex == DUPLEX_FULL)
|
||||
reg |= QCA8K_PORT_STATUS_DUPLEX;
|
||||
|
||||
/* Force flow control */
|
||||
if (dsa_is_cpu_port(ds, port))
|
||||
reg |= QCA8K_PORT_STATUS_RXFLOW | QCA8K_PORT_STATUS_TXFLOW;
|
||||
|
||||
/* Force link down before changing MAC options */
|
||||
qca8k_port_set_status(priv, port, 0);
|
||||
qca8k_write(priv, QCA8K_REG_PORT_STATUS(port), reg);
|
||||
qca8k_port_set_status(priv, port, 1);
|
||||
}
|
||||
|
||||
static int
|
||||
qca8k_phy_read(struct dsa_switch *ds, int phy, int regnum)
|
||||
{
|
||||
@@ -877,7 +832,6 @@ qca8k_get_tag_protocol(struct dsa_switch *ds)
|
||||
static const struct dsa_switch_ops qca8k_switch_ops = {
|
||||
.get_tag_protocol = qca8k_get_tag_protocol,
|
||||
.setup = qca8k_setup,
|
||||
.adjust_link = qca8k_adjust_link,
|
||||
.get_strings = qca8k_get_strings,
|
||||
.phy_read = qca8k_phy_read,
|
||||
.phy_write = qca8k_phy_write,
|
||||
@@ -909,7 +863,6 @@ qca8k_sw_probe(struct mdio_device *mdiodev)
|
||||
return -ENOMEM;
|
||||
|
||||
priv->bus = mdiodev->bus;
|
||||
priv->dev = &mdiodev->dev;
|
||||
|
||||
/* read the switches ID register */
|
||||
id = qca8k_read(priv, QCA8K_REG_MASK_CTRL);
|
||||
@@ -981,7 +934,6 @@ static SIMPLE_DEV_PM_OPS(qca8k_pm_ops,
|
||||
qca8k_suspend, qca8k_resume);
|
||||
|
||||
static const struct of_device_id qca8k_of_match[] = {
|
||||
{ .compatible = "qca,qca8334" },
|
||||
{ .compatible = "qca,qca8337" },
|
||||
{ /* sentinel */ },
|
||||
};
|
||||
|
||||
@@ -51,10 +51,8 @@
|
||||
#define QCA8K_GOL_MAC_ADDR0 0x60
|
||||
#define QCA8K_GOL_MAC_ADDR1 0x64
|
||||
#define QCA8K_REG_PORT_STATUS(_i) (0x07c + (_i) * 4)
|
||||
#define QCA8K_PORT_STATUS_SPEED GENMASK(1, 0)
|
||||
#define QCA8K_PORT_STATUS_SPEED_10 0
|
||||
#define QCA8K_PORT_STATUS_SPEED_100 0x1
|
||||
#define QCA8K_PORT_STATUS_SPEED_1000 0x2
|
||||
#define QCA8K_PORT_STATUS_SPEED GENMASK(2, 0)
|
||||
#define QCA8K_PORT_STATUS_SPEED_S 0
|
||||
#define QCA8K_PORT_STATUS_TXMAC BIT(2)
|
||||
#define QCA8K_PORT_STATUS_RXMAC BIT(3)
|
||||
#define QCA8K_PORT_STATUS_TXFLOW BIT(4)
|
||||
@@ -167,7 +165,6 @@ struct qca8k_priv {
|
||||
struct ar8xxx_port_status port_sts[QCA8K_NUM_PORTS];
|
||||
struct dsa_switch *ds;
|
||||
struct mutex reg_mutex;
|
||||
struct device *dev;
|
||||
};
|
||||
|
||||
struct qca8k_mib_desc {
|
||||
|
||||
@@ -331,7 +331,6 @@ static int ena_com_init_io_sq(struct ena_com_dev *ena_dev,
|
||||
|
||||
memset(&io_sq->desc_addr, 0x0, sizeof(io_sq->desc_addr));
|
||||
|
||||
io_sq->dma_addr_bits = ena_dev->dma_addr_bits;
|
||||
io_sq->desc_entry_size =
|
||||
(io_sq->direction == ENA_COM_IO_QUEUE_DIRECTION_TX) ?
|
||||
sizeof(struct ena_eth_io_tx_desc) :
|
||||
|
||||
@@ -1128,14 +1128,14 @@ static void xgbe_phy_adjust_link(struct xgbe_prv_data *pdata)
|
||||
|
||||
if (pdata->tx_pause != pdata->phy.tx_pause) {
|
||||
new_state = 1;
|
||||
pdata->tx_pause = pdata->phy.tx_pause;
|
||||
pdata->hw_if.config_tx_flow_control(pdata);
|
||||
pdata->tx_pause = pdata->phy.tx_pause;
|
||||
}
|
||||
|
||||
if (pdata->rx_pause != pdata->phy.rx_pause) {
|
||||
new_state = 1;
|
||||
pdata->rx_pause = pdata->phy.rx_pause;
|
||||
pdata->hw_if.config_rx_flow_control(pdata);
|
||||
pdata->rx_pause = pdata->phy.rx_pause;
|
||||
}
|
||||
|
||||
/* Speed support */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user