Linux 5.8-rc3
-----BEGIN PGP SIGNATURE----- iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAl75EvgeHHRvcnZhbGRz QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiG18MH/jN7yifoZWVmgbVf csAlaNUMYJDR9uMhGDtKHbN5+mMDj7nSimaM+B/V1aBwkG9lMrAJAmhS8S9zwBbO oZj4LxrzXI4iqDltDn3o4zr01STWIz29t/AoxL8DUD8gZWFP7DBoIXXE8zzPCXuD Zl/2gyOWTBe/zlTKB3g7ynjucyqYOSCQruBLv5hIpo9htZZnddVSoA0TVy3yJnUY YBp4U8TsgLEMKbqi2nofjtjQYCTIl5oVfZPHuwacR5gtZi+AQosumLb29wPvx2Zh deGjxrUtKhVE8zZo9KO0msuU6ex8bXwy2pqpw2lyojhToKd4lNsneg/hSOuvB+4i Sgib/Rk= =AC3+ -----END PGP SIGNATURE----- Merge 5.8-rc3 into android-mainline Linux 5.8-rc3 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: If6fb78c619c5fa35332606589853189842c304b9
This commit is contained in:
commit
1e253d0563
@ -1,6 +1,6 @@
|
||||
What: /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req
|
||||
Date: Feb 2014
|
||||
Contact: Li Jun <b47624@freescale.com>
|
||||
Contact: Li Jun <jun.li@nxp.com>
|
||||
Description:
|
||||
Can be set and read.
|
||||
Set a_bus_req(A-device bus request) input to be 1 if
|
||||
@ -17,7 +17,7 @@ Description:
|
||||
|
||||
What: /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_drop
|
||||
Date: Feb 2014
|
||||
Contact: Li Jun <b47624@freescale.com>
|
||||
Contact: Li Jun <jun.li@nxp.com>
|
||||
Description:
|
||||
Can be set and read
|
||||
The a_bus_drop(A-device bus drop) input is 1 when the
|
||||
@ -32,7 +32,7 @@ Description:
|
||||
|
||||
What: /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
|
||||
Date: Feb 2014
|
||||
Contact: Li Jun <b47624@freescale.com>
|
||||
Contact: Li Jun <jun.li@nxp.com>
|
||||
Description:
|
||||
Can be set and read.
|
||||
The b_bus_req(B-device bus request) input is 1 during the time
|
||||
@ -47,7 +47,7 @@ Description:
|
||||
|
||||
What: /sys/bus/platform/devices/ci_hdrc.0/inputs/a_clr_err
|
||||
Date: Feb 2014
|
||||
Contact: Li Jun <b47624@freescale.com>
|
||||
Contact: Li Jun <jun.li@nxp.com>
|
||||
Description:
|
||||
Only can be set.
|
||||
The a_clr_err(A-device Vbus error clear) input is used to clear
|
||||
|
@ -1356,8 +1356,8 @@ PAGE_SIZE multiple when read back.
|
||||
|
||||
thp_fault_alloc
|
||||
Number of transparent hugepages which were allocated to satisfy
|
||||
a page fault, including COW faults. This counter is not present
|
||||
when CONFIG_TRANSPARENT_HUGEPAGE is not set.
|
||||
a page fault. This counter is not present when CONFIG_TRANSPARENT_HUGEPAGE
|
||||
is not set.
|
||||
|
||||
thp_collapse_alloc
|
||||
Number of transparent hugepages which were allocated to allow
|
||||
|
@ -11,6 +11,7 @@ Device Mapper
|
||||
dm-clone
|
||||
dm-crypt
|
||||
dm-dust
|
||||
dm-ebs
|
||||
dm-flakey
|
||||
dm-init
|
||||
dm-integrity
|
||||
|
@ -305,8 +305,7 @@ monitor how successfully the system is providing huge pages for use.
|
||||
|
||||
thp_fault_alloc
|
||||
is incremented every time a huge page is successfully
|
||||
allocated to handle a page fault. This applies to both the
|
||||
first time a page is faulted and for COW faults.
|
||||
allocated to handle a page fault.
|
||||
|
||||
thp_collapse_alloc
|
||||
is incremented by khugepaged when it has found
|
||||
|
@ -86,6 +86,20 @@ then the next program in the chain (A) will see those changes,
|
||||
*not* the original input ``setsockopt`` arguments. The potentially
|
||||
modified values will be then passed down to the kernel.
|
||||
|
||||
Large optval
|
||||
============
|
||||
When the ``optval`` is greater than the ``PAGE_SIZE``, the BPF program
|
||||
can access only the first ``PAGE_SIZE`` of that data. So it has to options:
|
||||
|
||||
* Set ``optlen`` to zero, which indicates that the kernel should
|
||||
use the original buffer from the userspace. Any modifications
|
||||
done by the BPF program to the ``optval`` are ignored.
|
||||
* Set ``optlen`` to the value less than ``PAGE_SIZE``, which
|
||||
indicates that the kernel should use BPF's trimmed ``optval``.
|
||||
|
||||
When the BPF program returns with the ``optlen`` greater than
|
||||
``PAGE_SIZE``, the userspace will receive ``EFAULT`` errno.
|
||||
|
||||
Example
|
||||
=======
|
||||
|
||||
|
@ -33,7 +33,7 @@ all combinations of get*(), pin*(), FOLL_LONGTERM, and more. Also, the
|
||||
pin_user_pages*() APIs are clearly distinct from the get_user_pages*() APIs, so
|
||||
that's a natural dividing line, and a good point to make separate wrapper calls.
|
||||
In other words, use pin_user_pages*() for DMA-pinned pages, and
|
||||
get_user_pages*() for other cases. There are four cases described later on in
|
||||
get_user_pages*() for other cases. There are five cases described later on in
|
||||
this document, to further clarify that concept.
|
||||
|
||||
FOLL_PIN and FOLL_GET are mutually exclusive for a given gup call. However,
|
||||
|
@ -114,12 +114,6 @@ the below options are available:
|
||||
To dynamically limit for which functions to generate reports, see the
|
||||
`DebugFS interface`_ blacklist/whitelist feature.
|
||||
|
||||
For ``__always_inline`` functions, replace ``__always_inline`` with
|
||||
``__no_kcsan_or_inline`` (which implies ``__always_inline``)::
|
||||
|
||||
static __no_kcsan_or_inline void foo(void) {
|
||||
...
|
||||
|
||||
* To disable data race detection for a particular compilation unit, add to the
|
||||
``Makefile``::
|
||||
|
||||
|
@ -34,12 +34,15 @@ properties:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
items:
|
||||
- description: controller register bus clock
|
||||
- description: baud rate generator and delay control clock
|
||||
|
||||
clock-names:
|
||||
description: input clock for the baud rate generator
|
||||
items:
|
||||
- const: core
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
|
||||
if:
|
||||
properties:
|
||||
@ -51,17 +54,22 @@ if:
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
contains:
|
||||
items:
|
||||
- description: controller register bus clock
|
||||
- description: baud rate generator and delay control clock
|
||||
minItems: 2
|
||||
|
||||
clock-names:
|
||||
minItems: 2
|
||||
items:
|
||||
- const: core
|
||||
- const: pclk
|
||||
|
||||
else:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: core
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
@ -30,8 +30,8 @@ Socket API
|
||||
|
||||
The address family, socket addresses etc. are defined in the
|
||||
include/net/af_ieee802154.h header or in the special header
|
||||
in the userspace package (see either http://wpan.cakelab.org/ or the
|
||||
git tree at https://github.com/linux-wpan/wpan-tools).
|
||||
in the userspace package (see either https://linux-wpan.org/wpan-tools.html
|
||||
or the git tree at https://github.com/linux-wpan/wpan-tools).
|
||||
|
||||
6LoWPAN Linux implementation
|
||||
============================
|
||||
|
14
MAINTAINERS
14
MAINTAINERS
@ -8333,7 +8333,7 @@ M: Alexander Aring <alex.aring@gmail.com>
|
||||
M: Stefan Schmidt <stefan@datenfreihafen.org>
|
||||
L: linux-wpan@vger.kernel.org
|
||||
S: Maintained
|
||||
W: http://wpan.cakelab.org/
|
||||
W: https://linux-wpan.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next.git
|
||||
F: Documentation/networking/ieee802154.rst
|
||||
@ -10808,7 +10808,7 @@ F: Documentation/devicetree/bindings/dma/mtk-*
|
||||
F: drivers/dma/mediatek/
|
||||
|
||||
MEDIATEK ETHERNET DRIVER
|
||||
M: Felix Fietkau <nbd@openwrt.org>
|
||||
M: Felix Fietkau <nbd@nbd.name>
|
||||
M: John Crispin <john@phrozen.org>
|
||||
M: Sean Wang <sean.wang@mediatek.com>
|
||||
M: Mark Lee <Mark-MC.Lee@mediatek.com>
|
||||
@ -12701,13 +12701,13 @@ F: arch/mips/boot/dts/ralink/omega2p.dts
|
||||
|
||||
OP-TEE DRIVER
|
||||
M: Jens Wiklander <jens.wiklander@linaro.org>
|
||||
L: tee-dev@lists.linaro.org
|
||||
L: op-tee@lists.trustedfirmware.org
|
||||
S: Maintained
|
||||
F: drivers/tee/optee/
|
||||
|
||||
OP-TEE RANDOM NUMBER GENERATOR (RNG) DRIVER
|
||||
M: Sumit Garg <sumit.garg@linaro.org>
|
||||
L: tee-dev@lists.linaro.org
|
||||
L: op-tee@lists.trustedfirmware.org
|
||||
S: Maintained
|
||||
F: drivers/char/hw_random/optee-rng.c
|
||||
|
||||
@ -16064,8 +16064,10 @@ SPARSE CHECKER
|
||||
M: "Luc Van Oostenryck" <luc.vanoostenryck@gmail.com>
|
||||
L: linux-sparse@vger.kernel.org
|
||||
S: Maintained
|
||||
W: https://sparse.wiki.kernel.org/
|
||||
W: https://sparse.docs.kernel.org/
|
||||
T: git git://git.kernel.org/pub/scm/devel/sparse/sparse.git
|
||||
Q: https://patchwork.kernel.org/project/linux-sparse/list/
|
||||
B: https://bugzilla.kernel.org/enter_bug.cgi?component=Sparse&product=Tools
|
||||
F: include/linux/compiler.h
|
||||
|
||||
SPEAR CLOCK FRAMEWORK SUPPORT
|
||||
@ -16778,7 +16780,7 @@ F: include/media/i2c/tw9910.h
|
||||
|
||||
TEE SUBSYSTEM
|
||||
M: Jens Wiklander <jens.wiklander@linaro.org>
|
||||
L: tee-dev@lists.linaro.org
|
||||
L: op-tee@lists.trustedfirmware.org
|
||||
S: Maintained
|
||||
F: Documentation/tee.txt
|
||||
F: drivers/tee/
|
||||
|
2
Makefile
2
Makefile
@ -2,7 +2,7 @@
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 8
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc2
|
||||
EXTRAVERSION = -rc3
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -369,7 +369,7 @@ &mmc1 {
|
||||
&mmc2 {
|
||||
status = "okay";
|
||||
vmmc-supply = <&wl12xx_vmmc>;
|
||||
ti,non-removable;
|
||||
non-removable;
|
||||
bus-width = <4>;
|
||||
cap-power-off-card;
|
||||
pinctrl-names = "default";
|
||||
|
@ -22,6 +22,7 @@ &mmc2 {
|
||||
pinctrl-0 = <&emmc_pins>;
|
||||
bus-width = <8>;
|
||||
status = "okay";
|
||||
non-removable;
|
||||
};
|
||||
|
||||
&am33xx_pinmux {
|
||||
|
@ -75,7 +75,6 @@ &mmc3 {
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
cap-power-off-card;
|
||||
ti,needs-special-hs-handling;
|
||||
keep-power-in-suspend;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc3_pins &wl18xx_pins>;
|
||||
|
@ -367,7 +367,6 @@ &mmc3 {
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
cap-power-off-card;
|
||||
ti,needs-special-hs-handling;
|
||||
keep-power-in-suspend;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc3_pins &wl18xx_pins>;
|
||||
|
@ -75,7 +75,6 @@ &mmc3 {
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
cap-power-off-card;
|
||||
ti,needs-special-hs-handling;
|
||||
keep-power-in-suspend;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc3_pins &wl18xx_pins>;
|
||||
|
@ -743,8 +743,7 @@ xbar-event-map element */
|
||||
bus-width = <4>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc3_pins &wlan_pins>;
|
||||
ti,non-removable;
|
||||
ti,needs-special-hs-handling;
|
||||
non-removable;
|
||||
cap-power-off-card;
|
||||
keep-power-in-suspend;
|
||||
|
||||
|
@ -655,7 +655,7 @@ &gpio0 {
|
||||
&mmc2 {
|
||||
status = "okay";
|
||||
vmmc-supply = <&wl12xx_vmmc>;
|
||||
ti,non-removable;
|
||||
non-removable;
|
||||
bus-width = <4>;
|
||||
cap-power-off-card;
|
||||
keep-power-in-suspend;
|
||||
|
@ -339,7 +339,7 @@ &mmc2 {
|
||||
pinctrl-0 = <&emmc_pins>;
|
||||
vmmc-supply = <&vmmcsd_fixed>;
|
||||
bus-width = <8>;
|
||||
ti,non-removable;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -159,7 +159,7 @@ &mmc2 {
|
||||
vmmc-supply = <&vmmcsd_fixed>;
|
||||
bus-width = <8>;
|
||||
pinctrl-0 = <&mmc1_pins_default>;
|
||||
ti,non-removable;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -451,7 +451,7 @@ &mmc3 {
|
||||
vmmc-supply = <&vmmcsd_fixed>;
|
||||
bus-width = <8>;
|
||||
pinctrl-0 = <&mmc2_pins_default>;
|
||||
ti,non-removable;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -341,7 +341,7 @@ &mmc2 {
|
||||
pinctrl-0 = <&emmc_pins>;
|
||||
vmmc-supply = <&ldo3_reg>;
|
||||
bus-width = <8>;
|
||||
ti,non-removable;
|
||||
non-removable;
|
||||
};
|
||||
|
||||
&mmc3 {
|
||||
@ -351,7 +351,7 @@ &mmc3 {
|
||||
pinctrl-0 = <&wireless_pins>;
|
||||
vmmmc-supply = <&v3v3c_reg>;
|
||||
bus-width = <4>;
|
||||
ti,non-removable;
|
||||
non-removable;
|
||||
dmas = <&edma_xbar 12 0 1
|
||||
&edma_xbar 13 0 2>;
|
||||
dma-names = "tx", "rx";
|
||||
|
@ -69,7 +69,7 @@ &mmc2 {
|
||||
pinctrl-0 = <&emmc_pins>;
|
||||
vmmc-supply = <&vmmc_reg>;
|
||||
bus-width = <8>;
|
||||
ti,non-removable;
|
||||
non-removable;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -88,7 +88,6 @@ AM33XX_PADCONF(AM335X_PIN_MMC0_DAT2, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_MMC0_DAT3, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_MMC0_CMD, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_MMC0_CLK, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_MCASP0_ACLKR, PIN_INPUT, MUX_MODE4) /* (B12) mcasp0_aclkr.mmc0_sdwp */
|
||||
>;
|
||||
};
|
||||
|
||||
|
@ -1335,10 +1335,8 @@ SYSC_OMAP2_SOFTRESET |
|
||||
ranges = <0x0 0x60000 0x1000>;
|
||||
|
||||
mmc1: mmc@0 {
|
||||
compatible = "ti,omap4-hsmmc";
|
||||
ti,dual-volt;
|
||||
compatible = "ti,am335-sdhci";
|
||||
ti,needs-special-reset;
|
||||
ti,needs-special-hs-handling;
|
||||
dmas = <&edma_xbar 24 0 0
|
||||
&edma_xbar 25 0 0>;
|
||||
dma-names = "tx", "rx";
|
||||
@ -1816,7 +1814,7 @@ SYSC_OMAP2_SOFTRESET |
|
||||
ranges = <0x0 0xd8000 0x1000>;
|
||||
|
||||
mmc2: mmc@0 {
|
||||
compatible = "ti,omap4-hsmmc";
|
||||
compatible = "ti,am335-sdhci";
|
||||
ti,needs-special-reset;
|
||||
dmas = <&edma 2 0
|
||||
&edma 3 0>;
|
||||
|
@ -322,10 +322,11 @@ SYSC_OMAP2_SOFTRESET |
|
||||
ranges = <0x0 0x47810000 0x1000>;
|
||||
|
||||
mmc3: mmc@0 {
|
||||
compatible = "ti,omap4-hsmmc";
|
||||
compatible = "ti,am335-sdhci";
|
||||
ti,needs-special-reset;
|
||||
interrupts = <29>;
|
||||
reg = <0x0 0x1000>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
@ -335,7 +336,7 @@ usb: target-module@47400000 {
|
||||
<0x47400010 0x4>;
|
||||
reg-names = "rev", "sysc";
|
||||
ti,sysc-mask = <(SYSC_OMAP4_FREEEMU |
|
||||
SYSC_OMAP2_SOFTRESET)>;
|
||||
SYSC_OMAP4_SOFTRESET)>;
|
||||
ti,sysc-midle = <SYSC_IDLE_FORCE>,
|
||||
<SYSC_IDLE_NO>,
|
||||
<SYSC_IDLE_SMART>;
|
||||
@ -347,7 +348,7 @@ usb: target-module@47400000 {
|
||||
clock-names = "fck";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x47400000 0x5000>;
|
||||
ranges = <0x0 0x47400000 0x8000>;
|
||||
|
||||
usb0_phy: usb-phy@1300 {
|
||||
compatible = "ti,am335x-usb-phy";
|
||||
|
@ -316,10 +316,11 @@ SYSC_OMAP2_SOFTRESET |
|
||||
ranges = <0x0 0x47810000 0x1000>;
|
||||
|
||||
mmc3: mmc@0 {
|
||||
compatible = "ti,omap4-hsmmc";
|
||||
compatible = "ti,am437-sdhci";
|
||||
ti,needs-special-reset;
|
||||
interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg = <0x0 0x1000>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -291,7 +291,7 @@ &mmc2 {
|
||||
pinctrl-0 = <&emmc_pins>;
|
||||
vmmc-supply = <&vmmc_3v3>;
|
||||
bus-width = <8>;
|
||||
ti,non-removable;
|
||||
non-removable;
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
|
@ -91,22 +91,6 @@ lcd0: display {
|
||||
|
||||
backlight = <&lcd_bl>;
|
||||
|
||||
panel-timing {
|
||||
clock-frequency = <33000000>;
|
||||
hactive = <800>;
|
||||
vactive = <480>;
|
||||
hfront-porch = <210>;
|
||||
hback-porch = <16>;
|
||||
hsync-len = <30>;
|
||||
vback-porch = <10>;
|
||||
vfront-porch = <22>;
|
||||
vsync-len = <13>;
|
||||
hsync-active = <0>;
|
||||
vsync-active = <0>;
|
||||
de-active = <1>;
|
||||
pixelclk-active = <1>;
|
||||
};
|
||||
|
||||
port {
|
||||
lcd_in: endpoint {
|
||||
remote-endpoint = <&dpi_out>;
|
||||
@ -869,7 +853,7 @@ &mmc2 {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&emmc_pins_default>;
|
||||
pinctrl-1 = <&emmc_pins_sleep>;
|
||||
ti,non-removable;
|
||||
non-removable;
|
||||
};
|
||||
|
||||
&mmc3 {
|
||||
@ -886,7 +870,7 @@ xbar-event-map element */
|
||||
pinctrl-1 = <&mmc3_pins_sleep>;
|
||||
cap-power-off-card;
|
||||
keep-power-in-suspend;
|
||||
ti,non-removable;
|
||||
non-removable;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
@ -1083,9 +1083,8 @@ SYSC_OMAP2_SOFTRESET |
|
||||
ranges = <0x0 0x60000 0x1000>;
|
||||
|
||||
mmc1: mmc@0 {
|
||||
compatible = "ti,omap4-hsmmc";
|
||||
compatible = "ti,am437-sdhci";
|
||||
reg = <0x0 0x1000>;
|
||||
ti,dual-volt;
|
||||
ti,needs-special-reset;
|
||||
dmas = <&edma 24 0>,
|
||||
<&edma 25 0>;
|
||||
@ -1598,7 +1597,7 @@ SYSC_OMAP2_SOFTRESET |
|
||||
ranges = <0x0 0xd8000 0x1000>;
|
||||
|
||||
mmc2: mmc@0 {
|
||||
compatible = "ti,omap4-hsmmc";
|
||||
compatible = "ti,am437-sdhci";
|
||||
reg = <0x0 0x1000>;
|
||||
ti,needs-special-reset;
|
||||
dmas = <&edma 2 0>,
|
||||
|
@ -134,22 +134,6 @@ lcd0: display {
|
||||
|
||||
enable-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
panel-timing {
|
||||
clock-frequency = <9000000>;
|
||||
hactive = <480>;
|
||||
vactive = <272>;
|
||||
hfront-porch = <2>;
|
||||
hback-porch = <2>;
|
||||
hsync-len = <41>;
|
||||
vfront-porch = <2>;
|
||||
vback-porch = <2>;
|
||||
vsync-len = <10>;
|
||||
hsync-active = <0>;
|
||||
vsync-active = <0>;
|
||||
de-active = <1>;
|
||||
pixelclk-active = <1>;
|
||||
};
|
||||
|
||||
port {
|
||||
lcd_in: endpoint {
|
||||
remote-endpoint = <&dpi_out>;
|
||||
@ -719,7 +703,7 @@ &mmc3 {
|
||||
pinctrl-1 = <&mmc3_pins_sleep>;
|
||||
cap-power-off-card;
|
||||
keep-power-in-suspend;
|
||||
ti,non-removable;
|
||||
non-removable;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
@ -47,22 +47,6 @@ lcd0: display {
|
||||
|
||||
backlight = <&lcd_bl>;
|
||||
|
||||
panel-timing {
|
||||
clock-frequency = <33000000>;
|
||||
hactive = <800>;
|
||||
vactive = <480>;
|
||||
hfront-porch = <210>;
|
||||
hback-porch = <16>;
|
||||
hsync-len = <30>;
|
||||
vback-porch = <10>;
|
||||
vfront-porch = <22>;
|
||||
vsync-len = <13>;
|
||||
hsync-active = <0>;
|
||||
vsync-active = <0>;
|
||||
de-active = <1>;
|
||||
pixelclk-active = <1>;
|
||||
};
|
||||
|
||||
port {
|
||||
lcd_in: endpoint {
|
||||
remote-endpoint = <&dpi_out>;
|
||||
|
@ -505,7 +505,7 @@ &mac {
|
||||
|
||||
&cpsw_emac0 {
|
||||
phy-handle = <&phy0>;
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-rxid";
|
||||
};
|
||||
|
||||
&ocp {
|
||||
|
@ -200,7 +200,7 @@ uart1: serial@400 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
dma@20000 {
|
||||
dma: dma@20000 {
|
||||
compatible = "arm,pl330", "arm,primecell";
|
||||
reg = <0x20000 0x1000>;
|
||||
interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>,
|
||||
@ -215,6 +215,8 @@ dma@20000 {
|
||||
clocks = <&iprocslow>;
|
||||
clock-names = "apb_pclk";
|
||||
#dma-cells = <1>;
|
||||
dma-coherent;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sdio: sdhci@21000 {
|
||||
@ -257,10 +259,10 @@ amac2: ethernet@24000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
mailbox: mailbox@25000 {
|
||||
mailbox: mailbox@25c00 {
|
||||
compatible = "brcm,iproc-fa2-mbox";
|
||||
reg = <0x25000 0x445>;
|
||||
interrupts = <GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg = <0x25c00 0x400>;
|
||||
interrupts = <GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#mbox-cells = <1>;
|
||||
brcm,rx-status-len = <32>;
|
||||
brcm,use-bcm-hdr;
|
||||
|
@ -17,6 +17,7 @@ chosen {
|
||||
};
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x00000000 0x08000000
|
||||
0x88000000 0x18000000>;
|
||||
};
|
||||
|
@ -58,6 +58,10 @@ gpio-restart {
|
||||
|
||||
/* USB 3 support needed to be complete */
|
||||
|
||||
&dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&amac0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -58,6 +58,10 @@ gpio-restart {
|
||||
|
||||
/* USB 3 support needed to be complete */
|
||||
|
||||
&dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&amac0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -58,6 +58,10 @@ gpio-restart {
|
||||
|
||||
/* XHCI support needed to be complete */
|
||||
|
||||
&dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&amac0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -58,6 +58,10 @@ gpio-restart {
|
||||
|
||||
/* USB 3 and SLIC support needed to be complete */
|
||||
|
||||
&dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&amac0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -58,6 +58,10 @@ gpio-restart {
|
||||
|
||||
/* USB 3 and SLIC support needed to be complete */
|
||||
|
||||
&dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&amac0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -69,6 +69,10 @@ &i2c0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&amac0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -48,6 +48,10 @@ memory@60000000 {
|
||||
};
|
||||
};
|
||||
|
||||
&dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&amac0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -245,26 +245,6 @@ &mcasp3 {
|
||||
rx-num-evt = <32>;
|
||||
};
|
||||
|
||||
&mailbox5 {
|
||||
status = "okay";
|
||||
mbox_ipu1_ipc3x: mbox_ipu1_ipc3x {
|
||||
status = "okay";
|
||||
};
|
||||
mbox_dsp1_ipc3x: mbox_dsp1_ipc3x {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&mailbox6 {
|
||||
status = "okay";
|
||||
mbox_ipu2_ipc3x: mbox_ipu2_ipc3x {
|
||||
status = "okay";
|
||||
};
|
||||
mbox_dsp2_ipc3x: mbox_dsp2_ipc3x {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1_rc {
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -1207,9 +1207,8 @@ target-module@36000 { /* 0x48036000, ap 9 4e.0 */
|
||||
<SYSC_IDLE_SMART>,
|
||||
<SYSC_IDLE_SMART_WKUP>;
|
||||
/* Domains (P, C): l4per_pwrdm, l4per_clkdm */
|
||||
clocks = <&l4per_clkctrl DRA7_L4PER_TIMER4_CLKCTRL 0>,
|
||||
<&timer_sys_clk_div>;
|
||||
clock-names = "fck", "timer_sys_ck";
|
||||
clocks = <&l4per_clkctrl DRA7_L4PER_TIMER4_CLKCTRL 0>;
|
||||
clock-names = "fck";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x36000 0x1000>;
|
||||
@ -3352,8 +3351,8 @@ target-module@20000 { /* 0x48820000, ap 5 08.0 */
|
||||
<SYSC_IDLE_SMART>,
|
||||
<SYSC_IDLE_SMART_WKUP>;
|
||||
/* Domains (P, C): ipu_pwrdm, ipu_clkdm */
|
||||
clocks = <&ipu_clkctrl DRA7_IPU_TIMER5_CLKCTRL 0>, <&timer_sys_clk_div>;
|
||||
clock-names = "fck", "timer_sys_ck";
|
||||
clocks = <&ipu_clkctrl DRA7_IPU_TIMER5_CLKCTRL 0>;
|
||||
clock-names = "fck";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x20000 0x1000>;
|
||||
@ -3361,8 +3360,8 @@ target-module@20000 { /* 0x48820000, ap 5 08.0 */
|
||||
timer5: timer@0 {
|
||||
compatible = "ti,omap5430-timer";
|
||||
reg = <0x0 0x80>;
|
||||
clocks = <&ipu_clkctrl DRA7_IPU_TIMER5_CLKCTRL 24>;
|
||||
clock-names = "fck";
|
||||
clocks = <&ipu_clkctrl DRA7_IPU_TIMER5_CLKCTRL 24>, <&timer_sys_clk_div>;
|
||||
clock-names = "fck", "timer_sys_ck";
|
||||
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
@ -3379,9 +3378,8 @@ target-module@22000 { /* 0x48822000, ap 7 24.0 */
|
||||
<SYSC_IDLE_SMART>,
|
||||
<SYSC_IDLE_SMART_WKUP>;
|
||||
/* Domains (P, C): ipu_pwrdm, ipu_clkdm */
|
||||
clocks = <&ipu_clkctrl DRA7_IPU_TIMER6_CLKCTRL 0>,
|
||||
<&timer_sys_clk_div>;
|
||||
clock-names = "fck", "timer_sys_ck";
|
||||
clocks = <&ipu_clkctrl DRA7_IPU_TIMER6_CLKCTRL 0>;
|
||||
clock-names = "fck";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x22000 0x1000>;
|
||||
@ -3389,8 +3387,8 @@ target-module@22000 { /* 0x48822000, ap 7 24.0 */
|
||||
timer6: timer@0 {
|
||||
compatible = "ti,omap5430-timer";
|
||||
reg = <0x0 0x80>;
|
||||
clocks = <&ipu_clkctrl DRA7_IPU_TIMER6_CLKCTRL 24>;
|
||||
clock-names = "fck";
|
||||
clocks = <&ipu_clkctrl DRA7_IPU_TIMER6_CLKCTRL 24>, <&timer_sys_clk_div>;
|
||||
clock-names = "fck", "timer_sys_ck";
|
||||
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
@ -3498,8 +3496,8 @@ target-module@2a000 { /* 0x4882a000, ap 15 10.0 */
|
||||
timer14: timer@0 {
|
||||
compatible = "ti,omap5430-timer";
|
||||
reg = <0x0 0x80>;
|
||||
clocks = <&l4per3_clkctrl DRA7_L4PER3_TIMER14_CLKCTRL 24>;
|
||||
clock-names = "fck";
|
||||
clocks = <&l4per3_clkctrl DRA7_L4PER3_TIMER14_CLKCTRL 24>, <&timer_sys_clk_div>;
|
||||
clock-names = "fck", "timer_sys_ck";
|
||||
interrupts = <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>;
|
||||
ti,timer-pwm;
|
||||
};
|
||||
@ -3526,8 +3524,8 @@ target-module@2c000 { /* 0x4882c000, ap 17 02.0 */
|
||||
timer15: timer@0 {
|
||||
compatible = "ti,omap5430-timer";
|
||||
reg = <0x0 0x80>;
|
||||
clocks = <&l4per3_clkctrl DRA7_L4PER3_TIMER15_CLKCTRL 24>;
|
||||
clock-names = "fck";
|
||||
clocks = <&l4per3_clkctrl DRA7_L4PER3_TIMER15_CLKCTRL 24>, <&timer_sys_clk_div>;
|
||||
clock-names = "fck", "timer_sys_ck";
|
||||
interrupts = <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>;
|
||||
ti,timer-pwm;
|
||||
};
|
||||
@ -3554,8 +3552,8 @@ target-module@2e000 { /* 0x4882e000, ap 19 14.0 */
|
||||
timer16: timer@0 {
|
||||
compatible = "ti,omap5430-timer";
|
||||
reg = <0x0 0x80>;
|
||||
clocks = <&l4per3_clkctrl DRA7_L4PER3_TIMER16_CLKCTRL 24>;
|
||||
clock-names = "fck";
|
||||
clocks = <&l4per3_clkctrl DRA7_L4PER3_TIMER16_CLKCTRL 24>, <&timer_sys_clk_div>;
|
||||
clock-names = "fck", "timer_sys_ck";
|
||||
interrupts = <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>;
|
||||
ti,timer-pwm;
|
||||
};
|
||||
|
@ -232,13 +232,6 @@ &usdhc2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wdog1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_wdog>;
|
||||
fsl,ext-reset-output;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&iomuxc {
|
||||
pinctrl-0 = <&pinctrl_reset_out &pinctrl_gpio>;
|
||||
|
||||
@ -409,10 +402,4 @@ MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x170f9
|
||||
MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x170f9
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_wdog: wdoggrp {
|
||||
fsl,pins = <
|
||||
MX6UL_PAD_GPIO1_IO09__WDOG1_WDOG_ANY 0x30b0
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
@ -57,6 +57,13 @@ &qspi {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wdog1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_wdog>;
|
||||
fsl,ext-reset-output;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&iomuxc {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_reset_out>;
|
||||
@ -106,4 +113,10 @@ pinctrl_reset_out: rstoutgrp {
|
||||
MX6UL_PAD_SNVS_TAMPER9__GPIO5_IO09 0x1b0b0
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_wdog: wdoggrp {
|
||||
fsl,pins = <
|
||||
MX6UL_PAD_GPIO1_IO09__WDOG1_WDOG_ANY 0x18b0
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
@ -13,8 +13,10 @@ cpcap: pmic@0 {
|
||||
#interrupt-cells = <2>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
spi-max-frequency = <3000000>;
|
||||
spi-max-frequency = <9600000>;
|
||||
spi-cs-high;
|
||||
spi-cpol;
|
||||
spi-cpha;
|
||||
|
||||
cpcap_adc: adc {
|
||||
compatible = "motorola,mapphone-cpcap-adc";
|
||||
|
@ -139,7 +139,7 @@ &gpmc {
|
||||
ethernet@gpmc {
|
||||
reg = <5 0 0xff>;
|
||||
interrupt-parent = <&gpio2>;
|
||||
interrupts = <12 IRQ_TYPE_EDGE_FALLING>; /* gpio_44 */
|
||||
interrupts = <12 IRQ_TYPE_LEVEL_LOW>; /* gpio_44 */
|
||||
|
||||
phy-mode = "mii";
|
||||
|
||||
|
@ -662,6 +662,6 @@ &timer1_target {
|
||||
ti,no-idle;
|
||||
timer@0 {
|
||||
assigned-clocks = <&l4_wkup_clkctrl OMAP4_TIMER1_CLKCTRL 24>;
|
||||
assigned-clock-parents = <&sys_clkin_ck>;
|
||||
assigned-clock-parents = <&sys_32k_ck>;
|
||||
};
|
||||
};
|
||||
|
@ -100,79 +100,6 @@ led-8 {
|
||||
};
|
||||
};
|
||||
|
||||
mcc {
|
||||
compatible = "arm,vexpress,config-bus";
|
||||
arm,vexpress,config-bridge = <&v2m_sysreg>;
|
||||
|
||||
oscclk0 {
|
||||
/* MCC static memory clock */
|
||||
compatible = "arm,vexpress-osc";
|
||||
arm,vexpress-sysreg,func = <1 0>;
|
||||
freq-range = <25000000 60000000>;
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "v2m:oscclk0";
|
||||
};
|
||||
|
||||
v2m_oscclk1: oscclk1 {
|
||||
/* CLCD clock */
|
||||
compatible = "arm,vexpress-osc";
|
||||
arm,vexpress-sysreg,func = <1 1>;
|
||||
freq-range = <23750000 65000000>;
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "v2m:oscclk1";
|
||||
};
|
||||
|
||||
v2m_oscclk2: oscclk2 {
|
||||
/* IO FPGA peripheral clock */
|
||||
compatible = "arm,vexpress-osc";
|
||||
arm,vexpress-sysreg,func = <1 2>;
|
||||
freq-range = <24000000 24000000>;
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "v2m:oscclk2";
|
||||
};
|
||||
|
||||
volt-vio {
|
||||
/* Logic level voltage */
|
||||
compatible = "arm,vexpress-volt";
|
||||
arm,vexpress-sysreg,func = <2 0>;
|
||||
regulator-name = "VIO";
|
||||
regulator-always-on;
|
||||
label = "VIO";
|
||||
};
|
||||
|
||||
temp-mcc {
|
||||
/* MCC internal operating temperature */
|
||||
compatible = "arm,vexpress-temp";
|
||||
arm,vexpress-sysreg,func = <4 0>;
|
||||
label = "MCC";
|
||||
};
|
||||
|
||||
reset {
|
||||
compatible = "arm,vexpress-reset";
|
||||
arm,vexpress-sysreg,func = <5 0>;
|
||||
};
|
||||
|
||||
muxfpga {
|
||||
compatible = "arm,vexpress-muxfpga";
|
||||
arm,vexpress-sysreg,func = <7 0>;
|
||||
};
|
||||
|
||||
shutdown {
|
||||
compatible = "arm,vexpress-shutdown";
|
||||
arm,vexpress-sysreg,func = <8 0>;
|
||||
};
|
||||
|
||||
reboot {
|
||||
compatible = "arm,vexpress-reboot";
|
||||
arm,vexpress-sysreg,func = <9 0>;
|
||||
};
|
||||
|
||||
dvimode {
|
||||
compatible = "arm,vexpress-dvimode";
|
||||
arm,vexpress-sysreg,func = <11 0>;
|
||||
};
|
||||
};
|
||||
|
||||
bus@8000000 {
|
||||
motherboard-bus {
|
||||
model = "V2M-P1";
|
||||
@ -435,6 +362,79 @@ clcd_pads: endpoint {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
mcc {
|
||||
compatible = "arm,vexpress,config-bus";
|
||||
arm,vexpress,config-bridge = <&v2m_sysreg>;
|
||||
|
||||
oscclk0 {
|
||||
/* MCC static memory clock */
|
||||
compatible = "arm,vexpress-osc";
|
||||
arm,vexpress-sysreg,func = <1 0>;
|
||||
freq-range = <25000000 60000000>;
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "v2m:oscclk0";
|
||||
};
|
||||
|
||||
v2m_oscclk1: oscclk1 {
|
||||
/* CLCD clock */
|
||||
compatible = "arm,vexpress-osc";
|
||||
arm,vexpress-sysreg,func = <1 1>;
|
||||
freq-range = <23750000 65000000>;
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "v2m:oscclk1";
|
||||
};
|
||||
|
||||
v2m_oscclk2: oscclk2 {
|
||||
/* IO FPGA peripheral clock */
|
||||
compatible = "arm,vexpress-osc";
|
||||
arm,vexpress-sysreg,func = <1 2>;
|
||||
freq-range = <24000000 24000000>;
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "v2m:oscclk2";
|
||||
};
|
||||
|
||||
volt-vio {
|
||||
/* Logic level voltage */
|
||||
compatible = "arm,vexpress-volt";
|
||||
arm,vexpress-sysreg,func = <2 0>;
|
||||
regulator-name = "VIO";
|
||||
regulator-always-on;
|
||||
label = "VIO";
|
||||
};
|
||||
|
||||
temp-mcc {
|
||||
/* MCC internal operating temperature */
|
||||
compatible = "arm,vexpress-temp";
|
||||
arm,vexpress-sysreg,func = <4 0>;
|
||||
label = "MCC";
|
||||
};
|
||||
|
||||
reset {
|
||||
compatible = "arm,vexpress-reset";
|
||||
arm,vexpress-sysreg,func = <5 0>;
|
||||
};
|
||||
|
||||
muxfpga {
|
||||
compatible = "arm,vexpress-muxfpga";
|
||||
arm,vexpress-sysreg,func = <7 0>;
|
||||
};
|
||||
|
||||
shutdown {
|
||||
compatible = "arm,vexpress-shutdown";
|
||||
arm,vexpress-sysreg,func = <8 0>;
|
||||
};
|
||||
|
||||
reboot {
|
||||
compatible = "arm,vexpress-reboot";
|
||||
arm,vexpress-sysreg,func = <9 0>;
|
||||
};
|
||||
|
||||
dvimode {
|
||||
compatible = "arm,vexpress-dvimode";
|
||||
arm,vexpress-sysreg,func = <11 0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -87,4 +87,11 @@ static inline unsigned long efi_get_max_initrd_addr(unsigned long dram_base,
|
||||
return dram_base + SZ_512M;
|
||||
}
|
||||
|
||||
struct efi_arm_entry_state {
|
||||
u32 cpsr_before_ebs;
|
||||
u32 sctlr_before_ebs;
|
||||
u32 cpsr_after_ebs;
|
||||
u32 sctlr_after_ebs;
|
||||
};
|
||||
|
||||
#endif /* _ASM_ARM_EFI_H */
|
||||
|
@ -53,6 +53,7 @@ config ARCH_BCM_NSP
|
||||
select ARM_ERRATA_754322
|
||||
select ARM_ERRATA_775420
|
||||
select ARM_ERRATA_764369 if SMP
|
||||
select ARM_TIMER_SP804
|
||||
select THERMAL
|
||||
select THERMAL_OF
|
||||
help
|
||||
|
@ -295,14 +295,14 @@ static int __init imx_suspend_alloc_ocram(
|
||||
if (!ocram_pool) {
|
||||
pr_warn("%s: ocram pool unavailable!\n", __func__);
|
||||
ret = -ENODEV;
|
||||
goto put_node;
|
||||
goto put_device;
|
||||
}
|
||||
|
||||
ocram_base = gen_pool_alloc(ocram_pool, size);
|
||||
if (!ocram_base) {
|
||||
pr_warn("%s: unable to alloc ocram!\n", __func__);
|
||||
ret = -ENOMEM;
|
||||
goto put_node;
|
||||
goto put_device;
|
||||
}
|
||||
|
||||
phys = gen_pool_virt_to_phys(ocram_pool, ocram_base);
|
||||
@ -312,6 +312,8 @@ static int __init imx_suspend_alloc_ocram(
|
||||
if (virt_out)
|
||||
*virt_out = virt;
|
||||
|
||||
put_device:
|
||||
put_device(&pdev->dev);
|
||||
put_node:
|
||||
of_node_put(node);
|
||||
|
||||
|
@ -493,14 +493,14 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
|
||||
if (!ocram_pool) {
|
||||
pr_warn("%s: ocram pool unavailable!\n", __func__);
|
||||
ret = -ENODEV;
|
||||
goto put_node;
|
||||
goto put_device;
|
||||
}
|
||||
|
||||
ocram_base = gen_pool_alloc(ocram_pool, MX6Q_SUSPEND_OCRAM_SIZE);
|
||||
if (!ocram_base) {
|
||||
pr_warn("%s: unable to alloc ocram!\n", __func__);
|
||||
ret = -ENOMEM;
|
||||
goto put_node;
|
||||
goto put_device;
|
||||
}
|
||||
|
||||
ocram_pbase = gen_pool_virt_to_phys(ocram_pool, ocram_base);
|
||||
@ -523,7 +523,7 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
|
||||
ret = imx6_pm_get_base(&pm_info->mmdc_base, socdata->mmdc_compat);
|
||||
if (ret) {
|
||||
pr_warn("%s: failed to get mmdc base %d!\n", __func__, ret);
|
||||
goto put_node;
|
||||
goto put_device;
|
||||
}
|
||||
|
||||
ret = imx6_pm_get_base(&pm_info->src_base, socdata->src_compat);
|
||||
@ -570,7 +570,7 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
|
||||
&imx6_suspend,
|
||||
MX6Q_SUSPEND_OCRAM_SIZE - sizeof(*pm_info));
|
||||
|
||||
goto put_node;
|
||||
goto put_device;
|
||||
|
||||
pl310_cache_map_failed:
|
||||
iounmap(pm_info->gpc_base.vbase);
|
||||
@ -580,6 +580,8 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
|
||||
iounmap(pm_info->src_base.vbase);
|
||||
src_map_failed:
|
||||
iounmap(pm_info->mmdc_base.vbase);
|
||||
put_device:
|
||||
put_device(&pdev->dev);
|
||||
put_node:
|
||||
of_node_put(node);
|
||||
|
||||
|
@ -3489,7 +3489,7 @@ static const struct omap_hwmod_reset dra7_reset_quirks[] = {
|
||||
};
|
||||
|
||||
static const struct omap_hwmod_reset omap_reset_quirks[] = {
|
||||
{ .match = "dss", .len = 3, .reset = omap_dss_reset, },
|
||||
{ .match = "dss_core", .len = 8, .reset = omap_dss_reset, },
|
||||
{ .match = "hdq1w", .len = 5, .reset = omap_hdq1w_reset, },
|
||||
{ .match = "i2c", .len = 3, .reset = omap_i2c_reset, },
|
||||
{ .match = "wd_timer", .len = 8, .reset = omap2_wd_timer_reset, },
|
||||
|
@ -20,14 +20,6 @@ static const char *const stih41x_dt_match[] __initconst = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static void sti_l2_write_sec(unsigned long val, unsigned reg)
|
||||
{
|
||||
/*
|
||||
* We can't write to secure registers as we are in non-secure
|
||||
* mode, until we have some SMI service available.
|
||||
*/
|
||||
}
|
||||
|
||||
DT_MACHINE_START(STM, "STi SoC with Flattened Device Tree")
|
||||
.dt_compat = stih41x_dt_match,
|
||||
.l2c_aux_val = L2C_AUX_CTRL_SHARED_OVERRIDE |
|
||||
@ -36,5 +28,4 @@ DT_MACHINE_START(STM, "STi SoC with Flattened Device Tree")
|
||||
L2C_AUX_CTRL_WAY_SIZE(4),
|
||||
.l2c_aux_mask = 0xc0000fff,
|
||||
.smp = smp_ops(sti_smp_ops),
|
||||
.l2c_write_sec = sti_l2_write_sec,
|
||||
MACHINE_END
|
||||
|
@ -1518,9 +1518,9 @@ config ARM64_PTR_AUTH
|
||||
default y
|
||||
depends on !KVM || ARM64_VHE
|
||||
depends on (CC_HAS_SIGN_RETURN_ADDRESS || CC_HAS_BRANCH_PROT_PAC_RET) && AS_HAS_PAC
|
||||
# GCC 9.1 and later inserts a .note.gnu.property section note for PAC
|
||||
# Modern compilers insert a .note.gnu.property section note for PAC
|
||||
# which is only understood by binutils starting with version 2.33.1.
|
||||
depends on !CC_IS_GCC || GCC_VERSION < 90100 || LD_VERSION >= 233010000
|
||||
depends on LD_IS_LLD || LD_VERSION >= 233010000 || (CC_IS_GCC && GCC_VERSION < 90100)
|
||||
depends on !CC_IS_CLANG || AS_HAS_CFI_NEGATE_RA_STATE
|
||||
depends on (!FUNCTION_GRAPH_TRACER || DYNAMIC_FTRACE_WITH_REGS)
|
||||
help
|
||||
|
@ -136,7 +136,7 @@ buck6_reg: BUCK6 {
|
||||
|
||||
ldo1_reg: LDO1 {
|
||||
regulator-name = "LDO1";
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-min-microvolt = <1600000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
@ -144,7 +144,7 @@ ldo1_reg: LDO1 {
|
||||
|
||||
ldo2_reg: LDO2 {
|
||||
regulator-name = "LDO2";
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-min-microvolt = <800000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
|
@ -208,7 +208,7 @@ buck6_reg: BUCK6 {
|
||||
|
||||
ldo1_reg: LDO1 {
|
||||
regulator-name = "LDO1";
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-min-microvolt = <1600000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
@ -216,7 +216,7 @@ ldo1_reg: LDO1 {
|
||||
|
||||
ldo2_reg: LDO2 {
|
||||
regulator-name = "LDO2";
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-min-microvolt = <800000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
|
@ -113,7 +113,7 @@ buck6_reg: BUCK6 {
|
||||
|
||||
ldo1_reg: LDO1 {
|
||||
regulator-name = "LDO1";
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-min-microvolt = <1600000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
@ -121,7 +121,7 @@ ldo1_reg: LDO1 {
|
||||
|
||||
ldo2_reg: LDO2 {
|
||||
regulator-name = "LDO2";
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-min-microvolt = <800000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
|
@ -12,7 +12,6 @@
|
||||
* instead.
|
||||
*/
|
||||
#define BTI_C hint 34 ;
|
||||
#define BTI_J hint 36 ;
|
||||
|
||||
/*
|
||||
* When using in-kernel BTI we need to ensure that PCS-conformant assembly
|
||||
@ -43,11 +42,6 @@
|
||||
SYM_START(name, SYM_L_WEAK, SYM_A_NONE) \
|
||||
BTI_C
|
||||
|
||||
#define SYM_INNER_LABEL(name, linkage) \
|
||||
.type name SYM_T_NONE ASM_NL \
|
||||
SYM_ENTRY(name, linkage, SYM_A_NONE) \
|
||||
BTI_J
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -19,6 +19,9 @@
|
||||
|
||||
typedef struct {
|
||||
atomic64_t id;
|
||||
#ifdef CONFIG_COMPAT
|
||||
void *sigpage;
|
||||
#endif
|
||||
void *vdso;
|
||||
unsigned long flags;
|
||||
} mm_context_t;
|
||||
|
@ -29,9 +29,7 @@ $(obj)/%.stub.o: $(obj)/%.o FORCE
|
||||
|
||||
obj-$(CONFIG_COMPAT) += sys32.o signal32.o \
|
||||
sys_compat.o
|
||||
ifneq ($(CONFIG_COMPAT_VDSO), y)
|
||||
obj-$(CONFIG_COMPAT) += sigreturn32.o
|
||||
endif
|
||||
obj-$(CONFIG_KUSER_HELPERS) += kuser32.o
|
||||
obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o entry-ftrace.o
|
||||
obj-$(CONFIG_MODULES) += module.o
|
||||
|
@ -460,6 +460,8 @@ static const struct midr_range arm64_ssb_cpus[] = {
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A53),
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A55),
|
||||
MIDR_ALL_VERSIONS(MIDR_BRAHMA_B53),
|
||||
MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_3XX_SILVER),
|
||||
MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_4XX_SILVER),
|
||||
{},
|
||||
};
|
||||
|
||||
|
@ -1290,6 +1290,8 @@ static bool unmap_kernel_at_el0(const struct arm64_cpu_capabilities *entry,
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A73),
|
||||
MIDR_ALL_VERSIONS(MIDR_HISI_TSV110),
|
||||
MIDR_ALL_VERSIONS(MIDR_NVIDIA_CARMEL),
|
||||
MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_3XX_SILVER),
|
||||
MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_4XX_SILVER),
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
char const *str = "kpti command line option";
|
||||
|
@ -15,15 +15,34 @@ u64 perf_reg_value(struct pt_regs *regs, int idx)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Compat (i.e. 32 bit) mode:
|
||||
* - PC has been set in the pt_regs struct in kernel_entry,
|
||||
* - Handle SP and LR here.
|
||||
* Our handling of compat tasks (PERF_SAMPLE_REGS_ABI_32) is weird, but
|
||||
* we're stuck with it for ABI compatability reasons.
|
||||
*
|
||||
* For a 32-bit consumer inspecting a 32-bit task, then it will look at
|
||||
* the first 16 registers (see arch/arm/include/uapi/asm/perf_regs.h).
|
||||
* These correspond directly to a prefix of the registers saved in our
|
||||
* 'struct pt_regs', with the exception of the PC, so we copy that down
|
||||
* (x15 corresponds to SP_hyp in the architecture).
|
||||
*
|
||||
* So far, so good.
|
||||
*
|
||||
* The oddity arises when a 64-bit consumer looks at a 32-bit task and
|
||||
* asks for registers beyond PERF_REG_ARM_MAX. In this case, we return
|
||||
* SP_usr, LR_usr and PC in the positions where the AArch64 SP, LR and
|
||||
* PC registers would normally live. The initial idea was to allow a
|
||||
* 64-bit unwinder to unwind a 32-bit task and, although it's not clear
|
||||
* how well that works in practice, somebody might be relying on it.
|
||||
*
|
||||
* At the time we make a sample, we don't know whether the consumer is
|
||||
* 32-bit or 64-bit, so we have to cater for both possibilities.
|
||||
*/
|
||||
if (compat_user_mode(regs)) {
|
||||
if ((u32)idx == PERF_REG_ARM64_SP)
|
||||
return regs->compat_sp;
|
||||
if ((u32)idx == PERF_REG_ARM64_LR)
|
||||
return regs->compat_lr;
|
||||
if (idx == 15)
|
||||
return regs->pc;
|
||||
}
|
||||
|
||||
if ((u32)idx == PERF_REG_ARM64_SP)
|
||||
|
@ -120,15 +120,9 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
|
||||
|
||||
void *alloc_insn_page(void)
|
||||
{
|
||||
void *page;
|
||||
|
||||
page = vmalloc_exec(PAGE_SIZE);
|
||||
if (page) {
|
||||
set_memory_ro((unsigned long)page, 1);
|
||||
set_vm_flush_reset_perms(page);
|
||||
}
|
||||
|
||||
return page;
|
||||
return __vmalloc_node_range(PAGE_SIZE, 1, VMALLOC_START, VMALLOC_END,
|
||||
GFP_KERNEL, PAGE_KERNEL_ROX, VM_FLUSH_RESET_PERMS,
|
||||
NUMA_NO_NODE, __func__);
|
||||
}
|
||||
|
||||
/* arm kprobe: install breakpoint in text */
|
||||
|
@ -342,38 +342,13 @@ static void compat_setup_return(struct pt_regs *regs, struct k_sigaction *ka,
|
||||
retcode = ptr_to_compat(ka->sa.sa_restorer);
|
||||
} else {
|
||||
/* Set up sigreturn pointer */
|
||||
#ifdef CONFIG_COMPAT_VDSO
|
||||
void *vdso_base = current->mm->context.vdso;
|
||||
void *vdso_trampoline;
|
||||
|
||||
if (ka->sa.sa_flags & SA_SIGINFO) {
|
||||
if (thumb) {
|
||||
vdso_trampoline = VDSO_SYMBOL(vdso_base,
|
||||
compat_rt_sigreturn_thumb);
|
||||
} else {
|
||||
vdso_trampoline = VDSO_SYMBOL(vdso_base,
|
||||
compat_rt_sigreturn_arm);
|
||||
}
|
||||
} else {
|
||||
if (thumb) {
|
||||
vdso_trampoline = VDSO_SYMBOL(vdso_base,
|
||||
compat_sigreturn_thumb);
|
||||
} else {
|
||||
vdso_trampoline = VDSO_SYMBOL(vdso_base,
|
||||
compat_sigreturn_arm);
|
||||
}
|
||||
}
|
||||
|
||||
retcode = ptr_to_compat(vdso_trampoline) + thumb;
|
||||
#else
|
||||
unsigned int idx = thumb << 1;
|
||||
|
||||
if (ka->sa.sa_flags & SA_SIGINFO)
|
||||
idx += 3;
|
||||
|
||||
retcode = (unsigned long)current->mm->context.vdso +
|
||||
retcode = (unsigned long)current->mm->context.sigpage +
|
||||
(idx << 2) + thumb;
|
||||
#endif
|
||||
}
|
||||
|
||||
regs->regs[0] = usig;
|
||||
|
@ -191,15 +191,12 @@ enum aarch32_map {
|
||||
#ifdef CONFIG_COMPAT_VDSO
|
||||
AA32_MAP_VVAR,
|
||||
AA32_MAP_VDSO,
|
||||
#else
|
||||
AA32_MAP_SIGPAGE
|
||||
#endif
|
||||
AA32_MAP_SIGPAGE
|
||||
};
|
||||
|
||||
static struct page *aarch32_vectors_page __ro_after_init;
|
||||
#ifndef CONFIG_COMPAT_VDSO
|
||||
static struct page *aarch32_sig_page __ro_after_init;
|
||||
#endif
|
||||
|
||||
static struct vm_special_mapping aarch32_vdso_maps[] = {
|
||||
[AA32_MAP_VECTORS] = {
|
||||
@ -214,12 +211,11 @@ static struct vm_special_mapping aarch32_vdso_maps[] = {
|
||||
.name = "[vdso]",
|
||||
.mremap = aarch32_vdso_mremap,
|
||||
},
|
||||
#else
|
||||
#endif /* CONFIG_COMPAT_VDSO */
|
||||
[AA32_MAP_SIGPAGE] = {
|
||||
.name = "[sigpage]", /* ABI */
|
||||
.pages = &aarch32_sig_page,
|
||||
},
|
||||
#endif /* CONFIG_COMPAT_VDSO */
|
||||
};
|
||||
|
||||
static int aarch32_alloc_kuser_vdso_page(void)
|
||||
@ -242,27 +238,11 @@ static int aarch32_alloc_kuser_vdso_page(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_COMPAT_VDSO
|
||||
static int __aarch32_alloc_vdso_pages(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
vdso_info[VDSO_ABI_AA32].dm = &aarch32_vdso_maps[AA32_MAP_VVAR];
|
||||
vdso_info[VDSO_ABI_AA32].cm = &aarch32_vdso_maps[AA32_MAP_VDSO];
|
||||
|
||||
ret = __vdso_init(VDSO_ABI_AA32);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return aarch32_alloc_kuser_vdso_page();
|
||||
}
|
||||
#else
|
||||
static int __aarch32_alloc_vdso_pages(void)
|
||||
static int aarch32_alloc_sigpage(void)
|
||||
{
|
||||
extern char __aarch32_sigret_code_start[], __aarch32_sigret_code_end[];
|
||||
int sigret_sz = __aarch32_sigret_code_end - __aarch32_sigret_code_start;
|
||||
unsigned long sigpage;
|
||||
int ret;
|
||||
|
||||
sigpage = get_zeroed_page(GFP_ATOMIC);
|
||||
if (!sigpage)
|
||||
@ -271,18 +251,34 @@ static int __aarch32_alloc_vdso_pages(void)
|
||||
memcpy((void *)sigpage, __aarch32_sigret_code_start, sigret_sz);
|
||||
aarch32_sig_page = virt_to_page(sigpage);
|
||||
flush_dcache_page(aarch32_sig_page);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = aarch32_alloc_kuser_vdso_page();
|
||||
if (ret)
|
||||
free_page(sigpage);
|
||||
#ifdef CONFIG_COMPAT_VDSO
|
||||
static int __aarch32_alloc_vdso_pages(void)
|
||||
{
|
||||
vdso_info[VDSO_ABI_AA32].dm = &aarch32_vdso_maps[AA32_MAP_VVAR];
|
||||
vdso_info[VDSO_ABI_AA32].cm = &aarch32_vdso_maps[AA32_MAP_VDSO];
|
||||
|
||||
return ret;
|
||||
return __vdso_init(VDSO_ABI_AA32);
|
||||
}
|
||||
#endif /* CONFIG_COMPAT_VDSO */
|
||||
|
||||
static int __init aarch32_alloc_vdso_pages(void)
|
||||
{
|
||||
return __aarch32_alloc_vdso_pages();
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_COMPAT_VDSO
|
||||
ret = __aarch32_alloc_vdso_pages();
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
ret = aarch32_alloc_sigpage();
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return aarch32_alloc_kuser_vdso_page();
|
||||
}
|
||||
arch_initcall(aarch32_alloc_vdso_pages);
|
||||
|
||||
@ -305,7 +301,6 @@ static int aarch32_kuser_helpers_setup(struct mm_struct *mm)
|
||||
return PTR_ERR_OR_ZERO(ret);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_COMPAT_VDSO
|
||||
static int aarch32_sigreturn_setup(struct mm_struct *mm)
|
||||
{
|
||||
unsigned long addr;
|
||||
@ -328,12 +323,11 @@ static int aarch32_sigreturn_setup(struct mm_struct *mm)
|
||||
if (IS_ERR(ret))
|
||||
goto out;
|
||||
|
||||
mm->context.vdso = (void *)addr;
|
||||
mm->context.sigpage = (void *)addr;
|
||||
|
||||
out:
|
||||
return PTR_ERR_OR_ZERO(ret);
|
||||
}
|
||||
#endif /* !CONFIG_COMPAT_VDSO */
|
||||
|
||||
int aarch32_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
|
||||
{
|
||||
@ -352,10 +346,11 @@ int aarch32_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
|
||||
mm,
|
||||
bprm,
|
||||
uses_interp);
|
||||
#else
|
||||
ret = aarch32_sigreturn_setup(mm);
|
||||
if (ret)
|
||||
goto out;
|
||||
#endif /* CONFIG_COMPAT_VDSO */
|
||||
|
||||
ret = aarch32_sigreturn_setup(mm);
|
||||
out:
|
||||
mmap_write_unlock(mm);
|
||||
return ret;
|
||||
|
@ -23,13 +23,14 @@ btildflags-$(CONFIG_ARM64_BTI_KERNEL) += -z force-bti
|
||||
# potential future proofing if we end up with internal calls to the exported
|
||||
# routines, as x86 does (see 6f121e548f83 ("x86, vdso: Reimplement vdso.so
|
||||
# preparation in build-time C")).
|
||||
ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 --hash-style=sysv \
|
||||
-Bsymbolic --eh-frame-hdr --build-id -n $(btildflags-y) -T
|
||||
ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 --hash-style=sysv \
|
||||
-Bsymbolic $(call ld-option, --no-eh-frame-hdr) --build-id -n \
|
||||
$(btildflags-y) -T
|
||||
|
||||
ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18
|
||||
ccflags-y += -DDISABLE_BRANCH_PROFILING
|
||||
|
||||
CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_SCS) \
|
||||
CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_SCS) $(GCC_PLUGINS_CFLAGS) \
|
||||
$(CC_FLAGS_LTO)
|
||||
|
||||
KBUILD_CFLAGS += $(DISABLE_LTO)
|
||||
|
@ -18,29 +18,40 @@
|
||||
|
||||
.text
|
||||
|
||||
/*
|
||||
* NOTE!!! You may notice that all of the .cfi directives in this file have
|
||||
* been commented out. This is because they have been shown to trigger segfaults
|
||||
* in libgcc when unwinding out of a SIGCANCEL handler to invoke pthread
|
||||
* cleanup handlers during the thread cancellation dance. By omitting the
|
||||
* directives, we trigger an arm64-specific fallback path in the unwinder which
|
||||
* recognises the signal frame and restores many of the registers directly from
|
||||
* the sigcontext. Re-enabling the cfi directives here therefore needs to be
|
||||
* much more comprehensive to reduce the risk of further regressions.
|
||||
*/
|
||||
|
||||
/* Ensure that the mysterious NOP can be associated with a function. */
|
||||
.cfi_startproc
|
||||
// .cfi_startproc
|
||||
|
||||
/*
|
||||
* .cfi_signal_frame causes the corresponding Frame Description Entry in the
|
||||
* .eh_frame section to be annotated as a signal frame. This allows DWARF
|
||||
* unwinders (e.g. libstdc++) to implement _Unwind_GetIPInfo(), which permits
|
||||
* unwinding out of the signal trampoline without the need for the mysterious
|
||||
* NOP.
|
||||
* .cfi_signal_frame causes the corresponding Frame Description Entry (FDE) in
|
||||
* the .eh_frame section to be annotated as a signal frame. This allows DWARF
|
||||
* unwinders (e.g. libstdc++) to implement _Unwind_GetIPInfo() and identify
|
||||
* the next frame using the unmodified return address instead of subtracting 1,
|
||||
* which may yield the wrong FDE.
|
||||
*/
|
||||
.cfi_signal_frame
|
||||
// .cfi_signal_frame
|
||||
|
||||
/*
|
||||
* Tell the unwinder where to locate the frame record linking back to the
|
||||
* interrupted context. We don't provide unwind info for registers other
|
||||
* than the frame pointer and the link register here; in practice, this
|
||||
* is sufficient for unwinding in C/C++ based runtimes and the values in
|
||||
* the sigcontext may have been modified by this point anyway. Debuggers
|
||||
* interrupted context. We don't provide unwind info for registers other than
|
||||
* the frame pointer and the link register here; in practice, this is likely to
|
||||
* be insufficient for unwinding in C/C++ based runtimes, especially without a
|
||||
* means to restore the stack pointer. Thankfully, unwinders and debuggers
|
||||
* already have baked-in strategies for attempting to unwind out of signals.
|
||||
*/
|
||||
.cfi_def_cfa x29, 0
|
||||
.cfi_offset x29, 0 * 8
|
||||
.cfi_offset x30, 1 * 8
|
||||
// .cfi_def_cfa x29, 0
|
||||
// .cfi_offset x29, 0 * 8
|
||||
// .cfi_offset x30, 1 * 8
|
||||
|
||||
/*
|
||||
* This mysterious NOP is required for some unwinders (e.g. libc++) that
|
||||
@ -51,16 +62,19 @@
|
||||
nop // Mysterious NOP
|
||||
|
||||
/*
|
||||
* GDB relies on being able to identify the sigreturn instruction sequence to
|
||||
* unwind from signal handlers. We cannot, therefore, use SYM_FUNC_START()
|
||||
* here, as it will emit a BTI C instruction and break the unwinder. Thankfully,
|
||||
* this function is only ever called from a RET and so omitting the landing pad
|
||||
* is perfectly fine.
|
||||
* GDB, libgcc and libunwind rely on being able to identify the sigreturn
|
||||
* instruction sequence to unwind from signal handlers. We cannot, therefore,
|
||||
* use SYM_FUNC_START() here, as it will emit a BTI C instruction and break the
|
||||
* unwinder. Thankfully, this function is only ever called from a RET and so
|
||||
* omitting the landing pad is perfectly fine.
|
||||
*/
|
||||
SYM_CODE_START(__kernel_rt_sigreturn)
|
||||
// PLEASE DO NOT MODIFY
|
||||
mov x8, #__NR_rt_sigreturn
|
||||
// PLEASE DO NOT MODIFY
|
||||
svc #0
|
||||
.cfi_endproc
|
||||
// PLEASE DO NOT MODIFY
|
||||
// .cfi_endproc
|
||||
SYM_CODE_END(__kernel_rt_sigreturn)
|
||||
|
||||
emit_aarch64_feature_1_and
|
||||
|
@ -140,7 +140,6 @@ hostprogs := $(munge)
|
||||
|
||||
c-obj-vdso := note.o
|
||||
c-obj-vdso-gettimeofday := vgettimeofday.o
|
||||
asm-obj-vdso := sigreturn.o
|
||||
|
||||
ifneq ($(c-gettimeofday-y),)
|
||||
VDSO_CFLAGS_gettimeofday_o += -include $(c-gettimeofday-y)
|
||||
|
@ -1,58 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* This file provides both A32 and T32 versions, in accordance with the
|
||||
* arm sigreturn code.
|
||||
*
|
||||
* Please read the comments in arch/arm64/kernel/vdso/sigreturn.S to
|
||||
* understand some of the craziness in here.
|
||||
*
|
||||
* Copyright (C) 2018 ARM Limited
|
||||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/unistd.h>
|
||||
|
||||
.text
|
||||
|
||||
.arm
|
||||
.fnstart
|
||||
.save {r0-r15}
|
||||
.pad #COMPAT_SIGFRAME_REGS_OFFSET
|
||||
nop
|
||||
SYM_CODE_START(__kernel_sigreturn_arm)
|
||||
mov r7, #__NR_compat_sigreturn
|
||||
svc #0
|
||||
.fnend
|
||||
SYM_CODE_END(__kernel_sigreturn_arm)
|
||||
|
||||
.fnstart
|
||||
.save {r0-r15}
|
||||
.pad #COMPAT_RT_SIGFRAME_REGS_OFFSET
|
||||
nop
|
||||
SYM_CODE_START(__kernel_rt_sigreturn_arm)
|
||||
mov r7, #__NR_compat_rt_sigreturn
|
||||
svc #0
|
||||
.fnend
|
||||
SYM_CODE_END(__kernel_rt_sigreturn_arm)
|
||||
|
||||
.thumb
|
||||
.fnstart
|
||||
.save {r0-r15}
|
||||
.pad #COMPAT_SIGFRAME_REGS_OFFSET
|
||||
nop
|
||||
SYM_CODE_START(__kernel_sigreturn_thumb)
|
||||
mov r7, #__NR_compat_sigreturn
|
||||
svc #0
|
||||
.fnend
|
||||
SYM_CODE_END(__kernel_sigreturn_thumb)
|
||||
|
||||
.fnstart
|
||||
.save {r0-r15}
|
||||
.pad #COMPAT_RT_SIGFRAME_REGS_OFFSET
|
||||
nop
|
||||
SYM_CODE_START(__kernel_rt_sigreturn_thumb)
|
||||
mov r7, #__NR_compat_rt_sigreturn
|
||||
svc #0
|
||||
.fnend
|
||||
SYM_CODE_END(__kernel_rt_sigreturn_thumb)
|
@ -64,19 +64,7 @@ VERSION
|
||||
__vdso_clock_gettime;
|
||||
__vdso_gettimeofday;
|
||||
__vdso_clock_getres;
|
||||
__kernel_sigreturn_arm;
|
||||
__kernel_sigreturn_thumb;
|
||||
__kernel_rt_sigreturn_arm;
|
||||
__kernel_rt_sigreturn_thumb;
|
||||
__vdso_clock_gettime64;
|
||||
local: *;
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
* Make the sigreturn code visible to the kernel.
|
||||
*/
|
||||
VDSO_compat_sigreturn_arm = __kernel_sigreturn_arm;
|
||||
VDSO_compat_sigreturn_thumb = __kernel_sigreturn_thumb;
|
||||
VDSO_compat_rt_sigreturn_arm = __kernel_rt_sigreturn_arm;
|
||||
VDSO_compat_rt_sigreturn_thumb = __kernel_rt_sigreturn_thumb;
|
||||
|
@ -67,7 +67,9 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
|
||||
VCPU_STAT("vz_ghfc", vz_ghfc_exits),
|
||||
VCPU_STAT("vz_gpa", vz_gpa_exits),
|
||||
VCPU_STAT("vz_resvd", vz_resvd_exits),
|
||||
#ifdef CONFIG_CPU_LOONGSON64
|
||||
VCPU_STAT("vz_cpucfg", vz_cpucfg_exits),
|
||||
#endif
|
||||
#endif
|
||||
VCPU_STAT("halt_successful_poll", halt_successful_poll),
|
||||
VCPU_STAT("halt_attempted_poll", halt_attempted_poll),
|
||||
|
@ -74,8 +74,11 @@ void *arch_dma_set_uncached(void *cpu_addr, size_t size)
|
||||
* We need to iterate through the pages, clearing the dcache for
|
||||
* them and setting the cache-inhibit bit.
|
||||
*/
|
||||
mmap_read_lock(&init_mm);
|
||||
error = walk_page_range(&init_mm, va, va + size, &set_nocache_walk_ops,
|
||||
NULL);
|
||||
mmap_read_unlock(&init_mm);
|
||||
|
||||
if (error)
|
||||
return ERR_PTR(error);
|
||||
return cpu_addr;
|
||||
@ -85,9 +88,11 @@ void arch_dma_clear_uncached(void *cpu_addr, size_t size)
|
||||
{
|
||||
unsigned long va = (unsigned long)cpu_addr;
|
||||
|
||||
mmap_read_lock(&init_mm);
|
||||
/* walk_page_range shouldn't be able to fail here */
|
||||
WARN_ON(walk_page_range(&init_mm, va, va + size,
|
||||
&clear_nocache_walk_ops, NULL));
|
||||
mmap_read_unlock(&init_mm);
|
||||
}
|
||||
|
||||
void arch_sync_dma_for_device(phys_addr_t addr, size_t size,
|
||||
|
@ -40,7 +40,8 @@ unsigned long __kvmhv_copy_tofrom_guest_radix(int lpid, int pid,
|
||||
/* Can't access quadrants 1 or 2 in non-HV mode, call the HV to do it */
|
||||
if (kvmhv_on_pseries())
|
||||
return plpar_hcall_norets(H_COPY_TOFROM_GUEST, lpid, pid, eaddr,
|
||||
__pa(to), __pa(from), n);
|
||||
(to != NULL) ? __pa(to): 0,
|
||||
(from != NULL) ? __pa(from): 0, n);
|
||||
|
||||
quadrant = 1;
|
||||
if (!pid)
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/libfdt.h>
|
||||
#include <linux/crash_core.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/pgalloc.h>
|
||||
#include <asm/prom.h>
|
||||
#include <asm/kdump.h>
|
||||
|
@ -17,7 +17,7 @@ vdso-syms += flush_icache
|
||||
obj-vdso = $(patsubst %, %.o, $(vdso-syms)) note.o
|
||||
|
||||
ifneq ($(c-gettimeofday-y),)
|
||||
CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
|
||||
CFLAGS_vgettimeofday.o += -fPIC -include $(c-gettimeofday-y)
|
||||
endif
|
||||
|
||||
# Build rules
|
||||
@ -27,6 +27,9 @@ obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
|
||||
obj-y += vdso.o vdso-syms.o
|
||||
CPPFLAGS_vdso.lds += -P -C -U$(ARCH)
|
||||
|
||||
# Disable -pg to prevent insert call site
|
||||
CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os
|
||||
|
||||
# Disable gcov profiling for VDSO code
|
||||
GCOV_PROFILE := n
|
||||
|
||||
|
@ -9,16 +9,22 @@
|
||||
#include <linux/time.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
extern
|
||||
int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts);
|
||||
int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
|
||||
{
|
||||
return __cvdso_clock_gettime(clock, ts);
|
||||
}
|
||||
|
||||
extern
|
||||
int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz);
|
||||
int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
|
||||
{
|
||||
return __cvdso_gettimeofday(tv, tz);
|
||||
}
|
||||
|
||||
extern
|
||||
int __vdso_clock_getres(clockid_t clock_id, struct __kernel_timespec *res);
|
||||
int __vdso_clock_getres(clockid_t clock_id, struct __kernel_timespec *res)
|
||||
{
|
||||
return __cvdso_clock_getres(clock_id, res);
|
||||
|
@ -198,9 +198,10 @@ static debug_entry_t ***debug_areas_alloc(int pages_per_area, int nr_areas)
|
||||
if (!areas)
|
||||
goto fail_malloc_areas;
|
||||
for (i = 0; i < nr_areas; i++) {
|
||||
/* GFP_NOWARN to avoid user triggerable WARN, we handle fails */
|
||||
areas[i] = kmalloc_array(pages_per_area,
|
||||
sizeof(debug_entry_t *),
|
||||
GFP_KERNEL);
|
||||
GFP_KERNEL | __GFP_NOWARN);
|
||||
if (!areas[i])
|
||||
goto fail_malloc_areas2;
|
||||
for (j = 0; j < pages_per_area; j++) {
|
||||
|
@ -170,6 +170,8 @@ static noinline __init void setup_lowcore_early(void)
|
||||
psw_t psw;
|
||||
|
||||
psw.mask = PSW_MASK_BASE | PSW_DEFAULT_KEY | PSW_MASK_EA | PSW_MASK_BA;
|
||||
if (IS_ENABLED(CONFIG_KASAN))
|
||||
psw.mask |= PSW_MASK_DAT;
|
||||
psw.addr = (unsigned long) s390_base_ext_handler;
|
||||
S390_lowcore.external_new_psw = psw;
|
||||
psw.addr = (unsigned long) s390_base_pgm_handler;
|
||||
|
@ -378,9 +378,9 @@ ENTRY(system_call)
|
||||
stmg %r8,%r15,__LC_SAVE_AREA_SYNC
|
||||
BPOFF
|
||||
lg %r12,__LC_CURRENT
|
||||
lghi %r13,__TASK_thread
|
||||
lghi %r14,_PIF_SYSCALL
|
||||
.Lsysc_per:
|
||||
lghi %r13,__TASK_thread
|
||||
lg %r15,__LC_KERNEL_STACK
|
||||
la %r11,STACK_FRAME_OVERHEAD(%r15) # pointer to pt_regs
|
||||
UPDATE_VTIME %r8,%r9,__LC_SYNC_ENTER_TIMER
|
||||
|
@ -67,7 +67,7 @@ config X86
|
||||
select ARCH_HAS_FILTER_PGPROT
|
||||
select ARCH_HAS_FORTIFY_SOURCE
|
||||
select ARCH_HAS_GCOV_PROFILE_ALL
|
||||
select ARCH_HAS_KCOV if X86_64
|
||||
select ARCH_HAS_KCOV if X86_64 && STACK_VALIDATION
|
||||
select ARCH_HAS_MEM_ENCRYPT
|
||||
select ARCH_HAS_MEMBARRIER_SYNC_CORE
|
||||
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
|
||||
|
@ -213,7 +213,6 @@ SYM_FUNC_START(startup_32)
|
||||
* We place all of the values on our mini stack so lret can
|
||||
* used to perform that far jump.
|
||||
*/
|
||||
pushl $__KERNEL_CS
|
||||
leal startup_64(%ebp), %eax
|
||||
#ifdef CONFIG_EFI_MIXED
|
||||
movl efi32_boot_args(%ebp), %edi
|
||||
@ -224,11 +223,20 @@ SYM_FUNC_START(startup_32)
|
||||
movl efi32_boot_args+8(%ebp), %edx // saved bootparams pointer
|
||||
cmpl $0, %edx
|
||||
jnz 1f
|
||||
/*
|
||||
* efi_pe_entry uses MS calling convention, which requires 32 bytes of
|
||||
* shadow space on the stack even if all arguments are passed in
|
||||
* registers. We also need an additional 8 bytes for the space that
|
||||
* would be occupied by the return address, and this also results in
|
||||
* the correct stack alignment for entry.
|
||||
*/
|
||||
subl $40, %esp
|
||||
leal efi_pe_entry(%ebp), %eax
|
||||
movl %edi, %ecx // MS calling convention
|
||||
movl %esi, %edx
|
||||
1:
|
||||
#endif
|
||||
pushl $__KERNEL_CS
|
||||
pushl %eax
|
||||
|
||||
/* Enter paged protected Mode, activating Long Mode */
|
||||
@ -784,6 +792,7 @@ SYM_DATA_LOCAL(boot_heap, .fill BOOT_HEAP_SIZE, 1, 0)
|
||||
|
||||
SYM_DATA_START_LOCAL(boot_stack)
|
||||
.fill BOOT_STACK_SIZE, 1, 0
|
||||
.balign 16
|
||||
SYM_DATA_END_LABEL(boot_stack, SYM_L_LOCAL, boot_stack_end)
|
||||
|
||||
/*
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
obj-y += core.o probe.o
|
||||
obj-$(PERF_EVENTS_INTEL_RAPL) += rapl.o
|
||||
obj-$(CONFIG_PERF_EVENTS_INTEL_RAPL) += rapl.o
|
||||
obj-y += amd/
|
||||
obj-$(CONFIG_X86_LOCAL_APIC) += msr.o
|
||||
obj-$(CONFIG_CPU_SUP_INTEL) += intel/
|
||||
|
@ -375,7 +375,9 @@ void __init hyperv_init(void)
|
||||
guest_id = generate_guest_id(0, LINUX_VERSION_CODE, 0);
|
||||
wrmsrl(HV_X64_MSR_GUEST_OS_ID, guest_id);
|
||||
|
||||
hv_hypercall_pg = vmalloc_exec(PAGE_SIZE);
|
||||
hv_hypercall_pg = __vmalloc_node_range(PAGE_SIZE, 1, VMALLOC_START,
|
||||
VMALLOC_END, GFP_KERNEL, PAGE_KERNEL_ROX,
|
||||
VM_FLUSH_RESET_PERMS, NUMA_NO_NODE, __func__);
|
||||
if (hv_hypercall_pg == NULL) {
|
||||
wrmsrl(HV_X64_MSR_GUEST_OS_ID, 0);
|
||||
goto remove_cpuhp_state;
|
||||
|
@ -201,12 +201,8 @@ arch_test_and_change_bit(long nr, volatile unsigned long *addr)
|
||||
return GEN_BINARY_RMWcc(LOCK_PREFIX __ASM_SIZE(btc), *addr, c, "Ir", nr);
|
||||
}
|
||||
|
||||
static __no_kcsan_or_inline bool constant_test_bit(long nr, const volatile unsigned long *addr)
|
||||
static __always_inline bool constant_test_bit(long nr, const volatile unsigned long *addr)
|
||||
{
|
||||
/*
|
||||
* Because this is a plain access, we need to disable KCSAN here to
|
||||
* avoid double instrumentation via instrumented bitops.
|
||||
*/
|
||||
return ((1UL << (nr & (BITS_PER_LONG-1))) &
|
||||
(addr[nr >> _BITOPS_LONG_SHIFT])) != 0;
|
||||
}
|
||||
|
@ -75,6 +75,12 @@ do { \
|
||||
unreachable(); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* This instrumentation_begin() is strictly speaking incorrect; but it
|
||||
* suppresses the complaints from WARN()s in noinstr code. If such a WARN()
|
||||
* were to trigger, we'd rather wreck the machine in an attempt to get the
|
||||
* message out than not know about it.
|
||||
*/
|
||||
#define __WARN_FLAGS(flags) \
|
||||
do { \
|
||||
instrumentation_begin(); \
|
||||
|
@ -58,4 +58,9 @@ static inline bool handle_guest_split_lock(unsigned long ip)
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_IA32_FEAT_CTL
|
||||
void init_ia32_feat_ctl(struct cpuinfo_x86 *c);
|
||||
#else
|
||||
static inline void init_ia32_feat_ctl(struct cpuinfo_x86 *c) {}
|
||||
#endif
|
||||
#endif /* _ASM_X86_CPU_H */
|
||||
|
@ -11,5 +11,23 @@ extern cpumask_var_t cpu_sibling_setup_mask;
|
||||
|
||||
extern void setup_cpu_local_masks(void);
|
||||
|
||||
/*
|
||||
* NMI and MCE exceptions need cpu_is_offline() _really_ early,
|
||||
* provide an arch_ special for them to avoid instrumentation.
|
||||
*/
|
||||
#if NR_CPUS > 1
|
||||
static __always_inline bool arch_cpu_online(int cpu)
|
||||
{
|
||||
return arch_test_bit(cpu, cpumask_bits(cpu_online_mask));
|
||||
}
|
||||
#else
|
||||
static __always_inline bool arch_cpu_online(int cpu)
|
||||
{
|
||||
return cpu == 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define arch_cpu_is_offline(cpu) unlikely(!arch_cpu_online(cpu))
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* _ASM_X86_CPUMASK_H */
|
||||
|
@ -943,7 +943,7 @@ struct kvm_arch {
|
||||
atomic_t vapics_in_nmi_mode;
|
||||
struct mutex apic_map_lock;
|
||||
struct kvm_apic_map *apic_map;
|
||||
bool apic_map_dirty;
|
||||
atomic_t apic_map_dirty;
|
||||
|
||||
bool apic_access_page_done;
|
||||
unsigned long apicv_inhibit_reasons;
|
||||
@ -1220,7 +1220,7 @@ struct kvm_x86_ops {
|
||||
void (*enable_log_dirty_pt_masked)(struct kvm *kvm,
|
||||
struct kvm_memory_slot *slot,
|
||||
gfn_t offset, unsigned long mask);
|
||||
int (*write_log_dirty)(struct kvm_vcpu *vcpu);
|
||||
int (*write_log_dirty)(struct kvm_vcpu *vcpu, gpa_t l2_gpa);
|
||||
|
||||
/* pmu operations of sub-arch */
|
||||
const struct kvm_pmu_ops *pmu_ops;
|
||||
|
@ -25,8 +25,6 @@
|
||||
#define TPAUSE_C01_STATE 1
|
||||
#define TPAUSE_C02_STATE 0
|
||||
|
||||
u32 get_umwait_control_msr(void);
|
||||
|
||||
static inline void __monitor(const void *eax, unsigned long ecx,
|
||||
unsigned long edx)
|
||||
{
|
||||
|
@ -194,6 +194,7 @@ enum page_cache_mode {
|
||||
#define _PAGE_TABLE_NOENC (__PP|__RW|_USR|___A| 0|___D| 0| 0)
|
||||
#define _PAGE_TABLE (__PP|__RW|_USR|___A| 0|___D| 0| 0| _ENC)
|
||||
#define __PAGE_KERNEL_RO (__PP| 0| 0|___A|__NX|___D| 0|___G)
|
||||
#define __PAGE_KERNEL_ROX (__PP| 0| 0|___A| 0|___D| 0|___G)
|
||||
#define __PAGE_KERNEL_NOCACHE (__PP|__RW| 0|___A|__NX|___D| 0|___G| __NC)
|
||||
#define __PAGE_KERNEL_VVAR (__PP| 0|_USR|___A|__NX|___D| 0|___G)
|
||||
#define __PAGE_KERNEL_LARGE (__PP|__RW| 0|___A|__NX|___D|_PSE|___G)
|
||||
@ -219,6 +220,7 @@ enum page_cache_mode {
|
||||
#define PAGE_KERNEL_RO __pgprot_mask(__PAGE_KERNEL_RO | _ENC)
|
||||
#define PAGE_KERNEL_EXEC __pgprot_mask(__PAGE_KERNEL_EXEC | _ENC)
|
||||
#define PAGE_KERNEL_EXEC_NOENC __pgprot_mask(__PAGE_KERNEL_EXEC | 0)
|
||||
#define PAGE_KERNEL_ROX __pgprot_mask(__PAGE_KERNEL_ROX | _ENC)
|
||||
#define PAGE_KERNEL_NOCACHE __pgprot_mask(__PAGE_KERNEL_NOCACHE | _ENC)
|
||||
#define PAGE_KERNEL_LARGE __pgprot_mask(__PAGE_KERNEL_LARGE | _ENC)
|
||||
#define PAGE_KERNEL_LARGE_EXEC __pgprot_mask(__PAGE_KERNEL_LARGE_EXEC | _ENC)
|
||||
|
@ -370,7 +370,7 @@ struct x86_hw_tss {
|
||||
#define IO_BITMAP_OFFSET_INVALID (__KERNEL_TSS_LIMIT + 1)
|
||||
|
||||
struct entry_stack {
|
||||
unsigned long words[64];
|
||||
char stack[PAGE_SIZE];
|
||||
};
|
||||
|
||||
struct entry_stack_page {
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/sched/clock.h>
|
||||
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/cpufeature.h>
|
||||
#include <asm/e820/api.h>
|
||||
#include <asm/mtrr.h>
|
||||
|
@ -347,6 +347,9 @@ static __always_inline void setup_umip(struct cpuinfo_x86 *c)
|
||||
cr4_clear_bits(X86_CR4_UMIP);
|
||||
}
|
||||
|
||||
/* These bits should not change their value after CPU init is finished. */
|
||||
static const unsigned long cr4_pinned_mask =
|
||||
X86_CR4_SMEP | X86_CR4_SMAP | X86_CR4_UMIP | X86_CR4_FSGSBASE;
|
||||
static DEFINE_STATIC_KEY_FALSE_RO(cr_pinning);
|
||||
static unsigned long cr4_pinned_bits __ro_after_init;
|
||||
|
||||
@ -371,20 +374,20 @@ EXPORT_SYMBOL(native_write_cr0);
|
||||
|
||||
void native_write_cr4(unsigned long val)
|
||||
{
|
||||
unsigned long bits_missing = 0;
|
||||
unsigned long bits_changed = 0;
|
||||
|
||||
set_register:
|
||||
asm volatile("mov %0,%%cr4": "+r" (val), "+m" (cr4_pinned_bits));
|
||||
|
||||
if (static_branch_likely(&cr_pinning)) {
|
||||
if (unlikely((val & cr4_pinned_bits) != cr4_pinned_bits)) {
|
||||
bits_missing = ~val & cr4_pinned_bits;
|
||||
val |= bits_missing;
|
||||
if (unlikely((val & cr4_pinned_mask) != cr4_pinned_bits)) {
|
||||
bits_changed = (val & cr4_pinned_mask) ^ cr4_pinned_bits;
|
||||
val = (val & ~cr4_pinned_mask) | cr4_pinned_bits;
|
||||
goto set_register;
|
||||
}
|
||||
/* Warn after we've set the missing bits. */
|
||||
WARN_ONCE(bits_missing, "CR4 bits went missing: %lx!?\n",
|
||||
bits_missing);
|
||||
/* Warn after we've corrected the changed bits. */
|
||||
WARN_ONCE(bits_changed, "pinned CR4 bits changed: 0x%lx!?\n",
|
||||
bits_changed);
|
||||
}
|
||||
}
|
||||
#if IS_MODULE(CONFIG_LKDTM)
|
||||
@ -419,7 +422,7 @@ void cr4_init(void)
|
||||
if (boot_cpu_has(X86_FEATURE_PCID))
|
||||
cr4 |= X86_CR4_PCIDE;
|
||||
if (static_branch_likely(&cr_pinning))
|
||||
cr4 |= cr4_pinned_bits;
|
||||
cr4 = (cr4 & ~cr4_pinned_mask) | cr4_pinned_bits;
|
||||
|
||||
__write_cr4(cr4);
|
||||
|
||||
@ -434,10 +437,7 @@ void cr4_init(void)
|
||||
*/
|
||||
static void __init setup_cr_pinning(void)
|
||||
{
|
||||
unsigned long mask;
|
||||
|
||||
mask = (X86_CR4_SMEP | X86_CR4_SMAP | X86_CR4_UMIP);
|
||||
cr4_pinned_bits = this_cpu_read(cpu_tlbstate.cr4) & mask;
|
||||
cr4_pinned_bits = this_cpu_read(cpu_tlbstate.cr4) & cr4_pinned_mask;
|
||||
static_key_enable(&cr_pinning.key);
|
||||
}
|
||||
|
||||
|
@ -81,8 +81,4 @@ extern void update_srbds_msr(void);
|
||||
|
||||
extern u64 x86_read_arch_cap_msr(void);
|
||||
|
||||
#ifdef CONFIG_IA32_FEAT_CTL
|
||||
void init_ia32_feat_ctl(struct cpuinfo_x86 *c);
|
||||
#endif
|
||||
|
||||
#endif /* ARCH_X86_CPU_H */
|
||||
|
@ -1083,7 +1083,7 @@ static noinstr bool mce_check_crashing_cpu(void)
|
||||
{
|
||||
unsigned int cpu = smp_processor_id();
|
||||
|
||||
if (cpu_is_offline(cpu) ||
|
||||
if (arch_cpu_is_offline(cpu) ||
|
||||
(crashing_cpu != -1 && crashing_cpu != cpu)) {
|
||||
u64 mcgstatus;
|
||||
|
||||
|
@ -981,10 +981,10 @@ void resctrl_cpu_detect(struct cpuinfo_x86 *c)
|
||||
|
||||
c->x86_cache_max_rmid = ecx;
|
||||
c->x86_cache_occ_scale = ebx;
|
||||
if (c->x86_vendor == X86_VENDOR_INTEL)
|
||||
c->x86_cache_mbm_width_offset = eax & 0xff;
|
||||
else
|
||||
c->x86_cache_mbm_width_offset = -1;
|
||||
c->x86_cache_mbm_width_offset = eax & 0xff;
|
||||
|
||||
if (c->x86_vendor == X86_VENDOR_AMD && !c->x86_cache_mbm_width_offset)
|
||||
c->x86_cache_mbm_width_offset = MBM_CNTR_WIDTH_OFFSET_AMD;
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user