mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
Merge tag 'v6.1.39' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroidg12-6.1.y
This is the 6.1.39 stable release Change-Id: I04279db12014d653956933077ebc01f18badbd91
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
What: /sys/bus/platform/drivers/eud/.../enable
|
||||
What: /sys/bus/platform/drivers/qcom_eud/.../enable
|
||||
Date: February 2022
|
||||
Contact: Souradeep Chowdhury <quic_schowdhu@quicinc.com>
|
||||
Description:
|
||||
|
||||
@@ -56,7 +56,6 @@ required:
|
||||
unevaluatedProperties: false
|
||||
|
||||
allOf:
|
||||
- $ref: reboot-mode.yaml#
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
@@ -66,6 +65,9 @@ allOf:
|
||||
- qcom,pms405-pon
|
||||
- qcom,pm8998-pon
|
||||
then:
|
||||
allOf:
|
||||
- $ref: reboot-mode.yaml#
|
||||
|
||||
properties:
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
@@ -29,7 +29,7 @@ recur_count
|
||||
cpoint_name
|
||||
Where in the kernel to trigger the action. It can be
|
||||
one of INT_HARDWARE_ENTRY, INT_HW_IRQ_EN, INT_TASKLET_ENTRY,
|
||||
FS_DEVRW, MEM_SWAPOUT, TIMERADD, SCSI_QUEUE_RQ, or DIRECT.
|
||||
FS_SUBMIT_BH, MEM_SWAPOUT, TIMERADD, SCSI_QUEUE_RQ, or DIRECT.
|
||||
|
||||
cpoint_type
|
||||
Indicates the action to be taken on hitting the crash point.
|
||||
|
||||
@@ -196,7 +196,7 @@ information and return operation results::
|
||||
struct args_ismountpoint ismountpoint;
|
||||
};
|
||||
|
||||
char path[0];
|
||||
char path[];
|
||||
};
|
||||
|
||||
The ioctlfd field is a mount point file descriptor of an autofs mount
|
||||
|
||||
@@ -467,7 +467,7 @@ Each ioctl is passed a pointer to an `autofs_dev_ioctl` structure::
|
||||
struct args_ismountpoint ismountpoint;
|
||||
};
|
||||
|
||||
char path[0];
|
||||
char path[];
|
||||
};
|
||||
|
||||
For the **OPEN_MOUNT** and **IS_MOUNTPOINT** commands, the target
|
||||
|
||||
@@ -22,12 +22,11 @@ exclusive.
|
||||
3) object removal. Locking rules: caller locks parent, finds victim,
|
||||
locks victim and calls the method. Locks are exclusive.
|
||||
|
||||
4) rename() that is _not_ cross-directory. Locking rules: caller locks
|
||||
the parent and finds source and target. In case of exchange (with
|
||||
RENAME_EXCHANGE in flags argument) lock both. In any case,
|
||||
if the target already exists, lock it. If the source is a non-directory,
|
||||
lock it. If we need to lock both, lock them in inode pointer order.
|
||||
Then call the method. All locks are exclusive.
|
||||
4) rename() that is _not_ cross-directory. Locking rules: caller locks the
|
||||
parent and finds source and target. We lock both (provided they exist). If we
|
||||
need to lock two inodes of different type (dir vs non-dir), we lock directory
|
||||
first. If we need to lock two inodes of the same type, lock them in inode
|
||||
pointer order. Then call the method. All locks are exclusive.
|
||||
NB: we might get away with locking the source (and target in exchange
|
||||
case) shared.
|
||||
|
||||
@@ -44,15 +43,17 @@ All locks are exclusive.
|
||||
rules:
|
||||
|
||||
* lock the filesystem
|
||||
* lock parents in "ancestors first" order.
|
||||
* lock parents in "ancestors first" order. If one is not ancestor of
|
||||
the other, lock them in inode pointer order.
|
||||
* find source and target.
|
||||
* if old parent is equal to or is a descendent of target
|
||||
fail with -ENOTEMPTY
|
||||
* if new parent is equal to or is a descendent of source
|
||||
fail with -ELOOP
|
||||
* If it's an exchange, lock both the source and the target.
|
||||
* If the target exists, lock it. If the source is a non-directory,
|
||||
lock it. If we need to lock both, do so in inode pointer order.
|
||||
* Lock both the source and the target provided they exist. If we
|
||||
need to lock two inodes of different type (dir vs non-dir), we lock
|
||||
the directory first. If we need to lock two inodes of the same type,
|
||||
lock them in inode pointer order.
|
||||
* call the method.
|
||||
|
||||
All ->i_rwsem are taken exclusive. Again, we might get away with locking
|
||||
@@ -66,8 +67,9 @@ If no directory is its own ancestor, the scheme above is deadlock-free.
|
||||
|
||||
Proof:
|
||||
|
||||
First of all, at any moment we have a partial ordering of the
|
||||
objects - A < B iff A is an ancestor of B.
|
||||
First of all, at any moment we have a linear ordering of the
|
||||
objects - A < B iff (A is an ancestor of B) or (B is not an ancestor
|
||||
of A and ptr(A) < ptr(B)).
|
||||
|
||||
That ordering can change. However, the following is true:
|
||||
|
||||
|
||||
@@ -433,6 +433,15 @@ start N bytes into the buffer leaving the first N bytes for the
|
||||
application to use. The final option is the flags field, but it will
|
||||
be dealt with in separate sections for each UMEM flag.
|
||||
|
||||
SO_BINDTODEVICE setsockopt
|
||||
--------------------------
|
||||
|
||||
This is a generic SOL_SOCKET option that can be used to tie AF_XDP
|
||||
socket to a particular network interface. It is useful when a socket
|
||||
is created by a privileged process and passed to a non-privileged one.
|
||||
Once the option is set, kernel will refuse attempts to bind that socket
|
||||
to a different interface. Updating the value requires CAP_NET_RAW.
|
||||
|
||||
XDP_STATISTICS getsockopt
|
||||
-------------------------
|
||||
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 1
|
||||
SUBLEVEL = 38
|
||||
SUBLEVEL = 39
|
||||
EXTRAVERSION =
|
||||
NAME = Curry Ramen
|
||||
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
|
||||
#include <asm/dwarf.h>
|
||||
|
||||
#define ASM_NL ` /* use '`' to mark new line in macro */
|
||||
#define __ALIGN .align 4
|
||||
#define __ALIGN_STR __stringify(__ALIGN)
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
|
||||
.macro ST2 e, o, off
|
||||
@@ -28,10 +32,6 @@
|
||||
#endif
|
||||
.endm
|
||||
|
||||
#define ASM_NL ` /* use '`' to mark new line in macro */
|
||||
#define __ALIGN .align 4
|
||||
#define __ALIGN_STR __stringify(__ALIGN)
|
||||
|
||||
/* annotation for data we want in DCCM - if enabled in .config */
|
||||
.macro ARCFP_DATA nm
|
||||
#ifdef CONFIG_ARC_HAS_DCCM
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
duplex-full;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
duplex-full;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -542,7 +542,6 @@
|
||||
"spi_lr_session_done",
|
||||
"spi_lr_overread";
|
||||
clocks = <&iprocmed>;
|
||||
clock-names = "iprocmed";
|
||||
num-cs = <2>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
lcd_backlight: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
|
||||
pwms = <&pwm3 0 5000000 0>;
|
||||
pwms = <&pwm3 0 5000000>;
|
||||
brightness-levels = <0 4 8 16 32 64 128 255>;
|
||||
default-brightness-level = <7>;
|
||||
enable-gpios = <&gpio5 14 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
gpio-restart {
|
||||
compatible = "gpio-restart";
|
||||
pinctrl-0 = <&reset_pins>;
|
||||
pinctrl-names = "default";
|
||||
gpios = <&gpio 56 GPIO_ACTIVE_LOW>;
|
||||
priority = <200>;
|
||||
};
|
||||
@@ -39,7 +41,7 @@
|
||||
status = "okay";
|
||||
|
||||
spi3: spi@400 {
|
||||
pinctrl-0 = <&fc3_b_pins>;
|
||||
pinctrl-0 = <&fc3_b_pins>, <&spi3_cs_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
cs-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
|
||||
@@ -59,6 +61,12 @@
|
||||
function = "miim_c";
|
||||
};
|
||||
|
||||
reset_pins: reset-pins {
|
||||
/* SYS_RST# */
|
||||
pins = "GPIO_56";
|
||||
function = "gpio";
|
||||
};
|
||||
|
||||
sgpio_a_pins: sgpio-a-pins {
|
||||
/* SCK, D0, D1 */
|
||||
pins = "GPIO_32", "GPIO_33", "GPIO_34";
|
||||
@@ -71,6 +79,12 @@
|
||||
function = "sgpio_b";
|
||||
};
|
||||
|
||||
spi3_cs_pins: spi3-cs-pins {
|
||||
/* CS# */
|
||||
pins = "GPIO_46";
|
||||
function = "gpio";
|
||||
};
|
||||
|
||||
usart0_pins: usart0-pins {
|
||||
/* RXD, TXD */
|
||||
pins = "GPIO_25", "GPIO_26";
|
||||
|
||||
@@ -749,13 +749,13 @@
|
||||
|
||||
&uart_B {
|
||||
compatible = "amlogic,meson8-uart";
|
||||
clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
|
||||
clocks = <&xtal>, <&clkc CLKID_UART1>, <&clkc CLKID_CLK81>;
|
||||
clock-names = "xtal", "pclk", "baud";
|
||||
};
|
||||
|
||||
&uart_C {
|
||||
compatible = "amlogic,meson8-uart";
|
||||
clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
|
||||
clocks = <&xtal>, <&clkc CLKID_UART2>, <&clkc CLKID_CLK81>;
|
||||
clock-names = "xtal", "pclk", "baud";
|
||||
};
|
||||
|
||||
|
||||
@@ -737,13 +737,13 @@
|
||||
|
||||
&uart_B {
|
||||
compatible = "amlogic,meson8b-uart";
|
||||
clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
|
||||
clocks = <&xtal>, <&clkc CLKID_UART1>, <&clkc CLKID_CLK81>;
|
||||
clock-names = "xtal", "pclk", "baud";
|
||||
};
|
||||
|
||||
&uart_C {
|
||||
compatible = "amlogic,meson8b-uart";
|
||||
clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
|
||||
clocks = <&xtal>, <&clkc CLKID_UART2>, <&clkc CLKID_CLK81>;
|
||||
clock-names = "xtal", "pclk", "baud";
|
||||
};
|
||||
|
||||
|
||||
@@ -5,9 +5,11 @@
|
||||
|
||||
#include "omap3-gta04a5.dts"
|
||||
|
||||
&omap3_pmx_core {
|
||||
/ {
|
||||
model = "Goldelico GTA04A5/Letux 2804 with OneNAND";
|
||||
};
|
||||
|
||||
&omap3_pmx_core {
|
||||
gpmc_pins: pinmux_gpmc_pins {
|
||||
pinctrl-single,pins = <
|
||||
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&blsp2_dma {
|
||||
qcom,controlled-remotely;
|
||||
};
|
||||
|
||||
&blsp2_i2c5 {
|
||||
status = "okay";
|
||||
clock-frequency = <200000>;
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
dma-controller@7984000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
qpic-nand@79b0000 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&nand {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -102,10 +102,10 @@
|
||||
status = "okay";
|
||||
perst-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
qpic-nand@79b0000 {
|
||||
pinctrl-0 = <&nand_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&nand {
|
||||
pinctrl-0 = <&nand_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
@@ -65,11 +65,11 @@
|
||||
dma-controller@7984000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
qpic-nand@79b0000 {
|
||||
pinctrl-0 = <&nand_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&nand {
|
||||
pinctrl-0 = <&nand_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
qcom,ipc = <&apcs 8 0>;
|
||||
qcom,smd-edge = <15>;
|
||||
|
||||
rpm_requests: rpm_requests {
|
||||
rpm_requests: rpm-requests {
|
||||
compatible = "qcom,rpm-msm8974";
|
||||
qcom,smd-channels = "rpm_requests";
|
||||
|
||||
|
||||
@@ -137,10 +137,13 @@
|
||||
|
||||
sound {
|
||||
compatible = "audio-graph-card";
|
||||
routing =
|
||||
"MIC_IN", "Capture",
|
||||
"Capture", "Mic Bias",
|
||||
"Playback", "HP_OUT";
|
||||
widgets = "Headphone", "Headphone Jack",
|
||||
"Line", "Line In Jack",
|
||||
"Microphone", "Microphone Jack";
|
||||
routing = "Headphone Jack", "HP_OUT",
|
||||
"LINE_IN", "Line In Jack",
|
||||
"MIC_IN", "Microphone Jack",
|
||||
"Microphone Jack", "Mic Bias";
|
||||
dais = <&sai2a_port &sai2b_port>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
sound {
|
||||
compatible = "audio-graph-card";
|
||||
label = "STM32MP1-AV96-HDMI";
|
||||
label = "STM32-AV96-HDMI";
|
||||
dais = <&sai2a_port>;
|
||||
status = "okay";
|
||||
};
|
||||
@@ -322,6 +322,12 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dh_mac_eeprom: eeprom@53 {
|
||||
compatible = "atmel,24c02";
|
||||
reg = <0x53>;
|
||||
pagesize = <16>;
|
||||
};
|
||||
};
|
||||
|
||||
<dc {
|
||||
|
||||
@@ -192,6 +192,12 @@
|
||||
reg = <0x50>;
|
||||
pagesize = <16>;
|
||||
};
|
||||
|
||||
dh_mac_eeprom: eeprom@53 {
|
||||
compatible = "atmel,24c02";
|
||||
reg = <0x53>;
|
||||
pagesize = <16>;
|
||||
};
|
||||
};
|
||||
|
||||
&sdmmc1 { /* MicroSD */
|
||||
|
||||
@@ -213,12 +213,6 @@
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
eeprom@53 {
|
||||
compatible = "atmel,24c02";
|
||||
reg = <0x53>;
|
||||
pagesize = <16>;
|
||||
};
|
||||
};
|
||||
|
||||
&ipcc {
|
||||
|
||||
@@ -438,7 +438,7 @@
|
||||
i2s2_port: port {
|
||||
i2s2_endpoint: endpoint {
|
||||
remote-endpoint = <&sii9022_tx_endpoint>;
|
||||
format = "i2s";
|
||||
dai-format = "i2s";
|
||||
mclk-fs = <256>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -402,6 +402,23 @@ ALT_UP_B(.L0_\@)
|
||||
#endif
|
||||
.endm
|
||||
|
||||
/*
|
||||
* Raw SMP data memory barrier
|
||||
*/
|
||||
.macro __smp_dmb mode
|
||||
#if __LINUX_ARM_ARCH__ >= 7
|
||||
.ifeqs "\mode","arm"
|
||||
dmb ish
|
||||
.else
|
||||
W(dmb) ish
|
||||
.endif
|
||||
#elif __LINUX_ARM_ARCH__ == 6
|
||||
mcr p15, 0, r0, c7, c10, 5 @ dmb
|
||||
#else
|
||||
.error "Incompatible SMP platform"
|
||||
#endif
|
||||
.endm
|
||||
|
||||
#if defined(CONFIG_CPU_V7M)
|
||||
/*
|
||||
* setmode is used to assert to be in svc mode during boot. For v7-M
|
||||
|
||||
@@ -14,14 +14,35 @@
|
||||
* ops which are SMP safe even on a UP kernel.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Unordered
|
||||
*/
|
||||
|
||||
#define sync_set_bit(nr, p) _set_bit(nr, p)
|
||||
#define sync_clear_bit(nr, p) _clear_bit(nr, p)
|
||||
#define sync_change_bit(nr, p) _change_bit(nr, p)
|
||||
#define sync_test_and_set_bit(nr, p) _test_and_set_bit(nr, p)
|
||||
#define sync_test_and_clear_bit(nr, p) _test_and_clear_bit(nr, p)
|
||||
#define sync_test_and_change_bit(nr, p) _test_and_change_bit(nr, p)
|
||||
#define sync_test_bit(nr, addr) test_bit(nr, addr)
|
||||
#define arch_sync_cmpxchg arch_cmpxchg
|
||||
|
||||
/*
|
||||
* Fully ordered
|
||||
*/
|
||||
|
||||
int _sync_test_and_set_bit(int nr, volatile unsigned long * p);
|
||||
#define sync_test_and_set_bit(nr, p) _sync_test_and_set_bit(nr, p)
|
||||
|
||||
int _sync_test_and_clear_bit(int nr, volatile unsigned long * p);
|
||||
#define sync_test_and_clear_bit(nr, p) _sync_test_and_clear_bit(nr, p)
|
||||
|
||||
int _sync_test_and_change_bit(int nr, volatile unsigned long * p);
|
||||
#define sync_test_and_change_bit(nr, p) _sync_test_and_change_bit(nr, p)
|
||||
|
||||
#define arch_sync_cmpxchg(ptr, old, new) \
|
||||
({ \
|
||||
__typeof__(*(ptr)) __ret; \
|
||||
__smp_mb__before_atomic(); \
|
||||
__ret = arch_cmpxchg_relaxed((ptr), (old), (new)); \
|
||||
__smp_mb__after_atomic(); \
|
||||
__ret; \
|
||||
})
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,7 +28,7 @@ UNWIND( .fnend )
|
||||
ENDPROC(\name )
|
||||
.endm
|
||||
|
||||
.macro testop, name, instr, store
|
||||
.macro __testop, name, instr, store, barrier
|
||||
ENTRY( \name )
|
||||
UNWIND( .fnstart )
|
||||
ands ip, r1, #3
|
||||
@@ -38,7 +38,7 @@ UNWIND( .fnstart )
|
||||
mov r0, r0, lsr #5
|
||||
add r1, r1, r0, lsl #2 @ Get word offset
|
||||
mov r3, r2, lsl r3 @ create mask
|
||||
smp_dmb
|
||||
\barrier
|
||||
#if __LINUX_ARM_ARCH__ >= 7 && defined(CONFIG_SMP)
|
||||
.arch_extension mp
|
||||
ALT_SMP(W(pldw) [r1])
|
||||
@@ -50,13 +50,21 @@ UNWIND( .fnstart )
|
||||
strex ip, r2, [r1]
|
||||
cmp ip, #0
|
||||
bne 1b
|
||||
smp_dmb
|
||||
\barrier
|
||||
cmp r0, #0
|
||||
movne r0, #1
|
||||
2: bx lr
|
||||
UNWIND( .fnend )
|
||||
ENDPROC(\name )
|
||||
.endm
|
||||
|
||||
.macro testop, name, instr, store
|
||||
__testop \name, \instr, \store, smp_dmb
|
||||
.endm
|
||||
|
||||
.macro sync_testop, name, instr, store
|
||||
__testop \name, \instr, \store, __smp_dmb
|
||||
.endm
|
||||
#else
|
||||
.macro bitop, name, instr
|
||||
ENTRY( \name )
|
||||
|
||||
@@ -10,3 +10,7 @@
|
||||
.text
|
||||
|
||||
testop _test_and_change_bit, eor, str
|
||||
|
||||
#if __LINUX_ARM_ARCH__ >= 6
|
||||
sync_testop _sync_test_and_change_bit, eor, str
|
||||
#endif
|
||||
|
||||
@@ -10,3 +10,7 @@
|
||||
.text
|
||||
|
||||
testop _test_and_clear_bit, bicne, strne
|
||||
|
||||
#if __LINUX_ARM_ARCH__ >= 6
|
||||
sync_testop _sync_test_and_clear_bit, bicne, strne
|
||||
#endif
|
||||
|
||||
@@ -10,3 +10,7 @@
|
||||
.text
|
||||
|
||||
testop _test_and_set_bit, orreq, streq
|
||||
|
||||
#if __LINUX_ARM_ARCH__ >= 6
|
||||
sync_testop _sync_test_and_set_bit, orreq, streq
|
||||
#endif
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <linux/io.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include "soc.h"
|
||||
#include "platform.h"
|
||||
|
||||
/*************************************************************************
|
||||
* Timer handling for EP93xx
|
||||
@@ -60,7 +61,7 @@ static u64 notrace ep93xx_read_sched_clock(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
u64 ep93xx_clocksource_read(struct clocksource *c)
|
||||
static u64 ep93xx_clocksource_read(struct clocksource *c)
|
||||
{
|
||||
u64 ret;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/clockchips.h>
|
||||
|
||||
#include <asm/setup.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
@@ -60,6 +60,9 @@ static void __init orion5x_dt_init(void)
|
||||
if (of_machine_is_compatible("maxtor,shared-storage-2"))
|
||||
mss2_init();
|
||||
|
||||
if (of_machine_is_compatible("lacie,d2-network"))
|
||||
d2net_init();
|
||||
|
||||
of_platform_default_populate(NULL, orion5x_auxdata_lookup, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -75,6 +75,12 @@ extern void mss2_init(void);
|
||||
static inline void mss2_init(void) {}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MACH_D2NET_DT
|
||||
void d2net_init(void);
|
||||
#else
|
||||
static inline void d2net_init(void) {}
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* Helpers to access Orion registers
|
||||
****************************************************************************/
|
||||
|
||||
@@ -40,7 +40,7 @@ enum probes_insn checker_stack_use_imm_0xx(probes_opcode_t insn,
|
||||
* Different from other insn uses imm8, the real addressing offset of
|
||||
* STRD in T32 encoding should be imm8 * 4. See ARMARM description.
|
||||
*/
|
||||
enum probes_insn checker_stack_use_t32strd(probes_opcode_t insn,
|
||||
static enum probes_insn checker_stack_use_t32strd(probes_opcode_t insn,
|
||||
struct arch_probes_insn *asi,
|
||||
const struct decode_header *h)
|
||||
{
|
||||
|
||||
@@ -233,7 +233,7 @@ singlestep(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *kcb)
|
||||
* kprobe, and that level is reserved for user kprobe handlers, so we can't
|
||||
* risk encountering a new kprobe in an interrupt handler.
|
||||
*/
|
||||
void __kprobes kprobe_handler(struct pt_regs *regs)
|
||||
static void __kprobes kprobe_handler(struct pt_regs *regs)
|
||||
{
|
||||
struct kprobe *p, *cur;
|
||||
struct kprobe_ctlblk *kcb;
|
||||
|
||||
@@ -145,8 +145,6 @@ __arch_remove_optimized_kprobe(struct optimized_kprobe *op, int dirty)
|
||||
}
|
||||
}
|
||||
|
||||
extern void kprobe_handler(struct pt_regs *regs);
|
||||
|
||||
static void
|
||||
optimized_callback(struct optimized_kprobe *op, struct pt_regs *regs)
|
||||
{
|
||||
|
||||
@@ -720,7 +720,7 @@ static const char coverage_register_lookup[16] = {
|
||||
[REG_TYPE_NOSPPCX] = COVERAGE_ANY_REG | COVERAGE_SP,
|
||||
};
|
||||
|
||||
unsigned coverage_start_registers(const struct decode_header *h)
|
||||
static unsigned coverage_start_registers(const struct decode_header *h)
|
||||
{
|
||||
unsigned regs = 0;
|
||||
int i;
|
||||
|
||||
@@ -454,3 +454,7 @@ void kprobe_thumb32_test_cases(void);
|
||||
#else
|
||||
void kprobe_arm_test_cases(void);
|
||||
#endif
|
||||
|
||||
void __kprobes_test_case_start(void);
|
||||
void __kprobes_test_case_end_16(void);
|
||||
void __kprobes_test_case_end_32(void);
|
||||
|
||||
@@ -297,6 +297,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
&gic {
|
||||
mediatek,broken-save-restore-fw;
|
||||
};
|
||||
|
||||
&gpu {
|
||||
mali-supply = <&mt6358_vgpu_reg>;
|
||||
sram-supply = <&mt6358_vsram_gpu_reg>;
|
||||
|
||||
@@ -64,7 +64,8 @@
|
||||
clock-frequency = <1701000000>;
|
||||
cpu-idle-states = <&cpu_sleep_l &cluster_sleep_l>;
|
||||
next-level-cache = <&l2_0>;
|
||||
capacity-dmips-mhz = <530>;
|
||||
performance-domains = <&performance 0>;
|
||||
capacity-dmips-mhz = <427>;
|
||||
};
|
||||
|
||||
cpu1: cpu@100 {
|
||||
@@ -75,7 +76,8 @@
|
||||
clock-frequency = <1701000000>;
|
||||
cpu-idle-states = <&cpu_sleep_l &cluster_sleep_l>;
|
||||
next-level-cache = <&l2_0>;
|
||||
capacity-dmips-mhz = <530>;
|
||||
performance-domains = <&performance 0>;
|
||||
capacity-dmips-mhz = <427>;
|
||||
};
|
||||
|
||||
cpu2: cpu@200 {
|
||||
@@ -86,7 +88,8 @@
|
||||
clock-frequency = <1701000000>;
|
||||
cpu-idle-states = <&cpu_sleep_l &cluster_sleep_l>;
|
||||
next-level-cache = <&l2_0>;
|
||||
capacity-dmips-mhz = <530>;
|
||||
performance-domains = <&performance 0>;
|
||||
capacity-dmips-mhz = <427>;
|
||||
};
|
||||
|
||||
cpu3: cpu@300 {
|
||||
@@ -97,7 +100,8 @@
|
||||
clock-frequency = <1701000000>;
|
||||
cpu-idle-states = <&cpu_sleep_l &cluster_sleep_l>;
|
||||
next-level-cache = <&l2_0>;
|
||||
capacity-dmips-mhz = <530>;
|
||||
performance-domains = <&performance 0>;
|
||||
capacity-dmips-mhz = <427>;
|
||||
};
|
||||
|
||||
cpu4: cpu@400 {
|
||||
@@ -108,6 +112,7 @@
|
||||
clock-frequency = <2171000000>;
|
||||
cpu-idle-states = <&cpu_sleep_b &cluster_sleep_b>;
|
||||
next-level-cache = <&l2_1>;
|
||||
performance-domains = <&performance 1>;
|
||||
capacity-dmips-mhz = <1024>;
|
||||
};
|
||||
|
||||
@@ -119,6 +124,7 @@
|
||||
clock-frequency = <2171000000>;
|
||||
cpu-idle-states = <&cpu_sleep_b &cluster_sleep_b>;
|
||||
next-level-cache = <&l2_1>;
|
||||
performance-domains = <&performance 1>;
|
||||
capacity-dmips-mhz = <1024>;
|
||||
};
|
||||
|
||||
@@ -130,6 +136,7 @@
|
||||
clock-frequency = <2171000000>;
|
||||
cpu-idle-states = <&cpu_sleep_b &cluster_sleep_b>;
|
||||
next-level-cache = <&l2_1>;
|
||||
performance-domains = <&performance 1>;
|
||||
capacity-dmips-mhz = <1024>;
|
||||
};
|
||||
|
||||
@@ -141,6 +148,7 @@
|
||||
clock-frequency = <2171000000>;
|
||||
cpu-idle-states = <&cpu_sleep_b &cluster_sleep_b>;
|
||||
next-level-cache = <&l2_1>;
|
||||
performance-domains = <&performance 1>;
|
||||
capacity-dmips-mhz = <1024>;
|
||||
};
|
||||
|
||||
@@ -257,6 +265,12 @@
|
||||
compatible = "simple-bus";
|
||||
ranges;
|
||||
|
||||
performance: performance-controller@11bc10 {
|
||||
compatible = "mediatek,cpufreq-hw";
|
||||
reg = <0 0x0011bc10 0 0x120>, <0 0x0011bd30 0 0x120>;
|
||||
#performance-domain-cells = <1>;
|
||||
};
|
||||
|
||||
gic: interrupt-controller@c000000 {
|
||||
compatible = "arm,gic-v3";
|
||||
#interrupt-cells = <4>;
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
interrupt-affinity = <&cpu0>, <&cpu1>;
|
||||
};
|
||||
|
||||
psci {
|
||||
psci: psci {
|
||||
compatible = "arm,psci-0.2";
|
||||
method = "smc";
|
||||
};
|
||||
|
||||
@@ -6,6 +6,18 @@
|
||||
/dts-v1/;
|
||||
#include "sparx5.dtsi"
|
||||
|
||||
&psci {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
enable-method = "spin-table";
|
||||
};
|
||||
|
||||
&cpu1 {
|
||||
enable-method = "spin-table";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -448,21 +448,21 @@
|
||||
vdd_l7-supply = <&pm8916_s4>;
|
||||
|
||||
s3 {
|
||||
regulator-min-microvolt = <375000>;
|
||||
regulator-max-microvolt = <1562000>;
|
||||
regulator-min-microvolt = <1250000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
};
|
||||
|
||||
s4 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-min-microvolt = <1850000>;
|
||||
regulator-max-microvolt = <2150000>;
|
||||
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
l1 {
|
||||
regulator-min-microvolt = <375000>;
|
||||
regulator-max-microvolt = <1525000>;
|
||||
regulator-min-microvolt = <1225000>;
|
||||
regulator-max-microvolt = <1225000>;
|
||||
};
|
||||
|
||||
l2 {
|
||||
@@ -471,13 +471,13 @@
|
||||
};
|
||||
|
||||
l4 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
regulator-min-microvolt = <2050000>;
|
||||
regulator-max-microvolt = <2050000>;
|
||||
};
|
||||
|
||||
l5 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
};
|
||||
|
||||
l6 {
|
||||
@@ -486,60 +486,68 @@
|
||||
};
|
||||
|
||||
l7 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
};
|
||||
|
||||
l8 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
regulator-min-microvolt = <2900000>;
|
||||
regulator-max-microvolt = <2900000>;
|
||||
};
|
||||
|
||||
l9 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
};
|
||||
|
||||
l10 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
regulator-min-microvolt = <2800000>;
|
||||
regulator-max-microvolt = <2800000>;
|
||||
};
|
||||
|
||||
l11 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
regulator-min-microvolt = <2950000>;
|
||||
regulator-max-microvolt = <2950000>;
|
||||
regulator-allow-set-load;
|
||||
regulator-system-load = <200000>;
|
||||
};
|
||||
|
||||
l12 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <2950000>;
|
||||
};
|
||||
|
||||
l13 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
regulator-min-microvolt = <3075000>;
|
||||
regulator-max-microvolt = <3075000>;
|
||||
};
|
||||
|
||||
l14 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
};
|
||||
|
||||
/**
|
||||
* 1.8v required on LS expansion
|
||||
* for mezzanine boards
|
||||
/*
|
||||
* The 96Boards specification expects a 1.8V power rail on the low-speed
|
||||
* expansion connector that is able to provide at least 0.18W / 100 mA.
|
||||
* L15/L16 are connected in parallel to provide 55 mA each. A minimum load
|
||||
* must be specified to ensure the regulators are not put in LPM where they
|
||||
* would only provide 5 mA.
|
||||
*/
|
||||
l15 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-system-load = <50000>;
|
||||
regulator-allow-set-load;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
l16 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-system-load = <50000>;
|
||||
regulator-allow-set-load;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
l17 {
|
||||
@@ -548,8 +556,8 @@
|
||||
};
|
||||
|
||||
l18 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
regulator-min-microvolt = <2700000>;
|
||||
regulator-max-microvolt = <2700000>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
v1p05: v1p05-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
reglator-name = "v1p05";
|
||||
regulator-name = "v1p05";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
v12_poe: v12-poe-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
reglator-name = "v12_poe";
|
||||
regulator-name = "v12_poe";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
|
||||
|
||||
@@ -1088,7 +1088,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
camss: camss@1b00000 {
|
||||
camss: camss@1b0ac00 {
|
||||
compatible = "qcom,msm8916-camss";
|
||||
reg = <0x01b0ac00 0x200>,
|
||||
<0x01b00030 0x4>,
|
||||
@@ -1480,7 +1480,7 @@
|
||||
#sound-dai-cells = <1>;
|
||||
};
|
||||
|
||||
sdhc_1: mmc@7824000 {
|
||||
sdhc_1: mmc@7824900 {
|
||||
compatible = "qcom,msm8916-sdhci", "qcom,sdhci-msm-v4";
|
||||
reg = <0x07824900 0x11c>, <0x07824000 0x800>;
|
||||
reg-names = "hc", "core";
|
||||
@@ -1498,7 +1498,7 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sdhc_2: mmc@7864000 {
|
||||
sdhc_2: mmc@7864900 {
|
||||
compatible = "qcom,msm8916-sdhci", "qcom,sdhci-msm-v4";
|
||||
reg = <0x07864900 0x11c>, <0x07864000 0x800>;
|
||||
reg-names = "hc", "core";
|
||||
|
||||
@@ -746,7 +746,7 @@
|
||||
reg = <0xfc4ab000 0x4>;
|
||||
};
|
||||
|
||||
spmi_bus: spmi@fc4c0000 {
|
||||
spmi_bus: spmi@fc4cf000 {
|
||||
compatible = "qcom,spmi-pmic-arb";
|
||||
reg = <0xfc4cf000 0x1000>,
|
||||
<0xfc4cb000 0x1000>,
|
||||
|
||||
@@ -2045,7 +2045,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
camss: camss@a00000 {
|
||||
camss: camss@a34000 {
|
||||
compatible = "qcom,msm8996-camss";
|
||||
reg = <0x00a34000 0x1000>,
|
||||
<0x00a00030 0x4>,
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2022 Luca Weiss <luca.weiss@fairphone.com>
|
||||
*/
|
||||
|
||||
#include <dt-bindings/iio/qcom,spmi-vadc.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/spmi/spmi.h>
|
||||
|
||||
|
||||
@@ -1902,7 +1902,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
camss: camss@ca00000 {
|
||||
camss: camss@ca00020 {
|
||||
compatible = "qcom,sdm660-camss";
|
||||
reg = <0x0ca00020 0x10>,
|
||||
<0x0ca30000 0x100>,
|
||||
|
||||
@@ -484,6 +484,7 @@
|
||||
};
|
||||
|
||||
rmi4-f12@12 {
|
||||
reg = <0x12>;
|
||||
syna,rezero-wait-ms = <0xc8>;
|
||||
syna,clip-x-high = <0x438>;
|
||||
syna,clip-y-high = <0x870>;
|
||||
|
||||
@@ -4207,7 +4207,7 @@
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
camss: camss@a00000 {
|
||||
camss: camss@acb3000 {
|
||||
compatible = "qcom,sdm845-camss";
|
||||
|
||||
reg = <0 0xacb3000 0 0x1000>,
|
||||
@@ -5043,6 +5043,7 @@
|
||||
<SLEEP_TCS 3>,
|
||||
<WAKE_TCS 3>,
|
||||
<CONTROL_TCS 1>;
|
||||
power-domains = <&CLUSTER_PD>;
|
||||
|
||||
apps_bcm_voter: bcm-voter {
|
||||
compatible = "qcom,bcm-voter";
|
||||
|
||||
@@ -26,9 +26,10 @@
|
||||
framebuffer: framebuffer@9c000000 {
|
||||
compatible = "simple-framebuffer";
|
||||
reg = <0 0x9c000000 0 0x2300000>;
|
||||
width = <1644>;
|
||||
height = <3840>;
|
||||
stride = <(1644 * 4)>;
|
||||
/* pdx203 BL initializes in 2.5k mode, not 4k */
|
||||
width = <1096>;
|
||||
height = <2560>;
|
||||
stride = <(1096 * 4)>;
|
||||
format = "a8r8g8b8";
|
||||
/*
|
||||
* That's a lot of clocks, but it's necessary due
|
||||
|
||||
@@ -678,7 +678,7 @@
|
||||
};
|
||||
|
||||
gpi_dma2: dma-controller@800000 {
|
||||
compatible = "qcom,sm8350-gpi-dma";
|
||||
compatible = "qcom,sm8350-gpi-dma", "qcom,sm6350-gpi-dma";
|
||||
reg = <0 0x00800000 0 0x60000>;
|
||||
interrupts = <GIC_SPI 588 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 589 IRQ_TYPE_LEVEL_HIGH>,
|
||||
@@ -903,8 +903,8 @@
|
||||
};
|
||||
};
|
||||
|
||||
gpi_dma0: dma-controller@900000 {
|
||||
compatible = "qcom,sm8350-gpi-dma";
|
||||
gpi_dma0: dma-controller@9800000 {
|
||||
compatible = "qcom,sm8350-gpi-dma", "qcom,sm6350-gpi-dma";
|
||||
reg = <0 0x09800000 0 0x60000>;
|
||||
interrupts = <GIC_SPI 244 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>,
|
||||
@@ -1207,7 +1207,7 @@
|
||||
};
|
||||
|
||||
gpi_dma1: dma-controller@a00000 {
|
||||
compatible = "qcom,sm8350-gpi-dma";
|
||||
compatible = "qcom,sm8350-gpi-dma", "qcom,sm6350-gpi-dma";
|
||||
reg = <0 0x00a00000 0 0x60000>;
|
||||
interrupts = <GIC_SPI 279 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 280 IRQ_TYPE_LEVEL_HIGH>,
|
||||
|
||||
@@ -393,7 +393,7 @@
|
||||
};
|
||||
|
||||
scif1_pins: scif1 {
|
||||
groups = "scif1_data_b", "scif1_ctrl";
|
||||
groups = "scif1_data_b";
|
||||
function = "scif1";
|
||||
};
|
||||
|
||||
@@ -447,7 +447,6 @@
|
||||
&scif1 {
|
||||
pinctrl-0 = <&scif1_pins>;
|
||||
pinctrl-names = "default";
|
||||
uart-has-rtscts;
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -83,25 +83,25 @@
|
||||
&wkup_pmx2 {
|
||||
mcu_cpsw_pins_default: mcu-cpsw-pins-default {
|
||||
pinctrl-single,pins = <
|
||||
J721E_WKUP_IOPAD(0x0068, PIN_OUTPUT, 0) /* MCU_RGMII1_TX_CTL */
|
||||
J721E_WKUP_IOPAD(0x006c, PIN_INPUT, 0) /* MCU_RGMII1_RX_CTL */
|
||||
J721E_WKUP_IOPAD(0x0070, PIN_OUTPUT, 0) /* MCU_RGMII1_TD3 */
|
||||
J721E_WKUP_IOPAD(0x0074, PIN_OUTPUT, 0) /* MCU_RGMII1_TD2 */
|
||||
J721E_WKUP_IOPAD(0x0078, PIN_OUTPUT, 0) /* MCU_RGMII1_TD1 */
|
||||
J721E_WKUP_IOPAD(0x007c, PIN_OUTPUT, 0) /* MCU_RGMII1_TD0 */
|
||||
J721E_WKUP_IOPAD(0x0088, PIN_INPUT, 0) /* MCU_RGMII1_RD3 */
|
||||
J721E_WKUP_IOPAD(0x008c, PIN_INPUT, 0) /* MCU_RGMII1_RD2 */
|
||||
J721E_WKUP_IOPAD(0x0090, PIN_INPUT, 0) /* MCU_RGMII1_RD1 */
|
||||
J721E_WKUP_IOPAD(0x0094, PIN_INPUT, 0) /* MCU_RGMII1_RD0 */
|
||||
J721E_WKUP_IOPAD(0x0080, PIN_OUTPUT, 0) /* MCU_RGMII1_TXC */
|
||||
J721E_WKUP_IOPAD(0x0084, PIN_INPUT, 0) /* MCU_RGMII1_RXC */
|
||||
J721E_WKUP_IOPAD(0x0000, PIN_OUTPUT, 0) /* MCU_RGMII1_TX_CTL */
|
||||
J721E_WKUP_IOPAD(0x0004, PIN_INPUT, 0) /* MCU_RGMII1_RX_CTL */
|
||||
J721E_WKUP_IOPAD(0x0008, PIN_OUTPUT, 0) /* MCU_RGMII1_TD3 */
|
||||
J721E_WKUP_IOPAD(0x000c, PIN_OUTPUT, 0) /* MCU_RGMII1_TD2 */
|
||||
J721E_WKUP_IOPAD(0x0010, PIN_OUTPUT, 0) /* MCU_RGMII1_TD1 */
|
||||
J721E_WKUP_IOPAD(0x0014, PIN_OUTPUT, 0) /* MCU_RGMII1_TD0 */
|
||||
J721E_WKUP_IOPAD(0x0020, PIN_INPUT, 0) /* MCU_RGMII1_RD3 */
|
||||
J721E_WKUP_IOPAD(0x0024, PIN_INPUT, 0) /* MCU_RGMII1_RD2 */
|
||||
J721E_WKUP_IOPAD(0x0028, PIN_INPUT, 0) /* MCU_RGMII1_RD1 */
|
||||
J721E_WKUP_IOPAD(0x002c, PIN_INPUT, 0) /* MCU_RGMII1_RD0 */
|
||||
J721E_WKUP_IOPAD(0x0018, PIN_OUTPUT, 0) /* MCU_RGMII1_TXC */
|
||||
J721E_WKUP_IOPAD(0x001c, PIN_INPUT, 0) /* MCU_RGMII1_RXC */
|
||||
>;
|
||||
};
|
||||
|
||||
mcu_mdio_pins_default: mcu-mdio1-pins-default {
|
||||
pinctrl-single,pins = <
|
||||
J721E_WKUP_IOPAD(0x009c, PIN_OUTPUT, 0) /* (L1) MCU_MDIO0_MDC */
|
||||
J721E_WKUP_IOPAD(0x0098, PIN_INPUT, 0) /* (L4) MCU_MDIO0_MDIO */
|
||||
J721E_WKUP_IOPAD(0x0034, PIN_OUTPUT, 0) /* (L1) MCU_MDIO0_MDC */
|
||||
J721E_WKUP_IOPAD(0x0030, PIN_INPUT, 0) /* (L4) MCU_MDIO0_MDIO */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -294,12 +294,12 @@
|
||||
_for n, 0, 15, _sve_str_p \n, \nxbase, \n - 16
|
||||
cbz \save_ffr, 921f
|
||||
_sve_rdffr 0
|
||||
_sve_str_p 0, \nxbase
|
||||
_sve_ldr_p 0, \nxbase, -16
|
||||
b 922f
|
||||
921:
|
||||
str xzr, [x\nxbase] // Zero out FFR
|
||||
_sve_pfalse 0 // Zero out FFR
|
||||
922:
|
||||
_sve_str_p 0, \nxbase
|
||||
_sve_ldr_p 0, \nxbase, -16
|
||||
mrs x\nxtmp, fpsr
|
||||
str w\nxtmp, [\xpfpsr]
|
||||
mrs x\nxtmp, fpcr
|
||||
|
||||
@@ -240,7 +240,7 @@ config PPC_EARLY_DEBUG_40x
|
||||
|
||||
config PPC_EARLY_DEBUG_CPM
|
||||
bool "Early serial debugging for Freescale CPM-based serial ports"
|
||||
depends on SERIAL_CPM
|
||||
depends on SERIAL_CPM=y
|
||||
help
|
||||
Select this to enable early debugging for Freescale chips
|
||||
using a CPM-based serial port. This assumes that the bootwrapper
|
||||
|
||||
@@ -453,12 +453,12 @@
|
||||
* channel 1 (but only USB 2.0 subset) to USB 2.0 pins on mPCIe
|
||||
* slot 1 (CN5), channels 2 and 3 to connector P600.
|
||||
*
|
||||
* P2020 PCIe Root Port uses 1MB of PCIe MEM and xHCI controller
|
||||
* P2020 PCIe Root Port does not use PCIe MEM and xHCI controller
|
||||
* uses 64kB + 8kB of PCIe MEM. No PCIe IO is used or required.
|
||||
* So allocate 2MB of PCIe MEM for this PCIe bus.
|
||||
* So allocate 128kB of PCIe MEM for this PCIe bus.
|
||||
*/
|
||||
reg = <0 0xffe08000 0 0x1000>;
|
||||
ranges = <0x02000000 0x0 0xc0000000 0 0xc0000000 0x0 0x00200000>, /* MEM */
|
||||
ranges = <0x02000000 0x0 0xc0000000 0 0xc0000000 0x0 0x00020000>, /* MEM */
|
||||
<0x01000000 0x0 0x00000000 0 0xffc20000 0x0 0x00010000>; /* IO */
|
||||
|
||||
pcie@0 {
|
||||
|
||||
@@ -368,7 +368,6 @@ void preempt_schedule_irq(void);
|
||||
|
||||
notrace unsigned long interrupt_exit_kernel_prepare(struct pt_regs *regs)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long ret = 0;
|
||||
unsigned long kuap;
|
||||
bool stack_store = read_thread_flags() & _TIF_EMULATE_STACK_STORE;
|
||||
@@ -392,7 +391,7 @@ notrace unsigned long interrupt_exit_kernel_prepare(struct pt_regs *regs)
|
||||
|
||||
kuap = kuap_get_and_assert_locked();
|
||||
|
||||
local_irq_save(flags);
|
||||
local_irq_disable();
|
||||
|
||||
if (!arch_irq_disabled_regs(regs)) {
|
||||
/* Returning to a kernel context with local irqs enabled. */
|
||||
|
||||
@@ -21,60 +21,33 @@
|
||||
* different ABIs, though).
|
||||
*/
|
||||
_GLOBAL(ppc_save_regs)
|
||||
PPC_STL r0,0*SZL(r3)
|
||||
/* This allows stack frame accessor macros and offsets to be used */
|
||||
subi r3,r3,STACK_FRAME_OVERHEAD
|
||||
PPC_STL r0,GPR0(r3)
|
||||
#ifdef CONFIG_PPC32
|
||||
stmw r2, 2*SZL(r3)
|
||||
stmw r2,GPR2(r3)
|
||||
#else
|
||||
PPC_STL r2,2*SZL(r3)
|
||||
PPC_STL r3,3*SZL(r3)
|
||||
PPC_STL r4,4*SZL(r3)
|
||||
PPC_STL r5,5*SZL(r3)
|
||||
PPC_STL r6,6*SZL(r3)
|
||||
PPC_STL r7,7*SZL(r3)
|
||||
PPC_STL r8,8*SZL(r3)
|
||||
PPC_STL r9,9*SZL(r3)
|
||||
PPC_STL r10,10*SZL(r3)
|
||||
PPC_STL r11,11*SZL(r3)
|
||||
PPC_STL r12,12*SZL(r3)
|
||||
PPC_STL r13,13*SZL(r3)
|
||||
PPC_STL r14,14*SZL(r3)
|
||||
PPC_STL r15,15*SZL(r3)
|
||||
PPC_STL r16,16*SZL(r3)
|
||||
PPC_STL r17,17*SZL(r3)
|
||||
PPC_STL r18,18*SZL(r3)
|
||||
PPC_STL r19,19*SZL(r3)
|
||||
PPC_STL r20,20*SZL(r3)
|
||||
PPC_STL r21,21*SZL(r3)
|
||||
PPC_STL r22,22*SZL(r3)
|
||||
PPC_STL r23,23*SZL(r3)
|
||||
PPC_STL r24,24*SZL(r3)
|
||||
PPC_STL r25,25*SZL(r3)
|
||||
PPC_STL r26,26*SZL(r3)
|
||||
PPC_STL r27,27*SZL(r3)
|
||||
PPC_STL r28,28*SZL(r3)
|
||||
PPC_STL r29,29*SZL(r3)
|
||||
PPC_STL r30,30*SZL(r3)
|
||||
PPC_STL r31,31*SZL(r3)
|
||||
SAVE_GPRS(2, 31, r3)
|
||||
lbz r0,PACAIRQSOFTMASK(r13)
|
||||
PPC_STL r0,SOFTE-STACK_FRAME_OVERHEAD(r3)
|
||||
PPC_STL r0,SOFTE(r3)
|
||||
#endif
|
||||
/* go up one stack frame for SP */
|
||||
PPC_LL r4,0(r1)
|
||||
PPC_STL r4,1*SZL(r3)
|
||||
/* store current SP */
|
||||
PPC_STL r1,GPR1(r3)
|
||||
/* get caller's LR */
|
||||
PPC_LL r4,0(r1)
|
||||
PPC_LL r0,LRSAVE(r4)
|
||||
PPC_STL r0,_LINK-STACK_FRAME_OVERHEAD(r3)
|
||||
PPC_STL r0,_LINK(r3)
|
||||
mflr r0
|
||||
PPC_STL r0,_NIP-STACK_FRAME_OVERHEAD(r3)
|
||||
PPC_STL r0,_NIP(r3)
|
||||
mfmsr r0
|
||||
PPC_STL r0,_MSR-STACK_FRAME_OVERHEAD(r3)
|
||||
PPC_STL r0,_MSR(r3)
|
||||
mfctr r0
|
||||
PPC_STL r0,_CTR-STACK_FRAME_OVERHEAD(r3)
|
||||
PPC_STL r0,_CTR(r3)
|
||||
mfxer r0
|
||||
PPC_STL r0,_XER-STACK_FRAME_OVERHEAD(r3)
|
||||
PPC_STL r0,_XER(r3)
|
||||
mfcr r0
|
||||
PPC_STL r0,_CCR-STACK_FRAME_OVERHEAD(r3)
|
||||
PPC_STL r0,_CCR(r3)
|
||||
li r0,0
|
||||
PPC_STL r0,_TRAP-STACK_FRAME_OVERHEAD(r3)
|
||||
PPC_STL r0,ORIG_GPR3-STACK_FRAME_OVERHEAD(r3)
|
||||
PPC_STL r0,_TRAP(r3)
|
||||
PPC_STL r0,ORIG_GPR3(r3)
|
||||
blr
|
||||
|
||||
@@ -264,8 +264,9 @@ static void prepare_save_user_regs(int ctx_has_vsx_region)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int __unsafe_save_user_regs(struct pt_regs *regs, struct mcontext __user *frame,
|
||||
struct mcontext __user *tm_frame, int ctx_has_vsx_region)
|
||||
static __always_inline int
|
||||
__unsafe_save_user_regs(struct pt_regs *regs, struct mcontext __user *frame,
|
||||
struct mcontext __user *tm_frame, int ctx_has_vsx_region)
|
||||
{
|
||||
unsigned long msr = regs->msr;
|
||||
|
||||
@@ -364,8 +365,9 @@ static void prepare_save_tm_user_regs(void)
|
||||
current->thread.ckvrsave = mfspr(SPRN_VRSAVE);
|
||||
}
|
||||
|
||||
static int save_tm_user_regs_unsafe(struct pt_regs *regs, struct mcontext __user *frame,
|
||||
struct mcontext __user *tm_frame, unsigned long msr)
|
||||
static __always_inline int
|
||||
save_tm_user_regs_unsafe(struct pt_regs *regs, struct mcontext __user *frame,
|
||||
struct mcontext __user *tm_frame, unsigned long msr)
|
||||
{
|
||||
/* Save both sets of general registers */
|
||||
unsafe_save_general_regs(¤t->thread.ckpt_regs, frame, failed);
|
||||
@@ -444,8 +446,9 @@ failed:
|
||||
#else
|
||||
static void prepare_save_tm_user_regs(void) { }
|
||||
|
||||
static int save_tm_user_regs_unsafe(struct pt_regs *regs, struct mcontext __user *frame,
|
||||
struct mcontext __user *tm_frame, unsigned long msr)
|
||||
static __always_inline int
|
||||
save_tm_user_regs_unsafe(struct pt_regs *regs, struct mcontext __user *frame,
|
||||
struct mcontext __user *tm_frame, unsigned long msr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -745,9 +745,9 @@ static void free_pud_table(pud_t *pud_start, p4d_t *p4d)
|
||||
}
|
||||
|
||||
static void remove_pte_table(pte_t *pte_start, unsigned long addr,
|
||||
unsigned long end)
|
||||
unsigned long end, bool direct)
|
||||
{
|
||||
unsigned long next;
|
||||
unsigned long next, pages = 0;
|
||||
pte_t *pte;
|
||||
|
||||
pte = pte_start + pte_index(addr);
|
||||
@@ -769,13 +769,16 @@ static void remove_pte_table(pte_t *pte_start, unsigned long addr,
|
||||
}
|
||||
|
||||
pte_clear(&init_mm, addr, pte);
|
||||
pages++;
|
||||
}
|
||||
if (direct)
|
||||
update_page_count(mmu_virtual_psize, -pages);
|
||||
}
|
||||
|
||||
static void __meminit remove_pmd_table(pmd_t *pmd_start, unsigned long addr,
|
||||
unsigned long end)
|
||||
unsigned long end, bool direct)
|
||||
{
|
||||
unsigned long next;
|
||||
unsigned long next, pages = 0;
|
||||
pte_t *pte_base;
|
||||
pmd_t *pmd;
|
||||
|
||||
@@ -793,19 +796,22 @@ static void __meminit remove_pmd_table(pmd_t *pmd_start, unsigned long addr,
|
||||
continue;
|
||||
}
|
||||
pte_clear(&init_mm, addr, (pte_t *)pmd);
|
||||
pages++;
|
||||
continue;
|
||||
}
|
||||
|
||||
pte_base = (pte_t *)pmd_page_vaddr(*pmd);
|
||||
remove_pte_table(pte_base, addr, next);
|
||||
remove_pte_table(pte_base, addr, next, direct);
|
||||
free_pte_table(pte_base, pmd);
|
||||
}
|
||||
if (direct)
|
||||
update_page_count(MMU_PAGE_2M, -pages);
|
||||
}
|
||||
|
||||
static void __meminit remove_pud_table(pud_t *pud_start, unsigned long addr,
|
||||
unsigned long end)
|
||||
unsigned long end, bool direct)
|
||||
{
|
||||
unsigned long next;
|
||||
unsigned long next, pages = 0;
|
||||
pmd_t *pmd_base;
|
||||
pud_t *pud;
|
||||
|
||||
@@ -823,16 +829,20 @@ static void __meminit remove_pud_table(pud_t *pud_start, unsigned long addr,
|
||||
continue;
|
||||
}
|
||||
pte_clear(&init_mm, addr, (pte_t *)pud);
|
||||
pages++;
|
||||
continue;
|
||||
}
|
||||
|
||||
pmd_base = pud_pgtable(*pud);
|
||||
remove_pmd_table(pmd_base, addr, next);
|
||||
remove_pmd_table(pmd_base, addr, next, direct);
|
||||
free_pmd_table(pmd_base, pud);
|
||||
}
|
||||
if (direct)
|
||||
update_page_count(MMU_PAGE_1G, -pages);
|
||||
}
|
||||
|
||||
static void __meminit remove_pagetable(unsigned long start, unsigned long end)
|
||||
static void __meminit remove_pagetable(unsigned long start, unsigned long end,
|
||||
bool direct)
|
||||
{
|
||||
unsigned long addr, next;
|
||||
pud_t *pud_base;
|
||||
@@ -861,7 +871,7 @@ static void __meminit remove_pagetable(unsigned long start, unsigned long end)
|
||||
}
|
||||
|
||||
pud_base = p4d_pgtable(*p4d);
|
||||
remove_pud_table(pud_base, addr, next);
|
||||
remove_pud_table(pud_base, addr, next, direct);
|
||||
free_pud_table(pud_base, p4d);
|
||||
}
|
||||
|
||||
@@ -884,7 +894,7 @@ int __meminit radix__create_section_mapping(unsigned long start,
|
||||
|
||||
int __meminit radix__remove_section_mapping(unsigned long start, unsigned long end)
|
||||
{
|
||||
remove_pagetable(start, end);
|
||||
remove_pagetable(start, end, true);
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_MEMORY_HOTPLUG */
|
||||
@@ -920,7 +930,7 @@ int __meminit radix__vmemmap_create_mapping(unsigned long start,
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
void __meminit radix__vmemmap_remove_mapping(unsigned long start, unsigned long page_size)
|
||||
{
|
||||
remove_pagetable(start, start + page_size);
|
||||
remove_pagetable(start, start + page_size, false);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -189,7 +189,7 @@ static bool altmap_cross_boundary(struct vmem_altmap *altmap, unsigned long star
|
||||
unsigned long nr_pfn = page_size / sizeof(struct page);
|
||||
unsigned long start_pfn = page_to_pfn((struct page *)start);
|
||||
|
||||
if ((start_pfn + nr_pfn) > altmap->end_pfn)
|
||||
if ((start_pfn + nr_pfn - 1) > altmap->end_pfn)
|
||||
return true;
|
||||
|
||||
if (start_pfn < altmap->base_pfn)
|
||||
|
||||
@@ -594,12 +594,12 @@ static void pnv_pci_sriov_disable(struct pci_dev *pdev)
|
||||
struct pnv_iov_data *iov;
|
||||
|
||||
iov = pnv_iov_get(pdev);
|
||||
num_vfs = iov->num_vfs;
|
||||
base_pe = iov->vf_pe_arr[0].pe_number;
|
||||
|
||||
if (WARN_ON(!iov))
|
||||
return;
|
||||
|
||||
num_vfs = iov->num_vfs;
|
||||
base_pe = iov->vf_pe_arr[0].pe_number;
|
||||
|
||||
/* Release VF PEs */
|
||||
pnv_ioda_release_vf_PE(pdev);
|
||||
|
||||
|
||||
@@ -1310,8 +1310,8 @@ int vas_win_close(struct vas_window *vwin)
|
||||
/* if send window, drop reference to matching receive window */
|
||||
if (window->tx_win) {
|
||||
if (window->user_win) {
|
||||
put_vas_user_win_ref(&vwin->task_ref);
|
||||
mm_context_remove_vas_window(vwin->task_ref.mm);
|
||||
put_vas_user_win_ref(&vwin->task_ref);
|
||||
}
|
||||
put_rx_win(window->rxwin);
|
||||
}
|
||||
|
||||
@@ -507,8 +507,8 @@ static int vas_deallocate_window(struct vas_window *vwin)
|
||||
vascaps[win->win_type].nr_open_windows--;
|
||||
mutex_unlock(&vas_pseries_mutex);
|
||||
|
||||
put_vas_user_win_ref(&vwin->task_ref);
|
||||
mm_context_remove_vas_window(vwin->task_ref.mm);
|
||||
put_vas_user_win_ref(&vwin->task_ref);
|
||||
|
||||
kfree(win);
|
||||
return 0;
|
||||
|
||||
@@ -67,6 +67,7 @@ int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
|
||||
struct uprobe_task *utask = current->utask;
|
||||
|
||||
WARN_ON_ONCE(current->thread.bad_cause != UPROBE_TRAP_NR);
|
||||
current->thread.bad_cause = utask->autask.saved_cause;
|
||||
|
||||
instruction_pointer_set(regs, utask->vaddr + auprobe->insn_size);
|
||||
|
||||
@@ -102,6 +103,7 @@ void arch_uprobe_abort_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
|
||||
{
|
||||
struct uprobe_task *utask = current->utask;
|
||||
|
||||
current->thread.bad_cause = utask->autask.saved_cause;
|
||||
/*
|
||||
* Task has received a fatal signal, so reset back to probbed
|
||||
* address.
|
||||
|
||||
@@ -255,7 +255,6 @@ static void __init setup_bootmem(void)
|
||||
dma_contiguous_reserve(dma32_phys_limit);
|
||||
if (IS_ENABLED(CONFIG_64BIT))
|
||||
hugetlb_cma_reserve(PUD_SHIFT - PAGE_SHIFT);
|
||||
memblock_allow_resize();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
@@ -1211,6 +1210,9 @@ void __init paging_init(void)
|
||||
{
|
||||
setup_bootmem();
|
||||
setup_vm_final();
|
||||
|
||||
/* Depend on that Linear Mapping is ready */
|
||||
memblock_allow_resize();
|
||||
}
|
||||
|
||||
void __init misc_mem_init(void)
|
||||
|
||||
@@ -166,6 +166,7 @@ static int diag9c_forwarding_overrun(void)
|
||||
static int __diag_time_slice_end_directed(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
struct kvm_vcpu *tcpu;
|
||||
int tcpu_cpu;
|
||||
int tid;
|
||||
|
||||
tid = vcpu->run->s.regs.gprs[(vcpu->arch.sie_block->ipa & 0xf0) >> 4];
|
||||
@@ -181,14 +182,15 @@ static int __diag_time_slice_end_directed(struct kvm_vcpu *vcpu)
|
||||
goto no_yield;
|
||||
|
||||
/* target guest VCPU already running */
|
||||
if (READ_ONCE(tcpu->cpu) >= 0) {
|
||||
tcpu_cpu = READ_ONCE(tcpu->cpu);
|
||||
if (tcpu_cpu >= 0) {
|
||||
if (!diag9c_forwarding_hz || diag9c_forwarding_overrun())
|
||||
goto no_yield;
|
||||
|
||||
/* target host CPU already running */
|
||||
if (!vcpu_is_preempted(tcpu->cpu))
|
||||
if (!vcpu_is_preempted(tcpu_cpu))
|
||||
goto no_yield;
|
||||
smp_yield_cpu(tcpu->cpu);
|
||||
smp_yield_cpu(tcpu_cpu);
|
||||
VCPU_EVENT(vcpu, 5,
|
||||
"diag time slice end directed to %d: yield forwarded",
|
||||
tid);
|
||||
|
||||
@@ -2147,6 +2147,10 @@ static unsigned long kvm_s390_next_dirty_cmma(struct kvm_memslots *slots,
|
||||
ms = container_of(mnode, struct kvm_memory_slot, gfn_node[slots->node_idx]);
|
||||
ofs = 0;
|
||||
}
|
||||
|
||||
if (cur_gfn < ms->base_gfn)
|
||||
ofs = 0;
|
||||
|
||||
ofs = find_next_bit(kvm_second_dirty_bitmap(ms), ms->npages, ofs);
|
||||
while (ofs >= ms->npages && (mnode = rb_next(mnode))) {
|
||||
ms = container_of(mnode, struct kvm_memory_slot, gfn_node[slots->node_idx]);
|
||||
|
||||
@@ -169,7 +169,8 @@ static int setup_apcb00(struct kvm_vcpu *vcpu, unsigned long *apcb_s,
|
||||
sizeof(struct kvm_s390_apcb0)))
|
||||
return -EFAULT;
|
||||
|
||||
bitmap_and(apcb_s, apcb_s, apcb_h, sizeof(struct kvm_s390_apcb0));
|
||||
bitmap_and(apcb_s, apcb_s, apcb_h,
|
||||
BITS_PER_BYTE * sizeof(struct kvm_s390_apcb0));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -191,7 +192,8 @@ static int setup_apcb11(struct kvm_vcpu *vcpu, unsigned long *apcb_s,
|
||||
sizeof(struct kvm_s390_apcb1)))
|
||||
return -EFAULT;
|
||||
|
||||
bitmap_and(apcb_s, apcb_s, apcb_h, sizeof(struct kvm_s390_apcb1));
|
||||
bitmap_and(apcb_s, apcb_s, apcb_h,
|
||||
BITS_PER_BYTE * sizeof(struct kvm_s390_apcb1));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -108,13 +108,13 @@ int systemasic_irq_demux(int irq)
|
||||
__u32 j, bit;
|
||||
|
||||
switch (irq) {
|
||||
case 13:
|
||||
case 13 + 16:
|
||||
level = 0;
|
||||
break;
|
||||
case 11:
|
||||
case 11 + 16:
|
||||
level = 1;
|
||||
break;
|
||||
case 9:
|
||||
case 9 + 16:
|
||||
level = 2;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -389,10 +389,10 @@ static unsigned char irl2irq[HL_NR_IRL];
|
||||
|
||||
static int highlander_irq_demux(int irq)
|
||||
{
|
||||
if (irq >= HL_NR_IRL || irq < 0 || !irl2irq[irq])
|
||||
if (irq >= HL_NR_IRL + 16 || irq < 16 || !irl2irq[irq - 16])
|
||||
return irq;
|
||||
|
||||
return irl2irq[irq];
|
||||
return irl2irq[irq - 16];
|
||||
}
|
||||
|
||||
static void __init highlander_init_irq(void)
|
||||
|
||||
@@ -117,10 +117,10 @@ static unsigned char irl2irq[R2D_NR_IRL];
|
||||
|
||||
int rts7751r2d_irq_demux(int irq)
|
||||
{
|
||||
if (irq >= R2D_NR_IRL || irq < 0 || !irl2irq[irq])
|
||||
if (irq >= R2D_NR_IRL + 16 || irq < 16 || !irl2irq[irq - 16])
|
||||
return irq;
|
||||
|
||||
return irl2irq[irq];
|
||||
return irl2irq[irq - 16];
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -29,9 +29,9 @@ endchoice
|
||||
config HD64461_IRQ
|
||||
int "HD64461 IRQ"
|
||||
depends on HD64461
|
||||
default "36"
|
||||
default "52"
|
||||
help
|
||||
The default setting of the HD64461 IRQ is 36.
|
||||
The default setting of the HD64461 IRQ is 52.
|
||||
|
||||
Do not change this unless you know what you are doing.
|
||||
|
||||
|
||||
@@ -18,6 +18,18 @@
|
||||
#include <cpu/dma-register.h>
|
||||
#include <cpu/dma.h>
|
||||
|
||||
/*
|
||||
* Some of the SoCs feature two DMAC modules. In such a case, the channels are
|
||||
* distributed equally among them.
|
||||
*/
|
||||
#ifdef SH_DMAC_BASE1
|
||||
#define SH_DMAC_NR_MD_CH (CONFIG_NR_ONCHIP_DMA_CHANNELS / 2)
|
||||
#else
|
||||
#define SH_DMAC_NR_MD_CH CONFIG_NR_ONCHIP_DMA_CHANNELS
|
||||
#endif
|
||||
|
||||
#define SH_DMAC_CH_SZ 0x10
|
||||
|
||||
/*
|
||||
* Define the default configuration for dual address memory-memory transfer.
|
||||
* The 0x400 value represents auto-request, external->external.
|
||||
@@ -29,7 +41,7 @@ static unsigned long dma_find_base(unsigned int chan)
|
||||
unsigned long base = SH_DMAC_BASE0;
|
||||
|
||||
#ifdef SH_DMAC_BASE1
|
||||
if (chan >= 6)
|
||||
if (chan >= SH_DMAC_NR_MD_CH)
|
||||
base = SH_DMAC_BASE1;
|
||||
#endif
|
||||
|
||||
@@ -40,13 +52,13 @@ static unsigned long dma_base_addr(unsigned int chan)
|
||||
{
|
||||
unsigned long base = dma_find_base(chan);
|
||||
|
||||
/* Normalize offset calculation */
|
||||
if (chan >= 9)
|
||||
chan -= 6;
|
||||
if (chan >= 4)
|
||||
base += 0x10;
|
||||
chan = (chan % SH_DMAC_NR_MD_CH) * SH_DMAC_CH_SZ;
|
||||
|
||||
return base + (chan * 0x10);
|
||||
/* DMAOR is placed inside the channel register space. Step over it. */
|
||||
if (chan >= DMAOR)
|
||||
base += SH_DMAC_CH_SZ;
|
||||
|
||||
return base + chan;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SH_DMA_IRQ_MULTI
|
||||
@@ -250,12 +262,11 @@ static int sh_dmac_get_dma_residue(struct dma_channel *chan)
|
||||
#define NR_DMAOR 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* DMAOR bases are broken out amongst channel groups. DMAOR0 manages
|
||||
* channels 0 - 5, DMAOR1 6 - 11 (optional).
|
||||
*/
|
||||
#define dmaor_read_reg(n) __raw_readw(dma_find_base((n)*6))
|
||||
#define dmaor_write_reg(n, data) __raw_writew(data, dma_find_base(n)*6)
|
||||
#define dmaor_read_reg(n) __raw_readw(dma_find_base((n) * \
|
||||
SH_DMAC_NR_MD_CH) + DMAOR)
|
||||
#define dmaor_write_reg(n, data) __raw_writew(data, \
|
||||
dma_find_base((n) * \
|
||||
SH_DMAC_NR_MD_CH) + DMAOR)
|
||||
|
||||
static inline int dmaor_reset(int no)
|
||||
{
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
#define HD64461_NIMR HD64461_IO_OFFSET(0x5002)
|
||||
|
||||
#define HD64461_IRQBASE OFFCHIP_IRQ_BASE
|
||||
#define OFFCHIP_IRQ_BASE 64
|
||||
#define OFFCHIP_IRQ_BASE (64 + 16)
|
||||
#define HD64461_IRQ_NUM 16
|
||||
|
||||
#define HD64461_IRQ_UART (HD64461_IRQBASE+5)
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
#define IVDR_CK_ON 4 /* iVDR Clock ON */
|
||||
#endif
|
||||
|
||||
#define HL_FPGA_IRQ_BASE 200
|
||||
#define HL_FPGA_IRQ_BASE (200 + 16)
|
||||
#define HL_NR_IRL 15
|
||||
|
||||
#define IRQ_AX88796 (HL_FPGA_IRQ_BASE + 0)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
#define IRLCNTR1 (PA_BCR + 0) /* Interrupt Control Register1 */
|
||||
|
||||
#define R2D_FPGA_IRQ_BASE 100
|
||||
#define R2D_FPGA_IRQ_BASE (100 + 16)
|
||||
|
||||
#define IRQ_VOYAGER (R2D_FPGA_IRQ_BASE + 0)
|
||||
#define IRQ_EXT (R2D_FPGA_IRQ_BASE + 1)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
takes.
|
||||
*/
|
||||
|
||||
#define HW_EVENT_IRQ_BASE 48
|
||||
#define HW_EVENT_IRQ_BASE (48 + 16)
|
||||
|
||||
/* IRQ 13 */
|
||||
#define HW_EVENT_VSYNC (HW_EVENT_IRQ_BASE + 5) /* VSync */
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#define IRQ2_IRQ evt2irq(0x640)
|
||||
|
||||
/* Bits in IRQ012 registers */
|
||||
#define SE7724_FPGA_IRQ_BASE 220
|
||||
#define SE7724_FPGA_IRQ_BASE (220 + 16)
|
||||
|
||||
/* IRQ0 */
|
||||
#define IRQ0_BASE SE7724_FPGA_IRQ_BASE
|
||||
|
||||
@@ -21,7 +21,7 @@ static int __init scan_cache(unsigned long node, const char *uname,
|
||||
if (!of_flat_dt_is_compatible(node, "jcore,cache"))
|
||||
return 0;
|
||||
|
||||
j2_ccr_base = (u32 __iomem *)of_flat_dt_translate_address(node);
|
||||
j2_ccr_base = ioremap(of_flat_dt_translate_address(node), 4);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -470,9 +470,9 @@ ENTRY(handle_interrupt)
|
||||
mov r4, r0 ! save vector->jmp table offset for later
|
||||
|
||||
shlr2 r4 ! vector to IRQ# conversion
|
||||
add #-0x10, r4
|
||||
|
||||
cmp/pz r4 ! is it a valid IRQ?
|
||||
mov #0x10, r5
|
||||
cmp/hs r5, r4 ! is it a valid IRQ?
|
||||
bt 10f
|
||||
|
||||
/*
|
||||
|
||||
@@ -148,7 +148,7 @@ export LDFLAGS_vmlinux := $(LDFLAGS_EXECSTACK)
|
||||
# When cleaning we don't include .config, so we don't include
|
||||
# TT or skas makefiles and don't clean skas_ptregs.h.
|
||||
CLEAN_FILES += linux x.i gmon.out
|
||||
MRPROPER_FILES += arch/$(SUBARCH)/include/generated
|
||||
MRPROPER_FILES += $(HOST_DIR)/include/generated
|
||||
|
||||
archclean:
|
||||
@find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
|
||||
|
||||
@@ -756,6 +756,30 @@ static bool tdx_enc_status_changed(unsigned long vaddr, int numpages, bool enc)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool tdx_enc_status_change_prepare(unsigned long vaddr, int numpages,
|
||||
bool enc)
|
||||
{
|
||||
/*
|
||||
* Only handle shared->private conversion here.
|
||||
* See the comment in tdx_early_init().
|
||||
*/
|
||||
if (enc)
|
||||
return tdx_enc_status_changed(vaddr, numpages, enc);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool tdx_enc_status_change_finish(unsigned long vaddr, int numpages,
|
||||
bool enc)
|
||||
{
|
||||
/*
|
||||
* Only handle private->shared conversion here.
|
||||
* See the comment in tdx_early_init().
|
||||
*/
|
||||
if (!enc)
|
||||
return tdx_enc_status_changed(vaddr, numpages, enc);
|
||||
return true;
|
||||
}
|
||||
|
||||
void __init tdx_early_init(void)
|
||||
{
|
||||
u64 cc_mask;
|
||||
@@ -780,9 +804,30 @@ void __init tdx_early_init(void)
|
||||
*/
|
||||
physical_mask &= cc_mask - 1;
|
||||
|
||||
x86_platform.guest.enc_cache_flush_required = tdx_cache_flush_required;
|
||||
x86_platform.guest.enc_tlb_flush_required = tdx_tlb_flush_required;
|
||||
x86_platform.guest.enc_status_change_finish = tdx_enc_status_changed;
|
||||
/*
|
||||
* The kernel mapping should match the TDX metadata for the page.
|
||||
* load_unaligned_zeropad() can touch memory *adjacent* to that which is
|
||||
* owned by the caller and can catch even _momentary_ mismatches. Bad
|
||||
* things happen on mismatch:
|
||||
*
|
||||
* - Private mapping => Shared Page == Guest shutdown
|
||||
* - Shared mapping => Private Page == Recoverable #VE
|
||||
*
|
||||
* guest.enc_status_change_prepare() converts the page from
|
||||
* shared=>private before the mapping becomes private.
|
||||
*
|
||||
* guest.enc_status_change_finish() converts the page from
|
||||
* private=>shared after the mapping becomes private.
|
||||
*
|
||||
* In both cases there is a temporary shared mapping to a private page,
|
||||
* which can result in a #VE. But, there is never a private mapping to
|
||||
* a shared page.
|
||||
*/
|
||||
x86_platform.guest.enc_status_change_prepare = tdx_enc_status_change_prepare;
|
||||
x86_platform.guest.enc_status_change_finish = tdx_enc_status_change_finish;
|
||||
|
||||
x86_platform.guest.enc_cache_flush_required = tdx_cache_flush_required;
|
||||
x86_platform.guest.enc_tlb_flush_required = tdx_tlb_flush_required;
|
||||
|
||||
pr_info("Guest detected\n");
|
||||
}
|
||||
|
||||
@@ -374,7 +374,7 @@ static int amd_pmu_hw_config(struct perf_event *event)
|
||||
|
||||
/* pass precise event sampling to ibs: */
|
||||
if (event->attr.precise_ip && get_ibs_caps())
|
||||
return -ENOENT;
|
||||
return forward_event_to_ibs(event);
|
||||
|
||||
if (has_branch_stack(event) && !x86_pmu.lbr_nr)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
@@ -190,7 +190,7 @@ static struct perf_ibs *get_ibs_pmu(int type)
|
||||
}
|
||||
|
||||
/*
|
||||
* Use IBS for precise event sampling:
|
||||
* core pmu config -> IBS config
|
||||
*
|
||||
* perf record -a -e cpu-cycles:p ... # use ibs op counting cycle count
|
||||
* perf record -a -e r076:p ... # same as -e cpu-cycles:p
|
||||
@@ -199,25 +199,9 @@ static struct perf_ibs *get_ibs_pmu(int type)
|
||||
* IbsOpCntCtl (bit 19) of IBS Execution Control Register (IbsOpCtl,
|
||||
* MSRC001_1033) is used to select either cycle or micro-ops counting
|
||||
* mode.
|
||||
*
|
||||
* The rip of IBS samples has skid 0. Thus, IBS supports precise
|
||||
* levels 1 and 2 and the PERF_EFLAGS_EXACT is set. In rare cases the
|
||||
* rip is invalid when IBS was not able to record the rip correctly.
|
||||
* We clear PERF_EFLAGS_EXACT and take the rip from pt_regs then.
|
||||
*
|
||||
*/
|
||||
static int perf_ibs_precise_event(struct perf_event *event, u64 *config)
|
||||
static int core_pmu_ibs_config(struct perf_event *event, u64 *config)
|
||||
{
|
||||
switch (event->attr.precise_ip) {
|
||||
case 0:
|
||||
return -ENOENT;
|
||||
case 1:
|
||||
case 2:
|
||||
break;
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
switch (event->attr.type) {
|
||||
case PERF_TYPE_HARDWARE:
|
||||
switch (event->attr.config) {
|
||||
@@ -243,22 +227,37 @@ static int perf_ibs_precise_event(struct perf_event *event, u64 *config)
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
/*
|
||||
* The rip of IBS samples has skid 0. Thus, IBS supports precise
|
||||
* levels 1 and 2 and the PERF_EFLAGS_EXACT is set. In rare cases the
|
||||
* rip is invalid when IBS was not able to record the rip correctly.
|
||||
* We clear PERF_EFLAGS_EXACT and take the rip from pt_regs then.
|
||||
*/
|
||||
int forward_event_to_ibs(struct perf_event *event)
|
||||
{
|
||||
u64 config = 0;
|
||||
|
||||
if (!event->attr.precise_ip || event->attr.precise_ip > 2)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (!core_pmu_ibs_config(event, &config)) {
|
||||
event->attr.type = perf_ibs_op.pmu.type;
|
||||
event->attr.config = config;
|
||||
}
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static int perf_ibs_init(struct perf_event *event)
|
||||
{
|
||||
struct hw_perf_event *hwc = &event->hw;
|
||||
struct perf_ibs *perf_ibs;
|
||||
u64 max_cnt, config;
|
||||
int ret;
|
||||
|
||||
perf_ibs = get_ibs_pmu(event->attr.type);
|
||||
if (perf_ibs) {
|
||||
config = event->attr.config;
|
||||
} else {
|
||||
perf_ibs = &perf_ibs_op;
|
||||
ret = perf_ibs_precise_event(event, &config);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
if (!perf_ibs)
|
||||
return -ENOENT;
|
||||
|
||||
config = event->attr.config;
|
||||
|
||||
if (event->pmu != &perf_ibs->pmu)
|
||||
return -ENOENT;
|
||||
|
||||
@@ -467,8 +467,10 @@ struct pebs_xmm {
|
||||
|
||||
#ifdef CONFIG_X86_LOCAL_APIC
|
||||
extern u32 get_ibs_caps(void);
|
||||
extern int forward_event_to_ibs(struct perf_event *event);
|
||||
#else
|
||||
static inline u32 get_ibs_caps(void) { return 0; }
|
||||
static inline int forward_event_to_ibs(struct perf_event *event) { return -ENOENT; }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PERF_EVENTS
|
||||
|
||||
@@ -237,8 +237,8 @@ static inline void native_pgd_clear(pgd_t *pgd)
|
||||
|
||||
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val((pte)) })
|
||||
#define __pmd_to_swp_entry(pmd) ((swp_entry_t) { pmd_val((pmd)) })
|
||||
#define __swp_entry_to_pte(x) ((pte_t) { .pte = (x).val })
|
||||
#define __swp_entry_to_pmd(x) ((pmd_t) { .pmd = (x).val })
|
||||
#define __swp_entry_to_pte(x) (__pte((x).val))
|
||||
#define __swp_entry_to_pmd(x) (__pmd((x).val))
|
||||
|
||||
extern int kern_addr_valid(unsigned long addr);
|
||||
extern void cleanup_highmap(void);
|
||||
|
||||
@@ -187,12 +187,12 @@ static inline int pvalidate(unsigned long vaddr, bool rmp_psize, bool validate)
|
||||
}
|
||||
void setup_ghcb(void);
|
||||
void __init early_snp_set_memory_private(unsigned long vaddr, unsigned long paddr,
|
||||
unsigned int npages);
|
||||
unsigned long npages);
|
||||
void __init early_snp_set_memory_shared(unsigned long vaddr, unsigned long paddr,
|
||||
unsigned int npages);
|
||||
unsigned long npages);
|
||||
void __init snp_prep_memory(unsigned long paddr, unsigned int sz, enum psc_op op);
|
||||
void snp_set_memory_shared(unsigned long vaddr, unsigned int npages);
|
||||
void snp_set_memory_private(unsigned long vaddr, unsigned int npages);
|
||||
void snp_set_memory_shared(unsigned long vaddr, unsigned long npages);
|
||||
void snp_set_memory_private(unsigned long vaddr, unsigned long npages);
|
||||
void snp_set_wakeup_secondary_cpu(void);
|
||||
bool snp_init(struct boot_params *bp);
|
||||
void __init __noreturn snp_abort(void);
|
||||
@@ -207,12 +207,12 @@ static inline int pvalidate(unsigned long vaddr, bool rmp_psize, bool validate)
|
||||
static inline int rmpadjust(unsigned long vaddr, bool rmp_psize, unsigned long attrs) { return 0; }
|
||||
static inline void setup_ghcb(void) { }
|
||||
static inline void __init
|
||||
early_snp_set_memory_private(unsigned long vaddr, unsigned long paddr, unsigned int npages) { }
|
||||
early_snp_set_memory_private(unsigned long vaddr, unsigned long paddr, unsigned long npages) { }
|
||||
static inline void __init
|
||||
early_snp_set_memory_shared(unsigned long vaddr, unsigned long paddr, unsigned int npages) { }
|
||||
early_snp_set_memory_shared(unsigned long vaddr, unsigned long paddr, unsigned long npages) { }
|
||||
static inline void __init snp_prep_memory(unsigned long paddr, unsigned int sz, enum psc_op op) { }
|
||||
static inline void snp_set_memory_shared(unsigned long vaddr, unsigned int npages) { }
|
||||
static inline void snp_set_memory_private(unsigned long vaddr, unsigned int npages) { }
|
||||
static inline void snp_set_memory_shared(unsigned long vaddr, unsigned long npages) { }
|
||||
static inline void snp_set_memory_private(unsigned long vaddr, unsigned long npages) { }
|
||||
static inline void snp_set_wakeup_secondary_cpu(void) { }
|
||||
static inline bool snp_init(struct boot_params *bp) { return false; }
|
||||
static inline void snp_abort(void) { }
|
||||
|
||||
@@ -150,7 +150,7 @@ struct x86_init_acpi {
|
||||
* @enc_cache_flush_required Returns true if a cache flush is needed before changing page encryption status
|
||||
*/
|
||||
struct x86_guest {
|
||||
void (*enc_status_change_prepare)(unsigned long vaddr, int npages, bool enc);
|
||||
bool (*enc_status_change_prepare)(unsigned long vaddr, int npages, bool enc);
|
||||
bool (*enc_status_change_finish)(unsigned long vaddr, int npages, bool enc);
|
||||
bool (*enc_tlb_flush_required)(bool enc);
|
||||
bool (*enc_cache_flush_required)(void);
|
||||
|
||||
@@ -731,11 +731,15 @@ unlock:
|
||||
static void show_rdt_tasks(struct rdtgroup *r, struct seq_file *s)
|
||||
{
|
||||
struct task_struct *p, *t;
|
||||
pid_t pid;
|
||||
|
||||
rcu_read_lock();
|
||||
for_each_process_thread(p, t) {
|
||||
if (is_closid_match(t, r) || is_rmid_match(t, r))
|
||||
seq_printf(s, "%d\n", t->pid);
|
||||
if (is_closid_match(t, r) || is_rmid_match(t, r)) {
|
||||
pid = task_pid_vnr(t);
|
||||
if (pid)
|
||||
seq_printf(s, "%d\n", pid);
|
||||
}
|
||||
}
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
@@ -643,7 +643,7 @@ static u64 __init get_jump_table_addr(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void pvalidate_pages(unsigned long vaddr, unsigned int npages, bool validate)
|
||||
static void pvalidate_pages(unsigned long vaddr, unsigned long npages, bool validate)
|
||||
{
|
||||
unsigned long vaddr_end;
|
||||
int rc;
|
||||
@@ -660,7 +660,7 @@ static void pvalidate_pages(unsigned long vaddr, unsigned int npages, bool valid
|
||||
}
|
||||
}
|
||||
|
||||
static void __init early_set_pages_state(unsigned long paddr, unsigned int npages, enum psc_op op)
|
||||
static void __init early_set_pages_state(unsigned long paddr, unsigned long npages, enum psc_op op)
|
||||
{
|
||||
unsigned long paddr_end;
|
||||
u64 val;
|
||||
@@ -699,7 +699,7 @@ e_term:
|
||||
}
|
||||
|
||||
void __init early_snp_set_memory_private(unsigned long vaddr, unsigned long paddr,
|
||||
unsigned int npages)
|
||||
unsigned long npages)
|
||||
{
|
||||
/*
|
||||
* This can be invoked in early boot while running identity mapped, so
|
||||
@@ -721,7 +721,7 @@ void __init early_snp_set_memory_private(unsigned long vaddr, unsigned long padd
|
||||
}
|
||||
|
||||
void __init early_snp_set_memory_shared(unsigned long vaddr, unsigned long paddr,
|
||||
unsigned int npages)
|
||||
unsigned long npages)
|
||||
{
|
||||
/*
|
||||
* This can be invoked in early boot while running identity mapped, so
|
||||
@@ -877,7 +877,7 @@ static void __set_pages_state(struct snp_psc_desc *data, unsigned long vaddr,
|
||||
sev_es_terminate(SEV_TERM_SET_LINUX, GHCB_TERM_PSC);
|
||||
}
|
||||
|
||||
static void set_pages_state(unsigned long vaddr, unsigned int npages, int op)
|
||||
static void set_pages_state(unsigned long vaddr, unsigned long npages, int op)
|
||||
{
|
||||
unsigned long vaddr_end, next_vaddr;
|
||||
struct snp_psc_desc *desc;
|
||||
@@ -902,7 +902,7 @@ static void set_pages_state(unsigned long vaddr, unsigned int npages, int op)
|
||||
kfree(desc);
|
||||
}
|
||||
|
||||
void snp_set_memory_shared(unsigned long vaddr, unsigned int npages)
|
||||
void snp_set_memory_shared(unsigned long vaddr, unsigned long npages)
|
||||
{
|
||||
if (!cc_platform_has(CC_ATTR_GUEST_SEV_SNP))
|
||||
return;
|
||||
@@ -912,7 +912,7 @@ void snp_set_memory_shared(unsigned long vaddr, unsigned int npages)
|
||||
set_pages_state(vaddr, npages, SNP_PAGE_STATE_SHARED);
|
||||
}
|
||||
|
||||
void snp_set_memory_private(unsigned long vaddr, unsigned int npages)
|
||||
void snp_set_memory_private(unsigned long vaddr, unsigned long npages)
|
||||
{
|
||||
if (!cc_platform_has(CC_ATTR_GUEST_SEV_SNP))
|
||||
return;
|
||||
|
||||
@@ -130,7 +130,7 @@ struct x86_cpuinit_ops x86_cpuinit = {
|
||||
|
||||
static void default_nmi_init(void) { };
|
||||
|
||||
static void enc_status_change_prepare_noop(unsigned long vaddr, int npages, bool enc) { }
|
||||
static bool enc_status_change_prepare_noop(unsigned long vaddr, int npages, bool enc) { return true; }
|
||||
static bool enc_status_change_finish_noop(unsigned long vaddr, int npages, bool enc) { return false; }
|
||||
static bool enc_tlb_flush_required_noop(bool enc) { return false; }
|
||||
static bool enc_cache_flush_required_noop(void) { return false; }
|
||||
|
||||
@@ -319,7 +319,7 @@ static void enc_dec_hypercall(unsigned long vaddr, int npages, bool enc)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void amd_enc_status_change_prepare(unsigned long vaddr, int npages, bool enc)
|
||||
static bool amd_enc_status_change_prepare(unsigned long vaddr, int npages, bool enc)
|
||||
{
|
||||
/*
|
||||
* To maintain the security guarantees of SEV-SNP guests, make sure
|
||||
@@ -327,6 +327,8 @@ static void amd_enc_status_change_prepare(unsigned long vaddr, int npages, bool
|
||||
*/
|
||||
if (cc_platform_has(CC_ATTR_GUEST_SEV_SNP) && !enc)
|
||||
snp_set_memory_shared(vaddr, npages);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Return true unconditionally: return value doesn't matter for the SEV side */
|
||||
|
||||
@@ -2096,7 +2096,8 @@ static int __set_memory_enc_pgtable(unsigned long addr, int numpages, bool enc)
|
||||
cpa_flush(&cpa, x86_platform.guest.enc_cache_flush_required());
|
||||
|
||||
/* Notify hypervisor that we are about to set/clr encryption attribute. */
|
||||
x86_platform.guest.enc_status_change_prepare(addr, numpages, enc);
|
||||
if (!x86_platform.guest.enc_status_change_prepare(addr, numpages, enc))
|
||||
return -EIO;
|
||||
|
||||
ret = __change_page_attr_set_clr(&cpa, 1);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user