Merge tag 'irq-fixes-4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent
Pull irqchip/irqdomain updates for 4.11-rc2 from Marc Zyngier - irqchip/crossbar: Some type tidying up - irqchip/gicv3-its: Workaround for a Qualcomm erratum - irqdomain: Compile for for systems that don't use CONFIG_IRQ_DOMAIN Fixed up minor conflict in the crossbar driver.
This commit is contained in:
@@ -7,12 +7,12 @@
|
|||||||
# list of DOCBOOKS.
|
# list of DOCBOOKS.
|
||||||
|
|
||||||
DOCBOOKS := z8530book.xml \
|
DOCBOOKS := z8530book.xml \
|
||||||
kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
|
kernel-hacking.xml kernel-locking.xml \
|
||||||
writing_usb_driver.xml networking.xml \
|
writing_usb_driver.xml networking.xml \
|
||||||
kernel-api.xml filesystems.xml lsm.xml kgdb.xml \
|
kernel-api.xml filesystems.xml lsm.xml kgdb.xml \
|
||||||
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
|
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
|
||||||
genericirq.xml s390-drivers.xml scsi.xml \
|
genericirq.xml s390-drivers.xml scsi.xml \
|
||||||
sh.xml regulator.xml w1.xml \
|
sh.xml w1.xml \
|
||||||
writing_musb_glue_layer.xml
|
writing_musb_glue_layer.xml
|
||||||
|
|
||||||
ifeq ($(DOCBOOKS),)
|
ifeq ($(DOCBOOKS),)
|
||||||
|
@@ -257,7 +257,7 @@ and tell you when they come and go.
|
|||||||
|
|
||||||
Creating the User
|
Creating the User
|
||||||
|
|
||||||
To user the message handler, you must first create a user using
|
To use the message handler, you must first create a user using
|
||||||
ipmi_create_user. The interface number specifies which SMI you want
|
ipmi_create_user. The interface number specifies which SMI you want
|
||||||
to connect to, and you must supply callback functions to be called
|
to connect to, and you must supply callback functions to be called
|
||||||
when data comes in. The callback function can run at interrupt level,
|
when data comes in. The callback function can run at interrupt level,
|
||||||
|
@@ -256,7 +256,7 @@ After reboot with new kernel or insert the module, a device file named
|
|||||||
|
|
||||||
Then, you need a user space tool named aer-inject, which can be gotten
|
Then, you need a user space tool named aer-inject, which can be gotten
|
||||||
from:
|
from:
|
||||||
http://www.kernel.org/pub/linux/utils/pci/aer-inject/
|
https://git.kernel.org/cgit/linux/kernel/git/gong.chen/aer-inject.git/
|
||||||
|
|
||||||
More information about aer-inject can be found in the document comes
|
More information about aer-inject can be found in the document comes
|
||||||
with its source code.
|
with its source code.
|
||||||
|
@@ -68,3 +68,4 @@ stable kernels.
|
|||||||
| | | | |
|
| | | | |
|
||||||
| Qualcomm Tech. | Falkor v1 | E1003 | QCOM_FALKOR_ERRATUM_1003 |
|
| Qualcomm Tech. | Falkor v1 | E1003 | QCOM_FALKOR_ERRATUM_1003 |
|
||||||
| Qualcomm Tech. | Falkor v1 | E1009 | QCOM_FALKOR_ERRATUM_1009 |
|
| Qualcomm Tech. | Falkor v1 | E1009 | QCOM_FALKOR_ERRATUM_1009 |
|
||||||
|
| Qualcomm Tech. | QDF2400 ITS | E0065 | QCOM_QDF2400_ERRATUM_0065 |
|
||||||
|
@@ -135,7 +135,7 @@ pygments_style = 'sphinx'
|
|||||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||||
todo_include_todos = False
|
todo_include_todos = False
|
||||||
|
|
||||||
primary_domain = 'C'
|
primary_domain = 'c'
|
||||||
highlight_language = 'none'
|
highlight_language = 'none'
|
||||||
|
|
||||||
# -- Options for HTML output ----------------------------------------------
|
# -- Options for HTML output ----------------------------------------------
|
||||||
|
@@ -40,6 +40,8 @@ Board compatible values:
|
|||||||
- "hardkernel,odroid-c2" (Meson gxbb)
|
- "hardkernel,odroid-c2" (Meson gxbb)
|
||||||
- "amlogic,p200" (Meson gxbb)
|
- "amlogic,p200" (Meson gxbb)
|
||||||
- "amlogic,p201" (Meson gxbb)
|
- "amlogic,p201" (Meson gxbb)
|
||||||
|
- "wetek,hub" (Meson gxbb)
|
||||||
|
- "wetek,play2" (Meson gxbb)
|
||||||
- "amlogic,p212" (Meson gxl s905x)
|
- "amlogic,p212" (Meson gxl s905x)
|
||||||
- "amlogic,p230" (Meson gxl s905d)
|
- "amlogic,p230" (Meson gxl s905d)
|
||||||
- "amlogic,p231" (Meson gxl s905d)
|
- "amlogic,p231" (Meson gxl s905d)
|
||||||
|
@@ -188,14 +188,14 @@ Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together.
|
|||||||
|
|
||||||
opp@1000000000 {
|
opp@1000000000 {
|
||||||
opp-hz = /bits/ 64 <1000000000>;
|
opp-hz = /bits/ 64 <1000000000>;
|
||||||
opp-microvolt = <970000 975000 985000>;
|
opp-microvolt = <975000 970000 985000>;
|
||||||
opp-microamp = <70000>;
|
opp-microamp = <70000>;
|
||||||
clock-latency-ns = <300000>;
|
clock-latency-ns = <300000>;
|
||||||
opp-suspend;
|
opp-suspend;
|
||||||
};
|
};
|
||||||
opp@1100000000 {
|
opp@1100000000 {
|
||||||
opp-hz = /bits/ 64 <1100000000>;
|
opp-hz = /bits/ 64 <1100000000>;
|
||||||
opp-microvolt = <980000 1000000 1010000>;
|
opp-microvolt = <1000000 980000 1010000>;
|
||||||
opp-microamp = <80000>;
|
opp-microamp = <80000>;
|
||||||
clock-latency-ns = <310000>;
|
clock-latency-ns = <310000>;
|
||||||
};
|
};
|
||||||
@@ -267,14 +267,14 @@ independently.
|
|||||||
|
|
||||||
opp@1000000000 {
|
opp@1000000000 {
|
||||||
opp-hz = /bits/ 64 <1000000000>;
|
opp-hz = /bits/ 64 <1000000000>;
|
||||||
opp-microvolt = <970000 975000 985000>;
|
opp-microvolt = <975000 970000 985000>;
|
||||||
opp-microamp = <70000>;
|
opp-microamp = <70000>;
|
||||||
clock-latency-ns = <300000>;
|
clock-latency-ns = <300000>;
|
||||||
opp-suspend;
|
opp-suspend;
|
||||||
};
|
};
|
||||||
opp@1100000000 {
|
opp@1100000000 {
|
||||||
opp-hz = /bits/ 64 <1100000000>;
|
opp-hz = /bits/ 64 <1100000000>;
|
||||||
opp-microvolt = <980000 1000000 1010000>;
|
opp-microvolt = <1000000 980000 1010000>;
|
||||||
opp-microamp = <80000>;
|
opp-microamp = <80000>;
|
||||||
clock-latency-ns = <310000>;
|
clock-latency-ns = <310000>;
|
||||||
};
|
};
|
||||||
@@ -343,14 +343,14 @@ DVFS state together.
|
|||||||
|
|
||||||
opp@1000000000 {
|
opp@1000000000 {
|
||||||
opp-hz = /bits/ 64 <1000000000>;
|
opp-hz = /bits/ 64 <1000000000>;
|
||||||
opp-microvolt = <970000 975000 985000>;
|
opp-microvolt = <975000 970000 985000>;
|
||||||
opp-microamp = <70000>;
|
opp-microamp = <70000>;
|
||||||
clock-latency-ns = <300000>;
|
clock-latency-ns = <300000>;
|
||||||
opp-suspend;
|
opp-suspend;
|
||||||
};
|
};
|
||||||
opp@1100000000 {
|
opp@1100000000 {
|
||||||
opp-hz = /bits/ 64 <1100000000>;
|
opp-hz = /bits/ 64 <1100000000>;
|
||||||
opp-microvolt = <980000 1000000 1010000>;
|
opp-microvolt = <1000000 980000 1010000>;
|
||||||
opp-microamp = <80000>;
|
opp-microamp = <80000>;
|
||||||
clock-latency-ns = <310000>;
|
clock-latency-ns = <310000>;
|
||||||
};
|
};
|
||||||
@@ -369,7 +369,7 @@ DVFS state together.
|
|||||||
|
|
||||||
opp@1300000000 {
|
opp@1300000000 {
|
||||||
opp-hz = /bits/ 64 <1300000000>;
|
opp-hz = /bits/ 64 <1300000000>;
|
||||||
opp-microvolt = <1045000 1050000 1055000>;
|
opp-microvolt = <1050000 1045000 1055000>;
|
||||||
opp-microamp = <95000>;
|
opp-microamp = <95000>;
|
||||||
clock-latency-ns = <400000>;
|
clock-latency-ns = <400000>;
|
||||||
opp-suspend;
|
opp-suspend;
|
||||||
@@ -382,7 +382,7 @@ DVFS state together.
|
|||||||
};
|
};
|
||||||
opp@1500000000 {
|
opp@1500000000 {
|
||||||
opp-hz = /bits/ 64 <1500000000>;
|
opp-hz = /bits/ 64 <1500000000>;
|
||||||
opp-microvolt = <1010000 1100000 1110000>;
|
opp-microvolt = <1100000 1010000 1110000>;
|
||||||
opp-microamp = <95000>;
|
opp-microamp = <95000>;
|
||||||
clock-latency-ns = <400000>;
|
clock-latency-ns = <400000>;
|
||||||
turbo-mode;
|
turbo-mode;
|
||||||
@@ -424,9 +424,9 @@ Example 4: Handling multiple regulators
|
|||||||
|
|
||||||
opp@1000000000 {
|
opp@1000000000 {
|
||||||
opp-hz = /bits/ 64 <1000000000>;
|
opp-hz = /bits/ 64 <1000000000>;
|
||||||
opp-microvolt = <970000 975000 985000>, /* Supply 0 */
|
opp-microvolt = <975000 970000 985000>, /* Supply 0 */
|
||||||
<960000 965000 975000>, /* Supply 1 */
|
<965000 960000 975000>, /* Supply 1 */
|
||||||
<960000 965000 975000>; /* Supply 2 */
|
<965000 960000 975000>; /* Supply 2 */
|
||||||
opp-microamp = <70000>, /* Supply 0 */
|
opp-microamp = <70000>, /* Supply 0 */
|
||||||
<70000>, /* Supply 1 */
|
<70000>, /* Supply 1 */
|
||||||
<70000>; /* Supply 2 */
|
<70000>; /* Supply 2 */
|
||||||
@@ -437,9 +437,9 @@ Example 4: Handling multiple regulators
|
|||||||
|
|
||||||
opp@1000000000 {
|
opp@1000000000 {
|
||||||
opp-hz = /bits/ 64 <1000000000>;
|
opp-hz = /bits/ 64 <1000000000>;
|
||||||
opp-microvolt = <970000 975000 985000>, /* Supply 0 */
|
opp-microvolt = <975000 970000 985000>, /* Supply 0 */
|
||||||
<960000 965000 975000>, /* Supply 1 */
|
<965000 960000 975000>, /* Supply 1 */
|
||||||
<960000 965000 975000>; /* Supply 2 */
|
<965000 960000 975000>; /* Supply 2 */
|
||||||
opp-microamp = <70000>, /* Supply 0 */
|
opp-microamp = <70000>, /* Supply 0 */
|
||||||
<0>, /* Supply 1 doesn't need this */
|
<0>, /* Supply 1 doesn't need this */
|
||||||
<70000>; /* Supply 2 */
|
<70000>; /* Supply 2 */
|
||||||
@@ -474,7 +474,7 @@ Example 5: opp-supported-hw
|
|||||||
*/
|
*/
|
||||||
opp-supported-hw = <0xF 0xFFFFFFFF 0xFFFFFFFF>
|
opp-supported-hw = <0xF 0xFFFFFFFF 0xFFFFFFFF>
|
||||||
opp-hz = /bits/ 64 <600000000>;
|
opp-hz = /bits/ 64 <600000000>;
|
||||||
opp-microvolt = <900000 915000 925000>;
|
opp-microvolt = <915000 900000 925000>;
|
||||||
...
|
...
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -487,7 +487,7 @@ Example 5: opp-supported-hw
|
|||||||
*/
|
*/
|
||||||
opp-supported-hw = <0x20 0xff0000ff 0x0000f4f0>
|
opp-supported-hw = <0x20 0xff0000ff 0x0000f4f0>
|
||||||
opp-hz = /bits/ 64 <800000000>;
|
opp-hz = /bits/ 64 <800000000>;
|
||||||
opp-microvolt = <900000 915000 925000>;
|
opp-microvolt = <915000 900000 925000>;
|
||||||
...
|
...
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -512,18 +512,18 @@ Example 6: opp-microvolt-<name>, opp-microamp-<name>:
|
|||||||
|
|
||||||
opp@1000000000 {
|
opp@1000000000 {
|
||||||
opp-hz = /bits/ 64 <1000000000>;
|
opp-hz = /bits/ 64 <1000000000>;
|
||||||
opp-microvolt-slow = <900000 915000 925000>;
|
opp-microvolt-slow = <915000 900000 925000>;
|
||||||
opp-microvolt-fast = <970000 975000 985000>;
|
opp-microvolt-fast = <975000 970000 985000>;
|
||||||
opp-microamp-slow = <70000>;
|
opp-microamp-slow = <70000>;
|
||||||
opp-microamp-fast = <71000>;
|
opp-microamp-fast = <71000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
opp@1200000000 {
|
opp@1200000000 {
|
||||||
opp-hz = /bits/ 64 <1200000000>;
|
opp-hz = /bits/ 64 <1200000000>;
|
||||||
opp-microvolt-slow = <900000 915000 925000>, /* Supply vcc0 */
|
opp-microvolt-slow = <915000 900000 925000>, /* Supply vcc0 */
|
||||||
<910000 925000 935000>; /* Supply vcc1 */
|
<925000 910000 935000>; /* Supply vcc1 */
|
||||||
opp-microvolt-fast = <970000 975000 985000>, /* Supply vcc0 */
|
opp-microvolt-fast = <975000 970000 985000>, /* Supply vcc0 */
|
||||||
<960000 965000 975000>; /* Supply vcc1 */
|
<965000 960000 975000>; /* Supply vcc1 */
|
||||||
opp-microamp = <70000>; /* Will be used for both slow/fast */
|
opp-microamp = <70000>; /* Will be used for both slow/fast */
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@@ -6,8 +6,8 @@ Required properties:
|
|||||||
- "fsl,imx1-pwm" for PWM compatible with the one integrated on i.MX1
|
- "fsl,imx1-pwm" for PWM compatible with the one integrated on i.MX1
|
||||||
- "fsl,imx27-pwm" for PWM compatible with the one integrated on i.MX27
|
- "fsl,imx27-pwm" for PWM compatible with the one integrated on i.MX27
|
||||||
- reg: physical base address and length of the controller's registers
|
- reg: physical base address and length of the controller's registers
|
||||||
- #pwm-cells: should be 2. See pwm.txt in this directory for a description of
|
- #pwm-cells: 2 for i.MX1 and 3 for i.MX27 and newer SoCs. See pwm.txt
|
||||||
the cells format.
|
in this directory for a description of the cells format.
|
||||||
- clocks : Clock specifiers for both ipg and per clocks.
|
- clocks : Clock specifiers for both ipg and per clocks.
|
||||||
- clock-names : Clock names should include both "ipg" and "per"
|
- clock-names : Clock names should include both "ipg" and "per"
|
||||||
See the clock consumer binding,
|
See the clock consumer binding,
|
||||||
@@ -17,7 +17,7 @@ See the clock consumer binding,
|
|||||||
Example:
|
Example:
|
||||||
|
|
||||||
pwm1: pwm@53fb4000 {
|
pwm1: pwm@53fb4000 {
|
||||||
#pwm-cells = <2>;
|
#pwm-cells = <3>;
|
||||||
compatible = "fsl,imx53-pwm", "fsl,imx27-pwm";
|
compatible = "fsl,imx53-pwm", "fsl,imx27-pwm";
|
||||||
reg = <0x53fb4000 0x4000>;
|
reg = <0x53fb4000 0x4000>;
|
||||||
clocks = <&clks IMX5_CLK_PWM1_IPG_GATE>,
|
clocks = <&clks IMX5_CLK_PWM1_IPG_GATE>,
|
||||||
|
@@ -17,6 +17,12 @@ Required properties:
|
|||||||
calibration data, as specified by the SoC reference manual.
|
calibration data, as specified by the SoC reference manual.
|
||||||
The first cell of each pair is the value to be written to TTCFGR,
|
The first cell of each pair is the value to be written to TTCFGR,
|
||||||
and the second is the value to be written to TSCFGR.
|
and the second is the value to be written to TSCFGR.
|
||||||
|
- #thermal-sensor-cells : Must be 1. The sensor specifier is the monitoring
|
||||||
|
site ID, and represents the "n" in TRITSRn and TRATSRn.
|
||||||
|
|
||||||
|
Optional property:
|
||||||
|
- little-endian : If present, the TMU registers are little endian. If absent,
|
||||||
|
the default is big endian.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@@ -60,4 +66,5 @@ tmu@f0000 {
|
|||||||
|
|
||||||
0x00030000 0x00000012
|
0x00030000 0x00000012
|
||||||
0x00030001 0x0000001d>;
|
0x00030001 0x0000001d>;
|
||||||
|
#thermal-sensor-cells = <1>;
|
||||||
};
|
};
|
||||||
|
@@ -0,0 +1,56 @@
|
|||||||
|
* DT bindings for Renesas R-Car Gen3 Thermal Sensor driver
|
||||||
|
|
||||||
|
On R-Car Gen3 SoCs, the thermal sensor controllers (TSC) control the thermal
|
||||||
|
sensors (THS) which are the analog circuits for measuring temperature (Tj)
|
||||||
|
inside the LSI.
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- compatible : "renesas,<soctype>-thermal",
|
||||||
|
Examples with soctypes are:
|
||||||
|
- "renesas,r8a7795-thermal" (R-Car H3)
|
||||||
|
- "renesas,r8a7796-thermal" (R-Car M3-W)
|
||||||
|
- reg : Address ranges of the thermal registers. Each sensor
|
||||||
|
needs one address range. Sorting must be done in
|
||||||
|
increasing order according to datasheet, i.e.
|
||||||
|
TSC1, TSC2, ...
|
||||||
|
- clocks : Must contain a reference to the functional clock.
|
||||||
|
- #thermal-sensor-cells : must be <1>.
|
||||||
|
|
||||||
|
Optional properties:
|
||||||
|
|
||||||
|
- interrupts : interrupts routed to the TSC (3 for H3 and M3-W)
|
||||||
|
- power-domain : Must contain a reference to the power domain. This
|
||||||
|
property is mandatory if the thermal sensor instance
|
||||||
|
is part of a controllable power domain.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
tsc: thermal@e6198000 {
|
||||||
|
compatible = "renesas,r8a7795-thermal";
|
||||||
|
reg = <0 0xe6198000 0 0x68>,
|
||||||
|
<0 0xe61a0000 0 0x5c>,
|
||||||
|
<0 0xe61a8000 0 0x5c>;
|
||||||
|
interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
|
||||||
|
<GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
|
||||||
|
<GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
clocks = <&cpg CPG_MOD 522>;
|
||||||
|
power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
|
||||||
|
#thermal-sensor-cells = <1>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
thermal-zones {
|
||||||
|
sensor_thermal1: sensor-thermal1 {
|
||||||
|
polling-delay-passive = <250>;
|
||||||
|
polling-delay = <1000>;
|
||||||
|
thermal-sensors = <&tsc 0>;
|
||||||
|
|
||||||
|
trips {
|
||||||
|
sensor1_crit: sensor1-crit {
|
||||||
|
temperature = <90000>;
|
||||||
|
hysteresis = <2000>;
|
||||||
|
type = "critical";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
116
Documentation/devicetree/bindings/thermal/zx2967-thermal.txt
Normal file
116
Documentation/devicetree/bindings/thermal/zx2967-thermal.txt
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
* ZTE zx2967 family Thermal
|
||||||
|
|
||||||
|
Required Properties:
|
||||||
|
- compatible: should be one of the following.
|
||||||
|
* zte,zx296718-thermal
|
||||||
|
- reg: physical base address of the controller and length of memory mapped
|
||||||
|
region.
|
||||||
|
- clocks : Pairs of phandle and specifier referencing the controller's clocks.
|
||||||
|
- clock-names: "topcrm" for the topcrm clock.
|
||||||
|
"apb" for the apb clock.
|
||||||
|
- #thermal-sensor-cells: must be 0.
|
||||||
|
|
||||||
|
Please note: slope coefficient defined in thermal-zones section need to be
|
||||||
|
multiplied by 1000.
|
||||||
|
|
||||||
|
Example for tempsensor:
|
||||||
|
|
||||||
|
tempsensor: tempsensor@148a000 {
|
||||||
|
compatible = "zte,zx296718-thermal";
|
||||||
|
reg = <0x0148a000 0x20>;
|
||||||
|
clocks = <&topcrm TEMPSENSOR_GATE>, <&audiocrm AUDIO_TS_PCLK>;
|
||||||
|
clock-names = "topcrm", "apb";
|
||||||
|
#thermal-sensor-cells = <0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
Example for cooling device:
|
||||||
|
|
||||||
|
cooling_dev: cooling_dev {
|
||||||
|
cluster0_cooling_dev: cluster0-cooling-dev {
|
||||||
|
#cooling-cells = <2>;
|
||||||
|
cpumask = <0xf>;
|
||||||
|
capacitance = <1500>;
|
||||||
|
};
|
||||||
|
|
||||||
|
cluster1_cooling_dev: cluster1-cooling-dev {
|
||||||
|
#cooling-cells = <2>;
|
||||||
|
cpumask = <0x30>;
|
||||||
|
capacitance = <2000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
Example for thermal zones:
|
||||||
|
|
||||||
|
thermal-zones {
|
||||||
|
zx296718_thermal: zx296718_thermal {
|
||||||
|
polling-delay-passive = <500>;
|
||||||
|
polling-delay = <1000>;
|
||||||
|
sustainable-power = <6500>;
|
||||||
|
|
||||||
|
thermal-sensors = <&tempsensor 0>;
|
||||||
|
/*
|
||||||
|
* slope need to be multiplied by 1000.
|
||||||
|
*/
|
||||||
|
coefficients = <1951 (-922)>;
|
||||||
|
|
||||||
|
trips {
|
||||||
|
trip0: switch_on_temperature {
|
||||||
|
temperature = <90000>;
|
||||||
|
hysteresis = <2000>;
|
||||||
|
type = "passive";
|
||||||
|
};
|
||||||
|
|
||||||
|
trip1: desired_temperature {
|
||||||
|
temperature = <100000>;
|
||||||
|
hysteresis = <2000>;
|
||||||
|
type = "passive";
|
||||||
|
};
|
||||||
|
|
||||||
|
crit: critical_temperature {
|
||||||
|
temperature = <110000>;
|
||||||
|
hysteresis = <2000>;
|
||||||
|
type = "critical";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
cooling-maps {
|
||||||
|
map0 {
|
||||||
|
trip = <&trip0>;
|
||||||
|
cooling-device = <&gpu 2 5>;
|
||||||
|
};
|
||||||
|
|
||||||
|
map1 {
|
||||||
|
trip = <&trip0>;
|
||||||
|
cooling-device = <&cluster0_cooling_dev 1 2>;
|
||||||
|
};
|
||||||
|
|
||||||
|
map2 {
|
||||||
|
trip = <&trip1>;
|
||||||
|
cooling-device = <&cluster0_cooling_dev 1 2>;
|
||||||
|
};
|
||||||
|
|
||||||
|
map3 {
|
||||||
|
trip = <&crit>;
|
||||||
|
cooling-device = <&cluster0_cooling_dev 1 2>;
|
||||||
|
};
|
||||||
|
|
||||||
|
map4 {
|
||||||
|
trip = <&trip0>;
|
||||||
|
cooling-device = <&cluster1_cooling_dev 1 2>;
|
||||||
|
contribution = <9000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
map5 {
|
||||||
|
trip = <&trip1>;
|
||||||
|
cooling-device = <&cluster1_cooling_dev 1 2>;
|
||||||
|
contribution = <4096>;
|
||||||
|
};
|
||||||
|
|
||||||
|
map6 {
|
||||||
|
trip = <&crit>;
|
||||||
|
cooling-device = <&cluster1_cooling_dev 1 2>;
|
||||||
|
contribution = <4096>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
@@ -332,6 +332,7 @@ virtio Virtual I/O Device Specification, developed by the OASIS consortium
|
|||||||
vivante Vivante Corporation
|
vivante Vivante Corporation
|
||||||
voipac Voipac Technologies s.r.o.
|
voipac Voipac Technologies s.r.o.
|
||||||
wd Western Digital Corp.
|
wd Western Digital Corp.
|
||||||
|
wetek WeTek Electronics, limited.
|
||||||
wexler Wexler
|
wexler Wexler
|
||||||
winbond Winbond Electronics corp.
|
winbond Winbond Electronics corp.
|
||||||
wlf Wolfson Microelectronics
|
wlf Wolfson Microelectronics
|
||||||
|
@@ -58,7 +58,8 @@ prototypes:
|
|||||||
int (*permission) (struct inode *, int, unsigned int);
|
int (*permission) (struct inode *, int, unsigned int);
|
||||||
int (*get_acl)(struct inode *, int);
|
int (*get_acl)(struct inode *, int);
|
||||||
int (*setattr) (struct dentry *, struct iattr *);
|
int (*setattr) (struct dentry *, struct iattr *);
|
||||||
int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *);
|
int (*getattr) (const struct path *, struct dentry *, struct kstat *,
|
||||||
|
u32, unsigned int);
|
||||||
ssize_t (*listxattr) (struct dentry *, char *, size_t);
|
ssize_t (*listxattr) (struct dentry *, char *, size_t);
|
||||||
int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len);
|
int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len);
|
||||||
void (*update_time)(struct inode *, struct timespec *, int);
|
void (*update_time)(struct inode *, struct timespec *, int);
|
||||||
|
@@ -98,11 +98,10 @@ Mount Options
|
|||||||
size.
|
size.
|
||||||
|
|
||||||
rsize=X
|
rsize=X
|
||||||
Specify the maximum read size in bytes. By default there is no
|
Specify the maximum read size in bytes. Default: 64 MB.
|
||||||
maximum.
|
|
||||||
|
|
||||||
rasize=X
|
rasize=X
|
||||||
Specify the maximum readahead.
|
Specify the maximum readahead. Default: 8 MB.
|
||||||
|
|
||||||
mount_timeout=X
|
mount_timeout=X
|
||||||
Specify the timeout value for mount (in seconds), in the case
|
Specify the timeout value for mount (in seconds), in the case
|
||||||
|
@@ -125,13 +125,14 @@ active_logs=%u Support configuring the number of active logs. In the
|
|||||||
disable_ext_identify Disable the extension list configured by mkfs, so f2fs
|
disable_ext_identify Disable the extension list configured by mkfs, so f2fs
|
||||||
does not aware of cold files such as media files.
|
does not aware of cold files such as media files.
|
||||||
inline_xattr Enable the inline xattrs feature.
|
inline_xattr Enable the inline xattrs feature.
|
||||||
|
noinline_xattr Disable the inline xattrs feature.
|
||||||
inline_data Enable the inline data feature: New created small(<~3.4k)
|
inline_data Enable the inline data feature: New created small(<~3.4k)
|
||||||
files can be written into inode block.
|
files can be written into inode block.
|
||||||
inline_dentry Enable the inline dir feature: data in new created
|
inline_dentry Enable the inline dir feature: data in new created
|
||||||
directory entries can be written into inode block. The
|
directory entries can be written into inode block. The
|
||||||
space of inode block which is used to store inline
|
space of inode block which is used to store inline
|
||||||
dentries is limited to ~3.4k.
|
dentries is limited to ~3.4k.
|
||||||
noinline_dentry Diable the inline dentry feature.
|
noinline_dentry Disable the inline dentry feature.
|
||||||
flush_merge Merge concurrent cache_flush commands as much as possible
|
flush_merge Merge concurrent cache_flush commands as much as possible
|
||||||
to eliminate redundant command issues. If the underlying
|
to eliminate redundant command issues. If the underlying
|
||||||
device handles the cache_flush command relatively slowly,
|
device handles the cache_flush command relatively slowly,
|
||||||
@@ -157,6 +158,8 @@ data_flush Enable data flushing before checkpoint in order to
|
|||||||
mode=%s Control block allocation mode which supports "adaptive"
|
mode=%s Control block allocation mode which supports "adaptive"
|
||||||
and "lfs". In "lfs" mode, there should be no random
|
and "lfs". In "lfs" mode, there should be no random
|
||||||
writes towards main area.
|
writes towards main area.
|
||||||
|
io_bits=%u Set the bit size of write IO requests. It should be set
|
||||||
|
with "mode=lfs".
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
DEBUGFS ENTRIES
|
DEBUGFS ENTRIES
|
||||||
@@ -174,7 +177,7 @@ f2fs. Each file shows the whole f2fs information.
|
|||||||
SYSFS ENTRIES
|
SYSFS ENTRIES
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
||||||
Information about mounted f2f2 file systems can be found in
|
Information about mounted f2fs file systems can be found in
|
||||||
/sys/fs/f2fs. Each mounted filesystem will have a directory in
|
/sys/fs/f2fs. Each mounted filesystem will have a directory in
|
||||||
/sys/fs/f2fs based on its device name (i.e., /sys/fs/f2fs/sda).
|
/sys/fs/f2fs based on its device name (i.e., /sys/fs/f2fs/sda).
|
||||||
The files in each per-device directory are shown in table below.
|
The files in each per-device directory are shown in table below.
|
||||||
|
@@ -382,7 +382,8 @@ struct inode_operations {
|
|||||||
int (*permission) (struct inode *, int);
|
int (*permission) (struct inode *, int);
|
||||||
int (*get_acl)(struct inode *, int);
|
int (*get_acl)(struct inode *, int);
|
||||||
int (*setattr) (struct dentry *, struct iattr *);
|
int (*setattr) (struct dentry *, struct iattr *);
|
||||||
int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
|
int (*getattr) (const struct path *, struct dentry *, struct kstat *,
|
||||||
|
u32, unsigned int);
|
||||||
ssize_t (*listxattr) (struct dentry *, char *, size_t);
|
ssize_t (*listxattr) (struct dentry *, char *, size_t);
|
||||||
void (*update_time)(struct inode *, struct timespec *, int);
|
void (*update_time)(struct inode *, struct timespec *, int);
|
||||||
int (*atomic_open)(struct inode *, struct dentry *, struct file *,
|
int (*atomic_open)(struct inode *, struct dentry *, struct file *,
|
||||||
|
@@ -312,7 +312,7 @@ information out of a register+stack dump printed by the kernel on
|
|||||||
protection faults (so-called "kernel oops").
|
protection faults (so-called "kernel oops").
|
||||||
|
|
||||||
If you run into some kind of deadlock, you can try to dump a call trace
|
If you run into some kind of deadlock, you can try to dump a call trace
|
||||||
for each process using sysrq-t (see Documentation/sysrq.txt).
|
for each process using sysrq-t (see Documentation/admin-guide/sysrq.rst).
|
||||||
This way it is possible to figure where *exactly* some process in "D"
|
This way it is possible to figure where *exactly* some process in "D"
|
||||||
state is stuck.
|
state is stuck.
|
||||||
|
|
||||||
|
@@ -163,8 +163,7 @@ of flags and remove sysfs attributes pm_qos_no_power_off and pm_qos_remote_wakeu
|
|||||||
under the device's power directory.
|
under the device's power directory.
|
||||||
|
|
||||||
Notification mechanisms:
|
Notification mechanisms:
|
||||||
The per-device PM QoS framework has 2 different and distinct notification trees:
|
The per-device PM QoS framework has a per-device notification tree.
|
||||||
a per-device notification tree and a global notification tree.
|
|
||||||
|
|
||||||
int dev_pm_qos_add_notifier(device, notifier):
|
int dev_pm_qos_add_notifier(device, notifier):
|
||||||
Adds a notification callback function for the device.
|
Adds a notification callback function for the device.
|
||||||
@@ -174,16 +173,6 @@ is changed (for resume latency device PM QoS only).
|
|||||||
int dev_pm_qos_remove_notifier(device, notifier):
|
int dev_pm_qos_remove_notifier(device, notifier):
|
||||||
Removes the notification callback function for the device.
|
Removes the notification callback function for the device.
|
||||||
|
|
||||||
int dev_pm_qos_add_global_notifier(notifier):
|
|
||||||
Adds a notification callback function in the global notification tree of the
|
|
||||||
framework.
|
|
||||||
The callback is called when the aggregated value for any device is changed
|
|
||||||
(for resume latency device PM QoS only).
|
|
||||||
|
|
||||||
int dev_pm_qos_remove_global_notifier(notifier):
|
|
||||||
Removes the notification callback function from the global notification tree
|
|
||||||
of the framework.
|
|
||||||
|
|
||||||
|
|
||||||
Active state latency tolerance
|
Active state latency tolerance
|
||||||
|
|
||||||
|
@@ -100,7 +100,7 @@ knows what to do to handle the device).
|
|||||||
* If the suspend callback returns an error code different from -EBUSY and
|
* If the suspend callback returns an error code different from -EBUSY and
|
||||||
-EAGAIN, the PM core regards this as a fatal error and will refuse to run
|
-EAGAIN, the PM core regards this as a fatal error and will refuse to run
|
||||||
the helper functions described in Section 4 for the device until its status
|
the helper functions described in Section 4 for the device until its status
|
||||||
is directly set to either'active', or 'suspended' (the PM core provides
|
is directly set to either 'active', or 'suspended' (the PM core provides
|
||||||
special helper functions for this purpose).
|
special helper functions for this purpose).
|
||||||
|
|
||||||
In particular, if the driver requires remote wakeup capability (i.e. hardware
|
In particular, if the driver requires remote wakeup capability (i.e. hardware
|
||||||
@@ -217,7 +217,7 @@ defined in include/linux/pm.h:
|
|||||||
one to complete
|
one to complete
|
||||||
|
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
- lock used for synchronisation
|
- lock used for synchronization
|
||||||
|
|
||||||
atomic_t usage_count;
|
atomic_t usage_count;
|
||||||
- the usage counter of the device
|
- the usage counter of the device
|
||||||
@@ -565,7 +565,7 @@ appropriate to ensure that the device is not put back to sleep during the
|
|||||||
probe. This can happen with systems such as the network device layer.
|
probe. This can happen with systems such as the network device layer.
|
||||||
|
|
||||||
It may be desirable to suspend the device once ->probe() has finished.
|
It may be desirable to suspend the device once ->probe() has finished.
|
||||||
Therefore the driver core uses the asyncronous pm_request_idle() to submit a
|
Therefore the driver core uses the asynchronous pm_request_idle() to submit a
|
||||||
request to execute the subsystem-level idle callback for the device at that
|
request to execute the subsystem-level idle callback for the device at that
|
||||||
time. A driver that makes use of the runtime autosuspend feature, may want to
|
time. A driver that makes use of the runtime autosuspend feature, may want to
|
||||||
update the last busy mark before returning from ->probe().
|
update the last busy mark before returning from ->probe().
|
||||||
|
@@ -2116,7 +2116,7 @@ The sysrq key reading is very picky ( I have to type the keys in an
|
|||||||
This is particularly useful for syncing disks unmounting & rebooting
|
This is particularly useful for syncing disks unmounting & rebooting
|
||||||
if the machine gets partially hung.
|
if the machine gets partially hung.
|
||||||
|
|
||||||
Read Documentation/sysrq.txt for more info
|
Read Documentation/admin-guide/sysrq.rst for more info
|
||||||
|
|
||||||
References:
|
References:
|
||||||
===========
|
===========
|
||||||
|
@@ -1151,8 +1151,21 @@ access the data:
|
|||||||
usage. This is called key->payload.rcu_data0. The following accessors
|
usage. This is called key->payload.rcu_data0. The following accessors
|
||||||
wrap the RCU calls to this element:
|
wrap the RCU calls to this element:
|
||||||
|
|
||||||
|
(a) Set or change the first payload pointer:
|
||||||
|
|
||||||
rcu_assign_keypointer(struct key *key, void *data);
|
rcu_assign_keypointer(struct key *key, void *data);
|
||||||
void *rcu_dereference_key(struct key *key);
|
|
||||||
|
(b) Read the first payload pointer with the key semaphore held:
|
||||||
|
|
||||||
|
[const] void *dereference_key_locked([const] struct key *key);
|
||||||
|
|
||||||
|
Note that the return value will inherit its constness from the key
|
||||||
|
parameter. Static analysis will give an error if it things the lock
|
||||||
|
isn't held.
|
||||||
|
|
||||||
|
(c) Read the first payload pointer with the RCU read lock held:
|
||||||
|
|
||||||
|
const void *dereference_key_rcu(const struct key *key);
|
||||||
|
|
||||||
|
|
||||||
===================
|
===================
|
||||||
|
@@ -85,7 +85,7 @@ show up in /proc/sys/kernel:
|
|||||||
- softlockup_all_cpu_backtrace
|
- softlockup_all_cpu_backtrace
|
||||||
- soft_watchdog
|
- soft_watchdog
|
||||||
- stop-a [ SPARC only ]
|
- stop-a [ SPARC only ]
|
||||||
- sysrq ==> Documentation/sysrq.txt
|
- sysrq ==> Documentation/admin-guide/sysrq.rst
|
||||||
- sysctl_writes_strict
|
- sysctl_writes_strict
|
||||||
- tainted
|
- tainted
|
||||||
- threads-max
|
- threads-max
|
||||||
|
@@ -662,6 +662,10 @@ include/linux/rcupdate.h 의 rcu_assign_pointer() 와 rcu_dereference() 를
|
|||||||
컨트롤 의존성
|
컨트롤 의존성
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
현재의 컴파일러들은 컨트롤 의존성을 이해하고 있지 않기 때문에 컨트롤 의존성은
|
||||||
|
약간 다루기 어려울 수 있습니다. 이 섹션의 목적은 여러분이 컴파일러의 무시로
|
||||||
|
인해 여러분의 코드가 망가지는 걸 막을 수 있도록 돕는겁니다.
|
||||||
|
|
||||||
로드-로드 컨트롤 의존성은 데이터 의존성 배리어만으로는 정확히 동작할 수가
|
로드-로드 컨트롤 의존성은 데이터 의존성 배리어만으로는 정확히 동작할 수가
|
||||||
없어서 읽기 메모리 배리어를 필요로 합니다. 아래의 코드를 봅시다:
|
없어서 읽기 메모리 배리어를 필요로 합니다. 아래의 코드를 봅시다:
|
||||||
|
|
||||||
@@ -689,20 +693,21 @@ CPU 는 b 로부터의 로드 오퍼레이션이 a 로부터의 로드 오퍼레
|
|||||||
|
|
||||||
q = READ_ONCE(a);
|
q = READ_ONCE(a);
|
||||||
if (q) {
|
if (q) {
|
||||||
WRITE_ONCE(b, p);
|
WRITE_ONCE(b, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
컨트롤 의존성은 보통 다른 타입의 배리어들과 짝을 맞춰 사용됩니다. 그렇다곤
|
컨트롤 의존성은 보통 다른 타입의 배리어들과 짝을 맞춰 사용됩니다. 그렇다곤
|
||||||
하나, READ_ONCE() 는 반드시 사용해야 함을 부디 명심하세요! READ_ONCE() 가
|
하나, READ_ONCE() 도 WRITE_ONCE() 도 선택사항이 아니라 필수사항임을 부디
|
||||||
없다면, 컴파일러가 'a' 로부터의 로드를 'a' 로부터의 또다른 로드와, 'b' 로의
|
명심하세요! READ_ONCE() 가 없다면, 컴파일러는 'a' 로부터의 로드를 'a' 로부터의
|
||||||
스토어를 'b' 로의 또다른 스토어와 조합해 버려 매우 비직관적인 결과를 초래할 수
|
또다른 로드와 조합할 수 있습니다. WRITE_ONCE() 가 없다면, 컴파일러는 'b' 로의
|
||||||
있습니다.
|
스토어를 'b' 로의 또라느 스토어들과 조합할 수 있습니다. 두 경우 모두 순서에
|
||||||
|
있어 상당히 비직관적인 결과를 초래할 수 있습니다.
|
||||||
|
|
||||||
이걸로 끝이 아닌게, 컴파일러가 변수 'a' 의 값이 항상 0이 아니라고 증명할 수
|
이걸로 끝이 아닌게, 컴파일러가 변수 'a' 의 값이 항상 0이 아니라고 증명할 수
|
||||||
있다면, 앞의 예에서 "if" 문을 없애서 다음과 같이 최적화 할 수도 있습니다:
|
있다면, 앞의 예에서 "if" 문을 없애서 다음과 같이 최적화 할 수도 있습니다:
|
||||||
|
|
||||||
q = a;
|
q = a;
|
||||||
b = p; /* BUG: Compiler and CPU can both reorder!!! */
|
b = 1; /* BUG: Compiler and CPU can both reorder!!! */
|
||||||
|
|
||||||
그러니 READ_ONCE() 를 반드시 사용하세요.
|
그러니 READ_ONCE() 를 반드시 사용하세요.
|
||||||
|
|
||||||
@@ -712,11 +717,11 @@ CPU 는 b 로부터의 로드 오퍼레이션이 a 로부터의 로드 오퍼레
|
|||||||
q = READ_ONCE(a);
|
q = READ_ONCE(a);
|
||||||
if (q) {
|
if (q) {
|
||||||
barrier();
|
barrier();
|
||||||
WRITE_ONCE(b, p);
|
WRITE_ONCE(b, 1);
|
||||||
do_something();
|
do_something();
|
||||||
} else {
|
} else {
|
||||||
barrier();
|
barrier();
|
||||||
WRITE_ONCE(b, p);
|
WRITE_ONCE(b, 1);
|
||||||
do_something_else();
|
do_something_else();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -725,12 +730,12 @@ CPU 는 b 로부터의 로드 오퍼레이션이 a 로부터의 로드 오퍼레
|
|||||||
|
|
||||||
q = READ_ONCE(a);
|
q = READ_ONCE(a);
|
||||||
barrier();
|
barrier();
|
||||||
WRITE_ONCE(b, p); /* BUG: No ordering vs. load from a!!! */
|
WRITE_ONCE(b, 1); /* BUG: No ordering vs. load from a!!! */
|
||||||
if (q) {
|
if (q) {
|
||||||
/* WRITE_ONCE(b, p); -- moved up, BUG!!! */
|
/* WRITE_ONCE(b, 1); -- moved up, BUG!!! */
|
||||||
do_something();
|
do_something();
|
||||||
} else {
|
} else {
|
||||||
/* WRITE_ONCE(b, p); -- moved up, BUG!!! */
|
/* WRITE_ONCE(b, 1); -- moved up, BUG!!! */
|
||||||
do_something_else();
|
do_something_else();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -742,10 +747,10 @@ CPU 는 b 로부터의 로드 오퍼레이션이 a 로부터의 로드 오퍼레
|
|||||||
|
|
||||||
q = READ_ONCE(a);
|
q = READ_ONCE(a);
|
||||||
if (q) {
|
if (q) {
|
||||||
smp_store_release(&b, p);
|
smp_store_release(&b, 1);
|
||||||
do_something();
|
do_something();
|
||||||
} else {
|
} else {
|
||||||
smp_store_release(&b, p);
|
smp_store_release(&b, 1);
|
||||||
do_something_else();
|
do_something_else();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -754,10 +759,10 @@ CPU 는 b 로부터의 로드 오퍼레이션이 a 로부터의 로드 오퍼레
|
|||||||
|
|
||||||
q = READ_ONCE(a);
|
q = READ_ONCE(a);
|
||||||
if (q) {
|
if (q) {
|
||||||
WRITE_ONCE(b, p);
|
WRITE_ONCE(b, 1);
|
||||||
do_something();
|
do_something();
|
||||||
} else {
|
} else {
|
||||||
WRITE_ONCE(b, r);
|
WRITE_ONCE(b, 2);
|
||||||
do_something_else();
|
do_something_else();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -770,10 +775,10 @@ CPU 는 b 로부터의 로드 오퍼레이션이 a 로부터의 로드 오퍼레
|
|||||||
|
|
||||||
q = READ_ONCE(a);
|
q = READ_ONCE(a);
|
||||||
if (q % MAX) {
|
if (q % MAX) {
|
||||||
WRITE_ONCE(b, p);
|
WRITE_ONCE(b, 1);
|
||||||
do_something();
|
do_something();
|
||||||
} else {
|
} else {
|
||||||
WRITE_ONCE(b, r);
|
WRITE_ONCE(b, 2);
|
||||||
do_something_else();
|
do_something_else();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -781,7 +786,7 @@ CPU 는 b 로부터의 로드 오퍼레이션이 a 로부터의 로드 오퍼레
|
|||||||
위의 코드를 아래와 같이 바꿔버릴 수 있습니다:
|
위의 코드를 아래와 같이 바꿔버릴 수 있습니다:
|
||||||
|
|
||||||
q = READ_ONCE(a);
|
q = READ_ONCE(a);
|
||||||
WRITE_ONCE(b, p);
|
WRITE_ONCE(b, 1);
|
||||||
do_something_else();
|
do_something_else();
|
||||||
|
|
||||||
이렇게 되면, CPU 는 변수 'a' 로부터의 로드와 변수 'b' 로의 스토어 사이의 순서를
|
이렇게 되면, CPU 는 변수 'a' 로부터의 로드와 변수 'b' 로의 스토어 사이의 순서를
|
||||||
@@ -793,10 +798,10 @@ CPU 는 b 로부터의 로드 오퍼레이션이 a 로부터의 로드 오퍼레
|
|||||||
q = READ_ONCE(a);
|
q = READ_ONCE(a);
|
||||||
BUILD_BUG_ON(MAX <= 1); /* Order load from a with store to b. */
|
BUILD_BUG_ON(MAX <= 1); /* Order load from a with store to b. */
|
||||||
if (q % MAX) {
|
if (q % MAX) {
|
||||||
WRITE_ONCE(b, p);
|
WRITE_ONCE(b, 1);
|
||||||
do_something();
|
do_something();
|
||||||
} else {
|
} else {
|
||||||
WRITE_ONCE(b, r);
|
WRITE_ONCE(b, 2);
|
||||||
do_something_else();
|
do_something_else();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -828,35 +833,33 @@ CPU 는 b 로부터의 로드 오퍼레이션이 a 로부터의 로드 오퍼레
|
|||||||
|
|
||||||
q = READ_ONCE(a);
|
q = READ_ONCE(a);
|
||||||
if (q) {
|
if (q) {
|
||||||
WRITE_ONCE(b, p);
|
WRITE_ONCE(b, 1);
|
||||||
} else {
|
} else {
|
||||||
WRITE_ONCE(b, r);
|
WRITE_ONCE(b, 2);
|
||||||
}
|
}
|
||||||
WRITE_ONCE(c, 1); /* BUG: No ordering against the read from "a". */
|
WRITE_ONCE(c, 1); /* BUG: No ordering against the read from 'a'. */
|
||||||
|
|
||||||
컴파일러는 volatile 타입에 대한 액세스를 재배치 할 수 없고 이 조건 하의 "b"
|
컴파일러는 volatile 타입에 대한 액세스를 재배치 할 수 없고 이 조건 하의 'b'
|
||||||
로의 쓰기를 재배치 할 수 없기 때문에 여기에 순서 규칙이 존재한다고 주장하고
|
로의 쓰기를 재배치 할 수 없기 때문에 여기에 순서 규칙이 존재한다고 주장하고
|
||||||
싶을 겁니다. 불행히도 이 경우에, 컴파일러는 다음의 가상의 pseudo-assembly 언어
|
싶을 겁니다. 불행히도 이 경우에, 컴파일러는 다음의 가상의 pseudo-assembly 언어
|
||||||
코드처럼 "b" 로의 두개의 쓰기 오퍼레이션을 conditional-move 인스트럭션으로
|
코드처럼 'b' 로의 두개의 쓰기 오퍼레이션을 conditional-move 인스트럭션으로
|
||||||
번역할 수 있습니다:
|
번역할 수 있습니다:
|
||||||
|
|
||||||
ld r1,a
|
ld r1,a
|
||||||
ld r2,p
|
|
||||||
ld r3,r
|
|
||||||
cmp r1,$0
|
cmp r1,$0
|
||||||
cmov,ne r4,r2
|
cmov,ne r4,$1
|
||||||
cmov,eq r4,r3
|
cmov,eq r4,$2
|
||||||
st r4,b
|
st r4,b
|
||||||
st $1,c
|
st $1,c
|
||||||
|
|
||||||
완화된 순서 규칙의 CPU 는 "a" 로부터의 로드와 "c" 로의 스토어 사이에 어떤
|
완화된 순서 규칙의 CPU 는 'a' 로부터의 로드와 'c' 로의 스토어 사이에 어떤
|
||||||
종류의 의존성도 갖지 않을 겁니다. 이 컨트롤 의존성은 두개의 cmov 인스트럭션과
|
종류의 의존성도 갖지 않을 겁니다. 이 컨트롤 의존성은 두개의 cmov 인스트럭션과
|
||||||
거기에 의존하는 스토어 에게만 적용될 겁니다. 짧게 말하자면, 컨트롤 의존성은
|
거기에 의존하는 스토어 에게만 적용될 겁니다. 짧게 말하자면, 컨트롤 의존성은
|
||||||
주어진 if 문의 then 절과 else 절에게만 (그리고 이 두 절 내에서 호출되는
|
주어진 if 문의 then 절과 else 절에게만 (그리고 이 두 절 내에서 호출되는
|
||||||
함수들에게까지) 적용되지, 이 if 문을 뒤따르는 코드에는 적용되지 않습니다.
|
함수들에게까지) 적용되지, 이 if 문을 뒤따르는 코드에는 적용되지 않습니다.
|
||||||
|
|
||||||
마지막으로, 컨트롤 의존성은 이행성 (transitivity) 을 제공하지 -않습니다-. 이건
|
마지막으로, 컨트롤 의존성은 이행성 (transitivity) 을 제공하지 -않습니다-. 이건
|
||||||
x 와 y 가 둘 다 0 이라는 초기값을 가졌다는 가정 하의 두개의 예제로
|
'x' 와 'y' 가 둘 다 0 이라는 초기값을 가졌다는 가정 하의 두개의 예제로
|
||||||
보이겠습니다:
|
보이겠습니다:
|
||||||
|
|
||||||
CPU 0 CPU 1
|
CPU 0 CPU 1
|
||||||
@@ -924,6 +927,9 @@ http://www.cl.cam.ac.uk/users/pes20/ppc-supplemental/test6.pdf 와
|
|||||||
(*) 컨트롤 의존성은 이행성을 제공하지 -않습니다-. 이행성이 필요하다면,
|
(*) 컨트롤 의존성은 이행성을 제공하지 -않습니다-. 이행성이 필요하다면,
|
||||||
smp_mb() 를 사용하세요.
|
smp_mb() 를 사용하세요.
|
||||||
|
|
||||||
|
(*) 컴파일러는 컨트롤 의존성을 이해하고 있지 않습니다. 따라서 컴파일러가
|
||||||
|
여러분의 코드를 망가뜨리지 않도록 하는건 여러분이 해야 하는 일입니다.
|
||||||
|
|
||||||
|
|
||||||
SMP 배리어 짝맞추기
|
SMP 배리어 짝맞추기
|
||||||
--------------------
|
--------------------
|
||||||
|
@@ -2401,9 +2401,9 @@
|
|||||||
|
|
||||||
This takes one argument, which is a single letter. It calls the
|
This takes one argument, which is a single letter. It calls the
|
||||||
generic kernel's SysRq driver, which does whatever is called for by
|
generic kernel's SysRq driver, which does whatever is called for by
|
||||||
that argument. See the SysRq documentation in Documentation/sysrq.txt
|
that argument. See the SysRq documentation in
|
||||||
in your favorite kernel tree to see what letters are valid and what
|
Documentation/admin-guide/sysrq.rst in your favorite kernel tree to
|
||||||
they do.
|
see what letters are valid and what they do.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -212,3 +212,117 @@ Finally we move core 4-7 over to the new group and make sure that the
|
|||||||
kernel and the tasks running there get 50% of the cache.
|
kernel and the tasks running there get 50% of the cache.
|
||||||
|
|
||||||
# echo C0 > p0/cpus
|
# echo C0 > p0/cpus
|
||||||
|
|
||||||
|
4) Locking between applications
|
||||||
|
|
||||||
|
Certain operations on the resctrl filesystem, composed of read/writes
|
||||||
|
to/from multiple files, must be atomic.
|
||||||
|
|
||||||
|
As an example, the allocation of an exclusive reservation of L3 cache
|
||||||
|
involves:
|
||||||
|
|
||||||
|
1. Read the cbmmasks from each directory
|
||||||
|
2. Find a contiguous set of bits in the global CBM bitmask that is clear
|
||||||
|
in any of the directory cbmmasks
|
||||||
|
3. Create a new directory
|
||||||
|
4. Set the bits found in step 2 to the new directory "schemata" file
|
||||||
|
|
||||||
|
If two applications attempt to allocate space concurrently then they can
|
||||||
|
end up allocating the same bits so the reservations are shared instead of
|
||||||
|
exclusive.
|
||||||
|
|
||||||
|
To coordinate atomic operations on the resctrlfs and to avoid the problem
|
||||||
|
above, the following locking procedure is recommended:
|
||||||
|
|
||||||
|
Locking is based on flock, which is available in libc and also as a shell
|
||||||
|
script command
|
||||||
|
|
||||||
|
Write lock:
|
||||||
|
|
||||||
|
A) Take flock(LOCK_EX) on /sys/fs/resctrl
|
||||||
|
B) Read/write the directory structure.
|
||||||
|
C) funlock
|
||||||
|
|
||||||
|
Read lock:
|
||||||
|
|
||||||
|
A) Take flock(LOCK_SH) on /sys/fs/resctrl
|
||||||
|
B) If success read the directory structure.
|
||||||
|
C) funlock
|
||||||
|
|
||||||
|
Example with bash:
|
||||||
|
|
||||||
|
# Atomically read directory structure
|
||||||
|
$ flock -s /sys/fs/resctrl/ find /sys/fs/resctrl
|
||||||
|
|
||||||
|
# Read directory contents and create new subdirectory
|
||||||
|
|
||||||
|
$ cat create-dir.sh
|
||||||
|
find /sys/fs/resctrl/ > output.txt
|
||||||
|
mask = function-of(output.txt)
|
||||||
|
mkdir /sys/fs/resctrl/newres/
|
||||||
|
echo mask > /sys/fs/resctrl/newres/schemata
|
||||||
|
|
||||||
|
$ flock /sys/fs/resctrl/ ./create-dir.sh
|
||||||
|
|
||||||
|
Example with C:
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Example code do take advisory locks
|
||||||
|
* before accessing resctrl filesystem
|
||||||
|
*/
|
||||||
|
#include <sys/file.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
void resctrl_take_shared_lock(int fd)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
/* take shared lock on resctrl filesystem */
|
||||||
|
ret = flock(fd, LOCK_SH);
|
||||||
|
if (ret) {
|
||||||
|
perror("flock");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void resctrl_take_exclusive_lock(int fd)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
/* release lock on resctrl filesystem */
|
||||||
|
ret = flock(fd, LOCK_EX);
|
||||||
|
if (ret) {
|
||||||
|
perror("flock");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void resctrl_release_lock(int fd)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
/* take shared lock on resctrl filesystem */
|
||||||
|
ret = flock(fd, LOCK_UN);
|
||||||
|
if (ret) {
|
||||||
|
perror("flock");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void main(void)
|
||||||
|
{
|
||||||
|
int fd, ret;
|
||||||
|
|
||||||
|
fd = open("/sys/fs/resctrl", O_DIRECTORY);
|
||||||
|
if (fd == -1) {
|
||||||
|
perror("open");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
resctrl_take_shared_lock(fd);
|
||||||
|
/* code to read directory contents */
|
||||||
|
resctrl_release_lock(fd);
|
||||||
|
|
||||||
|
resctrl_take_exclusive_lock(fd);
|
||||||
|
/* code to read and write directory contents */
|
||||||
|
resctrl_release_lock(fd);
|
||||||
|
}
|
||||||
|
20
MAINTAINERS
20
MAINTAINERS
@@ -5034,7 +5034,6 @@ F: lib/fault-inject.c
|
|||||||
|
|
||||||
FBTFT Framebuffer drivers
|
FBTFT Framebuffer drivers
|
||||||
M: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
M: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||||
M: Noralf Trønnes <noralf@tronnes.org>
|
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/staging/fbtft/
|
F: drivers/staging/fbtft/
|
||||||
|
|
||||||
@@ -6012,9 +6011,8 @@ F: include/linux/hsi/
|
|||||||
F: include/uapi/linux/hsi/
|
F: include/uapi/linux/hsi/
|
||||||
|
|
||||||
HSO 3G MODEM DRIVER
|
HSO 3G MODEM DRIVER
|
||||||
M: Jan Dumon <j.dumon@option.com>
|
L: linux-usb@vger.kernel.org
|
||||||
W: http://www.pharscape.org
|
S: Orphan
|
||||||
S: Maintained
|
|
||||||
F: drivers/net/usb/hso.c
|
F: drivers/net/usb/hso.c
|
||||||
|
|
||||||
HSR NETWORK PROTOCOL
|
HSR NETWORK PROTOCOL
|
||||||
@@ -7483,18 +7481,24 @@ L: linuxppc-dev@lists.ozlabs.org
|
|||||||
Q: http://patchwork.ozlabs.org/project/linuxppc-dev/list/
|
Q: http://patchwork.ozlabs.org/project/linuxppc-dev/list/
|
||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
|
||||||
S: Supported
|
S: Supported
|
||||||
|
F: Documentation/ABI/stable/sysfs-firmware-opal-*
|
||||||
|
F: Documentation/devicetree/bindings/powerpc/opal/
|
||||||
|
F: Documentation/devicetree/bindings/rtc/rtc-opal.txt
|
||||||
|
F: Documentation/devicetree/bindings/i2c/i2c-opal.txt
|
||||||
F: Documentation/powerpc/
|
F: Documentation/powerpc/
|
||||||
F: arch/powerpc/
|
F: arch/powerpc/
|
||||||
F: drivers/char/tpm/tpm_ibmvtpm*
|
F: drivers/char/tpm/tpm_ibmvtpm*
|
||||||
F: drivers/crypto/nx/
|
F: drivers/crypto/nx/
|
||||||
F: drivers/crypto/vmx/
|
F: drivers/crypto/vmx/
|
||||||
|
F: drivers/i2c/busses/i2c-opal.c
|
||||||
F: drivers/net/ethernet/ibm/ibmveth.*
|
F: drivers/net/ethernet/ibm/ibmveth.*
|
||||||
F: drivers/net/ethernet/ibm/ibmvnic.*
|
F: drivers/net/ethernet/ibm/ibmvnic.*
|
||||||
F: drivers/pci/hotplug/pnv_php.c
|
F: drivers/pci/hotplug/pnv_php.c
|
||||||
F: drivers/pci/hotplug/rpa*
|
F: drivers/pci/hotplug/rpa*
|
||||||
|
F: drivers/rtc/rtc-opal.c
|
||||||
F: drivers/scsi/ibmvscsi/
|
F: drivers/scsi/ibmvscsi/
|
||||||
|
F: drivers/tty/hvc/hvc_opal.c
|
||||||
F: tools/testing/selftests/powerpc
|
F: tools/testing/selftests/powerpc
|
||||||
N: opal
|
|
||||||
N: /pmac
|
N: /pmac
|
||||||
N: powermac
|
N: powermac
|
||||||
N: powernv
|
N: powernv
|
||||||
@@ -10330,6 +10334,12 @@ L: linux-scsi@vger.kernel.org
|
|||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/scsi/qedi/
|
F: drivers/scsi/qedi/
|
||||||
|
|
||||||
|
QLOGIC QL41xxx FCOE DRIVER
|
||||||
|
M: QLogic-Storage-Upstream@cavium.com
|
||||||
|
L: linux-scsi@vger.kernel.org
|
||||||
|
S: Supported
|
||||||
|
F: drivers/scsi/qedf/
|
||||||
|
|
||||||
QNX4 FILESYSTEM
|
QNX4 FILESYSTEM
|
||||||
M: Anders Larsen <al@alarsen.net>
|
M: Anders Larsen <al@alarsen.net>
|
||||||
W: http://www.alarsen.net/linux/qnx4fs/
|
W: http://www.alarsen.net/linux/qnx4fs/
|
||||||
|
28
Makefile
28
Makefile
@@ -1,7 +1,7 @@
|
|||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 10
|
PATCHLEVEL = 11
|
||||||
SUBLEVEL = 0
|
SUBLEVEL = 0
|
||||||
EXTRAVERSION =
|
EXTRAVERSION = -rc1
|
||||||
NAME = Fearless Coyote
|
NAME = Fearless Coyote
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
@@ -910,6 +910,18 @@ mod_sign_cmd = true
|
|||||||
endif
|
endif
|
||||||
export mod_sign_cmd
|
export mod_sign_cmd
|
||||||
|
|
||||||
|
ifdef CONFIG_STACK_VALIDATION
|
||||||
|
has_libelf := $(call try-run,\
|
||||||
|
echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -,1,0)
|
||||||
|
ifeq ($(has_libelf),1)
|
||||||
|
objtool_target := tools/objtool FORCE
|
||||||
|
else
|
||||||
|
$(warning "Cannot use CONFIG_STACK_VALIDATION, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
|
||||||
|
SKIP_STACK_VALIDATION := 1
|
||||||
|
export SKIP_STACK_VALIDATION
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(KBUILD_EXTMOD),)
|
ifeq ($(KBUILD_EXTMOD),)
|
||||||
core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
|
core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
|
||||||
@@ -1037,18 +1049,6 @@ prepare0: archprepare gcc-plugins
|
|||||||
# All the preparing..
|
# All the preparing..
|
||||||
prepare: prepare0 prepare-objtool
|
prepare: prepare0 prepare-objtool
|
||||||
|
|
||||||
ifdef CONFIG_STACK_VALIDATION
|
|
||||||
has_libelf := $(call try-run,\
|
|
||||||
echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -,1,0)
|
|
||||||
ifeq ($(has_libelf),1)
|
|
||||||
objtool_target := tools/objtool FORCE
|
|
||||||
else
|
|
||||||
$(warning "Cannot use CONFIG_STACK_VALIDATION, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
|
|
||||||
SKIP_STACK_VALIDATION := 1
|
|
||||||
export SKIP_STACK_VALIDATION
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
PHONY += prepare-objtool
|
PHONY += prepare-objtool
|
||||||
prepare-objtool: $(objtool_target)
|
prepare-objtool: $(objtool_target)
|
||||||
|
|
||||||
|
@@ -15,6 +15,7 @@
|
|||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
|
|
||||||
#include <linux/user.h>
|
#include <linux/user.h>
|
||||||
|
#include <linux/mm_types.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fill in the user structure for an ECOFF core dump.
|
* Fill in the user structure for an ECOFF core dump.
|
||||||
|
@@ -7,6 +7,8 @@
|
|||||||
* Copyright (C) 1996, Linus Torvalds
|
* Copyright (C) 1996, Linus Torvalds
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <linux/mm_types.h>
|
||||||
|
|
||||||
#include <asm/machvec.h>
|
#include <asm/machvec.h>
|
||||||
#include <asm/compiler.h>
|
#include <asm/compiler.h>
|
||||||
#include <asm-generic/mm_hooks.h>
|
#include <asm-generic/mm_hooks.h>
|
||||||
|
@@ -11,7 +11,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched/signal.h>
|
||||||
|
#include <linux/sched/mm.h>
|
||||||
|
#include <linux/sched/task_stack.h>
|
||||||
|
#include <linux/sched/cputime.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/smp.h>
|
#include <linux/smp.h>
|
||||||
|
@@ -11,6 +11,9 @@
|
|||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
#include <linux/sched/debug.h>
|
||||||
|
#include <linux/sched/task.h>
|
||||||
|
#include <linux/sched/task_stack.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/smp.h>
|
#include <linux/smp.h>
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
#include <linux/sched/task_stack.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/smp.h>
|
#include <linux/smp.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
|
@@ -6,7 +6,8 @@
|
|||||||
* 1997-11-02 Modified for POSIX.1b signals by Richard Henderson
|
* 1997-11-02 Modified for POSIX.1b signals by Richard Henderson
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/sched.h>
|
#include <linux/sched/signal.h>
|
||||||
|
#include <linux/sched/task_stack.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/signal.h>
|
#include <linux/signal.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/kernel_stat.h>
|
#include <linux/kernel_stat.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched/mm.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
#include <linux/threads.h>
|
#include <linux/threads.h>
|
||||||
|
@@ -10,7 +10,8 @@
|
|||||||
|
|
||||||
#include <linux/jiffies.h>
|
#include <linux/jiffies.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched/signal.h>
|
||||||
|
#include <linux/sched/debug.h>
|
||||||
#include <linux/tty.h>
|
#include <linux/tty.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/extable.h>
|
#include <linux/extable.h>
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
#include <asm/ptrace.h>
|
||||||
|
|
||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 1995 Linus Torvalds
|
* Copyright (C) 1995 Linus Torvalds
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/sched.h>
|
#include <linux/sched/signal.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include <asm/arcregs.h>
|
#include <asm/arcregs.h>
|
||||||
#include <asm/tlb.h>
|
#include <asm/tlb.h>
|
||||||
|
#include <linux/sched/mm.h>
|
||||||
|
|
||||||
#include <asm-generic/mm_hooks.h>
|
#include <asm-generic/mm_hooks.h>
|
||||||
|
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include <asm/asm-offsets.h>
|
#include <asm/asm-offsets.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
#include <linux/sched/debug.h>
|
||||||
#ifdef CONFIG_ARC_PLAT_EZNPS
|
#ifdef CONFIG_ARC_PLAT_EZNPS
|
||||||
#include <plat/ctop.h>
|
#include <plat/ctop.h>
|
||||||
#endif
|
#endif
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include <linux/kgdb.h>
|
#include <linux/kgdb.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
#include <linux/sched/task_stack.h>
|
||||||
#include <asm/disasm.h>
|
#include <asm/disasm.h>
|
||||||
#include <asm/cacheflush.h>
|
#include <asm/cacheflush.h>
|
||||||
|
|
||||||
|
@@ -11,6 +11,9 @@
|
|||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
#include <linux/sched/task.h>
|
||||||
|
#include <linux/sched/task_stack.h>
|
||||||
|
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/unistd.h>
|
#include <linux/unistd.h>
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include <linux/ptrace.h>
|
#include <linux/ptrace.h>
|
||||||
#include <linux/tracehook.h>
|
#include <linux/tracehook.h>
|
||||||
|
#include <linux/sched/task_stack.h>
|
||||||
#include <linux/regset.h>
|
#include <linux/regset.h>
|
||||||
#include <linux/unistd.h>
|
#include <linux/unistd.h>
|
||||||
#include <linux/elf.h>
|
#include <linux/elf.h>
|
||||||
|
@@ -53,6 +53,8 @@
|
|||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
#include <linux/syscalls.h>
|
#include <linux/syscalls.h>
|
||||||
#include <linux/tracehook.h>
|
#include <linux/tracehook.h>
|
||||||
|
#include <linux/sched/task_stack.h>
|
||||||
|
|
||||||
#include <asm/ucontext.h>
|
#include <asm/ucontext.h>
|
||||||
|
|
||||||
struct rt_sigframe {
|
struct rt_sigframe {
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/spinlock.h>
|
#include <linux/spinlock.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched/mm.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/profile.h>
|
#include <linux/profile.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
|
@@ -28,6 +28,8 @@
|
|||||||
#include <linux/export.h>
|
#include <linux/export.h>
|
||||||
#include <linux/stacktrace.h>
|
#include <linux/stacktrace.h>
|
||||||
#include <linux/kallsyms.h>
|
#include <linux/kallsyms.h>
|
||||||
|
#include <linux/sched/debug.h>
|
||||||
|
|
||||||
#include <asm/arcregs.h>
|
#include <asm/arcregs.h>
|
||||||
#include <asm/unwind.h>
|
#include <asm/unwind.h>
|
||||||
#include <asm/switch_to.h>
|
#include <asm/switch_to.h>
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
* Rahul Trivedi: Codito Technologies 2004
|
* Rahul Trivedi: Codito Technologies 2004
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/sched.h>
|
#include <linux/sched/signal.h>
|
||||||
#include <linux/kdebug.h>
|
#include <linux/kdebug.h>
|
||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
#include <linux/ptrace.h>
|
#include <linux/ptrace.h>
|
||||||
|
@@ -13,6 +13,9 @@
|
|||||||
#include <linux/fs_struct.h>
|
#include <linux/fs_struct.h>
|
||||||
#include <linux/proc_fs.h>
|
#include <linux/proc_fs.h>
|
||||||
#include <linux/file.h>
|
#include <linux/file.h>
|
||||||
|
#include <linux/sched/mm.h>
|
||||||
|
#include <linux/sched/debug.h>
|
||||||
|
|
||||||
#include <asm/arcregs.h>
|
#include <asm/arcregs.h>
|
||||||
#include <asm/irqflags.h>
|
#include <asm/irqflags.h>
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#include <linux/signal.h>
|
#include <linux/signal.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched/signal.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/ptrace.h>
|
#include <linux/ptrace.h>
|
||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
|
@@ -13,7 +13,8 @@
|
|||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/mman.h>
|
#include <linux/mman.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched/mm.h>
|
||||||
|
|
||||||
#include <asm/cacheflush.h>
|
#include <asm/cacheflush.h>
|
||||||
|
|
||||||
#define COLOUR_ALIGN(addr, pgoff) \
|
#define COLOUR_ALIGN(addr, pgoff) \
|
||||||
|
@@ -53,6 +53,8 @@
|
|||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/bug.h>
|
#include <linux/bug.h>
|
||||||
|
#include <linux/mm_types.h>
|
||||||
|
|
||||||
#include <asm/arcregs.h>
|
#include <asm/arcregs.h>
|
||||||
#include <asm/setup.h>
|
#include <asm/setup.h>
|
||||||
#include <asm/mmu_context.h>
|
#include <asm/mmu_context.h>
|
||||||
|
@@ -2,6 +2,7 @@ config ARM
|
|||||||
bool
|
bool
|
||||||
default y
|
default y
|
||||||
select ARCH_CLOCKSOURCE_DATA
|
select ARCH_CLOCKSOURCE_DATA
|
||||||
|
select ARCH_HAS_DEBUG_VIRTUAL
|
||||||
select ARCH_HAS_DEVMEM_IS_ALLOWED
|
select ARCH_HAS_DEVMEM_IS_ALLOWED
|
||||||
select ARCH_HAS_ELF_RANDOMIZE
|
select ARCH_HAS_ELF_RANDOMIZE
|
||||||
select ARCH_HAS_SET_MEMORY
|
select ARCH_HAS_SET_MEMORY
|
||||||
|
@@ -34,8 +34,7 @@ config PROCESSOR_ID
|
|||||||
used instead of the auto-probing which utilizes the register.
|
used instead of the auto-probing which utilizes the register.
|
||||||
|
|
||||||
config REMAP_VECTORS_TO_RAM
|
config REMAP_VECTORS_TO_RAM
|
||||||
bool 'Install vectors to the beginning of RAM' if DRAM_BASE
|
bool 'Install vectors to the beginning of RAM'
|
||||||
depends on DRAM_BASE
|
|
||||||
help
|
help
|
||||||
The kernel needs to change the hardware exception vectors.
|
The kernel needs to change the hardware exception vectors.
|
||||||
In nommu mode, the hardware exception vectors are normally
|
In nommu mode, the hardware exception vectors are normally
|
||||||
|
@@ -32,6 +32,7 @@ extern void error(char *);
|
|||||||
|
|
||||||
/* Not needed, but used in some headers pulled in by decompressors */
|
/* Not needed, but used in some headers pulled in by decompressors */
|
||||||
extern char * strstr(const char * s1, const char *s2);
|
extern char * strstr(const char * s1, const char *s2);
|
||||||
|
extern size_t strlen(const char *s);
|
||||||
|
|
||||||
#ifdef CONFIG_KERNEL_GZIP
|
#ifdef CONFIG_KERNEL_GZIP
|
||||||
#include "../../../../lib/decompress_inflate.c"
|
#include "../../../../lib/decompress_inflate.c"
|
||||||
|
@@ -13,7 +13,8 @@
|
|||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched/signal.h>
|
||||||
|
#include <uapi/linux/sched/types.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/cpu_pm.h>
|
#include <linux/cpu_pm.h>
|
||||||
#include <linux/cpu.h>
|
#include <linux/cpu.h>
|
||||||
|
@@ -144,7 +144,7 @@ extern unsigned long mcpm_entry_vectors[MAX_NR_CLUSTERS][MAX_CPUS_PER_CLUSTER];
|
|||||||
|
|
||||||
void mcpm_set_entry_vector(unsigned cpu, unsigned cluster, void *ptr)
|
void mcpm_set_entry_vector(unsigned cpu, unsigned cluster, void *ptr)
|
||||||
{
|
{
|
||||||
unsigned long val = ptr ? virt_to_phys(ptr) : 0;
|
unsigned long val = ptr ? __pa_symbol(ptr) : 0;
|
||||||
mcpm_entry_vectors[cluster][cpu] = val;
|
mcpm_entry_vectors[cluster][cpu] = val;
|
||||||
sync_cache_w(&mcpm_entry_vectors[cluster][cpu]);
|
sync_cache_w(&mcpm_entry_vectors[cluster][cpu]);
|
||||||
}
|
}
|
||||||
@@ -299,8 +299,8 @@ void mcpm_cpu_power_down(void)
|
|||||||
* the kernel as if the power_up method just had deasserted reset
|
* the kernel as if the power_up method just had deasserted reset
|
||||||
* on the CPU.
|
* on the CPU.
|
||||||
*/
|
*/
|
||||||
phys_reset = (phys_reset_t)(unsigned long)virt_to_phys(cpu_reset);
|
phys_reset = (phys_reset_t)(unsigned long)__pa_symbol(cpu_reset);
|
||||||
phys_reset(virt_to_phys(mcpm_entry_point));
|
phys_reset(__pa_symbol(mcpm_entry_point));
|
||||||
|
|
||||||
/* should never get here */
|
/* should never get here */
|
||||||
BUG();
|
BUG();
|
||||||
@@ -388,8 +388,8 @@ static int __init nocache_trampoline(unsigned long _arg)
|
|||||||
__mcpm_outbound_leave_critical(cluster, CLUSTER_DOWN);
|
__mcpm_outbound_leave_critical(cluster, CLUSTER_DOWN);
|
||||||
__mcpm_cpu_down(cpu, cluster);
|
__mcpm_cpu_down(cpu, cluster);
|
||||||
|
|
||||||
phys_reset = (phys_reset_t)(unsigned long)virt_to_phys(cpu_reset);
|
phys_reset = (phys_reset_t)(unsigned long)__pa_symbol(cpu_reset);
|
||||||
phys_reset(virt_to_phys(mcpm_entry_point));
|
phys_reset(__pa_symbol(mcpm_entry_point));
|
||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -449,7 +449,7 @@ int __init mcpm_sync_init(
|
|||||||
sync_cache_w(&mcpm_sync);
|
sync_cache_w(&mcpm_sync);
|
||||||
|
|
||||||
if (power_up_setup) {
|
if (power_up_setup) {
|
||||||
mcpm_power_up_setup_phys = virt_to_phys(power_up_setup);
|
mcpm_power_up_setup_phys = __pa_symbol(power_up_setup);
|
||||||
sync_cache_w(&mcpm_power_up_setup_phys);
|
sync_cache_w(&mcpm_power_up_setup_phys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -18,9 +18,8 @@ CONFIG_EMBEDDED=y
|
|||||||
# CONFIG_LBDAF is not set
|
# CONFIG_LBDAF is not set
|
||||||
# CONFIG_BLK_DEV_BSG is not set
|
# CONFIG_BLK_DEV_BSG is not set
|
||||||
# CONFIG_IOSCHED_DEADLINE is not set
|
# CONFIG_IOSCHED_DEADLINE is not set
|
||||||
CONFIG_ARCH_MULTI_V4T=y
|
CONFIG_ARCH_MULTI_V4=y
|
||||||
# CONFIG_ARCH_MULTI_V7 is not set
|
# CONFIG_ARCH_MULTI_V7 is not set
|
||||||
CONFIG_KEYBOARD_GPIO_POLLED=y
|
|
||||||
CONFIG_ARCH_MOXART=y
|
CONFIG_ARCH_MOXART=y
|
||||||
CONFIG_MACH_UC7112LX=y
|
CONFIG_MACH_UC7112LX=y
|
||||||
CONFIG_PREEMPT=y
|
CONFIG_PREEMPT=y
|
||||||
@@ -94,12 +93,10 @@ CONFIG_SERIAL_8250_EXTENDED=y
|
|||||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||||
CONFIG_SERIAL_OF_PLATFORM=y
|
CONFIG_SERIAL_OF_PLATFORM=y
|
||||||
# CONFIG_HW_RANDOM is not set
|
# CONFIG_HW_RANDOM is not set
|
||||||
CONFIG_DEBUG_GPIO=y
|
|
||||||
CONFIG_GPIO_SYSFS=y
|
|
||||||
CONFIG_GPIO_MOXART=y
|
CONFIG_GPIO_MOXART=y
|
||||||
CONFIG_POWER_SUPPLY=y
|
|
||||||
CONFIG_POWER_RESET=y
|
CONFIG_POWER_RESET=y
|
||||||
CONFIG_POWER_RESET_GPIO=y
|
CONFIG_POWER_RESET_GPIO=y
|
||||||
|
CONFIG_POWER_SUPPLY=y
|
||||||
# CONFIG_HWMON is not set
|
# CONFIG_HWMON is not set
|
||||||
CONFIG_WATCHDOG=y
|
CONFIG_WATCHDOG=y
|
||||||
CONFIG_WATCHDOG_CORE=y
|
CONFIG_WATCHDOG_CORE=y
|
||||||
@@ -107,10 +104,13 @@ CONFIG_WATCHDOG_NOWAYOUT=y
|
|||||||
CONFIG_MOXART_WDT=y
|
CONFIG_MOXART_WDT=y
|
||||||
# CONFIG_USB_SUPPORT is not set
|
# CONFIG_USB_SUPPORT is not set
|
||||||
CONFIG_MMC=y
|
CONFIG_MMC=y
|
||||||
CONFIG_MMC_SDHCI_MOXART=y
|
CONFIG_MMC_SDHCI=y
|
||||||
|
CONFIG_MMC_SDHCI_PLTFM=y
|
||||||
|
CONFIG_MMC_MOXART=y
|
||||||
CONFIG_NEW_LEDS=y
|
CONFIG_NEW_LEDS=y
|
||||||
CONFIG_LEDS_CLASS=y
|
CONFIG_LEDS_CLASS=y
|
||||||
CONFIG_LEDS_GPIO=y
|
CONFIG_LEDS_GPIO=y
|
||||||
|
CONFIG_LEDS_TRIGGERS=y
|
||||||
CONFIG_LEDS_TRIGGER_TIMER=y
|
CONFIG_LEDS_TRIGGER_TIMER=y
|
||||||
CONFIG_LEDS_TRIGGER_ONESHOT=y
|
CONFIG_LEDS_TRIGGER_ONESHOT=y
|
||||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||||
|
@@ -15,7 +15,17 @@ ce-obj-$(CONFIG_CRYPTO_SHA1_ARM_CE) += sha1-arm-ce.o
|
|||||||
ce-obj-$(CONFIG_CRYPTO_SHA2_ARM_CE) += sha2-arm-ce.o
|
ce-obj-$(CONFIG_CRYPTO_SHA2_ARM_CE) += sha2-arm-ce.o
|
||||||
ce-obj-$(CONFIG_CRYPTO_GHASH_ARM_CE) += ghash-arm-ce.o
|
ce-obj-$(CONFIG_CRYPTO_GHASH_ARM_CE) += ghash-arm-ce.o
|
||||||
ce-obj-$(CONFIG_CRYPTO_CRCT10DIF_ARM_CE) += crct10dif-arm-ce.o
|
ce-obj-$(CONFIG_CRYPTO_CRCT10DIF_ARM_CE) += crct10dif-arm-ce.o
|
||||||
ce-obj-$(CONFIG_CRYPTO_CRC32_ARM_CE) += crc32-arm-ce.o
|
crc-obj-$(CONFIG_CRYPTO_CRC32_ARM_CE) += crc32-arm-ce.o
|
||||||
|
|
||||||
|
ifneq ($(crc-obj-y)$(crc-obj-m),)
|
||||||
|
ifeq ($(call as-instr,.arch armv8-a\n.arch_extension crc,y,n),y)
|
||||||
|
ce-obj-y += $(crc-obj-y)
|
||||||
|
ce-obj-m += $(crc-obj-m)
|
||||||
|
else
|
||||||
|
$(warning These CRC Extensions modules need binutils 2.23 or higher)
|
||||||
|
$(warning $(crc-obj-y) $(crc-obj-m))
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(ce-obj-y)$(ce-obj-m),)
|
ifneq ($(ce-obj-y)$(ce-obj-m),)
|
||||||
ifeq ($(call as-instr,.fpu crypto-neon-fp-armv8,y,n),y)
|
ifeq ($(call as-instr,.fpu crypto-neon-fp-armv8,y,n),y)
|
||||||
|
@@ -135,7 +135,7 @@ ENTRY(crc32c_pmull_le)
|
|||||||
vld1.8 {q3-q4}, [BUF, :128]!
|
vld1.8 {q3-q4}, [BUF, :128]!
|
||||||
vmov.i8 qzr, #0
|
vmov.i8 qzr, #0
|
||||||
vmov.i8 qCONSTANT, #0
|
vmov.i8 qCONSTANT, #0
|
||||||
vmov dCONSTANTl[0], CRC
|
vmov.32 dCONSTANTl[0], CRC
|
||||||
veor.8 d2, d2, dCONSTANTl
|
veor.8 d2, d2, dCONSTANTl
|
||||||
sub LEN, LEN, #0x40
|
sub LEN, LEN, #0x40
|
||||||
cmp LEN, #0x40
|
cmp LEN, #0x40
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
#ifndef __CACHE_UNIPHIER_H
|
#ifndef __CACHE_UNIPHIER_H
|
||||||
#define __CACHE_UNIPHIER_H
|
#define __CACHE_UNIPHIER_H
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/errno.h>
|
||||||
|
|
||||||
#ifdef CONFIG_CACHE_UNIPHIER
|
#ifdef CONFIG_CACHE_UNIPHIER
|
||||||
int uniphier_cache_init(void);
|
int uniphier_cache_init(void);
|
||||||
|
@@ -83,8 +83,15 @@
|
|||||||
#define IOREMAP_MAX_ORDER 24
|
#define IOREMAP_MAX_ORDER 24
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define VECTORS_BASE UL(0xffff0000)
|
||||||
|
|
||||||
#else /* CONFIG_MMU */
|
#else /* CONFIG_MMU */
|
||||||
|
|
||||||
|
#ifndef __ASSEMBLY__
|
||||||
|
extern unsigned long vectors_base;
|
||||||
|
#define VECTORS_BASE vectors_base
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The limitation of user task size can grow up to the end of free ram region.
|
* The limitation of user task size can grow up to the end of free ram region.
|
||||||
* It is difficult to define and perhaps will never meet the original meaning
|
* It is difficult to define and perhaps will never meet the original meaning
|
||||||
@@ -111,6 +118,13 @@
|
|||||||
|
|
||||||
#endif /* !CONFIG_MMU */
|
#endif /* !CONFIG_MMU */
|
||||||
|
|
||||||
|
#ifdef CONFIG_XIP_KERNEL
|
||||||
|
#define KERNEL_START _sdata
|
||||||
|
#else
|
||||||
|
#define KERNEL_START _stext
|
||||||
|
#endif
|
||||||
|
#define KERNEL_END _end
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We fix the TCM memories max 32 KiB ITCM resp DTCM at these
|
* We fix the TCM memories max 32 KiB ITCM resp DTCM at these
|
||||||
* locations
|
* locations
|
||||||
@@ -206,7 +220,7 @@ extern const void *__pv_table_begin, *__pv_table_end;
|
|||||||
: "r" (x), "I" (__PV_BITS_31_24) \
|
: "r" (x), "I" (__PV_BITS_31_24) \
|
||||||
: "cc")
|
: "cc")
|
||||||
|
|
||||||
static inline phys_addr_t __virt_to_phys(unsigned long x)
|
static inline phys_addr_t __virt_to_phys_nodebug(unsigned long x)
|
||||||
{
|
{
|
||||||
phys_addr_t t;
|
phys_addr_t t;
|
||||||
|
|
||||||
@@ -238,7 +252,7 @@ static inline unsigned long __phys_to_virt(phys_addr_t x)
|
|||||||
#define PHYS_OFFSET PLAT_PHYS_OFFSET
|
#define PHYS_OFFSET PLAT_PHYS_OFFSET
|
||||||
#define PHYS_PFN_OFFSET ((unsigned long)(PHYS_OFFSET >> PAGE_SHIFT))
|
#define PHYS_PFN_OFFSET ((unsigned long)(PHYS_OFFSET >> PAGE_SHIFT))
|
||||||
|
|
||||||
static inline phys_addr_t __virt_to_phys(unsigned long x)
|
static inline phys_addr_t __virt_to_phys_nodebug(unsigned long x)
|
||||||
{
|
{
|
||||||
return (phys_addr_t)x - PAGE_OFFSET + PHYS_OFFSET;
|
return (phys_addr_t)x - PAGE_OFFSET + PHYS_OFFSET;
|
||||||
}
|
}
|
||||||
@@ -254,6 +268,16 @@ static inline unsigned long __phys_to_virt(phys_addr_t x)
|
|||||||
((((unsigned long)(kaddr) - PAGE_OFFSET) >> PAGE_SHIFT) + \
|
((((unsigned long)(kaddr) - PAGE_OFFSET) >> PAGE_SHIFT) + \
|
||||||
PHYS_PFN_OFFSET)
|
PHYS_PFN_OFFSET)
|
||||||
|
|
||||||
|
#define __pa_symbol_nodebug(x) __virt_to_phys_nodebug((x))
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_VIRTUAL
|
||||||
|
extern phys_addr_t __virt_to_phys(unsigned long x);
|
||||||
|
extern phys_addr_t __phys_addr_symbol(unsigned long x);
|
||||||
|
#else
|
||||||
|
#define __virt_to_phys(x) __virt_to_phys_nodebug(x)
|
||||||
|
#define __phys_addr_symbol(x) __pa_symbol_nodebug(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These are *only* valid on the kernel direct mapped RAM memory.
|
* These are *only* valid on the kernel direct mapped RAM memory.
|
||||||
* Note: Drivers should NOT use these. They are the wrong
|
* Note: Drivers should NOT use these. They are the wrong
|
||||||
@@ -276,6 +300,7 @@ static inline void *phys_to_virt(phys_addr_t x)
|
|||||||
* Drivers should NOT use these either.
|
* Drivers should NOT use these either.
|
||||||
*/
|
*/
|
||||||
#define __pa(x) __virt_to_phys((unsigned long)(x))
|
#define __pa(x) __virt_to_phys((unsigned long)(x))
|
||||||
|
#define __pa_symbol(x) __phys_addr_symbol(RELOC_HIDE((unsigned long)(x), 0))
|
||||||
#define __va(x) ((void *)__phys_to_virt((phys_addr_t)(x)))
|
#define __va(x) ((void *)__phys_to_virt((phys_addr_t)(x)))
|
||||||
#define pfn_to_kaddr(pfn) __va((phys_addr_t)(pfn) << PAGE_SHIFT)
|
#define pfn_to_kaddr(pfn) __va((phys_addr_t)(pfn) << PAGE_SHIFT)
|
||||||
|
|
||||||
|
@@ -15,7 +15,9 @@
|
|||||||
|
|
||||||
#include <linux/compiler.h>
|
#include <linux/compiler.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
#include <linux/mm_types.h>
|
||||||
#include <linux/preempt.h>
|
#include <linux/preempt.h>
|
||||||
|
|
||||||
#include <asm/cacheflush.h>
|
#include <asm/cacheflush.h>
|
||||||
#include <asm/cachetype.h>
|
#include <asm/cachetype.h>
|
||||||
#include <asm/proc-fns.h>
|
#include <asm/proc-fns.h>
|
||||||
|
@@ -63,9 +63,9 @@ typedef pte_t *pte_addr_t;
|
|||||||
/*
|
/*
|
||||||
* Mark the prot value as uncacheable and unbufferable.
|
* Mark the prot value as uncacheable and unbufferable.
|
||||||
*/
|
*/
|
||||||
#define pgprot_noncached(prot) __pgprot(0)
|
#define pgprot_noncached(prot) (prot)
|
||||||
#define pgprot_writecombine(prot) __pgprot(0)
|
#define pgprot_writecombine(prot) (prot)
|
||||||
#define pgprot_dmacoherent(prot) __pgprot(0)
|
#define pgprot_dmacoherent(prot) (prot)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -10,6 +10,10 @@
|
|||||||
#ifndef _ASMARM_TLBFLUSH_H
|
#ifndef _ASMARM_TLBFLUSH_H
|
||||||
#define _ASMARM_TLBFLUSH_H
|
#define _ASMARM_TLBFLUSH_H
|
||||||
|
|
||||||
|
#ifndef __ASSEMBLY__
|
||||||
|
# include <linux/mm_types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_MMU
|
#ifdef CONFIG_MMU
|
||||||
|
|
||||||
#include <asm/glue.h>
|
#include <asm/glue.h>
|
||||||
@@ -644,9 +648,6 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,
|
|||||||
#elif defined(CONFIG_SMP) /* !CONFIG_MMU */
|
#elif defined(CONFIG_SMP) /* !CONFIG_MMU */
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
#include <linux/mm_types.h>
|
|
||||||
|
|
||||||
static inline void local_flush_tlb_all(void) { }
|
static inline void local_flush_tlb_all(void) { }
|
||||||
static inline void local_flush_tlb_mm(struct mm_struct *mm) { }
|
static inline void local_flush_tlb_mm(struct mm_struct *mm) { }
|
||||||
static inline void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) { }
|
static inline void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) { }
|
||||||
|
@@ -151,11 +151,6 @@ __after_proc_init:
|
|||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_CPU_ICACHE_DISABLE
|
#ifdef CONFIG_CPU_ICACHE_DISABLE
|
||||||
bic r0, r0, #CR_I
|
bic r0, r0, #CR_I
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_CPU_HIGH_VECTOR
|
|
||||||
orr r0, r0, #CR_V
|
|
||||||
#else
|
|
||||||
bic r0, r0, #CR_V
|
|
||||||
#endif
|
#endif
|
||||||
mcr p15, 0, r0, c1, c0, 0 @ write control reg
|
mcr p15, 0, r0, c1, c0, 0 @ write control reg
|
||||||
#elif defined (CONFIG_CPU_V7M)
|
#elif defined (CONFIG_CPU_V7M)
|
||||||
|
@@ -155,8 +155,17 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case R_ARM_PREL31:
|
case R_ARM_PREL31:
|
||||||
offset = *(u32 *)loc + sym->st_value - loc;
|
offset = (*(s32 *)loc << 1) >> 1; /* sign extend */
|
||||||
*(u32 *)loc = offset & 0x7fffffff;
|
offset += sym->st_value - loc;
|
||||||
|
if (offset >= 0x40000000 || offset < -0x40000000) {
|
||||||
|
pr_err("%s: section %u reloc %u sym '%s': relocation %u out of range (%#lx -> %#x)\n",
|
||||||
|
module->name, relindex, i, symname,
|
||||||
|
ELF32_R_TYPE(rel->r_info), loc,
|
||||||
|
sym->st_value);
|
||||||
|
return -ENOEXEC;
|
||||||
|
}
|
||||||
|
*(u32 *)loc &= 0x80000000;
|
||||||
|
*(u32 *)loc |= offset & 0x7fffffff;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case R_ARM_MOVW_ABS_NC:
|
case R_ARM_MOVW_ABS_NC:
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/perf_event.h>
|
#include <linux/perf_event.h>
|
||||||
#include <linux/bug.h>
|
#include <linux/bug.h>
|
||||||
|
#include <linux/sched/task_stack.h>
|
||||||
#include <asm/perf_regs.h>
|
#include <asm/perf_regs.h>
|
||||||
#include <asm/ptrace.h>
|
#include <asm/ptrace.h>
|
||||||
|
|
||||||
|
@@ -12,6 +12,9 @@
|
|||||||
|
|
||||||
#include <linux/export.h>
|
#include <linux/export.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
#include <linux/sched/debug.h>
|
||||||
|
#include <linux/sched/task.h>
|
||||||
|
#include <linux/sched/task_stack.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/stddef.h>
|
#include <linux/stddef.h>
|
||||||
|
@@ -10,7 +10,8 @@
|
|||||||
* published by the Free Software Foundation.
|
* published by the Free Software Foundation.
|
||||||
*/
|
*/
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched/signal.h>
|
||||||
|
#include <linux/sched/task_stack.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/elf.h>
|
#include <linux/elf.h>
|
||||||
#include <linux/smp.h>
|
#include <linux/smp.h>
|
||||||
|
@@ -81,7 +81,7 @@ __setup("fpe=", fpe_setup);
|
|||||||
extern void init_default_cache_policy(unsigned long);
|
extern void init_default_cache_policy(unsigned long);
|
||||||
extern void paging_init(const struct machine_desc *desc);
|
extern void paging_init(const struct machine_desc *desc);
|
||||||
extern void early_paging_init(const struct machine_desc *);
|
extern void early_paging_init(const struct machine_desc *);
|
||||||
extern void sanity_check_meminfo(void);
|
extern void adjust_lowmem_bounds(void);
|
||||||
extern enum reboot_mode reboot_mode;
|
extern enum reboot_mode reboot_mode;
|
||||||
extern void setup_dma_zone(const struct machine_desc *desc);
|
extern void setup_dma_zone(const struct machine_desc *desc);
|
||||||
|
|
||||||
@@ -1093,8 +1093,14 @@ void __init setup_arch(char **cmdline_p)
|
|||||||
setup_dma_zone(mdesc);
|
setup_dma_zone(mdesc);
|
||||||
xen_early_init();
|
xen_early_init();
|
||||||
efi_init();
|
efi_init();
|
||||||
sanity_check_meminfo();
|
/*
|
||||||
|
* Make sure the calculation for lowmem/highmem is set appropriately
|
||||||
|
* before reserving/allocating any mmeory
|
||||||
|
*/
|
||||||
|
adjust_lowmem_bounds();
|
||||||
arm_memblock_init(mdesc);
|
arm_memblock_init(mdesc);
|
||||||
|
/* Memory may have been removed so recalculate the bounds. */
|
||||||
|
adjust_lowmem_bounds();
|
||||||
|
|
||||||
early_ioremap_reset();
|
early_ioremap_reset();
|
||||||
|
|
||||||
|
@@ -11,7 +11,9 @@
|
|||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/spinlock.h>
|
#include <linux/spinlock.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched/mm.h>
|
||||||
|
#include <linux/sched/hotplug.h>
|
||||||
|
#include <linux/sched/task_stack.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/cache.h>
|
#include <linux/cache.h>
|
||||||
#include <linux/profile.h>
|
#include <linux/profile.h>
|
||||||
@@ -251,7 +253,7 @@ void __cpu_die(unsigned int cpu)
|
|||||||
pr_err("CPU%u: cpu didn't die\n", cpu);
|
pr_err("CPU%u: cpu didn't die\n", cpu);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pr_notice("CPU%u: shutdown\n", cpu);
|
pr_debug("CPU%u: shutdown\n", cpu);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* platform_cpu_kill() is generally expected to do the powering off
|
* platform_cpu_kill() is generally expected to do the powering off
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
#include <linux/export.h>
|
#include <linux/export.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
#include <linux/sched/debug.h>
|
||||||
#include <linux/stacktrace.h>
|
#include <linux/stacktrace.h>
|
||||||
|
|
||||||
#include <asm/stacktrace.h>
|
#include <asm/stacktrace.h>
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
#include <linux/mm_types.h>
|
||||||
|
|
||||||
#include <asm/cacheflush.h>
|
#include <asm/cacheflush.h>
|
||||||
#include <asm/idmap.h>
|
#include <asm/idmap.h>
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
#include <linux/proc_fs.h>
|
#include <linux/proc_fs.h>
|
||||||
#include <linux/seq_file.h>
|
#include <linux/seq_file.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
#include <linux/sched/mm.h>
|
||||||
#include <linux/syscalls.h>
|
#include <linux/syscalls.h>
|
||||||
#include <linux/perf_event.h>
|
#include <linux/perf_event.h>
|
||||||
|
|
||||||
|
@@ -76,6 +76,7 @@
|
|||||||
#include <linux/syscalls.h>
|
#include <linux/syscalls.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
#include <linux/cred.h>
|
||||||
#include <linux/fcntl.h>
|
#include <linux/fcntl.h>
|
||||||
#include <linux/eventpoll.h>
|
#include <linux/eventpoll.h>
|
||||||
#include <linux/sem.h>
|
#include <linux/sem.h>
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
#include <linux/nodemask.h>
|
#include <linux/nodemask.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
#include <linux/sched/topology.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/string.h>
|
#include <linux/string.h>
|
||||||
|
|
||||||
|
@@ -24,7 +24,9 @@
|
|||||||
#include <linux/bug.h>
|
#include <linux/bug.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched/signal.h>
|
||||||
|
#include <linux/sched/debug.h>
|
||||||
|
#include <linux/sched/task_stack.h>
|
||||||
#include <linux/irq.h>
|
#include <linux/irq.h>
|
||||||
|
|
||||||
#include <linux/atomic.h>
|
#include <linux/atomic.h>
|
||||||
|
@@ -27,7 +27,7 @@ static int alpine_boot_secondary(unsigned int cpu, struct task_struct *idle)
|
|||||||
{
|
{
|
||||||
phys_addr_t addr;
|
phys_addr_t addr;
|
||||||
|
|
||||||
addr = virt_to_phys(secondary_startup);
|
addr = __pa_symbol(secondary_startup);
|
||||||
|
|
||||||
if (addr > (phys_addr_t)(uint32_t)(-1)) {
|
if (addr > (phys_addr_t)(uint32_t)(-1)) {
|
||||||
pr_err("FAIL: resume address over 32bit (%pa)", &addr);
|
pr_err("FAIL: resume address over 32bit (%pa)", &addr);
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
static void write_release_addr(u32 release_phys)
|
static void write_release_addr(u32 release_phys)
|
||||||
{
|
{
|
||||||
u32 *virt = (u32 *) phys_to_virt(release_phys);
|
u32 *virt = (u32 *) phys_to_virt(release_phys);
|
||||||
writel_relaxed(virt_to_phys(secondary_startup), virt);
|
writel_relaxed(__pa_symbol(secondary_startup), virt);
|
||||||
/* Make sure this store is visible to other CPUs */
|
/* Make sure this store is visible to other CPUs */
|
||||||
smp_wmb();
|
smp_wmb();
|
||||||
__cpuc_flush_dcache_area(virt, sizeof(u32));
|
__cpuc_flush_dcache_area(virt, sizeof(u32));
|
||||||
|
@@ -135,7 +135,7 @@ static int bcm63138_smp_boot_secondary(unsigned int cpu,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Write the secondary init routine to the BootLUT reset vector */
|
/* Write the secondary init routine to the BootLUT reset vector */
|
||||||
val = virt_to_phys(secondary_startup);
|
val = __pa_symbol(secondary_startup);
|
||||||
writel_relaxed(val, bootlut_base + BOOTLUT_RESET_VECT);
|
writel_relaxed(val, bootlut_base + BOOTLUT_RESET_VECT);
|
||||||
|
|
||||||
/* Power up the core, will jump straight to its reset vector when we
|
/* Power up the core, will jump straight to its reset vector when we
|
||||||
|
@@ -151,7 +151,7 @@ static void brcmstb_cpu_boot(u32 cpu)
|
|||||||
* Set the reset vector to point to the secondary_startup
|
* Set the reset vector to point to the secondary_startup
|
||||||
* routine
|
* routine
|
||||||
*/
|
*/
|
||||||
cpu_set_boot_addr(cpu, virt_to_phys(secondary_startup));
|
cpu_set_boot_addr(cpu, __pa_symbol(secondary_startup));
|
||||||
|
|
||||||
/* Unhalt the cpu */
|
/* Unhalt the cpu */
|
||||||
cpu_rst_cfg_set(cpu, 0);
|
cpu_rst_cfg_set(cpu, 0);
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/of_address.h>
|
#include <linux/of_address.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
#include <linux/sched/clock.h>
|
||||||
#include <linux/smp.h>
|
#include <linux/smp.h>
|
||||||
|
|
||||||
#include <asm/cacheflush.h>
|
#include <asm/cacheflush.h>
|
||||||
@@ -116,7 +117,7 @@ static int nsp_write_lut(unsigned int cpu)
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
secondary_startup_phy = virt_to_phys(secondary_startup);
|
secondary_startup_phy = __pa_symbol(secondary_startup);
|
||||||
BUG_ON(secondary_startup_phy > (phys_addr_t)U32_MAX);
|
BUG_ON(secondary_startup_phy > (phys_addr_t)U32_MAX);
|
||||||
|
|
||||||
writel_relaxed(secondary_startup_phy, sku_rom_lut);
|
writel_relaxed(secondary_startup_phy, sku_rom_lut);
|
||||||
@@ -189,7 +190,7 @@ static int kona_boot_secondary(unsigned int cpu, struct task_struct *idle)
|
|||||||
* Secondary cores will start in secondary_startup(),
|
* Secondary cores will start in secondary_startup(),
|
||||||
* defined in "arch/arm/kernel/head.S"
|
* defined in "arch/arm/kernel/head.S"
|
||||||
*/
|
*/
|
||||||
boot_func = virt_to_phys(secondary_startup);
|
boot_func = __pa_symbol(secondary_startup);
|
||||||
BUG_ON(boot_func & BOOT_ADDR_CPUID_MASK);
|
BUG_ON(boot_func & BOOT_ADDR_CPUID_MASK);
|
||||||
BUG_ON(boot_func > (phys_addr_t)U32_MAX);
|
BUG_ON(boot_func > (phys_addr_t)U32_MAX);
|
||||||
|
|
||||||
|
@@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#include <asm/cacheflush.h>
|
#include <asm/cacheflush.h>
|
||||||
#include <asm/cp15.h>
|
#include <asm/cp15.h>
|
||||||
|
#include <asm/memory.h>
|
||||||
#include <asm/smp_plat.h>
|
#include <asm/smp_plat.h>
|
||||||
#include <asm/smp_scu.h>
|
#include <asm/smp_scu.h>
|
||||||
|
|
||||||
@@ -75,7 +76,7 @@ static void __init berlin_smp_prepare_cpus(unsigned int max_cpus)
|
|||||||
if (!cpu_ctrl)
|
if (!cpu_ctrl)
|
||||||
goto unmap_scu;
|
goto unmap_scu;
|
||||||
|
|
||||||
vectors_base = ioremap(CONFIG_VECTORS_BASE, SZ_32K);
|
vectors_base = ioremap(VECTORS_BASE, SZ_32K);
|
||||||
if (!vectors_base)
|
if (!vectors_base)
|
||||||
goto unmap_scu;
|
goto unmap_scu;
|
||||||
|
|
||||||
@@ -92,7 +93,7 @@ static void __init berlin_smp_prepare_cpus(unsigned int max_cpus)
|
|||||||
* Write the secondary startup address into the SW reset address
|
* Write the secondary startup address into the SW reset address
|
||||||
* vector. This is used by boot_inst.
|
* vector. This is used by boot_inst.
|
||||||
*/
|
*/
|
||||||
writel(virt_to_phys(secondary_startup), vectors_base + SW_RESET_ADDR);
|
writel(__pa_symbol(secondary_startup), vectors_base + SW_RESET_ADDR);
|
||||||
|
|
||||||
iounmap(vectors_base);
|
iounmap(vectors_base);
|
||||||
unmap_scu:
|
unmap_scu:
|
||||||
|
@@ -41,7 +41,7 @@ static int exynos_do_idle(unsigned long mode)
|
|||||||
case FW_DO_IDLE_AFTR:
|
case FW_DO_IDLE_AFTR:
|
||||||
if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
|
if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
|
||||||
exynos_save_cp15();
|
exynos_save_cp15();
|
||||||
writel_relaxed(virt_to_phys(exynos_cpu_resume_ns),
|
writel_relaxed(__pa_symbol(exynos_cpu_resume_ns),
|
||||||
sysram_ns_base_addr + 0x24);
|
sysram_ns_base_addr + 0x24);
|
||||||
writel_relaxed(EXYNOS_AFTR_MAGIC, sysram_ns_base_addr + 0x20);
|
writel_relaxed(EXYNOS_AFTR_MAGIC, sysram_ns_base_addr + 0x20);
|
||||||
if (soc_is_exynos3250()) {
|
if (soc_is_exynos3250()) {
|
||||||
@@ -135,7 +135,7 @@ static int exynos_suspend(void)
|
|||||||
exynos_save_cp15();
|
exynos_save_cp15();
|
||||||
|
|
||||||
writel(EXYNOS_SLEEP_MAGIC, sysram_ns_base_addr + EXYNOS_BOOT_FLAG);
|
writel(EXYNOS_SLEEP_MAGIC, sysram_ns_base_addr + EXYNOS_BOOT_FLAG);
|
||||||
writel(virt_to_phys(exynos_cpu_resume_ns),
|
writel(__pa_symbol(exynos_cpu_resume_ns),
|
||||||
sysram_ns_base_addr + EXYNOS_BOOT_ADDR);
|
sysram_ns_base_addr + EXYNOS_BOOT_ADDR);
|
||||||
|
|
||||||
return cpu_suspend(0, exynos_cpu_suspend);
|
return cpu_suspend(0, exynos_cpu_suspend);
|
||||||
|
@@ -221,7 +221,7 @@ static void exynos_mcpm_setup_entry_point(void)
|
|||||||
*/
|
*/
|
||||||
__raw_writel(0xe59f0000, ns_sram_base_addr); /* ldr r0, [pc, #0] */
|
__raw_writel(0xe59f0000, ns_sram_base_addr); /* ldr r0, [pc, #0] */
|
||||||
__raw_writel(0xe12fff10, ns_sram_base_addr + 4); /* bx r0 */
|
__raw_writel(0xe12fff10, ns_sram_base_addr + 4); /* bx r0 */
|
||||||
__raw_writel(virt_to_phys(mcpm_entry_point), ns_sram_base_addr + 8);
|
__raw_writel(__pa_symbol(mcpm_entry_point), ns_sram_base_addr + 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct syscore_ops exynos_mcpm_syscore_ops = {
|
static struct syscore_ops exynos_mcpm_syscore_ops = {
|
||||||
|
@@ -353,7 +353,7 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
|
|||||||
|
|
||||||
smp_rmb();
|
smp_rmb();
|
||||||
|
|
||||||
boot_addr = virt_to_phys(exynos4_secondary_startup);
|
boot_addr = __pa_symbol(exynos4_secondary_startup);
|
||||||
|
|
||||||
ret = exynos_set_boot_addr(core_id, boot_addr);
|
ret = exynos_set_boot_addr(core_id, boot_addr);
|
||||||
if (ret)
|
if (ret)
|
||||||
@@ -413,7 +413,7 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
|
|||||||
|
|
||||||
mpidr = cpu_logical_map(i);
|
mpidr = cpu_logical_map(i);
|
||||||
core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
|
core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
|
||||||
boot_addr = virt_to_phys(exynos4_secondary_startup);
|
boot_addr = __pa_symbol(exynos4_secondary_startup);
|
||||||
|
|
||||||
ret = exynos_set_boot_addr(core_id, boot_addr);
|
ret = exynos_set_boot_addr(core_id, boot_addr);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@@ -132,7 +132,7 @@ static void exynos_set_wakeupmask(long mask)
|
|||||||
|
|
||||||
static void exynos_cpu_set_boot_vector(long flags)
|
static void exynos_cpu_set_boot_vector(long flags)
|
||||||
{
|
{
|
||||||
writel_relaxed(virt_to_phys(exynos_cpu_resume),
|
writel_relaxed(__pa_symbol(exynos_cpu_resume),
|
||||||
exynos_boot_vector_addr());
|
exynos_boot_vector_addr());
|
||||||
writel_relaxed(flags, exynos_boot_vector_flag());
|
writel_relaxed(flags, exynos_boot_vector_flag());
|
||||||
}
|
}
|
||||||
@@ -238,7 +238,7 @@ static int exynos_cpu0_enter_aftr(void)
|
|||||||
|
|
||||||
abort:
|
abort:
|
||||||
if (cpu_online(1)) {
|
if (cpu_online(1)) {
|
||||||
unsigned long boot_addr = virt_to_phys(exynos_cpu_resume);
|
unsigned long boot_addr = __pa_symbol(exynos_cpu_resume);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the boot vector to something non-zero
|
* Set the boot vector to something non-zero
|
||||||
@@ -330,7 +330,7 @@ cpu1_aborted:
|
|||||||
|
|
||||||
static void exynos_pre_enter_aftr(void)
|
static void exynos_pre_enter_aftr(void)
|
||||||
{
|
{
|
||||||
unsigned long boot_addr = virt_to_phys(exynos_cpu_resume);
|
unsigned long boot_addr = __pa_symbol(exynos_cpu_resume);
|
||||||
|
|
||||||
(void)exynos_set_boot_addr(1, boot_addr);
|
(void)exynos_set_boot_addr(1, boot_addr);
|
||||||
}
|
}
|
||||||
|
@@ -301,7 +301,7 @@ static void exynos_pm_prepare(void)
|
|||||||
exynos_pm_enter_sleep_mode();
|
exynos_pm_enter_sleep_mode();
|
||||||
|
|
||||||
/* ensure at least INFORM0 has the resume address */
|
/* ensure at least INFORM0 has the resume address */
|
||||||
pmu_raw_writel(virt_to_phys(exynos_cpu_resume), S5P_INFORM0);
|
pmu_raw_writel(__pa_symbol(exynos_cpu_resume), S5P_INFORM0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void exynos3250_pm_prepare(void)
|
static void exynos3250_pm_prepare(void)
|
||||||
@@ -318,7 +318,7 @@ static void exynos3250_pm_prepare(void)
|
|||||||
exynos_pm_enter_sleep_mode();
|
exynos_pm_enter_sleep_mode();
|
||||||
|
|
||||||
/* ensure at least INFORM0 has the resume address */
|
/* ensure at least INFORM0 has the resume address */
|
||||||
pmu_raw_writel(virt_to_phys(exynos_cpu_resume), S5P_INFORM0);
|
pmu_raw_writel(__pa_symbol(exynos_cpu_resume), S5P_INFORM0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void exynos5420_pm_prepare(void)
|
static void exynos5420_pm_prepare(void)
|
||||||
@@ -343,7 +343,7 @@ static void exynos5420_pm_prepare(void)
|
|||||||
|
|
||||||
/* ensure at least INFORM0 has the resume address */
|
/* ensure at least INFORM0 has the resume address */
|
||||||
if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM))
|
if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM))
|
||||||
pmu_raw_writel(virt_to_phys(mcpm_entry_point), S5P_INFORM0);
|
pmu_raw_writel(__pa_symbol(mcpm_entry_point), S5P_INFORM0);
|
||||||
|
|
||||||
tmp = pmu_raw_readl(EXYNOS_L2_OPTION(0));
|
tmp = pmu_raw_readl(EXYNOS_L2_OPTION(0));
|
||||||
tmp &= ~EXYNOS_L2_USE_RETENTION;
|
tmp &= ~EXYNOS_L2_USE_RETENTION;
|
||||||
|
@@ -327,7 +327,7 @@ static int __init hip04_smp_init(void)
|
|||||||
*/
|
*/
|
||||||
writel_relaxed(hip04_boot_method[0], relocation);
|
writel_relaxed(hip04_boot_method[0], relocation);
|
||||||
writel_relaxed(0xa5a5a5a5, relocation + 4); /* magic number */
|
writel_relaxed(0xa5a5a5a5, relocation + 4); /* magic number */
|
||||||
writel_relaxed(virt_to_phys(secondary_startup), relocation + 8);
|
writel_relaxed(__pa_symbol(secondary_startup), relocation + 8);
|
||||||
writel_relaxed(0, relocation + 12);
|
writel_relaxed(0, relocation + 12);
|
||||||
iounmap(relocation);
|
iounmap(relocation);
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ void hi3xxx_set_cpu_jump(int cpu, void *jump_addr)
|
|||||||
cpu = cpu_logical_map(cpu);
|
cpu = cpu_logical_map(cpu);
|
||||||
if (!cpu || !ctrl_base)
|
if (!cpu || !ctrl_base)
|
||||||
return;
|
return;
|
||||||
writel_relaxed(virt_to_phys(jump_addr), ctrl_base + ((cpu - 1) << 2));
|
writel_relaxed(__pa_symbol(jump_addr), ctrl_base + ((cpu - 1) << 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
int hi3xxx_get_cpu_jump(int cpu)
|
int hi3xxx_get_cpu_jump(int cpu)
|
||||||
@@ -118,7 +118,7 @@ static int hix5hd2_boot_secondary(unsigned int cpu, struct task_struct *idle)
|
|||||||
{
|
{
|
||||||
phys_addr_t jumpaddr;
|
phys_addr_t jumpaddr;
|
||||||
|
|
||||||
jumpaddr = virt_to_phys(secondary_startup);
|
jumpaddr = __pa_symbol(secondary_startup);
|
||||||
hix5hd2_set_scu_boot_addr(HIX5HD2_BOOT_ADDRESS, jumpaddr);
|
hix5hd2_set_scu_boot_addr(HIX5HD2_BOOT_ADDRESS, jumpaddr);
|
||||||
hix5hd2_set_cpu(cpu, true);
|
hix5hd2_set_cpu(cpu, true);
|
||||||
arch_send_wakeup_ipi_mask(cpumask_of(cpu));
|
arch_send_wakeup_ipi_mask(cpumask_of(cpu));
|
||||||
@@ -156,7 +156,7 @@ static int hip01_boot_secondary(unsigned int cpu, struct task_struct *idle)
|
|||||||
struct device_node *node;
|
struct device_node *node;
|
||||||
|
|
||||||
|
|
||||||
jumpaddr = virt_to_phys(secondary_startup);
|
jumpaddr = __pa_symbol(secondary_startup);
|
||||||
hip01_set_boot_addr(HIP01_BOOT_ADDRESS, jumpaddr);
|
hip01_set_boot_addr(HIP01_BOOT_ADDRESS, jumpaddr);
|
||||||
|
|
||||||
node = of_find_compatible_node(NULL, NULL, "hisilicon,hip01-sysctrl");
|
node = of_find_compatible_node(NULL, NULL, "hisilicon,hip01-sysctrl");
|
||||||
|
@@ -117,7 +117,7 @@ static void __init ls1021a_smp_prepare_cpus(unsigned int max_cpus)
|
|||||||
dcfg_base = of_iomap(np, 0);
|
dcfg_base = of_iomap(np, 0);
|
||||||
BUG_ON(!dcfg_base);
|
BUG_ON(!dcfg_base);
|
||||||
|
|
||||||
paddr = virt_to_phys(secondary_startup);
|
paddr = __pa_symbol(secondary_startup);
|
||||||
writel_relaxed(cpu_to_be32(paddr), dcfg_base + DCFG_CCSR_SCRATCHRW1);
|
writel_relaxed(cpu_to_be32(paddr), dcfg_base + DCFG_CCSR_SCRATCHRW1);
|
||||||
|
|
||||||
iounmap(dcfg_base);
|
iounmap(dcfg_base);
|
||||||
|
@@ -499,7 +499,7 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
|
|||||||
memset(suspend_ocram_base, 0, sizeof(*pm_info));
|
memset(suspend_ocram_base, 0, sizeof(*pm_info));
|
||||||
pm_info = suspend_ocram_base;
|
pm_info = suspend_ocram_base;
|
||||||
pm_info->pbase = ocram_pbase;
|
pm_info->pbase = ocram_pbase;
|
||||||
pm_info->resume_addr = virt_to_phys(v7_cpu_resume);
|
pm_info->resume_addr = __pa_symbol(v7_cpu_resume);
|
||||||
pm_info->pm_info_size = sizeof(*pm_info);
|
pm_info->pm_info_size = sizeof(*pm_info);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -99,7 +99,7 @@ void imx_enable_cpu(int cpu, bool enable)
|
|||||||
void imx_set_cpu_jump(int cpu, void *jump_addr)
|
void imx_set_cpu_jump(int cpu, void *jump_addr)
|
||||||
{
|
{
|
||||||
cpu = cpu_logical_map(cpu);
|
cpu = cpu_logical_map(cpu);
|
||||||
writel_relaxed(virt_to_phys(jump_addr),
|
writel_relaxed(__pa_symbol(jump_addr),
|
||||||
src_base + SRC_GPR1 + cpu * 8);
|
src_base + SRC_GPR1 + cpu * 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -122,7 +122,7 @@ static void __init __mtk_smp_prepare_cpus(unsigned int max_cpus, int trustzone)
|
|||||||
* write the address of slave startup address into the system-wide
|
* write the address of slave startup address into the system-wide
|
||||||
* jump register
|
* jump register
|
||||||
*/
|
*/
|
||||||
writel_relaxed(virt_to_phys(secondary_startup_arm),
|
writel_relaxed(__pa_symbol(secondary_startup_arm),
|
||||||
mtk_smp_base + mtk_smp_info->jump_reg);
|
mtk_smp_base + mtk_smp_info->jump_reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -110,7 +110,7 @@ static void mvebu_pm_store_armadaxp_bootinfo(u32 *store_addr)
|
|||||||
{
|
{
|
||||||
phys_addr_t resume_pc;
|
phys_addr_t resume_pc;
|
||||||
|
|
||||||
resume_pc = virt_to_phys(armada_370_xp_cpu_resume);
|
resume_pc = __pa_symbol(armada_370_xp_cpu_resume);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The bootloader expects the first two words to be a magic
|
* The bootloader expects the first two words to be a magic
|
||||||
|
@@ -112,7 +112,7 @@ static const struct of_device_id of_pmsu_table[] = {
|
|||||||
|
|
||||||
void mvebu_pmsu_set_cpu_boot_addr(int hw_cpu, void *boot_addr)
|
void mvebu_pmsu_set_cpu_boot_addr(int hw_cpu, void *boot_addr)
|
||||||
{
|
{
|
||||||
writel(virt_to_phys(boot_addr), pmsu_mp_base +
|
writel(__pa_symbol(boot_addr), pmsu_mp_base +
|
||||||
PMSU_BOOT_ADDR_REDIRECT_OFFSET(hw_cpu));
|
PMSU_BOOT_ADDR_REDIRECT_OFFSET(hw_cpu));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -153,7 +153,7 @@ void mvebu_system_controller_set_cpu_boot_addr(void *boot_addr)
|
|||||||
if (of_machine_is_compatible("marvell,armada375"))
|
if (of_machine_is_compatible("marvell,armada375"))
|
||||||
mvebu_armada375_smp_wa_init();
|
mvebu_armada375_smp_wa_init();
|
||||||
|
|
||||||
writel(virt_to_phys(boot_addr), system_controller_base +
|
writel(__pa_symbol(boot_addr), system_controller_base +
|
||||||
mvebu_sc->resume_boot_addr);
|
mvebu_sc->resume_boot_addr);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -315,15 +315,15 @@ void omap3_save_scratchpad_contents(void)
|
|||||||
scratchpad_contents.boot_config_ptr = 0x0;
|
scratchpad_contents.boot_config_ptr = 0x0;
|
||||||
if (cpu_is_omap3630())
|
if (cpu_is_omap3630())
|
||||||
scratchpad_contents.public_restore_ptr =
|
scratchpad_contents.public_restore_ptr =
|
||||||
virt_to_phys(omap3_restore_3630);
|
__pa_symbol(omap3_restore_3630);
|
||||||
else if (omap_rev() != OMAP3430_REV_ES3_0 &&
|
else if (omap_rev() != OMAP3430_REV_ES3_0 &&
|
||||||
omap_rev() != OMAP3430_REV_ES3_1 &&
|
omap_rev() != OMAP3430_REV_ES3_1 &&
|
||||||
omap_rev() != OMAP3430_REV_ES3_1_2)
|
omap_rev() != OMAP3430_REV_ES3_1_2)
|
||||||
scratchpad_contents.public_restore_ptr =
|
scratchpad_contents.public_restore_ptr =
|
||||||
virt_to_phys(omap3_restore);
|
__pa_symbol(omap3_restore);
|
||||||
else
|
else
|
||||||
scratchpad_contents.public_restore_ptr =
|
scratchpad_contents.public_restore_ptr =
|
||||||
virt_to_phys(omap3_restore_es3);
|
__pa_symbol(omap3_restore_es3);
|
||||||
|
|
||||||
if (omap_type() == OMAP2_DEVICE_TYPE_GP)
|
if (omap_type() == OMAP2_DEVICE_TYPE_GP)
|
||||||
scratchpad_contents.secure_ram_restore_ptr = 0x0;
|
scratchpad_contents.secure_ram_restore_ptr = 0x0;
|
||||||
@@ -395,7 +395,7 @@ void omap3_save_scratchpad_contents(void)
|
|||||||
sdrc_block_contents.flags = 0x0;
|
sdrc_block_contents.flags = 0x0;
|
||||||
sdrc_block_contents.block_size = 0x0;
|
sdrc_block_contents.block_size = 0x0;
|
||||||
|
|
||||||
arm_context_addr = virt_to_phys(omap3_arm_context);
|
arm_context_addr = __pa_symbol(omap3_arm_context);
|
||||||
|
|
||||||
/* Copy all the contents to the scratchpad location */
|
/* Copy all the contents to the scratchpad location */
|
||||||
scratchpad_address = OMAP2_L4_IO_ADDRESS(OMAP343X_SCRATCHPAD);
|
scratchpad_address = OMAP2_L4_IO_ADDRESS(OMAP343X_SCRATCHPAD);
|
||||||
|
@@ -273,7 +273,7 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state)
|
|||||||
cpu_clear_prev_logic_pwrst(cpu);
|
cpu_clear_prev_logic_pwrst(cpu);
|
||||||
pwrdm_set_next_pwrst(pm_info->pwrdm, power_state);
|
pwrdm_set_next_pwrst(pm_info->pwrdm, power_state);
|
||||||
pwrdm_set_logic_retst(pm_info->pwrdm, cpu_logic_state);
|
pwrdm_set_logic_retst(pm_info->pwrdm, cpu_logic_state);
|
||||||
set_cpu_wakeup_addr(cpu, virt_to_phys(omap_pm_ops.resume));
|
set_cpu_wakeup_addr(cpu, __pa_symbol(omap_pm_ops.resume));
|
||||||
omap_pm_ops.scu_prepare(cpu, power_state);
|
omap_pm_ops.scu_prepare(cpu, power_state);
|
||||||
l2x0_pwrst_prepare(cpu, save_state);
|
l2x0_pwrst_prepare(cpu, save_state);
|
||||||
|
|
||||||
@@ -325,7 +325,7 @@ int omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state)
|
|||||||
|
|
||||||
pwrdm_clear_all_prev_pwrst(pm_info->pwrdm);
|
pwrdm_clear_all_prev_pwrst(pm_info->pwrdm);
|
||||||
pwrdm_set_next_pwrst(pm_info->pwrdm, power_state);
|
pwrdm_set_next_pwrst(pm_info->pwrdm, power_state);
|
||||||
set_cpu_wakeup_addr(cpu, virt_to_phys(omap_pm_ops.hotplug_restart));
|
set_cpu_wakeup_addr(cpu, __pa_symbol(omap_pm_ops.hotplug_restart));
|
||||||
omap_pm_ops.scu_prepare(cpu, power_state);
|
omap_pm_ops.scu_prepare(cpu, power_state);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -467,13 +467,13 @@ void __init omap4_mpuss_early_init(void)
|
|||||||
sar_base = omap4_get_sar_ram_base();
|
sar_base = omap4_get_sar_ram_base();
|
||||||
|
|
||||||
if (cpu_is_omap443x())
|
if (cpu_is_omap443x())
|
||||||
startup_pa = virt_to_phys(omap4_secondary_startup);
|
startup_pa = __pa_symbol(omap4_secondary_startup);
|
||||||
else if (cpu_is_omap446x())
|
else if (cpu_is_omap446x())
|
||||||
startup_pa = virt_to_phys(omap4460_secondary_startup);
|
startup_pa = __pa_symbol(omap4460_secondary_startup);
|
||||||
else if ((__boot_cpu_mode & MODE_MASK) == HYP_MODE)
|
else if ((__boot_cpu_mode & MODE_MASK) == HYP_MODE)
|
||||||
startup_pa = virt_to_phys(omap5_secondary_hyp_startup);
|
startup_pa = __pa_symbol(omap5_secondary_hyp_startup);
|
||||||
else
|
else
|
||||||
startup_pa = virt_to_phys(omap5_secondary_startup);
|
startup_pa = __pa_symbol(omap5_secondary_startup);
|
||||||
|
|
||||||
if (cpu_is_omap44xx())
|
if (cpu_is_omap44xx())
|
||||||
writel_relaxed(startup_pa, sar_base +
|
writel_relaxed(startup_pa, sar_base +
|
||||||
|
@@ -316,9 +316,9 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
|
|||||||
* A barrier is added to ensure that write buffer is drained
|
* A barrier is added to ensure that write buffer is drained
|
||||||
*/
|
*/
|
||||||
if (omap_secure_apis_support())
|
if (omap_secure_apis_support())
|
||||||
omap_auxcoreboot_addr(virt_to_phys(cfg.startup_addr));
|
omap_auxcoreboot_addr(__pa_symbol(cfg.startup_addr));
|
||||||
else
|
else
|
||||||
writel_relaxed(virt_to_phys(cfg.startup_addr),
|
writel_relaxed(__pa_symbol(cfg.startup_addr),
|
||||||
base + OMAP_AUX_CORE_BOOT_1);
|
base + OMAP_AUX_CORE_BOOT_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
#include <linux/sched/clock.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user