Merge remote-tracking branch 'stable/linux-5.15.y' into rpi-5.15.y
This commit is contained in:
@@ -425,6 +425,7 @@ Description: Show status of f2fs superblock in real time.
|
||||
0x800 SBI_QUOTA_SKIP_FLUSH skip flushing quota in current CP
|
||||
0x1000 SBI_QUOTA_NEED_REPAIR quota file may be corrupted
|
||||
0x2000 SBI_IS_RESIZEFS resizefs is in process
|
||||
0x4000 SBI_IS_FREEZING freefs is in process
|
||||
====== ===================== =================================
|
||||
|
||||
What: /sys/fs/f2fs/<disk>/ckpt_thread_ioprio
|
||||
|
||||
@@ -3452,8 +3452,7 @@
|
||||
difficult since unequal pointers can no longer be
|
||||
compared. However, if this command-line option is
|
||||
specified, then all normal pointers will have their true
|
||||
value printed. Pointers printed via %pK may still be
|
||||
hashed. This option should only be specified when
|
||||
value printed. This option should only be specified when
|
||||
debugging the kernel. Please do not use on production
|
||||
kernels.
|
||||
|
||||
|
||||
@@ -795,6 +795,7 @@ bit 1 print system memory info
|
||||
bit 2 print timer info
|
||||
bit 3 print locks info if ``CONFIG_LOCKDEP`` is on
|
||||
bit 4 print ftrace buffer
|
||||
bit 5 print all printk messages in buffer
|
||||
===== ============================================
|
||||
|
||||
So for example to print tasks and memory info on panic, user can::
|
||||
|
||||
@@ -106,7 +106,6 @@ allOf:
|
||||
- mediatek,mt2701-smi-larb
|
||||
- mediatek,mt2712-smi-larb
|
||||
- mediatek,mt6779-smi-larb
|
||||
- mediatek,mt8167-smi-larb
|
||||
- mediatek,mt8192-smi-larb
|
||||
|
||||
then:
|
||||
|
||||
@@ -55,7 +55,7 @@ patternProperties:
|
||||
properties:
|
||||
reg:
|
||||
description:
|
||||
Contains the native Ready/Busy IDs.
|
||||
Contains the chip-select IDs.
|
||||
|
||||
nand-ecc-engine:
|
||||
allOf:
|
||||
@@ -184,7 +184,7 @@ examples:
|
||||
nand-use-soft-ecc-engine;
|
||||
nand-ecc-algo = "bch";
|
||||
|
||||
/* controller specific properties */
|
||||
/* NAND chip specific properties */
|
||||
};
|
||||
|
||||
nand@1 {
|
||||
|
||||
@@ -138,7 +138,7 @@ examples:
|
||||
clocks = <&sys_clk>;
|
||||
pinctrl-0 = <&sgpio2_pins>;
|
||||
pinctrl-names = "default";
|
||||
reg = <0x1101059c 0x100>;
|
||||
reg = <0x1101059c 0x118>;
|
||||
microchip,sgpio-port-ranges = <0 0>, <16 18>, <28 31>;
|
||||
bus-frequency = <25000000>;
|
||||
sgpio_in2: gpio@0 {
|
||||
|
||||
@@ -106,7 +106,7 @@ examples:
|
||||
dma-names = "rx", "tx";
|
||||
|
||||
flash@0 {
|
||||
compatible = "spi-nor";
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <104000000>;
|
||||
spi-tx-bus-width = <2>;
|
||||
|
||||
@@ -8,11 +8,13 @@ Required properties:
|
||||
- reg: should contain 2 entries, one for the registers and one for the direct
|
||||
mapping area
|
||||
- reg-names: should contain "regs" and "dirmap"
|
||||
- interrupts: interrupt line connected to the SPI controller
|
||||
- clock-names: should contain "ps_clk", "send_clk" and "send_dly_clk"
|
||||
- clocks: should contain 3 entries for the "ps_clk", "send_clk" and
|
||||
"send_dly_clk" clocks
|
||||
|
||||
Optional properties:
|
||||
- interrupts: interrupt line connected to the SPI controller
|
||||
|
||||
Example:
|
||||
|
||||
spi@43c30000 {
|
||||
|
||||
@@ -33,7 +33,7 @@ patternProperties:
|
||||
"^.*@[0-9a-f]{1,2}$":
|
||||
description: The hard wired USB devices
|
||||
type: object
|
||||
$ref: /usb/usb-device.yaml
|
||||
$ref: /schemas/usb/usb-device.yaml
|
||||
|
||||
additionalProperties: true
|
||||
|
||||
|
||||
@@ -168,7 +168,16 @@ Trees
|
||||
- The finalized and tagged releases of all stable kernels can be found
|
||||
in separate branches per version at:
|
||||
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
|
||||
|
||||
- The release candidate of all stable kernel versions can be found at:
|
||||
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/
|
||||
|
||||
.. warning::
|
||||
The -stable-rc tree is a snapshot in time of the stable-queue tree and
|
||||
will change frequently, hence will be rebased often. It should only be
|
||||
used for testing purposes (e.g. to be consumed by CI systems).
|
||||
|
||||
|
||||
Review committee
|
||||
|
||||
@@ -261,6 +261,10 @@ alc-sense-combo
|
||||
huawei-mbx-stereo
|
||||
Enable initialization verbs for Huawei MBX stereo speakers;
|
||||
might be risky, try this at your own risk
|
||||
alc298-samsung-headphone
|
||||
Samsung laptops with ALC298
|
||||
alc256-samsung-headphone
|
||||
Samsung laptops with ALC256
|
||||
|
||||
ALC66x/67x/892
|
||||
==============
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
# jinja2>=3.1 is not compatible with Sphinx<4.0
|
||||
jinja2<3.1
|
||||
sphinx_rtd_theme
|
||||
Sphinx==2.4.4
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 15
|
||||
SUBLEVEL = 32
|
||||
SUBLEVEL = 33
|
||||
EXTRAVERSION =
|
||||
NAME = Trick or Treat
|
||||
|
||||
|
||||
@@ -1141,6 +1141,7 @@ config HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
|
||||
config RANDOMIZE_KSTACK_OFFSET_DEFAULT
|
||||
bool "Randomize kernel stack offset on syscall entry"
|
||||
depends on HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
|
||||
depends on INIT_STACK_NONE || !CC_IS_CLANG || CLANG_VERSION >= 140000
|
||||
help
|
||||
The kernel stack offset can be randomized (after pt_regs) by
|
||||
roughly 5 bits of entropy, frustrating memory corruption
|
||||
|
||||
@@ -43,7 +43,7 @@ SYSCALL_DEFINE0(arc_gettls)
|
||||
return task_thread_info(current)->thr_ptr;
|
||||
}
|
||||
|
||||
SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new)
|
||||
SYSCALL_DEFINE3(arc_usr_cmpxchg, int __user *, uaddr, int, expected, int, new)
|
||||
{
|
||||
struct pt_regs *regs = current_pt_regs();
|
||||
u32 uval;
|
||||
|
||||
@@ -472,12 +472,26 @@
|
||||
#size-cells = <0>;
|
||||
enable-method = "brcm,bcm2836-smp"; // for ARM 32-bit
|
||||
|
||||
/* Source for d/i-cache-line-size and d/i-cache-sets
|
||||
* https://developer.arm.com/documentation/100095/0003
|
||||
* /Level-1-Memory-System/About-the-L1-memory-system?lang=en
|
||||
* Source for d/i-cache-size
|
||||
* https://www.raspberrypi.com/documentation/computers
|
||||
* /processors.html#bcm2711
|
||||
*/
|
||||
cpu0: cpu@0 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a72";
|
||||
reg = <0>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000d8>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
|
||||
i-cache-size = <0xc000>;
|
||||
i-cache-line-size = <64>;
|
||||
i-cache-sets = <256>; // 48KiB(size)/64(line-size)=768ways/3-way set
|
||||
next-level-cache = <&l2>;
|
||||
};
|
||||
|
||||
cpu1: cpu@1 {
|
||||
@@ -486,6 +500,13 @@
|
||||
reg = <1>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000e0>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
|
||||
i-cache-size = <0xc000>;
|
||||
i-cache-line-size = <64>;
|
||||
i-cache-sets = <256>; // 48KiB(size)/64(line-size)=768ways/3-way set
|
||||
next-level-cache = <&l2>;
|
||||
};
|
||||
|
||||
cpu2: cpu@2 {
|
||||
@@ -494,6 +515,13 @@
|
||||
reg = <2>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000e8>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
|
||||
i-cache-size = <0xc000>;
|
||||
i-cache-line-size = <64>;
|
||||
i-cache-sets = <256>; // 48KiB(size)/64(line-size)=768ways/3-way set
|
||||
next-level-cache = <&l2>;
|
||||
};
|
||||
|
||||
cpu3: cpu@3 {
|
||||
@@ -502,6 +530,28 @@
|
||||
reg = <3>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000f0>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
|
||||
i-cache-size = <0xc000>;
|
||||
i-cache-line-size = <64>;
|
||||
i-cache-sets = <256>; // 48KiB(size)/64(line-size)=768ways/3-way set
|
||||
next-level-cache = <&l2>;
|
||||
};
|
||||
|
||||
/* Source for d/i-cache-line-size and d/i-cache-sets
|
||||
* https://developer.arm.com/documentation/100095/0003
|
||||
* /Level-2-Memory-System/About-the-L2-memory-system?lang=en
|
||||
* Source for d/i-cache-size
|
||||
* https://www.raspberrypi.com/documentation/computers
|
||||
* /processors.html#bcm2711
|
||||
*/
|
||||
l2: l2-cache0 {
|
||||
compatible = "cache";
|
||||
cache-size = <0x100000>;
|
||||
cache-line-size = <64>;
|
||||
cache-sets = <1024>; // 1MiB(size)/64(line-size)=16384ways/16-way set
|
||||
cache-level = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -40,12 +40,26 @@
|
||||
#size-cells = <0>;
|
||||
enable-method = "brcm,bcm2836-smp"; // for ARM 32-bit
|
||||
|
||||
/* Source for d/i-cache-line-size and d/i-cache-sets
|
||||
* https://developer.arm.com/documentation/ddi0500/e/level-1-memory-system
|
||||
* /about-the-l1-memory-system?lang=en
|
||||
*
|
||||
* Source for d/i-cache-size
|
||||
* https://magpi.raspberrypi.com/articles/raspberry-pi-3-specs-benchmarks
|
||||
*/
|
||||
cpu0: cpu@0 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53";
|
||||
reg = <0>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000d8>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set
|
||||
i-cache-size = <0x8000>;
|
||||
i-cache-line-size = <64>;
|
||||
i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
|
||||
next-level-cache = <&l2>;
|
||||
};
|
||||
|
||||
cpu1: cpu@1 {
|
||||
@@ -54,6 +68,13 @@
|
||||
reg = <1>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000e0>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set
|
||||
i-cache-size = <0x8000>;
|
||||
i-cache-line-size = <64>;
|
||||
i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
|
||||
next-level-cache = <&l2>;
|
||||
};
|
||||
|
||||
cpu2: cpu@2 {
|
||||
@@ -62,6 +83,13 @@
|
||||
reg = <2>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000e8>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set
|
||||
i-cache-size = <0x8000>;
|
||||
i-cache-line-size = <64>;
|
||||
i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
|
||||
next-level-cache = <&l2>;
|
||||
};
|
||||
|
||||
cpu3: cpu@3 {
|
||||
@@ -70,6 +98,27 @@
|
||||
reg = <3>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000f0>;
|
||||
d-cache-size = <0x8000>;
|
||||
d-cache-line-size = <64>;
|
||||
d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set
|
||||
i-cache-size = <0x8000>;
|
||||
i-cache-line-size = <64>;
|
||||
i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
|
||||
next-level-cache = <&l2>;
|
||||
};
|
||||
|
||||
/* Source for cache-line-size + cache-sets
|
||||
* https://developer.arm.com/documentation/ddi0500
|
||||
* /e/level-2-memory-system/about-the-l2-memory-system?lang=en
|
||||
* Source for cache-size
|
||||
* https://datasheets.raspberrypi.com/cm/cm1-and-cm3-datasheet.pdf
|
||||
*/
|
||||
l2: l2-cache0 {
|
||||
compatible = "cache";
|
||||
cache-size = <0x80000>;
|
||||
cache-line-size = <64>;
|
||||
cache-sets = <512>; // 512KiB(size)/64(line-size)=8192ways/16-way set
|
||||
cache-level = <2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -3482,8 +3482,7 @@
|
||||
ti,timer-pwm;
|
||||
};
|
||||
};
|
||||
|
||||
target-module@2c000 { /* 0x4882c000, ap 17 02.0 */
|
||||
timer15_target: target-module@2c000 { /* 0x4882c000, ap 17 02.0 */
|
||||
compatible = "ti,sysc-omap4-timer", "ti,sysc";
|
||||
reg = <0x2c000 0x4>,
|
||||
<0x2c010 0x4>;
|
||||
@@ -3511,7 +3510,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
target-module@2e000 { /* 0x4882e000, ap 19 14.0 */
|
||||
timer16_target: target-module@2e000 { /* 0x4882e000, ap 19 14.0 */
|
||||
compatible = "ti,sysc-omap4-timer", "ti,sysc";
|
||||
reg = <0x2e000 0x4>,
|
||||
<0x2e010 0x4>;
|
||||
|
||||
@@ -1320,20 +1320,20 @@
|
||||
};
|
||||
|
||||
/* Local timers, see ARM architected timer wrap erratum i940 */
|
||||
&timer3_target {
|
||||
&timer15_target {
|
||||
ti,no-reset-on-init;
|
||||
ti,no-idle;
|
||||
timer@0 {
|
||||
assigned-clocks = <&l4per_clkctrl DRA7_L4PER_TIMER3_CLKCTRL 24>;
|
||||
assigned-clocks = <&l4per3_clkctrl DRA7_L4PER3_TIMER15_CLKCTRL 24>;
|
||||
assigned-clock-parents = <&timer_sys_clk_div>;
|
||||
};
|
||||
};
|
||||
|
||||
&timer4_target {
|
||||
&timer16_target {
|
||||
ti,no-reset-on-init;
|
||||
ti,no-idle;
|
||||
timer@0 {
|
||||
assigned-clocks = <&l4per_clkctrl DRA7_L4PER_TIMER4_CLKCTRL 24>;
|
||||
assigned-clocks = <&l4per3_clkctrl DRA7_L4PER3_TIMER16_CLKCTRL 24>;
|
||||
assigned-clock-parents = <&timer_sys_clk_div>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
};
|
||||
|
||||
uart3_data: uart3-data {
|
||||
samsung,pins = "gpa1-4", "gpa1-4";
|
||||
samsung,pins = "gpa1-4", "gpa1-5";
|
||||
samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
|
||||
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
|
||||
|
||||
@@ -118,6 +118,9 @@
|
||||
status = "okay";
|
||||
ddc = <&i2c_2>;
|
||||
hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
|
||||
vdd-supply = <&ldo8_reg>;
|
||||
vdd_osc-supply = <&ldo10_reg>;
|
||||
vdd_pll-supply = <&ldo8_reg>;
|
||||
};
|
||||
|
||||
&i2c_0 {
|
||||
|
||||
@@ -124,6 +124,9 @@
|
||||
hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hdmi_hpd_irq>;
|
||||
vdd-supply = <&ldo6_reg>;
|
||||
vdd_osc-supply = <&ldo7_reg>;
|
||||
vdd_pll-supply = <&ldo6_reg>;
|
||||
};
|
||||
|
||||
&hsi2c_4 {
|
||||
|
||||
@@ -53,6 +53,31 @@
|
||||
};
|
||||
};
|
||||
|
||||
lvds-decoder {
|
||||
compatible = "ti,ds90cf364a", "lvds-decoder";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
|
||||
lvds_decoder_in: endpoint {
|
||||
remote-endpoint = <&lvds0_out>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
|
||||
lvds_decoder_out: endpoint {
|
||||
remote-endpoint = <&panel_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
panel {
|
||||
compatible = "edt,etm0700g0dh6";
|
||||
pinctrl-0 = <&pinctrl_display_gpio>;
|
||||
@@ -61,7 +86,7 @@
|
||||
|
||||
port {
|
||||
panel_in: endpoint {
|
||||
remote-endpoint = <&lvds0_out>;
|
||||
remote-endpoint = <&lvds_decoder_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -450,7 +475,7 @@
|
||||
reg = <2>;
|
||||
|
||||
lvds0_out: endpoint {
|
||||
remote-endpoint = <&panel_in>;
|
||||
remote-endpoint = <&lvds_decoder_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
dailink_master: simple-audio-card,codec {
|
||||
sound-dai = <&codec>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -293,7 +293,7 @@
|
||||
compatible = "fsl,sgtl5000";
|
||||
#sound-dai-cells = <0>;
|
||||
reg = <0x0a>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_sai1_mclk>;
|
||||
VDDA-supply = <®_module_3v3_avdd>;
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
tlv320aic32x4: audio-codec@18 {
|
||||
compatible = "ti,tlv320aic32x4";
|
||||
reg = <0x18>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
clock-names = "mclk";
|
||||
ldoin-supply = <®_audio_3v3>;
|
||||
iov-supply = <®_audio_3v3>;
|
||||
|
||||
@@ -288,7 +288,7 @@
|
||||
codec: wm8960@1a {
|
||||
compatible = "wlf,wm8960";
|
||||
reg = <0x1a>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
clock-names = "mclk";
|
||||
wlf,shared-lrclk;
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
dailink_master: simple-audio-card,codec {
|
||||
sound-dai = <&sgtl5000>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -41,7 +41,7 @@
|
||||
#sound-dai-cells = <0>;
|
||||
reg = <0x0a>;
|
||||
compatible = "fsl,sgtl5000";
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
VDDA-supply = <®_2p5v>;
|
||||
VDDIO-supply = <®_vref_1v8>;
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
dailink_master: simple-audio-card,codec {
|
||||
sound-dai = <&sgtl5000>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -41,7 +41,7 @@
|
||||
#sound-dai-cells = <0>;
|
||||
reg = <0x0a>;
|
||||
compatible = "fsl,sgtl5000";
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
VDDA-supply = <®_2p5v>;
|
||||
VDDIO-supply = <®_vref_1v8>;
|
||||
};
|
||||
|
||||
@@ -385,14 +385,14 @@
|
||||
codec: wm8960@1a {
|
||||
compatible = "wlf,wm8960";
|
||||
reg = <0x1a>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
clock-names = "mclk";
|
||||
wlf,shared-lrclk;
|
||||
wlf,hp-cfg = <2 2 3>;
|
||||
wlf,gpio-cfg = <1 3>;
|
||||
assigned-clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_SRC>,
|
||||
<&clks IMX7D_PLL_AUDIO_POST_DIV>,
|
||||
<&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
<&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
assigned-clock-parents = <&clks IMX7D_PLL_AUDIO_POST_DIV>;
|
||||
assigned-clock-rates = <0>, <884736000>, <12288000>;
|
||||
};
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
dailink_master: simple-audio-card,codec {
|
||||
sound-dai = <&codec>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -232,7 +232,7 @@
|
||||
#sound-dai-cells = <0>;
|
||||
reg = <0x0a>;
|
||||
compatible = "fsl,sgtl5000";
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
|
||||
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_sai1_mclk>;
|
||||
VDDA-supply = <&vgen4_reg>;
|
||||
|
||||
@@ -28,7 +28,7 @@ partitions {
|
||||
label = "rofs";
|
||||
};
|
||||
|
||||
rwfs@6000000 {
|
||||
rwfs@2a00000 {
|
||||
reg = <0x2a00000 0x1600000>; // 22MB
|
||||
label = "rwfs";
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ partitions {
|
||||
label = "kernel";
|
||||
};
|
||||
|
||||
rofs@c0000 {
|
||||
rofs@4c0000 {
|
||||
reg = <0x4c0000 0x1740000>;
|
||||
label = "rofs";
|
||||
};
|
||||
|
||||
@@ -142,7 +142,8 @@
|
||||
clocks {
|
||||
sleep_clk: sleep_clk {
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <32768>;
|
||||
clock-frequency = <32000>;
|
||||
clock-output-names = "gcc_sleep_clk_src";
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
|
||||
|
||||
@@ -146,7 +146,9 @@
|
||||
reg = <0x108000 0x1000>;
|
||||
qcom,ipc = <&l2cc 0x8 2>;
|
||||
|
||||
interrupts = <0 19 0>, <0 21 0>, <0 22 0>;
|
||||
interrupts = <GIC_SPI 19 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 21 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 22 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupt-names = "ack", "err", "wakeup";
|
||||
|
||||
regulators {
|
||||
@@ -192,7 +194,7 @@
|
||||
compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
|
||||
reg = <0x16440000 0x1000>,
|
||||
<0x16400000 0x1000>;
|
||||
interrupts = <0 154 0x0>;
|
||||
interrupts = <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&gcc GSBI5_UART_CLK>, <&gcc GSBI5_H_CLK>;
|
||||
clock-names = "core", "iface";
|
||||
status = "disabled";
|
||||
@@ -318,7 +320,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x16080000 0x1000>;
|
||||
interrupts = <0 147 0>;
|
||||
interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
|
||||
spi-max-frequency = <24000000>;
|
||||
cs-gpios = <&msmgpio 8 0>;
|
||||
|
||||
|
||||
@@ -413,7 +413,7 @@
|
||||
pmecc: ecc-engine@f8014070 {
|
||||
compatible = "atmel,sama5d2-pmecc";
|
||||
reg = <0xf8014070 0x490>,
|
||||
<0xf8014500 0x100>;
|
||||
<0xf8014500 0x200>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -319,8 +319,6 @@
|
||||
dmas = <&dma0 AT91_XDMAC_DT_PERID(7)>,
|
||||
<&dma0 AT91_XDMAC_DT_PERID(8)>;
|
||||
dma-names = "rx", "tx";
|
||||
atmel,use-dma-rx;
|
||||
atmel,use-dma-tx;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
@@ -485,8 +483,6 @@
|
||||
dmas = <&dma0 AT91_XDMAC_DT_PERID(21)>,
|
||||
<&dma0 AT91_XDMAC_DT_PERID(22)>;
|
||||
dma-names = "rx", "tx";
|
||||
atmel,use-dma-rx;
|
||||
atmel,use-dma-tx;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
@@ -511,8 +507,6 @@
|
||||
dmas = <&dma0 AT91_XDMAC_DT_PERID(23)>,
|
||||
<&dma0 AT91_XDMAC_DT_PERID(24)>;
|
||||
dma-names = "rx", "tx";
|
||||
atmel,use-dma-rx;
|
||||
atmel,use-dma-tx;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -136,9 +136,9 @@
|
||||
reg = <0xb4100000 0x1000>;
|
||||
interrupts = <0 105 0x4>;
|
||||
status = "disabled";
|
||||
dmas = <&dwdma0 12 0 1>,
|
||||
<&dwdma0 13 1 0>;
|
||||
dma-names = "tx", "rx";
|
||||
dmas = <&dwdma0 13 0 1>,
|
||||
<&dwdma0 12 1 0>;
|
||||
dma-names = "rx", "tx";
|
||||
};
|
||||
|
||||
thermal@e07008c4 {
|
||||
|
||||
@@ -284,9 +284,9 @@
|
||||
#size-cells = <0>;
|
||||
interrupts = <0 31 0x4>;
|
||||
status = "disabled";
|
||||
dmas = <&dwdma0 4 0 0>,
|
||||
<&dwdma0 5 0 0>;
|
||||
dma-names = "tx", "rx";
|
||||
dmas = <&dwdma0 5 0 0>,
|
||||
<&dwdma0 4 0 0>;
|
||||
dma-names = "rx", "tx";
|
||||
};
|
||||
|
||||
rtc@e0580000 {
|
||||
|
||||
@@ -593,6 +593,17 @@
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
gic: interrupt-controller@1c81000 {
|
||||
compatible = "arm,gic-400";
|
||||
reg = <0x01c81000 0x1000>,
|
||||
<0x01c82000 0x2000>,
|
||||
<0x01c84000 0x2000>,
|
||||
<0x01c86000 0x2000>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <3>;
|
||||
interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
|
||||
};
|
||||
|
||||
csi1: camera@1cb4000 {
|
||||
compatible = "allwinner,sun8i-v3s-csi";
|
||||
reg = <0x01cb4000 0x3000>;
|
||||
@@ -604,16 +615,5 @@
|
||||
resets = <&ccu RST_BUS_CSI>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gic: interrupt-controller@1c81000 {
|
||||
compatible = "arm,gic-400";
|
||||
reg = <0x01c81000 0x1000>,
|
||||
<0x01c82000 0x2000>,
|
||||
<0x01c84000 0x2000>,
|
||||
<0x01c86000 0x2000>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <3>;
|
||||
interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -183,8 +183,8 @@
|
||||
};
|
||||
conf_ata {
|
||||
nvidia,pins = "ata", "atb", "atc", "atd", "ate",
|
||||
"cdev1", "cdev2", "dap1", "dtb", "gma",
|
||||
"gmb", "gmc", "gmd", "gme", "gpu7",
|
||||
"cdev1", "cdev2", "dap1", "dtb", "dtf",
|
||||
"gma", "gmb", "gmc", "gmd", "gme", "gpu7",
|
||||
"gpv", "i2cp", "irrx", "irtx", "pta",
|
||||
"rm", "slxa", "slxk", "spia", "spib",
|
||||
"uac";
|
||||
@@ -203,7 +203,7 @@
|
||||
};
|
||||
conf_crtp {
|
||||
nvidia,pins = "crtp", "dap2", "dap3", "dap4",
|
||||
"dtc", "dte", "dtf", "gpu", "sdio1",
|
||||
"dtc", "dte", "gpu", "sdio1",
|
||||
"slxc", "slxd", "spdi", "spdo", "spig",
|
||||
"uda";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
|
||||
|
||||
@@ -188,6 +188,7 @@ CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_MEDIA_SUPPORT=y
|
||||
CONFIG_MEDIA_CAMERA_SUPPORT=y
|
||||
CONFIG_MEDIA_PLATFORM_SUPPORT=y
|
||||
CONFIG_V4L_PLATFORM_DRIVERS=y
|
||||
CONFIG_VIDEO_ASPEED=m
|
||||
CONFIG_VIDEO_ATMEL_ISI=m
|
||||
@@ -195,6 +196,7 @@ CONFIG_DRM=y
|
||||
CONFIG_DRM_ATMEL_HLCDC=m
|
||||
CONFIG_DRM_PANEL_SIMPLE=y
|
||||
CONFIG_DRM_ASPEED_GFX=m
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_IMX=y
|
||||
CONFIG_FB_ATMEL=y
|
||||
CONFIG_BACKLIGHT_ATMEL_LCDC=y
|
||||
|
||||
@@ -102,6 +102,8 @@ config CRYPTO_AES_ARM_BS
|
||||
depends on KERNEL_MODE_NEON
|
||||
select CRYPTO_SKCIPHER
|
||||
select CRYPTO_LIB_AES
|
||||
select CRYPTO_AES
|
||||
select CRYPTO_CBC
|
||||
select CRYPTO_SIMD
|
||||
help
|
||||
Use a faster and more secure NEON based implementation of AES in CBC,
|
||||
|
||||
@@ -22,10 +22,7 @@
|
||||
* mcount can be thought of as a function called in the middle of a subroutine
|
||||
* call. As such, it needs to be transparent for both the caller and the
|
||||
* callee: the original lr needs to be restored when leaving mcount, and no
|
||||
* registers should be clobbered. (In the __gnu_mcount_nc implementation, we
|
||||
* clobber the ip register. This is OK because the ARM calling convention
|
||||
* allows it to be clobbered in subroutines and doesn't use it to hold
|
||||
* parameters.)
|
||||
* registers should be clobbered.
|
||||
*
|
||||
* When using dynamic ftrace, we patch out the mcount call by a "pop {lr}"
|
||||
* instead of the __gnu_mcount_nc call (see arch/arm/kernel/ftrace.c).
|
||||
@@ -70,26 +67,25 @@
|
||||
|
||||
.macro __ftrace_regs_caller
|
||||
|
||||
sub sp, sp, #8 @ space for PC and CPSR OLD_R0,
|
||||
str lr, [sp, #-8]! @ store LR as PC and make space for CPSR/OLD_R0,
|
||||
@ OLD_R0 will overwrite previous LR
|
||||
|
||||
add ip, sp, #12 @ move in IP the value of SP as it was
|
||||
@ before the push {lr} of the mcount mechanism
|
||||
|
||||
str lr, [sp, #0] @ store LR instead of PC
|
||||
|
||||
ldr lr, [sp, #8] @ get previous LR
|
||||
ldr lr, [sp, #8] @ get previous LR
|
||||
|
||||
str r0, [sp, #8] @ write r0 as OLD_R0 over previous LR
|
||||
|
||||
stmdb sp!, {ip, lr}
|
||||
stmdb sp!, {r0-r11, lr}
|
||||
str lr, [sp, #-4]! @ store previous LR as LR
|
||||
|
||||
add lr, sp, #16 @ move in LR the value of SP as it was
|
||||
@ before the push {lr} of the mcount mechanism
|
||||
|
||||
push {r0-r11, ip, lr}
|
||||
|
||||
@ stack content at this point:
|
||||
@ 0 4 48 52 56 60 64 68 72
|
||||
@ R0 | R1 | ... | LR | SP + 4 | previous LR | LR | PSR | OLD_R0 |
|
||||
@ R0 | R1 | ... | IP | SP + 4 | previous LR | LR | PSR | OLD_R0 |
|
||||
|
||||
mov r3, sp @ struct pt_regs*
|
||||
mov r3, sp @ struct pt_regs*
|
||||
|
||||
ldr r2, =function_trace_op
|
||||
ldr r2, [r2] @ pointer to the current
|
||||
@@ -112,11 +108,9 @@ ftrace_graph_regs_call:
|
||||
#endif
|
||||
|
||||
@ pop saved regs
|
||||
ldmia sp!, {r0-r12} @ restore r0 through r12
|
||||
ldr ip, [sp, #8] @ restore PC
|
||||
ldr lr, [sp, #4] @ restore LR
|
||||
ldr sp, [sp, #0] @ restore SP
|
||||
mov pc, ip @ return
|
||||
pop {r0-r11, ip, lr} @ restore r0 through r12
|
||||
ldr lr, [sp], #4 @ restore LR
|
||||
ldr pc, [sp], #12
|
||||
.endm
|
||||
|
||||
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
||||
@@ -132,11 +126,9 @@ ftrace_graph_regs_call:
|
||||
bl prepare_ftrace_return
|
||||
|
||||
@ pop registers saved in ftrace_regs_caller
|
||||
ldmia sp!, {r0-r12} @ restore r0 through r12
|
||||
ldr ip, [sp, #8] @ restore PC
|
||||
ldr lr, [sp, #4] @ restore LR
|
||||
ldr sp, [sp, #0] @ restore SP
|
||||
mov pc, ip @ return
|
||||
pop {r0-r11, ip, lr} @ restore r0 through r12
|
||||
ldr lr, [sp], #4 @ restore LR
|
||||
ldr pc, [sp], #12
|
||||
|
||||
.endm
|
||||
#endif
|
||||
@@ -202,16 +194,17 @@ ftrace_graph_call\suffix:
|
||||
.endm
|
||||
|
||||
.macro mcount_exit
|
||||
ldmia sp!, {r0-r3, ip, lr}
|
||||
ret ip
|
||||
ldmia sp!, {r0-r3}
|
||||
ldr lr, [sp, #4]
|
||||
ldr pc, [sp], #8
|
||||
.endm
|
||||
|
||||
ENTRY(__gnu_mcount_nc)
|
||||
UNWIND(.fnstart)
|
||||
#ifdef CONFIG_DYNAMIC_FTRACE
|
||||
mov ip, lr
|
||||
ldmia sp!, {lr}
|
||||
ret ip
|
||||
push {lr}
|
||||
ldr lr, [sp, #4]
|
||||
ldr pc, [sp], #8
|
||||
#else
|
||||
__mcount
|
||||
#endif
|
||||
|
||||
@@ -195,7 +195,7 @@ static int swp_handler(struct pt_regs *regs, unsigned int instr)
|
||||
destreg, EXTRACT_REG_NUM(instr, RT2_OFFSET), data);
|
||||
|
||||
/* Check access in reasonable access range for both SWP and SWPB */
|
||||
if (!access_ok((address & ~3), 4)) {
|
||||
if (!access_ok((void __user *)(address & ~3), 4)) {
|
||||
pr_debug("SWP{B} emulation: access to %p not allowed!\n",
|
||||
(void *)address);
|
||||
res = -EFAULT;
|
||||
|
||||
@@ -575,7 +575,7 @@ do_cache_op(unsigned long start, unsigned long end, int flags)
|
||||
if (end < start || flags)
|
||||
return -EINVAL;
|
||||
|
||||
if (!access_ok(start, end - start))
|
||||
if (!access_ok((void __user *)start, end - start))
|
||||
return -EFAULT;
|
||||
|
||||
return __do_cache_op(start, end);
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
mrc p6, 0, \irqstat, c8, c0, 0 @ Read IINTSRC
|
||||
cmp \irqstat, #0
|
||||
clzne \irqnr, \irqstat
|
||||
rsbne \irqnr, \irqnr, #31
|
||||
rsbne \irqnr, \irqnr, #32
|
||||
.endm
|
||||
|
||||
.macro arch_ret_to_user, tmp1, tmp2
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
#ifndef __IRQS_H
|
||||
#define __IRQS_H
|
||||
|
||||
#define NR_IRQS 32
|
||||
#define NR_IRQS 33
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,14 +32,14 @@ static void intstr_write(u32 val)
|
||||
static void
|
||||
iop32x_irq_mask(struct irq_data *d)
|
||||
{
|
||||
iop32x_mask &= ~(1 << d->irq);
|
||||
iop32x_mask &= ~(1 << (d->irq - 1));
|
||||
intctl_write(iop32x_mask);
|
||||
}
|
||||
|
||||
static void
|
||||
iop32x_irq_unmask(struct irq_data *d)
|
||||
{
|
||||
iop32x_mask |= 1 << d->irq;
|
||||
iop32x_mask |= 1 << (d->irq - 1);
|
||||
intctl_write(iop32x_mask);
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ void __init iop32x_init_irq(void)
|
||||
machine_is_em7210())
|
||||
*IOP3XX_PCIIRSR = 0x0f;
|
||||
|
||||
for (i = 0; i < NR_IRQS; i++) {
|
||||
for (i = 1; i < NR_IRQS; i++) {
|
||||
irq_set_chip_and_handler(i, &ext_chip, handle_level_irq);
|
||||
irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
|
||||
}
|
||||
|
||||
@@ -7,36 +7,40 @@
|
||||
#ifndef __IOP32X_IRQS_H
|
||||
#define __IOP32X_IRQS_H
|
||||
|
||||
/* Interrupts in Linux start at 1, hardware starts at 0 */
|
||||
|
||||
#define IOP_IRQ(x) ((x) + 1)
|
||||
|
||||
/*
|
||||
* IOP80321 chipset interrupts
|
||||
*/
|
||||
#define IRQ_IOP32X_DMA0_EOT 0
|
||||
#define IRQ_IOP32X_DMA0_EOC 1
|
||||
#define IRQ_IOP32X_DMA1_EOT 2
|
||||
#define IRQ_IOP32X_DMA1_EOC 3
|
||||
#define IRQ_IOP32X_AA_EOT 6
|
||||
#define IRQ_IOP32X_AA_EOC 7
|
||||
#define IRQ_IOP32X_CORE_PMON 8
|
||||
#define IRQ_IOP32X_TIMER0 9
|
||||
#define IRQ_IOP32X_TIMER1 10
|
||||
#define IRQ_IOP32X_I2C_0 11
|
||||
#define IRQ_IOP32X_I2C_1 12
|
||||
#define IRQ_IOP32X_MESSAGING 13
|
||||
#define IRQ_IOP32X_ATU_BIST 14
|
||||
#define IRQ_IOP32X_PERFMON 15
|
||||
#define IRQ_IOP32X_CORE_PMU 16
|
||||
#define IRQ_IOP32X_BIU_ERR 17
|
||||
#define IRQ_IOP32X_ATU_ERR 18
|
||||
#define IRQ_IOP32X_MCU_ERR 19
|
||||
#define IRQ_IOP32X_DMA0_ERR 20
|
||||
#define IRQ_IOP32X_DMA1_ERR 21
|
||||
#define IRQ_IOP32X_AA_ERR 23
|
||||
#define IRQ_IOP32X_MSG_ERR 24
|
||||
#define IRQ_IOP32X_SSP 25
|
||||
#define IRQ_IOP32X_XINT0 27
|
||||
#define IRQ_IOP32X_XINT1 28
|
||||
#define IRQ_IOP32X_XINT2 29
|
||||
#define IRQ_IOP32X_XINT3 30
|
||||
#define IRQ_IOP32X_HPI 31
|
||||
#define IRQ_IOP32X_DMA0_EOT IOP_IRQ(0)
|
||||
#define IRQ_IOP32X_DMA0_EOC IOP_IRQ(1)
|
||||
#define IRQ_IOP32X_DMA1_EOT IOP_IRQ(2)
|
||||
#define IRQ_IOP32X_DMA1_EOC IOP_IRQ(3)
|
||||
#define IRQ_IOP32X_AA_EOT IOP_IRQ(6)
|
||||
#define IRQ_IOP32X_AA_EOC IOP_IRQ(7)
|
||||
#define IRQ_IOP32X_CORE_PMON IOP_IRQ(8)
|
||||
#define IRQ_IOP32X_TIMER0 IOP_IRQ(9)
|
||||
#define IRQ_IOP32X_TIMER1 IOP_IRQ(10)
|
||||
#define IRQ_IOP32X_I2C_0 IOP_IRQ(11)
|
||||
#define IRQ_IOP32X_I2C_1 IOP_IRQ(12)
|
||||
#define IRQ_IOP32X_MESSAGING IOP_IRQ(13)
|
||||
#define IRQ_IOP32X_ATU_BIST IOP_IRQ(14)
|
||||
#define IRQ_IOP32X_PERFMON IOP_IRQ(15)
|
||||
#define IRQ_IOP32X_CORE_PMU IOP_IRQ(16)
|
||||
#define IRQ_IOP32X_BIU_ERR IOP_IRQ(17)
|
||||
#define IRQ_IOP32X_ATU_ERR IOP_IRQ(18)
|
||||
#define IRQ_IOP32X_MCU_ERR IOP_IRQ(19)
|
||||
#define IRQ_IOP32X_DMA0_ERR IOP_IRQ(20)
|
||||
#define IRQ_IOP32X_DMA1_ERR IOP_IRQ(21)
|
||||
#define IRQ_IOP32X_AA_ERR IOP_IRQ(23)
|
||||
#define IRQ_IOP32X_MSG_ERR IOP_IRQ(24)
|
||||
#define IRQ_IOP32X_SSP IOP_IRQ(25)
|
||||
#define IRQ_IOP32X_XINT0 IOP_IRQ(27)
|
||||
#define IRQ_IOP32X_XINT1 IOP_IRQ(28)
|
||||
#define IRQ_IOP32X_XINT2 IOP_IRQ(29)
|
||||
#define IRQ_IOP32X_XINT3 IOP_IRQ(30)
|
||||
#define IRQ_IOP32X_HPI IOP_IRQ(31)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -72,6 +72,8 @@ static int sram_probe(struct platform_device *pdev)
|
||||
if (!info)
|
||||
return -ENOMEM;
|
||||
|
||||
platform_set_drvdata(pdev, info);
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (res == NULL) {
|
||||
dev_err(&pdev->dev, "no memory resource defined\n");
|
||||
@@ -107,8 +109,6 @@ static int sram_probe(struct platform_device *pdev)
|
||||
list_add(&info->node, &sram_bank_list);
|
||||
mutex_unlock(&sram_lock);
|
||||
|
||||
platform_set_drvdata(pdev, info);
|
||||
|
||||
dev_info(&pdev->dev, "initialized\n");
|
||||
return 0;
|
||||
|
||||
@@ -127,17 +127,19 @@ static int sram_remove(struct platform_device *pdev)
|
||||
struct sram_bank_info *info;
|
||||
|
||||
info = platform_get_drvdata(pdev);
|
||||
if (info == NULL)
|
||||
return -ENODEV;
|
||||
|
||||
mutex_lock(&sram_lock);
|
||||
list_del(&info->node);
|
||||
mutex_unlock(&sram_lock);
|
||||
if (info->sram_size) {
|
||||
mutex_lock(&sram_lock);
|
||||
list_del(&info->node);
|
||||
mutex_unlock(&sram_lock);
|
||||
|
||||
gen_pool_destroy(info->gpool);
|
||||
iounmap(info->sram_virt);
|
||||
kfree(info->pool_name);
|
||||
}
|
||||
|
||||
gen_pool_destroy(info->gpool);
|
||||
iounmap(info->sram_virt);
|
||||
kfree(info->pool_name);
|
||||
kfree(info);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ menuconfig ARCH_MSTARV7
|
||||
depends on ARCH_MULTI_V7
|
||||
select ARM_GIC
|
||||
select ARM_HEAVY_MB
|
||||
select HAVE_ARM_ARCH_TIMER
|
||||
select MST_IRQ
|
||||
select MSTAR_MSC313_MPLL
|
||||
help
|
||||
|
||||
@@ -236,11 +236,11 @@ static int __init jive_mtdset(char *options)
|
||||
unsigned long set;
|
||||
|
||||
if (options == NULL || options[0] == '\0')
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
if (kstrtoul(options, 10, &set)) {
|
||||
printk(KERN_ERR "failed to parse mtdset=%s\n", options);
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (set) {
|
||||
@@ -255,7 +255,7 @@ static int __init jive_mtdset(char *options)
|
||||
"using default.", set);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* parse the mtdset= option given to the kernel command line */
|
||||
|
||||
@@ -273,9 +273,9 @@
|
||||
#size-cells = <1>;
|
||||
ranges = <0x00 0x00 0xff800000 0x3000>;
|
||||
|
||||
timer: timer@400 {
|
||||
compatible = "brcm,bcm6328-timer", "syscon";
|
||||
reg = <0x400 0x3c>;
|
||||
twd: timer-mfd@400 {
|
||||
compatible = "brcm,bcm4908-twd", "simple-mfd", "syscon";
|
||||
reg = <0x400 0x4c>;
|
||||
};
|
||||
|
||||
gpio0: gpio-controller@500 {
|
||||
@@ -330,7 +330,7 @@
|
||||
|
||||
reboot {
|
||||
compatible = "syscon-reboot";
|
||||
regmap = <&timer>;
|
||||
regmap = <&twd>;
|
||||
offset = <0x34>;
|
||||
mask = <1>;
|
||||
};
|
||||
|
||||
@@ -111,8 +111,8 @@
|
||||
compatible = "silabs,si3226x";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <5000000>;
|
||||
spi-cpha = <1>;
|
||||
spi-cpol = <1>;
|
||||
spi-cpha;
|
||||
spi-cpol;
|
||||
pl022,hierarchy = <0>;
|
||||
pl022,interface = <0>;
|
||||
pl022,slave-tx-disable = <0>;
|
||||
@@ -135,8 +135,8 @@
|
||||
at25,byte-len = <0x8000>;
|
||||
at25,addr-mode = <2>;
|
||||
at25,page-size = <64>;
|
||||
spi-cpha = <1>;
|
||||
spi-cpol = <1>;
|
||||
spi-cpha;
|
||||
spi-cpol;
|
||||
pl022,hierarchy = <0>;
|
||||
pl022,interface = <0>;
|
||||
pl022,slave-tx-disable = <0>;
|
||||
|
||||
@@ -687,7 +687,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
sata: ahci@663f2000 {
|
||||
sata: sata@663f2000 {
|
||||
compatible = "brcm,iproc-ahci", "generic-ahci";
|
||||
reg = <0x663f2000 0x1000>;
|
||||
dma-coherent;
|
||||
|
||||
@@ -536,9 +536,9 @@
|
||||
clock-names = "i2c";
|
||||
clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
|
||||
QORIQ_CLK_PLL_DIV(1)>;
|
||||
dmas = <&edma0 1 39>,
|
||||
<&edma0 1 38>;
|
||||
dma-names = "tx", "rx";
|
||||
dmas = <&edma0 1 38>,
|
||||
<&edma0 1 39>;
|
||||
dma-names = "rx", "tx";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
||||
@@ -499,9 +499,9 @@
|
||||
interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
|
||||
QORIQ_CLK_PLL_DIV(2)>;
|
||||
dmas = <&edma0 1 39>,
|
||||
<&edma0 1 38>;
|
||||
dma-names = "tx", "rx";
|
||||
dmas = <&edma0 1 38>,
|
||||
<&edma0 1 39>;
|
||||
dma-names = "rx", "tx";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
||||
@@ -3608,10 +3608,10 @@
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <9600000>;
|
||||
clock-output-names = "mclk";
|
||||
qcom,micbias1-millivolt = <1800>;
|
||||
qcom,micbias2-millivolt = <1800>;
|
||||
qcom,micbias3-millivolt = <1800>;
|
||||
qcom,micbias4-millivolt = <1800>;
|
||||
qcom,micbias1-microvolt = <1800000>;
|
||||
qcom,micbias2-microvolt = <1800000>;
|
||||
qcom,micbias3-microvolt = <1800000>;
|
||||
qcom,micbias4-microvolt = <1800000>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
@@ -3434,9 +3434,9 @@
|
||||
qcom,tcs-offset = <0xd00>;
|
||||
qcom,drv-id = <2>;
|
||||
qcom,tcs-config = <ACTIVE_TCS 2>,
|
||||
<SLEEP_TCS 1>,
|
||||
<WAKE_TCS 1>,
|
||||
<CONTROL_TCS 0>;
|
||||
<SLEEP_TCS 3>,
|
||||
<WAKE_TCS 3>,
|
||||
<CONTROL_TCS 1>;
|
||||
|
||||
rpmhcc: clock-controller {
|
||||
compatible = "qcom,sm8150-rpmh-clk";
|
||||
|
||||
@@ -1434,8 +1434,8 @@
|
||||
phys = <&pcie0_lane>;
|
||||
phy-names = "pciephy";
|
||||
|
||||
perst-gpio = <&tlmm 79 GPIO_ACTIVE_LOW>;
|
||||
enable-gpio = <&tlmm 81 GPIO_ACTIVE_HIGH>;
|
||||
perst-gpios = <&tlmm 79 GPIO_ACTIVE_LOW>;
|
||||
wake-gpios = <&tlmm 81 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pcie0_default_state>;
|
||||
@@ -1495,7 +1495,7 @@
|
||||
ranges = <0x01000000 0x0 0x40200000 0x0 0x40200000 0x0 0x100000>,
|
||||
<0x02000000 0x0 0x40300000 0x0 0x40300000 0x0 0x1fd00000>;
|
||||
|
||||
interrupts = <GIC_SPI 306 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupts = <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0x7>;
|
||||
@@ -1538,8 +1538,8 @@
|
||||
phys = <&pcie1_lane>;
|
||||
phy-names = "pciephy";
|
||||
|
||||
perst-gpio = <&tlmm 82 GPIO_ACTIVE_LOW>;
|
||||
enable-gpio = <&tlmm 84 GPIO_ACTIVE_HIGH>;
|
||||
perst-gpios = <&tlmm 82 GPIO_ACTIVE_LOW>;
|
||||
wake-gpios = <&tlmm 84 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pcie1_default_state>;
|
||||
@@ -1601,7 +1601,7 @@
|
||||
ranges = <0x01000000 0x0 0x64200000 0x0 0x64200000 0x0 0x100000>,
|
||||
<0x02000000 0x0 0x64300000 0x0 0x64300000 0x0 0x3d00000>;
|
||||
|
||||
interrupts = <GIC_SPI 236 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupts = <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0x7>;
|
||||
@@ -1644,8 +1644,8 @@
|
||||
phys = <&pcie2_lane>;
|
||||
phy-names = "pciephy";
|
||||
|
||||
perst-gpio = <&tlmm 85 GPIO_ACTIVE_LOW>;
|
||||
enable-gpio = <&tlmm 87 GPIO_ACTIVE_HIGH>;
|
||||
perst-gpios = <&tlmm 85 GPIO_ACTIVE_LOW>;
|
||||
wake-gpios = <&tlmm 87 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pcie2_default_state>;
|
||||
|
||||
@@ -979,7 +979,7 @@
|
||||
qcom,tcs-offset = <0xd00>;
|
||||
qcom,drv-id = <2>;
|
||||
qcom,tcs-config = <ACTIVE_TCS 2>, <SLEEP_TCS 3>,
|
||||
<WAKE_TCS 3>, <CONTROL_TCS 1>;
|
||||
<WAKE_TCS 3>, <CONTROL_TCS 0>;
|
||||
|
||||
rpmhcc: clock-controller {
|
||||
compatible = "qcom,sm8350-rpmh-clk";
|
||||
|
||||
@@ -770,8 +770,8 @@
|
||||
sd-uhs-sdr104;
|
||||
|
||||
/* Power supply */
|
||||
vqmmc-supply = &vcc1v8_s3; /* IO line */
|
||||
vmmc-supply = &vcc_sdio; /* card's power */
|
||||
vqmmc-supply = <&vcc1v8_s3>; /* IO line */
|
||||
vmmc-supply = <&vcc_sdio>; /* card's power */
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
@@ -59,7 +59,10 @@
|
||||
#interrupt-cells = <3>;
|
||||
interrupt-controller;
|
||||
reg = <0x00 0x01800000 0x00 0x10000>, /* GICD */
|
||||
<0x00 0x01840000 0x00 0xC0000>; /* GICR */
|
||||
<0x00 0x01840000 0x00 0xC0000>, /* GICR */
|
||||
<0x01 0x00000000 0x00 0x2000>, /* GICC */
|
||||
<0x01 0x00010000 0x00 0x1000>, /* GICH */
|
||||
<0x01 0x00020000 0x00 0x2000>; /* GICV */
|
||||
/*
|
||||
* vcpumntirq:
|
||||
* virtual CPU interface maintenance interrupt
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
<0x00 0x68000000 0x00 0x68000000 0x00 0x08000000>, /* PCIe DAT0 */
|
||||
<0x00 0x70000000 0x00 0x70000000 0x00 0x00200000>, /* OC SRAM */
|
||||
<0x00 0x78000000 0x00 0x78000000 0x00 0x00800000>, /* Main R5FSS */
|
||||
<0x01 0x00000000 0x01 0x00000000 0x00 0x00310000>, /* A53 PERIPHBASE */
|
||||
<0x06 0x00000000 0x06 0x00000000 0x01 0x00000000>, /* PCIe DAT1 */
|
||||
<0x05 0x00000000 0x05 0x00000000 0x01 0x00000000>, /* FSS0 DAT3 */
|
||||
|
||||
|
||||
@@ -35,7 +35,10 @@
|
||||
#interrupt-cells = <3>;
|
||||
interrupt-controller;
|
||||
reg = <0x00 0x01800000 0x00 0x10000>, /* GICD */
|
||||
<0x00 0x01880000 0x00 0x90000>; /* GICR */
|
||||
<0x00 0x01880000 0x00 0x90000>, /* GICR */
|
||||
<0x00 0x6f000000 0x00 0x2000>, /* GICC */
|
||||
<0x00 0x6f010000 0x00 0x1000>, /* GICH */
|
||||
<0x00 0x6f020000 0x00 0x2000>; /* GICV */
|
||||
/*
|
||||
* vcpumntirq:
|
||||
* virtual CPU interface maintenance interrupt
|
||||
|
||||
@@ -84,6 +84,7 @@
|
||||
<0x00 0x46000000 0x00 0x46000000 0x00 0x00200000>,
|
||||
<0x00 0x47000000 0x00 0x47000000 0x00 0x00068400>,
|
||||
<0x00 0x50000000 0x00 0x50000000 0x00 0x8000000>,
|
||||
<0x00 0x6f000000 0x00 0x6f000000 0x00 0x00310000>, /* A53 PERIPHBASE */
|
||||
<0x00 0x70000000 0x00 0x70000000 0x00 0x200000>,
|
||||
<0x05 0x00000000 0x05 0x00000000 0x01 0x0000000>,
|
||||
<0x07 0x00000000 0x07 0x00000000 0x01 0x0000000>;
|
||||
|
||||
@@ -54,7 +54,10 @@
|
||||
#interrupt-cells = <3>;
|
||||
interrupt-controller;
|
||||
reg = <0x00 0x01800000 0x00 0x10000>, /* GICD */
|
||||
<0x00 0x01900000 0x00 0x100000>; /* GICR */
|
||||
<0x00 0x01900000 0x00 0x100000>, /* GICR */
|
||||
<0x00 0x6f000000 0x00 0x2000>, /* GICC */
|
||||
<0x00 0x6f010000 0x00 0x1000>, /* GICH */
|
||||
<0x00 0x6f020000 0x00 0x2000>; /* GICV */
|
||||
|
||||
/* vcpumntirq: virtual CPU interface maintenance interrupt */
|
||||
interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
@@ -127,6 +127,7 @@
|
||||
<0x00 0x00a40000 0x00 0x00a40000 0x00 0x00000800>, /* timesync router */
|
||||
<0x00 0x01000000 0x00 0x01000000 0x00 0x0d000000>, /* Most peripherals */
|
||||
<0x00 0x30000000 0x00 0x30000000 0x00 0x0c400000>, /* MAIN NAVSS */
|
||||
<0x00 0x6f000000 0x00 0x6f000000 0x00 0x00310000>, /* A72 PERIPHBASE */
|
||||
<0x00 0x70000000 0x00 0x70000000 0x00 0x00800000>, /* MSMC RAM */
|
||||
<0x00 0x18000000 0x00 0x18000000 0x00 0x08000000>, /* PCIe1 DAT0 */
|
||||
<0x41 0x00000000 0x41 0x00000000 0x01 0x00000000>, /* PCIe1 DAT1 */
|
||||
|
||||
@@ -76,7 +76,10 @@
|
||||
#interrupt-cells = <3>;
|
||||
interrupt-controller;
|
||||
reg = <0x00 0x01800000 0x00 0x10000>, /* GICD */
|
||||
<0x00 0x01900000 0x00 0x100000>; /* GICR */
|
||||
<0x00 0x01900000 0x00 0x100000>, /* GICR */
|
||||
<0x00 0x6f000000 0x00 0x2000>, /* GICC */
|
||||
<0x00 0x6f010000 0x00 0x1000>, /* GICH */
|
||||
<0x00 0x6f020000 0x00 0x2000>; /* GICV */
|
||||
|
||||
/* vcpumntirq: virtual CPU interface maintenance interrupt */
|
||||
interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
@@ -136,6 +136,7 @@
|
||||
<0x00 0x0e000000 0x00 0x0e000000 0x00 0x01800000>, /* PCIe Core*/
|
||||
<0x00 0x10000000 0x00 0x10000000 0x00 0x10000000>, /* PCIe DAT */
|
||||
<0x00 0x64800000 0x00 0x64800000 0x00 0x00800000>, /* C71 */
|
||||
<0x00 0x6f000000 0x00 0x6f000000 0x00 0x00310000>, /* A72 PERIPHBASE */
|
||||
<0x44 0x00000000 0x44 0x00000000 0x00 0x08000000>, /* PCIe2 DAT */
|
||||
<0x44 0x10000000 0x44 0x10000000 0x00 0x08000000>, /* PCIe3 DAT */
|
||||
<0x4d 0x80800000 0x4d 0x80800000 0x00 0x00800000>, /* C66_0 */
|
||||
|
||||
@@ -921,7 +921,7 @@ CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_BCM2835=y
|
||||
CONFIG_DMA_SUN6I=m
|
||||
CONFIG_FSL_EDMA=y
|
||||
CONFIG_IMX_SDMA=y
|
||||
CONFIG_IMX_SDMA=m
|
||||
CONFIG_K3_DMA=y
|
||||
CONFIG_MV_XOR=y
|
||||
CONFIG_MV_XOR_V2=y
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
SECTIONS {
|
||||
#ifdef CONFIG_ARM64_MODULE_PLTS
|
||||
.plt 0 (NOLOAD) : { BYTE(0) }
|
||||
.init.plt 0 (NOLOAD) : { BYTE(0) }
|
||||
.text.ftrace_trampoline 0 (NOLOAD) : { BYTE(0) }
|
||||
.plt 0 : { BYTE(0) }
|
||||
.init.plt 0 : { BYTE(0) }
|
||||
.text.ftrace_trampoline 0 : { BYTE(0) }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KASAN_SW_TAGS
|
||||
|
||||
@@ -67,7 +67,8 @@ struct bp_hardening_data {
|
||||
|
||||
DECLARE_PER_CPU_READ_MOSTLY(struct bp_hardening_data, bp_hardening_data);
|
||||
|
||||
static inline void arm64_apply_bp_hardening(void)
|
||||
/* Called during entry so must be __always_inline */
|
||||
static __always_inline void arm64_apply_bp_hardening(void)
|
||||
{
|
||||
struct bp_hardening_data *d;
|
||||
|
||||
|
||||
@@ -233,17 +233,20 @@ static void install_bp_hardening_cb(bp_hardening_cb_t fn)
|
||||
__this_cpu_write(bp_hardening_data.slot, HYP_VECTOR_SPECTRE_DIRECT);
|
||||
}
|
||||
|
||||
static void call_smc_arch_workaround_1(void)
|
||||
/* Called during entry so must be noinstr */
|
||||
static noinstr void call_smc_arch_workaround_1(void)
|
||||
{
|
||||
arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_1, NULL);
|
||||
}
|
||||
|
||||
static void call_hvc_arch_workaround_1(void)
|
||||
/* Called during entry so must be noinstr */
|
||||
static noinstr void call_hvc_arch_workaround_1(void)
|
||||
{
|
||||
arm_smccc_1_1_hvc(ARM_SMCCC_ARCH_WORKAROUND_1, NULL);
|
||||
}
|
||||
|
||||
static void qcom_link_stack_sanitisation(void)
|
||||
/* Called during entry so must be noinstr */
|
||||
static noinstr void qcom_link_stack_sanitisation(void)
|
||||
{
|
||||
u64 tmp;
|
||||
|
||||
|
||||
@@ -577,10 +577,12 @@ static int setup_sigframe_layout(struct rt_sigframe_user_layout *user,
|
||||
{
|
||||
int err;
|
||||
|
||||
err = sigframe_alloc(user, &user->fpsimd_offset,
|
||||
sizeof(struct fpsimd_context));
|
||||
if (err)
|
||||
return err;
|
||||
if (system_supports_fpsimd()) {
|
||||
err = sigframe_alloc(user, &user->fpsimd_offset,
|
||||
sizeof(struct fpsimd_context));
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
/* fault information, if valid */
|
||||
if (add_all || current->thread.fault_code) {
|
||||
|
||||
@@ -61,8 +61,34 @@ EXPORT_SYMBOL(memstart_addr);
|
||||
* unless restricted on specific platforms (e.g. 30-bit on Raspberry Pi 4).
|
||||
* In such case, ZONE_DMA32 covers the rest of the 32-bit addressable memory,
|
||||
* otherwise it is empty.
|
||||
*
|
||||
* Memory reservation for crash kernel either done early or deferred
|
||||
* depending on DMA memory zones configs (ZONE_DMA) --
|
||||
*
|
||||
* In absence of ZONE_DMA configs arm64_dma_phys_limit initialized
|
||||
* here instead of max_zone_phys(). This lets early reservation of
|
||||
* crash kernel memory which has a dependency on arm64_dma_phys_limit.
|
||||
* Reserving memory early for crash kernel allows linear creation of block
|
||||
* mappings (greater than page-granularity) for all the memory bank rangs.
|
||||
* In this scheme a comparatively quicker boot is observed.
|
||||
*
|
||||
* If ZONE_DMA configs are defined, crash kernel memory reservation
|
||||
* is delayed until DMA zone memory range size initilazation performed in
|
||||
* zone_sizes_init(). The defer is necessary to steer clear of DMA zone
|
||||
* memory range to avoid overlap allocation. So crash kernel memory boundaries
|
||||
* are not known when mapping all bank memory ranges, which otherwise means
|
||||
* not possible to exclude crash kernel range from creating block mappings
|
||||
* so page-granularity mappings are created for the entire memory range.
|
||||
* Hence a slightly slower boot is observed.
|
||||
*
|
||||
* Note: Page-granularity mapppings are necessary for crash kernel memory
|
||||
* range for shrinking its size via /sys/kernel/kexec_crash_size interface.
|
||||
*/
|
||||
phys_addr_t arm64_dma_phys_limit __ro_after_init;
|
||||
#if IS_ENABLED(CONFIG_ZONE_DMA) || IS_ENABLED(CONFIG_ZONE_DMA32)
|
||||
phys_addr_t __ro_after_init arm64_dma_phys_limit;
|
||||
#else
|
||||
phys_addr_t __ro_after_init arm64_dma_phys_limit = PHYS_MASK + 1;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KEXEC_CORE
|
||||
/*
|
||||
@@ -153,8 +179,6 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max)
|
||||
if (!arm64_dma_phys_limit)
|
||||
arm64_dma_phys_limit = dma32_phys_limit;
|
||||
#endif
|
||||
if (!arm64_dma_phys_limit)
|
||||
arm64_dma_phys_limit = PHYS_MASK + 1;
|
||||
max_zone_pfns[ZONE_NORMAL] = max;
|
||||
|
||||
free_area_init(max_zone_pfns);
|
||||
@@ -352,6 +376,9 @@ void __init arm64_memblock_init(void)
|
||||
|
||||
early_init_fdt_scan_reserved_mem();
|
||||
|
||||
if (!IS_ENABLED(CONFIG_ZONE_DMA) && !IS_ENABLED(CONFIG_ZONE_DMA32))
|
||||
reserve_crashkernel();
|
||||
|
||||
high_memory = __va(memblock_end_of_DRAM() - 1) + 1;
|
||||
}
|
||||
|
||||
@@ -398,7 +425,8 @@ void __init bootmem_init(void)
|
||||
* request_standard_resources() depends on crashkernel's memory being
|
||||
* reserved, so do it here.
|
||||
*/
|
||||
reserve_crashkernel();
|
||||
if (IS_ENABLED(CONFIG_ZONE_DMA) || IS_ENABLED(CONFIG_ZONE_DMA32))
|
||||
reserve_crashkernel();
|
||||
|
||||
memblock_dump_all();
|
||||
}
|
||||
|
||||
@@ -63,6 +63,7 @@ static pmd_t bm_pmd[PTRS_PER_PMD] __page_aligned_bss __maybe_unused;
|
||||
static pud_t bm_pud[PTRS_PER_PUD] __page_aligned_bss __maybe_unused;
|
||||
|
||||
static DEFINE_SPINLOCK(swapper_pgdir_lock);
|
||||
static DEFINE_MUTEX(fixmap_lock);
|
||||
|
||||
void set_swapper_pgd(pgd_t *pgdp, pgd_t pgd)
|
||||
{
|
||||
@@ -328,6 +329,12 @@ static void alloc_init_pud(pgd_t *pgdp, unsigned long addr, unsigned long end,
|
||||
}
|
||||
BUG_ON(p4d_bad(p4d));
|
||||
|
||||
/*
|
||||
* No need for locking during early boot. And it doesn't work as
|
||||
* expected with KASLR enabled.
|
||||
*/
|
||||
if (system_state != SYSTEM_BOOTING)
|
||||
mutex_lock(&fixmap_lock);
|
||||
pudp = pud_set_fixmap_offset(p4dp, addr);
|
||||
do {
|
||||
pud_t old_pud = READ_ONCE(*pudp);
|
||||
@@ -358,6 +365,8 @@ static void alloc_init_pud(pgd_t *pgdp, unsigned long addr, unsigned long end,
|
||||
} while (pudp++, addr = next, addr != end);
|
||||
|
||||
pud_clear_fixmap();
|
||||
if (system_state != SYSTEM_BOOTING)
|
||||
mutex_unlock(&fixmap_lock);
|
||||
}
|
||||
|
||||
static void __create_pgd_mapping(pgd_t *pgdir, phys_addr_t phys,
|
||||
@@ -516,7 +525,7 @@ static void __init map_mem(pgd_t *pgdp)
|
||||
*/
|
||||
BUILD_BUG_ON(pgd_index(direct_map_end - 1) == pgd_index(direct_map_end));
|
||||
|
||||
if (can_set_direct_map() || crash_mem_map || IS_ENABLED(CONFIG_KFENCE))
|
||||
if (can_set_direct_map() || IS_ENABLED(CONFIG_KFENCE))
|
||||
flags |= NO_BLOCK_MAPPINGS | NO_CONT_MAPPINGS;
|
||||
|
||||
/*
|
||||
@@ -527,6 +536,17 @@ static void __init map_mem(pgd_t *pgdp)
|
||||
*/
|
||||
memblock_mark_nomap(kernel_start, kernel_end - kernel_start);
|
||||
|
||||
#ifdef CONFIG_KEXEC_CORE
|
||||
if (crash_mem_map) {
|
||||
if (IS_ENABLED(CONFIG_ZONE_DMA) ||
|
||||
IS_ENABLED(CONFIG_ZONE_DMA32))
|
||||
flags |= NO_BLOCK_MAPPINGS | NO_CONT_MAPPINGS;
|
||||
else if (crashk_res.end)
|
||||
memblock_mark_nomap(crashk_res.start,
|
||||
resource_size(&crashk_res));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* map all the memory banks */
|
||||
for_each_mem_range(i, &start, &end) {
|
||||
if (start >= end)
|
||||
@@ -553,6 +573,25 @@ static void __init map_mem(pgd_t *pgdp)
|
||||
__map_memblock(pgdp, kernel_start, kernel_end,
|
||||
PAGE_KERNEL, NO_CONT_MAPPINGS);
|
||||
memblock_clear_nomap(kernel_start, kernel_end - kernel_start);
|
||||
|
||||
/*
|
||||
* Use page-level mappings here so that we can shrink the region
|
||||
* in page granularity and put back unused memory to buddy system
|
||||
* through /sys/kernel/kexec_crash_size interface.
|
||||
*/
|
||||
#ifdef CONFIG_KEXEC_CORE
|
||||
if (crash_mem_map &&
|
||||
!IS_ENABLED(CONFIG_ZONE_DMA) && !IS_ENABLED(CONFIG_ZONE_DMA32)) {
|
||||
if (crashk_res.end) {
|
||||
__map_memblock(pgdp, crashk_res.start,
|
||||
crashk_res.end + 1,
|
||||
PAGE_KERNEL,
|
||||
NO_BLOCK_MAPPINGS | NO_CONT_MAPPINGS);
|
||||
memblock_clear_nomap(crashk_res.start,
|
||||
resource_size(&crashk_res));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void mark_rodata_ro(void)
|
||||
|
||||
@@ -1042,15 +1042,18 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
|
||||
goto out_off;
|
||||
}
|
||||
|
||||
/* 1. Initial fake pass to compute ctx->idx. */
|
||||
|
||||
/* Fake pass to fill in ctx->offset. */
|
||||
if (build_body(&ctx, extra_pass)) {
|
||||
/*
|
||||
* 1. Initial fake pass to compute ctx->idx and ctx->offset.
|
||||
*
|
||||
* BPF line info needs ctx->offset[i] to be the offset of
|
||||
* instruction[i] in jited image, so build prologue first.
|
||||
*/
|
||||
if (build_prologue(&ctx, was_classic)) {
|
||||
prog = orig_prog;
|
||||
goto out_off;
|
||||
}
|
||||
|
||||
if (build_prologue(&ctx, was_classic)) {
|
||||
if (build_body(&ctx, extra_pass)) {
|
||||
prog = orig_prog;
|
||||
goto out_off;
|
||||
}
|
||||
@@ -1123,6 +1126,11 @@ skip_init_ctx:
|
||||
prog->jited_len = prog_size;
|
||||
|
||||
if (!prog->is_func || extra_pass) {
|
||||
int i;
|
||||
|
||||
/* offset[prog->len] is the size of program */
|
||||
for (i = 0; i <= prog->len; i++)
|
||||
ctx.offset[i] *= AARCH64_INSN_SIZE;
|
||||
bpf_prog_fill_jited_linfo(prog, ctx.offset + 1);
|
||||
out_off:
|
||||
kfree(ctx.offset);
|
||||
|
||||
@@ -49,7 +49,7 @@ static unsigned long user_backtrace(struct perf_callchain_entry_ctx *entry,
|
||||
{
|
||||
struct stackframe buftail;
|
||||
unsigned long lr = 0;
|
||||
unsigned long *user_frame_tail = (unsigned long *)fp;
|
||||
unsigned long __user *user_frame_tail = (unsigned long __user *)fp;
|
||||
|
||||
/* Check accessibility of one struct frame_tail beyond */
|
||||
if (!access_ok(user_frame_tail, sizeof(buftail)))
|
||||
|
||||
@@ -136,7 +136,7 @@ static inline void __user *get_sigframe(struct ksignal *ksig,
|
||||
static int
|
||||
setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs)
|
||||
{
|
||||
struct rt_sigframe *frame;
|
||||
struct rt_sigframe __user *frame;
|
||||
int err = 0;
|
||||
|
||||
frame = get_sigframe(ksig, regs, sizeof(*frame));
|
||||
|
||||
@@ -480,7 +480,7 @@ static struct platform_device mcf_i2c5 = {
|
||||
#endif /* MCFI2C_BASE5 */
|
||||
#endif /* IS_ENABLED(CONFIG_I2C_IMX) */
|
||||
|
||||
#if IS_ENABLED(CONFIG_MCF_EDMA)
|
||||
#ifdef MCFEDMA_BASE
|
||||
|
||||
static const struct dma_slave_map mcf_edma_map[] = {
|
||||
{ "dreq0", "rx-tx", MCF_EDMA_FILTER_PARAM(0) },
|
||||
@@ -552,7 +552,7 @@ static struct platform_device mcf_edma = {
|
||||
.platform_data = &mcf_edma_data,
|
||||
}
|
||||
};
|
||||
#endif /* IS_ENABLED(CONFIG_MCF_EDMA) */
|
||||
#endif /* MCFEDMA_BASE */
|
||||
|
||||
#ifdef MCFSDHC_BASE
|
||||
static struct mcf_esdhc_platform_data mcf_esdhc_data = {
|
||||
@@ -651,7 +651,7 @@ static struct platform_device *mcf_devices[] __initdata = {
|
||||
&mcf_i2c5,
|
||||
#endif
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_MCF_EDMA)
|
||||
#ifdef MCFEDMA_BASE
|
||||
&mcf_edma,
|
||||
#endif
|
||||
#ifdef MCFSDHC_BASE
|
||||
|
||||
@@ -130,27 +130,27 @@ extern long __user_bad(void);
|
||||
|
||||
#define __get_user(x, ptr) \
|
||||
({ \
|
||||
unsigned long __gu_val = 0; \
|
||||
long __gu_err; \
|
||||
switch (sizeof(*(ptr))) { \
|
||||
case 1: \
|
||||
__get_user_asm("lbu", (ptr), __gu_val, __gu_err); \
|
||||
__get_user_asm("lbu", (ptr), x, __gu_err); \
|
||||
break; \
|
||||
case 2: \
|
||||
__get_user_asm("lhu", (ptr), __gu_val, __gu_err); \
|
||||
__get_user_asm("lhu", (ptr), x, __gu_err); \
|
||||
break; \
|
||||
case 4: \
|
||||
__get_user_asm("lw", (ptr), __gu_val, __gu_err); \
|
||||
__get_user_asm("lw", (ptr), x, __gu_err); \
|
||||
break; \
|
||||
case 8: \
|
||||
__gu_err = __copy_from_user(&__gu_val, ptr, 8); \
|
||||
if (__gu_err) \
|
||||
__gu_err = -EFAULT; \
|
||||
case 8: { \
|
||||
__u64 __x = 0; \
|
||||
__gu_err = raw_copy_from_user(&__x, ptr, 8) ? \
|
||||
-EFAULT : 0; \
|
||||
(x) = (typeof(x))(typeof((x) - (x)))__x; \
|
||||
break; \
|
||||
} \
|
||||
default: \
|
||||
/* __gu_val = 0; __gu_err = -EINVAL;*/ __gu_err = __user_bad();\
|
||||
} \
|
||||
x = (__force __typeof__(*(ptr))) __gu_val; \
|
||||
__gu_err; \
|
||||
})
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
*/
|
||||
mfc0 t0,CP0_CAUSE # get pending interrupts
|
||||
mfc0 t1,CP0_STATUS
|
||||
#ifdef CONFIG_32BIT
|
||||
#if defined(CONFIG_32BIT) && defined(CONFIG_MIPS_FP_SUPPORT)
|
||||
lw t2,cpu_fpu_mask
|
||||
#endif
|
||||
andi t0,ST0_IM # CAUSE.CE may be non-zero!
|
||||
@@ -139,7 +139,7 @@
|
||||
|
||||
beqz t0,spurious
|
||||
|
||||
#ifdef CONFIG_32BIT
|
||||
#if defined(CONFIG_32BIT) && defined(CONFIG_MIPS_FP_SUPPORT)
|
||||
and t2,t0
|
||||
bnez t2,fpu # handle FPU immediately
|
||||
#endif
|
||||
@@ -280,7 +280,7 @@ handle_it:
|
||||
j dec_irq_dispatch
|
||||
nop
|
||||
|
||||
#ifdef CONFIG_32BIT
|
||||
#if defined(CONFIG_32BIT) && defined(CONFIG_MIPS_FP_SUPPORT)
|
||||
fpu:
|
||||
lw t0,fpu_kstat_irq
|
||||
nop
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
|
||||
lib-y += init.o memory.o cmdline.o identify.o console.o
|
||||
|
||||
lib-$(CONFIG_32BIT) += locore.o
|
||||
lib-$(CONFIG_CPU_R3000) += locore.o
|
||||
|
||||
@@ -746,7 +746,8 @@ void __init arch_init_irq(void)
|
||||
dec_interrupt[DEC_IRQ_HALT] = -1;
|
||||
|
||||
/* Register board interrupts: FPU and cascade. */
|
||||
if (dec_interrupt[DEC_IRQ_FPU] >= 0 && cpu_has_fpu) {
|
||||
if (IS_ENABLED(CONFIG_MIPS_FP_SUPPORT) &&
|
||||
dec_interrupt[DEC_IRQ_FPU] >= 0 && cpu_has_fpu) {
|
||||
struct irq_desc *desc_fpu;
|
||||
int irq_fpu;
|
||||
|
||||
|
||||
@@ -43,16 +43,11 @@
|
||||
*/
|
||||
#define REX_PROM_MAGIC 0x30464354
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
|
||||
#define prom_is_rex(magic) 1 /* KN04 and KN05 are REX PROMs. */
|
||||
|
||||
#else /* !CONFIG_64BIT */
|
||||
|
||||
#define prom_is_rex(magic) ((magic) == REX_PROM_MAGIC)
|
||||
|
||||
#endif /* !CONFIG_64BIT */
|
||||
|
||||
/* KN04 and KN05 are REX PROMs, so only do the check for R3k systems. */
|
||||
static inline bool prom_is_rex(u32 magic)
|
||||
{
|
||||
return !IS_ENABLED(CONFIG_CPU_R3000) || magic == REX_PROM_MAGIC;
|
||||
}
|
||||
|
||||
/*
|
||||
* 3MIN/MAXINE PROM entry points for DS5000/1xx's, DS5000/xx's and
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#define __HAVE_ARCH_PMD_ALLOC_ONE
|
||||
#define __HAVE_ARCH_PUD_ALLOC_ONE
|
||||
#define __HAVE_ARCH_PGD_FREE
|
||||
#include <asm-generic/pgalloc.h>
|
||||
|
||||
static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
|
||||
@@ -48,6 +49,11 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
|
||||
extern void pgd_init(unsigned long page);
|
||||
extern pgd_t *pgd_alloc(struct mm_struct *mm);
|
||||
|
||||
static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
|
||||
{
|
||||
free_pages((unsigned long)pgd, PGD_ORDER);
|
||||
}
|
||||
|
||||
#define __pte_free_tlb(tlb,pte,address) \
|
||||
do { \
|
||||
pgtable_pte_page_dtor(pte); \
|
||||
|
||||
@@ -2167,16 +2167,14 @@ static void build_r4000_tlb_load_handler(void)
|
||||
uasm_i_tlbr(&p);
|
||||
|
||||
switch (current_cpu_type()) {
|
||||
default:
|
||||
if (cpu_has_mips_r2_exec_hazard) {
|
||||
uasm_i_ehb(&p);
|
||||
fallthrough;
|
||||
|
||||
case CPU_CAVIUM_OCTEON:
|
||||
case CPU_CAVIUM_OCTEON_PLUS:
|
||||
case CPU_CAVIUM_OCTEON2:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (cpu_has_mips_r2_exec_hazard)
|
||||
uasm_i_ehb(&p);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Examine entrylo 0 or 1 based on ptr. */
|
||||
@@ -2243,15 +2241,14 @@ static void build_r4000_tlb_load_handler(void)
|
||||
uasm_i_tlbr(&p);
|
||||
|
||||
switch (current_cpu_type()) {
|
||||
default:
|
||||
if (cpu_has_mips_r2_exec_hazard) {
|
||||
uasm_i_ehb(&p);
|
||||
|
||||
case CPU_CAVIUM_OCTEON:
|
||||
case CPU_CAVIUM_OCTEON_PLUS:
|
||||
case CPU_CAVIUM_OCTEON2:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (cpu_has_mips_r2_exec_hazard)
|
||||
uasm_i_ehb(&p);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Examine entrylo 0 or 1 based on ptr. */
|
||||
|
||||
@@ -301,11 +301,9 @@ static int __init plat_setup_devices(void)
|
||||
static int __init setup_kmac(char *s)
|
||||
{
|
||||
printk(KERN_INFO "korina mac = %s\n", s);
|
||||
if (!mac_pton(s, korina_dev0_data.mac)) {
|
||||
if (!mac_pton(s, korina_dev0_data.mac))
|
||||
printk(KERN_ERR "Invalid mac\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
__setup("kmac=", setup_kmac);
|
||||
|
||||
@@ -88,6 +88,7 @@ extern __must_check long strnlen_user(const char __user *s, long n);
|
||||
/* Optimized macros */
|
||||
#define __get_user_asm(val, insn, addr, err) \
|
||||
{ \
|
||||
unsigned long __gu_val; \
|
||||
__asm__ __volatile__( \
|
||||
" movi %0, %3\n" \
|
||||
"1: " insn " %1, 0(%2)\n" \
|
||||
@@ -96,14 +97,20 @@ extern __must_check long strnlen_user(const char __user *s, long n);
|
||||
" .section __ex_table,\"a\"\n" \
|
||||
" .word 1b, 2b\n" \
|
||||
" .previous" \
|
||||
: "=&r" (err), "=r" (val) \
|
||||
: "=&r" (err), "=r" (__gu_val) \
|
||||
: "r" (addr), "i" (-EFAULT)); \
|
||||
val = (__force __typeof__(*(addr)))__gu_val; \
|
||||
}
|
||||
|
||||
#define __get_user_unknown(val, size, ptr, err) do { \
|
||||
extern void __get_user_unknown(void);
|
||||
|
||||
#define __get_user_8(val, ptr, err) do { \
|
||||
u64 __val = 0; \
|
||||
err = 0; \
|
||||
if (__copy_from_user(&(val), ptr, size)) { \
|
||||
if (raw_copy_from_user(&(__val), ptr, sizeof(val))) { \
|
||||
err = -EFAULT; \
|
||||
} else { \
|
||||
val = (typeof(val))(typeof((val) - (val)))__val; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
@@ -119,8 +126,11 @@ do { \
|
||||
case 4: \
|
||||
__get_user_asm(val, "ldw", ptr, err); \
|
||||
break; \
|
||||
case 8: \
|
||||
__get_user_8(val, ptr, err); \
|
||||
break; \
|
||||
default: \
|
||||
__get_user_unknown(val, size, ptr, err); \
|
||||
__get_user_unknown(); \
|
||||
break; \
|
||||
} \
|
||||
} while (0)
|
||||
@@ -129,9 +139,7 @@ do { \
|
||||
({ \
|
||||
long __gu_err = -EFAULT; \
|
||||
const __typeof__(*(ptr)) __user *__gu_ptr = (ptr); \
|
||||
unsigned long __gu_val = 0; \
|
||||
__get_user_common(__gu_val, sizeof(*(ptr)), __gu_ptr, __gu_err);\
|
||||
(x) = (__force __typeof__(x))__gu_val; \
|
||||
__get_user_common(x, sizeof(*(ptr)), __gu_ptr, __gu_err); \
|
||||
__gu_err; \
|
||||
})
|
||||
|
||||
@@ -139,11 +147,9 @@ do { \
|
||||
({ \
|
||||
long __gu_err = -EFAULT; \
|
||||
const __typeof__(*(ptr)) __user *__gu_ptr = (ptr); \
|
||||
unsigned long __gu_val = 0; \
|
||||
if (access_ok( __gu_ptr, sizeof(*__gu_ptr))) \
|
||||
__get_user_common(__gu_val, sizeof(*__gu_ptr), \
|
||||
__get_user_common(x, sizeof(*__gu_ptr), \
|
||||
__gu_ptr, __gu_err); \
|
||||
(x) = (__force __typeof__(x))__gu_val; \
|
||||
__gu_err; \
|
||||
})
|
||||
|
||||
|
||||
@@ -36,10 +36,10 @@ struct rt_sigframe {
|
||||
|
||||
static inline int rt_restore_ucontext(struct pt_regs *regs,
|
||||
struct switch_stack *sw,
|
||||
struct ucontext *uc, int *pr2)
|
||||
struct ucontext __user *uc, int *pr2)
|
||||
{
|
||||
int temp;
|
||||
unsigned long *gregs = uc->uc_mcontext.gregs;
|
||||
unsigned long __user *gregs = uc->uc_mcontext.gregs;
|
||||
int err;
|
||||
|
||||
/* Always make any pending restarted system calls return -EINTR */
|
||||
@@ -102,10 +102,11 @@ asmlinkage int do_rt_sigreturn(struct switch_stack *sw)
|
||||
{
|
||||
struct pt_regs *regs = (struct pt_regs *)(sw + 1);
|
||||
/* Verify, can we follow the stack back */
|
||||
struct rt_sigframe *frame = (struct rt_sigframe *) regs->sp;
|
||||
struct rt_sigframe __user *frame;
|
||||
sigset_t set;
|
||||
int rval;
|
||||
|
||||
frame = (struct rt_sigframe __user *) regs->sp;
|
||||
if (!access_ok(frame, sizeof(*frame)))
|
||||
goto badframe;
|
||||
|
||||
@@ -124,10 +125,10 @@ badframe:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int rt_setup_ucontext(struct ucontext *uc, struct pt_regs *regs)
|
||||
static inline int rt_setup_ucontext(struct ucontext __user *uc, struct pt_regs *regs)
|
||||
{
|
||||
struct switch_stack *sw = (struct switch_stack *)regs - 1;
|
||||
unsigned long *gregs = uc->uc_mcontext.gregs;
|
||||
unsigned long __user *gregs = uc->uc_mcontext.gregs;
|
||||
int err = 0;
|
||||
|
||||
err |= __put_user(MCONTEXT_VERSION, &uc->uc_mcontext.version);
|
||||
@@ -162,8 +163,9 @@ static inline int rt_setup_ucontext(struct ucontext *uc, struct pt_regs *regs)
|
||||
return err;
|
||||
}
|
||||
|
||||
static inline void *get_sigframe(struct ksignal *ksig, struct pt_regs *regs,
|
||||
size_t frame_size)
|
||||
static inline void __user *get_sigframe(struct ksignal *ksig,
|
||||
struct pt_regs *regs,
|
||||
size_t frame_size)
|
||||
{
|
||||
unsigned long usp;
|
||||
|
||||
@@ -174,13 +176,13 @@ static inline void *get_sigframe(struct ksignal *ksig, struct pt_regs *regs,
|
||||
usp = sigsp(usp, ksig);
|
||||
|
||||
/* Verify, is it 32 or 64 bit aligned */
|
||||
return (void *)((usp - frame_size) & -8UL);
|
||||
return (void __user *)((usp - frame_size) & -8UL);
|
||||
}
|
||||
|
||||
static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
struct rt_sigframe *frame;
|
||||
struct rt_sigframe __user *frame;
|
||||
int err = 0;
|
||||
|
||||
frame = get_sigframe(ksig, regs, sizeof(*frame));
|
||||
|
||||
@@ -17,6 +17,7 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err);
|
||||
const char *trap_name(unsigned long code);
|
||||
void do_page_fault(struct pt_regs *regs, unsigned long code,
|
||||
unsigned long address);
|
||||
int handle_nadtlb_fault(struct pt_regs *regs);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -661,6 +661,8 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
|
||||
by hand. Technically we need to emulate:
|
||||
fdc,fdce,pdc,"fic,4f",prober,probeir,probew, probeiw
|
||||
*/
|
||||
if (code == 17 && handle_nadtlb_fault(regs))
|
||||
return;
|
||||
fault_address = regs->ior;
|
||||
fault_space = regs->isr;
|
||||
break;
|
||||
|
||||
@@ -424,3 +424,92 @@ no_context:
|
||||
goto no_context;
|
||||
pagefault_out_of_memory();
|
||||
}
|
||||
|
||||
/* Handle non-access data TLB miss faults.
|
||||
*
|
||||
* For probe instructions, accesses to userspace are considered allowed
|
||||
* if they lie in a valid VMA and the access type matches. We are not
|
||||
* allowed to handle MM faults here so there may be situations where an
|
||||
* actual access would fail even though a probe was successful.
|
||||
*/
|
||||
int
|
||||
handle_nadtlb_fault(struct pt_regs *regs)
|
||||
{
|
||||
unsigned long insn = regs->iir;
|
||||
int breg, treg, xreg, val = 0;
|
||||
struct vm_area_struct *vma, *prev_vma;
|
||||
struct task_struct *tsk;
|
||||
struct mm_struct *mm;
|
||||
unsigned long address;
|
||||
unsigned long acc_type;
|
||||
|
||||
switch (insn & 0x380) {
|
||||
case 0x280:
|
||||
/* FDC instruction */
|
||||
fallthrough;
|
||||
case 0x380:
|
||||
/* PDC and FIC instructions */
|
||||
if (printk_ratelimit()) {
|
||||
pr_warn("BUG: nullifying cache flush/purge instruction\n");
|
||||
show_regs(regs);
|
||||
}
|
||||
if (insn & 0x20) {
|
||||
/* Base modification */
|
||||
breg = (insn >> 21) & 0x1f;
|
||||
xreg = (insn >> 16) & 0x1f;
|
||||
if (breg && xreg)
|
||||
regs->gr[breg] += regs->gr[xreg];
|
||||
}
|
||||
regs->gr[0] |= PSW_N;
|
||||
return 1;
|
||||
|
||||
case 0x180:
|
||||
/* PROBE instruction */
|
||||
treg = insn & 0x1f;
|
||||
if (regs->isr) {
|
||||
tsk = current;
|
||||
mm = tsk->mm;
|
||||
if (mm) {
|
||||
/* Search for VMA */
|
||||
address = regs->ior;
|
||||
mmap_read_lock(mm);
|
||||
vma = find_vma_prev(mm, address, &prev_vma);
|
||||
mmap_read_unlock(mm);
|
||||
|
||||
/*
|
||||
* Check if access to the VMA is okay.
|
||||
* We don't allow for stack expansion.
|
||||
*/
|
||||
acc_type = (insn & 0x40) ? VM_WRITE : VM_READ;
|
||||
if (vma
|
||||
&& address >= vma->vm_start
|
||||
&& (vma->vm_flags & acc_type) == acc_type)
|
||||
val = 1;
|
||||
}
|
||||
}
|
||||
if (treg)
|
||||
regs->gr[treg] = val;
|
||||
regs->gr[0] |= PSW_N;
|
||||
return 1;
|
||||
|
||||
case 0x300:
|
||||
/* LPA instruction */
|
||||
if (insn & 0x20) {
|
||||
/* Base modification */
|
||||
breg = (insn >> 21) & 0x1f;
|
||||
xreg = (insn >> 16) & 0x1f;
|
||||
if (breg && xreg)
|
||||
regs->gr[breg] += regs->gr[xreg];
|
||||
}
|
||||
treg = insn & 0x1f;
|
||||
if (treg)
|
||||
regs->gr[treg] = 0;
|
||||
regs->gr[0] |= PSW_N;
|
||||
return 1;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ else
|
||||
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,$(call cc-option,-mtune=power5))
|
||||
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mcpu=power5,-mcpu=power4)
|
||||
endif
|
||||
else
|
||||
else ifdef CONFIG_PPC_BOOK3E_64
|
||||
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64
|
||||
endif
|
||||
|
||||
|
||||
30
arch/powerpc/boot/dts/fsl/t1040rdb-rev-a.dts
Normal file
30
arch/powerpc/boot/dts/fsl/t1040rdb-rev-a.dts
Normal file
@@ -0,0 +1,30 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* T1040RDB-REV-A Device Tree Source
|
||||
*
|
||||
* Copyright 2014 - 2015 Freescale Semiconductor Inc.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "t1040rdb.dts"
|
||||
|
||||
/ {
|
||||
model = "fsl,T1040RDB-REV-A";
|
||||
compatible = "fsl,T1040RDB-REV-A";
|
||||
};
|
||||
|
||||
&seville_port0 {
|
||||
label = "ETH5";
|
||||
};
|
||||
|
||||
&seville_port2 {
|
||||
label = "ETH7";
|
||||
};
|
||||
|
||||
&seville_port4 {
|
||||
label = "ETH9";
|
||||
};
|
||||
|
||||
&seville_port6 {
|
||||
label = "ETH11";
|
||||
};
|
||||
@@ -119,7 +119,7 @@
|
||||
managed = "in-band-status";
|
||||
phy-handle = <&phy_qsgmii_0>;
|
||||
phy-mode = "qsgmii";
|
||||
label = "ETH5";
|
||||
label = "ETH3";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
managed = "in-band-status";
|
||||
phy-handle = <&phy_qsgmii_2>;
|
||||
phy-mode = "qsgmii";
|
||||
label = "ETH7";
|
||||
label = "ETH5";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
managed = "in-band-status";
|
||||
phy-handle = <&phy_qsgmii_4>;
|
||||
phy-mode = "qsgmii";
|
||||
label = "ETH9";
|
||||
label = "ETH7";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
managed = "in-band-status";
|
||||
phy-handle = <&phy_qsgmii_6>;
|
||||
phy-mode = "qsgmii";
|
||||
label = "ETH11";
|
||||
label = "ETH9";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
@@ -359,25 +359,37 @@ static inline void __raw_writeq_be(unsigned long v, volatile void __iomem *addr)
|
||||
*/
|
||||
static inline void __raw_rm_writeb(u8 val, volatile void __iomem *paddr)
|
||||
{
|
||||
__asm__ __volatile__("stbcix %0,0,%1"
|
||||
__asm__ __volatile__(".machine push; \
|
||||
.machine power6; \
|
||||
stbcix %0,0,%1; \
|
||||
.machine pop;"
|
||||
: : "r" (val), "r" (paddr) : "memory");
|
||||
}
|
||||
|
||||
static inline void __raw_rm_writew(u16 val, volatile void __iomem *paddr)
|
||||
{
|
||||
__asm__ __volatile__("sthcix %0,0,%1"
|
||||
__asm__ __volatile__(".machine push; \
|
||||
.machine power6; \
|
||||
sthcix %0,0,%1; \
|
||||
.machine pop;"
|
||||
: : "r" (val), "r" (paddr) : "memory");
|
||||
}
|
||||
|
||||
static inline void __raw_rm_writel(u32 val, volatile void __iomem *paddr)
|
||||
{
|
||||
__asm__ __volatile__("stwcix %0,0,%1"
|
||||
__asm__ __volatile__(".machine push; \
|
||||
.machine power6; \
|
||||
stwcix %0,0,%1; \
|
||||
.machine pop;"
|
||||
: : "r" (val), "r" (paddr) : "memory");
|
||||
}
|
||||
|
||||
static inline void __raw_rm_writeq(u64 val, volatile void __iomem *paddr)
|
||||
{
|
||||
__asm__ __volatile__("stdcix %0,0,%1"
|
||||
__asm__ __volatile__(".machine push; \
|
||||
.machine power6; \
|
||||
stdcix %0,0,%1; \
|
||||
.machine pop;"
|
||||
: : "r" (val), "r" (paddr) : "memory");
|
||||
}
|
||||
|
||||
@@ -389,7 +401,10 @@ static inline void __raw_rm_writeq_be(u64 val, volatile void __iomem *paddr)
|
||||
static inline u8 __raw_rm_readb(volatile void __iomem *paddr)
|
||||
{
|
||||
u8 ret;
|
||||
__asm__ __volatile__("lbzcix %0,0, %1"
|
||||
__asm__ __volatile__(".machine push; \
|
||||
.machine power6; \
|
||||
lbzcix %0,0, %1; \
|
||||
.machine pop;"
|
||||
: "=r" (ret) : "r" (paddr) : "memory");
|
||||
return ret;
|
||||
}
|
||||
@@ -397,7 +412,10 @@ static inline u8 __raw_rm_readb(volatile void __iomem *paddr)
|
||||
static inline u16 __raw_rm_readw(volatile void __iomem *paddr)
|
||||
{
|
||||
u16 ret;
|
||||
__asm__ __volatile__("lhzcix %0,0, %1"
|
||||
__asm__ __volatile__(".machine push; \
|
||||
.machine power6; \
|
||||
lhzcix %0,0, %1; \
|
||||
.machine pop;"
|
||||
: "=r" (ret) : "r" (paddr) : "memory");
|
||||
return ret;
|
||||
}
|
||||
@@ -405,7 +423,10 @@ static inline u16 __raw_rm_readw(volatile void __iomem *paddr)
|
||||
static inline u32 __raw_rm_readl(volatile void __iomem *paddr)
|
||||
{
|
||||
u32 ret;
|
||||
__asm__ __volatile__("lwzcix %0,0, %1"
|
||||
__asm__ __volatile__(".machine push; \
|
||||
.machine power6; \
|
||||
lwzcix %0,0, %1; \
|
||||
.machine pop;"
|
||||
: "=r" (ret) : "r" (paddr) : "memory");
|
||||
return ret;
|
||||
}
|
||||
@@ -413,7 +434,10 @@ static inline u32 __raw_rm_readl(volatile void __iomem *paddr)
|
||||
static inline u64 __raw_rm_readq(volatile void __iomem *paddr)
|
||||
{
|
||||
u64 ret;
|
||||
__asm__ __volatile__("ldcix %0,0, %1"
|
||||
__asm__ __volatile__(".machine push; \
|
||||
.machine power6; \
|
||||
ldcix %0,0, %1; \
|
||||
.machine pop;"
|
||||
: "=r" (ret) : "r" (paddr) : "memory");
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#define SET_MEMORY_RW 1
|
||||
#define SET_MEMORY_NX 2
|
||||
#define SET_MEMORY_X 3
|
||||
#define SET_MEMORY_NP 4 /* Set memory non present */
|
||||
#define SET_MEMORY_P 5 /* Set memory present */
|
||||
|
||||
int change_memory_attr(unsigned long addr, int numpages, long action);
|
||||
|
||||
@@ -29,6 +31,14 @@ static inline int set_memory_x(unsigned long addr, int numpages)
|
||||
return change_memory_attr(addr, numpages, SET_MEMORY_X);
|
||||
}
|
||||
|
||||
int set_memory_attr(unsigned long addr, int numpages, pgprot_t prot);
|
||||
static inline int set_memory_np(unsigned long addr, int numpages)
|
||||
{
|
||||
return change_memory_attr(addr, numpages, SET_MEMORY_NP);
|
||||
}
|
||||
|
||||
static inline int set_memory_p(unsigned long addr, int numpages)
|
||||
{
|
||||
return change_memory_attr(addr, numpages, SET_MEMORY_P);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -125,8 +125,11 @@ do { \
|
||||
*/
|
||||
#define __get_user_atomic_128_aligned(kaddr, uaddr, err) \
|
||||
__asm__ __volatile__( \
|
||||
".machine push\n" \
|
||||
".machine altivec\n" \
|
||||
"1: lvx 0,0,%1 # get user\n" \
|
||||
" stvx 0,0,%2 # put kernel\n" \
|
||||
".machine pop\n" \
|
||||
"2:\n" \
|
||||
".section .fixup,\"ax\"\n" \
|
||||
"3: li %0,%3\n" \
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user