Linux 4.7
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJXlRXSAAoJEHm+PkMAQRiGG/gH/0Z8O4zWOsrwO+X1mRToRDBH joFOjAmCVe83T1VpF5LYNB+9+owL/dEDt6+ZIswnhH7AfQPjs4RqwS4PcuMbCDVO +mDm0PmfcKaYcQZrB2Z2OwIzRNnfCTVcsDPhIHwuIHk0m4z/xuGZonD8KoAj0+tO 3yJF6sbE1KubDVjOb+lmZZSP3cXA0pDXrNhkYhE4Tsr8fiihGjeXSNJ8t2zPLjxo W3MPqo0rzDvQsOwoF4TWHHagVaFSJlhLBBgqu33fI7uO3jtfQD2G8wG68JCND1j3 qbMoBfTLFV/yQmSIJUt0Wv1axaCcwnjpweEB35A/GEeZ0mNB1rDdoBeI1eKEQkc= =DGFC -----END PGP SIGNATURE----- Backmerge tag 'v4.7' into drm-next Linux 4.7 As requested by Daniel Vetter as the conflicts were getting messy.
This commit is contained in:
commit
5e580523d9
|
@ -139,27 +139,6 @@ Examples of using the Linux-provided gdb helpers
|
|||
start_comm = "swapper/2\000\000\000\000\000\000"
|
||||
}
|
||||
|
||||
o Dig into a radix tree data structure, such as the IRQ descriptors:
|
||||
(gdb) print (struct irq_desc)$lx_radix_tree_lookup(irq_desc_tree, 18)
|
||||
$6 = {
|
||||
irq_common_data = {
|
||||
state_use_accessors = 67584,
|
||||
handler_data = 0x0 <__vectors_start>,
|
||||
msi_desc = 0x0 <__vectors_start>,
|
||||
affinity = {{
|
||||
bits = {65535}
|
||||
}}
|
||||
},
|
||||
irq_data = {
|
||||
mask = 0,
|
||||
irq = 18,
|
||||
hwirq = 27,
|
||||
common = 0xee803d80,
|
||||
chip = 0xc0eb0854 <gic_data>,
|
||||
domain = 0xee808000,
|
||||
parent_data = 0x0 <__vectors_start>,
|
||||
chip_data = 0xc0eb0854 <gic_data>
|
||||
} <... trimmed ...>
|
||||
|
||||
List of commands and functions
|
||||
------------------------------
|
||||
|
|
|
@ -45,7 +45,7 @@ is how we expect the compiler, application and kernel to work together.
|
|||
MPX-instrumented.
|
||||
3) The kernel detects that the CPU has MPX, allows the new prctl() to
|
||||
succeed, and notes the location of the bounds directory. Userspace is
|
||||
expected to keep the bounds directory at that locationWe note it
|
||||
expected to keep the bounds directory at that location. We note it
|
||||
instead of reading it each time because the 'xsave' operation needed
|
||||
to access the bounds directory register is an expensive operation.
|
||||
4) If the application needs to spill bounds out of the 4 registers, it
|
||||
|
@ -167,7 +167,7 @@ If a #BR is generated due to a bounds violation caused by MPX.
|
|||
We need to decode MPX instructions to get violation address and
|
||||
set this address into extended struct siginfo.
|
||||
|
||||
The _sigfault feild of struct siginfo is extended as follow:
|
||||
The _sigfault field of struct siginfo is extended as follow:
|
||||
|
||||
87 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
|
||||
88 struct {
|
||||
|
@ -240,5 +240,5 @@ them at the same bounds table.
|
|||
This is allowed architecturally. See more information "Intel(R) Architecture
|
||||
Instruction Set Extensions Programming Reference" (9.3.4).
|
||||
|
||||
However, if users did this, the kernel might be fooled in to unmaping an
|
||||
However, if users did this, the kernel might be fooled in to unmapping an
|
||||
in-use bounds table since it does not recognize sharing.
|
||||
|
|
|
@ -5,7 +5,7 @@ memory, it has two choices:
|
|||
from areas other than the one we are trying to flush will be
|
||||
destroyed and must be refilled later, at some cost.
|
||||
2. Use the invlpg instruction to invalidate a single page at a
|
||||
time. This could potentialy cost many more instructions, but
|
||||
time. This could potentially cost many more instructions, but
|
||||
it is a much more precise operation, causing no collateral
|
||||
damage to other TLB entries.
|
||||
|
||||
|
@ -19,7 +19,7 @@ Which method to do depends on a few things:
|
|||
work.
|
||||
3. The size of the TLB. The larger the TLB, the more collateral
|
||||
damage we do with a full flush. So, the larger the TLB, the
|
||||
more attrative an individual flush looks. Data and
|
||||
more attractive an individual flush looks. Data and
|
||||
instructions have separate TLBs, as do different page sizes.
|
||||
4. The microarchitecture. The TLB has become a multi-level
|
||||
cache on modern CPUs, and the global flushes have become more
|
||||
|
|
|
@ -36,7 +36,7 @@ between all CPUs.
|
|||
|
||||
check_interval
|
||||
How often to poll for corrected machine check errors, in seconds
|
||||
(Note output is hexademical). Default 5 minutes. When the poller
|
||||
(Note output is hexadecimal). Default 5 minutes. When the poller
|
||||
finds MCEs it triggers an exponential speedup (poll more often) on
|
||||
the polling interval. When the poller stops finding MCEs, it
|
||||
triggers an exponential backoff (poll less often) on the polling
|
||||
|
|
13
MAINTAINERS
13
MAINTAINERS
|
@ -595,6 +595,10 @@ S: Odd Fixes
|
|||
L: linux-alpha@vger.kernel.org
|
||||
F: arch/alpha/
|
||||
|
||||
ALPS PS/2 TOUCHPAD DRIVER
|
||||
R: Pali Rohár <pali.rohar@gmail.com>
|
||||
F: drivers/input/mouse/alps.*
|
||||
|
||||
ALTERA MAILBOX DRIVER
|
||||
M: Ley Foon Tan <lftan@altera.com>
|
||||
L: nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
|
||||
|
@ -1698,8 +1702,6 @@ S: Maintained
|
|||
F: drivers/edac/altera_edac.
|
||||
|
||||
ARM/STI ARCHITECTURE
|
||||
M: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
|
||||
M: Maxime Coquelin <maxime.coquelin@st.com>
|
||||
M: Patrice Chotard <patrice.chotard@st.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
L: kernel@stlinux.com
|
||||
|
@ -1732,6 +1734,7 @@ F: drivers/ata/ahci_st.c
|
|||
|
||||
ARM/STM32 ARCHITECTURE
|
||||
M: Maxime Coquelin <mcoquelin.stm32@gmail.com>
|
||||
M: Alexandre Torgue <alexandre.torgue@st.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/mcoquelin/stm32.git
|
||||
|
@ -4511,7 +4514,7 @@ S: Orphan
|
|||
F: fs/efs/
|
||||
|
||||
EHEA (IBM pSeries eHEA 10Gb ethernet adapter) DRIVER
|
||||
M: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
|
||||
M: Douglas Miller <dougmill@linux.vnet.ibm.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/ibm/ehea/
|
||||
|
@ -7458,7 +7461,7 @@ F: drivers/scsi/megaraid.*
|
|||
F: drivers/scsi/megaraid/
|
||||
|
||||
MELLANOX ETHERNET DRIVER (mlx4_en)
|
||||
M: Eugenia Emantayev <eugenia@mellanox.com>
|
||||
M: Tariq Toukan <tariqt@mellanox.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://www.mellanox.com
|
||||
|
@ -7510,6 +7513,7 @@ Q: http://patchwork.ozlabs.org/project/linux-mtd/list/
|
|||
T: git git://git.infradead.org/linux-mtd.git
|
||||
T: git git://git.infradead.org/l2-mtd.git
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/mtd/
|
||||
F: drivers/mtd/
|
||||
F: include/linux/mtd/
|
||||
F: include/uapi/mtd/
|
||||
|
@ -8997,6 +9001,7 @@ L: linux-gpio@vger.kernel.org
|
|||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/pinctrl/
|
||||
F: Documentation/pinctrl.txt
|
||||
F: drivers/pinctrl/
|
||||
F: include/linux/pinctrl/
|
||||
|
||||
|
|
4
Makefile
4
Makefile
|
@ -1,7 +1,7 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 7
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc5
|
||||
EXTRAVERSION =
|
||||
NAME = Psychotic Stoned Sheep
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -363,11 +363,13 @@ CHECK = sparse
|
|||
|
||||
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
|
||||
-Wbitwise -Wno-return-void $(CF)
|
||||
NOSTDINC_FLAGS =
|
||||
CFLAGS_MODULE =
|
||||
AFLAGS_MODULE =
|
||||
LDFLAGS_MODULE =
|
||||
CFLAGS_KERNEL =
|
||||
AFLAGS_KERNEL =
|
||||
LDFLAGS_vmlinux =
|
||||
CFLAGS_GCOV = -fprofile-arcs -ftest-coverage -fno-tree-loop-im -Wno-maybe-uninitialized
|
||||
CFLAGS_KCOV = -fsanitize-coverage=trace-pc
|
||||
|
||||
|
|
|
@ -66,8 +66,6 @@ endif
|
|||
|
||||
endif
|
||||
|
||||
cflags-$(CONFIG_ARC_DW2_UNWIND) += -fasynchronous-unwind-tables
|
||||
|
||||
# By default gcc 4.8 generates dwarf4 which kernel unwinder can't grok
|
||||
ifeq ($(atleast_gcc48),y)
|
||||
cflags-$(CONFIG_ARC_DW2_UNWIND) += -gdwarf-2
|
||||
|
|
|
@ -142,7 +142,7 @@ arc_unwind_core(struct task_struct *tsk, struct pt_regs *regs,
|
|||
* prelogue is setup (callee regs saved and then fp set and not other
|
||||
* way around
|
||||
*/
|
||||
pr_warn("CONFIG_ARC_DW2_UNWIND needs to be enabled\n");
|
||||
pr_warn_once("CONFIG_ARC_DW2_UNWIND needs to be enabled\n");
|
||||
return 0;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -58,8 +58,8 @@
|
|||
soc {
|
||||
ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
|
||||
MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
|
||||
MBUS_ID(0x09, 0x09) 0 0xf1100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0xf1110000 0x10000>;
|
||||
MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
|
||||
MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>;
|
||||
|
||||
internal-regs {
|
||||
|
||||
|
|
|
@ -65,8 +65,9 @@
|
|||
compatible = "allwinner,simple-framebuffer",
|
||||
"simple-framebuffer";
|
||||
allwinner,pipeline = "de_be0-lcd0-hdmi";
|
||||
clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
|
||||
<&ahb_gates 44>, <&dram_gates 26>;
|
||||
clocks = <&pll3>, <&pll5 1>, <&ahb_gates 36>,
|
||||
<&ahb_gates 43>, <&ahb_gates 44>,
|
||||
<&dram_gates 26>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -74,8 +75,9 @@
|
|||
compatible = "allwinner,simple-framebuffer",
|
||||
"simple-framebuffer";
|
||||
allwinner,pipeline = "de_fe0-de_be0-lcd0-hdmi";
|
||||
clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
|
||||
<&ahb_gates 44>, <&ahb_gates 46>,
|
||||
clocks = <&pll3>, <&pll5 1>, <&ahb_gates 36>,
|
||||
<&ahb_gates 43>, <&ahb_gates 44>,
|
||||
<&ahb_gates 46>,
|
||||
<&dram_gates 25>, <&dram_gates 26>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
@ -84,9 +86,9 @@
|
|||
compatible = "allwinner,simple-framebuffer",
|
||||
"simple-framebuffer";
|
||||
allwinner,pipeline = "de_fe0-de_be0-lcd0";
|
||||
clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>,
|
||||
<&ahb_gates 46>, <&dram_gates 25>,
|
||||
<&dram_gates 26>;
|
||||
clocks = <&pll3>, <&pll5 1>, <&ahb_gates 36>,
|
||||
<&ahb_gates 44>, <&ahb_gates 46>,
|
||||
<&dram_gates 25>, <&dram_gates 26>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -94,8 +96,9 @@
|
|||
compatible = "allwinner,simple-framebuffer",
|
||||
"simple-framebuffer";
|
||||
allwinner,pipeline = "de_fe0-de_be0-lcd0-tve0";
|
||||
clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
|
||||
<&ahb_gates 44>, <&ahb_gates 46>,
|
||||
clocks = <&pll3>, <&pll5 1>, <&ahb_gates 34>,
|
||||
<&ahb_gates 36>, <&ahb_gates 44>,
|
||||
<&ahb_gates 46>,
|
||||
<&dram_gates 5>, <&dram_gates 25>, <&dram_gates 26>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
|
|
@ -65,8 +65,8 @@
|
|||
compatible = "allwinner,simple-framebuffer",
|
||||
"simple-framebuffer";
|
||||
allwinner,pipeline = "de_be0-lcd0-hdmi";
|
||||
clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
|
||||
<&ahb_gates 44>;
|
||||
clocks = <&pll3>, <&pll5 1>, <&ahb_gates 36>,
|
||||
<&ahb_gates 43>, <&ahb_gates 44>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -74,7 +74,8 @@
|
|||
compatible = "allwinner,simple-framebuffer",
|
||||
"simple-framebuffer";
|
||||
allwinner,pipeline = "de_be0-lcd0";
|
||||
clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>;
|
||||
clocks = <&pll3>, <&pll5 1>, <&ahb_gates 36>,
|
||||
<&ahb_gates 44>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -82,8 +83,8 @@
|
|||
compatible = "allwinner,simple-framebuffer",
|
||||
"simple-framebuffer";
|
||||
allwinner,pipeline = "de_be0-lcd0-tve0";
|
||||
clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
|
||||
<&ahb_gates 44>;
|
||||
clocks = <&pll3>, <&pll5 1>, <&ahb_gates 34>,
|
||||
<&ahb_gates 36>, <&ahb_gates 44>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
/ {
|
||||
model = "NextThing C.H.I.P.";
|
||||
compatible = "nextthing,chip", "allwinner,sun5i-r8";
|
||||
compatible = "nextthing,chip", "allwinner,sun5i-r8", "allwinner,sun5i-a13";
|
||||
|
||||
aliases {
|
||||
i2c0 = &i2c0;
|
||||
|
|
|
@ -67,8 +67,9 @@
|
|||
compatible = "allwinner,simple-framebuffer",
|
||||
"simple-framebuffer";
|
||||
allwinner,pipeline = "de_be0-lcd0-hdmi";
|
||||
clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
|
||||
<&ahb_gates 44>, <&dram_gates 26>;
|
||||
clocks = <&pll3>, <&pll5 1>, <&ahb_gates 36>,
|
||||
<&ahb_gates 43>, <&ahb_gates 44>,
|
||||
<&dram_gates 26>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -76,8 +77,8 @@
|
|||
compatible = "allwinner,simple-framebuffer",
|
||||
"simple-framebuffer";
|
||||
allwinner,pipeline = "de_be0-lcd0";
|
||||
clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>,
|
||||
<&dram_gates 26>;
|
||||
clocks = <&pll3>, <&pll5 1>, <&ahb_gates 36>,
|
||||
<&ahb_gates 44>, <&dram_gates 26>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -85,7 +86,7 @@
|
|||
compatible = "allwinner,simple-framebuffer",
|
||||
"simple-framebuffer";
|
||||
allwinner,pipeline = "de_be0-lcd0-tve0";
|
||||
clocks = <&pll5 1>,
|
||||
clocks = <&pll3>, <&pll5 1>,
|
||||
<&ahb_gates 34>, <&ahb_gates 36>, <&ahb_gates 44>,
|
||||
<&dram_gates 5>, <&dram_gates 26>;
|
||||
status = "disabled";
|
||||
|
@ -231,6 +232,7 @@
|
|||
pll3x2: pll3x2_clk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-factor-clock";
|
||||
clocks = <&pll3>;
|
||||
clock-div = <1>;
|
||||
clock-mult = <2>;
|
||||
clock-output-names = "pll3-2x";
|
||||
|
@ -272,6 +274,7 @@
|
|||
pll7x2: pll7x2_clk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-factor-clock";
|
||||
clocks = <&pll7>;
|
||||
clock-div = <1>;
|
||||
clock-mult = <2>;
|
||||
clock-output-names = "pll7-2x";
|
||||
|
|
|
@ -1843,7 +1843,7 @@
|
|||
|
||||
ldo5_reg: ldo5 {
|
||||
regulator-name = "vddio_sdmmc,avdd_vdac";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
@ -1914,6 +1914,7 @@
|
|||
|
||||
sdhci@78000000 {
|
||||
status = "okay";
|
||||
vqmmc-supply = <&ldo5_reg>;
|
||||
cd-gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
|
||||
wp-gpios = <&gpio TEGRA_GPIO(T, 3) GPIO_ACTIVE_HIGH>;
|
||||
power-gpios = <&gpio TEGRA_GPIO(D, 7) GPIO_ACTIVE_HIGH>;
|
||||
|
|
|
@ -263,6 +263,7 @@ void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu)
|
|||
kvm_timer_vcpu_terminate(vcpu);
|
||||
kvm_vgic_vcpu_destroy(vcpu);
|
||||
kvm_pmu_vcpu_destroy(vcpu);
|
||||
kvm_vcpu_uninit(vcpu);
|
||||
kmem_cache_free(kvm_vcpu_cache, vcpu);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,9 +7,15 @@ CFLAGS_pmsu.o := -march=armv7-a
|
|||
obj-$(CONFIG_MACH_MVEBU_ANY) += system-controller.o mvebu-soc-id.o
|
||||
|
||||
ifeq ($(CONFIG_MACH_MVEBU_V7),y)
|
||||
obj-y += cpu-reset.o board-v7.o coherency.o coherency_ll.o pmsu.o pmsu_ll.o pm.o pm-board.o
|
||||
obj-y += cpu-reset.o board-v7.o coherency.o coherency_ll.o pmsu.o pmsu_ll.o
|
||||
|
||||
obj-$(CONFIG_PM) += pm.o pm-board.o
|
||||
obj-$(CONFIG_SMP) += platsmp.o headsmp.o platsmp-a9.o headsmp-a9.o
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_MACH_DOVE) += dove.o
|
||||
obj-$(CONFIG_MACH_KIRKWOOD) += kirkwood.o kirkwood-pm.o
|
||||
|
||||
ifeq ($(CONFIG_MACH_KIRKWOOD),y)
|
||||
obj-y += kirkwood.o
|
||||
obj-$(CONFIG_PM) += kirkwood-pm.o
|
||||
endif
|
||||
|
|
|
@ -162,22 +162,16 @@ exit:
|
|||
}
|
||||
|
||||
/*
|
||||
* This ioremap hook is used on Armada 375/38x to ensure that PCIe
|
||||
* memory areas are mapped as MT_UNCACHED instead of MT_DEVICE. This
|
||||
* is needed as a workaround for a deadlock issue between the PCIe
|
||||
* interface and the cache controller.
|
||||
* This ioremap hook is used on Armada 375/38x to ensure that all MMIO
|
||||
* areas are mapped as MT_UNCACHED instead of MT_DEVICE. This is
|
||||
* needed for the HW I/O coherency mechanism to work properly without
|
||||
* deadlock.
|
||||
*/
|
||||
static void __iomem *
|
||||
armada_pcie_wa_ioremap_caller(phys_addr_t phys_addr, size_t size,
|
||||
unsigned int mtype, void *caller)
|
||||
armada_wa_ioremap_caller(phys_addr_t phys_addr, size_t size,
|
||||
unsigned int mtype, void *caller)
|
||||
{
|
||||
struct resource pcie_mem;
|
||||
|
||||
mvebu_mbus_get_pcie_mem_aperture(&pcie_mem);
|
||||
|
||||
if (pcie_mem.start <= phys_addr && (phys_addr + size) <= pcie_mem.end)
|
||||
mtype = MT_UNCACHED;
|
||||
|
||||
mtype = MT_UNCACHED;
|
||||
return __arm_ioremap_caller(phys_addr, size, mtype, caller);
|
||||
}
|
||||
|
||||
|
@ -186,7 +180,8 @@ static void __init armada_375_380_coherency_init(struct device_node *np)
|
|||
struct device_node *cache_dn;
|
||||
|
||||
coherency_cpu_base = of_iomap(np, 0);
|
||||
arch_ioremap_caller = armada_pcie_wa_ioremap_caller;
|
||||
arch_ioremap_caller = armada_wa_ioremap_caller;
|
||||
pci_ioremap_set_mem_type(MT_UNCACHED);
|
||||
|
||||
/*
|
||||
* We should switch the PL310 to I/O coherency mode only if
|
||||
|
|
|
@ -80,12 +80,14 @@
|
|||
#define APM_CPU_PART_POTENZA 0x000
|
||||
|
||||
#define CAVIUM_CPU_PART_THUNDERX 0x0A1
|
||||
#define CAVIUM_CPU_PART_THUNDERX_81XX 0x0A2
|
||||
|
||||
#define BRCM_CPU_PART_VULCAN 0x516
|
||||
|
||||
#define MIDR_CORTEX_A53 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A53)
|
||||
#define MIDR_CORTEX_A57 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A57)
|
||||
#define MIDR_THUNDERX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX)
|
||||
#define MIDR_THUNDERX_81XX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX_81XX)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
|
|
@ -117,6 +117,8 @@ struct pt_regs {
|
|||
};
|
||||
u64 orig_x0;
|
||||
u64 syscallno;
|
||||
u64 orig_addr_limit;
|
||||
u64 unused; // maintain 16 byte alignment
|
||||
};
|
||||
|
||||
#define arch_has_single_step() (1)
|
||||
|
|
|
@ -60,6 +60,7 @@ int main(void)
|
|||
DEFINE(S_PC, offsetof(struct pt_regs, pc));
|
||||
DEFINE(S_ORIG_X0, offsetof(struct pt_regs, orig_x0));
|
||||
DEFINE(S_SYSCALLNO, offsetof(struct pt_regs, syscallno));
|
||||
DEFINE(S_ORIG_ADDR_LIMIT, offsetof(struct pt_regs, orig_addr_limit));
|
||||
DEFINE(S_FRAME_SIZE, sizeof(struct pt_regs));
|
||||
BLANK();
|
||||
DEFINE(MM_CONTEXT_ID, offsetof(struct mm_struct, context.id.counter));
|
||||
|
|
|
@ -98,6 +98,12 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
|
|||
MIDR_RANGE(MIDR_THUNDERX, 0x00,
|
||||
(1 << MIDR_VARIANT_SHIFT) | 1),
|
||||
},
|
||||
{
|
||||
/* Cavium ThunderX, T81 pass 1.0 */
|
||||
.desc = "Cavium erratum 27456",
|
||||
.capability = ARM64_WORKAROUND_CAVIUM_27456,
|
||||
MIDR_RANGE(MIDR_THUNDERX_81XX, 0x00, 0x00),
|
||||
},
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <asm/errno.h>
|
||||
#include <asm/esr.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/memory.h>
|
||||
#include <asm/thread_info.h>
|
||||
#include <asm/unistd.h>
|
||||
|
||||
|
@ -97,7 +98,14 @@
|
|||
mov x29, xzr // fp pointed to user-space
|
||||
.else
|
||||
add x21, sp, #S_FRAME_SIZE
|
||||
.endif
|
||||
get_thread_info tsk
|
||||
/* Save the task's original addr_limit and set USER_DS (TASK_SIZE_64) */
|
||||
ldr x20, [tsk, #TI_ADDR_LIMIT]
|
||||
str x20, [sp, #S_ORIG_ADDR_LIMIT]
|
||||
mov x20, #TASK_SIZE_64
|
||||
str x20, [tsk, #TI_ADDR_LIMIT]
|
||||
ALTERNATIVE(nop, SET_PSTATE_UAO(0), ARM64_HAS_UAO, CONFIG_ARM64_UAO)
|
||||
.endif /* \el == 0 */
|
||||
mrs x22, elr_el1
|
||||
mrs x23, spsr_el1
|
||||
stp lr, x21, [sp, #S_LR]
|
||||
|
@ -128,6 +136,14 @@
|
|||
.endm
|
||||
|
||||
.macro kernel_exit, el
|
||||
.if \el != 0
|
||||
/* Restore the task's original addr_limit. */
|
||||
ldr x20, [sp, #S_ORIG_ADDR_LIMIT]
|
||||
str x20, [tsk, #TI_ADDR_LIMIT]
|
||||
|
||||
/* No need to restore UAO, it will be restored from SPSR_EL1 */
|
||||
.endif
|
||||
|
||||
ldp x21, x22, [sp, #S_PC] // load ELR, SPSR
|
||||
.if \el == 0
|
||||
ct_user_enter
|
||||
|
@ -406,7 +422,6 @@ el1_irq:
|
|||
bl trace_hardirqs_off
|
||||
#endif
|
||||
|
||||
get_thread_info tsk
|
||||
irq_handler
|
||||
|
||||
#ifdef CONFIG_PREEMPT
|
||||
|
|
|
@ -280,7 +280,8 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
|
|||
}
|
||||
|
||||
if (permission_fault(esr) && (addr < USER_DS)) {
|
||||
if (get_fs() == KERNEL_DS)
|
||||
/* regs->orig_addr_limit may be 0 if we entered from EL0 */
|
||||
if (regs->orig_addr_limit == KERNEL_DS)
|
||||
die("Accessing user space memory with fs=KERNEL_DS", regs, esr);
|
||||
|
||||
if (!search_exception_tables(regs->pc))
|
||||
|
|
|
@ -8,12 +8,13 @@
|
|||
|
||||
#include <asm/processor.h>
|
||||
|
||||
static void putc(char c);
|
||||
static void m32r_putc(char c);
|
||||
|
||||
static int puts(const char *s)
|
||||
{
|
||||
char c;
|
||||
while ((c = *s++)) putc(c);
|
||||
while ((c = *s++))
|
||||
m32r_putc(c);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -41,7 +42,7 @@ static int puts(const char *s)
|
|||
#define BOOT_SIO0TXB PLD_ESIO0TXB
|
||||
#endif
|
||||
|
||||
static void putc(char c)
|
||||
static void m32r_putc(char c)
|
||||
{
|
||||
while ((*BOOT_SIO0STS & 0x3) != 0x3)
|
||||
cpu_relax();
|
||||
|
@ -61,7 +62,7 @@ static void putc(char c)
|
|||
#define SIO0TXB (volatile unsigned short *)(0x00efd000 + 30)
|
||||
#endif
|
||||
|
||||
static void putc(char c)
|
||||
static void m32r_putc(char c)
|
||||
{
|
||||
while ((*SIO0STS & 0x1) == 0)
|
||||
cpu_relax();
|
||||
|
|
|
@ -288,7 +288,7 @@ _clear_bss:
|
|||
#endif
|
||||
|
||||
/*
|
||||
* Assember start up done, start code proper.
|
||||
* Assembler start up done, start code proper.
|
||||
*/
|
||||
jsr start_kernel /* start Linux kernel */
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ void __init config_BSP(char *commandp, int size)
|
|||
/***************************************************************************/
|
||||
|
||||
/*
|
||||
* Some 5272 based boards have the FEC ethernet diectly connected to
|
||||
* Some 5272 based boards have the FEC ethernet directly connected to
|
||||
* an ethernet switch. In this case we need to use the fixed phy type,
|
||||
* and we need to declare it early in boot.
|
||||
*/
|
||||
|
|
|
@ -42,7 +42,7 @@ static unsigned long iospace;
|
|||
|
||||
/*
|
||||
* We need to be carefull probing on bus 0 (directly connected to host
|
||||
* bridge). We should only acccess the well defined possible devices in
|
||||
* bridge). We should only access the well defined possible devices in
|
||||
* use, ignore aliases and the like.
|
||||
*/
|
||||
static unsigned char mcf_host_slot2sid[32] = {
|
||||
|
|
|
@ -9,6 +9,7 @@ CONFIG_LOG_BUF_SHIFT=16
|
|||
# CONFIG_PID_NS is not set
|
||||
# CONFIG_NET_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_USERFAULTFD=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
|
@ -359,6 +360,7 @@ CONFIG_MACVTAP=m
|
|||
CONFIG_IPVLAN=m
|
||||
CONFIG_VXLAN=m
|
||||
CONFIG_GENEVE=m
|
||||
CONFIG_GTP=m
|
||||
CONFIG_MACSEC=m
|
||||
CONFIG_NETCONSOLE=m
|
||||
CONFIG_NETCONSOLE_DYNAMIC=y
|
||||
|
@ -553,7 +555,9 @@ CONFIG_TEST_STRING_HELPERS=m
|
|||
CONFIG_TEST_KSTRTOX=m
|
||||
CONFIG_TEST_PRINTF=m
|
||||
CONFIG_TEST_BITMAP=m
|
||||
CONFIG_TEST_UUID=m
|
||||
CONFIG_TEST_RHASHTABLE=m
|
||||
CONFIG_TEST_HASH=m
|
||||
CONFIG_TEST_LKM=m
|
||||
CONFIG_TEST_USER_COPY=m
|
||||
CONFIG_TEST_BPF=m
|
||||
|
|
|
@ -9,6 +9,7 @@ CONFIG_LOG_BUF_SHIFT=16
|
|||
# CONFIG_PID_NS is not set
|
||||
# CONFIG_NET_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_USERFAULTFD=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
|
@ -341,6 +342,7 @@ CONFIG_MACVTAP=m
|
|||
CONFIG_IPVLAN=m
|
||||
CONFIG_VXLAN=m
|
||||
CONFIG_GENEVE=m
|
||||
CONFIG_GTP=m
|
||||
CONFIG_MACSEC=m
|
||||
CONFIG_NETCONSOLE=m
|
||||
CONFIG_NETCONSOLE_DYNAMIC=y
|
||||
|
@ -512,7 +514,9 @@ CONFIG_TEST_STRING_HELPERS=m
|
|||
CONFIG_TEST_KSTRTOX=m
|
||||
CONFIG_TEST_PRINTF=m
|
||||
CONFIG_TEST_BITMAP=m
|
||||
CONFIG_TEST_UUID=m
|
||||
CONFIG_TEST_RHASHTABLE=m
|
||||
CONFIG_TEST_HASH=m
|
||||
CONFIG_TEST_LKM=m
|
||||
CONFIG_TEST_USER_COPY=m
|
||||
CONFIG_TEST_BPF=m
|
||||
|
|
|
@ -9,6 +9,7 @@ CONFIG_LOG_BUF_SHIFT=16
|
|||
# CONFIG_PID_NS is not set
|
||||
# CONFIG_NET_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_USERFAULTFD=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
|
@ -350,6 +351,7 @@ CONFIG_MACVTAP=m
|
|||
CONFIG_IPVLAN=m
|
||||
CONFIG_VXLAN=m
|
||||
CONFIG_GENEVE=m
|
||||
CONFIG_GTP=m
|
||||
CONFIG_MACSEC=m
|
||||
CONFIG_NETCONSOLE=m
|
||||
CONFIG_NETCONSOLE_DYNAMIC=y
|
||||
|
@ -533,7 +535,9 @@ CONFIG_TEST_STRING_HELPERS=m
|
|||
CONFIG_TEST_KSTRTOX=m
|
||||
CONFIG_TEST_PRINTF=m
|
||||
CONFIG_TEST_BITMAP=m
|
||||
CONFIG_TEST_UUID=m
|
||||
CONFIG_TEST_RHASHTABLE=m
|
||||
CONFIG_TEST_HASH=m
|
||||
CONFIG_TEST_LKM=m
|
||||
CONFIG_TEST_USER_COPY=m
|
||||
CONFIG_TEST_BPF=m
|
||||
|
|
|
@ -9,6 +9,7 @@ CONFIG_LOG_BUF_SHIFT=16
|
|||
# CONFIG_PID_NS is not set
|
||||
# CONFIG_NET_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_USERFAULTFD=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
|
@ -340,6 +341,7 @@ CONFIG_MACVTAP=m
|
|||
CONFIG_IPVLAN=m
|
||||
CONFIG_VXLAN=m
|
||||
CONFIG_GENEVE=m
|
||||
CONFIG_GTP=m
|
||||
CONFIG_MACSEC=m
|
||||
CONFIG_NETCONSOLE=m
|
||||
CONFIG_NETCONSOLE_DYNAMIC=y
|
||||
|
@ -504,7 +506,9 @@ CONFIG_TEST_STRING_HELPERS=m
|
|||
CONFIG_TEST_KSTRTOX=m
|
||||
CONFIG_TEST_PRINTF=m
|
||||
CONFIG_TEST_BITMAP=m
|
||||
CONFIG_TEST_UUID=m
|
||||
CONFIG_TEST_RHASHTABLE=m
|
||||
CONFIG_TEST_HASH=m
|
||||
CONFIG_TEST_LKM=m
|
||||
CONFIG_TEST_USER_COPY=m
|
||||
CONFIG_TEST_BPF=m
|
||||
|
|
|
@ -9,6 +9,7 @@ CONFIG_LOG_BUF_SHIFT=16
|
|||
# CONFIG_PID_NS is not set
|
||||
# CONFIG_NET_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_USERFAULTFD=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
|
@ -341,6 +342,7 @@ CONFIG_MACVTAP=m
|
|||
CONFIG_IPVLAN=m
|
||||
CONFIG_VXLAN=m
|
||||
CONFIG_GENEVE=m
|
||||
CONFIG_GTP=m
|
||||
CONFIG_MACSEC=m
|
||||
CONFIG_NETCONSOLE=m
|
||||
CONFIG_NETCONSOLE_DYNAMIC=y
|
||||
|
@ -514,7 +516,9 @@ CONFIG_TEST_STRING_HELPERS=m
|
|||
CONFIG_TEST_KSTRTOX=m
|
||||
CONFIG_TEST_PRINTF=m
|
||||
CONFIG_TEST_BITMAP=m
|
||||
CONFIG_TEST_UUID=m
|
||||
CONFIG_TEST_RHASHTABLE=m
|
||||
CONFIG_TEST_HASH=m
|
||||
CONFIG_TEST_LKM=m
|
||||
CONFIG_TEST_USER_COPY=m
|
||||
CONFIG_TEST_BPF=m
|
||||
|
|
|
@ -9,6 +9,7 @@ CONFIG_LOG_BUF_SHIFT=16
|
|||
# CONFIG_PID_NS is not set
|
||||
# CONFIG_NET_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_USERFAULTFD=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
|
@ -357,6 +358,7 @@ CONFIG_MACVTAP=m
|
|||
CONFIG_IPVLAN=m
|
||||
CONFIG_VXLAN=m
|
||||
CONFIG_GENEVE=m
|
||||
CONFIG_GTP=m
|
||||
CONFIG_MACSEC=m
|
||||
CONFIG_NETCONSOLE=m
|
||||
CONFIG_NETCONSOLE_DYNAMIC=y
|
||||
|
@ -536,7 +538,9 @@ CONFIG_TEST_STRING_HELPERS=m
|
|||
CONFIG_TEST_KSTRTOX=m
|
||||
CONFIG_TEST_PRINTF=m
|
||||
CONFIG_TEST_BITMAP=m
|
||||
CONFIG_TEST_UUID=m
|
||||
CONFIG_TEST_RHASHTABLE=m
|
||||
CONFIG_TEST_HASH=m
|
||||
CONFIG_TEST_LKM=m
|
||||
CONFIG_TEST_USER_COPY=m
|
||||
CONFIG_TEST_BPF=m
|
||||
|
|
|
@ -9,6 +9,7 @@ CONFIG_LOG_BUF_SHIFT=16
|
|||
# CONFIG_PID_NS is not set
|
||||
# CONFIG_NET_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_USERFAULTFD=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
|
@ -390,6 +391,7 @@ CONFIG_MACVTAP=m
|
|||
CONFIG_IPVLAN=m
|
||||
CONFIG_VXLAN=m
|
||||
CONFIG_GENEVE=m
|
||||
CONFIG_GTP=m
|
||||
CONFIG_MACSEC=m
|
||||
CONFIG_NETCONSOLE=m
|
||||
CONFIG_NETCONSOLE_DYNAMIC=y
|
||||
|
@ -616,7 +618,9 @@ CONFIG_TEST_STRING_HELPERS=m
|
|||
CONFIG_TEST_KSTRTOX=m
|
||||
CONFIG_TEST_PRINTF=m
|
||||
CONFIG_TEST_BITMAP=m
|
||||
CONFIG_TEST_UUID=m
|
||||
CONFIG_TEST_RHASHTABLE=m
|
||||
CONFIG_TEST_HASH=m
|
||||
CONFIG_TEST_LKM=m
|
||||
CONFIG_TEST_USER_COPY=m
|
||||
CONFIG_TEST_BPF=m
|
||||
|
|
|
@ -9,6 +9,7 @@ CONFIG_LOG_BUF_SHIFT=16
|
|||
# CONFIG_PID_NS is not set
|
||||
# CONFIG_NET_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_USERFAULTFD=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
|
@ -339,6 +340,7 @@ CONFIG_MACVTAP=m
|
|||
CONFIG_IPVLAN=m
|
||||
CONFIG_VXLAN=m
|
||||
CONFIG_GENEVE=m
|
||||
CONFIG_GTP=m
|
||||
CONFIG_MACSEC=m
|
||||
CONFIG_NETCONSOLE=m
|
||||
CONFIG_NETCONSOLE_DYNAMIC=y
|
||||
|
@ -504,7 +506,9 @@ CONFIG_TEST_STRING_HELPERS=m
|
|||
CONFIG_TEST_KSTRTOX=m
|
||||
CONFIG_TEST_PRINTF=m
|
||||
CONFIG_TEST_BITMAP=m
|
||||
CONFIG_TEST_UUID=m
|
||||
CONFIG_TEST_RHASHTABLE=m
|
||||
CONFIG_TEST_HASH=m
|
||||
CONFIG_TEST_LKM=m
|
||||
CONFIG_TEST_USER_COPY=m
|
||||
CONFIG_TEST_BPF=m
|
||||
|
|
|
@ -9,6 +9,7 @@ CONFIG_LOG_BUF_SHIFT=16
|
|||
# CONFIG_PID_NS is not set
|
||||
# CONFIG_NET_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_USERFAULTFD=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
|
@ -340,6 +341,7 @@ CONFIG_MACVTAP=m
|
|||
CONFIG_IPVLAN=m
|
||||
CONFIG_VXLAN=m
|
||||
CONFIG_GENEVE=m
|
||||
CONFIG_GTP=m
|
||||
CONFIG_MACSEC=m
|
||||
CONFIG_NETCONSOLE=m
|
||||
CONFIG_NETCONSOLE_DYNAMIC=y
|
||||
|
@ -504,7 +506,9 @@ CONFIG_TEST_STRING_HELPERS=m
|
|||
CONFIG_TEST_KSTRTOX=m
|
||||
CONFIG_TEST_PRINTF=m
|
||||
CONFIG_TEST_BITMAP=m
|
||||
CONFIG_TEST_UUID=m
|
||||
CONFIG_TEST_RHASHTABLE=m
|
||||
CONFIG_TEST_HASH=m
|
||||
CONFIG_TEST_LKM=m
|
||||
CONFIG_TEST_USER_COPY=m
|
||||
CONFIG_TEST_BPF=m
|
||||
|
|
|
@ -9,6 +9,7 @@ CONFIG_LOG_BUF_SHIFT=16
|
|||
# CONFIG_PID_NS is not set
|
||||
# CONFIG_NET_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_USERFAULTFD=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
|
@ -346,6 +347,7 @@ CONFIG_MACVTAP=m
|
|||
CONFIG_IPVLAN=m
|
||||
CONFIG_VXLAN=m
|
||||
CONFIG_GENEVE=m
|
||||
CONFIG_GTP=m
|
||||
CONFIG_MACSEC=m
|
||||
CONFIG_NETCONSOLE=m
|
||||
CONFIG_NETCONSOLE_DYNAMIC=y
|
||||
|
@ -527,7 +529,9 @@ CONFIG_TEST_STRING_HELPERS=m
|
|||
CONFIG_TEST_KSTRTOX=m
|
||||
CONFIG_TEST_PRINTF=m
|
||||
CONFIG_TEST_BITMAP=m
|
||||
CONFIG_TEST_UUID=m
|
||||
CONFIG_TEST_RHASHTABLE=m
|
||||
CONFIG_TEST_HASH=m
|
||||
CONFIG_TEST_LKM=m
|
||||
CONFIG_TEST_USER_COPY=m
|
||||
CONFIG_TEST_BPF=m
|
||||
|
|
|
@ -9,6 +9,7 @@ CONFIG_LOG_BUF_SHIFT=16
|
|||
# CONFIG_PID_NS is not set
|
||||
# CONFIG_NET_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_USERFAULTFD=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
|
@ -337,6 +338,7 @@ CONFIG_MACVTAP=m
|
|||
CONFIG_IPVLAN=m
|
||||
CONFIG_VXLAN=m
|
||||
CONFIG_GENEVE=m
|
||||
CONFIG_GTP=m
|
||||
CONFIG_MACSEC=m
|
||||
CONFIG_NETCONSOLE=m
|
||||
CONFIG_NETCONSOLE_DYNAMIC=y
|
||||
|
@ -506,7 +508,9 @@ CONFIG_TEST_STRING_HELPERS=m
|
|||
CONFIG_TEST_KSTRTOX=m
|
||||
CONFIG_TEST_PRINTF=m
|
||||
CONFIG_TEST_BITMAP=m
|
||||
CONFIG_TEST_UUID=m
|
||||
CONFIG_TEST_RHASHTABLE=m
|
||||
CONFIG_TEST_HASH=m
|
||||
CONFIG_TEST_LKM=m
|
||||
CONFIG_TEST_USER_COPY=m
|
||||
CONFIG_TEST_BPF=m
|
||||
|
|
|
@ -9,6 +9,7 @@ CONFIG_LOG_BUF_SHIFT=16
|
|||
# CONFIG_PID_NS is not set
|
||||
# CONFIG_NET_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_USERFAULTFD=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
|
@ -337,6 +338,7 @@ CONFIG_MACVTAP=m
|
|||
CONFIG_IPVLAN=m
|
||||
CONFIG_VXLAN=m
|
||||
CONFIG_GENEVE=m
|
||||
CONFIG_GTP=m
|
||||
CONFIG_MACSEC=m
|
||||
CONFIG_NETCONSOLE=m
|
||||
CONFIG_NETCONSOLE_DYNAMIC=y
|
||||
|
@ -506,7 +508,9 @@ CONFIG_TEST_STRING_HELPERS=m
|
|||
CONFIG_TEST_KSTRTOX=m
|
||||
CONFIG_TEST_PRINTF=m
|
||||
CONFIG_TEST_BITMAP=m
|
||||
CONFIG_TEST_UUID=m
|
||||
CONFIG_TEST_RHASHTABLE=m
|
||||
CONFIG_TEST_HASH=m
|
||||
CONFIG_TEST_LKM=m
|
||||
CONFIG_TEST_USER_COPY=m
|
||||
CONFIG_TEST_BPF=m
|
||||
|
|
|
@ -10191,7 +10191,7 @@ xdnrm_con:
|
|||
xdnrm_sd:
|
||||
mov.l %a1,-(%sp)
|
||||
tst.b LOCAL_EX(%a0) # is denorm pos or neg?
|
||||
smi.b %d1 # set d0 accodingly
|
||||
smi.b %d1 # set d0 accordingly
|
||||
bsr.l unf_sub
|
||||
mov.l (%sp)+,%a1
|
||||
xdnrm_exit:
|
||||
|
@ -10990,7 +10990,7 @@ src_qnan_m:
|
|||
# routines where an instruction is selected by an index into
|
||||
# a large jump table corresponding to a given instruction which
|
||||
# has been decoded. Flow continues here where we now decode
|
||||
# further accoding to the source operand type.
|
||||
# further according to the source operand type.
|
||||
#
|
||||
|
||||
global fsinh
|
||||
|
@ -23196,14 +23196,14 @@ m_sign:
|
|||
#
|
||||
# 1. Branch on the sign of the adjusted exponent.
|
||||
# 2p.(positive exp)
|
||||
# 2. Check M16 and the digits in lwords 2 and 3 in decending order.
|
||||
# 2. Check M16 and the digits in lwords 2 and 3 in descending order.
|
||||
# 3. Add one for each zero encountered until a non-zero digit.
|
||||
# 4. Subtract the count from the exp.
|
||||
# 5. Check if the exp has crossed zero in #3 above; make the exp abs
|
||||
# and set SE.
|
||||
# 6. Multiply the mantissa by 10**count.
|
||||
# 2n.(negative exp)
|
||||
# 2. Check the digits in lwords 3 and 2 in decending order.
|
||||
# 2. Check the digits in lwords 3 and 2 in descending order.
|
||||
# 3. Add one for each zero encountered until a non-zero digit.
|
||||
# 4. Add the count to the exp.
|
||||
# 5. Check if the exp has crossed zero in #3 above; clear SE.
|
||||
|
|
|
@ -13156,14 +13156,14 @@ m_sign:
|
|||
#
|
||||
# 1. Branch on the sign of the adjusted exponent.
|
||||
# 2p.(positive exp)
|
||||
# 2. Check M16 and the digits in lwords 2 and 3 in decending order.
|
||||
# 2. Check M16 and the digits in lwords 2 and 3 in descending order.
|
||||
# 3. Add one for each zero encountered until a non-zero digit.
|
||||
# 4. Subtract the count from the exp.
|
||||
# 5. Check if the exp has crossed zero in #3 above; make the exp abs
|
||||
# and set SE.
|
||||
# 6. Multiply the mantissa by 10**count.
|
||||
# 2n.(negative exp)
|
||||
# 2. Check the digits in lwords 3 and 2 in decending order.
|
||||
# 2. Check the digits in lwords 3 and 2 in descending order.
|
||||
# 3. Add one for each zero encountered until a non-zero digit.
|
||||
# 4. Add the count to the exp.
|
||||
# 5. Check if the exp has crossed zero in #3 above; clear SE.
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* AUG/22/2000 : added support for 32-bit Dual-Address-Mode (K) 2000
|
||||
* Oliver Kamphenkel (O.Kamphenkel@tu-bs.de)
|
||||
*
|
||||
* AUG/25/2000 : addad support for 8, 16 and 32-bit Single-Address-Mode (K)2000
|
||||
* AUG/25/2000 : added support for 8, 16 and 32-bit Single-Address-Mode (K)2000
|
||||
* Oliver Kamphenkel (O.Kamphenkel@tu-bs.de)
|
||||
*
|
||||
* APR/18/2002 : added proper support for MCF5272 DMA controller.
|
||||
|
|
|
@ -123,10 +123,10 @@
|
|||
/*
|
||||
* I2C module.
|
||||
*/
|
||||
#define MCFI2C_BASE0 (MCF_MBAR + 0x280) /* Base addreess I2C0 */
|
||||
#define MCFI2C_BASE0 (MCF_MBAR + 0x280) /* Base address I2C0 */
|
||||
#define MCFI2C_SIZE0 0x20 /* Register set size */
|
||||
|
||||
#define MCFI2C_BASE1 (MCF_MBAR2 + 0x440) /* Base addreess I2C1 */
|
||||
#define MCFI2C_BASE1 (MCF_MBAR2 + 0x440) /* Base address I2C1 */
|
||||
#define MCFI2C_SIZE1 0x20 /* Register set size */
|
||||
|
||||
/*
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
/*
|
||||
* MMU Operation register.
|
||||
*/
|
||||
#define MMUOR_UAA 0x00000001 /* Update allocatiom address */
|
||||
#define MMUOR_UAA 0x00000001 /* Update allocation address */
|
||||
#define MMUOR_ACC 0x00000002 /* TLB access */
|
||||
#define MMUOR_RD 0x00000004 /* TLB access read */
|
||||
#define MMUOR_WR 0x00000000 /* TLB access write */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Q40 master Chip Control
|
||||
* RTC stuff merged for compactnes..
|
||||
* RTC stuff merged for compactness.
|
||||
*/
|
||||
|
||||
#ifndef _Q40_MASTER_H
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
*
|
||||
* The host talks to the IOPs using a rather simple message-passing scheme via
|
||||
* a shared memory area in the IOP RAM. Each IOP has seven "channels"; each
|
||||
* channel is conneced to a specific software driver on the IOP. For example
|
||||
* channel is connected to a specific software driver on the IOP. For example
|
||||
* on the SCC IOP there is one channel for each serial port. Each channel has
|
||||
* an incoming and and outgoing message queue with a depth of one.
|
||||
*
|
||||
|
|
|
@ -130,7 +130,7 @@ do_fscc=0
|
|||
bfextu %d2{#13,#3},%d0
|
||||
.endm
|
||||
|
||||
| decode the 8bit diplacement from the brief extension word
|
||||
| decode the 8bit displacement from the brief extension word
|
||||
.macro fp_decode_disp8
|
||||
move.b %d2,%d0
|
||||
ext.w %d0
|
||||
|
|
|
@ -24,7 +24,7 @@ struct mm_struct;
|
|||
struct vm_area_struct;
|
||||
|
||||
#define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_NO_READ | \
|
||||
_CACHE_CACHABLE_NONCOHERENT)
|
||||
_page_cachable_default)
|
||||
#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_WRITE | \
|
||||
_page_cachable_default)
|
||||
#define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_NO_EXEC | \
|
||||
|
@ -476,7 +476,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
|
|||
pte.pte_low &= (_PAGE_MODIFIED | _PAGE_ACCESSED | _PFNX_MASK);
|
||||
pte.pte_high &= (_PFN_MASK | _CACHE_MASK);
|
||||
pte.pte_low |= pgprot_val(newprot) & ~_PFNX_MASK;
|
||||
pte.pte_high |= pgprot_val(newprot) & ~_PFN_MASK;
|
||||
pte.pte_high |= pgprot_val(newprot) & ~(_PFN_MASK | _CACHE_MASK);
|
||||
return pte;
|
||||
}
|
||||
#elif defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_CPU_MIPS32)
|
||||
|
@ -491,7 +491,8 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
|
|||
#else
|
||||
static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
|
||||
{
|
||||
return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot));
|
||||
return __pte((pte_val(pte) & _PAGE_CHG_MASK) |
|
||||
(pgprot_val(newprot) & ~_PAGE_CHG_MASK));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -632,7 +633,8 @@ static inline struct page *pmd_page(pmd_t pmd)
|
|||
|
||||
static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot)
|
||||
{
|
||||
pmd_val(pmd) = (pmd_val(pmd) & _PAGE_CHG_MASK) | pgprot_val(newprot);
|
||||
pmd_val(pmd) = (pmd_val(pmd) & (_PAGE_CHG_MASK | _PAGE_HUGE)) |
|
||||
(pgprot_val(newprot) & ~_PAGE_CHG_MASK);
|
||||
return pmd;
|
||||
}
|
||||
|
||||
|
|
|
@ -230,6 +230,7 @@ extern unsigned long __kernel_virt_size;
|
|||
#define KERN_VIRT_SIZE __kernel_virt_size
|
||||
extern struct page *vmemmap;
|
||||
extern unsigned long ioremap_bot;
|
||||
extern unsigned long pci_io_base;
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#include <asm/book3s/64/hash.h>
|
||||
|
|
|
@ -647,7 +647,7 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
|
|||
pci_unlock_rescan_remove();
|
||||
}
|
||||
} else if (frozen_bus) {
|
||||
eeh_pe_dev_traverse(pe, eeh_rmv_device, &rmv_data);
|
||||
eeh_pe_dev_traverse(pe, eeh_rmv_device, rmv_data);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -47,7 +47,6 @@ static int __init pcibios_init(void)
|
|||
|
||||
printk(KERN_INFO "PCI: Probing PCI hardware\n");
|
||||
|
||||
pci_io_base = ISA_IO_BASE;
|
||||
/* For now, override phys_mem_access_prot. If we need it,g
|
||||
* later, we may move that initialization to each ppc_md
|
||||
*/
|
||||
|
|
|
@ -1505,6 +1505,16 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
|
|||
current->thread.regs = regs - 1;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
||||
/*
|
||||
* Clear any transactional state, we're exec()ing. The cause is
|
||||
* not important as there will never be a recheckpoint so it's not
|
||||
* user visible.
|
||||
*/
|
||||
if (MSR_TM_SUSPENDED(mfmsr()))
|
||||
tm_reclaim_current(0);
|
||||
#endif
|
||||
|
||||
memset(regs->gpr, 0, sizeof(regs->gpr));
|
||||
regs->ctr = 0;
|
||||
regs->link = 0;
|
||||
|
|
|
@ -110,17 +110,11 @@ _GLOBAL(tm_reclaim)
|
|||
std r3, STK_PARAM(R3)(r1)
|
||||
SAVE_NVGPRS(r1)
|
||||
|
||||
/* We need to setup MSR for VSX register save instructions. Here we
|
||||
* also clear the MSR RI since when we do the treclaim, we won't have a
|
||||
* valid kernel pointer for a while. We clear RI here as it avoids
|
||||
* adding another mtmsr closer to the treclaim. This makes the region
|
||||
* maked as non-recoverable wider than it needs to be but it saves on
|
||||
* inserting another mtmsrd later.
|
||||
*/
|
||||
/* We need to setup MSR for VSX register save instructions. */
|
||||
mfmsr r14
|
||||
mr r15, r14
|
||||
ori r15, r15, MSR_FP
|
||||
li r16, MSR_RI
|
||||
li r16, 0
|
||||
ori r16, r16, MSR_EE /* IRQs hard off */
|
||||
andc r15, r15, r16
|
||||
oris r15, r15, MSR_VEC@h
|
||||
|
@ -176,7 +170,17 @@ dont_backup_fp:
|
|||
1: tdeqi r6, 0
|
||||
EMIT_BUG_ENTRY 1b,__FILE__,__LINE__,0
|
||||
|
||||
/* The moment we treclaim, ALL of our GPRs will switch
|
||||
/* Clear MSR RI since we are about to change r1, EE is already off. */
|
||||
li r4, 0
|
||||
mtmsrd r4, 1
|
||||
|
||||
/*
|
||||
* BE CAREFUL HERE:
|
||||
* At this point we can't take an SLB miss since we have MSR_RI
|
||||
* off. Load only to/from the stack/paca which are in SLB bolted regions
|
||||
* until we turn MSR RI back on.
|
||||
*
|
||||
* The moment we treclaim, ALL of our GPRs will switch
|
||||
* to user register state. (FPRs, CCR etc. also!)
|
||||
* Use an sprg and a tm_scratch in the PACA to shuffle.
|
||||
*/
|
||||
|
@ -197,6 +201,11 @@ dont_backup_fp:
|
|||
|
||||
/* Store the PPR in r11 and reset to decent value */
|
||||
std r11, GPR11(r1) /* Temporary stash */
|
||||
|
||||
/* Reset MSR RI so we can take SLB faults again */
|
||||
li r11, MSR_RI
|
||||
mtmsrd r11, 1
|
||||
|
||||
mfspr r11, SPRN_PPR
|
||||
HMT_MEDIUM
|
||||
|
||||
|
@ -397,11 +406,6 @@ restore_gprs:
|
|||
ld r5, THREAD_TM_DSCR(r3)
|
||||
ld r6, THREAD_TM_PPR(r3)
|
||||
|
||||
/* Clear the MSR RI since we are about to change R1. EE is already off
|
||||
*/
|
||||
li r4, 0
|
||||
mtmsrd r4, 1
|
||||
|
||||
REST_GPR(0, r7) /* GPR0 */
|
||||
REST_2GPRS(2, r7) /* GPR2-3 */
|
||||
REST_GPR(4, r7) /* GPR4 */
|
||||
|
@ -439,10 +443,33 @@ restore_gprs:
|
|||
ld r6, _CCR(r7)
|
||||
mtcr r6
|
||||
|
||||
REST_GPR(1, r7) /* GPR1 */
|
||||
REST_GPR(5, r7) /* GPR5-7 */
|
||||
REST_GPR(6, r7)
|
||||
ld r7, GPR7(r7)
|
||||
|
||||
/*
|
||||
* Store r1 and r5 on the stack so that we can access them
|
||||
* after we clear MSR RI.
|
||||
*/
|
||||
|
||||
REST_GPR(5, r7)
|
||||
std r5, -8(r1)
|
||||
ld r5, GPR1(r7)
|
||||
std r5, -16(r1)
|
||||
|
||||
REST_GPR(7, r7)
|
||||
|
||||
/* Clear MSR RI since we are about to change r1. EE is already off */
|
||||
li r5, 0
|
||||
mtmsrd r5, 1
|
||||
|
||||
/*
|
||||
* BE CAREFUL HERE:
|
||||
* At this point we can't take an SLB miss since we have MSR_RI
|
||||
* off. Load only to/from the stack/paca which are in SLB bolted regions
|
||||
* until we turn MSR RI back on.
|
||||
*/
|
||||
|
||||
ld r5, -8(r1)
|
||||
ld r1, -16(r1)
|
||||
|
||||
/* Commit register state as checkpointed state: */
|
||||
TRECHKPT
|
||||
|
|
|
@ -922,6 +922,10 @@ void __init hash__early_init_mmu(void)
|
|||
vmemmap = (struct page *)H_VMEMMAP_BASE;
|
||||
ioremap_bot = IOREMAP_BASE;
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
pci_io_base = ISA_IO_BASE;
|
||||
#endif
|
||||
|
||||
/* Initialize the MMU Hash table and create the linear mapping
|
||||
* of memory. Has to be done before SLB initialization as this is
|
||||
* currently where the page size encoding is obtained.
|
||||
|
|
|
@ -328,6 +328,11 @@ void __init radix__early_init_mmu(void)
|
|||
__vmalloc_end = RADIX_VMALLOC_END;
|
||||
vmemmap = (struct page *)RADIX_VMEMMAP_BASE;
|
||||
ioremap_bot = IOREMAP_BASE;
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
pci_io_base = ISA_IO_BASE;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* For now radix also use the same frag size
|
||||
*/
|
||||
|
|
|
@ -22,7 +22,7 @@ static inline int test_fp_ctl(u32 fpc)
|
|||
" la %0,0\n"
|
||||
"1:\n"
|
||||
EX_TABLE(0b,1b)
|
||||
: "=d" (rc), "=d" (orig_fpc)
|
||||
: "=d" (rc), "=&d" (orig_fpc)
|
||||
: "d" (fpc), "0" (-EINVAL));
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -2064,12 +2064,5 @@ void s390_reset_system(void)
|
|||
S390_lowcore.program_new_psw.addr =
|
||||
(unsigned long) s390_base_pgm_handler;
|
||||
|
||||
/*
|
||||
* Clear subchannel ID and number to signal new kernel that no CCW or
|
||||
* SCSI IPL has been done (for kexec and kdump)
|
||||
*/
|
||||
S390_lowcore.subchannel_id = 0;
|
||||
S390_lowcore.subchannel_nr = 0;
|
||||
|
||||
do_reset_calls();
|
||||
}
|
||||
|
|
|
@ -263,7 +263,7 @@ static bool check_hw_exists(void)
|
|||
|
||||
msr_fail:
|
||||
pr_cont("Broken PMU hardware detected, using software events only.\n");
|
||||
pr_info("%sFailed to access perfctr msr (MSR %x is %Lx)\n",
|
||||
printk("%sFailed to access perfctr msr (MSR %x is %Lx)\n",
|
||||
boot_cpu_has(X86_FEATURE_HYPERVISOR) ? KERN_INFO : KERN_ERR,
|
||||
reg, val_new);
|
||||
|
||||
|
@ -2319,7 +2319,7 @@ void
|
|||
perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs)
|
||||
{
|
||||
struct stack_frame frame;
|
||||
const void __user *fp;
|
||||
const unsigned long __user *fp;
|
||||
|
||||
if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
|
||||
/* TODO: We don't support guest os callchain now */
|
||||
|
@ -2332,7 +2332,7 @@ perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs
|
|||
if (regs->flags & (X86_VM_MASK | PERF_EFLAGS_VM))
|
||||
return;
|
||||
|
||||
fp = (void __user *)regs->bp;
|
||||
fp = (unsigned long __user *)regs->bp;
|
||||
|
||||
perf_callchain_store(entry, regs->ip);
|
||||
|
||||
|
@ -2345,16 +2345,17 @@ perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs
|
|||
pagefault_disable();
|
||||
while (entry->nr < entry->max_stack) {
|
||||
unsigned long bytes;
|
||||
|
||||
frame.next_frame = NULL;
|
||||
frame.return_address = 0;
|
||||
|
||||
if (!access_ok(VERIFY_READ, fp, 16))
|
||||
if (!access_ok(VERIFY_READ, fp, sizeof(*fp) * 2))
|
||||
break;
|
||||
|
||||
bytes = __copy_from_user_nmi(&frame.next_frame, fp, 8);
|
||||
bytes = __copy_from_user_nmi(&frame.next_frame, fp, sizeof(*fp));
|
||||
if (bytes != 0)
|
||||
break;
|
||||
bytes = __copy_from_user_nmi(&frame.return_address, fp+8, 8);
|
||||
bytes = __copy_from_user_nmi(&frame.return_address, fp + 1, sizeof(*fp));
|
||||
if (bytes != 0)
|
||||
break;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
obj-$(CONFIG_CPU_SUP_INTEL) += core.o bts.o cqm.o
|
||||
obj-$(CONFIG_CPU_SUP_INTEL) += ds.o knc.o
|
||||
obj-$(CONFIG_CPU_SUP_INTEL) += lbr.o p4.o p6.o pt.o
|
||||
obj-$(CONFIG_PERF_EVENTS_INTEL_RAPL) += intel-rapl.o
|
||||
intel-rapl-objs := rapl.o
|
||||
obj-$(CONFIG_PERF_EVENTS_INTEL_RAPL) += intel-rapl-perf.o
|
||||
intel-rapl-perf-objs := rapl.o
|
||||
obj-$(CONFIG_PERF_EVENTS_INTEL_UNCORE) += intel-uncore.o
|
||||
intel-uncore-objs := uncore.o uncore_nhmex.o uncore_snb.o uncore_snbep.o
|
||||
obj-$(CONFIG_PERF_EVENTS_INTEL_CSTATE) += intel-cstate.o
|
||||
|
|
|
@ -115,6 +115,10 @@ static struct event_constraint intel_snb_event_constraints[] __read_mostly =
|
|||
INTEL_UEVENT_CONSTRAINT(0x04a3, 0xf), /* CYCLE_ACTIVITY.CYCLES_NO_DISPATCH */
|
||||
INTEL_UEVENT_CONSTRAINT(0x02a3, 0x4), /* CYCLE_ACTIVITY.CYCLES_L1D_PENDING */
|
||||
|
||||
/*
|
||||
* When HT is off these events can only run on the bottom 4 counters
|
||||
* When HT is on, they are impacted by the HT bug and require EXCL access
|
||||
*/
|
||||
INTEL_EXCLEVT_CONSTRAINT(0xd0, 0xf), /* MEM_UOPS_RETIRED.* */
|
||||
INTEL_EXCLEVT_CONSTRAINT(0xd1, 0xf), /* MEM_LOAD_UOPS_RETIRED.* */
|
||||
INTEL_EXCLEVT_CONSTRAINT(0xd2, 0xf), /* MEM_LOAD_UOPS_LLC_HIT_RETIRED.* */
|
||||
|
@ -139,6 +143,10 @@ static struct event_constraint intel_ivb_event_constraints[] __read_mostly =
|
|||
INTEL_UEVENT_CONSTRAINT(0x0ca3, 0x4), /* CYCLE_ACTIVITY.STALLS_L1D_PENDING */
|
||||
INTEL_UEVENT_CONSTRAINT(0x01c0, 0x2), /* INST_RETIRED.PREC_DIST */
|
||||
|
||||
/*
|
||||
* When HT is off these events can only run on the bottom 4 counters
|
||||
* When HT is on, they are impacted by the HT bug and require EXCL access
|
||||
*/
|
||||
INTEL_EXCLEVT_CONSTRAINT(0xd0, 0xf), /* MEM_UOPS_RETIRED.* */
|
||||
INTEL_EXCLEVT_CONSTRAINT(0xd1, 0xf), /* MEM_LOAD_UOPS_RETIRED.* */
|
||||
INTEL_EXCLEVT_CONSTRAINT(0xd2, 0xf), /* MEM_LOAD_UOPS_LLC_HIT_RETIRED.* */
|
||||
|
@ -182,6 +190,16 @@ struct event_constraint intel_skl_event_constraints[] = {
|
|||
FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */
|
||||
FIXED_EVENT_CONSTRAINT(0x0300, 2), /* CPU_CLK_UNHALTED.REF */
|
||||
INTEL_UEVENT_CONSTRAINT(0x1c0, 0x2), /* INST_RETIRED.PREC_DIST */
|
||||
|
||||
/*
|
||||
* when HT is off, these can only run on the bottom 4 counters
|
||||
*/
|
||||
INTEL_EVENT_CONSTRAINT(0xd0, 0xf), /* MEM_INST_RETIRED.* */
|
||||
INTEL_EVENT_CONSTRAINT(0xd1, 0xf), /* MEM_LOAD_RETIRED.* */
|
||||
INTEL_EVENT_CONSTRAINT(0xd2, 0xf), /* MEM_LOAD_L3_HIT_RETIRED.* */
|
||||
INTEL_EVENT_CONSTRAINT(0xcd, 0xf), /* MEM_TRANS_RETIRED.* */
|
||||
INTEL_EVENT_CONSTRAINT(0xc6, 0xf), /* FRONTEND_RETIRED.* */
|
||||
|
||||
EVENT_CONSTRAINT_END
|
||||
};
|
||||
|
||||
|
@ -250,6 +268,10 @@ static struct event_constraint intel_hsw_event_constraints[] = {
|
|||
/* CYCLE_ACTIVITY.CYCLES_NO_EXECUTE */
|
||||
INTEL_UEVENT_CONSTRAINT(0x04a3, 0xf),
|
||||
|
||||
/*
|
||||
* When HT is off these events can only run on the bottom 4 counters
|
||||
* When HT is on, they are impacted by the HT bug and require EXCL access
|
||||
*/
|
||||
INTEL_EXCLEVT_CONSTRAINT(0xd0, 0xf), /* MEM_UOPS_RETIRED.* */
|
||||
INTEL_EXCLEVT_CONSTRAINT(0xd1, 0xf), /* MEM_LOAD_UOPS_RETIRED.* */
|
||||
INTEL_EXCLEVT_CONSTRAINT(0xd2, 0xf), /* MEM_LOAD_UOPS_LLC_HIT_RETIRED.* */
|
||||
|
@ -264,6 +286,13 @@ struct event_constraint intel_bdw_event_constraints[] = {
|
|||
FIXED_EVENT_CONSTRAINT(0x0300, 2), /* CPU_CLK_UNHALTED.REF */
|
||||
INTEL_UEVENT_CONSTRAINT(0x148, 0x4), /* L1D_PEND_MISS.PENDING */
|
||||
INTEL_UBIT_EVENT_CONSTRAINT(0x8a3, 0x4), /* CYCLE_ACTIVITY.CYCLES_L1D_MISS */
|
||||
/*
|
||||
* when HT is off, these can only run on the bottom 4 counters
|
||||
*/
|
||||
INTEL_EVENT_CONSTRAINT(0xd0, 0xf), /* MEM_INST_RETIRED.* */
|
||||
INTEL_EVENT_CONSTRAINT(0xd1, 0xf), /* MEM_LOAD_RETIRED.* */
|
||||
INTEL_EVENT_CONSTRAINT(0xd2, 0xf), /* MEM_LOAD_L3_HIT_RETIRED.* */
|
||||
INTEL_EVENT_CONSTRAINT(0xcd, 0xf), /* MEM_TRANS_RETIRED.* */
|
||||
EVENT_CONSTRAINT_END
|
||||
};
|
||||
|
||||
|
|
|
@ -301,10 +301,6 @@
|
|||
#define X86_BUG_FXSAVE_LEAK X86_BUG(6) /* FXSAVE leaks FOP/FIP/FOP */
|
||||
#define X86_BUG_CLFLUSH_MONITOR X86_BUG(7) /* AAI65, CLFLUSH required before MONITOR */
|
||||
#define X86_BUG_SYSRET_SS_ATTRS X86_BUG(8) /* SYSRET doesn't fix up SS attrs */
|
||||
#define X86_BUG_NULL_SEG X86_BUG(9) /* Nulling a selector preserves the base */
|
||||
#define X86_BUG_SWAPGS_FENCE X86_BUG(10) /* SWAPGS without input dep on GS */
|
||||
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
/*
|
||||
* 64-bit kernels don't use X86_BUG_ESPFIX. Make the define conditional
|
||||
|
@ -312,5 +308,7 @@
|
|||
*/
|
||||
#define X86_BUG_ESPFIX X86_BUG(9) /* "" IRET to 16-bit SS corrupts ESP/RSP high bits */
|
||||
#endif
|
||||
#define X86_BUG_NULL_SEG X86_BUG(10) /* Nulling a selector preserves the base */
|
||||
#define X86_BUG_SWAPGS_FENCE X86_BUG(11) /* SWAPGS without input dep on GS */
|
||||
|
||||
#endif /* _ASM_X86_CPUFEATURES_H */
|
||||
|
|
|
@ -68,30 +68,23 @@ static inline u64 pvclock_scale_delta(u64 delta, u32 mul_frac, int shift)
|
|||
return product;
|
||||
}
|
||||
|
||||
static __always_inline
|
||||
u64 pvclock_get_nsec_offset(const struct pvclock_vcpu_time_info *src)
|
||||
{
|
||||
u64 delta = rdtsc_ordered() - src->tsc_timestamp;
|
||||
return pvclock_scale_delta(delta, src->tsc_to_system_mul,
|
||||
src->tsc_shift);
|
||||
}
|
||||
|
||||
static __always_inline
|
||||
unsigned __pvclock_read_cycles(const struct pvclock_vcpu_time_info *src,
|
||||
cycle_t *cycles, u8 *flags)
|
||||
{
|
||||
unsigned version;
|
||||
cycle_t ret, offset;
|
||||
u8 ret_flags;
|
||||
cycle_t offset;
|
||||
u64 delta;
|
||||
|
||||
version = src->version;
|
||||
/* Make the latest version visible */
|
||||
smp_rmb();
|
||||
|
||||
offset = pvclock_get_nsec_offset(src);
|
||||
ret = src->system_time + offset;
|
||||
ret_flags = src->flags;
|
||||
|
||||
*cycles = ret;
|
||||
*flags = ret_flags;
|
||||
delta = rdtsc_ordered() - src->tsc_timestamp;
|
||||
offset = pvclock_scale_delta(delta, src->tsc_to_system_mul,
|
||||
src->tsc_shift);
|
||||
*cycles = src->system_time + offset;
|
||||
*flags = src->flags;
|
||||
return version;
|
||||
}
|
||||
|
||||
|
|
|
@ -71,8 +71,8 @@ int amd_cache_northbridges(void)
|
|||
while ((misc = next_northbridge(misc, amd_nb_misc_ids)) != NULL)
|
||||
i++;
|
||||
|
||||
if (i == 0)
|
||||
return 0;
|
||||
if (!i)
|
||||
return -ENODEV;
|
||||
|
||||
nb = kzalloc(i * sizeof(struct amd_northbridge), GFP_KERNEL);
|
||||
if (!nb)
|
||||
|
|
|
@ -11,7 +11,11 @@
|
|||
|
||||
#include <linux/pci.h>
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/pci_ids.h>
|
||||
#include <linux/bcma/bcma.h>
|
||||
#include <linux/bcma/bcma_regs.h>
|
||||
#include <drm/i915_drm.h>
|
||||
#include <asm/pci-direct.h>
|
||||
#include <asm/dma.h>
|
||||
|
@ -21,6 +25,9 @@
|
|||
#include <asm/iommu.h>
|
||||
#include <asm/gart.h>
|
||||
#include <asm/irq_remapping.h>
|
||||
#include <asm/early_ioremap.h>
|
||||
|
||||
#define dev_err(msg) pr_err("pci 0000:%02x:%02x.%d: %s", bus, slot, func, msg)
|
||||
|
||||
static void __init fix_hypertransport_config(int num, int slot, int func)
|
||||
{
|
||||
|
@ -75,6 +82,13 @@ static void __init nvidia_bugs(int num, int slot, int func)
|
|||
{
|
||||
#ifdef CONFIG_ACPI
|
||||
#ifdef CONFIG_X86_IO_APIC
|
||||
/*
|
||||
* Only applies to Nvidia root ports (bus 0) and not to
|
||||
* Nvidia graphics cards with PCI ports on secondary buses.
|
||||
*/
|
||||
if (num)
|
||||
return;
|
||||
|
||||
/*
|
||||
* All timer overrides on Nvidia are
|
||||
* wrong unless HPET is enabled.
|
||||
|
@ -574,6 +588,61 @@ static void __init force_disable_hpet(int num, int slot, int func)
|
|||
#endif
|
||||
}
|
||||
|
||||
#define BCM4331_MMIO_SIZE 16384
|
||||
#define BCM4331_PM_CAP 0x40
|
||||
#define bcma_aread32(reg) ioread32(mmio + 1 * BCMA_CORE_SIZE + reg)
|
||||
#define bcma_awrite32(reg, val) iowrite32(val, mmio + 1 * BCMA_CORE_SIZE + reg)
|
||||
|
||||
static void __init apple_airport_reset(int bus, int slot, int func)
|
||||
{
|
||||
void __iomem *mmio;
|
||||
u16 pmcsr;
|
||||
u64 addr;
|
||||
int i;
|
||||
|
||||
if (!dmi_match(DMI_SYS_VENDOR, "Apple Inc."))
|
||||
return;
|
||||
|
||||
/* Card may have been put into PCI_D3hot by grub quirk */
|
||||
pmcsr = read_pci_config_16(bus, slot, func, BCM4331_PM_CAP + PCI_PM_CTRL);
|
||||
|
||||
if ((pmcsr & PCI_PM_CTRL_STATE_MASK) != PCI_D0) {
|
||||
pmcsr &= ~PCI_PM_CTRL_STATE_MASK;
|
||||
write_pci_config_16(bus, slot, func, BCM4331_PM_CAP + PCI_PM_CTRL, pmcsr);
|
||||
mdelay(10);
|
||||
|
||||
pmcsr = read_pci_config_16(bus, slot, func, BCM4331_PM_CAP + PCI_PM_CTRL);
|
||||
if ((pmcsr & PCI_PM_CTRL_STATE_MASK) != PCI_D0) {
|
||||
dev_err("Cannot power up Apple AirPort card\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
addr = read_pci_config(bus, slot, func, PCI_BASE_ADDRESS_0);
|
||||
addr |= (u64)read_pci_config(bus, slot, func, PCI_BASE_ADDRESS_1) << 32;
|
||||
addr &= PCI_BASE_ADDRESS_MEM_MASK;
|
||||
|
||||
mmio = early_ioremap(addr, BCM4331_MMIO_SIZE);
|
||||
if (!mmio) {
|
||||
dev_err("Cannot iomap Apple AirPort card\n");
|
||||
return;
|
||||
}
|
||||
|
||||
pr_info("Resetting Apple AirPort card (left enabled by EFI)\n");
|
||||
|
||||
for (i = 0; bcma_aread32(BCMA_RESET_ST) && i < 30; i++)
|
||||
udelay(10);
|
||||
|
||||
bcma_awrite32(BCMA_RESET_CTL, BCMA_RESET_CTL_RESET);
|
||||
bcma_aread32(BCMA_RESET_CTL);
|
||||
udelay(1);
|
||||
|
||||
bcma_awrite32(BCMA_RESET_CTL, 0);
|
||||
bcma_aread32(BCMA_RESET_CTL);
|
||||
udelay(10);
|
||||
|
||||
early_iounmap(mmio, BCM4331_MMIO_SIZE);
|
||||
}
|
||||
|
||||
#define QFLAG_APPLY_ONCE 0x1
|
||||
#define QFLAG_APPLIED 0x2
|
||||
|
@ -587,12 +656,6 @@ struct chipset {
|
|||
void (*f)(int num, int slot, int func);
|
||||
};
|
||||
|
||||
/*
|
||||
* Only works for devices on the root bus. If you add any devices
|
||||
* not on bus 0 readd another loop level in early_quirks(). But
|
||||
* be careful because at least the Nvidia quirk here relies on
|
||||
* only matching on bus 0.
|
||||
*/
|
||||
static struct chipset early_qrk[] __initdata = {
|
||||
{ PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID,
|
||||
PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, nvidia_bugs },
|
||||
|
@ -622,9 +685,13 @@ static struct chipset early_qrk[] __initdata = {
|
|||
*/
|
||||
{ PCI_VENDOR_ID_INTEL, 0x0f00,
|
||||
PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet},
|
||||
{ PCI_VENDOR_ID_BROADCOM, 0x4331,
|
||||
PCI_CLASS_NETWORK_OTHER, PCI_ANY_ID, 0, apple_airport_reset},
|
||||
{}
|
||||
};
|
||||
|
||||
static void __init early_pci_scan_bus(int bus);
|
||||
|
||||
/**
|
||||
* check_dev_quirk - apply early quirks to a given PCI device
|
||||
* @num: bus number
|
||||
|
@ -633,7 +700,7 @@ static struct chipset early_qrk[] __initdata = {
|
|||
*
|
||||
* Check the vendor & device ID against the early quirks table.
|
||||
*
|
||||
* If the device is single function, let early_quirks() know so we don't
|
||||
* If the device is single function, let early_pci_scan_bus() know so we don't
|
||||
* poke at this device again.
|
||||
*/
|
||||
static int __init check_dev_quirk(int num, int slot, int func)
|
||||
|
@ -642,6 +709,7 @@ static int __init check_dev_quirk(int num, int slot, int func)
|
|||
u16 vendor;
|
||||
u16 device;
|
||||
u8 type;
|
||||
u8 sec;
|
||||
int i;
|
||||
|
||||
class = read_pci_config_16(num, slot, func, PCI_CLASS_DEVICE);
|
||||
|
@ -669,25 +737,36 @@ static int __init check_dev_quirk(int num, int slot, int func)
|
|||
|
||||
type = read_pci_config_byte(num, slot, func,
|
||||
PCI_HEADER_TYPE);
|
||||
|
||||
if ((type & 0x7f) == PCI_HEADER_TYPE_BRIDGE) {
|
||||
sec = read_pci_config_byte(num, slot, func, PCI_SECONDARY_BUS);
|
||||
if (sec > num)
|
||||
early_pci_scan_bus(sec);
|
||||
}
|
||||
|
||||
if (!(type & 0x80))
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __init early_quirks(void)
|
||||
static void __init early_pci_scan_bus(int bus)
|
||||
{
|
||||
int slot, func;
|
||||
|
||||
if (!early_pci_allowed())
|
||||
return;
|
||||
|
||||
/* Poor man's PCI discovery */
|
||||
/* Only scan the root bus */
|
||||
for (slot = 0; slot < 32; slot++)
|
||||
for (func = 0; func < 8; func++) {
|
||||
/* Only probe function 0 on single fn devices */
|
||||
if (check_dev_quirk(0, slot, func))
|
||||
if (check_dev_quirk(bus, slot, func))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void __init early_quirks(void)
|
||||
{
|
||||
if (!early_pci_allowed())
|
||||
return;
|
||||
|
||||
early_pci_scan_bus(0);
|
||||
}
|
||||
|
|
|
@ -61,11 +61,16 @@ void pvclock_resume(void)
|
|||
u8 pvclock_read_flags(struct pvclock_vcpu_time_info *src)
|
||||
{
|
||||
unsigned version;
|
||||
cycle_t ret;
|
||||
u8 flags;
|
||||
|
||||
do {
|
||||
version = __pvclock_read_cycles(src, &ret, &flags);
|
||||
version = src->version;
|
||||
/* Make the latest version visible */
|
||||
smp_rmb();
|
||||
|
||||
flags = src->flags;
|
||||
/* Make sure that the version double-check is last. */
|
||||
smp_rmb();
|
||||
} while ((src->version & 1) || version != src->version);
|
||||
|
||||
return flags & valid_flags;
|
||||
|
@ -80,6 +85,8 @@ cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src)
|
|||
|
||||
do {
|
||||
version = __pvclock_read_cycles(src, &ret, &flags);
|
||||
/* Make sure that the version double-check is last. */
|
||||
smp_rmb();
|
||||
} while ((src->version & 1) || version != src->version);
|
||||
|
||||
if (unlikely((flags & PVCLOCK_GUEST_STOPPED) != 0)) {
|
||||
|
|
|
@ -1310,7 +1310,8 @@ void wait_lapic_expire(struct kvm_vcpu *vcpu)
|
|||
|
||||
/* __delay is delay_tsc whenever the hardware has TSC, thus always. */
|
||||
if (guest_tsc < tsc_deadline)
|
||||
__delay(tsc_deadline - guest_tsc);
|
||||
__delay(min(tsc_deadline - guest_tsc,
|
||||
nsec_to_cycles(vcpu, lapic_timer_advance_ns)));
|
||||
}
|
||||
|
||||
static void start_apic_timer(struct kvm_lapic *apic)
|
||||
|
|
|
@ -6671,7 +6671,13 @@ static int get_vmx_mem_address(struct kvm_vcpu *vcpu,
|
|||
|
||||
/* Checks for #GP/#SS exceptions. */
|
||||
exn = false;
|
||||
if (is_protmode(vcpu)) {
|
||||
if (is_long_mode(vcpu)) {
|
||||
/* Long mode: #GP(0)/#SS(0) if the memory address is in a
|
||||
* non-canonical form. This is the only check on the memory
|
||||
* destination for long mode!
|
||||
*/
|
||||
exn = is_noncanonical_address(*ret);
|
||||
} else if (is_protmode(vcpu)) {
|
||||
/* Protected mode: apply checks for segment validity in the
|
||||
* following order:
|
||||
* - segment type check (#GP(0) may be thrown)
|
||||
|
@ -6688,17 +6694,10 @@ static int get_vmx_mem_address(struct kvm_vcpu *vcpu,
|
|||
* execute-only code segment
|
||||
*/
|
||||
exn = ((s.type & 0xa) == 8);
|
||||
}
|
||||
if (exn) {
|
||||
kvm_queue_exception_e(vcpu, GP_VECTOR, 0);
|
||||
return 1;
|
||||
}
|
||||
if (is_long_mode(vcpu)) {
|
||||
/* Long mode: #GP(0)/#SS(0) if the memory address is in a
|
||||
* non-canonical form. This is an only check for long mode.
|
||||
*/
|
||||
exn = is_noncanonical_address(*ret);
|
||||
} else if (is_protmode(vcpu)) {
|
||||
if (exn) {
|
||||
kvm_queue_exception_e(vcpu, GP_VECTOR, 0);
|
||||
return 1;
|
||||
}
|
||||
/* Protected mode: #GP(0)/#SS(0) if the segment is unusable.
|
||||
*/
|
||||
exn = (s.unusable != 0);
|
||||
|
|
|
@ -1244,12 +1244,6 @@ static atomic_t kvm_guest_has_master_clock = ATOMIC_INIT(0);
|
|||
static DEFINE_PER_CPU(unsigned long, cpu_tsc_khz);
|
||||
static unsigned long max_tsc_khz;
|
||||
|
||||
static inline u64 nsec_to_cycles(struct kvm_vcpu *vcpu, u64 nsec)
|
||||
{
|
||||
return pvclock_scale_delta(nsec, vcpu->arch.virtual_tsc_mult,
|
||||
vcpu->arch.virtual_tsc_shift);
|
||||
}
|
||||
|
||||
static u32 adjust_tsc_khz(u32 khz, s32 ppm)
|
||||
{
|
||||
u64 v = (u64)khz * (1000000 + ppm);
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define ARCH_X86_KVM_X86_H
|
||||
|
||||
#include <linux/kvm_host.h>
|
||||
#include <asm/pvclock.h>
|
||||
#include "kvm_cache_regs.h"
|
||||
|
||||
#define MSR_IA32_CR_PAT_DEFAULT 0x0007040600070406ULL
|
||||
|
@ -195,6 +196,12 @@ extern unsigned int lapic_timer_advance_ns;
|
|||
|
||||
extern struct static_key kvm_no_apic_vcpu;
|
||||
|
||||
static inline u64 nsec_to_cycles(struct kvm_vcpu *vcpu, u64 nsec)
|
||||
{
|
||||
return pvclock_scale_delta(nsec, vcpu->arch.virtual_tsc_mult,
|
||||
vcpu->arch.virtual_tsc_shift);
|
||||
}
|
||||
|
||||
/* Same "calling convention" as do_div:
|
||||
* - divide (n << 32) by base
|
||||
* - put result in n
|
||||
|
|
|
@ -54,8 +54,8 @@ static int kasan_die_handler(struct notifier_block *self,
|
|||
void *data)
|
||||
{
|
||||
if (val == DIE_GPF) {
|
||||
pr_emerg("CONFIG_KASAN_INLINE enabled");
|
||||
pr_emerg("GPF could be caused by NULL-ptr deref or user memory access");
|
||||
pr_emerg("CONFIG_KASAN_INLINE enabled\n");
|
||||
pr_emerg("GPF could be caused by NULL-ptr deref or user memory access\n");
|
||||
}
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
|
|
@ -396,6 +396,7 @@ int __init pci_acpi_init(void)
|
|||
return -ENODEV;
|
||||
|
||||
printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n");
|
||||
acpi_irq_penalty_init();
|
||||
pcibios_enable_irq = acpi_pci_irq_enable;
|
||||
pcibios_disable_irq = acpi_pci_irq_disable;
|
||||
x86_init.pci.init_irq = x86_init_noop;
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <asm/mtrr.h>
|
||||
#include <asm/sections.h>
|
||||
#include <asm/suspend.h>
|
||||
#include <asm/tlbflush.h>
|
||||
|
||||
/* Defined in hibernate_asm_64.S */
|
||||
extern asmlinkage __visible int restore_image(void);
|
||||
|
@ -28,6 +29,7 @@ extern asmlinkage __visible int restore_image(void);
|
|||
* kernel's text (this value is passed in the image header).
|
||||
*/
|
||||
unsigned long restore_jump_address __visible;
|
||||
unsigned long jump_address_phys;
|
||||
|
||||
/*
|
||||
* Value of the cr3 register from before the hibernation (this value is passed
|
||||
|
@ -37,7 +39,43 @@ unsigned long restore_cr3 __visible;
|
|||
|
||||
pgd_t *temp_level4_pgt __visible;
|
||||
|
||||
void *relocated_restore_code __visible;
|
||||
unsigned long relocated_restore_code __visible;
|
||||
|
||||
static int set_up_temporary_text_mapping(void)
|
||||
{
|
||||
pmd_t *pmd;
|
||||
pud_t *pud;
|
||||
|
||||
/*
|
||||
* The new mapping only has to cover the page containing the image
|
||||
* kernel's entry point (jump_address_phys), because the switch over to
|
||||
* it is carried out by relocated code running from a page allocated
|
||||
* specifically for this purpose and covered by the identity mapping, so
|
||||
* the temporary kernel text mapping is only needed for the final jump.
|
||||
* Moreover, in that mapping the virtual address of the image kernel's
|
||||
* entry point must be the same as its virtual address in the image
|
||||
* kernel (restore_jump_address), so the image kernel's
|
||||
* restore_registers() code doesn't find itself in a different area of
|
||||
* the virtual address space after switching over to the original page
|
||||
* tables used by the image kernel.
|
||||
*/
|
||||
pud = (pud_t *)get_safe_page(GFP_ATOMIC);
|
||||
if (!pud)
|
||||
return -ENOMEM;
|
||||
|
||||
pmd = (pmd_t *)get_safe_page(GFP_ATOMIC);
|
||||
if (!pmd)
|
||||
return -ENOMEM;
|
||||
|
||||
set_pmd(pmd + pmd_index(restore_jump_address),
|
||||
__pmd((jump_address_phys & PMD_MASK) | __PAGE_KERNEL_LARGE_EXEC));
|
||||
set_pud(pud + pud_index(restore_jump_address),
|
||||
__pud(__pa(pmd) | _KERNPG_TABLE));
|
||||
set_pgd(temp_level4_pgt + pgd_index(restore_jump_address),
|
||||
__pgd(__pa(pud) | _KERNPG_TABLE));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void *alloc_pgt_page(void *context)
|
||||
{
|
||||
|
@ -59,9 +97,10 @@ static int set_up_temporary_mappings(void)
|
|||
if (!temp_level4_pgt)
|
||||
return -ENOMEM;
|
||||
|
||||
/* It is safe to reuse the original kernel mapping */
|
||||
set_pgd(temp_level4_pgt + pgd_index(__START_KERNEL_map),
|
||||
init_level4_pgt[pgd_index(__START_KERNEL_map)]);
|
||||
/* Prepare a temporary mapping for the kernel text */
|
||||
result = set_up_temporary_text_mapping();
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
/* Set up the direct mapping from scratch */
|
||||
for (i = 0; i < nr_pfn_mapped; i++) {
|
||||
|
@ -78,19 +117,50 @@ static int set_up_temporary_mappings(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int relocate_restore_code(void)
|
||||
{
|
||||
pgd_t *pgd;
|
||||
pud_t *pud;
|
||||
|
||||
relocated_restore_code = get_safe_page(GFP_ATOMIC);
|
||||
if (!relocated_restore_code)
|
||||
return -ENOMEM;
|
||||
|
||||
memcpy((void *)relocated_restore_code, &core_restore_code, PAGE_SIZE);
|
||||
|
||||
/* Make the page containing the relocated code executable */
|
||||
pgd = (pgd_t *)__va(read_cr3()) + pgd_index(relocated_restore_code);
|
||||
pud = pud_offset(pgd, relocated_restore_code);
|
||||
if (pud_large(*pud)) {
|
||||
set_pud(pud, __pud(pud_val(*pud) & ~_PAGE_NX));
|
||||
} else {
|
||||
pmd_t *pmd = pmd_offset(pud, relocated_restore_code);
|
||||
|
||||
if (pmd_large(*pmd)) {
|
||||
set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_NX));
|
||||
} else {
|
||||
pte_t *pte = pte_offset_kernel(pmd, relocated_restore_code);
|
||||
|
||||
set_pte(pte, __pte(pte_val(*pte) & ~_PAGE_NX));
|
||||
}
|
||||
}
|
||||
__flush_tlb_all();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int swsusp_arch_resume(void)
|
||||
{
|
||||
int error;
|
||||
|
||||
/* We have got enough memory and from now on we cannot recover */
|
||||
if ((error = set_up_temporary_mappings()))
|
||||
error = set_up_temporary_mappings();
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
relocated_restore_code = (void *)get_safe_page(GFP_ATOMIC);
|
||||
if (!relocated_restore_code)
|
||||
return -ENOMEM;
|
||||
memcpy(relocated_restore_code, &core_restore_code,
|
||||
&restore_registers - &core_restore_code);
|
||||
error = relocate_restore_code();
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
restore_image();
|
||||
return 0;
|
||||
|
@ -109,11 +179,12 @@ int pfn_is_nosave(unsigned long pfn)
|
|||
|
||||
struct restore_data_record {
|
||||
unsigned long jump_address;
|
||||
unsigned long jump_address_phys;
|
||||
unsigned long cr3;
|
||||
unsigned long magic;
|
||||
};
|
||||
|
||||
#define RESTORE_MAGIC 0x0123456789ABCDEFUL
|
||||
#define RESTORE_MAGIC 0x123456789ABCDEF0UL
|
||||
|
||||
/**
|
||||
* arch_hibernation_header_save - populate the architecture specific part
|
||||
|
@ -126,7 +197,8 @@ int arch_hibernation_header_save(void *addr, unsigned int max_size)
|
|||
|
||||
if (max_size < sizeof(struct restore_data_record))
|
||||
return -EOVERFLOW;
|
||||
rdr->jump_address = restore_jump_address;
|
||||
rdr->jump_address = (unsigned long)&restore_registers;
|
||||
rdr->jump_address_phys = __pa_symbol(&restore_registers);
|
||||
rdr->cr3 = restore_cr3;
|
||||
rdr->magic = RESTORE_MAGIC;
|
||||
return 0;
|
||||
|
@ -142,6 +214,7 @@ int arch_hibernation_header_restore(void *addr)
|
|||
struct restore_data_record *rdr = addr;
|
||||
|
||||
restore_jump_address = rdr->jump_address;
|
||||
jump_address_phys = rdr->jump_address_phys;
|
||||
restore_cr3 = rdr->cr3;
|
||||
return (rdr->magic == RESTORE_MAGIC) ? 0 : -EINVAL;
|
||||
}
|
||||
|
|
|
@ -44,9 +44,6 @@ ENTRY(swsusp_arch_suspend)
|
|||
pushfq
|
||||
popq pt_regs_flags(%rax)
|
||||
|
||||
/* save the address of restore_registers */
|
||||
movq $restore_registers, %rax
|
||||
movq %rax, restore_jump_address(%rip)
|
||||
/* save cr3 */
|
||||
movq %cr3, %rax
|
||||
movq %rax, restore_cr3(%rip)
|
||||
|
@ -57,31 +54,34 @@ ENTRY(swsusp_arch_suspend)
|
|||
ENDPROC(swsusp_arch_suspend)
|
||||
|
||||
ENTRY(restore_image)
|
||||
/* switch to temporary page tables */
|
||||
movq $__PAGE_OFFSET, %rdx
|
||||
movq temp_level4_pgt(%rip), %rax
|
||||
subq %rdx, %rax
|
||||
movq %rax, %cr3
|
||||
/* Flush TLB */
|
||||
movq mmu_cr4_features(%rip), %rax
|
||||
movq %rax, %rdx
|
||||
andq $~(X86_CR4_PGE), %rdx
|
||||
movq %rdx, %cr4; # turn off PGE
|
||||
movq %cr3, %rcx; # flush TLB
|
||||
movq %rcx, %cr3;
|
||||
movq %rax, %cr4; # turn PGE back on
|
||||
|
||||
/* prepare to jump to the image kernel */
|
||||
movq restore_jump_address(%rip), %rax
|
||||
movq restore_cr3(%rip), %rbx
|
||||
movq restore_jump_address(%rip), %r8
|
||||
movq restore_cr3(%rip), %r9
|
||||
|
||||
/* prepare to switch to temporary page tables */
|
||||
movq temp_level4_pgt(%rip), %rax
|
||||
movq mmu_cr4_features(%rip), %rbx
|
||||
|
||||
/* prepare to copy image data to their original locations */
|
||||
movq restore_pblist(%rip), %rdx
|
||||
|
||||
/* jump to relocated restore code */
|
||||
movq relocated_restore_code(%rip), %rcx
|
||||
jmpq *%rcx
|
||||
|
||||
/* code below has been relocated to a safe page */
|
||||
ENTRY(core_restore_code)
|
||||
/* switch to temporary page tables */
|
||||
movq $__PAGE_OFFSET, %rcx
|
||||
subq %rcx, %rax
|
||||
movq %rax, %cr3
|
||||
/* flush TLB */
|
||||
movq %rbx, %rcx
|
||||
andq $~(X86_CR4_PGE), %rcx
|
||||
movq %rcx, %cr4; # turn off PGE
|
||||
movq %cr3, %rcx; # flush TLB
|
||||
movq %rcx, %cr3;
|
||||
movq %rbx, %cr4; # turn PGE back on
|
||||
.Lloop:
|
||||
testq %rdx, %rdx
|
||||
jz .Ldone
|
||||
|
@ -96,24 +96,17 @@ ENTRY(core_restore_code)
|
|||
/* progress to the next pbe */
|
||||
movq pbe_next(%rdx), %rdx
|
||||
jmp .Lloop
|
||||
|
||||
.Ldone:
|
||||
/* jump to the restore_registers address from the image header */
|
||||
jmpq *%rax
|
||||
/*
|
||||
* NOTE: This assumes that the boot kernel's text mapping covers the
|
||||
* image kernel's page containing restore_registers and the address of
|
||||
* this page is the same as in the image kernel's text mapping (it
|
||||
* should always be true, because the text mapping is linear, starting
|
||||
* from 0, and is supposed to cover the entire kernel text for every
|
||||
* kernel).
|
||||
*
|
||||
* code below belongs to the image kernel
|
||||
*/
|
||||
jmpq *%r8
|
||||
|
||||
/* code below belongs to the image kernel */
|
||||
.align PAGE_SIZE
|
||||
ENTRY(restore_registers)
|
||||
FRAME_BEGIN
|
||||
/* go back to the original page tables */
|
||||
movq %rbx, %cr3
|
||||
movq %r9, %cr3
|
||||
|
||||
/* Flush TLB, including "global" things (vmalloc) */
|
||||
movq mmu_cr4_features(%rip), %rax
|
||||
|
|
|
@ -150,8 +150,10 @@ static int get_task_ioprio(struct task_struct *p)
|
|||
if (ret)
|
||||
goto out;
|
||||
ret = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, IOPRIO_NORM);
|
||||
task_lock(p);
|
||||
if (p->io_context)
|
||||
ret = p->io_context->ioprio;
|
||||
task_unlock(p);
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -124,5 +124,10 @@ int mscode_note_digest(void *context, size_t hdrlen,
|
|||
struct pefile_context *ctx = context;
|
||||
|
||||
ctx->digest = kmemdup(value, vlen, GFP_KERNEL);
|
||||
return ctx->digest ? 0 : -ENOMEM;
|
||||
if (!ctx->digest)
|
||||
return -ENOMEM;
|
||||
|
||||
ctx->digest_len = vlen;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -227,7 +227,7 @@ static int pkcs7_verify_sig_chain(struct pkcs7_message *pkcs7,
|
|||
if (asymmetric_key_id_same(p->id, auth))
|
||||
goto found_issuer_check_skid;
|
||||
}
|
||||
} else {
|
||||
} else if (sig->auth_ids[1]) {
|
||||
auth = sig->auth_ids[1];
|
||||
pr_debug("- want %*phN\n", auth->len, auth->data);
|
||||
for (p = pkcs7->certs; p; p = p->next) {
|
||||
|
|
|
@ -87,7 +87,7 @@ int restrict_link_by_signature(struct key *trust_keyring,
|
|||
|
||||
sig = payload->data[asym_auth];
|
||||
if (!sig->auth_ids[0] && !sig->auth_ids[1])
|
||||
return 0;
|
||||
return -ENOKEY;
|
||||
|
||||
if (ca_keyid && !asymmetric_key_id_partial(sig->auth_ids[1], ca_keyid))
|
||||
return -EPERM;
|
||||
|
|
|
@ -455,6 +455,7 @@ static const int crypto_msg_min[CRYPTO_NR_MSGTYPES] = {
|
|||
[CRYPTO_MSG_NEWALG - CRYPTO_MSG_BASE] = MSGSIZE(crypto_user_alg),
|
||||
[CRYPTO_MSG_DELALG - CRYPTO_MSG_BASE] = MSGSIZE(crypto_user_alg),
|
||||
[CRYPTO_MSG_UPDATEALG - CRYPTO_MSG_BASE] = MSGSIZE(crypto_user_alg),
|
||||
[CRYPTO_MSG_GETALG - CRYPTO_MSG_BASE] = MSGSIZE(crypto_user_alg),
|
||||
[CRYPTO_MSG_DELRNG - CRYPTO_MSG_BASE] = 0,
|
||||
};
|
||||
|
||||
|
|
|
@ -102,10 +102,10 @@ struct pkcs1pad_inst_ctx {
|
|||
};
|
||||
|
||||
struct pkcs1pad_request {
|
||||
struct akcipher_request child_req;
|
||||
|
||||
struct scatterlist in_sg[3], out_sg[2];
|
||||
uint8_t *in_buf, *out_buf;
|
||||
|
||||
struct akcipher_request child_req;
|
||||
};
|
||||
|
||||
static int pkcs1pad_set_pub_key(struct crypto_akcipher *tfm, const void *key,
|
||||
|
|
|
@ -602,7 +602,7 @@ static int acpi_aml_read_user(char __user *buf, int len)
|
|||
crc->tail = (crc->tail + n) & (ACPI_AML_BUF_SIZE - 1);
|
||||
ret = n;
|
||||
out:
|
||||
acpi_aml_unlock_fifo(ACPI_AML_OUT_USER, !ret);
|
||||
acpi_aml_unlock_fifo(ACPI_AML_OUT_USER, ret >= 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -672,7 +672,7 @@ static int acpi_aml_write_user(const char __user *buf, int len)
|
|||
crc->head = (crc->head + n) & (ACPI_AML_BUF_SIZE - 1);
|
||||
ret = n;
|
||||
out:
|
||||
acpi_aml_unlock_fifo(ACPI_AML_IN_USER, !ret);
|
||||
acpi_aml_unlock_fifo(ACPI_AML_IN_USER, ret >= 0);
|
||||
return n;
|
||||
}
|
||||
|
||||
|
|
|
@ -108,9 +108,7 @@ acpi_ex_add_table(u32 table_index,
|
|||
|
||||
/* Add the table to the namespace */
|
||||
|
||||
acpi_ex_exit_interpreter();
|
||||
status = acpi_ns_load_table(table_index, parent_node);
|
||||
acpi_ex_enter_interpreter();
|
||||
if (ACPI_FAILURE(status)) {
|
||||
acpi_ut_remove_reference(obj_desc);
|
||||
*ddb_handle = NULL;
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
#include "acparser.h"
|
||||
#include "acdispat.h"
|
||||
#include "actables.h"
|
||||
#include "acinterp.h"
|
||||
|
||||
#define _COMPONENT ACPI_NAMESPACE
|
||||
ACPI_MODULE_NAME("nsparse")
|
||||
|
@ -171,8 +170,6 @@ acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node)
|
|||
|
||||
ACPI_FUNCTION_TRACE(ns_parse_table);
|
||||
|
||||
acpi_ex_enter_interpreter();
|
||||
|
||||
/*
|
||||
* AML Parse, pass 1
|
||||
*
|
||||
|
@ -188,7 +185,7 @@ acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node)
|
|||
status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS1,
|
||||
table_index, start_node);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
goto error_exit;
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -204,10 +201,8 @@ acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node)
|
|||
status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS2,
|
||||
table_index, start_node);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
goto error_exit;
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
error_exit:
|
||||
acpi_ex_exit_interpreter();
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
|
|
@ -1331,8 +1331,6 @@ static int ec_install_handlers(struct acpi_ec *ec)
|
|||
|
||||
static void ec_remove_handlers(struct acpi_ec *ec)
|
||||
{
|
||||
acpi_ec_stop(ec, false);
|
||||
|
||||
if (test_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags)) {
|
||||
if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle,
|
||||
ACPI_ADR_SPACE_EC, &acpi_ec_space_handler)))
|
||||
|
@ -1340,6 +1338,19 @@ static void ec_remove_handlers(struct acpi_ec *ec)
|
|||
clear_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags);
|
||||
}
|
||||
|
||||
/*
|
||||
* Stops handling the EC transactions after removing the operation
|
||||
* region handler. This is required because _REG(DISCONNECT)
|
||||
* invoked during the removal can result in new EC transactions.
|
||||
*
|
||||
* Flushes the EC requests and thus disables the GPE before
|
||||
* removing the GPE handler. This is required by the current ACPICA
|
||||
* GPE core. ACPICA GPE core will automatically disable a GPE when
|
||||
* it is indicated but there is no way to handle it. So the drivers
|
||||
* must disable the GPEs prior to removing the GPE handlers.
|
||||
*/
|
||||
acpi_ec_stop(ec, false);
|
||||
|
||||
if (test_bit(EC_FLAGS_GPE_HANDLER_INSTALLED, &ec->flags)) {
|
||||
if (ACPI_FAILURE(acpi_remove_gpe_handler(NULL, ec->gpe,
|
||||
&acpi_ec_gpe_handler)))
|
||||
|
|
|
@ -928,7 +928,7 @@ static ssize_t format_show(struct device *dev,
|
|||
{
|
||||
struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev);
|
||||
|
||||
return sprintf(buf, "0x%04x\n", be16_to_cpu(dcr->code));
|
||||
return sprintf(buf, "0x%04x\n", le16_to_cpu(dcr->code));
|
||||
}
|
||||
static DEVICE_ATTR_RO(format);
|
||||
|
||||
|
@ -961,8 +961,8 @@ static ssize_t format1_show(struct device *dev,
|
|||
continue;
|
||||
if (nfit_dcr->dcr->code == dcr->code)
|
||||
continue;
|
||||
rc = sprintf(buf, "%#x\n",
|
||||
be16_to_cpu(nfit_dcr->dcr->code));
|
||||
rc = sprintf(buf, "0x%04x\n",
|
||||
le16_to_cpu(nfit_dcr->dcr->code));
|
||||
break;
|
||||
}
|
||||
if (rc != ENXIO)
|
||||
|
@ -1151,9 +1151,10 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
|
|||
if (disable_vendor_specific)
|
||||
dsm_mask &= ~(1 << 8);
|
||||
} else {
|
||||
dev_err(dev, "unknown dimm command family\n");
|
||||
dev_dbg(dev, "unknown dimm command family\n");
|
||||
nfit_mem->family = -1;
|
||||
return force_enable_dimms ? 0 : -ENODEV;
|
||||
/* DSMs are optional, continue loading the driver... */
|
||||
return 0;
|
||||
}
|
||||
|
||||
uuid = to_nfit_uuid(nfit_mem->family);
|
||||
|
|
|
@ -53,12 +53,12 @@ enum nfit_uuids {
|
|||
};
|
||||
|
||||
/*
|
||||
* Region format interface codes are stored as an array of bytes in the
|
||||
* NFIT DIMM Control Region structure
|
||||
* Region format interface codes are stored with the interface as the
|
||||
* LSB and the function as the MSB.
|
||||
*/
|
||||
#define NFIT_FIC_BYTE cpu_to_be16(0x101) /* byte-addressable energy backed */
|
||||
#define NFIT_FIC_BLK cpu_to_be16(0x201) /* block-addressable non-energy backed */
|
||||
#define NFIT_FIC_BYTEN cpu_to_be16(0x301) /* byte-addressable non-energy backed */
|
||||
#define NFIT_FIC_BYTE cpu_to_le16(0x101) /* byte-addressable energy backed */
|
||||
#define NFIT_FIC_BLK cpu_to_le16(0x201) /* block-addressable non-energy backed */
|
||||
#define NFIT_FIC_BYTEN cpu_to_le16(0x301) /* byte-addressable non-energy backed */
|
||||
|
||||
enum {
|
||||
NFIT_BLK_READ_FLUSH = 1,
|
||||
|
|
|
@ -470,6 +470,7 @@ static int acpi_irq_pci_sharing_penalty(int irq)
|
|||
{
|
||||
struct acpi_pci_link *link;
|
||||
int penalty = 0;
|
||||
int i;
|
||||
|
||||
list_for_each_entry(link, &acpi_link_list, list) {
|
||||
/*
|
||||
|
@ -478,18 +479,14 @@ static int acpi_irq_pci_sharing_penalty(int irq)
|
|||
*/
|
||||
if (link->irq.active && link->irq.active == irq)
|
||||
penalty += PIRQ_PENALTY_PCI_USING;
|
||||
else {
|
||||
int i;
|
||||
|
||||
/*
|
||||
* If a link is inactive, penalize the IRQs it
|
||||
* might use, but not as severely.
|
||||
*/
|
||||
for (i = 0; i < link->irq.possible_count; i++)
|
||||
if (link->irq.possible[i] == irq)
|
||||
penalty += PIRQ_PENALTY_PCI_POSSIBLE /
|
||||
link->irq.possible_count;
|
||||
}
|
||||
/*
|
||||
* penalize the IRQs PCI might use, but not as severely.
|
||||
*/
|
||||
for (i = 0; i < link->irq.possible_count; i++)
|
||||
if (link->irq.possible[i] == irq)
|
||||
penalty += PIRQ_PENALTY_PCI_POSSIBLE /
|
||||
link->irq.possible_count;
|
||||
}
|
||||
|
||||
return penalty;
|
||||
|
@ -499,9 +496,6 @@ static int acpi_irq_get_penalty(int irq)
|
|||
{
|
||||
int penalty = 0;
|
||||
|
||||
if (irq < ACPI_MAX_ISA_IRQS)
|
||||
penalty += acpi_isa_irq_penalty[irq];
|
||||
|
||||
/*
|
||||
* Penalize IRQ used by ACPI SCI. If ACPI SCI pin attributes conflict
|
||||
* with PCI IRQ attributes, mark ACPI SCI as ISA_ALWAYS so it won't be
|
||||
|
@ -516,10 +510,49 @@ static int acpi_irq_get_penalty(int irq)
|
|||
penalty += PIRQ_PENALTY_PCI_USING;
|
||||
}
|
||||
|
||||
if (irq < ACPI_MAX_ISA_IRQS)
|
||||
return penalty + acpi_isa_irq_penalty[irq];
|
||||
|
||||
penalty += acpi_irq_pci_sharing_penalty(irq);
|
||||
return penalty;
|
||||
}
|
||||
|
||||
int __init acpi_irq_penalty_init(void)
|
||||
{
|
||||
struct acpi_pci_link *link;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Update penalties to facilitate IRQ balancing.
|
||||
*/
|
||||
list_for_each_entry(link, &acpi_link_list, list) {
|
||||
|
||||
/*
|
||||
* reflect the possible and active irqs in the penalty table --
|
||||
* useful for breaking ties.
|
||||
*/
|
||||
if (link->irq.possible_count) {
|
||||
int penalty =
|
||||
PIRQ_PENALTY_PCI_POSSIBLE /
|
||||
link->irq.possible_count;
|
||||
|
||||
for (i = 0; i < link->irq.possible_count; i++) {
|
||||
if (link->irq.possible[i] < ACPI_MAX_ISA_IRQS)
|
||||
acpi_isa_irq_penalty[link->irq.
|
||||
possible[i]] +=
|
||||
penalty;
|
||||
}
|
||||
|
||||
} else if (link->irq.active &&
|
||||
(link->irq.active < ACPI_MAX_ISA_IRQS)) {
|
||||
acpi_isa_irq_penalty[link->irq.active] +=
|
||||
PIRQ_PENALTY_PCI_POSSIBLE;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int acpi_irq_balance = -1; /* 0: static, 1: balance */
|
||||
|
||||
static int acpi_pci_link_allocate(struct acpi_pci_link *link)
|
||||
|
@ -839,7 +872,7 @@ void acpi_penalize_isa_irq(int irq, int active)
|
|||
{
|
||||
if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty)))
|
||||
acpi_isa_irq_penalty[irq] = acpi_irq_get_penalty(irq) +
|
||||
active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING;
|
||||
(active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING);
|
||||
}
|
||||
|
||||
bool acpi_isa_irq_available(int irq)
|
||||
|
|
|
@ -137,7 +137,7 @@ static const struct ata_port_info *ahci_seattle_get_port_info(
|
|||
u32 val;
|
||||
|
||||
plat_data = devm_kzalloc(dev, sizeof(*plat_data), GFP_KERNEL);
|
||||
if (IS_ERR(plat_data))
|
||||
if (!plat_data)
|
||||
return &ahci_port_info;
|
||||
|
||||
plat_data->sgpio_ctrl = devm_ioremap_resource(dev,
|
||||
|
|
|
@ -4314,6 +4314,12 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
|
|||
*/
|
||||
{ "ST380013AS", "3.20", ATA_HORKAGE_MAX_SEC_1024 },
|
||||
|
||||
/*
|
||||
* Device times out with higher max sects.
|
||||
* https://bugzilla.kernel.org/show_bug.cgi?id=121671
|
||||
*/
|
||||
{ "LITEON CX1-JB256-HP", NULL, ATA_HORKAGE_MAX_SEC_1024 },
|
||||
|
||||
/* Devices we expect to fail diagnostics */
|
||||
|
||||
/* Devices where NCQ should be avoided */
|
||||
|
|
|
@ -986,7 +986,7 @@ static inline void mv_write_cached_reg(void __iomem *addr, u32 *old, u32 new)
|
|||
* Looks like a lot of fuss, but it avoids an unnecessary
|
||||
* +1 usec read-after-write delay for unaffected registers.
|
||||
*/
|
||||
laddr = (long)addr & 0xffff;
|
||||
laddr = (unsigned long)addr & 0xffff;
|
||||
if (laddr >= 0x300 && laddr <= 0x33c) {
|
||||
laddr &= 0x000f;
|
||||
if (laddr == 0x4 || laddr == 0xc) {
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
#include <linux/bcma/bcma.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
#define BCMA_CORE_SIZE 0x1000
|
||||
|
||||
#define bcma_err(bus, fmt, ...) \
|
||||
pr_err("bus%d: " fmt, (bus)->num, ##__VA_ARGS__)
|
||||
#define bcma_warn(bus, fmt, ...) \
|
||||
|
|
|
@ -207,6 +207,9 @@ struct blkfront_info
|
|||
struct blk_mq_tag_set tag_set;
|
||||
struct blkfront_ring_info *rinfo;
|
||||
unsigned int nr_rings;
|
||||
/* Save uncomplete reqs and bios for migration. */
|
||||
struct list_head requests;
|
||||
struct bio_list bio_list;
|
||||
};
|
||||
|
||||
static unsigned int nr_minors;
|
||||
|
@ -2002,69 +2005,22 @@ static int blkif_recover(struct blkfront_info *info)
|
|||
{
|
||||
unsigned int i, r_index;
|
||||
struct request *req, *n;
|
||||
struct blk_shadow *copy;
|
||||
int rc;
|
||||
struct bio *bio, *cloned_bio;
|
||||
struct bio_list bio_list, merge_bio;
|
||||
unsigned int segs, offset;
|
||||
int pending, size;
|
||||
struct split_bio *split_bio;
|
||||
struct list_head requests;
|
||||
|
||||
blkfront_gather_backend_features(info);
|
||||
segs = info->max_indirect_segments ? : BLKIF_MAX_SEGMENTS_PER_REQUEST;
|
||||
blk_queue_max_segments(info->rq, segs);
|
||||
bio_list_init(&bio_list);
|
||||
INIT_LIST_HEAD(&requests);
|
||||
|
||||
for (r_index = 0; r_index < info->nr_rings; r_index++) {
|
||||
struct blkfront_ring_info *rinfo;
|
||||
|
||||
rinfo = &info->rinfo[r_index];
|
||||
/* Stage 1: Make a safe copy of the shadow state. */
|
||||
copy = kmemdup(rinfo->shadow, sizeof(rinfo->shadow),
|
||||
GFP_NOIO | __GFP_REPEAT | __GFP_HIGH);
|
||||
if (!copy)
|
||||
return -ENOMEM;
|
||||
|
||||
/* Stage 2: Set up free list. */
|
||||
memset(&rinfo->shadow, 0, sizeof(rinfo->shadow));
|
||||
for (i = 0; i < BLK_RING_SIZE(info); i++)
|
||||
rinfo->shadow[i].req.u.rw.id = i+1;
|
||||
rinfo->shadow_free = rinfo->ring.req_prod_pvt;
|
||||
rinfo->shadow[BLK_RING_SIZE(info)-1].req.u.rw.id = 0x0fffffff;
|
||||
struct blkfront_ring_info *rinfo = &info->rinfo[r_index];
|
||||
|
||||
rc = blkfront_setup_indirect(rinfo);
|
||||
if (rc) {
|
||||
kfree(copy);
|
||||
if (rc)
|
||||
return rc;
|
||||
}
|
||||
|
||||
for (i = 0; i < BLK_RING_SIZE(info); i++) {
|
||||
/* Not in use? */
|
||||
if (!copy[i].request)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Get the bios in the request so we can re-queue them.
|
||||
*/
|
||||
if (copy[i].request->cmd_flags &
|
||||
(REQ_FLUSH | REQ_FUA | REQ_DISCARD | REQ_SECURE)) {
|
||||
/*
|
||||
* Flush operations don't contain bios, so
|
||||
* we need to requeue the whole request
|
||||
*/
|
||||
list_add(©[i].request->queuelist, &requests);
|
||||
continue;
|
||||
}
|
||||
merge_bio.head = copy[i].request->bio;
|
||||
merge_bio.tail = copy[i].request->biotail;
|
||||
bio_list_merge(&bio_list, &merge_bio);
|
||||
copy[i].request->bio = NULL;
|
||||
blk_end_request_all(copy[i].request, 0);
|
||||
}
|
||||
|
||||
kfree(copy);
|
||||
}
|
||||
xenbus_switch_state(info->xbdev, XenbusStateConnected);
|
||||
|
||||
|
@ -2079,7 +2035,7 @@ static int blkif_recover(struct blkfront_info *info)
|
|||
kick_pending_request_queues(rinfo);
|
||||
}
|
||||
|
||||
list_for_each_entry_safe(req, n, &requests, queuelist) {
|
||||
list_for_each_entry_safe(req, n, &info->requests, queuelist) {
|
||||
/* Requeue pending requests (flush or discard) */
|
||||
list_del_init(&req->queuelist);
|
||||
BUG_ON(req->nr_phys_segments > segs);
|
||||
|
@ -2087,7 +2043,7 @@ static int blkif_recover(struct blkfront_info *info)
|
|||
}
|
||||
blk_mq_kick_requeue_list(info->rq);
|
||||
|
||||
while ((bio = bio_list_pop(&bio_list)) != NULL) {
|
||||
while ((bio = bio_list_pop(&info->bio_list)) != NULL) {
|
||||
/* Traverse the list of pending bios and re-queue them */
|
||||
if (bio_segments(bio) > segs) {
|
||||
/*
|
||||
|
@ -2133,9 +2089,42 @@ static int blkfront_resume(struct xenbus_device *dev)
|
|||
{
|
||||
struct blkfront_info *info = dev_get_drvdata(&dev->dev);
|
||||
int err = 0;
|
||||
unsigned int i, j;
|
||||
|
||||
dev_dbg(&dev->dev, "blkfront_resume: %s\n", dev->nodename);
|
||||
|
||||
bio_list_init(&info->bio_list);
|
||||
INIT_LIST_HEAD(&info->requests);
|
||||
for (i = 0; i < info->nr_rings; i++) {
|
||||
struct blkfront_ring_info *rinfo = &info->rinfo[i];
|
||||
struct bio_list merge_bio;
|
||||
struct blk_shadow *shadow = rinfo->shadow;
|
||||
|
||||
for (j = 0; j < BLK_RING_SIZE(info); j++) {
|
||||
/* Not in use? */
|
||||
if (!shadow[j].request)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Get the bios in the request so we can re-queue them.
|
||||
*/
|
||||
if (shadow[j].request->cmd_flags &
|
||||
(REQ_FLUSH | REQ_FUA | REQ_DISCARD | REQ_SECURE)) {
|
||||
/*
|
||||
* Flush operations don't contain bios, so
|
||||
* we need to requeue the whole request
|
||||
*/
|
||||
list_add(&shadow[j].request->queuelist, &info->requests);
|
||||
continue;
|
||||
}
|
||||
merge_bio.head = shadow[j].request->bio;
|
||||
merge_bio.tail = shadow[j].request->biotail;
|
||||
bio_list_merge(&info->bio_list, &merge_bio);
|
||||
shadow[j].request->bio = NULL;
|
||||
blk_mq_end_request(shadow[j].request, 0);
|
||||
}
|
||||
}
|
||||
|
||||
blkif_free(info, info->connected == BLKIF_STATE_CONNECTED);
|
||||
|
||||
err = negotiate_mq(info);
|
||||
|
|
|
@ -99,7 +99,7 @@ static int clk_programmable_set_parent(struct clk_hw *hw, u8 index)
|
|||
struct clk_programmable *prog = to_clk_programmable(hw);
|
||||
const struct clk_programmable_layout *layout = prog->layout;
|
||||
unsigned int mask = layout->css_mask;
|
||||
unsigned int pckr = 0;
|
||||
unsigned int pckr = index;
|
||||
|
||||
if (layout->have_slck_mck)
|
||||
mask |= AT91_PMC_CSSMCK_MCK;
|
||||
|
|
|
@ -144,9 +144,9 @@ static int oxnas_stdclk_probe(struct platform_device *pdev)
|
|||
return -ENOMEM;
|
||||
|
||||
regmap = syscon_node_to_regmap(of_get_parent(np));
|
||||
if (!regmap) {
|
||||
if (IS_ERR(regmap)) {
|
||||
dev_err(&pdev->dev, "failed to have parent regmap\n");
|
||||
return -EINVAL;
|
||||
return PTR_ERR(regmap);
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(clk_oxnas_init); i++) {
|
||||
|
|
|
@ -321,9 +321,9 @@ struct clk *rockchip_clk_register_cpuclk(const char *name,
|
|||
}
|
||||
|
||||
cclk = clk_register(NULL, &cpuclk->hw);
|
||||
if (IS_ERR(clk)) {
|
||||
if (IS_ERR(cclk)) {
|
||||
pr_err("%s: could not register cpuclk %s\n", __func__, name);
|
||||
ret = PTR_ERR(clk);
|
||||
ret = PTR_ERR(cclk);
|
||||
goto free_rate_table;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,8 +41,6 @@ static unsigned long rockchip_mmc_recalc(struct clk_hw *hw,
|
|||
#define ROCKCHIP_MMC_DEGREE_MASK 0x3
|
||||
#define ROCKCHIP_MMC_DELAYNUM_OFFSET 2
|
||||
#define ROCKCHIP_MMC_DELAYNUM_MASK (0xff << ROCKCHIP_MMC_DELAYNUM_OFFSET)
|
||||
#define ROCKCHIP_MMC_INIT_STATE_RESET 0x1
|
||||
#define ROCKCHIP_MMC_INIT_STATE_SHIFT 1
|
||||
|
||||
#define PSECS_PER_SEC 1000000000000LL
|
||||
|
||||
|
@ -154,6 +152,7 @@ struct clk *rockchip_clk_register_mmc(const char *name,
|
|||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
init.name = name;
|
||||
init.flags = 0;
|
||||
init.num_parents = num_parents;
|
||||
init.parent_names = parent_names;
|
||||
init.ops = &rockchip_mmc_clk_ops;
|
||||
|
@ -162,15 +161,6 @@ struct clk *rockchip_clk_register_mmc(const char *name,
|
|||
mmc_clock->reg = reg;
|
||||
mmc_clock->shift = shift;
|
||||
|
||||
/*
|
||||
* Assert init_state to soft reset the CLKGEN
|
||||
* for mmc tuning phase and degree
|
||||
*/
|
||||
if (mmc_clock->shift == ROCKCHIP_MMC_INIT_STATE_SHIFT)
|
||||
writel(HIWORD_UPDATE(ROCKCHIP_MMC_INIT_STATE_RESET,
|
||||
ROCKCHIP_MMC_INIT_STATE_RESET,
|
||||
mmc_clock->shift), mmc_clock->reg);
|
||||
|
||||
clk = clk_register(NULL, &mmc_clock->hw);
|
||||
if (IS_ERR(clk))
|
||||
kfree(mmc_clock);
|
||||
|
|
|
@ -832,9 +832,9 @@ static struct rockchip_clk_branch rk3399_clk_branches[] __initdata = {
|
|||
RK3399_CLKGATE_CON(13), 1, GFLAGS),
|
||||
|
||||
/* perihp */
|
||||
GATE(0, "cpll_aclk_perihp_src", "gpll", CLK_IGNORE_UNUSED,
|
||||
GATE(0, "cpll_aclk_perihp_src", "cpll", CLK_IGNORE_UNUSED,
|
||||
RK3399_CLKGATE_CON(5), 0, GFLAGS),
|
||||
GATE(0, "gpll_aclk_perihp_src", "cpll", CLK_IGNORE_UNUSED,
|
||||
GATE(0, "gpll_aclk_perihp_src", "gpll", CLK_IGNORE_UNUSED,
|
||||
RK3399_CLKGATE_CON(5), 1, GFLAGS),
|
||||
COMPOSITE(ACLK_PERIHP, "aclk_perihp", mux_aclk_perihp_p, CLK_IGNORE_UNUSED,
|
||||
RK3399_CLKSEL_CON(14), 7, 1, MFLAGS, 0, 5, DFLAGS,
|
||||
|
@ -1466,6 +1466,8 @@ static struct rockchip_clk_branch rk3399_clk_pmu_branches[] __initdata = {
|
|||
|
||||
static const char *const rk3399_cru_critical_clocks[] __initconst = {
|
||||
"aclk_cci_pre",
|
||||
"aclk_gic",
|
||||
"aclk_gic_noc",
|
||||
"pclk_perilp0",
|
||||
"pclk_perilp0",
|
||||
"hclk_perilp0",
|
||||
|
@ -1508,6 +1510,7 @@ static void __init rk3399_clk_init(struct device_node *np)
|
|||
ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS);
|
||||
if (IS_ERR(ctx)) {
|
||||
pr_err("%s: rockchip clk init failed\n", __func__);
|
||||
iounmap(reg_base);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1553,6 +1556,7 @@ static void __init rk3399_pmu_clk_init(struct device_node *np)
|
|||
ctx = rockchip_clk_init(np, reg_base, CLKPMU_NR_CLKS);
|
||||
if (IS_ERR(ctx)) {
|
||||
pr_err("%s: rockchip pmu clk init failed\n", __func__);
|
||||
iounmap(reg_base);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@ struct sun4i_a10_display_clk_data {
|
|||
|
||||
u8 width_div;
|
||||
u8 width_mux;
|
||||
|
||||
u32 flags;
|
||||
};
|
||||
|
||||
struct reset_data {
|
||||
|
@ -166,7 +168,7 @@ static void __init sun4i_a10_display_init(struct device_node *node,
|
|||
data->has_div ? &div->hw : NULL,
|
||||
data->has_div ? &clk_divider_ops : NULL,
|
||||
&gate->hw, &clk_gate_ops,
|
||||
0);
|
||||
data->flags);
|
||||
if (IS_ERR(clk)) {
|
||||
pr_err("%s: Couldn't register the clock\n", clk_name);
|
||||
goto free_div;
|
||||
|
@ -232,6 +234,7 @@ static const struct sun4i_a10_display_clk_data sun4i_a10_tcon_ch0_data __initcon
|
|||
.offset_rst = 29,
|
||||
.offset_mux = 24,
|
||||
.width_mux = 2,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
};
|
||||
|
||||
static void __init sun4i_a10_tcon_ch0_setup(struct device_node *node)
|
||||
|
|
|
@ -79,15 +79,11 @@ static int tcon_ch1_is_enabled(struct clk_hw *hw)
|
|||
static u8 tcon_ch1_get_parent(struct clk_hw *hw)
|
||||
{
|
||||
struct tcon_ch1_clk *tclk = hw_to_tclk(hw);
|
||||
int num_parents = clk_hw_get_num_parents(hw);
|
||||
u32 reg;
|
||||
|
||||
reg = readl(tclk->reg) >> TCON_CH1_SCLK2_MUX_SHIFT;
|
||||
reg &= reg >> TCON_CH1_SCLK2_MUX_MASK;
|
||||
|
||||
if (reg >= num_parents)
|
||||
return -EINVAL;
|
||||
|
||||
return reg;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,11 +56,21 @@ static struct cb_id cn_proc_event_id = { CN_IDX_PROC, CN_VAL_PROC };
|
|||
/* proc_event_counts is used as the sequence number of the netlink message */
|
||||
static DEFINE_PER_CPU(__u32, proc_event_counts) = { 0 };
|
||||
|
||||
static inline void get_seq(__u32 *ts, int *cpu)
|
||||
static inline void send_msg(struct cn_msg *msg)
|
||||
{
|
||||
preempt_disable();
|
||||
*ts = __this_cpu_inc_return(proc_event_counts) - 1;
|
||||
*cpu = smp_processor_id();
|
||||
|
||||
msg->seq = __this_cpu_inc_return(proc_event_counts) - 1;
|
||||
((struct proc_event *)msg->data)->cpu = smp_processor_id();
|
||||
|
||||
/*
|
||||
* Preemption remains disabled during send to ensure the messages are
|
||||
* ordered according to their sequence numbers.
|
||||
*
|
||||
* If cn_netlink_send() fails, the data is not sent.
|
||||
*/
|
||||
cn_netlink_send(msg, 0, CN_IDX_PROC, GFP_NOWAIT);
|
||||
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
|
@ -77,7 +87,6 @@ void proc_fork_connector(struct task_struct *task)
|
|||
msg = buffer_to_cn_msg(buffer);
|
||||
ev = (struct proc_event *)msg->data;
|
||||
memset(&ev->event_data, 0, sizeof(ev->event_data));
|
||||
get_seq(&msg->seq, &ev->cpu);
|
||||
ev->timestamp_ns = ktime_get_ns();
|
||||
ev->what = PROC_EVENT_FORK;
|
||||
rcu_read_lock();
|
||||
|
@ -92,8 +101,7 @@ void proc_fork_connector(struct task_struct *task)
|
|||
msg->ack = 0; /* not used */
|
||||
msg->len = sizeof(*ev);
|
||||
msg->flags = 0; /* not used */
|
||||
/* If cn_netlink_send() failed, the data is not sent */
|
||||
cn_netlink_send(msg, 0, CN_IDX_PROC, GFP_KERNEL);
|
||||
send_msg(msg);
|
||||
}
|
||||
|
||||
void proc_exec_connector(struct task_struct *task)
|
||||
|
@ -108,7 +116,6 @@ void proc_exec_connector(struct task_struct *task)
|
|||
msg = buffer_to_cn_msg(buffer);
|
||||
ev = (struct proc_event *)msg->data;
|
||||
memset(&ev->event_data, 0, sizeof(ev->event_data));
|
||||
get_seq(&msg->seq, &ev->cpu);
|
||||
ev->timestamp_ns = ktime_get_ns();
|
||||
ev->what = PROC_EVENT_EXEC;
|
||||
ev->event_data.exec.process_pid = task->pid;
|
||||
|
@ -118,7 +125,7 @@ void proc_exec_connector(struct task_struct *task)
|
|||
msg->ack = 0; /* not used */
|
||||
msg->len = sizeof(*ev);
|
||||
msg->flags = 0; /* not used */
|
||||
cn_netlink_send(msg, 0, CN_IDX_PROC, GFP_KERNEL);
|
||||
send_msg(msg);
|
||||
}
|
||||
|
||||
void proc_id_connector(struct task_struct *task, int which_id)
|
||||
|
@ -150,14 +157,13 @@ void proc_id_connector(struct task_struct *task, int which_id)
|
|||
return;
|
||||
}
|
||||
rcu_read_unlock();
|
||||
get_seq(&msg->seq, &ev->cpu);
|
||||
ev->timestamp_ns = ktime_get_ns();
|
||||
|
||||
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
|
||||
msg->ack = 0; /* not used */
|
||||
msg->len = sizeof(*ev);
|
||||
msg->flags = 0; /* not used */
|
||||
cn_netlink_send(msg, 0, CN_IDX_PROC, GFP_KERNEL);
|
||||
send_msg(msg);
|
||||
}
|
||||
|
||||
void proc_sid_connector(struct task_struct *task)
|
||||
|
@ -172,7 +178,6 @@ void proc_sid_connector(struct task_struct *task)
|
|||
msg = buffer_to_cn_msg(buffer);
|
||||
ev = (struct proc_event *)msg->data;
|
||||
memset(&ev->event_data, 0, sizeof(ev->event_data));
|
||||
get_seq(&msg->seq, &ev->cpu);
|
||||
ev->timestamp_ns = ktime_get_ns();
|
||||
ev->what = PROC_EVENT_SID;
|
||||
ev->event_data.sid.process_pid = task->pid;
|
||||
|
@ -182,7 +187,7 @@ void proc_sid_connector(struct task_struct *task)
|
|||
msg->ack = 0; /* not used */
|
||||
msg->len = sizeof(*ev);
|
||||
msg->flags = 0; /* not used */
|
||||
cn_netlink_send(msg, 0, CN_IDX_PROC, GFP_KERNEL);
|
||||
send_msg(msg);
|
||||
}
|
||||
|
||||
void proc_ptrace_connector(struct task_struct *task, int ptrace_id)
|
||||
|
@ -197,7 +202,6 @@ void proc_ptrace_connector(struct task_struct *task, int ptrace_id)
|
|||
msg = buffer_to_cn_msg(buffer);
|
||||
ev = (struct proc_event *)msg->data;
|
||||
memset(&ev->event_data, 0, sizeof(ev->event_data));
|
||||
get_seq(&msg->seq, &ev->cpu);
|
||||
ev->timestamp_ns = ktime_get_ns();
|
||||
ev->what = PROC_EVENT_PTRACE;
|
||||
ev->event_data.ptrace.process_pid = task->pid;
|
||||
|
@ -215,7 +219,7 @@ void proc_ptrace_connector(struct task_struct *task, int ptrace_id)
|
|||
msg->ack = 0; /* not used */
|
||||
msg->len = sizeof(*ev);
|
||||
msg->flags = 0; /* not used */
|
||||
cn_netlink_send(msg, 0, CN_IDX_PROC, GFP_KERNEL);
|
||||
send_msg(msg);
|
||||
}
|
||||
|
||||
void proc_comm_connector(struct task_struct *task)
|
||||
|
@ -230,7 +234,6 @@ void proc_comm_connector(struct task_struct *task)
|
|||
msg = buffer_to_cn_msg(buffer);
|
||||
ev = (struct proc_event *)msg->data;
|
||||
memset(&ev->event_data, 0, sizeof(ev->event_data));
|
||||
get_seq(&msg->seq, &ev->cpu);
|
||||
ev->timestamp_ns = ktime_get_ns();
|
||||
ev->what = PROC_EVENT_COMM;
|
||||
ev->event_data.comm.process_pid = task->pid;
|
||||
|
@ -241,7 +244,7 @@ void proc_comm_connector(struct task_struct *task)
|
|||
msg->ack = 0; /* not used */
|
||||
msg->len = sizeof(*ev);
|
||||
msg->flags = 0; /* not used */
|
||||
cn_netlink_send(msg, 0, CN_IDX_PROC, GFP_KERNEL);
|
||||
send_msg(msg);
|
||||
}
|
||||
|
||||
void proc_coredump_connector(struct task_struct *task)
|
||||
|
@ -256,7 +259,6 @@ void proc_coredump_connector(struct task_struct *task)
|
|||
msg = buffer_to_cn_msg(buffer);
|
||||
ev = (struct proc_event *)msg->data;
|
||||
memset(&ev->event_data, 0, sizeof(ev->event_data));
|
||||
get_seq(&msg->seq, &ev->cpu);
|
||||
ev->timestamp_ns = ktime_get_ns();
|
||||
ev->what = PROC_EVENT_COREDUMP;
|
||||
ev->event_data.coredump.process_pid = task->pid;
|
||||
|
@ -266,7 +268,7 @@ void proc_coredump_connector(struct task_struct *task)
|
|||
msg->ack = 0; /* not used */
|
||||
msg->len = sizeof(*ev);
|
||||
msg->flags = 0; /* not used */
|
||||
cn_netlink_send(msg, 0, CN_IDX_PROC, GFP_KERNEL);
|
||||
send_msg(msg);
|
||||
}
|
||||
|
||||
void proc_exit_connector(struct task_struct *task)
|
||||
|
@ -281,7 +283,6 @@ void proc_exit_connector(struct task_struct *task)
|
|||
msg = buffer_to_cn_msg(buffer);
|
||||
ev = (struct proc_event *)msg->data;
|
||||
memset(&ev->event_data, 0, sizeof(ev->event_data));
|
||||
get_seq(&msg->seq, &ev->cpu);
|
||||
ev->timestamp_ns = ktime_get_ns();
|
||||
ev->what = PROC_EVENT_EXIT;
|
||||
ev->event_data.exit.process_pid = task->pid;
|
||||
|
@ -293,7 +294,7 @@ void proc_exit_connector(struct task_struct *task)
|
|||
msg->ack = 0; /* not used */
|
||||
msg->len = sizeof(*ev);
|
||||
msg->flags = 0; /* not used */
|
||||
cn_netlink_send(msg, 0, CN_IDX_PROC, GFP_KERNEL);
|
||||
send_msg(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -325,7 +326,7 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack)
|
|||
msg->ack = rcvd_ack + 1;
|
||||
msg->len = sizeof(*ev);
|
||||
msg->flags = 0; /* not used */
|
||||
cn_netlink_send(msg, 0, CN_IDX_PROC, GFP_KERNEL);
|
||||
send_msg(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -79,15 +79,16 @@ static const struct of_device_id machines[] __initconst = {
|
|||
static int __init cpufreq_dt_platdev_init(void)
|
||||
{
|
||||
struct device_node *np = of_find_node_by_path("/");
|
||||
const struct of_device_id *match;
|
||||
|
||||
if (!np)
|
||||
return -ENODEV;
|
||||
|
||||
if (!of_match_node(machines, np))
|
||||
match = of_match_node(machines, np);
|
||||
of_node_put(np);
|
||||
if (!match)
|
||||
return -ENODEV;
|
||||
|
||||
of_node_put(of_root);
|
||||
|
||||
return PTR_ERR_OR_ZERO(platform_device_register_simple("cpufreq-dt", -1,
|
||||
NULL, 0));
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue