Merge drm/drm-next into drm-intel-next-queued
Although there's nothing crucial missing, it's been a long time since the last backmerge. Catch up with drm-next. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -75,3 +75,12 @@ Contact: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|||||||
Description:
|
Description:
|
||||||
Amount (in KiB) of low (or normal) memory in the
|
Amount (in KiB) of low (or normal) memory in the
|
||||||
balloon.
|
balloon.
|
||||||
|
|
||||||
|
What: /sys/devices/system/xen_memory/xen_memory0/scrub_pages
|
||||||
|
Date: September 2018
|
||||||
|
KernelVersion: 4.20
|
||||||
|
Contact: xen-devel@lists.xenproject.org
|
||||||
|
Description:
|
||||||
|
Control scrubbing pages before returning them to Xen for others domains
|
||||||
|
use. Can be set with xen_scrub_pages cmdline
|
||||||
|
parameter. Default value controlled with CONFIG_XEN_SCRUB_PAGES_DEFAULT.
|
||||||
|
@@ -3523,6 +3523,12 @@
|
|||||||
ramdisk_size= [RAM] Sizes of RAM disks in kilobytes
|
ramdisk_size= [RAM] Sizes of RAM disks in kilobytes
|
||||||
See Documentation/blockdev/ramdisk.txt.
|
See Documentation/blockdev/ramdisk.txt.
|
||||||
|
|
||||||
|
random.trust_cpu={on,off}
|
||||||
|
[KNL] Enable or disable trusting the use of the
|
||||||
|
CPU's random number generator (if available) to
|
||||||
|
fully seed the kernel's CRNG. Default is controlled
|
||||||
|
by CONFIG_RANDOM_TRUST_CPU.
|
||||||
|
|
||||||
ras=option[,option,...] [KNL] RAS-specific options
|
ras=option[,option,...] [KNL] RAS-specific options
|
||||||
|
|
||||||
cec_disable [X86]
|
cec_disable [X86]
|
||||||
@@ -4994,6 +5000,12 @@
|
|||||||
Disables the PV optimizations forcing the HVM guest to
|
Disables the PV optimizations forcing the HVM guest to
|
||||||
run as generic HVM guest with no PV drivers.
|
run as generic HVM guest with no PV drivers.
|
||||||
|
|
||||||
|
xen_scrub_pages= [XEN]
|
||||||
|
Boolean option to control scrubbing pages before giving them back
|
||||||
|
to Xen, for use by other domains. Can be also changed at runtime
|
||||||
|
with /sys/devices/system/xen_memory/xen_memory0/scrub_pages.
|
||||||
|
Default value controlled with CONFIG_XEN_SCRUB_PAGES_DEFAULT.
|
||||||
|
|
||||||
xirc2ps_cs= [NET,PCMCIA]
|
xirc2ps_cs= [NET,PCMCIA]
|
||||||
Format:
|
Format:
|
||||||
<irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]]
|
<irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]]
|
||||||
|
@@ -348,3 +348,7 @@ Version History
|
|||||||
1.13.1 Fix deadlock caused by early md_stop_writes(). Also fix size an
|
1.13.1 Fix deadlock caused by early md_stop_writes(). Also fix size an
|
||||||
state races.
|
state races.
|
||||||
1.13.2 Fix raid redundancy validation and avoid keeping raid set frozen
|
1.13.2 Fix raid redundancy validation and avoid keeping raid set frozen
|
||||||
|
1.14.0 Fix reshape race on small devices. Fix stripe adding reshape
|
||||||
|
deadlock/potential data corruption. Update superblock when
|
||||||
|
specific devices are requested via rebuild. Fix RAID leg
|
||||||
|
rebuild errors.
|
||||||
|
@@ -15,10 +15,21 @@ Required properties:
|
|||||||
- "renesas,r8a7796-lvds" for R8A7796 (R-Car M3-W) compatible LVDS encoders
|
- "renesas,r8a7796-lvds" for R8A7796 (R-Car M3-W) compatible LVDS encoders
|
||||||
- "renesas,r8a77970-lvds" for R8A77970 (R-Car V3M) compatible LVDS encoders
|
- "renesas,r8a77970-lvds" for R8A77970 (R-Car V3M) compatible LVDS encoders
|
||||||
- "renesas,r8a77980-lvds" for R8A77980 (R-Car V3H) compatible LVDS encoders
|
- "renesas,r8a77980-lvds" for R8A77980 (R-Car V3H) compatible LVDS encoders
|
||||||
|
- "renesas,r8a77990-lvds" for R8A77990 (R-Car E3) compatible LVDS encoders
|
||||||
- "renesas,r8a77995-lvds" for R8A77995 (R-Car D3) compatible LVDS encoders
|
- "renesas,r8a77995-lvds" for R8A77995 (R-Car D3) compatible LVDS encoders
|
||||||
|
|
||||||
- reg: Base address and length for the memory-mapped registers
|
- reg: Base address and length for the memory-mapped registers
|
||||||
- clocks: A phandle + clock-specifier pair for the functional clock
|
- clocks: A list of phandles + clock-specifier pairs, one for each entry in
|
||||||
|
the clock-names property.
|
||||||
|
- clock-names: Name of the clocks. This property is model-dependent.
|
||||||
|
- The functional clock, which mandatory for all models, shall be listed
|
||||||
|
first, and shall be named "fck".
|
||||||
|
- On R8A77990 and R8A77995, the LVDS encoder can use the EXTAL or
|
||||||
|
DU_DOTCLKINx clocks. Those clocks are optional. When supplied they must be
|
||||||
|
named "extal" and "dclkin.x" respectively, with "x" being the DU_DOTCLKIN
|
||||||
|
numerical index.
|
||||||
|
- When the clocks property only contains the functional clock, the
|
||||||
|
clock-names property may be omitted.
|
||||||
- resets: A phandle + reset specifier for the module reset
|
- resets: A phandle + reset specifier for the module reset
|
||||||
|
|
||||||
Required nodes:
|
Required nodes:
|
||||||
|
@@ -21,6 +21,9 @@ Required properties:
|
|||||||
- samsung,pll-clock-frequency: specifies frequency of the oscillator clock
|
- samsung,pll-clock-frequency: specifies frequency of the oscillator clock
|
||||||
- #address-cells, #size-cells: should be set respectively to <1> and <0>
|
- #address-cells, #size-cells: should be set respectively to <1> and <0>
|
||||||
according to DSI host bindings (see MIPI DSI bindings [1])
|
according to DSI host bindings (see MIPI DSI bindings [1])
|
||||||
|
- samsung,burst-clock-frequency: specifies DSI frequency in high-speed burst
|
||||||
|
mode
|
||||||
|
- samsung,esc-clock-frequency: specifies DSI frequency in escape mode
|
||||||
|
|
||||||
Optional properties:
|
Optional properties:
|
||||||
- power-domains: a phandle to DSIM power domain node
|
- power-domains: a phandle to DSIM power domain node
|
||||||
@@ -29,25 +32,9 @@ Child nodes:
|
|||||||
Should contain DSI peripheral nodes (see MIPI DSI bindings [1]).
|
Should contain DSI peripheral nodes (see MIPI DSI bindings [1]).
|
||||||
|
|
||||||
Video interfaces:
|
Video interfaces:
|
||||||
Device node can contain video interface port nodes according to [2].
|
Device node can contain following video interface port nodes according to [2]:
|
||||||
The following are properties specific to those nodes:
|
0: RGB input,
|
||||||
|
1: DSI output
|
||||||
port node inbound:
|
|
||||||
- reg: (required) must be 0.
|
|
||||||
port node outbound:
|
|
||||||
- reg: (required) must be 1.
|
|
||||||
|
|
||||||
endpoint node connected from mic node (reg = 0):
|
|
||||||
- remote-endpoint: specifies the endpoint in mic node. This node is required
|
|
||||||
for Exynos5433 mipi dsi. So mic can access to panel node
|
|
||||||
throughout this dsi node.
|
|
||||||
endpoint node connected to panel node (reg = 1):
|
|
||||||
- remote-endpoint: specifies the endpoint in panel node. This node is
|
|
||||||
required in all kinds of exynos mipi dsi to represent
|
|
||||||
the connection between mipi dsi and panel.
|
|
||||||
- samsung,burst-clock-frequency: specifies DSI frequency in high-speed burst
|
|
||||||
mode
|
|
||||||
- samsung,esc-clock-frequency: specifies DSI frequency in escape mode
|
|
||||||
|
|
||||||
[1]: Documentation/devicetree/bindings/display/mipi-dsi-bus.txt
|
[1]: Documentation/devicetree/bindings/display/mipi-dsi-bus.txt
|
||||||
[2]: Documentation/devicetree/bindings/media/video-interfaces.txt
|
[2]: Documentation/devicetree/bindings/media/video-interfaces.txt
|
||||||
|
@@ -1,20 +1,22 @@
|
|||||||
Innolux TV123WAM 12.3 inch eDP 2K display panel
|
Innolux P120ZDG-BF1 12.02 inch eDP 2K display panel
|
||||||
|
|
||||||
This binding is compatible with the simple-panel binding, which is specified
|
This binding is compatible with the simple-panel binding, which is specified
|
||||||
in simple-panel.txt in this directory.
|
in simple-panel.txt in this directory.
|
||||||
|
|
||||||
Required properties:
|
Required properties:
|
||||||
- compatible: should be "innolux,tv123wam"
|
- compatible: should be "innolux,p120zdg-bf1"
|
||||||
- power-supply: regulator to provide the supply voltage
|
- power-supply: regulator to provide the supply voltage
|
||||||
|
|
||||||
Optional properties:
|
Optional properties:
|
||||||
- enable-gpios: GPIO pin to enable or disable the panel
|
- enable-gpios: GPIO pin to enable or disable the panel
|
||||||
- backlight: phandle of the backlight device attached to the panel
|
- backlight: phandle of the backlight device attached to the panel
|
||||||
|
- no-hpd: If HPD isn't hooked up; add this property.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
panel_edp: panel-edp {
|
panel_edp: panel-edp {
|
||||||
compatible = "innolux,tv123wam";
|
compatible = "innolux,p120zdg-bf1";
|
||||||
enable-gpios = <&msmgpio 31 GPIO_ACTIVE_LOW>;
|
enable-gpios = <&msmgpio 31 GPIO_ACTIVE_LOW>;
|
||||||
power-supply = <&pm8916_l2>;
|
power-supply = <&pm8916_l2>;
|
||||||
backlight = <&backlight>;
|
backlight = <&backlight>;
|
||||||
|
no-hpd;
|
||||||
};
|
};
|
@@ -11,6 +11,9 @@ Optional properties:
|
|||||||
- ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing
|
- ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing
|
||||||
- enable-gpios: GPIO pin to enable or disable the panel
|
- enable-gpios: GPIO pin to enable or disable the panel
|
||||||
- backlight: phandle of the backlight device attached to the panel
|
- backlight: phandle of the backlight device attached to the panel
|
||||||
|
- no-hpd: This panel is supposed to communicate that it's ready via HPD
|
||||||
|
(hot plug detect) signal, but the signal isn't hooked up so we should
|
||||||
|
hardcode the max delay from the panel spec when powering up the panel.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
@@ -16,6 +16,7 @@ Required Properties:
|
|||||||
- "renesas,du-r8a77965" for R8A77965 (R-Car M3-N) compatible DU
|
- "renesas,du-r8a77965" for R8A77965 (R-Car M3-N) compatible DU
|
||||||
- "renesas,du-r8a77970" for R8A77970 (R-Car V3M) compatible DU
|
- "renesas,du-r8a77970" for R8A77970 (R-Car V3M) compatible DU
|
||||||
- "renesas,du-r8a77980" for R8A77980 (R-Car V3H) compatible DU
|
- "renesas,du-r8a77980" for R8A77980 (R-Car V3H) compatible DU
|
||||||
|
- "renesas,du-r8a77990" for R8A77990 (R-Car E3) compatible DU
|
||||||
- "renesas,du-r8a77995" for R8A77995 (R-Car D3) compatible DU
|
- "renesas,du-r8a77995" for R8A77995 (R-Car D3) compatible DU
|
||||||
|
|
||||||
- reg: the memory-mapped I/O registers base address and length
|
- reg: the memory-mapped I/O registers base address and length
|
||||||
@@ -63,6 +64,7 @@ corresponding to each DU output.
|
|||||||
R8A77965 (R-Car M3-N) DPAD 0 HDMI 0 LVDS 0 -
|
R8A77965 (R-Car M3-N) DPAD 0 HDMI 0 LVDS 0 -
|
||||||
R8A77970 (R-Car V3M) DPAD 0 LVDS 0 - -
|
R8A77970 (R-Car V3M) DPAD 0 LVDS 0 - -
|
||||||
R8A77980 (R-Car V3H) DPAD 0 LVDS 0 - -
|
R8A77980 (R-Car V3H) DPAD 0 LVDS 0 - -
|
||||||
|
R8A77990 (R-Car E3) DPAD 0 LVDS 0 LVDS 1 -
|
||||||
R8A77995 (R-Car D3) DPAD 0 LVDS 0 LVDS 1 -
|
R8A77995 (R-Car D3) DPAD 0 LVDS 0 LVDS 1 -
|
||||||
|
|
||||||
|
|
||||||
|
@@ -376,6 +376,8 @@ Required properties:
|
|||||||
* allwinner,sun8i-a83t-de2-mixer-0
|
* allwinner,sun8i-a83t-de2-mixer-0
|
||||||
* allwinner,sun8i-a83t-de2-mixer-1
|
* allwinner,sun8i-a83t-de2-mixer-1
|
||||||
* allwinner,sun8i-h3-de2-mixer-0
|
* allwinner,sun8i-h3-de2-mixer-0
|
||||||
|
* allwinner,sun8i-r40-de2-mixer-0
|
||||||
|
* allwinner,sun8i-r40-de2-mixer-1
|
||||||
* allwinner,sun8i-v3s-de2-mixer
|
* allwinner,sun8i-v3s-de2-mixer
|
||||||
* allwinner,sun50i-a64-de2-mixer-0
|
* allwinner,sun50i-a64-de2-mixer-0
|
||||||
* allwinner,sun50i-a64-de2-mixer-1
|
* allwinner,sun50i-a64-de2-mixer-1
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
Required properties:
|
Required properties:
|
||||||
- compatible :
|
- compatible :
|
||||||
- "fsl,imx7ulp-lpi2c" for LPI2C compatible with the one integrated on i.MX7ULP soc
|
- "fsl,imx7ulp-lpi2c" for LPI2C compatible with the one integrated on i.MX7ULP soc
|
||||||
- "fsl,imx8dv-lpi2c" for LPI2C compatible with the one integrated on i.MX8DV soc
|
|
||||||
- reg : address and length of the lpi2c master registers
|
- reg : address and length of the lpi2c master registers
|
||||||
- interrupts : lpi2c interrupt
|
- interrupts : lpi2c interrupt
|
||||||
- clocks : lpi2c clock specifier
|
- clocks : lpi2c clock specifier
|
||||||
@@ -11,7 +10,7 @@ Required properties:
|
|||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
lpi2c7: lpi2c7@40a50000 {
|
lpi2c7: lpi2c7@40a50000 {
|
||||||
compatible = "fsl,imx8dv-lpi2c";
|
compatible = "fsl,imx7ulp-lpi2c";
|
||||||
reg = <0x40A50000 0x10000>;
|
reg = <0x40A50000 0x10000>;
|
||||||
interrupt-parent = <&intc>;
|
interrupt-parent = <&intc>;
|
||||||
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
Device-Tree bindings for input/gpio_keys.c keyboard driver
|
Device-Tree bindings for input/keyboard/gpio_keys.c keyboard driver
|
||||||
|
|
||||||
Required properties:
|
Required properties:
|
||||||
- compatible = "gpio-keys";
|
- compatible = "gpio-keys";
|
||||||
|
@@ -19,6 +19,10 @@ Required properties:
|
|||||||
- slaves : Specifies number for slaves
|
- slaves : Specifies number for slaves
|
||||||
- active_slave : Specifies the slave to use for time stamping,
|
- active_slave : Specifies the slave to use for time stamping,
|
||||||
ethtool and SIOCGMIIPHY
|
ethtool and SIOCGMIIPHY
|
||||||
|
- cpsw-phy-sel : Specifies the phandle to the CPSW phy mode selection
|
||||||
|
device. See also cpsw-phy-sel.txt for it's binding.
|
||||||
|
Note that in legacy cases cpsw-phy-sel may be
|
||||||
|
a child device instead of a phandle.
|
||||||
|
|
||||||
Optional properties:
|
Optional properties:
|
||||||
- ti,hwmods : Must be "cpgmac0"
|
- ti,hwmods : Must be "cpgmac0"
|
||||||
@@ -75,6 +79,7 @@ Examples:
|
|||||||
cpts_clock_mult = <0x80000000>;
|
cpts_clock_mult = <0x80000000>;
|
||||||
cpts_clock_shift = <29>;
|
cpts_clock_shift = <29>;
|
||||||
syscon = <&cm>;
|
syscon = <&cm>;
|
||||||
|
cpsw-phy-sel = <&phy_sel>;
|
||||||
cpsw_emac0: slave@0 {
|
cpsw_emac0: slave@0 {
|
||||||
phy_id = <&davinci_mdio>, <0>;
|
phy_id = <&davinci_mdio>, <0>;
|
||||||
phy-mode = "rgmii-txid";
|
phy-mode = "rgmii-txid";
|
||||||
@@ -103,6 +108,7 @@ Examples:
|
|||||||
cpts_clock_mult = <0x80000000>;
|
cpts_clock_mult = <0x80000000>;
|
||||||
cpts_clock_shift = <29>;
|
cpts_clock_shift = <29>;
|
||||||
syscon = <&cm>;
|
syscon = <&cm>;
|
||||||
|
cpsw-phy-sel = <&phy_sel>;
|
||||||
cpsw_emac0: slave@0 {
|
cpsw_emac0: slave@0 {
|
||||||
phy_id = <&davinci_mdio>, <0>;
|
phy_id = <&davinci_mdio>, <0>;
|
||||||
phy-mode = "rgmii-txid";
|
phy-mode = "rgmii-txid";
|
||||||
|
@@ -10,6 +10,7 @@ Required properties:
|
|||||||
Use "cdns,pc302-gem" for Picochip picoXcell pc302 and later devices based on
|
Use "cdns,pc302-gem" for Picochip picoXcell pc302 and later devices based on
|
||||||
the Cadence GEM, or the generic form: "cdns,gem".
|
the Cadence GEM, or the generic form: "cdns,gem".
|
||||||
Use "atmel,sama5d2-gem" for the GEM IP (10/100) available on Atmel sama5d2 SoCs.
|
Use "atmel,sama5d2-gem" for the GEM IP (10/100) available on Atmel sama5d2 SoCs.
|
||||||
|
Use "atmel,sama5d3-macb" for the 10/100Mbit IP available on Atmel sama5d3 SoCs.
|
||||||
Use "atmel,sama5d3-gem" for the Gigabit IP available on Atmel sama5d3 SoCs.
|
Use "atmel,sama5d3-gem" for the Gigabit IP available on Atmel sama5d3 SoCs.
|
||||||
Use "atmel,sama5d4-gem" for the GEM IP (10/100) available on Atmel sama5d4 SoCs.
|
Use "atmel,sama5d4-gem" for the GEM IP (10/100) available on Atmel sama5d4 SoCs.
|
||||||
Use "cdns,zynq-gem" Xilinx Zynq-7xxx SoC.
|
Use "cdns,zynq-gem" Xilinx Zynq-7xxx SoC.
|
||||||
|
@@ -16,6 +16,7 @@ Required properties:
|
|||||||
"renesas,ether-r8a7794" if the device is a part of R8A7794 SoC.
|
"renesas,ether-r8a7794" if the device is a part of R8A7794 SoC.
|
||||||
"renesas,gether-r8a77980" if the device is a part of R8A77980 SoC.
|
"renesas,gether-r8a77980" if the device is a part of R8A77980 SoC.
|
||||||
"renesas,ether-r7s72100" if the device is a part of R7S72100 SoC.
|
"renesas,ether-r7s72100" if the device is a part of R7S72100 SoC.
|
||||||
|
"renesas,ether-r7s9210" if the device is a part of R7S9210 SoC.
|
||||||
"renesas,rcar-gen1-ether" for a generic R-Car Gen1 device.
|
"renesas,rcar-gen1-ether" for a generic R-Car Gen1 device.
|
||||||
"renesas,rcar-gen2-ether" for a generic R-Car Gen2 or RZ/G1
|
"renesas,rcar-gen2-ether" for a generic R-Car Gen2 or RZ/G1
|
||||||
device.
|
device.
|
||||||
|
@@ -848,7 +848,7 @@ struct file_operations
|
|||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
This describes how the VFS can manipulate an open file. As of kernel
|
This describes how the VFS can manipulate an open file. As of kernel
|
||||||
4.1, the following members are defined:
|
4.18, the following members are defined:
|
||||||
|
|
||||||
struct file_operations {
|
struct file_operations {
|
||||||
struct module *owner;
|
struct module *owner;
|
||||||
@@ -858,11 +858,11 @@ struct file_operations {
|
|||||||
ssize_t (*read_iter) (struct kiocb *, struct iov_iter *);
|
ssize_t (*read_iter) (struct kiocb *, struct iov_iter *);
|
||||||
ssize_t (*write_iter) (struct kiocb *, struct iov_iter *);
|
ssize_t (*write_iter) (struct kiocb *, struct iov_iter *);
|
||||||
int (*iterate) (struct file *, struct dir_context *);
|
int (*iterate) (struct file *, struct dir_context *);
|
||||||
|
int (*iterate_shared) (struct file *, struct dir_context *);
|
||||||
__poll_t (*poll) (struct file *, struct poll_table_struct *);
|
__poll_t (*poll) (struct file *, struct poll_table_struct *);
|
||||||
long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
|
long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
|
||||||
long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
|
long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
|
||||||
int (*mmap) (struct file *, struct vm_area_struct *);
|
int (*mmap) (struct file *, struct vm_area_struct *);
|
||||||
int (*mremap)(struct file *, struct vm_area_struct *);
|
|
||||||
int (*open) (struct inode *, struct file *);
|
int (*open) (struct inode *, struct file *);
|
||||||
int (*flush) (struct file *, fl_owner_t id);
|
int (*flush) (struct file *, fl_owner_t id);
|
||||||
int (*release) (struct inode *, struct file *);
|
int (*release) (struct inode *, struct file *);
|
||||||
@@ -882,6 +882,10 @@ struct file_operations {
|
|||||||
#ifndef CONFIG_MMU
|
#ifndef CONFIG_MMU
|
||||||
unsigned (*mmap_capabilities)(struct file *);
|
unsigned (*mmap_capabilities)(struct file *);
|
||||||
#endif
|
#endif
|
||||||
|
ssize_t (*copy_file_range)(struct file *, loff_t, struct file *, loff_t, size_t, unsigned int);
|
||||||
|
int (*clone_file_range)(struct file *, loff_t, struct file *, loff_t, u64);
|
||||||
|
int (*dedupe_file_range)(struct file *, loff_t, struct file *, loff_t, u64);
|
||||||
|
int (*fadvise)(struct file *, loff_t, loff_t, int);
|
||||||
};
|
};
|
||||||
|
|
||||||
Again, all methods are called without any locks being held, unless
|
Again, all methods are called without any locks being held, unless
|
||||||
@@ -899,6 +903,9 @@ otherwise noted.
|
|||||||
|
|
||||||
iterate: called when the VFS needs to read the directory contents
|
iterate: called when the VFS needs to read the directory contents
|
||||||
|
|
||||||
|
iterate_shared: called when the VFS needs to read the directory contents
|
||||||
|
when filesystem supports concurrent dir iterators
|
||||||
|
|
||||||
poll: called by the VFS when a process wants to check if there is
|
poll: called by the VFS when a process wants to check if there is
|
||||||
activity on this file and (optionally) go to sleep until there
|
activity on this file and (optionally) go to sleep until there
|
||||||
is activity. Called by the select(2) and poll(2) system calls
|
is activity. Called by the select(2) and poll(2) system calls
|
||||||
@@ -951,6 +958,16 @@ otherwise noted.
|
|||||||
|
|
||||||
fallocate: called by the VFS to preallocate blocks or punch a hole.
|
fallocate: called by the VFS to preallocate blocks or punch a hole.
|
||||||
|
|
||||||
|
copy_file_range: called by the copy_file_range(2) system call.
|
||||||
|
|
||||||
|
clone_file_range: called by the ioctl(2) system call for FICLONERANGE and
|
||||||
|
FICLONE commands.
|
||||||
|
|
||||||
|
dedupe_file_range: called by the ioctl(2) system call for FIDEDUPERANGE
|
||||||
|
command.
|
||||||
|
|
||||||
|
fadvise: possibly called by the fadvise64() system call.
|
||||||
|
|
||||||
Note that the file operations are implemented by the specific
|
Note that the file operations are implemented by the specific
|
||||||
filesystem in which the inode resides. When opening a device node
|
filesystem in which the inode resides. When opening a device node
|
||||||
(character or block special) most filesystems will call special
|
(character or block special) most filesystems will call special
|
||||||
|
@@ -33,4 +33,3 @@ Video Function Calls
|
|||||||
video-clear-buffer
|
video-clear-buffer
|
||||||
video-set-streamtype
|
video-set-streamtype
|
||||||
video-set-format
|
video-set-format
|
||||||
video-set-attributes
|
|
||||||
|
@@ -86,7 +86,7 @@ pkg-config
|
|||||||
|
|
||||||
The build system, as of 4.18, requires pkg-config to check for installed
|
The build system, as of 4.18, requires pkg-config to check for installed
|
||||||
kconfig tools and to determine flags settings for use in
|
kconfig tools and to determine flags settings for use in
|
||||||
'make {menu,n,g,x}config'. Previously pkg-config was being used but not
|
'make {g,x}config'. Previously pkg-config was being used but not
|
||||||
verified or documented.
|
verified or documented.
|
||||||
|
|
||||||
Flex
|
Flex
|
||||||
|
81
Documentation/process/code-of-conduct.rst
Normal file
81
Documentation/process/code-of-conduct.rst
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
Contributor Covenant Code of Conduct
|
||||||
|
++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
|
Our Pledge
|
||||||
|
==========
|
||||||
|
|
||||||
|
In the interest of fostering an open and welcoming environment, we as
|
||||||
|
contributors and maintainers pledge to making participation in our project and
|
||||||
|
our community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, disability, ethnicity, sex characteristics, gender identity and
|
||||||
|
expression, level of experience, education, socio-economic status, nationality,
|
||||||
|
personal appearance, race, religion, or sexual identity and orientation.
|
||||||
|
|
||||||
|
Our Standards
|
||||||
|
=============
|
||||||
|
|
||||||
|
Examples of behavior that contributes to creating a positive environment
|
||||||
|
include:
|
||||||
|
|
||||||
|
* Using welcoming and inclusive language
|
||||||
|
* Being respectful of differing viewpoints and experiences
|
||||||
|
* Gracefully accepting constructive criticism
|
||||||
|
* Focusing on what is best for the community
|
||||||
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||||
|
advances
|
||||||
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others’ private information, such as a physical or electronic
|
||||||
|
address, without explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
|
||||||
|
Our Responsibilities
|
||||||
|
====================
|
||||||
|
|
||||||
|
Maintainers are responsible for clarifying the standards of acceptable behavior
|
||||||
|
and are expected to take appropriate and fair corrective action in response to
|
||||||
|
any instances of unacceptable behavior.
|
||||||
|
|
||||||
|
Maintainers have the right and responsibility to remove, edit, or reject
|
||||||
|
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||||
|
not aligned to this Code of Conduct, or to ban temporarily or permanently any
|
||||||
|
contributor for other behaviors that they deem inappropriate, threatening,
|
||||||
|
offensive, or harmful.
|
||||||
|
|
||||||
|
Scope
|
||||||
|
=====
|
||||||
|
|
||||||
|
This Code of Conduct applies both within project spaces and in public spaces
|
||||||
|
when an individual is representing the project or its community. Examples of
|
||||||
|
representing a project or community include using an official project e-mail
|
||||||
|
address, posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event. Representation of a project may be
|
||||||
|
further defined and clarified by project maintainers.
|
||||||
|
|
||||||
|
Enforcement
|
||||||
|
===========
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported by contacting the Technical Advisory Board (TAB) at
|
||||||
|
<tab@lists.linux-foundation.org>. All complaints will be reviewed and
|
||||||
|
investigated and will result in a response that is deemed necessary and
|
||||||
|
appropriate to the circumstances. The TAB is obligated to maintain
|
||||||
|
confidentiality with regard to the reporter of an incident. Further details of
|
||||||
|
specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
|
Maintainers who do not follow or enforce the Code of Conduct in good faith may
|
||||||
|
face temporary or permanent repercussions as determined by other members of the
|
||||||
|
project’s leadership.
|
||||||
|
|
||||||
|
Attribution
|
||||||
|
===========
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
|
||||||
|
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
@@ -1,28 +0,0 @@
|
|||||||
Code of Conflict
|
|
||||||
----------------
|
|
||||||
|
|
||||||
The Linux kernel development effort is a very personal process compared
|
|
||||||
to "traditional" ways of developing software. Your code and ideas
|
|
||||||
behind it will be carefully reviewed, often resulting in critique and
|
|
||||||
criticism. The review will almost always require improvements to the
|
|
||||||
code before it can be included in the kernel. Know that this happens
|
|
||||||
because everyone involved wants to see the best possible solution for
|
|
||||||
the overall success of Linux. This development process has been proven
|
|
||||||
to create the most robust operating system kernel ever, and we do not
|
|
||||||
want to do anything to cause the quality of submission and eventual
|
|
||||||
result to ever decrease.
|
|
||||||
|
|
||||||
If however, anyone feels personally abused, threatened, or otherwise
|
|
||||||
uncomfortable due to this process, that is not acceptable. If so,
|
|
||||||
please contact the Linux Foundation's Technical Advisory Board at
|
|
||||||
<tab@lists.linux-foundation.org>, or the individual members, and they
|
|
||||||
will work to resolve the issue to the best of their ability. For more
|
|
||||||
information on who is on the Technical Advisory Board and what their
|
|
||||||
role is, please see:
|
|
||||||
|
|
||||||
- http://www.linuxfoundation.org/projects/linux/tab
|
|
||||||
|
|
||||||
As a reviewer of code, please strive to keep things civil and focused on
|
|
||||||
the technical issues involved. We are all humans, and frustrations can
|
|
||||||
be high on both sides of the process. Try to keep in mind the immortal
|
|
||||||
words of Bill and Ted, "Be excellent to each other."
|
|
@@ -20,7 +20,7 @@ Below are the essential guides that every developer should read.
|
|||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
howto
|
howto
|
||||||
code-of-conflict
|
code-of-conduct
|
||||||
development-process
|
development-process
|
||||||
submitting-patches
|
submitting-patches
|
||||||
coding-style
|
coding-style
|
||||||
|
@@ -97,6 +97,11 @@ parameters may be changed at runtime by the command
|
|||||||
allowing boot to proceed. none ignores them, expecting
|
allowing boot to proceed. none ignores them, expecting
|
||||||
user space to do the scan.
|
user space to do the scan.
|
||||||
|
|
||||||
|
scsi_mod.use_blk_mq=
|
||||||
|
[SCSI] use blk-mq I/O path by default
|
||||||
|
See SCSI_MQ_DEFAULT in drivers/scsi/Kconfig.
|
||||||
|
Format: <y/n>
|
||||||
|
|
||||||
sim710= [SCSI,HW]
|
sim710= [SCSI,HW]
|
||||||
See header of drivers/scsi/sim710.c.
|
See header of drivers/scsi/sim710.c.
|
||||||
|
|
||||||
|
@@ -4510,7 +4510,8 @@ Do not enable KVM_FEATURE_PV_UNHALT if you disable HLT exits.
|
|||||||
Architectures: s390
|
Architectures: s390
|
||||||
Parameters: none
|
Parameters: none
|
||||||
Returns: 0 on success, -EINVAL if hpage module parameter was not set
|
Returns: 0 on success, -EINVAL if hpage module parameter was not set
|
||||||
or cmma is enabled
|
or cmma is enabled, or the VM has the KVM_VM_S390_UCONTROL
|
||||||
|
flag set
|
||||||
|
|
||||||
With this capability the KVM support for memory backing with 1m pages
|
With this capability the KVM support for memory backing with 1m pages
|
||||||
through hugetlbfs can be enabled for a VM. After the capability is
|
through hugetlbfs can be enabled for a VM. After the capability is
|
||||||
@@ -4521,6 +4522,15 @@ hpage module parameter is not set to 1, -EINVAL is returned.
|
|||||||
While it is generally possible to create a huge page backed VM without
|
While it is generally possible to create a huge page backed VM without
|
||||||
this capability, the VM will not be able to run.
|
this capability, the VM will not be able to run.
|
||||||
|
|
||||||
|
7.14 KVM_CAP_MSR_PLATFORM_INFO
|
||||||
|
|
||||||
|
Architectures: x86
|
||||||
|
Parameters: args[0] whether feature should be enabled or not
|
||||||
|
|
||||||
|
With this capability, a guest may read the MSR_PLATFORM_INFO MSR. Otherwise,
|
||||||
|
a #GP would be raised when the guest tries to access. Currently, this
|
||||||
|
capability does not enable write permissions of this MSR for the guest.
|
||||||
|
|
||||||
8. Other capabilities.
|
8. Other capabilities.
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
@@ -35,25 +35,25 @@ and two USB cables, connected like this:
|
|||||||
( If your system does not list a debug port capability then you probably
|
( If your system does not list a debug port capability then you probably
|
||||||
won't be able to use the USB debug key. )
|
won't be able to use the USB debug key. )
|
||||||
|
|
||||||
b.) You also need a Netchip USB debug cable/key:
|
b.) You also need a NetChip USB debug cable/key:
|
||||||
|
|
||||||
http://www.plxtech.com/products/NET2000/NET20DC/default.asp
|
http://www.plxtech.com/products/NET2000/NET20DC/default.asp
|
||||||
|
|
||||||
This is a small blue plastic connector with two USB connections,
|
This is a small blue plastic connector with two USB connections;
|
||||||
it draws power from its USB connections.
|
it draws power from its USB connections.
|
||||||
|
|
||||||
c.) You need a second client/console system with a high speed USB 2.0
|
c.) You need a second client/console system with a high speed USB 2.0
|
||||||
port.
|
port.
|
||||||
|
|
||||||
d.) The Netchip device must be plugged directly into the physical
|
d.) The NetChip device must be plugged directly into the physical
|
||||||
debug port on the "host/target" system. You cannot use a USB hub in
|
debug port on the "host/target" system. You cannot use a USB hub in
|
||||||
between the physical debug port and the "host/target" system.
|
between the physical debug port and the "host/target" system.
|
||||||
|
|
||||||
The EHCI debug controller is bound to a specific physical USB
|
The EHCI debug controller is bound to a specific physical USB
|
||||||
port and the Netchip device will only work as an early printk
|
port and the NetChip device will only work as an early printk
|
||||||
device in this port. The EHCI host controllers are electrically
|
device in this port. The EHCI host controllers are electrically
|
||||||
wired such that the EHCI debug controller is hooked up to the
|
wired such that the EHCI debug controller is hooked up to the
|
||||||
first physical and there is no way to change this via software.
|
first physical port and there is no way to change this via software.
|
||||||
You can find the physical port through experimentation by trying
|
You can find the physical port through experimentation by trying
|
||||||
each physical port on the system and rebooting. Or you can try
|
each physical port on the system and rebooting. Or you can try
|
||||||
and use lsusb or look at the kernel info messages emitted by the
|
and use lsusb or look at the kernel info messages emitted by the
|
||||||
@@ -65,9 +65,9 @@ and two USB cables, connected like this:
|
|||||||
to the hardware vendor, because there is no reason not to wire
|
to the hardware vendor, because there is no reason not to wire
|
||||||
this port into one of the physically accessible ports.
|
this port into one of the physically accessible ports.
|
||||||
|
|
||||||
e.) It is also important to note, that many versions of the Netchip
|
e.) It is also important to note, that many versions of the NetChip
|
||||||
device require the "client/console" system to be plugged into the
|
device require the "client/console" system to be plugged into the
|
||||||
right and side of the device (with the product logo facing up and
|
right hand side of the device (with the product logo facing up and
|
||||||
readable left to right). The reason being is that the 5 volt
|
readable left to right). The reason being is that the 5 volt
|
||||||
power supply is taken from only one side of the device and it
|
power supply is taken from only one side of the device and it
|
||||||
must be the side that does not get rebooted.
|
must be the side that does not get rebooted.
|
||||||
@@ -81,13 +81,18 @@ and two USB cables, connected like this:
|
|||||||
CONFIG_EARLY_PRINTK_DBGP=y
|
CONFIG_EARLY_PRINTK_DBGP=y
|
||||||
|
|
||||||
And you need to add the boot command line: "earlyprintk=dbgp".
|
And you need to add the boot command line: "earlyprintk=dbgp".
|
||||||
|
|
||||||
(If you are using Grub, append it to the 'kernel' line in
|
(If you are using Grub, append it to the 'kernel' line in
|
||||||
/etc/grub.conf)
|
/etc/grub.conf. If you are using Grub2 on a BIOS firmware system,
|
||||||
|
append it to the 'linux' line in /boot/grub2/grub.cfg. If you are
|
||||||
|
using Grub2 on an EFI firmware system, append it to the 'linux'
|
||||||
|
or 'linuxefi' line in /boot/grub2/grub.cfg or
|
||||||
|
/boot/efi/EFI/<distro>/grub.cfg.)
|
||||||
|
|
||||||
On systems with more than one EHCI debug controller you must
|
On systems with more than one EHCI debug controller you must
|
||||||
specify the correct EHCI debug controller number. The ordering
|
specify the correct EHCI debug controller number. The ordering
|
||||||
comes from the PCI bus enumeration of the EHCI controllers. The
|
comes from the PCI bus enumeration of the EHCI controllers. The
|
||||||
default with no number argument is "0" the first EHCI debug
|
default with no number argument is "0" or the first EHCI debug
|
||||||
controller. To use the second EHCI debug controller, you would
|
controller. To use the second EHCI debug controller, you would
|
||||||
use the command line: "earlyprintk=dbgp1"
|
use the command line: "earlyprintk=dbgp1"
|
||||||
|
|
||||||
@@ -111,7 +116,7 @@ and two USB cables, connected like this:
|
|||||||
see the raw output.
|
see the raw output.
|
||||||
|
|
||||||
c.) On Nvidia Southbridge based systems: the kernel will try to probe
|
c.) On Nvidia Southbridge based systems: the kernel will try to probe
|
||||||
and find out which port has debug device connected.
|
and find out which port has a debug device connected.
|
||||||
|
|
||||||
3. Testing that it works fine:
|
3. Testing that it works fine:
|
||||||
|
|
||||||
|
72
MAINTAINERS
72
MAINTAINERS
@@ -2311,6 +2311,7 @@ F: drivers/clocksource/cadence_ttc_timer.c
|
|||||||
F: drivers/i2c/busses/i2c-cadence.c
|
F: drivers/i2c/busses/i2c-cadence.c
|
||||||
F: drivers/mmc/host/sdhci-of-arasan.c
|
F: drivers/mmc/host/sdhci-of-arasan.c
|
||||||
F: drivers/edac/synopsys_edac.c
|
F: drivers/edac/synopsys_edac.c
|
||||||
|
F: drivers/i2c/busses/i2c-xiic.c
|
||||||
|
|
||||||
ARM64 PORT (AARCH64 ARCHITECTURE)
|
ARM64 PORT (AARCH64 ARCHITECTURE)
|
||||||
M: Catalin Marinas <catalin.marinas@arm.com>
|
M: Catalin Marinas <catalin.marinas@arm.com>
|
||||||
@@ -4720,8 +4721,11 @@ F: drivers/gpu/drm/tdfx/
|
|||||||
|
|
||||||
DRM DRIVER FOR USB DISPLAYLINK VIDEO ADAPTERS
|
DRM DRIVER FOR USB DISPLAYLINK VIDEO ADAPTERS
|
||||||
M: Dave Airlie <airlied@redhat.com>
|
M: Dave Airlie <airlied@redhat.com>
|
||||||
|
R: Sean Paul <sean@poorly.run>
|
||||||
|
L: dri-devel@lists.freedesktop.org
|
||||||
S: Odd Fixes
|
S: Odd Fixes
|
||||||
F: drivers/gpu/drm/udl/
|
F: drivers/gpu/drm/udl/
|
||||||
|
T: git git://anongit.freedesktop.org/drm/drm-misc
|
||||||
|
|
||||||
DRM DRIVER FOR VMWARE VIRTUAL GPU
|
DRM DRIVER FOR VMWARE VIRTUAL GPU
|
||||||
M: "VMware Graphics" <linux-graphics-maintainer@vmware.com>
|
M: "VMware Graphics" <linux-graphics-maintainer@vmware.com>
|
||||||
@@ -4751,8 +4755,8 @@ F: include/uapi/drm/
|
|||||||
F: include/linux/vga*
|
F: include/linux/vga*
|
||||||
|
|
||||||
DRM DRIVERS AND MISC GPU PATCHES
|
DRM DRIVERS AND MISC GPU PATCHES
|
||||||
M: Gustavo Padovan <gustavo@padovan.org>
|
|
||||||
M: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
M: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||||
|
M: Maxime Ripard <maxime.ripard@bootlin.com>
|
||||||
M: Sean Paul <sean@poorly.run>
|
M: Sean Paul <sean@poorly.run>
|
||||||
W: https://01.org/linuxgraphics/gfx-docs/maintainer-tools/drm-misc.html
|
W: https://01.org/linuxgraphics/gfx-docs/maintainer-tools/drm-misc.html
|
||||||
S: Maintained
|
S: Maintained
|
||||||
@@ -4821,6 +4825,7 @@ F: drivers/gpu/drm/fsl-dcu/
|
|||||||
F: Documentation/devicetree/bindings/display/fsl,dcu.txt
|
F: Documentation/devicetree/bindings/display/fsl,dcu.txt
|
||||||
F: Documentation/devicetree/bindings/display/fsl,tcon.txt
|
F: Documentation/devicetree/bindings/display/fsl,tcon.txt
|
||||||
F: Documentation/devicetree/bindings/display/panel/nec,nl4827hc19-05b.txt
|
F: Documentation/devicetree/bindings/display/panel/nec,nl4827hc19-05b.txt
|
||||||
|
T: git git://anongit.freedesktop.org/drm/drm-misc
|
||||||
|
|
||||||
DRM DRIVERS FOR FREESCALE IMX
|
DRM DRIVERS FOR FREESCALE IMX
|
||||||
M: Philipp Zabel <p.zabel@pengutronix.de>
|
M: Philipp Zabel <p.zabel@pengutronix.de>
|
||||||
@@ -5625,6 +5630,8 @@ 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>
|
||||||
|
L: dri-devel@lists.freedesktop.org
|
||||||
|
L: linux-fbdev@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/staging/fbtft/
|
F: drivers/staging/fbtft/
|
||||||
|
|
||||||
@@ -6060,7 +6067,7 @@ F: Documentation/gcc-plugins.txt
|
|||||||
|
|
||||||
GASKET DRIVER FRAMEWORK
|
GASKET DRIVER FRAMEWORK
|
||||||
M: Rob Springer <rspringer@google.com>
|
M: Rob Springer <rspringer@google.com>
|
||||||
M: John Joseph <jnjoseph@google.com>
|
M: Todd Poynor <toddpoynor@google.com>
|
||||||
M: Ben Chan <benchan@chromium.org>
|
M: Ben Chan <benchan@chromium.org>
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/staging/gasket/
|
F: drivers/staging/gasket/
|
||||||
@@ -7016,6 +7023,20 @@ F: drivers/crypto/vmx/aes*
|
|||||||
F: drivers/crypto/vmx/ghash*
|
F: drivers/crypto/vmx/ghash*
|
||||||
F: drivers/crypto/vmx/ppc-xlate.pl
|
F: drivers/crypto/vmx/ppc-xlate.pl
|
||||||
|
|
||||||
|
IBM Power PCI Hotplug Driver for RPA-compliant PPC64 platform
|
||||||
|
M: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
|
||||||
|
L: linux-pci@vger.kernel.org
|
||||||
|
L: linuxppc-dev@lists.ozlabs.org
|
||||||
|
S: Supported
|
||||||
|
F: drivers/pci/hotplug/rpaphp*
|
||||||
|
|
||||||
|
IBM Power IO DLPAR Driver for RPA-compliant PPC64 platform
|
||||||
|
M: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
|
||||||
|
L: linux-pci@vger.kernel.org
|
||||||
|
L: linuxppc-dev@lists.ozlabs.org
|
||||||
|
S: Supported
|
||||||
|
F: drivers/pci/hotplug/rpadlpar*
|
||||||
|
|
||||||
IBM ServeRAID RAID DRIVER
|
IBM ServeRAID RAID DRIVER
|
||||||
S: Orphan
|
S: Orphan
|
||||||
F: drivers/scsi/ips.*
|
F: drivers/scsi/ips.*
|
||||||
@@ -8300,7 +8321,7 @@ F: include/linux/libata.h
|
|||||||
F: Documentation/devicetree/bindings/ata/
|
F: Documentation/devicetree/bindings/ata/
|
||||||
|
|
||||||
LIBLOCKDEP
|
LIBLOCKDEP
|
||||||
M: Sasha Levin <alexander.levin@verizon.com>
|
M: Sasha Levin <alexander.levin@microsoft.com>
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: tools/lib/lockdep/
|
F: tools/lib/lockdep/
|
||||||
|
|
||||||
@@ -9700,13 +9721,6 @@ Q: http://patchwork.linuxtv.org/project/linux-media/list/
|
|||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/media/dvb-frontends/mn88473*
|
F: drivers/media/dvb-frontends/mn88473*
|
||||||
|
|
||||||
PCI DRIVER FOR MOBIVEIL PCIE IP
|
|
||||||
M: Subrahmanya Lingappa <l.subrahmanya@mobiveil.co.in>
|
|
||||||
L: linux-pci@vger.kernel.org
|
|
||||||
S: Supported
|
|
||||||
F: Documentation/devicetree/bindings/pci/mobiveil-pcie.txt
|
|
||||||
F: drivers/pci/controller/pcie-mobiveil.c
|
|
||||||
|
|
||||||
MODULE SUPPORT
|
MODULE SUPPORT
|
||||||
M: Jessica Yu <jeyu@kernel.org>
|
M: Jessica Yu <jeyu@kernel.org>
|
||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git modules-next
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git modules-next
|
||||||
@@ -9889,9 +9903,12 @@ F: drivers/media/tuners/mxl5007t.*
|
|||||||
|
|
||||||
MXSFB DRM DRIVER
|
MXSFB DRM DRIVER
|
||||||
M: Marek Vasut <marex@denx.de>
|
M: Marek Vasut <marex@denx.de>
|
||||||
|
M: Stefan Agner <stefan@agner.ch>
|
||||||
|
L: dri-devel@lists.freedesktop.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/gpu/drm/mxsfb/
|
F: drivers/gpu/drm/mxsfb/
|
||||||
F: Documentation/devicetree/bindings/display/mxsfb.txt
|
F: Documentation/devicetree/bindings/display/mxsfb.txt
|
||||||
|
T: git git://anongit.freedesktop.org/drm/drm-misc
|
||||||
|
|
||||||
MYRICOM MYRI-10G 10GbE DRIVER (MYRI10GE)
|
MYRICOM MYRI-10G 10GbE DRIVER (MYRI10GE)
|
||||||
M: Chris Lee <christopher.lee@cspi.com>
|
M: Chris Lee <christopher.lee@cspi.com>
|
||||||
@@ -10933,7 +10950,7 @@ M: Willy Tarreau <willy@haproxy.com>
|
|||||||
M: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
|
M: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
|
||||||
S: Odd Fixes
|
S: Odd Fixes
|
||||||
F: Documentation/auxdisplay/lcd-panel-cgram.txt
|
F: Documentation/auxdisplay/lcd-panel-cgram.txt
|
||||||
F: drivers/misc/panel.c
|
F: drivers/auxdisplay/panel.c
|
||||||
|
|
||||||
PARALLEL PORT SUBSYSTEM
|
PARALLEL PORT SUBSYSTEM
|
||||||
M: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
|
M: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
|
||||||
@@ -11121,6 +11138,13 @@ F: include/uapi/linux/switchtec_ioctl.h
|
|||||||
F: include/linux/switchtec.h
|
F: include/linux/switchtec.h
|
||||||
F: drivers/ntb/hw/mscc/
|
F: drivers/ntb/hw/mscc/
|
||||||
|
|
||||||
|
PCI DRIVER FOR MOBIVEIL PCIE IP
|
||||||
|
M: Subrahmanya Lingappa <l.subrahmanya@mobiveil.co.in>
|
||||||
|
L: linux-pci@vger.kernel.org
|
||||||
|
S: Supported
|
||||||
|
F: Documentation/devicetree/bindings/pci/mobiveil-pcie.txt
|
||||||
|
F: drivers/pci/controller/pcie-mobiveil.c
|
||||||
|
|
||||||
PCI DRIVER FOR MVEBU (Marvell Armada 370 and Armada XP SOC support)
|
PCI DRIVER FOR MVEBU (Marvell Armada 370 and Armada XP SOC support)
|
||||||
M: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
M: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||||
M: Jason Cooper <jason@lakedaemon.net>
|
M: Jason Cooper <jason@lakedaemon.net>
|
||||||
@@ -11154,7 +11178,7 @@ F: drivers/pci/controller/dwc/pci-exynos.c
|
|||||||
|
|
||||||
PCI DRIVER FOR SYNOPSYS DESIGNWARE
|
PCI DRIVER FOR SYNOPSYS DESIGNWARE
|
||||||
M: Jingoo Han <jingoohan1@gmail.com>
|
M: Jingoo Han <jingoohan1@gmail.com>
|
||||||
M: Joao Pinto <Joao.Pinto@synopsys.com>
|
M: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
|
||||||
L: linux-pci@vger.kernel.org
|
L: linux-pci@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: Documentation/devicetree/bindings/pci/designware-pcie.txt
|
F: Documentation/devicetree/bindings/pci/designware-pcie.txt
|
||||||
@@ -11187,8 +11211,14 @@ F: tools/pci/
|
|||||||
|
|
||||||
PCI ENHANCED ERROR HANDLING (EEH) FOR POWERPC
|
PCI ENHANCED ERROR HANDLING (EEH) FOR POWERPC
|
||||||
M: Russell Currey <ruscur@russell.cc>
|
M: Russell Currey <ruscur@russell.cc>
|
||||||
|
M: Sam Bobroff <sbobroff@linux.ibm.com>
|
||||||
|
M: Oliver O'Halloran <oohall@gmail.com>
|
||||||
L: linuxppc-dev@lists.ozlabs.org
|
L: linuxppc-dev@lists.ozlabs.org
|
||||||
S: Supported
|
S: Supported
|
||||||
|
F: Documentation/PCI/pci-error-recovery.txt
|
||||||
|
F: drivers/pci/pcie/aer.c
|
||||||
|
F: drivers/pci/pcie/dpc.c
|
||||||
|
F: drivers/pci/pcie/err.c
|
||||||
F: Documentation/powerpc/eeh-pci-error-recovery.txt
|
F: Documentation/powerpc/eeh-pci-error-recovery.txt
|
||||||
F: arch/powerpc/kernel/eeh*.c
|
F: arch/powerpc/kernel/eeh*.c
|
||||||
F: arch/powerpc/platforms/*/eeh*.c
|
F: arch/powerpc/platforms/*/eeh*.c
|
||||||
@@ -11346,10 +11376,10 @@ S: Maintained
|
|||||||
F: drivers/platform/x86/peaq-wmi.c
|
F: drivers/platform/x86/peaq-wmi.c
|
||||||
|
|
||||||
PER-CPU MEMORY ALLOCATOR
|
PER-CPU MEMORY ALLOCATOR
|
||||||
|
M: Dennis Zhou <dennis@kernel.org>
|
||||||
M: Tejun Heo <tj@kernel.org>
|
M: Tejun Heo <tj@kernel.org>
|
||||||
M: Christoph Lameter <cl@linux.com>
|
M: Christoph Lameter <cl@linux.com>
|
||||||
M: Dennis Zhou <dennisszhou@gmail.com>
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git
|
||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu.git
|
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: include/linux/percpu*.h
|
F: include/linux/percpu*.h
|
||||||
F: mm/percpu*.c
|
F: mm/percpu*.c
|
||||||
@@ -12244,6 +12274,7 @@ F: Documentation/networking/rds.txt
|
|||||||
|
|
||||||
RDT - RESOURCE ALLOCATION
|
RDT - RESOURCE ALLOCATION
|
||||||
M: Fenghua Yu <fenghua.yu@intel.com>
|
M: Fenghua Yu <fenghua.yu@intel.com>
|
||||||
|
M: Reinette Chatre <reinette.chatre@intel.com>
|
||||||
L: linux-kernel@vger.kernel.org
|
L: linux-kernel@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: arch/x86/kernel/cpu/intel_rdt*
|
F: arch/x86/kernel/cpu/intel_rdt*
|
||||||
@@ -13433,9 +13464,8 @@ F: drivers/i2c/busses/i2c-synquacer.c
|
|||||||
F: Documentation/devicetree/bindings/i2c/i2c-synquacer.txt
|
F: Documentation/devicetree/bindings/i2c/i2c-synquacer.txt
|
||||||
|
|
||||||
SOCIONEXT UNIPHIER SOUND DRIVER
|
SOCIONEXT UNIPHIER SOUND DRIVER
|
||||||
M: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
|
|
||||||
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
||||||
S: Maintained
|
S: Orphan
|
||||||
F: sound/soc/uniphier/
|
F: sound/soc/uniphier/
|
||||||
|
|
||||||
SOEKRIS NET48XX LED SUPPORT
|
SOEKRIS NET48XX LED SUPPORT
|
||||||
@@ -15905,6 +15935,7 @@ F: net/x25/
|
|||||||
X86 ARCHITECTURE (32-BIT AND 64-BIT)
|
X86 ARCHITECTURE (32-BIT AND 64-BIT)
|
||||||
M: Thomas Gleixner <tglx@linutronix.de>
|
M: Thomas Gleixner <tglx@linutronix.de>
|
||||||
M: Ingo Molnar <mingo@redhat.com>
|
M: Ingo Molnar <mingo@redhat.com>
|
||||||
|
M: Borislav Petkov <bp@alien8.de>
|
||||||
R: "H. Peter Anvin" <hpa@zytor.com>
|
R: "H. Peter Anvin" <hpa@zytor.com>
|
||||||
M: x86@kernel.org
|
M: x86@kernel.org
|
||||||
L: linux-kernel@vger.kernel.org
|
L: linux-kernel@vger.kernel.org
|
||||||
@@ -15933,6 +15964,15 @@ M: Borislav Petkov <bp@alien8.de>
|
|||||||
S: Maintained
|
S: Maintained
|
||||||
F: arch/x86/kernel/cpu/microcode/*
|
F: arch/x86/kernel/cpu/microcode/*
|
||||||
|
|
||||||
|
X86 MM
|
||||||
|
M: Dave Hansen <dave.hansen@linux.intel.com>
|
||||||
|
M: Andy Lutomirski <luto@kernel.org>
|
||||||
|
M: Peter Zijlstra <peterz@infradead.org>
|
||||||
|
L: linux-kernel@vger.kernel.org
|
||||||
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/mm
|
||||||
|
S: Maintained
|
||||||
|
F: arch/x86/mm/
|
||||||
|
|
||||||
X86 PLATFORM DRIVERS
|
X86 PLATFORM DRIVERS
|
||||||
M: Darren Hart <dvhart@infradead.org>
|
M: Darren Hart <dvhart@infradead.org>
|
||||||
M: Andy Shevchenko <andy@infradead.org>
|
M: Andy Shevchenko <andy@infradead.org>
|
||||||
|
24
Makefile
24
Makefile
@@ -2,7 +2,7 @@
|
|||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 19
|
PATCHLEVEL = 19
|
||||||
SUBLEVEL = 0
|
SUBLEVEL = 0
|
||||||
EXTRAVERSION = -rc2
|
EXTRAVERSION = -rc6
|
||||||
NAME = Merciless Moray
|
NAME = Merciless Moray
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
@@ -299,19 +299,7 @@ KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
|
|||||||
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
|
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
|
||||||
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
|
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
|
||||||
|
|
||||||
# SUBARCH tells the usermode build what the underlying arch is. That is set
|
include scripts/subarch.include
|
||||||
# first, and if a usermode build is happening, the "ARCH=um" on the command
|
|
||||||
# line overrides the setting of ARCH below. If a native build is happening,
|
|
||||||
# then ARCH is assigned, getting whatever value it gets normally, and
|
|
||||||
# SUBARCH is subsequently ignored.
|
|
||||||
|
|
||||||
SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
|
|
||||||
-e s/sun4u/sparc64/ \
|
|
||||||
-e s/arm.*/arm/ -e s/sa110/arm/ \
|
|
||||||
-e s/s390x/s390/ -e s/parisc64/parisc/ \
|
|
||||||
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
|
|
||||||
-e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \
|
|
||||||
-e s/riscv.*/riscv/)
|
|
||||||
|
|
||||||
# Cross compiling and selecting different set of gcc/bin-utils
|
# Cross compiling and selecting different set of gcc/bin-utils
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
@@ -616,6 +604,11 @@ CFLAGS_GCOV := -fprofile-arcs -ftest-coverage \
|
|||||||
$(call cc-disable-warning,maybe-uninitialized,)
|
$(call cc-disable-warning,maybe-uninitialized,)
|
||||||
export CFLAGS_GCOV
|
export CFLAGS_GCOV
|
||||||
|
|
||||||
|
# The arch Makefiles can override CC_FLAGS_FTRACE. We may also append it later.
|
||||||
|
ifdef CONFIG_FUNCTION_TRACER
|
||||||
|
CC_FLAGS_FTRACE := -pg
|
||||||
|
endif
|
||||||
|
|
||||||
# The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default
|
# The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default
|
||||||
# values of the respective KBUILD_* variables
|
# values of the respective KBUILD_* variables
|
||||||
ARCH_CPPFLAGS :=
|
ARCH_CPPFLAGS :=
|
||||||
@@ -755,9 +748,6 @@ KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_FUNCTION_TRACER
|
ifdef CONFIG_FUNCTION_TRACER
|
||||||
ifndef CC_FLAGS_FTRACE
|
|
||||||
CC_FLAGS_FTRACE := -pg
|
|
||||||
endif
|
|
||||||
ifdef CONFIG_FTRACE_MCOUNT_RECORD
|
ifdef CONFIG_FTRACE_MCOUNT_RECORD
|
||||||
# gcc 5 supports generating the mcount tables directly
|
# gcc 5 supports generating the mcount tables directly
|
||||||
ifeq ($(call cc-option-yn,-mrecord-mcount),y)
|
ifeq ($(call cc-option-yn,-mrecord-mcount),y)
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
config ARC
|
config ARC
|
||||||
def_bool y
|
def_bool y
|
||||||
select ARC_TIMERS
|
select ARC_TIMERS
|
||||||
|
select ARCH_HAS_PTE_SPECIAL
|
||||||
select ARCH_HAS_SYNC_DMA_FOR_CPU
|
select ARCH_HAS_SYNC_DMA_FOR_CPU
|
||||||
select ARCH_HAS_SYNC_DMA_FOR_DEVICE
|
select ARCH_HAS_SYNC_DMA_FOR_DEVICE
|
||||||
select ARCH_HAS_SG_CHAIN
|
select ARCH_HAS_SG_CHAIN
|
||||||
@@ -28,8 +29,12 @@ config ARC
|
|||||||
select GENERIC_SMP_IDLE_THREAD
|
select GENERIC_SMP_IDLE_THREAD
|
||||||
select HAVE_ARCH_KGDB
|
select HAVE_ARCH_KGDB
|
||||||
select HAVE_ARCH_TRACEHOOK
|
select HAVE_ARCH_TRACEHOOK
|
||||||
|
select HAVE_DEBUG_STACKOVERFLOW
|
||||||
select HAVE_FUTEX_CMPXCHG if FUTEX
|
select HAVE_FUTEX_CMPXCHG if FUTEX
|
||||||
|
select HAVE_GENERIC_DMA_COHERENT
|
||||||
select HAVE_IOREMAP_PROT
|
select HAVE_IOREMAP_PROT
|
||||||
|
select HAVE_KERNEL_GZIP
|
||||||
|
select HAVE_KERNEL_LZMA
|
||||||
select HAVE_KPROBES
|
select HAVE_KPROBES
|
||||||
select HAVE_KRETPROBES
|
select HAVE_KRETPROBES
|
||||||
select HAVE_MEMBLOCK
|
select HAVE_MEMBLOCK
|
||||||
@@ -44,11 +49,6 @@ config ARC
|
|||||||
select OF_EARLY_FLATTREE
|
select OF_EARLY_FLATTREE
|
||||||
select OF_RESERVED_MEM
|
select OF_RESERVED_MEM
|
||||||
select PERF_USE_VMALLOC if ARC_CACHE_VIPT_ALIASING
|
select PERF_USE_VMALLOC if ARC_CACHE_VIPT_ALIASING
|
||||||
select HAVE_DEBUG_STACKOVERFLOW
|
|
||||||
select HAVE_GENERIC_DMA_COHERENT
|
|
||||||
select HAVE_KERNEL_GZIP
|
|
||||||
select HAVE_KERNEL_LZMA
|
|
||||||
select ARCH_HAS_PTE_SPECIAL
|
|
||||||
|
|
||||||
config ARCH_HAS_CACHE_LINE_SIZE
|
config ARCH_HAS_CACHE_LINE_SIZE
|
||||||
def_bool y
|
def_bool y
|
||||||
|
@@ -43,10 +43,7 @@ ifdef CONFIG_ARC_CURR_IN_REG
|
|||||||
LINUXINCLUDE += -include ${src}/arch/arc/include/asm/current.h
|
LINUXINCLUDE += -include ${src}/arch/arc/include/asm/current.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
upto_gcc44 := $(call cc-ifversion, -le, 0404, y)
|
cflags-y += -fsection-anchors
|
||||||
atleast_gcc44 := $(call cc-ifversion, -ge, 0404, y)
|
|
||||||
|
|
||||||
cflags-$(atleast_gcc44) += -fsection-anchors
|
|
||||||
|
|
||||||
cflags-$(CONFIG_ARC_HAS_LLSC) += -mlock
|
cflags-$(CONFIG_ARC_HAS_LLSC) += -mlock
|
||||||
cflags-$(CONFIG_ARC_HAS_SWAPE) += -mswape
|
cflags-$(CONFIG_ARC_HAS_SWAPE) += -mswape
|
||||||
@@ -82,11 +79,6 @@ cflags-$(disable_small_data) += -mno-sdata -fcall-used-gp
|
|||||||
cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mbig-endian
|
cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mbig-endian
|
||||||
ldflags-$(CONFIG_CPU_BIG_ENDIAN) += -EB
|
ldflags-$(CONFIG_CPU_BIG_ENDIAN) += -EB
|
||||||
|
|
||||||
# STAR 9000518362: (fixed with binutils shipping with gcc 4.8)
|
|
||||||
# arc-linux-uclibc-ld (buildroot) or arceb-elf32-ld (EZChip) don't accept
|
|
||||||
# --build-id w/o "-marclinux". Default arc-elf32-ld is OK
|
|
||||||
ldflags-$(upto_gcc44) += -marclinux
|
|
||||||
|
|
||||||
LIBGCC := $(shell $(CC) $(cflags-y) --print-libgcc-file-name)
|
LIBGCC := $(shell $(CC) $(cflags-y) --print-libgcc-file-name)
|
||||||
|
|
||||||
# Modules with short calls might break for calls into builtin-kernel
|
# Modules with short calls might break for calls into builtin-kernel
|
||||||
|
@@ -93,6 +93,32 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Mark DMA peripherals connected via IOC port as dma-coherent. We do
|
||||||
|
* it via overlay because peripherals defined in axs10x_mb.dtsi are
|
||||||
|
* used for both AXS101 and AXS103 boards and only AXS103 has IOC (so
|
||||||
|
* only AXS103 board has HW-coherent DMA peripherals)
|
||||||
|
* We don't need to mark pgu@17000 as dma-coherent because it uses
|
||||||
|
* external DMA buffer located outside of IOC aperture.
|
||||||
|
*/
|
||||||
|
axs10x_mb {
|
||||||
|
ethernet@0x18000 {
|
||||||
|
dma-coherent;
|
||||||
|
};
|
||||||
|
|
||||||
|
ehci@0x40000 {
|
||||||
|
dma-coherent;
|
||||||
|
};
|
||||||
|
|
||||||
|
ohci@0x60000 {
|
||||||
|
dma-coherent;
|
||||||
|
};
|
||||||
|
|
||||||
|
mmc@0x15000 {
|
||||||
|
dma-coherent;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The DW APB ICTL intc on MB is connected to CPU intc via a
|
* The DW APB ICTL intc on MB is connected to CPU intc via a
|
||||||
* DT "invisible" DW APB GPIO block, configured to simply pass thru
|
* DT "invisible" DW APB GPIO block, configured to simply pass thru
|
||||||
|
@@ -100,6 +100,32 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Mark DMA peripherals connected via IOC port as dma-coherent. We do
|
||||||
|
* it via overlay because peripherals defined in axs10x_mb.dtsi are
|
||||||
|
* used for both AXS101 and AXS103 boards and only AXS103 has IOC (so
|
||||||
|
* only AXS103 board has HW-coherent DMA peripherals)
|
||||||
|
* We don't need to mark pgu@17000 as dma-coherent because it uses
|
||||||
|
* external DMA buffer located outside of IOC aperture.
|
||||||
|
*/
|
||||||
|
axs10x_mb {
|
||||||
|
ethernet@0x18000 {
|
||||||
|
dma-coherent;
|
||||||
|
};
|
||||||
|
|
||||||
|
ehci@0x40000 {
|
||||||
|
dma-coherent;
|
||||||
|
};
|
||||||
|
|
||||||
|
ohci@0x60000 {
|
||||||
|
dma-coherent;
|
||||||
|
};
|
||||||
|
|
||||||
|
mmc@0x15000 {
|
||||||
|
dma-coherent;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This INTC is actually connected to DW APB GPIO
|
* This INTC is actually connected to DW APB GPIO
|
||||||
* which acts as a wire between MB INTC and CPU INTC.
|
* which acts as a wire between MB INTC and CPU INTC.
|
||||||
|
@@ -9,6 +9,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
|
aliases {
|
||||||
|
ethernet = &gmac;
|
||||||
|
};
|
||||||
|
|
||||||
axs10x_mb {
|
axs10x_mb {
|
||||||
compatible = "simple-bus";
|
compatible = "simple-bus";
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
@@ -68,7 +72,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
ethernet@0x18000 {
|
gmac: ethernet@0x18000 {
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
compatible = "snps,dwmac";
|
compatible = "snps,dwmac";
|
||||||
reg = < 0x18000 0x2000 >;
|
reg = < 0x18000 0x2000 >;
|
||||||
@@ -81,6 +85,7 @@
|
|||||||
max-speed = <100>;
|
max-speed = <100>;
|
||||||
resets = <&creg_rst 5>;
|
resets = <&creg_rst 5>;
|
||||||
reset-names = "stmmaceth";
|
reset-names = "stmmaceth";
|
||||||
|
mac-address = [00 00 00 00 00 00]; /* Filled in by U-Boot */
|
||||||
};
|
};
|
||||||
|
|
||||||
ehci@0x40000 {
|
ehci@0x40000 {
|
||||||
|
@@ -25,6 +25,10 @@
|
|||||||
bootargs = "earlycon=uart8250,mmio32,0xf0005000,115200n8 console=ttyS0,115200n8 debug print-fatal-signals=1";
|
bootargs = "earlycon=uart8250,mmio32,0xf0005000,115200n8 console=ttyS0,115200n8 debug print-fatal-signals=1";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
ethernet = &gmac;
|
||||||
|
};
|
||||||
|
|
||||||
cpus {
|
cpus {
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
@@ -163,7 +167,7 @@
|
|||||||
#clock-cells = <0>;
|
#clock-cells = <0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
ethernet@8000 {
|
gmac: ethernet@8000 {
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
compatible = "snps,dwmac";
|
compatible = "snps,dwmac";
|
||||||
reg = <0x8000 0x2000>;
|
reg = <0x8000 0x2000>;
|
||||||
@@ -176,6 +180,8 @@
|
|||||||
phy-handle = <&phy0>;
|
phy-handle = <&phy0>;
|
||||||
resets = <&cgu_rst HSDK_ETH_RESET>;
|
resets = <&cgu_rst HSDK_ETH_RESET>;
|
||||||
reset-names = "stmmaceth";
|
reset-names = "stmmaceth";
|
||||||
|
mac-address = [00 00 00 00 00 00]; /* Filled in by U-Boot */
|
||||||
|
dma-coherent;
|
||||||
|
|
||||||
mdio {
|
mdio {
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
@@ -194,12 +200,14 @@
|
|||||||
compatible = "snps,hsdk-v1.0-ohci", "generic-ohci";
|
compatible = "snps,hsdk-v1.0-ohci", "generic-ohci";
|
||||||
reg = <0x60000 0x100>;
|
reg = <0x60000 0x100>;
|
||||||
interrupts = <15>;
|
interrupts = <15>;
|
||||||
|
dma-coherent;
|
||||||
};
|
};
|
||||||
|
|
||||||
ehci@40000 {
|
ehci@40000 {
|
||||||
compatible = "snps,hsdk-v1.0-ehci", "generic-ehci";
|
compatible = "snps,hsdk-v1.0-ehci", "generic-ehci";
|
||||||
reg = <0x40000 0x100>;
|
reg = <0x40000 0x100>;
|
||||||
interrupts = <15>;
|
interrupts = <15>;
|
||||||
|
dma-coherent;
|
||||||
};
|
};
|
||||||
|
|
||||||
mmc@a000 {
|
mmc@a000 {
|
||||||
@@ -212,6 +220,7 @@
|
|||||||
clock-names = "biu", "ciu";
|
clock-names = "biu", "ciu";
|
||||||
interrupts = <12>;
|
interrupts = <12>;
|
||||||
bus-width = <4>;
|
bus-width = <4>;
|
||||||
|
dma-coherent;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
CONFIG_DEFAULT_HOSTNAME="ARCLinux"
|
|
||||||
# CONFIG_SWAP is not set
|
|
||||||
CONFIG_SYSVIPC=y
|
CONFIG_SYSVIPC=y
|
||||||
CONFIG_POSIX_MQUEUE=y
|
CONFIG_POSIX_MQUEUE=y
|
||||||
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
||||||
@@ -63,7 +61,6 @@ CONFIG_MOUSE_PS2_TOUCHKIT=y
|
|||||||
CONFIG_MOUSE_SERIAL=y
|
CONFIG_MOUSE_SERIAL=y
|
||||||
CONFIG_MOUSE_SYNAPTICS_USB=y
|
CONFIG_MOUSE_SYNAPTICS_USB=y
|
||||||
# CONFIG_LEGACY_PTYS is not set
|
# CONFIG_LEGACY_PTYS is not set
|
||||||
# CONFIG_DEVKMEM is not set
|
|
||||||
CONFIG_SERIAL_8250=y
|
CONFIG_SERIAL_8250=y
|
||||||
CONFIG_SERIAL_8250_CONSOLE=y
|
CONFIG_SERIAL_8250_CONSOLE=y
|
||||||
CONFIG_SERIAL_8250_DW=y
|
CONFIG_SERIAL_8250_DW=y
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
CONFIG_DEFAULT_HOSTNAME="ARCLinux"
|
|
||||||
# CONFIG_SWAP is not set
|
|
||||||
CONFIG_SYSVIPC=y
|
CONFIG_SYSVIPC=y
|
||||||
CONFIG_POSIX_MQUEUE=y
|
CONFIG_POSIX_MQUEUE=y
|
||||||
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
||||||
@@ -64,7 +62,6 @@ CONFIG_MOUSE_PS2_TOUCHKIT=y
|
|||||||
CONFIG_MOUSE_SERIAL=y
|
CONFIG_MOUSE_SERIAL=y
|
||||||
CONFIG_MOUSE_SYNAPTICS_USB=y
|
CONFIG_MOUSE_SYNAPTICS_USB=y
|
||||||
# CONFIG_LEGACY_PTYS is not set
|
# CONFIG_LEGACY_PTYS is not set
|
||||||
# CONFIG_DEVKMEM is not set
|
|
||||||
CONFIG_SERIAL_8250=y
|
CONFIG_SERIAL_8250=y
|
||||||
CONFIG_SERIAL_8250_CONSOLE=y
|
CONFIG_SERIAL_8250_CONSOLE=y
|
||||||
CONFIG_SERIAL_8250_DW=y
|
CONFIG_SERIAL_8250_DW=y
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
CONFIG_DEFAULT_HOSTNAME="ARCLinux"
|
|
||||||
# CONFIG_SWAP is not set
|
|
||||||
CONFIG_SYSVIPC=y
|
CONFIG_SYSVIPC=y
|
||||||
CONFIG_POSIX_MQUEUE=y
|
CONFIG_POSIX_MQUEUE=y
|
||||||
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
||||||
@@ -65,7 +63,6 @@ CONFIG_MOUSE_PS2_TOUCHKIT=y
|
|||||||
CONFIG_MOUSE_SERIAL=y
|
CONFIG_MOUSE_SERIAL=y
|
||||||
CONFIG_MOUSE_SYNAPTICS_USB=y
|
CONFIG_MOUSE_SYNAPTICS_USB=y
|
||||||
# CONFIG_LEGACY_PTYS is not set
|
# CONFIG_LEGACY_PTYS is not set
|
||||||
# CONFIG_DEVKMEM is not set
|
|
||||||
CONFIG_SERIAL_8250=y
|
CONFIG_SERIAL_8250=y
|
||||||
CONFIG_SERIAL_8250_CONSOLE=y
|
CONFIG_SERIAL_8250_CONSOLE=y
|
||||||
CONFIG_SERIAL_8250_DW=y
|
CONFIG_SERIAL_8250_DW=y
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
CONFIG_DEFAULT_HOSTNAME="ARCLinux"
|
|
||||||
# CONFIG_SWAP is not set
|
# CONFIG_SWAP is not set
|
||||||
CONFIG_SYSVIPC=y
|
CONFIG_SYSVIPC=y
|
||||||
CONFIG_POSIX_MQUEUE=y
|
CONFIG_POSIX_MQUEUE=y
|
||||||
@@ -57,7 +56,6 @@ CONFIG_MOUSE_PS2_TOUCHKIT=y
|
|||||||
# CONFIG_SERIO_SERPORT is not set
|
# CONFIG_SERIO_SERPORT is not set
|
||||||
CONFIG_SERIO_ARC_PS2=y
|
CONFIG_SERIO_ARC_PS2=y
|
||||||
# CONFIG_LEGACY_PTYS is not set
|
# CONFIG_LEGACY_PTYS is not set
|
||||||
# CONFIG_DEVKMEM is not set
|
|
||||||
CONFIG_SERIAL_8250=y
|
CONFIG_SERIAL_8250=y
|
||||||
CONFIG_SERIAL_8250_CONSOLE=y
|
CONFIG_SERIAL_8250_CONSOLE=y
|
||||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
CONFIG_DEFAULT_HOSTNAME="ARCLinux"
|
|
||||||
# CONFIG_SWAP is not set
|
# CONFIG_SWAP is not set
|
||||||
CONFIG_SYSVIPC=y
|
CONFIG_SYSVIPC=y
|
||||||
CONFIG_POSIX_MQUEUE=y
|
CONFIG_POSIX_MQUEUE=y
|
||||||
@@ -60,7 +59,6 @@ CONFIG_MOUSE_PS2_TOUCHKIT=y
|
|||||||
# CONFIG_SERIO_SERPORT is not set
|
# CONFIG_SERIO_SERPORT is not set
|
||||||
CONFIG_SERIO_ARC_PS2=y
|
CONFIG_SERIO_ARC_PS2=y
|
||||||
# CONFIG_LEGACY_PTYS is not set
|
# CONFIG_LEGACY_PTYS is not set
|
||||||
# CONFIG_DEVKMEM is not set
|
|
||||||
CONFIG_SERIAL_8250=y
|
CONFIG_SERIAL_8250=y
|
||||||
CONFIG_SERIAL_8250_CONSOLE=y
|
CONFIG_SERIAL_8250_CONSOLE=y
|
||||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
CONFIG_DEFAULT_HOSTNAME="ARCLinux"
|
|
||||||
CONFIG_SYSVIPC=y
|
CONFIG_SYSVIPC=y
|
||||||
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
||||||
CONFIG_NO_HZ_IDLE=y
|
CONFIG_NO_HZ_IDLE=y
|
||||||
|
@@ -59,7 +59,6 @@ CONFIG_NETCONSOLE=y
|
|||||||
# CONFIG_INPUT_MOUSE is not set
|
# CONFIG_INPUT_MOUSE is not set
|
||||||
# CONFIG_SERIO is not set
|
# CONFIG_SERIO is not set
|
||||||
# CONFIG_LEGACY_PTYS is not set
|
# CONFIG_LEGACY_PTYS is not set
|
||||||
# CONFIG_DEVKMEM is not set
|
|
||||||
CONFIG_SERIAL_8250=y
|
CONFIG_SERIAL_8250=y
|
||||||
CONFIG_SERIAL_8250_CONSOLE=y
|
CONFIG_SERIAL_8250_CONSOLE=y
|
||||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
# CONFIG_LOCALVERSION_AUTO is not set
|
# CONFIG_LOCALVERSION_AUTO is not set
|
||||||
CONFIG_DEFAULT_HOSTNAME="ARCLinux"
|
|
||||||
# CONFIG_SWAP is not set
|
# CONFIG_SWAP is not set
|
||||||
CONFIG_SYSVIPC=y
|
CONFIG_SYSVIPC=y
|
||||||
CONFIG_POSIX_MQUEUE=y
|
CONFIG_POSIX_MQUEUE=y
|
||||||
@@ -44,7 +43,6 @@ CONFIG_LXT_PHY=y
|
|||||||
# CONFIG_INPUT_MOUSE is not set
|
# CONFIG_INPUT_MOUSE is not set
|
||||||
# CONFIG_SERIO is not set
|
# CONFIG_SERIO is not set
|
||||||
# CONFIG_LEGACY_PTYS is not set
|
# CONFIG_LEGACY_PTYS is not set
|
||||||
# CONFIG_DEVKMEM is not set
|
|
||||||
CONFIG_SERIAL_ARC=y
|
CONFIG_SERIAL_ARC=y
|
||||||
CONFIG_SERIAL_ARC_CONSOLE=y
|
CONFIG_SERIAL_ARC_CONSOLE=y
|
||||||
# CONFIG_HW_RANDOM is not set
|
# CONFIG_HW_RANDOM is not set
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
# CONFIG_LOCALVERSION_AUTO is not set
|
# CONFIG_LOCALVERSION_AUTO is not set
|
||||||
CONFIG_DEFAULT_HOSTNAME="ARCLinux"
|
|
||||||
# CONFIG_SWAP is not set
|
# CONFIG_SWAP is not set
|
||||||
CONFIG_SYSVIPC=y
|
CONFIG_SYSVIPC=y
|
||||||
CONFIG_POSIX_MQUEUE=y
|
CONFIG_POSIX_MQUEUE=y
|
||||||
@@ -45,7 +44,6 @@ CONFIG_DEVTMPFS=y
|
|||||||
# CONFIG_INPUT_MOUSE is not set
|
# CONFIG_INPUT_MOUSE is not set
|
||||||
# CONFIG_SERIO is not set
|
# CONFIG_SERIO is not set
|
||||||
# CONFIG_LEGACY_PTYS is not set
|
# CONFIG_LEGACY_PTYS is not set
|
||||||
# CONFIG_DEVKMEM is not set
|
|
||||||
CONFIG_SERIAL_ARC=y
|
CONFIG_SERIAL_ARC=y
|
||||||
CONFIG_SERIAL_ARC_CONSOLE=y
|
CONFIG_SERIAL_ARC_CONSOLE=y
|
||||||
# CONFIG_HW_RANDOM is not set
|
# CONFIG_HW_RANDOM is not set
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
# CONFIG_LOCALVERSION_AUTO is not set
|
# CONFIG_LOCALVERSION_AUTO is not set
|
||||||
CONFIG_DEFAULT_HOSTNAME="ARCLinux"
|
|
||||||
# CONFIG_SWAP is not set
|
# CONFIG_SWAP is not set
|
||||||
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
||||||
CONFIG_HIGH_RES_TIMERS=y
|
CONFIG_HIGH_RES_TIMERS=y
|
||||||
@@ -44,7 +43,6 @@ CONFIG_DEVTMPFS=y
|
|||||||
# CONFIG_INPUT_MOUSE is not set
|
# CONFIG_INPUT_MOUSE is not set
|
||||||
# CONFIG_SERIO is not set
|
# CONFIG_SERIO is not set
|
||||||
# CONFIG_LEGACY_PTYS is not set
|
# CONFIG_LEGACY_PTYS is not set
|
||||||
# CONFIG_DEVKMEM is not set
|
|
||||||
CONFIG_SERIAL_ARC=y
|
CONFIG_SERIAL_ARC=y
|
||||||
CONFIG_SERIAL_ARC_CONSOLE=y
|
CONFIG_SERIAL_ARC_CONSOLE=y
|
||||||
# CONFIG_HW_RANDOM is not set
|
# CONFIG_HW_RANDOM is not set
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
# CONFIG_LOCALVERSION_AUTO is not set
|
# CONFIG_LOCALVERSION_AUTO is not set
|
||||||
CONFIG_DEFAULT_HOSTNAME="ARCLinux"
|
|
||||||
# CONFIG_SWAP is not set
|
# CONFIG_SWAP is not set
|
||||||
CONFIG_SYSVIPC=y
|
CONFIG_SYSVIPC=y
|
||||||
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
||||||
@@ -48,7 +47,6 @@ CONFIG_MOUSE_PS2_TOUCHKIT=y
|
|||||||
# CONFIG_SERIO_SERPORT is not set
|
# CONFIG_SERIO_SERPORT is not set
|
||||||
CONFIG_SERIO_ARC_PS2=y
|
CONFIG_SERIO_ARC_PS2=y
|
||||||
# CONFIG_LEGACY_PTYS is not set
|
# CONFIG_LEGACY_PTYS is not set
|
||||||
# CONFIG_DEVKMEM is not set
|
|
||||||
CONFIG_SERIAL_8250=y
|
CONFIG_SERIAL_8250=y
|
||||||
CONFIG_SERIAL_8250_CONSOLE=y
|
CONFIG_SERIAL_8250_CONSOLE=y
|
||||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
# CONFIG_LOCALVERSION_AUTO is not set
|
# CONFIG_LOCALVERSION_AUTO is not set
|
||||||
CONFIG_DEFAULT_HOSTNAME="ARCLinux"
|
|
||||||
# CONFIG_SWAP is not set
|
# CONFIG_SWAP is not set
|
||||||
CONFIG_SYSVIPC=y
|
CONFIG_SYSVIPC=y
|
||||||
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
||||||
@@ -47,7 +46,6 @@ CONFIG_MOUSE_PS2_TOUCHKIT=y
|
|||||||
# CONFIG_SERIO_SERPORT is not set
|
# CONFIG_SERIO_SERPORT is not set
|
||||||
CONFIG_SERIO_ARC_PS2=y
|
CONFIG_SERIO_ARC_PS2=y
|
||||||
# CONFIG_LEGACY_PTYS is not set
|
# CONFIG_LEGACY_PTYS is not set
|
||||||
# CONFIG_DEVKMEM is not set
|
|
||||||
CONFIG_SERIAL_8250=y
|
CONFIG_SERIAL_8250=y
|
||||||
CONFIG_SERIAL_8250_CONSOLE=y
|
CONFIG_SERIAL_8250_CONSOLE=y
|
||||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
CONFIG_DEFAULT_HOSTNAME="ARCLinux"
|
|
||||||
# CONFIG_SWAP is not set
|
# CONFIG_SWAP is not set
|
||||||
CONFIG_SYSVIPC=y
|
CONFIG_SYSVIPC=y
|
||||||
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
||||||
@@ -58,7 +57,6 @@ CONFIG_MOUSE_PS2_TOUCHKIT=y
|
|||||||
# CONFIG_SERIO_SERPORT is not set
|
# CONFIG_SERIO_SERPORT is not set
|
||||||
CONFIG_SERIO_ARC_PS2=y
|
CONFIG_SERIO_ARC_PS2=y
|
||||||
# CONFIG_LEGACY_PTYS is not set
|
# CONFIG_LEGACY_PTYS is not set
|
||||||
# CONFIG_DEVKMEM is not set
|
|
||||||
CONFIG_SERIAL_8250=y
|
CONFIG_SERIAL_8250=y
|
||||||
CONFIG_SERIAL_8250_CONSOLE=y
|
CONFIG_SERIAL_8250_CONSOLE=y
|
||||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||||
|
@@ -57,7 +57,6 @@ CONFIG_STMMAC_ETH=y
|
|||||||
# CONFIG_SERIO is not set
|
# CONFIG_SERIO is not set
|
||||||
# CONFIG_VT is not set
|
# CONFIG_VT is not set
|
||||||
# CONFIG_LEGACY_PTYS is not set
|
# CONFIG_LEGACY_PTYS is not set
|
||||||
# CONFIG_DEVKMEM is not set
|
|
||||||
CONFIG_SERIAL_8250=y
|
CONFIG_SERIAL_8250=y
|
||||||
CONFIG_SERIAL_8250_CONSOLE=y
|
CONFIG_SERIAL_8250_CONSOLE=y
|
||||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
# CONFIG_LOCALVERSION_AUTO is not set
|
# CONFIG_LOCALVERSION_AUTO is not set
|
||||||
CONFIG_DEFAULT_HOSTNAME="ARCLinux"
|
|
||||||
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
||||||
CONFIG_HIGH_RES_TIMERS=y
|
CONFIG_HIGH_RES_TIMERS=y
|
||||||
CONFIG_IKCONFIG=y
|
CONFIG_IKCONFIG=y
|
||||||
@@ -53,7 +52,6 @@ CONFIG_NATIONAL_PHY=y
|
|||||||
CONFIG_MOUSE_PS2_TOUCHKIT=y
|
CONFIG_MOUSE_PS2_TOUCHKIT=y
|
||||||
CONFIG_SERIO_ARC_PS2=y
|
CONFIG_SERIO_ARC_PS2=y
|
||||||
# CONFIG_LEGACY_PTYS is not set
|
# CONFIG_LEGACY_PTYS is not set
|
||||||
# CONFIG_DEVKMEM is not set
|
|
||||||
CONFIG_SERIAL_8250=y
|
CONFIG_SERIAL_8250=y
|
||||||
CONFIG_SERIAL_8250_CONSOLE=y
|
CONFIG_SERIAL_8250_CONSOLE=y
|
||||||
CONFIG_SERIAL_8250_DW=y
|
CONFIG_SERIAL_8250_DW=y
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
# CONFIG_LOCALVERSION_AUTO is not set
|
# CONFIG_LOCALVERSION_AUTO is not set
|
||||||
CONFIG_DEFAULT_HOSTNAME="ARCLinux"
|
|
||||||
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
||||||
CONFIG_HIGH_RES_TIMERS=y
|
CONFIG_HIGH_RES_TIMERS=y
|
||||||
CONFIG_IKCONFIG=y
|
CONFIG_IKCONFIG=y
|
||||||
|
@@ -84,7 +84,7 @@ static inline int atomic_fetch_##op(int i, atomic_t *v) \
|
|||||||
"1: llock %[orig], [%[ctr]] \n" \
|
"1: llock %[orig], [%[ctr]] \n" \
|
||||||
" " #asm_op " %[val], %[orig], %[i] \n" \
|
" " #asm_op " %[val], %[orig], %[i] \n" \
|
||||||
" scond %[val], [%[ctr]] \n" \
|
" scond %[val], [%[ctr]] \n" \
|
||||||
" \n" \
|
" bnz 1b \n" \
|
||||||
: [val] "=&r" (val), \
|
: [val] "=&r" (val), \
|
||||||
[orig] "=&r" (orig) \
|
[orig] "=&r" (orig) \
|
||||||
: [ctr] "r" (&v->counter), \
|
: [ctr] "r" (&v->counter), \
|
||||||
|
13
arch/arc/include/asm/dma-mapping.h
Normal file
13
arch/arc/include/asm/dma-mapping.h
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
|
// (C) 2018 Synopsys, Inc. (www.synopsys.com)
|
||||||
|
|
||||||
|
#ifndef ASM_ARC_DMA_MAPPING_H
|
||||||
|
#define ASM_ARC_DMA_MAPPING_H
|
||||||
|
|
||||||
|
#include <asm-generic/dma-mapping.h>
|
||||||
|
|
||||||
|
void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
|
||||||
|
const struct iommu_ops *iommu, bool coherent);
|
||||||
|
#define arch_setup_dma_ops arch_setup_dma_ops
|
||||||
|
|
||||||
|
#endif
|
@@ -83,9 +83,6 @@ done:
|
|||||||
static void show_faulting_vma(unsigned long address, char *buf)
|
static void show_faulting_vma(unsigned long address, char *buf)
|
||||||
{
|
{
|
||||||
struct vm_area_struct *vma;
|
struct vm_area_struct *vma;
|
||||||
struct inode *inode;
|
|
||||||
unsigned long ino = 0;
|
|
||||||
dev_t dev = 0;
|
|
||||||
char *nm = buf;
|
char *nm = buf;
|
||||||
struct mm_struct *active_mm = current->active_mm;
|
struct mm_struct *active_mm = current->active_mm;
|
||||||
|
|
||||||
@@ -99,12 +96,10 @@ static void show_faulting_vma(unsigned long address, char *buf)
|
|||||||
* if the container VMA is not found
|
* if the container VMA is not found
|
||||||
*/
|
*/
|
||||||
if (vma && (vma->vm_start <= address)) {
|
if (vma && (vma->vm_start <= address)) {
|
||||||
struct file *file = vma->vm_file;
|
if (vma->vm_file) {
|
||||||
if (file) {
|
nm = file_path(vma->vm_file, buf, PAGE_SIZE - 1);
|
||||||
nm = file_path(file, buf, PAGE_SIZE - 1);
|
if (IS_ERR(nm))
|
||||||
inode = file_inode(vma->vm_file);
|
nm = "?";
|
||||||
dev = inode->i_sb->s_dev;
|
|
||||||
ino = inode->i_ino;
|
|
||||||
}
|
}
|
||||||
pr_info(" @off 0x%lx in [%s]\n"
|
pr_info(" @off 0x%lx in [%s]\n"
|
||||||
" VMA: 0x%08lx to 0x%08lx\n",
|
" VMA: 0x%08lx to 0x%08lx\n",
|
||||||
|
@@ -65,7 +65,7 @@ char *arc_cache_mumbojumbo(int c, char *buf, int len)
|
|||||||
|
|
||||||
n += scnprintf(buf + n, len - n, "Peripherals\t: %#lx%s%s\n",
|
n += scnprintf(buf + n, len - n, "Peripherals\t: %#lx%s%s\n",
|
||||||
perip_base,
|
perip_base,
|
||||||
IS_AVAIL3(ioc_exists, ioc_enable, ", IO-Coherency "));
|
IS_AVAIL3(ioc_exists, ioc_enable, ", IO-Coherency (per-device) "));
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
@@ -896,15 +896,6 @@ static void __dma_cache_wback_slc(phys_addr_t start, unsigned long sz)
|
|||||||
slc_op(start, sz, OP_FLUSH);
|
slc_op(start, sz, OP_FLUSH);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* DMA ops for systems with IOC
|
|
||||||
* IOC hardware snoops all DMA traffic keeping the caches consistent with
|
|
||||||
* memory - eliding need for any explicit cache maintenance of DMA buffers
|
|
||||||
*/
|
|
||||||
static void __dma_cache_wback_inv_ioc(phys_addr_t start, unsigned long sz) {}
|
|
||||||
static void __dma_cache_inv_ioc(phys_addr_t start, unsigned long sz) {}
|
|
||||||
static void __dma_cache_wback_ioc(phys_addr_t start, unsigned long sz) {}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Exported DMA API
|
* Exported DMA API
|
||||||
*/
|
*/
|
||||||
@@ -1153,6 +1144,19 @@ noinline void __init arc_ioc_setup(void)
|
|||||||
{
|
{
|
||||||
unsigned int ioc_base, mem_sz;
|
unsigned int ioc_base, mem_sz;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* As for today we don't support both IOC and ZONE_HIGHMEM enabled
|
||||||
|
* simultaneously. This happens because as of today IOC aperture covers
|
||||||
|
* only ZONE_NORMAL (low mem) and any dma transactions outside this
|
||||||
|
* region won't be HW coherent.
|
||||||
|
* If we want to use both IOC and ZONE_HIGHMEM we can use
|
||||||
|
* bounce_buffer to handle dma transactions to HIGHMEM.
|
||||||
|
* Also it is possible to modify dma_direct cache ops or increase IOC
|
||||||
|
* aperture size if we are planning to use HIGHMEM without PAE.
|
||||||
|
*/
|
||||||
|
if (IS_ENABLED(CONFIG_HIGHMEM))
|
||||||
|
panic("IOC and HIGHMEM can't be used simultaneously");
|
||||||
|
|
||||||
/* Flush + invalidate + disable L1 dcache */
|
/* Flush + invalidate + disable L1 dcache */
|
||||||
__dc_disable();
|
__dc_disable();
|
||||||
|
|
||||||
@@ -1264,11 +1268,7 @@ void __init arc_cache_init_master(void)
|
|||||||
if (is_isa_arcv2() && ioc_enable)
|
if (is_isa_arcv2() && ioc_enable)
|
||||||
arc_ioc_setup();
|
arc_ioc_setup();
|
||||||
|
|
||||||
if (is_isa_arcv2() && ioc_enable) {
|
if (is_isa_arcv2() && l2_line_sz && slc_enable) {
|
||||||
__dma_cache_wback_inv = __dma_cache_wback_inv_ioc;
|
|
||||||
__dma_cache_inv = __dma_cache_inv_ioc;
|
|
||||||
__dma_cache_wback = __dma_cache_wback_ioc;
|
|
||||||
} else if (is_isa_arcv2() && l2_line_sz && slc_enable) {
|
|
||||||
__dma_cache_wback_inv = __dma_cache_wback_inv_slc;
|
__dma_cache_wback_inv = __dma_cache_wback_inv_slc;
|
||||||
__dma_cache_inv = __dma_cache_inv_slc;
|
__dma_cache_inv = __dma_cache_inv_slc;
|
||||||
__dma_cache_wback = __dma_cache_wback_slc;
|
__dma_cache_wback = __dma_cache_wback_slc;
|
||||||
@@ -1277,6 +1277,12 @@ void __init arc_cache_init_master(void)
|
|||||||
__dma_cache_inv = __dma_cache_inv_l1;
|
__dma_cache_inv = __dma_cache_inv_l1;
|
||||||
__dma_cache_wback = __dma_cache_wback_l1;
|
__dma_cache_wback = __dma_cache_wback_l1;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* In case of IOC (say IOC+SLC case), pointers above could still be set
|
||||||
|
* but end up not being relevant as the first function in chain is not
|
||||||
|
* called at all for @dma_direct_ops
|
||||||
|
* arch_sync_dma_for_cpu() -> dma_cache_*() -> __dma_cache_*()
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void __ref arc_cache_init(void)
|
void __ref arc_cache_init(void)
|
||||||
|
@@ -6,20 +6,17 @@
|
|||||||
* published by the Free Software Foundation.
|
* published by the Free Software Foundation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
* DMA Coherent API Notes
|
|
||||||
*
|
|
||||||
* I/O is inherently non-coherent on ARC. So a coherent DMA buffer is
|
|
||||||
* implemented by accessing it using a kernel virtual address, with
|
|
||||||
* Cache bit off in the TLB entry.
|
|
||||||
*
|
|
||||||
* The default DMA address == Phy address which is 0x8000_0000 based.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/dma-noncoherent.h>
|
#include <linux/dma-noncoherent.h>
|
||||||
#include <asm/cache.h>
|
#include <asm/cache.h>
|
||||||
#include <asm/cacheflush.h>
|
#include <asm/cacheflush.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ARCH specific callbacks for generic noncoherent DMA ops (dma/noncoherent.c)
|
||||||
|
* - hardware IOC not available (or "dma-coherent" not set for device in DT)
|
||||||
|
* - But still handle both coherent and non-coherent requests from caller
|
||||||
|
*
|
||||||
|
* For DMA coherent hardware (IOC) generic code suffices
|
||||||
|
*/
|
||||||
void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle,
|
void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle,
|
||||||
gfp_t gfp, unsigned long attrs)
|
gfp_t gfp, unsigned long attrs)
|
||||||
{
|
{
|
||||||
@@ -27,42 +24,29 @@ void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle,
|
|||||||
struct page *page;
|
struct page *page;
|
||||||
phys_addr_t paddr;
|
phys_addr_t paddr;
|
||||||
void *kvaddr;
|
void *kvaddr;
|
||||||
int need_coh = 1, need_kvaddr = 0;
|
bool need_coh = !(attrs & DMA_ATTR_NON_CONSISTENT);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* __GFP_HIGHMEM flag is cleared by upper layer functions
|
||||||
|
* (in include/linux/dma-mapping.h) so we should never get a
|
||||||
|
* __GFP_HIGHMEM here.
|
||||||
|
*/
|
||||||
|
BUG_ON(gfp & __GFP_HIGHMEM);
|
||||||
|
|
||||||
page = alloc_pages(gfp, order);
|
page = alloc_pages(gfp, order);
|
||||||
if (!page)
|
if (!page)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/*
|
|
||||||
* IOC relies on all data (even coherent DMA data) being in cache
|
|
||||||
* Thus allocate normal cached memory
|
|
||||||
*
|
|
||||||
* The gains with IOC are two pronged:
|
|
||||||
* -For streaming data, elides need for cache maintenance, saving
|
|
||||||
* cycles in flush code, and bus bandwidth as all the lines of a
|
|
||||||
* buffer need to be flushed out to memory
|
|
||||||
* -For coherent data, Read/Write to buffers terminate early in cache
|
|
||||||
* (vs. always going to memory - thus are faster)
|
|
||||||
*/
|
|
||||||
if ((is_isa_arcv2() && ioc_enable) ||
|
|
||||||
(attrs & DMA_ATTR_NON_CONSISTENT))
|
|
||||||
need_coh = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* - A coherent buffer needs MMU mapping to enforce non-cachability
|
|
||||||
* - A highmem page needs a virtual handle (hence MMU mapping)
|
|
||||||
* independent of cachability
|
|
||||||
*/
|
|
||||||
if (PageHighMem(page) || need_coh)
|
|
||||||
need_kvaddr = 1;
|
|
||||||
|
|
||||||
/* This is linear addr (0x8000_0000 based) */
|
/* This is linear addr (0x8000_0000 based) */
|
||||||
paddr = page_to_phys(page);
|
paddr = page_to_phys(page);
|
||||||
|
|
||||||
*dma_handle = paddr;
|
*dma_handle = paddr;
|
||||||
|
|
||||||
/* This is kernel Virtual address (0x7000_0000 based) */
|
/*
|
||||||
if (need_kvaddr) {
|
* A coherent buffer needs MMU mapping to enforce non-cachability.
|
||||||
|
* kvaddr is kernel Virtual address (0x7000_0000 based).
|
||||||
|
*/
|
||||||
|
if (need_coh) {
|
||||||
kvaddr = ioremap_nocache(paddr, size);
|
kvaddr = ioremap_nocache(paddr, size);
|
||||||
if (kvaddr == NULL) {
|
if (kvaddr == NULL) {
|
||||||
__free_pages(page, order);
|
__free_pages(page, order);
|
||||||
@@ -93,12 +77,8 @@ void arch_dma_free(struct device *dev, size_t size, void *vaddr,
|
|||||||
{
|
{
|
||||||
phys_addr_t paddr = dma_handle;
|
phys_addr_t paddr = dma_handle;
|
||||||
struct page *page = virt_to_page(paddr);
|
struct page *page = virt_to_page(paddr);
|
||||||
int is_non_coh = 1;
|
|
||||||
|
|
||||||
is_non_coh = (attrs & DMA_ATTR_NON_CONSISTENT) ||
|
if (!(attrs & DMA_ATTR_NON_CONSISTENT))
|
||||||
(is_isa_arcv2() && ioc_enable);
|
|
||||||
|
|
||||||
if (PageHighMem(page) || !is_non_coh)
|
|
||||||
iounmap((void __force __iomem *)vaddr);
|
iounmap((void __force __iomem *)vaddr);
|
||||||
|
|
||||||
__free_pages(page, get_order(size));
|
__free_pages(page, get_order(size));
|
||||||
@@ -185,3 +165,23 @@ void arch_sync_dma_for_cpu(struct device *dev, phys_addr_t paddr,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Plug in coherent or noncoherent dma ops
|
||||||
|
*/
|
||||||
|
void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
|
||||||
|
const struct iommu_ops *iommu, bool coherent)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* IOC hardware snoops all DMA traffic keeping the caches consistent
|
||||||
|
* with memory - eliding need for any explicit cache maintenance of
|
||||||
|
* DMA buffers - so we can use dma_direct cache ops.
|
||||||
|
*/
|
||||||
|
if (is_isa_arcv2() && ioc_enable && coherent) {
|
||||||
|
set_dma_ops(dev, &dma_direct_ops);
|
||||||
|
dev_info(dev, "use dma_direct_ops cache ops\n");
|
||||||
|
} else {
|
||||||
|
set_dma_ops(dev, &dma_noncoherent_ops);
|
||||||
|
dev_info(dev, "use dma_noncoherent_ops cache ops\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
macb1: ethernet@f802c000 {
|
macb1: ethernet@f802c000 {
|
||||||
compatible = "cdns,at91sam9260-macb", "cdns,macb";
|
compatible = "atmel,sama5d3-macb", "cdns,at91sam9260-macb", "cdns,macb";
|
||||||
reg = <0xf802c000 0x100>;
|
reg = <0xf802c000 0x100>;
|
||||||
interrupts = <35 IRQ_TYPE_LEVEL_HIGH 3>;
|
interrupts = <35 IRQ_TYPE_LEVEL_HIGH 3>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
|
@@ -223,7 +223,6 @@ int __kvm_arm_vcpu_set_events(struct kvm_vcpu *vcpu,
|
|||||||
struct kvm_vcpu_events *events);
|
struct kvm_vcpu_events *events);
|
||||||
|
|
||||||
#define KVM_ARCH_WANT_MMU_NOTIFIER
|
#define KVM_ARCH_WANT_MMU_NOTIFIER
|
||||||
int kvm_unmap_hva(struct kvm *kvm, unsigned long hva);
|
|
||||||
int kvm_unmap_hva_range(struct kvm *kvm,
|
int kvm_unmap_hva_range(struct kvm *kvm,
|
||||||
unsigned long start, unsigned long end);
|
unsigned long start, unsigned long end);
|
||||||
void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte);
|
void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte);
|
||||||
|
@@ -46,6 +46,7 @@
|
|||||||
pinctrl-0 = <&mmc0_pins>;
|
pinctrl-0 = <&mmc0_pins>;
|
||||||
vmmc-supply = <®_cldo1>;
|
vmmc-supply = <®_cldo1>;
|
||||||
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
|
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
|
||||||
|
bus-width = <4>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -56,6 +57,7 @@
|
|||||||
vqmmc-supply = <®_bldo2>;
|
vqmmc-supply = <®_bldo2>;
|
||||||
non-removable;
|
non-removable;
|
||||||
cap-mmc-hw-reset;
|
cap-mmc-hw-reset;
|
||||||
|
bus-width = <8>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
static __always_inline bool arch_static_branch(struct static_key *key, bool branch)
|
static __always_inline bool arch_static_branch(struct static_key *key, bool branch)
|
||||||
{
|
{
|
||||||
asm goto("1: nop\n\t"
|
asm_volatile_goto("1: nop\n\t"
|
||||||
".pushsection __jump_table, \"aw\"\n\t"
|
".pushsection __jump_table, \"aw\"\n\t"
|
||||||
".align 3\n\t"
|
".align 3\n\t"
|
||||||
".quad 1b, %l[l_yes], %c0\n\t"
|
".quad 1b, %l[l_yes], %c0\n\t"
|
||||||
@@ -42,7 +42,7 @@ l_yes:
|
|||||||
|
|
||||||
static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch)
|
static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch)
|
||||||
{
|
{
|
||||||
asm goto("1: b %l[l_yes]\n\t"
|
asm_volatile_goto("1: b %l[l_yes]\n\t"
|
||||||
".pushsection __jump_table, \"aw\"\n\t"
|
".pushsection __jump_table, \"aw\"\n\t"
|
||||||
".align 3\n\t"
|
".align 3\n\t"
|
||||||
".quad 1b, %l[l_yes], %c0\n\t"
|
".quad 1b, %l[l_yes], %c0\n\t"
|
||||||
|
@@ -61,8 +61,7 @@ struct kvm_arch {
|
|||||||
u64 vmid_gen;
|
u64 vmid_gen;
|
||||||
u32 vmid;
|
u32 vmid;
|
||||||
|
|
||||||
/* 1-level 2nd stage table and lock */
|
/* 1-level 2nd stage table, protected by kvm->mmu_lock */
|
||||||
spinlock_t pgd_lock;
|
|
||||||
pgd_t *pgd;
|
pgd_t *pgd;
|
||||||
|
|
||||||
/* VTTBR value associated with above pgd and vmid */
|
/* VTTBR value associated with above pgd and vmid */
|
||||||
@@ -357,7 +356,6 @@ int __kvm_arm_vcpu_set_events(struct kvm_vcpu *vcpu,
|
|||||||
struct kvm_vcpu_events *events);
|
struct kvm_vcpu_events *events);
|
||||||
|
|
||||||
#define KVM_ARCH_WANT_MMU_NOTIFIER
|
#define KVM_ARCH_WANT_MMU_NOTIFIER
|
||||||
int kvm_unmap_hva(struct kvm *kvm, unsigned long hva);
|
|
||||||
int kvm_unmap_hva_range(struct kvm *kvm,
|
int kvm_unmap_hva_range(struct kvm *kvm,
|
||||||
unsigned long start, unsigned long end);
|
unsigned long start, unsigned long end);
|
||||||
void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte);
|
void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte);
|
||||||
|
@@ -54,6 +54,7 @@ arm64-obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o \
|
|||||||
arm64-obj-$(CONFIG_ARM64_RELOC_TEST) += arm64-reloc-test.o
|
arm64-obj-$(CONFIG_ARM64_RELOC_TEST) += arm64-reloc-test.o
|
||||||
arm64-reloc-test-y := reloc_test_core.o reloc_test_syms.o
|
arm64-reloc-test-y := reloc_test_core.o reloc_test_syms.o
|
||||||
arm64-obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
|
arm64-obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
|
||||||
|
arm64-obj-$(CONFIG_CRASH_CORE) += crash_core.o
|
||||||
arm64-obj-$(CONFIG_ARM_SDE_INTERFACE) += sdei.o
|
arm64-obj-$(CONFIG_ARM_SDE_INTERFACE) += sdei.o
|
||||||
arm64-obj-$(CONFIG_ARM64_SSBD) += ssbd.o
|
arm64-obj-$(CONFIG_ARM64_SSBD) += ssbd.o
|
||||||
|
|
||||||
|
19
arch/arm64/kernel/crash_core.c
Normal file
19
arch/arm64/kernel/crash_core.c
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
|
/*
|
||||||
|
* Copyright (C) Linaro.
|
||||||
|
* Copyright (C) Huawei Futurewei Technologies.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/crash_core.h>
|
||||||
|
#include <asm/memory.h>
|
||||||
|
|
||||||
|
void arch_crash_save_vmcoreinfo(void)
|
||||||
|
{
|
||||||
|
VMCOREINFO_NUMBER(VA_BITS);
|
||||||
|
/* Please note VMCOREINFO_NUMBER() uses "%d", not "%x" */
|
||||||
|
vmcoreinfo_append_str("NUMBER(kimage_voffset)=0x%llx\n",
|
||||||
|
kimage_voffset);
|
||||||
|
vmcoreinfo_append_str("NUMBER(PHYS_OFFSET)=0x%llx\n",
|
||||||
|
PHYS_OFFSET);
|
||||||
|
vmcoreinfo_append_str("KERNELOFFSET=%lx\n", kaslr_offset());
|
||||||
|
}
|
@@ -358,14 +358,3 @@ void crash_free_reserved_phys_range(unsigned long begin, unsigned long end)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_HIBERNATION */
|
#endif /* CONFIG_HIBERNATION */
|
||||||
|
|
||||||
void arch_crash_save_vmcoreinfo(void)
|
|
||||||
{
|
|
||||||
VMCOREINFO_NUMBER(VA_BITS);
|
|
||||||
/* Please note VMCOREINFO_NUMBER() uses "%d", not "%x" */
|
|
||||||
vmcoreinfo_append_str("NUMBER(kimage_voffset)=0x%llx\n",
|
|
||||||
kimage_voffset);
|
|
||||||
vmcoreinfo_append_str("NUMBER(PHYS_OFFSET)=0x%llx\n",
|
|
||||||
PHYS_OFFSET);
|
|
||||||
vmcoreinfo_append_str("KERNELOFFSET=%lx\n", kaslr_offset());
|
|
||||||
}
|
|
||||||
|
@@ -98,8 +98,10 @@ static void activate_traps_vhe(struct kvm_vcpu *vcpu)
|
|||||||
val = read_sysreg(cpacr_el1);
|
val = read_sysreg(cpacr_el1);
|
||||||
val |= CPACR_EL1_TTA;
|
val |= CPACR_EL1_TTA;
|
||||||
val &= ~CPACR_EL1_ZEN;
|
val &= ~CPACR_EL1_ZEN;
|
||||||
if (!update_fp_enabled(vcpu))
|
if (!update_fp_enabled(vcpu)) {
|
||||||
val &= ~CPACR_EL1_FPEN;
|
val &= ~CPACR_EL1_FPEN;
|
||||||
|
__activate_traps_fpsimd32(vcpu);
|
||||||
|
}
|
||||||
|
|
||||||
write_sysreg(val, cpacr_el1);
|
write_sysreg(val, cpacr_el1);
|
||||||
|
|
||||||
@@ -114,8 +116,10 @@ static void __hyp_text __activate_traps_nvhe(struct kvm_vcpu *vcpu)
|
|||||||
|
|
||||||
val = CPTR_EL2_DEFAULT;
|
val = CPTR_EL2_DEFAULT;
|
||||||
val |= CPTR_EL2_TTA | CPTR_EL2_TZ;
|
val |= CPTR_EL2_TTA | CPTR_EL2_TZ;
|
||||||
if (!update_fp_enabled(vcpu))
|
if (!update_fp_enabled(vcpu)) {
|
||||||
val |= CPTR_EL2_TFP;
|
val |= CPTR_EL2_TFP;
|
||||||
|
__activate_traps_fpsimd32(vcpu);
|
||||||
|
}
|
||||||
|
|
||||||
write_sysreg(val, cptr_el2);
|
write_sysreg(val, cptr_el2);
|
||||||
}
|
}
|
||||||
@@ -129,7 +133,6 @@ static void __hyp_text __activate_traps(struct kvm_vcpu *vcpu)
|
|||||||
if (cpus_have_const_cap(ARM64_HAS_RAS_EXTN) && (hcr & HCR_VSE))
|
if (cpus_have_const_cap(ARM64_HAS_RAS_EXTN) && (hcr & HCR_VSE))
|
||||||
write_sysreg_s(vcpu->arch.vsesr_el2, SYS_VSESR_EL2);
|
write_sysreg_s(vcpu->arch.vsesr_el2, SYS_VSESR_EL2);
|
||||||
|
|
||||||
__activate_traps_fpsimd32(vcpu);
|
|
||||||
if (has_vhe())
|
if (has_vhe())
|
||||||
activate_traps_vhe(vcpu);
|
activate_traps_vhe(vcpu);
|
||||||
else
|
else
|
||||||
|
@@ -985,8 +985,9 @@ int pmd_free_pte_page(pmd_t *pmdp, unsigned long addr)
|
|||||||
|
|
||||||
pmd = READ_ONCE(*pmdp);
|
pmd = READ_ONCE(*pmdp);
|
||||||
|
|
||||||
/* No-op for empty entry and WARN_ON for valid entry */
|
if (!pmd_present(pmd))
|
||||||
if (!pmd_present(pmd) || !pmd_table(pmd)) {
|
return 1;
|
||||||
|
if (!pmd_table(pmd)) {
|
||||||
VM_WARN_ON(!pmd_table(pmd));
|
VM_WARN_ON(!pmd_table(pmd));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -1007,8 +1008,9 @@ int pud_free_pmd_page(pud_t *pudp, unsigned long addr)
|
|||||||
|
|
||||||
pud = READ_ONCE(*pudp);
|
pud = READ_ONCE(*pudp);
|
||||||
|
|
||||||
/* No-op for empty entry and WARN_ON for valid entry */
|
if (!pud_present(pud))
|
||||||
if (!pud_present(pud) || !pud_table(pud)) {
|
return 1;
|
||||||
|
if (!pud_table(pud)) {
|
||||||
VM_WARN_ON(!pud_table(pud));
|
VM_WARN_ON(!pud_table(pud));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@@ -211,7 +211,7 @@ static inline long ffz(int x)
|
|||||||
* This is defined the same way as ffs.
|
* This is defined the same way as ffs.
|
||||||
* Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
|
* Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
|
||||||
*/
|
*/
|
||||||
static inline long fls(int x)
|
static inline int fls(int x)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
@@ -232,7 +232,7 @@ static inline long fls(int x)
|
|||||||
* the libc and compiler builtin ffs routines, therefore
|
* the libc and compiler builtin ffs routines, therefore
|
||||||
* differs in spirit from the above ffz (man ffs).
|
* differs in spirit from the above ffz (man ffs).
|
||||||
*/
|
*/
|
||||||
static inline long ffs(int x)
|
static inline int ffs(int x)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
@@ -60,7 +60,7 @@ static void *hexagon_dma_alloc_coherent(struct device *dev, size_t size,
|
|||||||
panic("Can't create %s() memory pool!", __func__);
|
panic("Can't create %s() memory pool!", __func__);
|
||||||
else
|
else
|
||||||
gen_pool_add(coherent_pool,
|
gen_pool_add(coherent_pool,
|
||||||
pfn_to_virt(max_low_pfn),
|
(unsigned long)pfn_to_virt(max_low_pfn),
|
||||||
hexagon_coherent_pool_size, -1);
|
hexagon_coherent_pool_size, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -172,7 +172,7 @@ void __init cf_bootmem_alloc(void)
|
|||||||
high_memory = (void *)_ramend;
|
high_memory = (void *)_ramend;
|
||||||
|
|
||||||
/* Reserve kernel text/data/bss */
|
/* Reserve kernel text/data/bss */
|
||||||
memblock_reserve(memstart, memstart - _rambase);
|
memblock_reserve(_rambase, memstart - _rambase);
|
||||||
|
|
||||||
m68k_virt_to_node_shift = fls(_ramend - 1) - 6;
|
m68k_virt_to_node_shift = fls(_ramend - 1) - 6;
|
||||||
module_fixup(NULL, __start_fixup, __stop_fixup);
|
module_fixup(NULL, __start_fixup, __stop_fixup);
|
||||||
|
@@ -931,7 +931,6 @@ enum kvm_mips_fault_result kvm_trap_emul_gva_fault(struct kvm_vcpu *vcpu,
|
|||||||
bool write);
|
bool write);
|
||||||
|
|
||||||
#define KVM_ARCH_WANT_MMU_NOTIFIER
|
#define KVM_ARCH_WANT_MMU_NOTIFIER
|
||||||
int kvm_unmap_hva(struct kvm *kvm, unsigned long hva);
|
|
||||||
int kvm_unmap_hva_range(struct kvm *kvm,
|
int kvm_unmap_hva_range(struct kvm *kvm,
|
||||||
unsigned long start, unsigned long end);
|
unsigned long start, unsigned long end);
|
||||||
void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte);
|
void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte);
|
||||||
|
@@ -40,6 +40,7 @@ struct ltq_dma_channel {
|
|||||||
int desc; /* the current descriptor */
|
int desc; /* the current descriptor */
|
||||||
struct ltq_dma_desc *desc_base; /* the descriptor base */
|
struct ltq_dma_desc *desc_base; /* the descriptor base */
|
||||||
int phys; /* physical addr */
|
int phys; /* physical addr */
|
||||||
|
struct device *dev;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/ioport.h>
|
#include <linux/ioport.h>
|
||||||
|
#include <linux/kernel.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
@@ -20,6 +21,7 @@
|
|||||||
|
|
||||||
#include <asm/abi.h>
|
#include <asm/abi.h>
|
||||||
#include <asm/mips-cps.h>
|
#include <asm/mips-cps.h>
|
||||||
|
#include <asm/page.h>
|
||||||
#include <asm/vdso.h>
|
#include <asm/vdso.h>
|
||||||
|
|
||||||
/* Kernel-provided data used by the VDSO. */
|
/* Kernel-provided data used by the VDSO. */
|
||||||
@@ -128,12 +130,30 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
|
|||||||
vvar_size = gic_size + PAGE_SIZE;
|
vvar_size = gic_size + PAGE_SIZE;
|
||||||
size = vvar_size + image->size;
|
size = vvar_size + image->size;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Find a region that's large enough for us to perform the
|
||||||
|
* colour-matching alignment below.
|
||||||
|
*/
|
||||||
|
if (cpu_has_dc_aliases)
|
||||||
|
size += shm_align_mask + 1;
|
||||||
|
|
||||||
base = get_unmapped_area(NULL, 0, size, 0, 0);
|
base = get_unmapped_area(NULL, 0, size, 0, 0);
|
||||||
if (IS_ERR_VALUE(base)) {
|
if (IS_ERR_VALUE(base)) {
|
||||||
ret = base;
|
ret = base;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If we suffer from dcache aliasing, ensure that the VDSO data page
|
||||||
|
* mapping is coloured the same as the kernel's mapping of that memory.
|
||||||
|
* This ensures that when the kernel updates the VDSO data userland
|
||||||
|
* will observe it without requiring cache invalidations.
|
||||||
|
*/
|
||||||
|
if (cpu_has_dc_aliases) {
|
||||||
|
base = __ALIGN_MASK(base, shm_align_mask);
|
||||||
|
base += ((unsigned long)&vdso_data - gic_size) & shm_align_mask;
|
||||||
|
}
|
||||||
|
|
||||||
data_addr = base + gic_size;
|
data_addr = base + gic_size;
|
||||||
vdso_addr = data_addr + PAGE_SIZE;
|
vdso_addr = data_addr + PAGE_SIZE;
|
||||||
|
|
||||||
|
@@ -512,16 +512,6 @@ static int kvm_unmap_hva_handler(struct kvm *kvm, gfn_t gfn, gfn_t gfn_end,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int kvm_unmap_hva(struct kvm *kvm, unsigned long hva)
|
|
||||||
{
|
|
||||||
unsigned long end = hva + PAGE_SIZE;
|
|
||||||
|
|
||||||
handle_hva_to_gpa(kvm, hva, end, &kvm_unmap_hva_handler, NULL);
|
|
||||||
|
|
||||||
kvm_mips_callbacks->flush_shadow_all(kvm);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int kvm_unmap_hva_range(struct kvm *kvm, unsigned long start, unsigned long end)
|
int kvm_unmap_hva_range(struct kvm *kvm, unsigned long start, unsigned long end)
|
||||||
{
|
{
|
||||||
handle_hva_to_gpa(kvm, start, end, &kvm_unmap_hva_handler, NULL);
|
handle_hva_to_gpa(kvm, start, end, &kvm_unmap_hva_handler, NULL);
|
||||||
|
@@ -130,7 +130,7 @@ ltq_dma_alloc(struct ltq_dma_channel *ch)
|
|||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
ch->desc = 0;
|
ch->desc = 0;
|
||||||
ch->desc_base = dma_zalloc_coherent(NULL,
|
ch->desc_base = dma_zalloc_coherent(ch->dev,
|
||||||
LTQ_DESC_NUM * LTQ_DESC_SIZE,
|
LTQ_DESC_NUM * LTQ_DESC_SIZE,
|
||||||
&ch->phys, GFP_ATOMIC);
|
&ch->phys, GFP_ATOMIC);
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ ltq_dma_free(struct ltq_dma_channel *ch)
|
|||||||
if (!ch->desc_base)
|
if (!ch->desc_base)
|
||||||
return;
|
return;
|
||||||
ltq_dma_close(ch);
|
ltq_dma_close(ch);
|
||||||
dma_free_coherent(NULL, LTQ_DESC_NUM * LTQ_DESC_SIZE,
|
dma_free_coherent(ch->dev, LTQ_DESC_NUM * LTQ_DESC_SIZE,
|
||||||
ch->desc_base, ch->phys);
|
ch->desc_base, ch->phys);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(ltq_dma_free);
|
EXPORT_SYMBOL_GPL(ltq_dma_free);
|
||||||
|
@@ -40,6 +40,10 @@ config NDS32
|
|||||||
select NO_IOPORT_MAP
|
select NO_IOPORT_MAP
|
||||||
select RTC_LIB
|
select RTC_LIB
|
||||||
select THREAD_INFO_IN_TASK
|
select THREAD_INFO_IN_TASK
|
||||||
|
select HAVE_FUNCTION_TRACER
|
||||||
|
select HAVE_FUNCTION_GRAPH_TRACER
|
||||||
|
select HAVE_FTRACE_MCOUNT_RECORD
|
||||||
|
select HAVE_DYNAMIC_FTRACE
|
||||||
help
|
help
|
||||||
Andes(nds32) Linux support.
|
Andes(nds32) Linux support.
|
||||||
|
|
||||||
|
@@ -5,6 +5,10 @@ KBUILD_DEFCONFIG := defconfig
|
|||||||
|
|
||||||
comma = ,
|
comma = ,
|
||||||
|
|
||||||
|
ifdef CONFIG_FUNCTION_TRACER
|
||||||
|
arch-y += -malways-save-lp -mno-relax
|
||||||
|
endif
|
||||||
|
|
||||||
KBUILD_CFLAGS += $(call cc-option, -mno-sched-prolog-epilog)
|
KBUILD_CFLAGS += $(call cc-option, -mno-sched-prolog-epilog)
|
||||||
KBUILD_CFLAGS += -mcmodel=large
|
KBUILD_CFLAGS += -mcmodel=large
|
||||||
|
|
||||||
|
@@ -121,9 +121,9 @@ struct elf32_hdr;
|
|||||||
*/
|
*/
|
||||||
#define ELF_CLASS ELFCLASS32
|
#define ELF_CLASS ELFCLASS32
|
||||||
#ifdef __NDS32_EB__
|
#ifdef __NDS32_EB__
|
||||||
#define ELF_DATA ELFDATA2MSB;
|
#define ELF_DATA ELFDATA2MSB
|
||||||
#else
|
#else
|
||||||
#define ELF_DATA ELFDATA2LSB;
|
#define ELF_DATA ELFDATA2LSB
|
||||||
#endif
|
#endif
|
||||||
#define ELF_ARCH EM_NDS32
|
#define ELF_ARCH EM_NDS32
|
||||||
#define USE_ELF_CORE_DUMP
|
#define USE_ELF_CORE_DUMP
|
||||||
|
46
arch/nds32/include/asm/ftrace.h
Normal file
46
arch/nds32/include/asm/ftrace.h
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
|
|
||||||
|
#ifndef __ASM_NDS32_FTRACE_H
|
||||||
|
#define __ASM_NDS32_FTRACE_H
|
||||||
|
|
||||||
|
#ifdef CONFIG_FUNCTION_TRACER
|
||||||
|
|
||||||
|
#define HAVE_FUNCTION_GRAPH_FP_TEST
|
||||||
|
|
||||||
|
#define MCOUNT_ADDR ((unsigned long)(_mcount))
|
||||||
|
/* mcount call is composed of three instructions:
|
||||||
|
* sethi + ori + jral
|
||||||
|
*/
|
||||||
|
#define MCOUNT_INSN_SIZE 12
|
||||||
|
|
||||||
|
extern void _mcount(unsigned long parent_ip);
|
||||||
|
|
||||||
|
#ifdef CONFIG_DYNAMIC_FTRACE
|
||||||
|
|
||||||
|
#define FTRACE_ADDR ((unsigned long)_ftrace_caller)
|
||||||
|
|
||||||
|
#ifdef __NDS32_EL__
|
||||||
|
#define INSN_NOP 0x09000040
|
||||||
|
#define INSN_SIZE(insn) (((insn & 0x00000080) == 0) ? 4 : 2)
|
||||||
|
#define IS_SETHI(insn) ((insn & 0x000000fe) == 0x00000046)
|
||||||
|
#define ENDIAN_CONVERT(insn) be32_to_cpu(insn)
|
||||||
|
#else /* __NDS32_EB__ */
|
||||||
|
#define INSN_NOP 0x40000009
|
||||||
|
#define INSN_SIZE(insn) (((insn & 0x80000000) == 0) ? 4 : 2)
|
||||||
|
#define IS_SETHI(insn) ((insn & 0xfe000000) == 0x46000000)
|
||||||
|
#define ENDIAN_CONVERT(insn) (insn)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern void _ftrace_caller(unsigned long parent_ip);
|
||||||
|
static inline unsigned long ftrace_call_adjust(unsigned long addr)
|
||||||
|
{
|
||||||
|
return addr;
|
||||||
|
}
|
||||||
|
struct dyn_arch_ftrace {
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* CONFIG_DYNAMIC_FTRACE */
|
||||||
|
|
||||||
|
#endif /* CONFIG_FUNCTION_TRACER */
|
||||||
|
|
||||||
|
#endif /* __ASM_NDS32_FTRACE_H */
|
@@ -17,6 +17,7 @@
|
|||||||
#else
|
#else
|
||||||
#define FP_OFFSET (-2)
|
#define FP_OFFSET (-2)
|
||||||
#endif
|
#endif
|
||||||
|
#define LP_OFFSET (-1)
|
||||||
|
|
||||||
extern void __init early_trap_init(void);
|
extern void __init early_trap_init(void);
|
||||||
static inline void GIE_ENABLE(void)
|
static inline void GIE_ENABLE(void)
|
||||||
|
@@ -38,7 +38,7 @@ struct exception_table_entry {
|
|||||||
extern int fixup_exception(struct pt_regs *regs);
|
extern int fixup_exception(struct pt_regs *regs);
|
||||||
|
|
||||||
#define KERNEL_DS ((mm_segment_t) { ~0UL })
|
#define KERNEL_DS ((mm_segment_t) { ~0UL })
|
||||||
#define USER_DS ((mm_segment_t) {TASK_SIZE - 1})
|
#define USER_DS ((mm_segment_t) {TASK_SIZE - 1})
|
||||||
|
|
||||||
#define get_ds() (KERNEL_DS)
|
#define get_ds() (KERNEL_DS)
|
||||||
#define get_fs() (current_thread_info()->addr_limit)
|
#define get_fs() (current_thread_info()->addr_limit)
|
||||||
@@ -49,11 +49,11 @@ static inline void set_fs(mm_segment_t fs)
|
|||||||
current_thread_info()->addr_limit = fs;
|
current_thread_info()->addr_limit = fs;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define segment_eq(a, b) ((a) == (b))
|
#define segment_eq(a, b) ((a) == (b))
|
||||||
|
|
||||||
#define __range_ok(addr, size) (size <= get_fs() && addr <= (get_fs() -size))
|
#define __range_ok(addr, size) (size <= get_fs() && addr <= (get_fs() -size))
|
||||||
|
|
||||||
#define access_ok(type, addr, size) \
|
#define access_ok(type, addr, size) \
|
||||||
__range_ok((unsigned long)addr, (unsigned long)size)
|
__range_ok((unsigned long)addr, (unsigned long)size)
|
||||||
/*
|
/*
|
||||||
* Single-value transfer routines. They automatically use the right
|
* Single-value transfer routines. They automatically use the right
|
||||||
@@ -75,70 +75,73 @@ static inline void set_fs(mm_segment_t fs)
|
|||||||
* versions are void (ie, don't return a value as such).
|
* versions are void (ie, don't return a value as such).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define get_user(x,p) \
|
#define get_user __get_user \
|
||||||
({ \
|
|
||||||
long __e = -EFAULT; \
|
#define __get_user(x, ptr) \
|
||||||
if(likely(access_ok(VERIFY_READ, p, sizeof(*p)))) { \
|
|
||||||
__e = __get_user(x,p); \
|
|
||||||
} else \
|
|
||||||
x = 0; \
|
|
||||||
__e; \
|
|
||||||
})
|
|
||||||
#define __get_user(x,ptr) \
|
|
||||||
({ \
|
({ \
|
||||||
long __gu_err = 0; \
|
long __gu_err = 0; \
|
||||||
__get_user_err((x),(ptr),__gu_err); \
|
__get_user_check((x), (ptr), __gu_err); \
|
||||||
__gu_err; \
|
__gu_err; \
|
||||||
})
|
})
|
||||||
|
|
||||||
#define __get_user_error(x,ptr,err) \
|
#define __get_user_error(x, ptr, err) \
|
||||||
({ \
|
({ \
|
||||||
__get_user_err((x),(ptr),err); \
|
__get_user_check((x), (ptr), (err)); \
|
||||||
(void) 0; \
|
(void)0; \
|
||||||
})
|
})
|
||||||
|
|
||||||
#define __get_user_err(x,ptr,err) \
|
#define __get_user_check(x, ptr, err) \
|
||||||
|
({ \
|
||||||
|
const __typeof__(*(ptr)) __user *__p = (ptr); \
|
||||||
|
might_fault(); \
|
||||||
|
if (access_ok(VERIFY_READ, __p, sizeof(*__p))) { \
|
||||||
|
__get_user_err((x), __p, (err)); \
|
||||||
|
} else { \
|
||||||
|
(x) = 0; (err) = -EFAULT; \
|
||||||
|
} \
|
||||||
|
})
|
||||||
|
|
||||||
|
#define __get_user_err(x, ptr, err) \
|
||||||
do { \
|
do { \
|
||||||
unsigned long __gu_addr = (unsigned long)(ptr); \
|
|
||||||
unsigned long __gu_val; \
|
unsigned long __gu_val; \
|
||||||
__chk_user_ptr(ptr); \
|
__chk_user_ptr(ptr); \
|
||||||
switch (sizeof(*(ptr))) { \
|
switch (sizeof(*(ptr))) { \
|
||||||
case 1: \
|
case 1: \
|
||||||
__get_user_asm("lbi",__gu_val,__gu_addr,err); \
|
__get_user_asm("lbi", __gu_val, (ptr), (err)); \
|
||||||
break; \
|
break; \
|
||||||
case 2: \
|
case 2: \
|
||||||
__get_user_asm("lhi",__gu_val,__gu_addr,err); \
|
__get_user_asm("lhi", __gu_val, (ptr), (err)); \
|
||||||
break; \
|
break; \
|
||||||
case 4: \
|
case 4: \
|
||||||
__get_user_asm("lwi",__gu_val,__gu_addr,err); \
|
__get_user_asm("lwi", __gu_val, (ptr), (err)); \
|
||||||
break; \
|
break; \
|
||||||
case 8: \
|
case 8: \
|
||||||
__get_user_asm_dword(__gu_val,__gu_addr,err); \
|
__get_user_asm_dword(__gu_val, (ptr), (err)); \
|
||||||
break; \
|
break; \
|
||||||
default: \
|
default: \
|
||||||
BUILD_BUG(); \
|
BUILD_BUG(); \
|
||||||
break; \
|
break; \
|
||||||
} \
|
} \
|
||||||
(x) = (__typeof__(*(ptr)))__gu_val; \
|
(x) = (__force __typeof__(*(ptr)))__gu_val; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define __get_user_asm(inst,x,addr,err) \
|
#define __get_user_asm(inst, x, addr, err) \
|
||||||
asm volatile( \
|
__asm__ __volatile__ ( \
|
||||||
"1: "inst" %1,[%2]\n" \
|
"1: "inst" %1,[%2]\n" \
|
||||||
"2:\n" \
|
"2:\n" \
|
||||||
" .section .fixup,\"ax\"\n" \
|
" .section .fixup,\"ax\"\n" \
|
||||||
" .align 2\n" \
|
" .align 2\n" \
|
||||||
"3: move %0, %3\n" \
|
"3: move %0, %3\n" \
|
||||||
" move %1, #0\n" \
|
" move %1, #0\n" \
|
||||||
" b 2b\n" \
|
" b 2b\n" \
|
||||||
" .previous\n" \
|
" .previous\n" \
|
||||||
" .section __ex_table,\"a\"\n" \
|
" .section __ex_table,\"a\"\n" \
|
||||||
" .align 3\n" \
|
" .align 3\n" \
|
||||||
" .long 1b, 3b\n" \
|
" .long 1b, 3b\n" \
|
||||||
" .previous" \
|
" .previous" \
|
||||||
: "+r" (err), "=&r" (x) \
|
: "+r" (err), "=&r" (x) \
|
||||||
: "r" (addr), "i" (-EFAULT) \
|
: "r" (addr), "i" (-EFAULT) \
|
||||||
: "cc")
|
: "cc")
|
||||||
|
|
||||||
#ifdef __NDS32_EB__
|
#ifdef __NDS32_EB__
|
||||||
#define __gu_reg_oper0 "%H1"
|
#define __gu_reg_oper0 "%H1"
|
||||||
@@ -149,61 +152,66 @@ do { \
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define __get_user_asm_dword(x, addr, err) \
|
#define __get_user_asm_dword(x, addr, err) \
|
||||||
asm volatile( \
|
__asm__ __volatile__ ( \
|
||||||
"\n1:\tlwi " __gu_reg_oper0 ",[%2]\n" \
|
"\n1:\tlwi " __gu_reg_oper0 ",[%2]\n" \
|
||||||
"\n2:\tlwi " __gu_reg_oper1 ",[%2+4]\n" \
|
"\n2:\tlwi " __gu_reg_oper1 ",[%2+4]\n" \
|
||||||
"3:\n" \
|
"3:\n" \
|
||||||
" .section .fixup,\"ax\"\n" \
|
" .section .fixup,\"ax\"\n" \
|
||||||
" .align 2\n" \
|
" .align 2\n" \
|
||||||
"4: move %0, %3\n" \
|
"4: move %0, %3\n" \
|
||||||
" b 3b\n" \
|
" b 3b\n" \
|
||||||
" .previous\n" \
|
" .previous\n" \
|
||||||
" .section __ex_table,\"a\"\n" \
|
" .section __ex_table,\"a\"\n" \
|
||||||
" .align 3\n" \
|
" .align 3\n" \
|
||||||
" .long 1b, 4b\n" \
|
" .long 1b, 4b\n" \
|
||||||
" .long 2b, 4b\n" \
|
" .long 2b, 4b\n" \
|
||||||
" .previous" \
|
" .previous" \
|
||||||
: "+r"(err), "=&r"(x) \
|
: "+r"(err), "=&r"(x) \
|
||||||
: "r"(addr), "i"(-EFAULT) \
|
: "r"(addr), "i"(-EFAULT) \
|
||||||
: "cc")
|
: "cc")
|
||||||
#define put_user(x,p) \
|
|
||||||
({ \
|
#define put_user __put_user \
|
||||||
long __e = -EFAULT; \
|
|
||||||
if(likely(access_ok(VERIFY_WRITE, p, sizeof(*p)))) { \
|
#define __put_user(x, ptr) \
|
||||||
__e = __put_user(x,p); \
|
|
||||||
} \
|
|
||||||
__e; \
|
|
||||||
})
|
|
||||||
#define __put_user(x,ptr) \
|
|
||||||
({ \
|
({ \
|
||||||
long __pu_err = 0; \
|
long __pu_err = 0; \
|
||||||
__put_user_err((x),(ptr),__pu_err); \
|
__put_user_err((x), (ptr), __pu_err); \
|
||||||
__pu_err; \
|
__pu_err; \
|
||||||
})
|
})
|
||||||
|
|
||||||
#define __put_user_error(x,ptr,err) \
|
#define __put_user_error(x, ptr, err) \
|
||||||
({ \
|
({ \
|
||||||
__put_user_err((x),(ptr),err); \
|
__put_user_err((x), (ptr), (err)); \
|
||||||
(void) 0; \
|
(void)0; \
|
||||||
})
|
})
|
||||||
|
|
||||||
#define __put_user_err(x,ptr,err) \
|
#define __put_user_check(x, ptr, err) \
|
||||||
|
({ \
|
||||||
|
__typeof__(*(ptr)) __user *__p = (ptr); \
|
||||||
|
might_fault(); \
|
||||||
|
if (access_ok(VERIFY_WRITE, __p, sizeof(*__p))) { \
|
||||||
|
__put_user_err((x), __p, (err)); \
|
||||||
|
} else { \
|
||||||
|
(err) = -EFAULT; \
|
||||||
|
} \
|
||||||
|
})
|
||||||
|
|
||||||
|
#define __put_user_err(x, ptr, err) \
|
||||||
do { \
|
do { \
|
||||||
unsigned long __pu_addr = (unsigned long)(ptr); \
|
|
||||||
__typeof__(*(ptr)) __pu_val = (x); \
|
__typeof__(*(ptr)) __pu_val = (x); \
|
||||||
__chk_user_ptr(ptr); \
|
__chk_user_ptr(ptr); \
|
||||||
switch (sizeof(*(ptr))) { \
|
switch (sizeof(*(ptr))) { \
|
||||||
case 1: \
|
case 1: \
|
||||||
__put_user_asm("sbi",__pu_val,__pu_addr,err); \
|
__put_user_asm("sbi", __pu_val, (ptr), (err)); \
|
||||||
break; \
|
break; \
|
||||||
case 2: \
|
case 2: \
|
||||||
__put_user_asm("shi",__pu_val,__pu_addr,err); \
|
__put_user_asm("shi", __pu_val, (ptr), (err)); \
|
||||||
break; \
|
break; \
|
||||||
case 4: \
|
case 4: \
|
||||||
__put_user_asm("swi",__pu_val,__pu_addr,err); \
|
__put_user_asm("swi", __pu_val, (ptr), (err)); \
|
||||||
break; \
|
break; \
|
||||||
case 8: \
|
case 8: \
|
||||||
__put_user_asm_dword(__pu_val,__pu_addr,err); \
|
__put_user_asm_dword(__pu_val, (ptr), (err)); \
|
||||||
break; \
|
break; \
|
||||||
default: \
|
default: \
|
||||||
BUILD_BUG(); \
|
BUILD_BUG(); \
|
||||||
@@ -211,22 +219,22 @@ do { \
|
|||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define __put_user_asm(inst,x,addr,err) \
|
#define __put_user_asm(inst, x, addr, err) \
|
||||||
asm volatile( \
|
__asm__ __volatile__ ( \
|
||||||
"1: "inst" %1,[%2]\n" \
|
"1: "inst" %1,[%2]\n" \
|
||||||
"2:\n" \
|
"2:\n" \
|
||||||
" .section .fixup,\"ax\"\n" \
|
" .section .fixup,\"ax\"\n" \
|
||||||
" .align 2\n" \
|
" .align 2\n" \
|
||||||
"3: move %0, %3\n" \
|
"3: move %0, %3\n" \
|
||||||
" b 2b\n" \
|
" b 2b\n" \
|
||||||
" .previous\n" \
|
" .previous\n" \
|
||||||
" .section __ex_table,\"a\"\n" \
|
" .section __ex_table,\"a\"\n" \
|
||||||
" .align 3\n" \
|
" .align 3\n" \
|
||||||
" .long 1b, 3b\n" \
|
" .long 1b, 3b\n" \
|
||||||
" .previous" \
|
" .previous" \
|
||||||
: "+r" (err) \
|
: "+r" (err) \
|
||||||
: "r" (x), "r" (addr), "i" (-EFAULT) \
|
: "r" (x), "r" (addr), "i" (-EFAULT) \
|
||||||
: "cc")
|
: "cc")
|
||||||
|
|
||||||
#ifdef __NDS32_EB__
|
#ifdef __NDS32_EB__
|
||||||
#define __pu_reg_oper0 "%H2"
|
#define __pu_reg_oper0 "%H2"
|
||||||
@@ -237,23 +245,24 @@ do { \
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define __put_user_asm_dword(x, addr, err) \
|
#define __put_user_asm_dword(x, addr, err) \
|
||||||
asm volatile( \
|
__asm__ __volatile__ ( \
|
||||||
"\n1:\tswi " __pu_reg_oper0 ",[%1]\n" \
|
"\n1:\tswi " __pu_reg_oper0 ",[%1]\n" \
|
||||||
"\n2:\tswi " __pu_reg_oper1 ",[%1+4]\n" \
|
"\n2:\tswi " __pu_reg_oper1 ",[%1+4]\n" \
|
||||||
"3:\n" \
|
"3:\n" \
|
||||||
" .section .fixup,\"ax\"\n" \
|
" .section .fixup,\"ax\"\n" \
|
||||||
" .align 2\n" \
|
" .align 2\n" \
|
||||||
"4: move %0, %3\n" \
|
"4: move %0, %3\n" \
|
||||||
" b 3b\n" \
|
" b 3b\n" \
|
||||||
" .previous\n" \
|
" .previous\n" \
|
||||||
" .section __ex_table,\"a\"\n" \
|
" .section __ex_table,\"a\"\n" \
|
||||||
" .align 3\n" \
|
" .align 3\n" \
|
||||||
" .long 1b, 4b\n" \
|
" .long 1b, 4b\n" \
|
||||||
" .long 2b, 4b\n" \
|
" .long 2b, 4b\n" \
|
||||||
" .previous" \
|
" .previous" \
|
||||||
: "+r"(err) \
|
: "+r"(err) \
|
||||||
: "r"(addr), "r"(x), "i"(-EFAULT) \
|
: "r"(addr), "r"(x), "i"(-EFAULT) \
|
||||||
: "cc")
|
: "cc")
|
||||||
|
|
||||||
extern unsigned long __arch_clear_user(void __user * addr, unsigned long n);
|
extern unsigned long __arch_clear_user(void __user * addr, unsigned long n);
|
||||||
extern long strncpy_from_user(char *dest, const char __user * src, long count);
|
extern long strncpy_from_user(char *dest, const char __user * src, long count);
|
||||||
extern __must_check long strlen_user(const char __user * str);
|
extern __must_check long strlen_user(const char __user * str);
|
||||||
|
@@ -21,3 +21,9 @@ extra-y := head.o vmlinux.lds
|
|||||||
|
|
||||||
|
|
||||||
obj-y += vdso/
|
obj-y += vdso/
|
||||||
|
|
||||||
|
obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o
|
||||||
|
|
||||||
|
ifdef CONFIG_FUNCTION_TRACER
|
||||||
|
CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
|
||||||
|
endif
|
||||||
|
@@ -9,7 +9,8 @@
|
|||||||
|
|
||||||
void __iomem *atl2c_base;
|
void __iomem *atl2c_base;
|
||||||
static const struct of_device_id atl2c_ids[] __initconst = {
|
static const struct of_device_id atl2c_ids[] __initconst = {
|
||||||
{.compatible = "andestech,atl2c",}
|
{.compatible = "andestech,atl2c",},
|
||||||
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init atl2c_of_init(void)
|
static int __init atl2c_of_init(void)
|
||||||
|
@@ -118,7 +118,7 @@ common_exception_handler:
|
|||||||
/* interrupt */
|
/* interrupt */
|
||||||
2:
|
2:
|
||||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||||
jal trace_hardirqs_off
|
jal __trace_hardirqs_off
|
||||||
#endif
|
#endif
|
||||||
move $r0, $sp
|
move $r0, $sp
|
||||||
sethi $lp, hi20(ret_from_intr)
|
sethi $lp, hi20(ret_from_intr)
|
||||||
|
@@ -138,8 +138,8 @@ no_work_pending:
|
|||||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||||
lwi $p0, [$sp+(#IPSW_OFFSET)]
|
lwi $p0, [$sp+(#IPSW_OFFSET)]
|
||||||
andi $p0, $p0, #0x1
|
andi $p0, $p0, #0x1
|
||||||
la $r10, trace_hardirqs_off
|
la $r10, __trace_hardirqs_off
|
||||||
la $r9, trace_hardirqs_on
|
la $r9, __trace_hardirqs_on
|
||||||
cmovz $r9, $p0, $r10
|
cmovz $r9, $p0, $r10
|
||||||
jral $r9
|
jral $r9
|
||||||
#endif
|
#endif
|
||||||
|
309
arch/nds32/kernel/ftrace.c
Normal file
309
arch/nds32/kernel/ftrace.c
Normal file
@@ -0,0 +1,309 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
#include <linux/ftrace.h>
|
||||||
|
#include <linux/uaccess.h>
|
||||||
|
#include <asm/cacheflush.h>
|
||||||
|
|
||||||
|
#ifndef CONFIG_DYNAMIC_FTRACE
|
||||||
|
extern void (*ftrace_trace_function)(unsigned long, unsigned long,
|
||||||
|
struct ftrace_ops*, struct pt_regs*);
|
||||||
|
extern int ftrace_graph_entry_stub(struct ftrace_graph_ent *trace);
|
||||||
|
extern void ftrace_graph_caller(void);
|
||||||
|
|
||||||
|
noinline void __naked ftrace_stub(unsigned long ip, unsigned long parent_ip,
|
||||||
|
struct ftrace_ops *op, struct pt_regs *regs)
|
||||||
|
{
|
||||||
|
__asm__ (""); /* avoid to optimize as pure function */
|
||||||
|
}
|
||||||
|
|
||||||
|
noinline void _mcount(unsigned long parent_ip)
|
||||||
|
{
|
||||||
|
/* save all state by the compiler prologue */
|
||||||
|
|
||||||
|
unsigned long ip = (unsigned long)__builtin_return_address(0);
|
||||||
|
|
||||||
|
if (ftrace_trace_function != ftrace_stub)
|
||||||
|
ftrace_trace_function(ip - MCOUNT_INSN_SIZE, parent_ip,
|
||||||
|
NULL, NULL);
|
||||||
|
|
||||||
|
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
||||||
|
if (ftrace_graph_return != (trace_func_graph_ret_t)ftrace_stub
|
||||||
|
|| ftrace_graph_entry != ftrace_graph_entry_stub)
|
||||||
|
ftrace_graph_caller();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* restore all state by the compiler epilogue */
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(_mcount);
|
||||||
|
|
||||||
|
#else /* CONFIG_DYNAMIC_FTRACE */
|
||||||
|
|
||||||
|
noinline void __naked ftrace_stub(unsigned long ip, unsigned long parent_ip,
|
||||||
|
struct ftrace_ops *op, struct pt_regs *regs)
|
||||||
|
{
|
||||||
|
__asm__ (""); /* avoid to optimize as pure function */
|
||||||
|
}
|
||||||
|
|
||||||
|
noinline void __naked _mcount(unsigned long parent_ip)
|
||||||
|
{
|
||||||
|
__asm__ (""); /* avoid to optimize as pure function */
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(_mcount);
|
||||||
|
|
||||||
|
#define XSTR(s) STR(s)
|
||||||
|
#define STR(s) #s
|
||||||
|
void _ftrace_caller(unsigned long parent_ip)
|
||||||
|
{
|
||||||
|
/* save all state needed by the compiler prologue */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* prepare arguments for real tracing function
|
||||||
|
* first arg : __builtin_return_address(0) - MCOUNT_INSN_SIZE
|
||||||
|
* second arg : parent_ip
|
||||||
|
*/
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
"move $r1, %0 \n\t"
|
||||||
|
"addi $r0, %1, #-" XSTR(MCOUNT_INSN_SIZE) "\n\t"
|
||||||
|
:
|
||||||
|
: "r" (parent_ip), "r" (__builtin_return_address(0)));
|
||||||
|
|
||||||
|
/* a placeholder for the call to a real tracing function */
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
"ftrace_call: \n\t"
|
||||||
|
"nop \n\t"
|
||||||
|
"nop \n\t"
|
||||||
|
"nop \n\t");
|
||||||
|
|
||||||
|
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
||||||
|
/* a placeholder for the call to ftrace_graph_caller */
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
"ftrace_graph_call: \n\t"
|
||||||
|
"nop \n\t"
|
||||||
|
"nop \n\t"
|
||||||
|
"nop \n\t");
|
||||||
|
#endif
|
||||||
|
/* restore all state needed by the compiler epilogue */
|
||||||
|
}
|
||||||
|
|
||||||
|
int __init ftrace_dyn_arch_init(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ftrace_arch_code_modify_prepare(void)
|
||||||
|
{
|
||||||
|
set_all_modules_text_rw();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ftrace_arch_code_modify_post_process(void)
|
||||||
|
{
|
||||||
|
set_all_modules_text_ro();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static unsigned long gen_sethi_insn(unsigned long addr)
|
||||||
|
{
|
||||||
|
unsigned long opcode = 0x46000000;
|
||||||
|
unsigned long imm = addr >> 12;
|
||||||
|
unsigned long rt_num = 0xf << 20;
|
||||||
|
|
||||||
|
return ENDIAN_CONVERT(opcode | rt_num | imm);
|
||||||
|
}
|
||||||
|
|
||||||
|
static unsigned long gen_ori_insn(unsigned long addr)
|
||||||
|
{
|
||||||
|
unsigned long opcode = 0x58000000;
|
||||||
|
unsigned long imm = addr & 0x0000fff;
|
||||||
|
unsigned long rt_num = 0xf << 20;
|
||||||
|
unsigned long ra_num = 0xf << 15;
|
||||||
|
|
||||||
|
return ENDIAN_CONVERT(opcode | rt_num | ra_num | imm);
|
||||||
|
}
|
||||||
|
|
||||||
|
static unsigned long gen_jral_insn(unsigned long addr)
|
||||||
|
{
|
||||||
|
unsigned long opcode = 0x4a000001;
|
||||||
|
unsigned long rt_num = 0x1e << 20;
|
||||||
|
unsigned long rb_num = 0xf << 10;
|
||||||
|
|
||||||
|
return ENDIAN_CONVERT(opcode | rt_num | rb_num);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ftrace_gen_call_insn(unsigned long *call_insns,
|
||||||
|
unsigned long addr)
|
||||||
|
{
|
||||||
|
call_insns[0] = gen_sethi_insn(addr); /* sethi $r15, imm20u */
|
||||||
|
call_insns[1] = gen_ori_insn(addr); /* ori $r15, $r15, imm15u */
|
||||||
|
call_insns[2] = gen_jral_insn(addr); /* jral $lp, $r15 */
|
||||||
|
}
|
||||||
|
|
||||||
|
static int __ftrace_modify_code(unsigned long pc, unsigned long *old_insn,
|
||||||
|
unsigned long *new_insn, bool validate)
|
||||||
|
{
|
||||||
|
unsigned long orig_insn[3];
|
||||||
|
|
||||||
|
if (validate) {
|
||||||
|
if (probe_kernel_read(orig_insn, (void *)pc, MCOUNT_INSN_SIZE))
|
||||||
|
return -EFAULT;
|
||||||
|
if (memcmp(orig_insn, old_insn, MCOUNT_INSN_SIZE))
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (probe_kernel_write((void *)pc, new_insn, MCOUNT_INSN_SIZE))
|
||||||
|
return -EPERM;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int ftrace_modify_code(unsigned long pc, unsigned long *old_insn,
|
||||||
|
unsigned long *new_insn, bool validate)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = __ftrace_modify_code(pc, old_insn, new_insn, validate);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
flush_icache_range(pc, pc + MCOUNT_INSN_SIZE);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ftrace_update_ftrace_func(ftrace_func_t func)
|
||||||
|
{
|
||||||
|
unsigned long pc = (unsigned long)&ftrace_call;
|
||||||
|
unsigned long old_insn[3] = {INSN_NOP, INSN_NOP, INSN_NOP};
|
||||||
|
unsigned long new_insn[3] = {INSN_NOP, INSN_NOP, INSN_NOP};
|
||||||
|
|
||||||
|
if (func != ftrace_stub)
|
||||||
|
ftrace_gen_call_insn(new_insn, (unsigned long)func);
|
||||||
|
|
||||||
|
return ftrace_modify_code(pc, old_insn, new_insn, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
|
||||||
|
{
|
||||||
|
unsigned long pc = rec->ip;
|
||||||
|
unsigned long nop_insn[3] = {INSN_NOP, INSN_NOP, INSN_NOP};
|
||||||
|
unsigned long call_insn[3] = {INSN_NOP, INSN_NOP, INSN_NOP};
|
||||||
|
|
||||||
|
ftrace_gen_call_insn(call_insn, addr);
|
||||||
|
|
||||||
|
return ftrace_modify_code(pc, nop_insn, call_insn, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
int ftrace_make_nop(struct module *mod, struct dyn_ftrace *rec,
|
||||||
|
unsigned long addr)
|
||||||
|
{
|
||||||
|
unsigned long pc = rec->ip;
|
||||||
|
unsigned long nop_insn[3] = {INSN_NOP, INSN_NOP, INSN_NOP};
|
||||||
|
unsigned long call_insn[3] = {INSN_NOP, INSN_NOP, INSN_NOP};
|
||||||
|
|
||||||
|
ftrace_gen_call_insn(call_insn, addr);
|
||||||
|
|
||||||
|
return ftrace_modify_code(pc, call_insn, nop_insn, true);
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_DYNAMIC_FTRACE */
|
||||||
|
|
||||||
|
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
||||||
|
void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
|
||||||
|
unsigned long frame_pointer)
|
||||||
|
{
|
||||||
|
unsigned long return_hooker = (unsigned long)&return_to_handler;
|
||||||
|
struct ftrace_graph_ent trace;
|
||||||
|
unsigned long old;
|
||||||
|
int err;
|
||||||
|
|
||||||
|
if (unlikely(atomic_read(¤t->tracing_graph_pause)))
|
||||||
|
return;
|
||||||
|
|
||||||
|
old = *parent;
|
||||||
|
|
||||||
|
trace.func = self_addr;
|
||||||
|
trace.depth = current->curr_ret_stack + 1;
|
||||||
|
|
||||||
|
/* Only trace if the calling function expects to */
|
||||||
|
if (!ftrace_graph_entry(&trace))
|
||||||
|
return;
|
||||||
|
|
||||||
|
err = ftrace_push_return_trace(old, self_addr, &trace.depth,
|
||||||
|
frame_pointer, NULL);
|
||||||
|
|
||||||
|
if (err == -EBUSY)
|
||||||
|
return;
|
||||||
|
|
||||||
|
*parent = return_hooker;
|
||||||
|
}
|
||||||
|
|
||||||
|
noinline void ftrace_graph_caller(void)
|
||||||
|
{
|
||||||
|
unsigned long *parent_ip =
|
||||||
|
(unsigned long *)(__builtin_frame_address(2) - 4);
|
||||||
|
|
||||||
|
unsigned long selfpc =
|
||||||
|
(unsigned long)(__builtin_return_address(1) - MCOUNT_INSN_SIZE);
|
||||||
|
|
||||||
|
unsigned long frame_pointer =
|
||||||
|
(unsigned long)__builtin_frame_address(3);
|
||||||
|
|
||||||
|
prepare_ftrace_return(parent_ip, selfpc, frame_pointer);
|
||||||
|
}
|
||||||
|
|
||||||
|
extern unsigned long ftrace_return_to_handler(unsigned long frame_pointer);
|
||||||
|
void __naked return_to_handler(void)
|
||||||
|
{
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
/* save state needed by the ABI */
|
||||||
|
"smw.adm $r0,[$sp],$r1,#0x0 \n\t"
|
||||||
|
|
||||||
|
/* get original return address */
|
||||||
|
"move $r0, $fp \n\t"
|
||||||
|
"bal ftrace_return_to_handler\n\t"
|
||||||
|
"move $lp, $r0 \n\t"
|
||||||
|
|
||||||
|
/* restore state nedded by the ABI */
|
||||||
|
"lmw.bim $r0,[$sp],$r1,#0x0 \n\t");
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_DYNAMIC_FTRACE
|
||||||
|
extern unsigned long ftrace_graph_call;
|
||||||
|
|
||||||
|
static int ftrace_modify_graph_caller(bool enable)
|
||||||
|
{
|
||||||
|
unsigned long pc = (unsigned long)&ftrace_graph_call;
|
||||||
|
unsigned long nop_insn[3] = {INSN_NOP, INSN_NOP, INSN_NOP};
|
||||||
|
unsigned long call_insn[3] = {INSN_NOP, INSN_NOP, INSN_NOP};
|
||||||
|
|
||||||
|
ftrace_gen_call_insn(call_insn, (unsigned long)ftrace_graph_caller);
|
||||||
|
|
||||||
|
if (enable)
|
||||||
|
return ftrace_modify_code(pc, nop_insn, call_insn, true);
|
||||||
|
else
|
||||||
|
return ftrace_modify_code(pc, call_insn, nop_insn, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
int ftrace_enable_ftrace_graph_caller(void)
|
||||||
|
{
|
||||||
|
return ftrace_modify_graph_caller(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
int ftrace_disable_ftrace_graph_caller(void)
|
||||||
|
{
|
||||||
|
return ftrace_modify_graph_caller(false);
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_DYNAMIC_FTRACE */
|
||||||
|
|
||||||
|
#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||||
|
noinline void __trace_hardirqs_off(void)
|
||||||
|
{
|
||||||
|
trace_hardirqs_off();
|
||||||
|
}
|
||||||
|
noinline void __trace_hardirqs_on(void)
|
||||||
|
{
|
||||||
|
trace_hardirqs_on();
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_TRACE_IRQFLAGS */
|
@@ -40,7 +40,7 @@ void do_reloc16(unsigned int val, unsigned int *loc, unsigned int val_mask,
|
|||||||
|
|
||||||
tmp2 = tmp & loc_mask;
|
tmp2 = tmp & loc_mask;
|
||||||
if (partial_in_place) {
|
if (partial_in_place) {
|
||||||
tmp &= (!loc_mask);
|
tmp &= (~loc_mask);
|
||||||
tmp =
|
tmp =
|
||||||
tmp2 | ((tmp + ((val & val_mask) >> val_shift)) & val_mask);
|
tmp2 | ((tmp + ((val & val_mask) >> val_shift)) & val_mask);
|
||||||
} else {
|
} else {
|
||||||
@@ -70,7 +70,7 @@ void do_reloc32(unsigned int val, unsigned int *loc, unsigned int val_mask,
|
|||||||
|
|
||||||
tmp2 = tmp & loc_mask;
|
tmp2 = tmp & loc_mask;
|
||||||
if (partial_in_place) {
|
if (partial_in_place) {
|
||||||
tmp &= (!loc_mask);
|
tmp &= (~loc_mask);
|
||||||
tmp =
|
tmp =
|
||||||
tmp2 | ((tmp + ((val & val_mask) >> val_shift)) & val_mask);
|
tmp2 | ((tmp + ((val & val_mask) >> val_shift)) & val_mask);
|
||||||
} else {
|
} else {
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
#include <linux/sched/debug.h>
|
#include <linux/sched/debug.h>
|
||||||
#include <linux/sched/task_stack.h>
|
#include <linux/sched/task_stack.h>
|
||||||
#include <linux/stacktrace.h>
|
#include <linux/stacktrace.h>
|
||||||
|
#include <linux/ftrace.h>
|
||||||
|
|
||||||
void save_stack_trace(struct stack_trace *trace)
|
void save_stack_trace(struct stack_trace *trace)
|
||||||
{
|
{
|
||||||
@@ -16,6 +17,7 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
|
|||||||
unsigned long *fpn;
|
unsigned long *fpn;
|
||||||
int skip = trace->skip;
|
int skip = trace->skip;
|
||||||
int savesched;
|
int savesched;
|
||||||
|
int graph_idx = 0;
|
||||||
|
|
||||||
if (tsk == current) {
|
if (tsk == current) {
|
||||||
__asm__ __volatile__("\tori\t%0, $fp, #0\n":"=r"(fpn));
|
__asm__ __volatile__("\tori\t%0, $fp, #0\n":"=r"(fpn));
|
||||||
@@ -29,10 +31,12 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
|
|||||||
&& (fpn >= (unsigned long *)TASK_SIZE)) {
|
&& (fpn >= (unsigned long *)TASK_SIZE)) {
|
||||||
unsigned long lpp, fpp;
|
unsigned long lpp, fpp;
|
||||||
|
|
||||||
lpp = fpn[-1];
|
lpp = fpn[LP_OFFSET];
|
||||||
fpp = fpn[FP_OFFSET];
|
fpp = fpn[FP_OFFSET];
|
||||||
if (!__kernel_text_address(lpp))
|
if (!__kernel_text_address(lpp))
|
||||||
break;
|
break;
|
||||||
|
else
|
||||||
|
lpp = ftrace_graph_ret_addr(tsk, &graph_idx, lpp, NULL);
|
||||||
|
|
||||||
if (savesched || !in_sched_functions(lpp)) {
|
if (savesched || !in_sched_functions(lpp)) {
|
||||||
if (skip) {
|
if (skip) {
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
#include <linux/kdebug.h>
|
#include <linux/kdebug.h>
|
||||||
#include <linux/sched/task_stack.h>
|
#include <linux/sched/task_stack.h>
|
||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
|
#include <linux/ftrace.h>
|
||||||
|
|
||||||
#include <asm/proc-fns.h>
|
#include <asm/proc-fns.h>
|
||||||
#include <asm/unistd.h>
|
#include <asm/unistd.h>
|
||||||
@@ -94,28 +95,6 @@ static void dump_instr(struct pt_regs *regs)
|
|||||||
set_fs(fs);
|
set_fs(fs);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
|
||||||
#include <linux/ftrace.h>
|
|
||||||
static void
|
|
||||||
get_real_ret_addr(unsigned long *addr, struct task_struct *tsk, int *graph)
|
|
||||||
{
|
|
||||||
if (*addr == (unsigned long)return_to_handler) {
|
|
||||||
int index = tsk->curr_ret_stack;
|
|
||||||
|
|
||||||
if (tsk->ret_stack && index >= *graph) {
|
|
||||||
index -= *graph;
|
|
||||||
*addr = tsk->ret_stack[index].ret;
|
|
||||||
(*graph)++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
static inline void
|
|
||||||
get_real_ret_addr(unsigned long *addr, struct task_struct *tsk, int *graph)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define LOOP_TIMES (100)
|
#define LOOP_TIMES (100)
|
||||||
static void __dump(struct task_struct *tsk, unsigned long *base_reg)
|
static void __dump(struct task_struct *tsk, unsigned long *base_reg)
|
||||||
{
|
{
|
||||||
@@ -126,7 +105,8 @@ static void __dump(struct task_struct *tsk, unsigned long *base_reg)
|
|||||||
while (!kstack_end(base_reg)) {
|
while (!kstack_end(base_reg)) {
|
||||||
ret_addr = *base_reg++;
|
ret_addr = *base_reg++;
|
||||||
if (__kernel_text_address(ret_addr)) {
|
if (__kernel_text_address(ret_addr)) {
|
||||||
get_real_ret_addr(&ret_addr, tsk, &graph);
|
ret_addr = ftrace_graph_ret_addr(
|
||||||
|
tsk, &graph, ret_addr, NULL);
|
||||||
print_ip_sym(ret_addr);
|
print_ip_sym(ret_addr);
|
||||||
}
|
}
|
||||||
if (--cnt < 0)
|
if (--cnt < 0)
|
||||||
@@ -137,15 +117,12 @@ static void __dump(struct task_struct *tsk, unsigned long *base_reg)
|
|||||||
!((unsigned long)base_reg & 0x3) &&
|
!((unsigned long)base_reg & 0x3) &&
|
||||||
((unsigned long)base_reg >= TASK_SIZE)) {
|
((unsigned long)base_reg >= TASK_SIZE)) {
|
||||||
unsigned long next_fp;
|
unsigned long next_fp;
|
||||||
#if !defined(NDS32_ABI_2)
|
ret_addr = base_reg[LP_OFFSET];
|
||||||
ret_addr = base_reg[0];
|
|
||||||
next_fp = base_reg[1];
|
|
||||||
#else
|
|
||||||
ret_addr = base_reg[-1];
|
|
||||||
next_fp = base_reg[FP_OFFSET];
|
next_fp = base_reg[FP_OFFSET];
|
||||||
#endif
|
|
||||||
if (__kernel_text_address(ret_addr)) {
|
if (__kernel_text_address(ret_addr)) {
|
||||||
get_real_ret_addr(&ret_addr, tsk, &graph);
|
|
||||||
|
ret_addr = ftrace_graph_ret_addr(
|
||||||
|
tsk, &graph, ret_addr, NULL);
|
||||||
print_ip_sym(ret_addr);
|
print_ip_sym(ret_addr);
|
||||||
}
|
}
|
||||||
if (--cnt < 0)
|
if (--cnt < 0)
|
||||||
@@ -196,11 +173,10 @@ void die(const char *str, struct pt_regs *regs, int err)
|
|||||||
pr_emerg("CPU: %i\n", smp_processor_id());
|
pr_emerg("CPU: %i\n", smp_processor_id());
|
||||||
show_regs(regs);
|
show_regs(regs);
|
||||||
pr_emerg("Process %s (pid: %d, stack limit = 0x%p)\n",
|
pr_emerg("Process %s (pid: %d, stack limit = 0x%p)\n",
|
||||||
tsk->comm, tsk->pid, task_thread_info(tsk) + 1);
|
tsk->comm, tsk->pid, end_of_stack(tsk));
|
||||||
|
|
||||||
if (!user_mode(regs) || in_interrupt()) {
|
if (!user_mode(regs) || in_interrupt()) {
|
||||||
dump_mem("Stack: ", regs->sp,
|
dump_mem("Stack: ", regs->sp, (regs->sp + PAGE_SIZE) & PAGE_MASK);
|
||||||
THREAD_SIZE + (unsigned long)task_thread_info(tsk));
|
|
||||||
dump_instr(regs);
|
dump_instr(regs);
|
||||||
dump_stack();
|
dump_stack();
|
||||||
}
|
}
|
||||||
|
@@ -13,14 +13,26 @@ OUTPUT_ARCH(nds32)
|
|||||||
ENTRY(_stext_lma)
|
ENTRY(_stext_lma)
|
||||||
jiffies = jiffies_64;
|
jiffies = jiffies_64;
|
||||||
|
|
||||||
|
#if defined(CONFIG_GCOV_KERNEL)
|
||||||
|
#define NDS32_EXIT_KEEP(x) x
|
||||||
|
#else
|
||||||
|
#define NDS32_EXIT_KEEP(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
_stext_lma = TEXTADDR - LOAD_OFFSET;
|
_stext_lma = TEXTADDR - LOAD_OFFSET;
|
||||||
. = TEXTADDR;
|
. = TEXTADDR;
|
||||||
__init_begin = .;
|
__init_begin = .;
|
||||||
HEAD_TEXT_SECTION
|
HEAD_TEXT_SECTION
|
||||||
|
.exit.text : {
|
||||||
|
NDS32_EXIT_KEEP(EXIT_TEXT)
|
||||||
|
}
|
||||||
INIT_TEXT_SECTION(PAGE_SIZE)
|
INIT_TEXT_SECTION(PAGE_SIZE)
|
||||||
INIT_DATA_SECTION(16)
|
INIT_DATA_SECTION(16)
|
||||||
|
.exit.data : {
|
||||||
|
NDS32_EXIT_KEEP(EXIT_DATA)
|
||||||
|
}
|
||||||
PERCPU_SECTION(L1_CACHE_BYTES)
|
PERCPU_SECTION(L1_CACHE_BYTES)
|
||||||
__init_end = .;
|
__init_end = .;
|
||||||
|
|
||||||
|
@@ -1051,7 +1051,6 @@ static inline void vmemmap_remove_mapping(unsigned long start,
|
|||||||
return hash__vmemmap_remove_mapping(start, page_size);
|
return hash__vmemmap_remove_mapping(start, page_size);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
struct page *realmode_pfn_to_page(unsigned long pfn);
|
|
||||||
|
|
||||||
static inline pte_t pmd_pte(pmd_t pmd)
|
static inline pte_t pmd_pte(pmd_t pmd)
|
||||||
{
|
{
|
||||||
|
@@ -220,8 +220,6 @@ extern void iommu_del_device(struct device *dev);
|
|||||||
extern int __init tce_iommu_bus_notifier_init(void);
|
extern int __init tce_iommu_bus_notifier_init(void);
|
||||||
extern long iommu_tce_xchg(struct iommu_table *tbl, unsigned long entry,
|
extern long iommu_tce_xchg(struct iommu_table *tbl, unsigned long entry,
|
||||||
unsigned long *hpa, enum dma_data_direction *direction);
|
unsigned long *hpa, enum dma_data_direction *direction);
|
||||||
extern long iommu_tce_xchg_rm(struct iommu_table *tbl, unsigned long entry,
|
|
||||||
unsigned long *hpa, enum dma_data_direction *direction);
|
|
||||||
#else
|
#else
|
||||||
static inline void iommu_register_group(struct iommu_table_group *table_group,
|
static inline void iommu_register_group(struct iommu_table_group *table_group,
|
||||||
int pci_domain_number,
|
int pci_domain_number,
|
||||||
|
@@ -38,6 +38,7 @@ extern long mm_iommu_ua_to_hpa(struct mm_iommu_table_group_mem_t *mem,
|
|||||||
unsigned long ua, unsigned int pageshift, unsigned long *hpa);
|
unsigned long ua, unsigned int pageshift, unsigned long *hpa);
|
||||||
extern long mm_iommu_ua_to_hpa_rm(struct mm_iommu_table_group_mem_t *mem,
|
extern long mm_iommu_ua_to_hpa_rm(struct mm_iommu_table_group_mem_t *mem,
|
||||||
unsigned long ua, unsigned int pageshift, unsigned long *hpa);
|
unsigned long ua, unsigned int pageshift, unsigned long *hpa);
|
||||||
|
extern void mm_iommu_ua_mark_dirty_rm(struct mm_struct *mm, unsigned long ua);
|
||||||
extern long mm_iommu_mapped_inc(struct mm_iommu_table_group_mem_t *mem);
|
extern long mm_iommu_mapped_inc(struct mm_iommu_table_group_mem_t *mem);
|
||||||
extern void mm_iommu_mapped_dec(struct mm_iommu_table_group_mem_t *mem);
|
extern void mm_iommu_mapped_dec(struct mm_iommu_table_group_mem_t *mem);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -9,6 +9,7 @@ extern void ppc_printk_progress(char *s, unsigned short hex);
|
|||||||
|
|
||||||
extern unsigned int rtas_data;
|
extern unsigned int rtas_data;
|
||||||
extern unsigned long long memory_limit;
|
extern unsigned long long memory_limit;
|
||||||
|
extern bool init_mem_is_free;
|
||||||
extern unsigned long klimit;
|
extern unsigned long klimit;
|
||||||
extern void *zalloc_maybe_bootmem(size_t size, gfp_t mask);
|
extern void *zalloc_maybe_bootmem(size_t size, gfp_t mask);
|
||||||
|
|
||||||
|
@@ -1314,9 +1314,7 @@ EXC_REAL_BEGIN(denorm_exception_hv, 0x1500, 0x100)
|
|||||||
|
|
||||||
#ifdef CONFIG_PPC_DENORMALISATION
|
#ifdef CONFIG_PPC_DENORMALISATION
|
||||||
mfspr r10,SPRN_HSRR1
|
mfspr r10,SPRN_HSRR1
|
||||||
mfspr r11,SPRN_HSRR0 /* save HSRR0 */
|
|
||||||
andis. r10,r10,(HSRR1_DENORM)@h /* denorm? */
|
andis. r10,r10,(HSRR1_DENORM)@h /* denorm? */
|
||||||
addi r11,r11,-4 /* HSRR0 is next instruction */
|
|
||||||
bne+ denorm_assist
|
bne+ denorm_assist
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1382,6 +1380,8 @@ END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_207S)
|
|||||||
*/
|
*/
|
||||||
XVCPSGNDP32(32)
|
XVCPSGNDP32(32)
|
||||||
denorm_done:
|
denorm_done:
|
||||||
|
mfspr r11,SPRN_HSRR0
|
||||||
|
subi r11,r11,4
|
||||||
mtspr SPRN_HSRR0,r11
|
mtspr SPRN_HSRR0,r11
|
||||||
mtcrf 0x80,r9
|
mtcrf 0x80,r9
|
||||||
ld r9,PACA_EXGEN+EX_R9(r13)
|
ld r9,PACA_EXGEN+EX_R9(r13)
|
||||||
|
@@ -1013,31 +1013,6 @@ long iommu_tce_xchg(struct iommu_table *tbl, unsigned long entry,
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(iommu_tce_xchg);
|
EXPORT_SYMBOL_GPL(iommu_tce_xchg);
|
||||||
|
|
||||||
#ifdef CONFIG_PPC_BOOK3S_64
|
|
||||||
long iommu_tce_xchg_rm(struct iommu_table *tbl, unsigned long entry,
|
|
||||||
unsigned long *hpa, enum dma_data_direction *direction)
|
|
||||||
{
|
|
||||||
long ret;
|
|
||||||
|
|
||||||
ret = tbl->it_ops->exchange_rm(tbl, entry, hpa, direction);
|
|
||||||
|
|
||||||
if (!ret && ((*direction == DMA_FROM_DEVICE) ||
|
|
||||||
(*direction == DMA_BIDIRECTIONAL))) {
|
|
||||||
struct page *pg = realmode_pfn_to_page(*hpa >> PAGE_SHIFT);
|
|
||||||
|
|
||||||
if (likely(pg)) {
|
|
||||||
SetPageDirty(pg);
|
|
||||||
} else {
|
|
||||||
tbl->it_ops->exchange_rm(tbl, entry, hpa, direction);
|
|
||||||
ret = -EFAULT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(iommu_tce_xchg_rm);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int iommu_take_ownership(struct iommu_table *tbl)
|
int iommu_take_ownership(struct iommu_table *tbl)
|
||||||
{
|
{
|
||||||
unsigned long flags, i, sz = (tbl->it_size + 7) >> 3;
|
unsigned long flags, i, sz = (tbl->it_size + 7) >> 3;
|
||||||
|
@@ -176,13 +176,27 @@ _GLOBAL(tm_reclaim)
|
|||||||
std r1, PACATMSCRATCH(r13)
|
std r1, PACATMSCRATCH(r13)
|
||||||
ld r1, PACAR1(r13)
|
ld r1, PACAR1(r13)
|
||||||
|
|
||||||
/* Store the PPR in r11 and reset to decent value */
|
|
||||||
std r11, GPR11(r1) /* Temporary stash */
|
std r11, GPR11(r1) /* Temporary stash */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Move the saved user r1 to the kernel stack in case PACATMSCRATCH is
|
||||||
|
* clobbered by an exception once we turn on MSR_RI below.
|
||||||
|
*/
|
||||||
|
ld r11, PACATMSCRATCH(r13)
|
||||||
|
std r11, GPR1(r1)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Store r13 away so we can free up the scratch SPR for the SLB fault
|
||||||
|
* handler (needed once we start accessing the thread_struct).
|
||||||
|
*/
|
||||||
|
GET_SCRATCH0(r11)
|
||||||
|
std r11, GPR13(r1)
|
||||||
|
|
||||||
/* Reset MSR RI so we can take SLB faults again */
|
/* Reset MSR RI so we can take SLB faults again */
|
||||||
li r11, MSR_RI
|
li r11, MSR_RI
|
||||||
mtmsrd r11, 1
|
mtmsrd r11, 1
|
||||||
|
|
||||||
|
/* Store the PPR in r11 and reset to decent value */
|
||||||
mfspr r11, SPRN_PPR
|
mfspr r11, SPRN_PPR
|
||||||
HMT_MEDIUM
|
HMT_MEDIUM
|
||||||
|
|
||||||
@@ -207,11 +221,11 @@ _GLOBAL(tm_reclaim)
|
|||||||
SAVE_GPR(8, r7) /* user r8 */
|
SAVE_GPR(8, r7) /* user r8 */
|
||||||
SAVE_GPR(9, r7) /* user r9 */
|
SAVE_GPR(9, r7) /* user r9 */
|
||||||
SAVE_GPR(10, r7) /* user r10 */
|
SAVE_GPR(10, r7) /* user r10 */
|
||||||
ld r3, PACATMSCRATCH(r13) /* user r1 */
|
ld r3, GPR1(r1) /* user r1 */
|
||||||
ld r4, GPR7(r1) /* user r7 */
|
ld r4, GPR7(r1) /* user r7 */
|
||||||
ld r5, GPR11(r1) /* user r11 */
|
ld r5, GPR11(r1) /* user r11 */
|
||||||
ld r6, GPR12(r1) /* user r12 */
|
ld r6, GPR12(r1) /* user r12 */
|
||||||
GET_SCRATCH0(8) /* user r13 */
|
ld r8, GPR13(r1) /* user r13 */
|
||||||
std r3, GPR1(r7)
|
std r3, GPR1(r7)
|
||||||
std r4, GPR7(r7)
|
std r4, GPR7(r7)
|
||||||
std r5, GPR11(r7)
|
std r5, GPR11(r7)
|
||||||
|
@@ -358,7 +358,7 @@ static int kvmppc_mmu_book3s_64_hv_xlate(struct kvm_vcpu *vcpu, gva_t eaddr,
|
|||||||
unsigned long pp, key;
|
unsigned long pp, key;
|
||||||
unsigned long v, orig_v, gr;
|
unsigned long v, orig_v, gr;
|
||||||
__be64 *hptep;
|
__be64 *hptep;
|
||||||
int index;
|
long int index;
|
||||||
int virtmode = vcpu->arch.shregs.msr & (data ? MSR_DR : MSR_IR);
|
int virtmode = vcpu->arch.shregs.msr & (data ? MSR_DR : MSR_IR);
|
||||||
|
|
||||||
if (kvm_is_radix(vcpu->kvm))
|
if (kvm_is_radix(vcpu->kvm))
|
||||||
|
@@ -525,8 +525,8 @@ int kvmppc_book3s_radix_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu,
|
|||||||
unsigned long ea, unsigned long dsisr)
|
unsigned long ea, unsigned long dsisr)
|
||||||
{
|
{
|
||||||
struct kvm *kvm = vcpu->kvm;
|
struct kvm *kvm = vcpu->kvm;
|
||||||
unsigned long mmu_seq, pte_size;
|
unsigned long mmu_seq;
|
||||||
unsigned long gpa, gfn, hva, pfn;
|
unsigned long gpa, gfn, hva;
|
||||||
struct kvm_memory_slot *memslot;
|
struct kvm_memory_slot *memslot;
|
||||||
struct page *page = NULL;
|
struct page *page = NULL;
|
||||||
long ret;
|
long ret;
|
||||||
@@ -623,9 +623,10 @@ int kvmppc_book3s_radix_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu,
|
|||||||
*/
|
*/
|
||||||
hva = gfn_to_hva_memslot(memslot, gfn);
|
hva = gfn_to_hva_memslot(memslot, gfn);
|
||||||
if (upgrade_p && __get_user_pages_fast(hva, 1, 1, &page) == 1) {
|
if (upgrade_p && __get_user_pages_fast(hva, 1, 1, &page) == 1) {
|
||||||
pfn = page_to_pfn(page);
|
|
||||||
upgrade_write = true;
|
upgrade_write = true;
|
||||||
} else {
|
} else {
|
||||||
|
unsigned long pfn;
|
||||||
|
|
||||||
/* Call KVM generic code to do the slow-path check */
|
/* Call KVM generic code to do the slow-path check */
|
||||||
pfn = __gfn_to_pfn_memslot(memslot, gfn, false, NULL,
|
pfn = __gfn_to_pfn_memslot(memslot, gfn, false, NULL,
|
||||||
writing, upgrade_p);
|
writing, upgrade_p);
|
||||||
@@ -639,61 +640,43 @@ int kvmppc_book3s_radix_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* See if we can insert a 1GB or 2MB large PTE here */
|
/*
|
||||||
level = 0;
|
* Read the PTE from the process' radix tree and use that
|
||||||
if (page && PageCompound(page)) {
|
* so we get the shift and attribute bits.
|
||||||
pte_size = PAGE_SIZE << compound_order(compound_head(page));
|
*/
|
||||||
if (pte_size >= PUD_SIZE &&
|
local_irq_disable();
|
||||||
(gpa & (PUD_SIZE - PAGE_SIZE)) ==
|
ptep = __find_linux_pte(vcpu->arch.pgdir, hva, NULL, &shift);
|
||||||
(hva & (PUD_SIZE - PAGE_SIZE))) {
|
pte = *ptep;
|
||||||
level = 2;
|
local_irq_enable();
|
||||||
pfn &= ~((PUD_SIZE >> PAGE_SHIFT) - 1);
|
|
||||||
} else if (pte_size >= PMD_SIZE &&
|
/* Get pte level from shift/size */
|
||||||
(gpa & (PMD_SIZE - PAGE_SIZE)) ==
|
if (shift == PUD_SHIFT &&
|
||||||
(hva & (PMD_SIZE - PAGE_SIZE))) {
|
(gpa & (PUD_SIZE - PAGE_SIZE)) ==
|
||||||
level = 1;
|
(hva & (PUD_SIZE - PAGE_SIZE))) {
|
||||||
pfn &= ~((PMD_SIZE >> PAGE_SHIFT) - 1);
|
level = 2;
|
||||||
|
} else if (shift == PMD_SHIFT &&
|
||||||
|
(gpa & (PMD_SIZE - PAGE_SIZE)) ==
|
||||||
|
(hva & (PMD_SIZE - PAGE_SIZE))) {
|
||||||
|
level = 1;
|
||||||
|
} else {
|
||||||
|
level = 0;
|
||||||
|
if (shift > PAGE_SHIFT) {
|
||||||
|
/*
|
||||||
|
* If the pte maps more than one page, bring over
|
||||||
|
* bits from the virtual address to get the real
|
||||||
|
* address of the specific single page we want.
|
||||||
|
*/
|
||||||
|
unsigned long rpnmask = (1ul << shift) - PAGE_SIZE;
|
||||||
|
pte = __pte(pte_val(pte) | (hva & rpnmask));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
pte = __pte(pte_val(pte) | _PAGE_EXEC | _PAGE_ACCESSED);
|
||||||
* Compute the PTE value that we need to insert.
|
if (writing || upgrade_write) {
|
||||||
*/
|
if (pte_val(pte) & _PAGE_WRITE)
|
||||||
if (page) {
|
pte = __pte(pte_val(pte) | _PAGE_DIRTY);
|
||||||
pgflags = _PAGE_READ | _PAGE_EXEC | _PAGE_PRESENT | _PAGE_PTE |
|
|
||||||
_PAGE_ACCESSED;
|
|
||||||
if (writing || upgrade_write)
|
|
||||||
pgflags |= _PAGE_WRITE | _PAGE_DIRTY;
|
|
||||||
pte = pfn_pte(pfn, __pgprot(pgflags));
|
|
||||||
} else {
|
} else {
|
||||||
/*
|
pte = __pte(pte_val(pte) & ~(_PAGE_WRITE | _PAGE_DIRTY));
|
||||||
* Read the PTE from the process' radix tree and use that
|
|
||||||
* so we get the attribute bits.
|
|
||||||
*/
|
|
||||||
local_irq_disable();
|
|
||||||
ptep = __find_linux_pte(vcpu->arch.pgdir, hva, NULL, &shift);
|
|
||||||
pte = *ptep;
|
|
||||||
local_irq_enable();
|
|
||||||
if (shift == PUD_SHIFT &&
|
|
||||||
(gpa & (PUD_SIZE - PAGE_SIZE)) ==
|
|
||||||
(hva & (PUD_SIZE - PAGE_SIZE))) {
|
|
||||||
level = 2;
|
|
||||||
} else if (shift == PMD_SHIFT &&
|
|
||||||
(gpa & (PMD_SIZE - PAGE_SIZE)) ==
|
|
||||||
(hva & (PMD_SIZE - PAGE_SIZE))) {
|
|
||||||
level = 1;
|
|
||||||
} else if (shift && shift != PAGE_SHIFT) {
|
|
||||||
/* Adjust PFN */
|
|
||||||
unsigned long mask = (1ul << shift) - PAGE_SIZE;
|
|
||||||
pte = __pte(pte_val(pte) | (hva & mask));
|
|
||||||
}
|
|
||||||
pte = __pte(pte_val(pte) | _PAGE_EXEC | _PAGE_ACCESSED);
|
|
||||||
if (writing || upgrade_write) {
|
|
||||||
if (pte_val(pte) & _PAGE_WRITE)
|
|
||||||
pte = __pte(pte_val(pte) | _PAGE_DIRTY);
|
|
||||||
} else {
|
|
||||||
pte = __pte(pte_val(pte) & ~(_PAGE_WRITE | _PAGE_DIRTY));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate space in the tree and write the PTE */
|
/* Allocate space in the tree and write the PTE */
|
||||||
@@ -725,10 +708,10 @@ int kvm_unmap_radix(struct kvm *kvm, struct kvm_memory_slot *memslot,
|
|||||||
gpa, shift);
|
gpa, shift);
|
||||||
kvmppc_radix_tlbie_page(kvm, gpa, shift);
|
kvmppc_radix_tlbie_page(kvm, gpa, shift);
|
||||||
if ((old & _PAGE_DIRTY) && memslot->dirty_bitmap) {
|
if ((old & _PAGE_DIRTY) && memslot->dirty_bitmap) {
|
||||||
unsigned long npages = 1;
|
unsigned long psize = PAGE_SIZE;
|
||||||
if (shift)
|
if (shift)
|
||||||
npages = 1ul << (shift - PAGE_SHIFT);
|
psize = 1ul << shift;
|
||||||
kvmppc_update_dirty_map(memslot, gfn, npages);
|
kvmppc_update_dirty_map(memslot, gfn, psize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -187,12 +187,35 @@ long kvmppc_gpa_to_ua(struct kvm *kvm, unsigned long gpa,
|
|||||||
EXPORT_SYMBOL_GPL(kvmppc_gpa_to_ua);
|
EXPORT_SYMBOL_GPL(kvmppc_gpa_to_ua);
|
||||||
|
|
||||||
#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
|
#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
|
||||||
static void kvmppc_rm_clear_tce(struct iommu_table *tbl, unsigned long entry)
|
static long iommu_tce_xchg_rm(struct mm_struct *mm, struct iommu_table *tbl,
|
||||||
|
unsigned long entry, unsigned long *hpa,
|
||||||
|
enum dma_data_direction *direction)
|
||||||
|
{
|
||||||
|
long ret;
|
||||||
|
|
||||||
|
ret = tbl->it_ops->exchange_rm(tbl, entry, hpa, direction);
|
||||||
|
|
||||||
|
if (!ret && ((*direction == DMA_FROM_DEVICE) ||
|
||||||
|
(*direction == DMA_BIDIRECTIONAL))) {
|
||||||
|
__be64 *pua = IOMMU_TABLE_USERSPACE_ENTRY_RM(tbl, entry);
|
||||||
|
/*
|
||||||
|
* kvmppc_rm_tce_iommu_do_map() updates the UA cache after
|
||||||
|
* calling this so we still get here a valid UA.
|
||||||
|
*/
|
||||||
|
if (pua && *pua)
|
||||||
|
mm_iommu_ua_mark_dirty_rm(mm, be64_to_cpu(*pua));
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void kvmppc_rm_clear_tce(struct kvm *kvm, struct iommu_table *tbl,
|
||||||
|
unsigned long entry)
|
||||||
{
|
{
|
||||||
unsigned long hpa = 0;
|
unsigned long hpa = 0;
|
||||||
enum dma_data_direction dir = DMA_NONE;
|
enum dma_data_direction dir = DMA_NONE;
|
||||||
|
|
||||||
iommu_tce_xchg_rm(tbl, entry, &hpa, &dir);
|
iommu_tce_xchg_rm(kvm->mm, tbl, entry, &hpa, &dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static long kvmppc_rm_tce_iommu_mapped_dec(struct kvm *kvm,
|
static long kvmppc_rm_tce_iommu_mapped_dec(struct kvm *kvm,
|
||||||
@@ -224,7 +247,7 @@ static long kvmppc_rm_tce_iommu_do_unmap(struct kvm *kvm,
|
|||||||
unsigned long hpa = 0;
|
unsigned long hpa = 0;
|
||||||
long ret;
|
long ret;
|
||||||
|
|
||||||
if (iommu_tce_xchg_rm(tbl, entry, &hpa, &dir))
|
if (iommu_tce_xchg_rm(kvm->mm, tbl, entry, &hpa, &dir))
|
||||||
/*
|
/*
|
||||||
* real mode xchg can fail if struct page crosses
|
* real mode xchg can fail if struct page crosses
|
||||||
* a page boundary
|
* a page boundary
|
||||||
@@ -236,7 +259,7 @@ static long kvmppc_rm_tce_iommu_do_unmap(struct kvm *kvm,
|
|||||||
|
|
||||||
ret = kvmppc_rm_tce_iommu_mapped_dec(kvm, tbl, entry);
|
ret = kvmppc_rm_tce_iommu_mapped_dec(kvm, tbl, entry);
|
||||||
if (ret)
|
if (ret)
|
||||||
iommu_tce_xchg_rm(tbl, entry, &hpa, &dir);
|
iommu_tce_xchg_rm(kvm->mm, tbl, entry, &hpa, &dir);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -282,7 +305,7 @@ static long kvmppc_rm_tce_iommu_do_map(struct kvm *kvm, struct iommu_table *tbl,
|
|||||||
if (WARN_ON_ONCE_RM(mm_iommu_mapped_inc(mem)))
|
if (WARN_ON_ONCE_RM(mm_iommu_mapped_inc(mem)))
|
||||||
return H_CLOSED;
|
return H_CLOSED;
|
||||||
|
|
||||||
ret = iommu_tce_xchg_rm(tbl, entry, &hpa, &dir);
|
ret = iommu_tce_xchg_rm(kvm->mm, tbl, entry, &hpa, &dir);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
mm_iommu_mapped_dec(mem);
|
mm_iommu_mapped_dec(mem);
|
||||||
/*
|
/*
|
||||||
@@ -371,7 +394,7 @@ long kvmppc_rm_h_put_tce(struct kvm_vcpu *vcpu, unsigned long liobn,
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
WARN_ON_ONCE_RM(1);
|
WARN_ON_ONCE_RM(1);
|
||||||
kvmppc_rm_clear_tce(stit->tbl, entry);
|
kvmppc_rm_clear_tce(vcpu->kvm, stit->tbl, entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
kvmppc_tce_put(stt, entry, tce);
|
kvmppc_tce_put(stt, entry, tce);
|
||||||
@@ -520,7 +543,7 @@ long kvmppc_rm_h_put_tce_indirect(struct kvm_vcpu *vcpu,
|
|||||||
goto unlock_exit;
|
goto unlock_exit;
|
||||||
|
|
||||||
WARN_ON_ONCE_RM(1);
|
WARN_ON_ONCE_RM(1);
|
||||||
kvmppc_rm_clear_tce(stit->tbl, entry);
|
kvmppc_rm_clear_tce(vcpu->kvm, stit->tbl, entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
kvmppc_tce_put(stt, entry + i, tce);
|
kvmppc_tce_put(stt, entry + i, tce);
|
||||||
@@ -571,7 +594,7 @@ long kvmppc_rm_h_stuff_tce(struct kvm_vcpu *vcpu,
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
WARN_ON_ONCE_RM(1);
|
WARN_ON_ONCE_RM(1);
|
||||||
kvmppc_rm_clear_tce(stit->tbl, entry);
|
kvmppc_rm_clear_tce(vcpu->kvm, stit->tbl, entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -443,6 +443,9 @@ _GLOBAL(csum_ipv6_magic)
|
|||||||
addc r0, r8, r9
|
addc r0, r8, r9
|
||||||
ld r10, 0(r4)
|
ld r10, 0(r4)
|
||||||
ld r11, 8(r4)
|
ld r11, 8(r4)
|
||||||
|
#ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||||
|
rotldi r5, r5, 8
|
||||||
|
#endif
|
||||||
adde r0, r0, r10
|
adde r0, r0, r10
|
||||||
add r5, r5, r7
|
add r5, r5, r7
|
||||||
adde r0, r0, r11
|
adde r0, r0, r11
|
||||||
|
@@ -28,6 +28,12 @@ static int __patch_instruction(unsigned int *exec_addr, unsigned int instr,
|
|||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
/* Make sure we aren't patching a freed init section */
|
||||||
|
if (init_mem_is_free && init_section_contains(exec_addr, 4)) {
|
||||||
|
pr_debug("Skipping init section patching addr: 0x%px\n", exec_addr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
__put_user_size(instr, patch_addr, 4, err);
|
__put_user_size(instr, patch_addr, 4, err);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
@@ -308,55 +308,6 @@ void register_page_bootmem_memmap(unsigned long section_nr,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* We do not have access to the sparsemem vmemmap, so we fallback to
|
|
||||||
* walking the list of sparsemem blocks which we already maintain for
|
|
||||||
* the sake of crashdump. In the long run, we might want to maintain
|
|
||||||
* a tree if performance of that linear walk becomes a problem.
|
|
||||||
*
|
|
||||||
* realmode_pfn_to_page functions can fail due to:
|
|
||||||
* 1) As real sparsemem blocks do not lay in RAM continously (they
|
|
||||||
* are in virtual address space which is not available in the real mode),
|
|
||||||
* the requested page struct can be split between blocks so get_page/put_page
|
|
||||||
* may fail.
|
|
||||||
* 2) When huge pages are used, the get_page/put_page API will fail
|
|
||||||
* in real mode as the linked addresses in the page struct are virtual
|
|
||||||
* too.
|
|
||||||
*/
|
|
||||||
struct page *realmode_pfn_to_page(unsigned long pfn)
|
|
||||||
{
|
|
||||||
struct vmemmap_backing *vmem_back;
|
|
||||||
struct page *page;
|
|
||||||
unsigned long page_size = 1 << mmu_psize_defs[mmu_vmemmap_psize].shift;
|
|
||||||
unsigned long pg_va = (unsigned long) pfn_to_page(pfn);
|
|
||||||
|
|
||||||
for (vmem_back = vmemmap_list; vmem_back; vmem_back = vmem_back->list) {
|
|
||||||
if (pg_va < vmem_back->virt_addr)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* After vmemmap_list entry free is possible, need check all */
|
|
||||||
if ((pg_va + sizeof(struct page)) <=
|
|
||||||
(vmem_back->virt_addr + page_size)) {
|
|
||||||
page = (struct page *) (vmem_back->phys + pg_va -
|
|
||||||
vmem_back->virt_addr);
|
|
||||||
return page;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Probably that page struct is split between real pages */
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(realmode_pfn_to_page);
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
struct page *realmode_pfn_to_page(unsigned long pfn)
|
|
||||||
{
|
|
||||||
struct page *page = pfn_to_page(pfn);
|
|
||||||
return page;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(realmode_pfn_to_page);
|
|
||||||
|
|
||||||
#endif /* CONFIG_SPARSEMEM_VMEMMAP */
|
#endif /* CONFIG_SPARSEMEM_VMEMMAP */
|
||||||
|
|
||||||
#ifdef CONFIG_PPC_BOOK3S_64
|
#ifdef CONFIG_PPC_BOOK3S_64
|
||||||
|
@@ -63,6 +63,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
unsigned long long memory_limit;
|
unsigned long long memory_limit;
|
||||||
|
bool init_mem_is_free;
|
||||||
|
|
||||||
#ifdef CONFIG_HIGHMEM
|
#ifdef CONFIG_HIGHMEM
|
||||||
pte_t *kmap_pte;
|
pte_t *kmap_pte;
|
||||||
@@ -396,6 +397,7 @@ void free_initmem(void)
|
|||||||
{
|
{
|
||||||
ppc_md.progress = ppc_printk_progress;
|
ppc_md.progress = ppc_printk_progress;
|
||||||
mark_initmem_nx();
|
mark_initmem_nx();
|
||||||
|
init_mem_is_free = true;
|
||||||
free_initmem_default(POISON_FREE_INITMEM);
|
free_initmem_default(POISON_FREE_INITMEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -18,11 +18,15 @@
|
|||||||
#include <linux/migrate.h>
|
#include <linux/migrate.h>
|
||||||
#include <linux/hugetlb.h>
|
#include <linux/hugetlb.h>
|
||||||
#include <linux/swap.h>
|
#include <linux/swap.h>
|
||||||
|
#include <linux/sizes.h>
|
||||||
#include <asm/mmu_context.h>
|
#include <asm/mmu_context.h>
|
||||||
#include <asm/pte-walk.h>
|
#include <asm/pte-walk.h>
|
||||||
|
|
||||||
static DEFINE_MUTEX(mem_list_mutex);
|
static DEFINE_MUTEX(mem_list_mutex);
|
||||||
|
|
||||||
|
#define MM_IOMMU_TABLE_GROUP_PAGE_DIRTY 0x1
|
||||||
|
#define MM_IOMMU_TABLE_GROUP_PAGE_MASK ~(SZ_4K - 1)
|
||||||
|
|
||||||
struct mm_iommu_table_group_mem_t {
|
struct mm_iommu_table_group_mem_t {
|
||||||
struct list_head next;
|
struct list_head next;
|
||||||
struct rcu_head rcu;
|
struct rcu_head rcu;
|
||||||
@@ -263,6 +267,9 @@ static void mm_iommu_unpin(struct mm_iommu_table_group_mem_t *mem)
|
|||||||
if (!page)
|
if (!page)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (mem->hpas[i] & MM_IOMMU_TABLE_GROUP_PAGE_DIRTY)
|
||||||
|
SetPageDirty(page);
|
||||||
|
|
||||||
put_page(page);
|
put_page(page);
|
||||||
mem->hpas[i] = 0;
|
mem->hpas[i] = 0;
|
||||||
}
|
}
|
||||||
@@ -360,7 +367,6 @@ struct mm_iommu_table_group_mem_t *mm_iommu_lookup_rm(struct mm_struct *mm,
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(mm_iommu_lookup_rm);
|
|
||||||
|
|
||||||
struct mm_iommu_table_group_mem_t *mm_iommu_find(struct mm_struct *mm,
|
struct mm_iommu_table_group_mem_t *mm_iommu_find(struct mm_struct *mm,
|
||||||
unsigned long ua, unsigned long entries)
|
unsigned long ua, unsigned long entries)
|
||||||
@@ -390,7 +396,7 @@ long mm_iommu_ua_to_hpa(struct mm_iommu_table_group_mem_t *mem,
|
|||||||
if (pageshift > mem->pageshift)
|
if (pageshift > mem->pageshift)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
*hpa = *va | (ua & ~PAGE_MASK);
|
*hpa = (*va & MM_IOMMU_TABLE_GROUP_PAGE_MASK) | (ua & ~PAGE_MASK);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -413,11 +419,31 @@ long mm_iommu_ua_to_hpa_rm(struct mm_iommu_table_group_mem_t *mem,
|
|||||||
if (!pa)
|
if (!pa)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
*hpa = *pa | (ua & ~PAGE_MASK);
|
*hpa = (*pa & MM_IOMMU_TABLE_GROUP_PAGE_MASK) | (ua & ~PAGE_MASK);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(mm_iommu_ua_to_hpa_rm);
|
|
||||||
|
extern void mm_iommu_ua_mark_dirty_rm(struct mm_struct *mm, unsigned long ua)
|
||||||
|
{
|
||||||
|
struct mm_iommu_table_group_mem_t *mem;
|
||||||
|
long entry;
|
||||||
|
void *va;
|
||||||
|
unsigned long *pa;
|
||||||
|
|
||||||
|
mem = mm_iommu_lookup_rm(mm, ua, PAGE_SIZE);
|
||||||
|
if (!mem)
|
||||||
|
return;
|
||||||
|
|
||||||
|
entry = (ua - mem->ua) >> PAGE_SHIFT;
|
||||||
|
va = &mem->hpas[entry];
|
||||||
|
|
||||||
|
pa = (void *) vmalloc_to_phys(va);
|
||||||
|
if (!pa)
|
||||||
|
return;
|
||||||
|
|
||||||
|
*pa |= MM_IOMMU_TABLE_GROUP_PAGE_DIRTY;
|
||||||
|
}
|
||||||
|
|
||||||
long mm_iommu_mapped_inc(struct mm_iommu_table_group_mem_t *mem)
|
long mm_iommu_mapped_inc(struct mm_iommu_table_group_mem_t *mem)
|
||||||
{
|
{
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user