1
0
Fork 0

Merge 5.0-rc6 into char-misc-next

We need the char-misc fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hifive-unleashed-5.1
Greg Kroah-Hartman 2019-02-11 09:05:58 +01:00
commit 5c07488d99
566 changed files with 5565 additions and 2190 deletions

View File

@ -24,7 +24,7 @@ What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/
cpld3_version cpld3_version
Date: November 2018 Date: November 2018
KernelVersion: 4.21 KernelVersion: 5.0
Contact: Vadim Pasternak <vadimpmellanox.com> Contact: Vadim Pasternak <vadimpmellanox.com>
Description: These files show with which CPLD versions have been burned Description: These files show with which CPLD versions have been burned
on LED board. on LED board.
@ -35,7 +35,7 @@ What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/
jtag_enable jtag_enable
Date: November 2018 Date: November 2018
KernelVersion: 4.21 KernelVersion: 5.0
Contact: Vadim Pasternak <vadimpmellanox.com> Contact: Vadim Pasternak <vadimpmellanox.com>
Description: These files enable and disable the access to the JTAG domain. Description: These files enable and disable the access to the JTAG domain.
By default access to the JTAG domain is disabled. By default access to the JTAG domain is disabled.
@ -105,7 +105,7 @@ What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/
reset_voltmon_upgrade_fail reset_voltmon_upgrade_fail
Date: November 2018 Date: November 2018
KernelVersion: 4.21 KernelVersion: 5.0
Contact: Vadim Pasternak <vadimpmellanox.com> Contact: Vadim Pasternak <vadimpmellanox.com>
Description: These files show the system reset cause, as following: ComEx Description: These files show the system reset cause, as following: ComEx
power fail, reset from ComEx, system platform reset, reset power fail, reset from ComEx, system platform reset, reset

View File

@ -1696,12 +1696,11 @@
By default, super page will be supported if Intel IOMMU By default, super page will be supported if Intel IOMMU
has the capability. With this option, super page will has the capability. With this option, super page will
not be supported. not be supported.
sm_off [Default Off] sm_on [Default Off]
By default, scalable mode will be supported if the By default, scalable mode will be disabled even if the
hardware advertises that it has support for the scalable hardware advertises that it has support for the scalable
mode translation. With this option set, scalable mode mode translation. With this option set, scalable mode
will not be used even on hardware which claims to support will be used on hardware which claims to support it.
it.
tboot_noforce [Default Off] tboot_noforce [Default Off]
Do not force the Intel IOMMU enabled under tboot. Do not force the Intel IOMMU enabled under tboot.
By default, tboot will force Intel IOMMU on, which By default, tboot will force Intel IOMMU on, which

View File

@ -17,7 +17,11 @@ extra-y += $(DT_TMP_SCHEMA)
quiet_cmd_mk_schema = SCHEMA $@ quiet_cmd_mk_schema = SCHEMA $@
cmd_mk_schema = $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) -o $@ $(filter-out FORCE, $^) cmd_mk_schema = $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) -o $@ $(filter-out FORCE, $^)
DT_DOCS = $(shell cd $(srctree)/$(src) && find * -name '*.yaml') DT_DOCS = $(shell \
cd $(srctree)/$(src) && \
find * \( -name '*.yaml' ! -name $(DT_TMP_SCHEMA) \) \
)
DT_SCHEMA_FILES ?= $(addprefix $(src)/,$(DT_DOCS)) DT_SCHEMA_FILES ?= $(addprefix $(src)/,$(DT_DOCS))
extra-y += $(patsubst $(src)/%.yaml,%.example.dts, $(DT_SCHEMA_FILES)) extra-y += $(patsubst $(src)/%.yaml,%.example.dts, $(DT_SCHEMA_FILES))

View File

@ -4,14 +4,10 @@ Required properties:
- compatible : "olpc,ap-sp" - compatible : "olpc,ap-sp"
- reg : base address and length of SoC's WTM registers - reg : base address and length of SoC's WTM registers
- interrupts : SP-AP interrupt - interrupts : SP-AP interrupt
- clocks : phandle + clock-specifier for the clock that drives the WTM
- clock-names: should be "sp"
Example: Example:
ap-sp@d4290000 { ap-sp@d4290000 {
compatible = "olpc,ap-sp"; compatible = "olpc,ap-sp";
reg = <0xd4290000 0x1000>; reg = <0xd4290000 0x1000>;
interrupts = <40>; interrupts = <40>;
clocks = <&soc_clocks MMP2_CLK_SP>;
clock-names = "sp";
} }

View File

@ -56,26 +56,32 @@ of any kernel data structures.
dentry-state: dentry-state:
From linux/fs/dentry.c: From linux/include/linux/dcache.h:
-------------------------------------------------------------- --------------------------------------------------------------
struct { struct dentry_stat_t dentry_stat {
int nr_dentry; int nr_dentry;
int nr_unused; int nr_unused;
int age_limit; /* age in seconds */ int age_limit; /* age in seconds */
int want_pages; /* pages requested by system */ int want_pages; /* pages requested by system */
int dummy[2]; int nr_negative; /* # of unused negative dentries */
} dentry_stat = {0, 0, 45, 0,}; int dummy; /* Reserved for future use */
-------------------------------------------------------------- };
--------------------------------------------------------------
Dentries are dynamically allocated and deallocated.
nr_dentry shows the total number of dentries allocated (active
+ unused). nr_unused shows the number of dentries that are not
actively used, but are saved in the LRU list for future reuse.
Dentries are dynamically allocated and deallocated, and
nr_dentry seems to be 0 all the time. Hence it's safe to
assume that only nr_unused, age_limit and want_pages are
used. Nr_unused seems to be exactly what its name says.
Age_limit is the age in seconds after which dcache entries Age_limit is the age in seconds after which dcache entries
can be reclaimed when memory is short and want_pages is can be reclaimed when memory is short and want_pages is
nonzero when shrink_dcache_pages() has been called and the nonzero when shrink_dcache_pages() has been called and the
dcache isn't pruned yet. dcache isn't pruned yet.
nr_negative shows the number of unused dentries that are also
negative dentries which do not mapped to actual files.
============================================================== ==============================================================
dquot-max & dquot-nr: dquot-max & dquot-nr:

View File

@ -9,7 +9,7 @@ Fenghua Yu <fenghua.yu@intel.com>
Tony Luck <tony.luck@intel.com> Tony Luck <tony.luck@intel.com>
Vikas Shivappa <vikas.shivappa@intel.com> Vikas Shivappa <vikas.shivappa@intel.com>
This feature is enabled by the CONFIG_X86_RESCTRL and the x86 /proc/cpuinfo This feature is enabled by the CONFIG_X86_CPU_RESCTRL and the x86 /proc/cpuinfo
flag bits: flag bits:
RDT (Resource Director Technology) Allocation - "rdt_a" RDT (Resource Director Technology) Allocation - "rdt_a"
CAT (Cache Allocation Technology) - "cat_l3", "cat_l2" CAT (Cache Allocation Technology) - "cat_l3", "cat_l2"

View File

@ -2848,6 +2848,9 @@ F: include/uapi/linux/if_bonding.h
BPF (Safe dynamic programs and tools) BPF (Safe dynamic programs and tools)
M: Alexei Starovoitov <ast@kernel.org> M: Alexei Starovoitov <ast@kernel.org>
M: Daniel Borkmann <daniel@iogearbox.net> M: Daniel Borkmann <daniel@iogearbox.net>
R: Martin KaFai Lau <kafai@fb.com>
R: Song Liu <songliubraving@fb.com>
R: Yonghong Song <yhs@fb.com>
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git
@ -2873,6 +2876,8 @@ F: samples/bpf/
F: tools/bpf/ F: tools/bpf/
F: tools/lib/bpf/ F: tools/lib/bpf/
F: tools/testing/selftests/bpf/ F: tools/testing/selftests/bpf/
K: bpf
N: bpf
BPF JIT for ARM BPF JIT for ARM
M: Shubham Bansal <illusionist.neo@gmail.com> M: Shubham Bansal <illusionist.neo@gmail.com>
@ -5181,7 +5186,7 @@ DRM DRIVERS FOR XEN
M: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> M: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
T: git git://anongit.freedesktop.org/drm/drm-misc T: git git://anongit.freedesktop.org/drm/drm-misc
L: dri-devel@lists.freedesktop.org L: dri-devel@lists.freedesktop.org
L: xen-devel@lists.xen.org L: xen-devel@lists.xenproject.org (moderated for non-subscribers)
S: Supported S: Supported
F: drivers/gpu/drm/xen/ F: drivers/gpu/drm/xen/
F: Documentation/gpu/xen-front.rst F: Documentation/gpu/xen-front.rst
@ -11317,10 +11322,12 @@ F: include/dt-bindings/
OPENCORES I2C BUS DRIVER OPENCORES I2C BUS DRIVER
M: Peter Korsgaard <peter@korsgaard.com> M: Peter Korsgaard <peter@korsgaard.com>
M: Andrew Lunn <andrew@lunn.ch>
L: linux-i2c@vger.kernel.org L: linux-i2c@vger.kernel.org
S: Maintained S: Maintained
F: Documentation/i2c/busses/i2c-ocores F: Documentation/i2c/busses/i2c-ocores
F: drivers/i2c/busses/i2c-ocores.c F: drivers/i2c/busses/i2c-ocores.c
F: include/linux/platform_data/i2c-ocores.h
OPENRISC ARCHITECTURE OPENRISC ARCHITECTURE
M: Jonas Bonn <jonas@southpole.se> M: Jonas Bonn <jonas@southpole.se>
@ -12878,6 +12885,13 @@ F: Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
F: drivers/net/dsa/realtek-smi* F: drivers/net/dsa/realtek-smi*
F: drivers/net/dsa/rtl83* F: drivers/net/dsa/rtl83*
REDPINE WIRELESS DRIVER
M: Amitkumar Karwar <amitkarwar@gmail.com>
M: Siva Rebbagondla <siva8118@gmail.com>
L: linux-wireless@vger.kernel.org
S: Maintained
F: drivers/net/wireless/rsi/
REGISTER MAP ABSTRACTION REGISTER MAP ABSTRACTION
M: Mark Brown <broonie@kernel.org> M: Mark Brown <broonie@kernel.org>
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
@ -13706,6 +13720,15 @@ L: netdev@vger.kernel.org
S: Supported S: Supported
F: drivers/net/ethernet/sfc/ F: drivers/net/ethernet/sfc/
SFF/SFP/SFP+ MODULE SUPPORT
M: Russell King <linux@armlinux.org.uk>
L: netdev@vger.kernel.org
S: Maintained
F: drivers/net/phy/phylink.c
F: drivers/net/phy/sfp*
F: include/linux/phylink.h
F: include/linux/sfp.h
SGI GRU DRIVER SGI GRU DRIVER
M: Dimitri Sivanich <sivanich@sgi.com> M: Dimitri Sivanich <sivanich@sgi.com>
S: Maintained S: Maintained
@ -16651,6 +16674,15 @@ S: Maintained
F: drivers/platform/x86/ F: drivers/platform/x86/
F: drivers/platform/olpc/ F: drivers/platform/olpc/
X86 PLATFORM DRIVERS - ARCH
R: Darren Hart <dvhart@infradead.org>
R: Andy Shevchenko <andy@infradead.org>
L: platform-driver-x86@vger.kernel.org
L: x86@kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/core
S: Maintained
F: arch/x86/platform
X86 VDSO X86 VDSO
M: Andy Lutomirski <luto@kernel.org> M: Andy Lutomirski <luto@kernel.org>
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
@ -16683,6 +16715,24 @@ T: git git://linuxtv.org/media_tree.git
S: Maintained S: Maintained
F: drivers/media/tuners/tuner-xc2028.* F: drivers/media/tuners/tuner-xc2028.*
XDP (eXpress Data Path)
M: Alexei Starovoitov <ast@kernel.org>
M: Daniel Borkmann <daniel@iogearbox.net>
M: David S. Miller <davem@davemloft.net>
M: Jakub Kicinski <jakub.kicinski@netronome.com>
M: Jesper Dangaard Brouer <hawk@kernel.org>
M: John Fastabend <john.fastabend@gmail.com>
L: netdev@vger.kernel.org
L: xdp-newbies@vger.kernel.org
S: Supported
F: net/core/xdp.c
F: include/net/xdp.h
F: kernel/bpf/devmap.c
F: kernel/bpf/cpumap.c
F: include/trace/events/xdp.h
K: xdp
N: xdp
XDP SOCKETS (AF_XDP) XDP SOCKETS (AF_XDP)
M: Björn Töpel <bjorn.topel@intel.com> M: Björn Töpel <bjorn.topel@intel.com>
M: Magnus Karlsson <magnus.karlsson@intel.com> M: Magnus Karlsson <magnus.karlsson@intel.com>

View File

@ -2,7 +2,7 @@
VERSION = 5 VERSION = 5
PATCHLEVEL = 0 PATCHLEVEL = 0
SUBLEVEL = 0 SUBLEVEL = 0
EXTRAVERSION = -rc4 EXTRAVERSION = -rc6
NAME = Shy Crocodile NAME = Shy Crocodile
# *DOCUMENTATION* # *DOCUMENTATION*

View File

@ -215,7 +215,7 @@
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&mmc1_pins>; pinctrl-0 = <&mmc1_pins>;
bus-width = <0x4>; bus-width = <0x4>;
cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
cd-inverted; cd-inverted;
max-frequency = <26000000>; max-frequency = <26000000>;
vmmc-supply = <&vmmcsd_fixed>; vmmc-supply = <&vmmcsd_fixed>;

View File

@ -476,7 +476,7 @@
clocksource: timer@20000 { clocksource: timer@20000 {
compatible = "ti,da830-timer"; compatible = "ti,da830-timer";
reg = <0x20000 0x1000>; reg = <0x20000 0x1000>;
interrupts = <12>, <13>; interrupts = <21>, <22>;
interrupt-names = "tint12", "tint34"; interrupt-names = "tint12", "tint34";
clocks = <&pll0_auxclk>; clocks = <&pll0_auxclk>;
}; };

View File

@ -103,7 +103,7 @@
power { power {
label = "Power Button"; label = "Power Button";
gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
gpio-key,wakeup; wakeup-source;
linux,code = <KEY_POWER>; linux,code = <KEY_POWER>;
}; };
}; };

View File

@ -309,7 +309,7 @@
pinctrl-2 = <&pinctrl_usdhc3_200mhz>; pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
cd-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>; cd-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>;
keep-power-in-suspend; keep-power-in-suspend;
enable-sdio-wakeup; wakeup-source;
vmmc-supply = <&reg_sd3_vmmc>; vmmc-supply = <&reg_sd3_vmmc>;
status = "okay"; status = "okay";
}; };

View File

@ -467,7 +467,7 @@
}; };
gpt: gpt@2098000 { gpt: gpt@2098000 {
compatible = "fsl,imx6sx-gpt", "fsl,imx31-gpt"; compatible = "fsl,imx6sx-gpt", "fsl,imx6dl-gpt";
reg = <0x02098000 0x4000>; reg = <0x02098000 0x4000>;
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6SX_CLK_GPT_BUS>, clocks = <&clks IMX6SX_CLK_GPT_BUS>,

View File

@ -274,7 +274,7 @@
compatible = "amlogic,meson6-dwmac", "snps,dwmac"; compatible = "amlogic,meson6-dwmac", "snps,dwmac";
reg = <0xc9410000 0x10000 reg = <0xc9410000 0x10000
0xc1108108 0x4>; 0xc1108108 0x4>;
interrupts = <GIC_SPI 8 IRQ_TYPE_EDGE_RISING>; interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "macirq"; interrupt-names = "macirq";
status = "disabled"; status = "disabled";
}; };

View File

@ -205,8 +205,7 @@
cap-sd-highspeed; cap-sd-highspeed;
disable-wp; disable-wp;
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
cd-inverted;
vmmc-supply = <&vcc_3v3>; vmmc-supply = <&vcc_3v3>;
}; };

View File

@ -221,7 +221,6 @@
/* Realtek RTL8211F (0x001cc916) */ /* Realtek RTL8211F (0x001cc916) */
eth_phy: ethernet-phy@0 { eth_phy: ethernet-phy@0 {
reg = <0>; reg = <0>;
eee-broken-1000t;
interrupt-parent = <&gpio_intc>; interrupt-parent = <&gpio_intc>;
/* GPIOH_3 */ /* GPIOH_3 */
interrupts = <17 IRQ_TYPE_LEVEL_LOW>; interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
@ -273,8 +272,7 @@
cap-sd-highspeed; cap-sd-highspeed;
disable-wp; disable-wp;
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
cd-inverted;
vmmc-supply = <&tflash_vdd>; vmmc-supply = <&tflash_vdd>;
vqmmc-supply = <&tf_io>; vqmmc-supply = <&tf_io>;

View File

@ -206,8 +206,7 @@
cap-sd-highspeed; cap-sd-highspeed;
disable-wp; disable-wp;
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
cd-inverted;
vmmc-supply = <&vcc_3v3>; vmmc-supply = <&vcc_3v3>;
}; };

View File

@ -105,7 +105,7 @@
interrupts-extended = < interrupts-extended = <
&cpcap 15 0 &cpcap 14 0 &cpcap 28 0 &cpcap 19 0 &cpcap 15 0 &cpcap 14 0 &cpcap 28 0 &cpcap 19 0
&cpcap 18 0 &cpcap 17 0 &cpcap 16 0 &cpcap 49 0 &cpcap 18 0 &cpcap 17 0 &cpcap 16 0 &cpcap 49 0
&cpcap 48 1 &cpcap 48 0
>; >;
interrupt-names = interrupt-names =
"id_ground", "id_float", "se0conn", "vbusvld", "id_ground", "id_float", "se0conn", "vbusvld",

View File

@ -714,11 +714,7 @@
vdda-supply = <&vdac>; vdda-supply = <&vdac>;
#address-cells = <1>;
#size-cells = <0>;
port { port {
reg = <0>;
venc_out: endpoint { venc_out: endpoint {
remote-endpoint = <&opa_in>; remote-endpoint = <&opa_in>;
ti,channels = <1>; ti,channels = <1>;

View File

@ -814,7 +814,7 @@
/* For debugging, it is often good idea to remove this GPIO. /* For debugging, it is often good idea to remove this GPIO.
It means you can remove back cover (to reboot by removing It means you can remove back cover (to reboot by removing
battery) and still use the MMC card. */ battery) and still use the MMC card. */
cd-gpios = <&gpio6 0 GPIO_ACTIVE_HIGH>; /* 160 */ cd-gpios = <&gpio6 0 GPIO_ACTIVE_LOW>; /* 160 */
}; };
/* most boards use vaux3, only some old versions use vmmc2 instead */ /* most boards use vaux3, only some old versions use vmmc2 instead */

View File

@ -370,6 +370,19 @@
compatible = "ti,omap2-onenand"; compatible = "ti,omap2-onenand";
reg = <0 0 0x20000>; /* CS0, offset 0, IO size 128K */ reg = <0 0 0x20000>; /* CS0, offset 0, IO size 128K */
/*
* These timings are based on CONFIG_OMAP_GPMC_DEBUG=y reported
* bootloader set values when booted with v4.19 using both N950
* and N9 devices (OneNAND Manufacturer: Samsung):
*
* gpmc cs0 before gpmc_cs_program_settings:
* cs0 GPMC_CS_CONFIG1: 0xfd001202
* cs0 GPMC_CS_CONFIG2: 0x00181800
* cs0 GPMC_CS_CONFIG3: 0x00030300
* cs0 GPMC_CS_CONFIG4: 0x18001804
* cs0 GPMC_CS_CONFIG5: 0x03171d1d
* cs0 GPMC_CS_CONFIG6: 0x97080000
*/
gpmc,sync-read; gpmc,sync-read;
gpmc,sync-write; gpmc,sync-write;
gpmc,burst-length = <16>; gpmc,burst-length = <16>;
@ -379,26 +392,27 @@
gpmc,device-width = <2>; gpmc,device-width = <2>;
gpmc,mux-add-data = <2>; gpmc,mux-add-data = <2>;
gpmc,cs-on-ns = <0>; gpmc,cs-on-ns = <0>;
gpmc,cs-rd-off-ns = <87>; gpmc,cs-rd-off-ns = <122>;
gpmc,cs-wr-off-ns = <87>; gpmc,cs-wr-off-ns = <122>;
gpmc,adv-on-ns = <0>; gpmc,adv-on-ns = <0>;
gpmc,adv-rd-off-ns = <10>; gpmc,adv-rd-off-ns = <15>;
gpmc,adv-wr-off-ns = <10>; gpmc,adv-wr-off-ns = <15>;
gpmc,oe-on-ns = <15>; gpmc,oe-on-ns = <20>;
gpmc,oe-off-ns = <87>; gpmc,oe-off-ns = <122>;
gpmc,we-on-ns = <0>; gpmc,we-on-ns = <0>;
gpmc,we-off-ns = <87>; gpmc,we-off-ns = <122>;
gpmc,rd-cycle-ns = <112>; gpmc,rd-cycle-ns = <148>;
gpmc,wr-cycle-ns = <112>; gpmc,wr-cycle-ns = <148>;
gpmc,access-ns = <81>; gpmc,access-ns = <117>;
gpmc,page-burst-access-ns = <15>; gpmc,page-burst-access-ns = <15>;
gpmc,bus-turnaround-ns = <0>; gpmc,bus-turnaround-ns = <0>;
gpmc,cycle2cycle-delay-ns = <0>; gpmc,cycle2cycle-delay-ns = <0>;
gpmc,wait-monitoring-ns = <0>; gpmc,wait-monitoring-ns = <0>;
gpmc,clk-activation-ns = <5>; gpmc,clk-activation-ns = <10>;
gpmc,wr-data-mux-bus-ns = <30>; gpmc,wr-data-mux-bus-ns = <40>;
gpmc,wr-access-ns = <81>; gpmc,wr-access-ns = <117>;
gpmc,sync-clk-ps = <15000>;
gpmc,sync-clk-ps = <15000>; /* TBC; Where this value came? */
/* /*
* MTD partition table corresponding to Nokia's MeeGo 1.2 * MTD partition table corresponding to Nokia's MeeGo 1.2

View File

@ -1046,8 +1046,6 @@
<SYSC_IDLE_SMART>, <SYSC_IDLE_SMART>,
<SYSC_IDLE_SMART_WKUP>; <SYSC_IDLE_SMART_WKUP>;
ti,syss-mask = <1>; ti,syss-mask = <1>;
ti,no-reset-on-init;
ti,no-idle-on-init;
/* Domains (V, P, C): core, core_pwrdm, l4per_clkdm */ /* Domains (V, P, C): core, core_pwrdm, l4per_clkdm */
clocks = <&l4per_clkctrl OMAP5_UART3_CLKCTRL 0>; clocks = <&l4per_clkctrl OMAP5_UART3_CLKCTRL 0>;
clock-names = "fck"; clock-names = "fck";

View File

@ -1681,15 +1681,12 @@
du: display@feb00000 { du: display@feb00000 {
compatible = "renesas,du-r8a7743"; compatible = "renesas,du-r8a7743";
reg = <0 0xfeb00000 0 0x40000>, reg = <0 0xfeb00000 0 0x40000>;
<0 0xfeb90000 0 0x1c>;
reg-names = "du", "lvds.0";
interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>, interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>; <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 724>, clocks = <&cpg CPG_MOD 724>,
<&cpg CPG_MOD 723>, <&cpg CPG_MOD 723>;
<&cpg CPG_MOD 726>; clock-names = "du.0", "du.1";
clock-names = "du.0", "du.1", "lvds.0";
status = "disabled"; status = "disabled";
ports { ports {
@ -1704,6 +1701,33 @@
port@1 { port@1 {
reg = <1>; reg = <1>;
du_out_lvds0: endpoint { du_out_lvds0: endpoint {
remote-endpoint = <&lvds0_in>;
};
};
};
};
lvds0: lvds@feb90000 {
compatible = "renesas,r8a7743-lvds";
reg = <0 0xfeb90000 0 0x1c>;
clocks = <&cpg CPG_MOD 726>;
power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
resets = <&cpg 726>;
status = "disabled";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
lvds0_in: endpoint {
remote-endpoint = <&du_out_lvds0>;
};
};
port@1 {
reg = <1>;
lvds0_out: endpoint {
}; };
}; };
}; };

View File

@ -216,6 +216,7 @@
#clock-cells = <0>; #clock-cells = <0>;
compatible = "fixed-clock"; compatible = "fixed-clock";
clock-frequency = <24000000>; clock-frequency = <24000000>;
clock-output-names = "osc24M";
}; };
osc32k: clk-32k { osc32k: clk-32k {

View File

@ -53,7 +53,7 @@
aliases { aliases {
serial0 = &uart0; serial0 = &uart0;
/* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */ ethernet0 = &emac;
ethernet1 = &sdiowifi; ethernet1 = &sdiowifi;
}; };

View File

@ -110,11 +110,11 @@
bus-num = <3>; bus-num = <3>;
status = "okay"; status = "okay";
spi-slave; spi-slave;
#address-cells = <0>;
slave@0 { slave {
compatible = "lwn,bk4"; compatible = "lwn,bk4";
spi-max-frequency = <30000000>; spi-max-frequency = <30000000>;
reg = <0>;
}; };
}; };

View File

@ -83,7 +83,7 @@ static void __iomem *cns3xxx_pci_map_bus(struct pci_bus *bus,
} else /* remote PCI bus */ } else /* remote PCI bus */
base = cnspci->cfg1_regs + ((busno & 0xf) << 20); base = cnspci->cfg1_regs + ((busno & 0xf) << 20);
return base + (where & 0xffc) + (devfn << 12); return base + where + (devfn << 12);
} }
static int cns3xxx_pci_read_config(struct pci_bus *bus, unsigned int devfn, static int cns3xxx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
@ -93,7 +93,7 @@ static int cns3xxx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
u32 mask = (0x1ull << (size * 8)) - 1; u32 mask = (0x1ull << (size * 8)) - 1;
int shift = (where % 4) * 8; int shift = (where % 4) * 8;
ret = pci_generic_config_read32(bus, devfn, where, size, val); ret = pci_generic_config_read(bus, devfn, where, size, val);
if (ret == PCIBIOS_SUCCESSFUL && !bus->number && !devfn && if (ret == PCIBIOS_SUCCESSFUL && !bus->number && !devfn &&
(where & 0xffc) == PCI_CLASS_REVISION) (where & 0xffc) == PCI_CLASS_REVISION)

View File

@ -75,8 +75,7 @@ void __init n2100_map_io(void)
/* /*
* N2100 PCI. * N2100 PCI.
*/ */
static int __init static int n2100_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
n2100_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int irq; int irq;

View File

@ -3,6 +3,7 @@
#include <linux/suspend.h> #include <linux/suspend.h>
#include <asm/suspend.h> #include <asm/suspend.h>
#include "smc.h" #include "smc.h"
#include "pm.h"
static int tango_pm_powerdown(unsigned long arg) static int tango_pm_powerdown(unsigned long arg)
{ {
@ -24,10 +25,7 @@ static const struct platform_suspend_ops tango_pm_ops = {
.valid = suspend_valid_only_mem, .valid = suspend_valid_only_mem,
}; };
static int __init tango_pm_init(void) void __init tango_pm_init(void)
{ {
suspend_set_ops(&tango_pm_ops); suspend_set_ops(&tango_pm_ops);
return 0;
} }
late_initcall(tango_pm_init);

View File

@ -0,0 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef CONFIG_SUSPEND
void __init tango_pm_init(void);
#else
#define tango_pm_init NULL
#endif

View File

@ -2,6 +2,7 @@
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/hardware/cache-l2x0.h> #include <asm/hardware/cache-l2x0.h>
#include "smc.h" #include "smc.h"
#include "pm.h"
static void tango_l2c_write(unsigned long val, unsigned int reg) static void tango_l2c_write(unsigned long val, unsigned int reg)
{ {
@ -15,4 +16,5 @@ DT_MACHINE_START(TANGO_DT, "Sigma Tango DT")
.dt_compat = tango_dt_compat, .dt_compat = tango_dt_compat,
.l2c_aux_mask = ~0, .l2c_aux_mask = ~0,
.l2c_write_sec = tango_l2c_write, .l2c_write_sec = tango_l2c_write,
.init_late = tango_pm_init,
MACHINE_END MACHINE_END

View File

@ -190,8 +190,6 @@ static int pxa_ssp_remove(struct platform_device *pdev)
if (ssp == NULL) if (ssp == NULL)
return -ENODEV; return -ENODEV;
iounmap(ssp->mmio_base);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
release_mem_region(res->start, resource_size(res)); release_mem_region(res->start, resource_size(res));
@ -201,7 +199,6 @@ static int pxa_ssp_remove(struct platform_device *pdev)
list_del(&ssp->node); list_del(&ssp->node);
mutex_unlock(&ssp_lock); mutex_unlock(&ssp_lock);
kfree(ssp);
return 0; return 0;
} }

View File

@ -7,7 +7,6 @@
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/dma-mapping.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/swiotlb.h> #include <linux/swiotlb.h>

View File

@ -188,6 +188,7 @@
reg = <0x3a3>; reg = <0x3a3>;
interrupt-parent = <&r_intc>; interrupt-parent = <&r_intc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
}; };
}; };

View File

@ -390,7 +390,7 @@
}; };
video-codec@1c0e000 { video-codec@1c0e000 {
compatible = "allwinner,sun50i-h5-video-engine"; compatible = "allwinner,sun50i-a64-video-engine";
reg = <0x01c0e000 0x1000>; reg = <0x01c0e000 0x1000>;
clocks = <&ccu CLK_BUS_VE>, <&ccu CLK_VE>, clocks = <&ccu CLK_BUS_VE>, <&ccu CLK_VE>,
<&ccu CLK_DRAM_VE>; <&ccu CLK_DRAM_VE>;

View File

@ -187,8 +187,7 @@
max-frequency = <100000000>; max-frequency = <100000000>;
disable-wp; disable-wp;
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
cd-inverted;
vmmc-supply = <&vddao_3v3>; vmmc-supply = <&vddao_3v3>;
vqmmc-supply = <&vddio_boot>; vqmmc-supply = <&vddio_boot>;

View File

@ -305,8 +305,7 @@
max-frequency = <200000000>; max-frequency = <200000000>;
disable-wp; disable-wp;
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
cd-inverted;
vmmc-supply = <&vddio_ao3v3>; vmmc-supply = <&vddio_ao3v3>;
vqmmc-supply = <&vddio_tf>; vqmmc-supply = <&vddio_tf>;

View File

@ -238,8 +238,7 @@
max-frequency = <100000000>; max-frequency = <100000000>;
disable-wp; disable-wp;
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
cd-inverted;
vmmc-supply = <&vddao_3v3>; vmmc-supply = <&vddao_3v3>;
vqmmc-supply = <&vddio_card>; vqmmc-supply = <&vddio_card>;

View File

@ -258,8 +258,7 @@
max-frequency = <100000000>; max-frequency = <100000000>;
disable-wp; disable-wp;
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
cd-inverted;
vmmc-supply = <&tflash_vdd>; vmmc-supply = <&tflash_vdd>;
vqmmc-supply = <&tf_io>; vqmmc-supply = <&tf_io>;

View File

@ -196,8 +196,7 @@
max-frequency = <100000000>; max-frequency = <100000000>;
disable-wp; disable-wp;
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
cd-inverted;
vmmc-supply = <&vddao_3v3>; vmmc-supply = <&vddao_3v3>;
vqmmc-supply = <&vddio_card>; vqmmc-supply = <&vddio_card>;

View File

@ -154,8 +154,7 @@
max-frequency = <100000000>; max-frequency = <100000000>;
disable-wp; disable-wp;
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
cd-inverted;
vmmc-supply = <&vcc_3v3>; vmmc-supply = <&vcc_3v3>;
}; };

View File

@ -211,8 +211,7 @@
max-frequency = <100000000>; max-frequency = <100000000>;
disable-wp; disable-wp;
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
cd-inverted;
vmmc-supply = <&vddao_3v3>; vmmc-supply = <&vddao_3v3>;
vqmmc-supply = <&vcc_3v3>; vqmmc-supply = <&vcc_3v3>;

View File

@ -131,8 +131,7 @@
max-frequency = <100000000>; max-frequency = <100000000>;
disable-wp; disable-wp;
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
cd-inverted;
vmmc-supply = <&vddao_3v3>; vmmc-supply = <&vddao_3v3>;
vqmmc-supply = <&vddio_card>; vqmmc-supply = <&vddio_card>;

View File

@ -238,8 +238,7 @@
max-frequency = <100000000>; max-frequency = <100000000>;
disable-wp; disable-wp;
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
cd-inverted;
vmmc-supply = <&vcc_3v3>; vmmc-supply = <&vcc_3v3>;
vqmmc-supply = <&vcc_card>; vqmmc-supply = <&vcc_card>;

View File

@ -183,8 +183,7 @@
max-frequency = <100000000>; max-frequency = <100000000>;
disable-wp; disable-wp;
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
cd-inverted;
vmmc-supply = <&vddao_3v3>; vmmc-supply = <&vddao_3v3>;
vqmmc-supply = <&vddio_card>; vqmmc-supply = <&vddio_card>;

View File

@ -137,8 +137,7 @@
max-frequency = <100000000>; max-frequency = <100000000>;
disable-wp; disable-wp;
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
cd-inverted;
vmmc-supply = <&vddao_3v3>; vmmc-supply = <&vddao_3v3>;
vqmmc-supply = <&vddio_boot>; vqmmc-supply = <&vddio_boot>;

View File

@ -356,8 +356,7 @@
max-frequency = <100000000>; max-frequency = <100000000>;
disable-wp; disable-wp;
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
cd-inverted;
vmmc-supply = <&vddao_3v3>; vmmc-supply = <&vddao_3v3>;
vqmmc-supply = <&vddio_boot>; vqmmc-supply = <&vddio_boot>;

View File

@ -147,8 +147,7 @@
max-frequency = <100000000>; max-frequency = <100000000>;
disable-wp; disable-wp;
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
cd-inverted;
vmmc-supply = <&vddao_3v3>; vmmc-supply = <&vddao_3v3>;
vqmmc-supply = <&vddio_boot>; vqmmc-supply = <&vddio_boot>;

View File

@ -170,8 +170,7 @@
max-frequency = <100000000>; max-frequency = <100000000>;
disable-wp; disable-wp;
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
cd-inverted;
vmmc-supply = <&vddao_3v3>; vmmc-supply = <&vddao_3v3>;
vqmmc-supply = <&vddio_boot>; vqmmc-supply = <&vddio_boot>;

View File

@ -404,7 +404,7 @@
}; };
intc: interrupt-controller@9bc0000 { intc: interrupt-controller@9bc0000 {
compatible = "arm,gic-v3"; compatible = "qcom,msm8996-gic-v3", "arm,gic-v3";
#interrupt-cells = <3>; #interrupt-cells = <3>;
interrupt-controller; interrupt-controller;
#redistributor-regions = <1>; #redistributor-regions = <1>;

View File

@ -1011,6 +1011,9 @@
<&cpg CPG_CORE R8A774A1_CLK_S3D1>, <&cpg CPG_CORE R8A774A1_CLK_S3D1>,
<&scif_clk>; <&scif_clk>;
clock-names = "fck", "brg_int", "scif_clk"; clock-names = "fck", "brg_int", "scif_clk";
dmas = <&dmac1 0x13>, <&dmac1 0x12>,
<&dmac2 0x13>, <&dmac2 0x12>;
dma-names = "tx", "rx", "tx", "rx";
power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>; power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
resets = <&cpg 310>; resets = <&cpg 310>;
status = "disabled"; status = "disabled";

View File

@ -1262,6 +1262,9 @@
<&cpg CPG_CORE R8A7796_CLK_S3D1>, <&cpg CPG_CORE R8A7796_CLK_S3D1>,
<&scif_clk>; <&scif_clk>;
clock-names = "fck", "brg_int", "scif_clk"; clock-names = "fck", "brg_int", "scif_clk";
dmas = <&dmac1 0x13>, <&dmac1 0x12>,
<&dmac2 0x13>, <&dmac2 0x12>;
dma-names = "tx", "rx", "tx", "rx";
power-domains = <&sysc R8A7796_PD_ALWAYS_ON>; power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
resets = <&cpg 310>; resets = <&cpg 310>;
status = "disabled"; status = "disabled";

View File

@ -1068,6 +1068,9 @@
<&cpg CPG_CORE R8A77965_CLK_S3D1>, <&cpg CPG_CORE R8A77965_CLK_S3D1>,
<&scif_clk>; <&scif_clk>;
clock-names = "fck", "brg_int", "scif_clk"; clock-names = "fck", "brg_int", "scif_clk";
dmas = <&dmac1 0x13>, <&dmac1 0x12>,
<&dmac2 0x13>, <&dmac2 0x12>;
dma-names = "tx", "rx", "tx", "rx";
power-domains = <&sysc R8A77965_PD_ALWAYS_ON>; power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
resets = <&cpg 310>; resets = <&cpg 310>;
status = "disabled"; status = "disabled";

View File

@ -299,8 +299,10 @@ int swsusp_arch_suspend(void)
dcache_clean_range(__idmap_text_start, __idmap_text_end); dcache_clean_range(__idmap_text_start, __idmap_text_end);
/* Clean kvm setup code to PoC? */ /* Clean kvm setup code to PoC? */
if (el2_reset_needed()) if (el2_reset_needed()) {
dcache_clean_range(__hyp_idmap_text_start, __hyp_idmap_text_end); dcache_clean_range(__hyp_idmap_text_start, __hyp_idmap_text_end);
dcache_clean_range(__hyp_text_start, __hyp_text_end);
}
/* make the crash dump kernel image protected again */ /* make the crash dump kernel image protected again */
crash_post_resume(); crash_post_resume();

View File

@ -28,6 +28,8 @@
#include <asm/virt.h> #include <asm/virt.h>
.text .text
.pushsection .hyp.text, "ax"
.align 11 .align 11
ENTRY(__hyp_stub_vectors) ENTRY(__hyp_stub_vectors)

View File

@ -88,6 +88,7 @@ u64 __init kaslr_early_init(u64 dt_phys)
* we end up running with module randomization disabled. * we end up running with module randomization disabled.
*/ */
module_alloc_base = (u64)_etext - MODULES_VSIZE; module_alloc_base = (u64)_etext - MODULES_VSIZE;
__flush_dcache_area(&module_alloc_base, sizeof(module_alloc_base));
/* /*
* Try to map the FDT early. If this fails, we simply bail, * Try to map the FDT early. If this fails, we simply bail,

View File

@ -120,10 +120,12 @@ static int create_dtb(struct kimage *image,
{ {
void *buf; void *buf;
size_t buf_size; size_t buf_size;
size_t cmdline_len;
int ret; int ret;
cmdline_len = cmdline ? strlen(cmdline) : 0;
buf_size = fdt_totalsize(initial_boot_params) buf_size = fdt_totalsize(initial_boot_params)
+ strlen(cmdline) + DTB_EXTRA_SPACE; + cmdline_len + DTB_EXTRA_SPACE;
for (;;) { for (;;) {
buf = vmalloc(buf_size); buf = vmalloc(buf_size);

View File

@ -478,13 +478,13 @@ bool arch_within_kprobe_blacklist(unsigned long addr)
addr < (unsigned long)__entry_text_end) || addr < (unsigned long)__entry_text_end) ||
(addr >= (unsigned long)__idmap_text_start && (addr >= (unsigned long)__idmap_text_start &&
addr < (unsigned long)__idmap_text_end) || addr < (unsigned long)__idmap_text_end) ||
(addr >= (unsigned long)__hyp_text_start &&
addr < (unsigned long)__hyp_text_end) ||
!!search_exception_tables(addr)) !!search_exception_tables(addr))
return true; return true;
if (!is_kernel_in_hyp_mode()) { if (!is_kernel_in_hyp_mode()) {
if ((addr >= (unsigned long)__hyp_text_start && if ((addr >= (unsigned long)__hyp_idmap_text_start &&
addr < (unsigned long)__hyp_text_end) ||
(addr >= (unsigned long)__hyp_idmap_text_start &&
addr < (unsigned long)__hyp_idmap_text_end)) addr < (unsigned long)__hyp_idmap_text_end))
return true; return true;
} }

View File

@ -286,74 +286,73 @@ static void note_page(struct pg_state *st, unsigned long addr, unsigned level,
} }
static void walk_pte(struct pg_state *st, pmd_t *pmdp, unsigned long start) static void walk_pte(struct pg_state *st, pmd_t *pmdp, unsigned long start,
unsigned long end)
{ {
pte_t *ptep = pte_offset_kernel(pmdp, 0UL); unsigned long addr = start;
unsigned long addr; pte_t *ptep = pte_offset_kernel(pmdp, start);
unsigned i;
for (i = 0; i < PTRS_PER_PTE; i++, ptep++) { do {
addr = start + i * PAGE_SIZE;
note_page(st, addr, 4, READ_ONCE(pte_val(*ptep))); note_page(st, addr, 4, READ_ONCE(pte_val(*ptep)));
} } while (ptep++, addr += PAGE_SIZE, addr != end);
} }
static void walk_pmd(struct pg_state *st, pud_t *pudp, unsigned long start) static void walk_pmd(struct pg_state *st, pud_t *pudp, unsigned long start,
unsigned long end)
{ {
pmd_t *pmdp = pmd_offset(pudp, 0UL); unsigned long next, addr = start;
unsigned long addr; pmd_t *pmdp = pmd_offset(pudp, start);
unsigned i;
for (i = 0; i < PTRS_PER_PMD; i++, pmdp++) { do {
pmd_t pmd = READ_ONCE(*pmdp); pmd_t pmd = READ_ONCE(*pmdp);
next = pmd_addr_end(addr, end);
addr = start + i * PMD_SIZE;
if (pmd_none(pmd) || pmd_sect(pmd)) { if (pmd_none(pmd) || pmd_sect(pmd)) {
note_page(st, addr, 3, pmd_val(pmd)); note_page(st, addr, 3, pmd_val(pmd));
} else { } else {
BUG_ON(pmd_bad(pmd)); BUG_ON(pmd_bad(pmd));
walk_pte(st, pmdp, addr); walk_pte(st, pmdp, addr, next);
} }
} } while (pmdp++, addr = next, addr != end);
} }
static void walk_pud(struct pg_state *st, pgd_t *pgdp, unsigned long start) static void walk_pud(struct pg_state *st, pgd_t *pgdp, unsigned long start,
unsigned long end)
{ {
pud_t *pudp = pud_offset(pgdp, 0UL); unsigned long next, addr = start;
unsigned long addr; pud_t *pudp = pud_offset(pgdp, start);
unsigned i;
for (i = 0; i < PTRS_PER_PUD; i++, pudp++) { do {
pud_t pud = READ_ONCE(*pudp); pud_t pud = READ_ONCE(*pudp);
next = pud_addr_end(addr, end);
addr = start + i * PUD_SIZE;
if (pud_none(pud) || pud_sect(pud)) { if (pud_none(pud) || pud_sect(pud)) {
note_page(st, addr, 2, pud_val(pud)); note_page(st, addr, 2, pud_val(pud));
} else { } else {
BUG_ON(pud_bad(pud)); BUG_ON(pud_bad(pud));
walk_pmd(st, pudp, addr); walk_pmd(st, pudp, addr, next);
} }
} } while (pudp++, addr = next, addr != end);
} }
static void walk_pgd(struct pg_state *st, struct mm_struct *mm, static void walk_pgd(struct pg_state *st, struct mm_struct *mm,
unsigned long start) unsigned long start)
{ {
pgd_t *pgdp = pgd_offset(mm, 0UL); unsigned long end = (start < TASK_SIZE_64) ? TASK_SIZE_64 : 0;
unsigned i; unsigned long next, addr = start;
unsigned long addr; pgd_t *pgdp = pgd_offset(mm, start);
for (i = 0; i < PTRS_PER_PGD; i++, pgdp++) { do {
pgd_t pgd = READ_ONCE(*pgdp); pgd_t pgd = READ_ONCE(*pgdp);
next = pgd_addr_end(addr, end);
addr = start + i * PGDIR_SIZE;
if (pgd_none(pgd)) { if (pgd_none(pgd)) {
note_page(st, addr, 1, pgd_val(pgd)); note_page(st, addr, 1, pgd_val(pgd));
} else { } else {
BUG_ON(pgd_bad(pgd)); BUG_ON(pgd_bad(pgd));
walk_pud(st, pgdp, addr); walk_pud(st, pgdp, addr, next);
} }
} } while (pgdp++, addr = next, addr != end);
} }
void ptdump_walk_pgd(struct seq_file *m, struct ptdump_info *info) void ptdump_walk_pgd(struct seq_file *m, struct ptdump_info *info)

View File

@ -33,7 +33,11 @@ void sync_icache_aliases(void *kaddr, unsigned long len)
__clean_dcache_area_pou(kaddr, len); __clean_dcache_area_pou(kaddr, len);
__flush_icache_all(); __flush_icache_all();
} else { } else {
flush_icache_range(addr, addr + len); /*
* Don't issue kick_all_cpus_sync() after I-cache invalidation
* for user mappings.
*/
__flush_icache_range(addr, addr + len);
} }
} }

View File

@ -30,6 +30,7 @@ generic-y += pgalloc.h
generic-y += preempt.h generic-y += preempt.h
generic-y += segment.h generic-y += segment.h
generic-y += serial.h generic-y += serial.h
generic-y += shmparam.h
generic-y += tlbflush.h generic-y += tlbflush.h
generic-y += topology.h generic-y += topology.h
generic-y += trace_clock.h generic-y += trace_clock.h

View File

@ -1,5 +1,4 @@
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generic-y += kvm_para.h generic-y += kvm_para.h
generic-y += shmparam.h
generic-y += ucontext.h generic-y += ucontext.h

View File

@ -40,6 +40,7 @@ generic-y += preempt.h
generic-y += scatterlist.h generic-y += scatterlist.h
generic-y += sections.h generic-y += sections.h
generic-y += serial.h generic-y += serial.h
generic-y += shmparam.h
generic-y += sizes.h generic-y += sizes.h
generic-y += spinlock.h generic-y += spinlock.h
generic-y += timex.h generic-y += timex.h

View File

@ -1,5 +1,4 @@
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generic-y += kvm_para.h generic-y += kvm_para.h
generic-y += shmparam.h
generic-y += ucontext.h generic-y += ucontext.h

View File

@ -30,6 +30,7 @@ generic-y += rwsem.h
generic-y += sections.h generic-y += sections.h
generic-y += segment.h generic-y += segment.h
generic-y += serial.h generic-y += serial.h
generic-y += shmparam.h
generic-y += sizes.h generic-y += sizes.h
generic-y += topology.h generic-y += topology.h
generic-y += trace_clock.h generic-y += trace_clock.h

View File

@ -1,4 +1,3 @@
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generic-y += shmparam.h
generic-y += ucontext.h generic-y += ucontext.h

View File

@ -155,18 +155,22 @@ out:
static int __init nfhd_init(void) static int __init nfhd_init(void)
{ {
u32 blocks, bsize; u32 blocks, bsize;
int ret;
int i; int i;
nfhd_id = nf_get_id("XHDI"); nfhd_id = nf_get_id("XHDI");
if (!nfhd_id) if (!nfhd_id)
return -ENODEV; return -ENODEV;
major_num = register_blkdev(major_num, "nfhd"); ret = register_blkdev(major_num, "nfhd");
if (major_num <= 0) { if (ret < 0) {
pr_warn("nfhd: unable to get major number\n"); pr_warn("nfhd: unable to get major number\n");
return major_num; return ret;
} }
if (!major_num)
major_num = ret;
for (i = NFHD_DEV_OFFSET; i < 24; i++) { for (i = NFHD_DEV_OFFSET; i < 24; i++) {
if (nfhd_get_capacity(i, 0, &blocks, &bsize)) if (nfhd_get_capacity(i, 0, &blocks, &bsize))
continue; continue;

View File

@ -20,6 +20,7 @@ generic-y += mm-arch-hooks.h
generic-y += percpu.h generic-y += percpu.h
generic-y += preempt.h generic-y += preempt.h
generic-y += sections.h generic-y += sections.h
generic-y += shmparam.h
generic-y += spinlock.h generic-y += spinlock.h
generic-y += topology.h generic-y += topology.h
generic-y += trace_clock.h generic-y += trace_clock.h

View File

@ -2,4 +2,3 @@ include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd_32.h generated-y += unistd_32.h
generic-y += kvm_para.h generic-y += kvm_para.h
generic-y += shmparam.h

View File

@ -26,6 +26,7 @@ generic-y += parport.h
generic-y += percpu.h generic-y += percpu.h
generic-y += preempt.h generic-y += preempt.h
generic-y += serial.h generic-y += serial.h
generic-y += shmparam.h
generic-y += syscalls.h generic-y += syscalls.h
generic-y += topology.h generic-y += topology.h
generic-y += trace_clock.h generic-y += trace_clock.h

View File

@ -2,5 +2,4 @@ include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd_32.h generated-y += unistd_32.h
generic-y += kvm_para.h generic-y += kvm_para.h
generic-y += shmparam.h
generic-y += ucontext.h generic-y += ucontext.h

View File

@ -1403,6 +1403,21 @@ config LOONGSON3_ENHANCEMENT
please say 'N' here. If you want a high-performance kernel to run on please say 'N' here. If you want a high-performance kernel to run on
new Loongson 3 machines only, please say 'Y' here. new Loongson 3 machines only, please say 'Y' here.
config CPU_LOONGSON3_WORKAROUNDS
bool "Old Loongson 3 LLSC Workarounds"
default y if SMP
depends on CPU_LOONGSON3
help
Loongson 3 processors have the llsc issues which require workarounds.
Without workarounds the system may hang unexpectedly.
Newer Loongson 3 will fix these issues and no workarounds are needed.
The workarounds have no significant side effect on them but may
decrease the performance of the system so this option should be
disabled unless the kernel is intended to be run on old systems.
If unsure, please say Y.
config CPU_LOONGSON2E config CPU_LOONGSON2E
bool "Loongson 2E" bool "Loongson 2E"
depends on SYS_HAS_CPU_LOONGSON2E depends on SYS_HAS_CPU_LOONGSON2E

View File

@ -76,7 +76,7 @@
status = "okay"; status = "okay";
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pins_uart2>; pinctrl-0 = <&pins_uart3>;
}; };
&uart4 { &uart4 {
@ -196,9 +196,9 @@
bias-disable; bias-disable;
}; };
pins_uart2: uart2 { pins_uart3: uart3 {
function = "uart2"; function = "uart3";
groups = "uart2-data", "uart2-hwflow"; groups = "uart3-data", "uart3-hwflow";
bias-disable; bias-disable;
}; };

View File

@ -161,7 +161,7 @@
#dma-cells = <2>; #dma-cells = <2>;
interrupt-parent = <&intc>; interrupt-parent = <&intc>;
interrupts = <29>; interrupts = <20>;
clocks = <&cgu JZ4740_CLK_DMA>; clocks = <&cgu JZ4740_CLK_DMA>;

View File

@ -90,11 +90,11 @@
interrupts = <0>; interrupts = <0>;
}; };
axi_i2c: i2c@10A00000 { axi_i2c: i2c@10a00000 {
compatible = "xlnx,xps-iic-2.00.a"; compatible = "xlnx,xps-iic-2.00.a";
interrupt-parent = <&axi_intc>; interrupt-parent = <&axi_intc>;
interrupts = <4>; interrupts = <4>;
reg = < 0x10A00000 0x10000 >; reg = < 0x10a00000 0x10000 >;
clocks = <&ext>; clocks = <&ext>;
xlnx,clk-freq = <0x5f5e100>; xlnx,clk-freq = <0x5f5e100>;
xlnx,family = "Artix7"; xlnx,family = "Artix7";
@ -106,9 +106,9 @@
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
ad7420@4B { ad7420@4b {
compatible = "adi,adt7420"; compatible = "adi,adt7420";
reg = <0x4B>; reg = <0x4b>;
}; };
} ; } ;
}; };

View File

@ -58,6 +58,7 @@ static __inline__ void atomic_##op(int i, atomic_t * v) \
if (kernel_uses_llsc) { \ if (kernel_uses_llsc) { \
int temp; \ int temp; \
\ \
loongson_llsc_mb(); \
__asm__ __volatile__( \ __asm__ __volatile__( \
" .set push \n" \ " .set push \n" \
" .set "MIPS_ISA_LEVEL" \n" \ " .set "MIPS_ISA_LEVEL" \n" \
@ -85,6 +86,7 @@ static __inline__ int atomic_##op##_return_relaxed(int i, atomic_t * v) \
if (kernel_uses_llsc) { \ if (kernel_uses_llsc) { \
int temp; \ int temp; \
\ \
loongson_llsc_mb(); \
__asm__ __volatile__( \ __asm__ __volatile__( \
" .set push \n" \ " .set push \n" \
" .set "MIPS_ISA_LEVEL" \n" \ " .set "MIPS_ISA_LEVEL" \n" \
@ -118,6 +120,7 @@ static __inline__ int atomic_fetch_##op##_relaxed(int i, atomic_t * v) \
if (kernel_uses_llsc) { \ if (kernel_uses_llsc) { \
int temp; \ int temp; \
\ \
loongson_llsc_mb(); \
__asm__ __volatile__( \ __asm__ __volatile__( \
" .set push \n" \ " .set push \n" \
" .set "MIPS_ISA_LEVEL" \n" \ " .set "MIPS_ISA_LEVEL" \n" \
@ -256,6 +259,7 @@ static __inline__ void atomic64_##op(long i, atomic64_t * v) \
if (kernel_uses_llsc) { \ if (kernel_uses_llsc) { \
long temp; \ long temp; \
\ \
loongson_llsc_mb(); \
__asm__ __volatile__( \ __asm__ __volatile__( \
" .set push \n" \ " .set push \n" \
" .set "MIPS_ISA_LEVEL" \n" \ " .set "MIPS_ISA_LEVEL" \n" \
@ -283,6 +287,7 @@ static __inline__ long atomic64_##op##_return_relaxed(long i, atomic64_t * v) \
if (kernel_uses_llsc) { \ if (kernel_uses_llsc) { \
long temp; \ long temp; \
\ \
loongson_llsc_mb(); \
__asm__ __volatile__( \ __asm__ __volatile__( \
" .set push \n" \ " .set push \n" \
" .set "MIPS_ISA_LEVEL" \n" \ " .set "MIPS_ISA_LEVEL" \n" \
@ -316,6 +321,7 @@ static __inline__ long atomic64_fetch_##op##_relaxed(long i, atomic64_t * v) \
if (kernel_uses_llsc) { \ if (kernel_uses_llsc) { \
long temp; \ long temp; \
\ \
loongson_llsc_mb(); \
__asm__ __volatile__( \ __asm__ __volatile__( \
" .set push \n" \ " .set push \n" \
" .set "MIPS_ISA_LEVEL" \n" \ " .set "MIPS_ISA_LEVEL" \n" \

View File

@ -222,6 +222,42 @@
#define __smp_mb__before_atomic() __smp_mb__before_llsc() #define __smp_mb__before_atomic() __smp_mb__before_llsc()
#define __smp_mb__after_atomic() smp_llsc_mb() #define __smp_mb__after_atomic() smp_llsc_mb()
/*
* Some Loongson 3 CPUs have a bug wherein execution of a memory access (load,
* store or pref) in between an ll & sc can cause the sc instruction to
* erroneously succeed, breaking atomicity. Whilst it's unusual to write code
* containing such sequences, this bug bites harder than we might otherwise
* expect due to reordering & speculation:
*
* 1) A memory access appearing prior to the ll in program order may actually
* be executed after the ll - this is the reordering case.
*
* In order to avoid this we need to place a memory barrier (ie. a sync
* instruction) prior to every ll instruction, in between it & any earlier
* memory access instructions. Many of these cases are already covered by
* smp_mb__before_llsc() but for the remaining cases, typically ones in
* which multiple CPUs may operate on a memory location but ordering is not
* usually guaranteed, we use loongson_llsc_mb() below.
*
* This reordering case is fixed by 3A R2 CPUs, ie. 3A2000 models and later.
*
* 2) If a conditional branch exists between an ll & sc with a target outside
* of the ll-sc loop, for example an exit upon value mismatch in cmpxchg()
* or similar, then misprediction of the branch may allow speculative
* execution of memory accesses from outside of the ll-sc loop.
*
* In order to avoid this we need a memory barrier (ie. a sync instruction)
* at each affected branch target, for which we also use loongson_llsc_mb()
* defined below.
*
* This case affects all current Loongson 3 CPUs.
*/
#ifdef CONFIG_CPU_LOONGSON3_WORKAROUNDS /* Loongson-3's LLSC workaround */
#define loongson_llsc_mb() __asm__ __volatile__(__WEAK_LLSC_MB : : :"memory")
#else
#define loongson_llsc_mb() do { } while (0)
#endif
#include <asm-generic/barrier.h> #include <asm-generic/barrier.h>
#endif /* __ASM_BARRIER_H */ #endif /* __ASM_BARRIER_H */

View File

@ -69,6 +69,7 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr)
: "ir" (1UL << bit), GCC_OFF_SMALL_ASM() (*m)); : "ir" (1UL << bit), GCC_OFF_SMALL_ASM() (*m));
#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6) #if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6)
} else if (kernel_uses_llsc && __builtin_constant_p(bit)) { } else if (kernel_uses_llsc && __builtin_constant_p(bit)) {
loongson_llsc_mb();
do { do {
__asm__ __volatile__( __asm__ __volatile__(
" " __LL "%0, %1 # set_bit \n" " " __LL "%0, %1 # set_bit \n"
@ -79,6 +80,7 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr)
} while (unlikely(!temp)); } while (unlikely(!temp));
#endif /* CONFIG_CPU_MIPSR2 || CONFIG_CPU_MIPSR6 */ #endif /* CONFIG_CPU_MIPSR2 || CONFIG_CPU_MIPSR6 */
} else if (kernel_uses_llsc) { } else if (kernel_uses_llsc) {
loongson_llsc_mb();
do { do {
__asm__ __volatile__( __asm__ __volatile__(
" .set push \n" " .set push \n"
@ -123,6 +125,7 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr)
: "ir" (~(1UL << bit))); : "ir" (~(1UL << bit)));
#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6) #if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6)
} else if (kernel_uses_llsc && __builtin_constant_p(bit)) { } else if (kernel_uses_llsc && __builtin_constant_p(bit)) {
loongson_llsc_mb();
do { do {
__asm__ __volatile__( __asm__ __volatile__(
" " __LL "%0, %1 # clear_bit \n" " " __LL "%0, %1 # clear_bit \n"
@ -133,6 +136,7 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr)
} while (unlikely(!temp)); } while (unlikely(!temp));
#endif /* CONFIG_CPU_MIPSR2 || CONFIG_CPU_MIPSR6 */ #endif /* CONFIG_CPU_MIPSR2 || CONFIG_CPU_MIPSR6 */
} else if (kernel_uses_llsc) { } else if (kernel_uses_llsc) {
loongson_llsc_mb();
do { do {
__asm__ __volatile__( __asm__ __volatile__(
" .set push \n" " .set push \n"
@ -193,6 +197,7 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr)
unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG);
unsigned long temp; unsigned long temp;
loongson_llsc_mb();
do { do {
__asm__ __volatile__( __asm__ __volatile__(
" .set push \n" " .set push \n"

View File

@ -50,6 +50,7 @@
"i" (-EFAULT) \ "i" (-EFAULT) \
: "memory"); \ : "memory"); \
} else if (cpu_has_llsc) { \ } else if (cpu_has_llsc) { \
loongson_llsc_mb(); \
__asm__ __volatile__( \ __asm__ __volatile__( \
" .set push \n" \ " .set push \n" \
" .set noat \n" \ " .set noat \n" \
@ -163,6 +164,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
"i" (-EFAULT) "i" (-EFAULT)
: "memory"); : "memory");
} else if (cpu_has_llsc) { } else if (cpu_has_llsc) {
loongson_llsc_mb();
__asm__ __volatile__( __asm__ __volatile__(
"# futex_atomic_cmpxchg_inatomic \n" "# futex_atomic_cmpxchg_inatomic \n"
" .set push \n" " .set push \n"
@ -192,6 +194,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
: GCC_OFF_SMALL_ASM() (*uaddr), "Jr" (oldval), "Jr" (newval), : GCC_OFF_SMALL_ASM() (*uaddr), "Jr" (oldval), "Jr" (newval),
"i" (-EFAULT) "i" (-EFAULT)
: "memory"); : "memory");
loongson_llsc_mb();
} else } else
return -ENOSYS; return -ENOSYS;

View File

@ -228,6 +228,7 @@ static inline void set_pte(pte_t *ptep, pte_t pteval)
: [buddy] "+m" (buddy->pte), [tmp] "=&r" (tmp) : [buddy] "+m" (buddy->pte), [tmp] "=&r" (tmp)
: [global] "r" (page_global)); : [global] "r" (page_global));
} else if (kernel_uses_llsc) { } else if (kernel_uses_llsc) {
loongson_llsc_mb();
__asm__ __volatile__ ( __asm__ __volatile__ (
" .set push \n" " .set push \n"
" .set "MIPS_ISA_ARCH_LEVEL" \n" " .set "MIPS_ISA_ARCH_LEVEL" \n"
@ -242,6 +243,7 @@ static inline void set_pte(pte_t *ptep, pte_t pteval)
" .set pop \n" " .set pop \n"
: [buddy] "+m" (buddy->pte), [tmp] "=&r" (tmp) : [buddy] "+m" (buddy->pte), [tmp] "=&r" (tmp)
: [global] "r" (page_global)); : [global] "r" (page_global));
loongson_llsc_mb();
} }
#else /* !CONFIG_SMP */ #else /* !CONFIG_SMP */
if (pte_none(*buddy)) if (pte_none(*buddy))

View File

@ -457,5 +457,5 @@ void mips_cm_error_report(void)
} }
/* reprime cause register */ /* reprime cause register */
write_gcr_error_cause(0); write_gcr_error_cause(cm_error);
} }

View File

@ -371,7 +371,7 @@ static inline int is_sp_move_ins(union mips_instruction *ip, int *frame_size)
static int get_frame_info(struct mips_frame_info *info) static int get_frame_info(struct mips_frame_info *info)
{ {
bool is_mmips = IS_ENABLED(CONFIG_CPU_MICROMIPS); bool is_mmips = IS_ENABLED(CONFIG_CPU_MICROMIPS);
union mips_instruction insn, *ip, *ip_end; union mips_instruction insn, *ip;
const unsigned int max_insns = 128; const unsigned int max_insns = 128;
unsigned int last_insn_size = 0; unsigned int last_insn_size = 0;
unsigned int i; unsigned int i;
@ -384,10 +384,9 @@ static int get_frame_info(struct mips_frame_info *info)
if (!ip) if (!ip)
goto err; goto err;
ip_end = (void *)ip + info->func_size; for (i = 0; i < max_insns; i++) {
for (i = 0; i < max_insns && ip < ip_end; i++) {
ip = (void *)ip + last_insn_size; ip = (void *)ip + last_insn_size;
if (is_mmips && mm_insn_16bit(ip->halfword[0])) { if (is_mmips && mm_insn_16bit(ip->halfword[0])) {
insn.word = ip->halfword[0] << 16; insn.word = ip->halfword[0] << 16;
last_insn_size = 2; last_insn_size = 2;

View File

@ -23,6 +23,29 @@ ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS
endif endif
cflags-$(CONFIG_CPU_LOONGSON3) += -Wa,--trap cflags-$(CONFIG_CPU_LOONGSON3) += -Wa,--trap
#
# Some versions of binutils, not currently mainline as of 2019/02/04, support
# an -mfix-loongson3-llsc flag which emits a sync prior to each ll instruction
# to work around a CPU bug (see loongson_llsc_mb() in asm/barrier.h for a
# description).
#
# We disable this in order to prevent the assembler meddling with the
# instruction that labels refer to, ie. if we label an ll instruction:
#
# 1: ll v0, 0(a0)
#
# ...then with the assembler fix applied the label may actually point at a sync
# instruction inserted by the assembler, and if we were using the label in an
# exception table the table would no longer contain the address of the ll
# instruction.
#
# Avoid this by explicitly disabling that assembler behaviour. If upstream
# binutils does not merge support for the flag then we can revisit & remove
# this later - for now it ensures vendor toolchains don't cause problems.
#
cflags-$(CONFIG_CPU_LOONGSON3) += $(call as-option,-Wa$(comma)-mno-fix-loongson3-llsc,)
# #
# binutils from v2.25 on and gcc starting from v4.9.0 treat -march=loongson3a # binutils from v2.25 on and gcc starting from v4.9.0 treat -march=loongson3a
# as MIPS64 R2; older versions as just R1. This leaves the possibility open # as MIPS64 R2; older versions as just R1. This leaves the possibility open

View File

@ -59,7 +59,12 @@ static void loongson_poweroff(void)
{ {
#ifndef CONFIG_LEFI_FIRMWARE_INTERFACE #ifndef CONFIG_LEFI_FIRMWARE_INTERFACE
mach_prepare_shutdown(); mach_prepare_shutdown();
unreachable();
/*
* It needs a wait loop here, but mips/kernel/reset.c already calls
* a generic delay loop, machine_hang(), so simply return.
*/
return;
#else #else
void (*fw_poweroff)(void) = (void *)loongson_sysconf.poweroff_addr; void (*fw_poweroff)(void) = (void *)loongson_sysconf.poweroff_addr;

View File

@ -932,6 +932,8 @@ build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
* to mimic that here by taking a load/istream page * to mimic that here by taking a load/istream page
* fault. * fault.
*/ */
if (IS_ENABLED(CONFIG_CPU_LOONGSON3_WORKAROUNDS))
uasm_i_sync(p, 0);
UASM_i_LA(p, ptr, (unsigned long)tlb_do_page_fault_0); UASM_i_LA(p, ptr, (unsigned long)tlb_do_page_fault_0);
uasm_i_jr(p, ptr); uasm_i_jr(p, ptr);
@ -1646,6 +1648,8 @@ static void
iPTE_LW(u32 **p, unsigned int pte, unsigned int ptr) iPTE_LW(u32 **p, unsigned int pte, unsigned int ptr)
{ {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
if (IS_ENABLED(CONFIG_CPU_LOONGSON3_WORKAROUNDS))
uasm_i_sync(p, 0);
# ifdef CONFIG_PHYS_ADDR_T_64BIT # ifdef CONFIG_PHYS_ADDR_T_64BIT
if (cpu_has_64bits) if (cpu_has_64bits)
uasm_i_lld(p, pte, 0, ptr); uasm_i_lld(p, pte, 0, ptr);
@ -2259,6 +2263,8 @@ static void build_r4000_tlb_load_handler(void)
#endif #endif
uasm_l_nopage_tlbl(&l, p); uasm_l_nopage_tlbl(&l, p);
if (IS_ENABLED(CONFIG_CPU_LOONGSON3_WORKAROUNDS))
uasm_i_sync(&p, 0);
build_restore_work_registers(&p); build_restore_work_registers(&p);
#ifdef CONFIG_CPU_MICROMIPS #ifdef CONFIG_CPU_MICROMIPS
if ((unsigned long)tlb_do_page_fault_0 & 1) { if ((unsigned long)tlb_do_page_fault_0 & 1) {
@ -2313,6 +2319,8 @@ static void build_r4000_tlb_store_handler(void)
#endif #endif
uasm_l_nopage_tlbs(&l, p); uasm_l_nopage_tlbs(&l, p);
if (IS_ENABLED(CONFIG_CPU_LOONGSON3_WORKAROUNDS))
uasm_i_sync(&p, 0);
build_restore_work_registers(&p); build_restore_work_registers(&p);
#ifdef CONFIG_CPU_MICROMIPS #ifdef CONFIG_CPU_MICROMIPS
if ((unsigned long)tlb_do_page_fault_1 & 1) { if ((unsigned long)tlb_do_page_fault_1 & 1) {
@ -2368,6 +2376,8 @@ static void build_r4000_tlb_modify_handler(void)
#endif #endif
uasm_l_nopage_tlbm(&l, p); uasm_l_nopage_tlbm(&l, p);
if (IS_ENABLED(CONFIG_CPU_LOONGSON3_WORKAROUNDS))
uasm_i_sync(&p, 0);
build_restore_work_registers(&p); build_restore_work_registers(&p);
#ifdef CONFIG_CPU_MICROMIPS #ifdef CONFIG_CPU_MICROMIPS
if ((unsigned long)tlb_do_page_fault_1 & 1) { if ((unsigned long)tlb_do_page_fault_1 & 1) {

View File

@ -568,6 +568,11 @@ static int __init octeon_pci_setup(void)
if (octeon_has_feature(OCTEON_FEATURE_PCIE)) if (octeon_has_feature(OCTEON_FEATURE_PCIE))
return 0; return 0;
if (!octeon_is_pci_host()) {
pr_notice("Not in host mode, PCI Controller not initialized\n");
return 0;
}
/* Point pcibios_map_irq() to the PCI version of it */ /* Point pcibios_map_irq() to the PCI version of it */
octeon_pcibios_map_irq = octeon_pci_pcibios_map_irq; octeon_pcibios_map_irq = octeon_pci_pcibios_map_irq;
@ -579,11 +584,6 @@ static int __init octeon_pci_setup(void)
else else
octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_BIG; octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_BIG;
if (!octeon_is_pci_host()) {
pr_notice("Not in host mode, PCI Controller not initialized\n");
return 0;
}
/* PCI I/O and PCI MEM values */ /* PCI I/O and PCI MEM values */
set_io_port_base(OCTEON_PCI_IOSPACE_BASE); set_io_port_base(OCTEON_PCI_IOSPACE_BASE);
ioport_resource.start = 0; ioport_resource.start = 0;

View File

@ -8,6 +8,7 @@ ccflags-vdso := \
$(filter -E%,$(KBUILD_CFLAGS)) \ $(filter -E%,$(KBUILD_CFLAGS)) \
$(filter -mmicromips,$(KBUILD_CFLAGS)) \ $(filter -mmicromips,$(KBUILD_CFLAGS)) \
$(filter -march=%,$(KBUILD_CFLAGS)) \ $(filter -march=%,$(KBUILD_CFLAGS)) \
$(filter -m%-float,$(KBUILD_CFLAGS)) \
-D__VDSO__ -D__VDSO__
ifdef CONFIG_CC_IS_CLANG ifdef CONFIG_CC_IS_CLANG
@ -129,7 +130,7 @@ $(obj)/%-o32.o: $(src)/%.c FORCE
$(call cmd,force_checksrc) $(call cmd,force_checksrc)
$(call if_changed_rule,cc_o_c) $(call if_changed_rule,cc_o_c)
$(obj)/vdso-o32.lds: KBUILD_CPPFLAGS := -mabi=32 $(obj)/vdso-o32.lds: KBUILD_CPPFLAGS := $(ccflags-vdso) -mabi=32
$(obj)/vdso-o32.lds: $(src)/vdso.lds.S FORCE $(obj)/vdso-o32.lds: $(src)/vdso.lds.S FORCE
$(call if_changed_dep,cpp_lds_S) $(call if_changed_dep,cpp_lds_S)
@ -169,7 +170,7 @@ $(obj)/%-n32.o: $(src)/%.c FORCE
$(call cmd,force_checksrc) $(call cmd,force_checksrc)
$(call if_changed_rule,cc_o_c) $(call if_changed_rule,cc_o_c)
$(obj)/vdso-n32.lds: KBUILD_CPPFLAGS := -mabi=n32 $(obj)/vdso-n32.lds: KBUILD_CPPFLAGS := $(ccflags-vdso) -mabi=n32
$(obj)/vdso-n32.lds: $(src)/vdso.lds.S FORCE $(obj)/vdso-n32.lds: $(src)/vdso.lds.S FORCE
$(call if_changed_dep,cpp_lds_S) $(call if_changed_dep,cpp_lds_S)

View File

@ -34,6 +34,7 @@ generic-y += qrwlock_types.h
generic-y += qrwlock.h generic-y += qrwlock.h
generic-y += sections.h generic-y += sections.h
generic-y += segment.h generic-y += segment.h
generic-y += shmparam.h
generic-y += string.h generic-y += string.h
generic-y += switch_to.h generic-y += switch_to.h
generic-y += topology.h generic-y += topology.h

View File

@ -1,5 +1,4 @@
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generic-y += kvm_para.h generic-y += kvm_para.h
generic-y += shmparam.h
generic-y += ucontext.h generic-y += ucontext.h

View File

@ -1258,21 +1258,13 @@ extern pmd_t pmdp_invalidate(struct vm_area_struct *vma, unsigned long address,
#define pmd_move_must_withdraw pmd_move_must_withdraw #define pmd_move_must_withdraw pmd_move_must_withdraw
struct spinlock; struct spinlock;
static inline int pmd_move_must_withdraw(struct spinlock *new_pmd_ptl, extern int pmd_move_must_withdraw(struct spinlock *new_pmd_ptl,
struct spinlock *old_pmd_ptl, struct spinlock *old_pmd_ptl,
struct vm_area_struct *vma) struct vm_area_struct *vma);
{ /*
if (radix_enabled()) * Hash translation mode use the deposited table to store hash pte
return false; * slot information.
/* */
* Archs like ppc64 use pgtable to store per pmd
* specific information. So when we switch the pmd,
* we should also withdraw and deposit the pgtable
*/
return true;
}
#define arch_needs_pgtable_deposit arch_needs_pgtable_deposit #define arch_needs_pgtable_deposit arch_needs_pgtable_deposit
static inline bool arch_needs_pgtable_deposit(void) static inline bool arch_needs_pgtable_deposit(void)
{ {

View File

@ -400,3 +400,25 @@ void arch_report_meminfo(struct seq_file *m)
atomic_long_read(&direct_pages_count[MMU_PAGE_1G]) << 20); atomic_long_read(&direct_pages_count[MMU_PAGE_1G]) << 20);
} }
#endif /* CONFIG_PROC_FS */ #endif /* CONFIG_PROC_FS */
/*
* For hash translation mode, we use the deposited table to store hash slot
* information and they are stored at PTRS_PER_PMD offset from related pmd
* location. Hence a pmd move requires deposit and withdraw.
*
* For radix translation with split pmd ptl, we store the deposited table in the
* pmd page. Hence if we have different pmd page we need to withdraw during pmd
* move.
*
* With hash we use deposited table always irrespective of anon or not.
* With radix we use deposited table only for anonymous mapping.
*/
int pmd_move_must_withdraw(struct spinlock *new_pmd_ptl,
struct spinlock *old_pmd_ptl,
struct vm_area_struct *vma)
{
if (radix_enabled())
return (new_pmd_ptl != old_pmd_ptl) && vma_is_anonymous(vma);
return true;
}

View File

@ -43,6 +43,7 @@ static int drc_pmem_bind(struct papr_scm_priv *p)
{ {
unsigned long ret[PLPAR_HCALL_BUFSIZE]; unsigned long ret[PLPAR_HCALL_BUFSIZE];
uint64_t rc, token; uint64_t rc, token;
uint64_t saved = 0;
/* /*
* When the hypervisor cannot map all the requested memory in a single * When the hypervisor cannot map all the requested memory in a single
@ -56,6 +57,8 @@ static int drc_pmem_bind(struct papr_scm_priv *p)
rc = plpar_hcall(H_SCM_BIND_MEM, ret, p->drc_index, 0, rc = plpar_hcall(H_SCM_BIND_MEM, ret, p->drc_index, 0,
p->blocks, BIND_ANY_ADDR, token); p->blocks, BIND_ANY_ADDR, token);
token = ret[0]; token = ret[0];
if (!saved)
saved = ret[1];
cond_resched(); cond_resched();
} while (rc == H_BUSY); } while (rc == H_BUSY);
@ -64,7 +67,7 @@ static int drc_pmem_bind(struct papr_scm_priv *p)
return -ENXIO; return -ENXIO;
} }
p->bound_addr = ret[1]; p->bound_addr = saved;
dev_dbg(&p->pdev->dev, "bound drc %x to %pR\n", p->drc_index, &p->res); dev_dbg(&p->pdev->dev, "bound drc %x to %pR\n", p->drc_index, &p->res);

View File

@ -103,7 +103,7 @@ choice
prompt "Base ISA" prompt "Base ISA"
default ARCH_RV64I default ARCH_RV64I
help help
This selects the base ISA that this kernel will traget and must match This selects the base ISA that this kernel will target and must match
the target platform. the target platform.
config ARCH_RV32I config ARCH_RV32I

View File

@ -13,8 +13,6 @@ CONFIG_BLK_DEV_INITRD=y
CONFIG_EXPERT=y CONFIG_EXPERT=y
CONFIG_BPF_SYSCALL=y CONFIG_BPF_SYSCALL=y
CONFIG_SMP=y CONFIG_SMP=y
CONFIG_PCI=y
CONFIG_PCIE_XILINX=y
CONFIG_MODULES=y CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_UNLOAD=y
CONFIG_NET=y CONFIG_NET=y
@ -28,6 +26,10 @@ CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y CONFIG_IP_PNP_RARP=y
CONFIG_NETLINK_DIAG=y CONFIG_NETLINK_DIAG=y
CONFIG_PCI=y
CONFIG_PCIEPORTBUS=y
CONFIG_PCI_HOST_GENERIC=y
CONFIG_PCIE_XILINX=y
CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS=y
CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP=y
CONFIG_VIRTIO_BLK=y CONFIG_VIRTIO_BLK=y
@ -63,7 +65,6 @@ CONFIG_USB_STORAGE=y
CONFIG_USB_UAS=y CONFIG_USB_UAS=y
CONFIG_VIRTIO_MMIO=y CONFIG_VIRTIO_MMIO=y
CONFIG_SIFIVE_PLIC=y CONFIG_SIFIVE_PLIC=y
CONFIG_RAS=y
CONFIG_EXT4_FS=y CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_AUTOFS4_FS=y CONFIG_AUTOFS4_FS=y
@ -77,5 +78,6 @@ CONFIG_NFS_V4_1=y
CONFIG_NFS_V4_2=y CONFIG_NFS_V4_2=y
CONFIG_ROOT_NFS=y CONFIG_ROOT_NFS=y
CONFIG_CRYPTO_USER_API_HASH=y CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_DEV_VIRTIO=y
CONFIG_PRINTK_TIME=y CONFIG_PRINTK_TIME=y
# CONFIG_RCU_TRACE is not set # CONFIG_RCU_TRACE is not set

View File

@ -80,7 +80,7 @@ typedef struct page *pgtable_t;
#define __pgd(x) ((pgd_t) { (x) }) #define __pgd(x) ((pgd_t) { (x) })
#define __pgprot(x) ((pgprot_t) { (x) }) #define __pgprot(x) ((pgprot_t) { (x) })
#ifdef CONFIG_64BITS #ifdef CONFIG_64BIT
#define PTE_FMT "%016lx" #define PTE_FMT "%016lx"
#else #else
#define PTE_FMT "%08lx" #define PTE_FMT "%08lx"

View File

@ -22,7 +22,7 @@
* This decides where the kernel will search for a free chunk of vm * This decides where the kernel will search for a free chunk of vm
* space during mmap's. * space during mmap's.
*/ */
#define TASK_UNMAPPED_BASE PAGE_ALIGN(TASK_SIZE >> 1) #define TASK_UNMAPPED_BASE PAGE_ALIGN(TASK_SIZE / 3)
#define STACK_TOP TASK_SIZE #define STACK_TOP TASK_SIZE
#define STACK_TOP_MAX STACK_TOP #define STACK_TOP_MAX STACK_TOP

View File

@ -39,6 +39,7 @@ void asm_offsets(void)
OFFSET(TASK_STACK, task_struct, stack); OFFSET(TASK_STACK, task_struct, stack);
OFFSET(TASK_TI, task_struct, thread_info); OFFSET(TASK_TI, task_struct, thread_info);
OFFSET(TASK_TI_FLAGS, task_struct, thread_info.flags); OFFSET(TASK_TI_FLAGS, task_struct, thread_info.flags);
OFFSET(TASK_TI_PREEMPT_COUNT, task_struct, thread_info.preempt_count);
OFFSET(TASK_TI_KERNEL_SP, task_struct, thread_info.kernel_sp); OFFSET(TASK_TI_KERNEL_SP, task_struct, thread_info.kernel_sp);
OFFSET(TASK_TI_USER_SP, task_struct, thread_info.user_sp); OFFSET(TASK_TI_USER_SP, task_struct, thread_info.user_sp);
OFFSET(TASK_TI_CPU, task_struct, thread_info.cpu); OFFSET(TASK_TI_CPU, task_struct, thread_info.cpu);

View File

@ -144,6 +144,10 @@ _save_context:
REG_L x2, PT_SP(sp) REG_L x2, PT_SP(sp)
.endm .endm
#if !IS_ENABLED(CONFIG_PREEMPT)
.set resume_kernel, restore_all
#endif
ENTRY(handle_exception) ENTRY(handle_exception)
SAVE_ALL SAVE_ALL
@ -228,7 +232,7 @@ ret_from_exception:
REG_L s0, PT_SSTATUS(sp) REG_L s0, PT_SSTATUS(sp)
csrc sstatus, SR_SIE csrc sstatus, SR_SIE
andi s0, s0, SR_SPP andi s0, s0, SR_SPP
bnez s0, restore_all bnez s0, resume_kernel
resume_userspace: resume_userspace:
/* Interrupts must be disabled here so flags are checked atomically */ /* Interrupts must be disabled here so flags are checked atomically */
@ -250,6 +254,18 @@ restore_all:
RESTORE_ALL RESTORE_ALL
sret sret
#if IS_ENABLED(CONFIG_PREEMPT)
resume_kernel:
REG_L s0, TASK_TI_PREEMPT_COUNT(tp)
bnez s0, restore_all
need_resched:
REG_L s0, TASK_TI_FLAGS(tp)
andi s0, s0, _TIF_NEED_RESCHED
beqz s0, restore_all
call preempt_schedule_irq
j need_resched
#endif
work_pending: work_pending:
/* Enter slow path for supplementary processing */ /* Enter slow path for supplementary processing */
la ra, ret_from_exception la ra, ret_from_exception

View File

@ -181,7 +181,7 @@ static void __init setup_bootmem(void)
BUG_ON(mem_size == 0); BUG_ON(mem_size == 0);
set_max_mapnr(PFN_DOWN(mem_size)); set_max_mapnr(PFN_DOWN(mem_size));
max_low_pfn = memblock_end_of_DRAM(); max_low_pfn = PFN_DOWN(memblock_end_of_DRAM());
#ifdef CONFIG_BLK_DEV_INITRD #ifdef CONFIG_BLK_DEV_INITRD
setup_initrd(); setup_initrd();

View File

@ -57,15 +57,12 @@ void __init setup_smp(void)
while ((dn = of_find_node_by_type(dn, "cpu"))) { while ((dn = of_find_node_by_type(dn, "cpu"))) {
hart = riscv_of_processor_hartid(dn); hart = riscv_of_processor_hartid(dn);
if (hart < 0) { if (hart < 0)
of_node_put(dn);
continue; continue;
}
if (hart == cpuid_to_hartid_map(0)) { if (hart == cpuid_to_hartid_map(0)) {
BUG_ON(found_boot_cpu); BUG_ON(found_boot_cpu);
found_boot_cpu = 1; found_boot_cpu = 1;
of_node_put(dn);
continue; continue;
} }
@ -73,7 +70,6 @@ void __init setup_smp(void)
set_cpu_possible(cpuid, true); set_cpu_possible(cpuid, true);
set_cpu_present(cpuid, true); set_cpu_present(cpuid, true);
cpuid++; cpuid++;
of_node_put(dn);
} }
BUG_ON(!found_boot_cpu); BUG_ON(!found_boot_cpu);

Some files were not shown because too many files have changed in this diff Show More