mirror of https://gitee.com/openkylin/linux.git
KVM/ARM Fixes for v4.7-rc2
Fixes for the vgic, 2 of the patches address a bug introduced in v4.6 while the rest are for the new vgic. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJXUAe1AAoJEEtpOizt6ddyTr8H/R6fBFWjdd6BTEm95aPl50bs jtiXqahVPL6Dk3WNI4fyyWD1bdi+ZgAAOKrgYjbRMQqUR7xZIk/qjm/6BzYsscQF RbKa72OMYC1PF+SAK1oopG1lrFxBoC9SXOnkZ3isIeBX7FB0nVYpyQ1jLEHmi7an rd1KjhUNFCLQ2NAPWxUiOQPYubPWVuAgMaj4f37JOOuRBgpV3m942MMQNo3IAO9Q xpbMCyAl1sv9bfa0FXzVhFWft0+0Lls+KDoYo0/PfnqgxTxGQaGiVZqighlONNTg Fp3B3EOWhcga7rFPJnBjxAaXGV8QrHm4DvPQ5I82R5r4I46Ymf/S9rRHZ2h3ly8= =Vx54 -----END PGP SIGNATURE----- Merge tag 'kvm-arm-for-v4.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm KVM/ARM Fixes for v4.7-rc2 Fixes for the vgic, 2 of the patches address a bug introduced in v4.6 while the rest are for the new vgic.
This commit is contained in:
commit
13e98fd1ef
|
@ -107,6 +107,15 @@ Contact: Artem Bityutskiy <dedekind@infradead.org>
|
||||||
Description:
|
Description:
|
||||||
Number of physical eraseblocks reserved for bad block handling.
|
Number of physical eraseblocks reserved for bad block handling.
|
||||||
|
|
||||||
|
What: /sys/class/ubi/ubiX/ro_mode
|
||||||
|
Date: April 2016
|
||||||
|
KernelVersion: 4.7
|
||||||
|
Contact: linux-mtd@lists.infradead.org
|
||||||
|
Description:
|
||||||
|
Contains ASCII "1\n" if the read-only flag is set on this
|
||||||
|
device, and "0\n" if it is cleared. UBI devices mark themselves
|
||||||
|
as read-only when they detect an unrecoverable error.
|
||||||
|
|
||||||
What: /sys/class/ubi/ubiX/total_eraseblocks
|
What: /sys/class/ubi/ubiX/total_eraseblocks
|
||||||
Date: July 2006
|
Date: July 2006
|
||||||
KernelVersion: 2.6.22
|
KernelVersion: 2.6.22
|
||||||
|
|
|
@ -1626,6 +1626,12 @@ void intel_crt_init(struct drm_device *dev)
|
||||||
!Pdrivers/gpu/drm/drm_dp_helper.c dp helpers
|
!Pdrivers/gpu/drm/drm_dp_helper.c dp helpers
|
||||||
!Iinclude/drm/drm_dp_helper.h
|
!Iinclude/drm/drm_dp_helper.h
|
||||||
!Edrivers/gpu/drm/drm_dp_helper.c
|
!Edrivers/gpu/drm/drm_dp_helper.c
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>Display Port Dual Mode Adaptor Helper Functions Reference</title>
|
||||||
|
!Pdrivers/gpu/drm/drm_dp_dual_mode_helper.c dp dual mode helpers
|
||||||
|
!Iinclude/drm/drm_dp_dual_mode_helper.h
|
||||||
|
!Edrivers/gpu/drm/drm_dp_dual_mode_helper.c
|
||||||
</sect2>
|
</sect2>
|
||||||
<sect2>
|
<sect2>
|
||||||
<title>Display Port MST Helper Functions Reference</title>
|
<title>Display Port MST Helper Functions Reference</title>
|
||||||
|
|
|
@ -33,7 +33,7 @@ gpio0: gpio0@1f860000 {
|
||||||
gpio-controller;
|
gpio-controller;
|
||||||
interrupt-controller;
|
interrupt-controller;
|
||||||
#interrupt-cells = <2>;
|
#interrupt-cells = <2>;
|
||||||
clocks = <&PBCLK4>;
|
clocks = <&rootclk PB4CLK>;
|
||||||
microchip,gpio-bank = <0>;
|
microchip,gpio-bank = <0>;
|
||||||
gpio-ranges = <&pic32_pinctrl 0 0 16>;
|
gpio-ranges = <&pic32_pinctrl 0 0 16>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,7 @@ Required properties:
|
||||||
- compatible : Should be "mti,cpu-interrupt-controller"
|
- compatible : Should be "mti,cpu-interrupt-controller"
|
||||||
|
|
||||||
Example devicetree:
|
Example devicetree:
|
||||||
cpu-irq: cpu-irq@0 {
|
cpu-irq: cpu-irq {
|
||||||
#address-cells = <0>;
|
#address-cells = <0>;
|
||||||
|
|
||||||
interrupt-controller;
|
interrupt-controller;
|
||||||
|
|
|
@ -20,7 +20,7 @@ Example:
|
||||||
compatible = "microchip,pic32mzda-sdhci";
|
compatible = "microchip,pic32mzda-sdhci";
|
||||||
reg = <0x1f8ec000 0x100>;
|
reg = <0x1f8ec000 0x100>;
|
||||||
interrupts = <191 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <191 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&REFCLKO4>, <&PBCLK5>;
|
clocks = <&rootclk REF4CLK>, <&rootclk PB5CLK>;
|
||||||
clock-names = "base_clk", "sys_clk";
|
clock-names = "base_clk", "sys_clk";
|
||||||
bus-width = <4>;
|
bus-width = <4>;
|
||||||
cap-sd-highspeed;
|
cap-sd-highspeed;
|
||||||
|
|
|
@ -39,7 +39,7 @@ Optional properties:
|
||||||
|
|
||||||
Nand Flash Controller(NFC) is an optional sub-node
|
Nand Flash Controller(NFC) is an optional sub-node
|
||||||
Required properties:
|
Required properties:
|
||||||
- compatible : "atmel,sama5d3-nfc" or "atmel,sama5d4-nfc".
|
- compatible : "atmel,sama5d3-nfc".
|
||||||
- reg : should specify the address and size used for NFC command registers,
|
- reg : should specify the address and size used for NFC command registers,
|
||||||
NFC registers and NFC SRAM. NFC SRAM address and size can be absent
|
NFC registers and NFC SRAM. NFC SRAM address and size can be absent
|
||||||
if don't want to use it.
|
if don't want to use it.
|
||||||
|
|
|
@ -53,7 +53,8 @@ Example:
|
||||||
|
|
||||||
nand@0 {
|
nand@0 {
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
nand-ecc-mode = "soft_bch";
|
nand-ecc-mode = "soft";
|
||||||
|
nand-ecc-algo = "bch";
|
||||||
|
|
||||||
/* controller specific properties */
|
/* controller specific properties */
|
||||||
};
|
};
|
||||||
|
|
|
@ -34,7 +34,7 @@ pic32_pinctrl: pinctrl@1f801400{
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
compatible = "microchip,pic32mzda-pinctrl";
|
compatible = "microchip,pic32mzda-pinctrl";
|
||||||
reg = <0x1f801400 0x400>;
|
reg = <0x1f801400 0x400>;
|
||||||
clocks = <&PBCLK1>;
|
clocks = <&rootclk PB1CLK>;
|
||||||
|
|
||||||
pinctrl_uart2: pinctrl_uart2 {
|
pinctrl_uart2: pinctrl_uart2 {
|
||||||
uart2-tx {
|
uart2-tx {
|
||||||
|
|
|
@ -20,7 +20,7 @@ Example:
|
||||||
interrupts = <112 IRQ_TYPE_LEVEL_HIGH>,
|
interrupts = <112 IRQ_TYPE_LEVEL_HIGH>,
|
||||||
<113 IRQ_TYPE_LEVEL_HIGH>,
|
<113 IRQ_TYPE_LEVEL_HIGH>,
|
||||||
<114 IRQ_TYPE_LEVEL_HIGH>;
|
<114 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&PBCLK2>;
|
clocks = <&rootclk PB2CLK>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pinctrl_uart1
|
pinctrl-0 = <&pinctrl_uart1
|
||||||
&pinctrl_uart1_cts
|
&pinctrl_uart1_cts
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
max98371 codec
|
||||||
|
|
||||||
|
This device supports I2C mode only.
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
|
||||||
|
- compatible : "maxim,max98371"
|
||||||
|
- reg : The chip select number on the I2C bus
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
&i2c {
|
||||||
|
max98371: max98371@0x31 {
|
||||||
|
compatible = "maxim,max98371";
|
||||||
|
reg = <0x31>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,15 +1,16 @@
|
||||||
MT8173 with RT5650 RT5676 CODECS
|
MT8173 with RT5650 RT5676 CODECS and HDMI via I2S
|
||||||
|
|
||||||
Required properties:
|
Required properties:
|
||||||
- compatible : "mediatek,mt8173-rt5650-rt5676"
|
- compatible : "mediatek,mt8173-rt5650-rt5676"
|
||||||
- mediatek,audio-codec: the phandles of rt5650 and rt5676 codecs
|
- mediatek,audio-codec: the phandles of rt5650 and rt5676 codecs
|
||||||
|
and of the hdmi encoder node
|
||||||
- mediatek,platform: the phandle of MT8173 ASoC platform
|
- mediatek,platform: the phandle of MT8173 ASoC platform
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
sound {
|
sound {
|
||||||
compatible = "mediatek,mt8173-rt5650-rt5676";
|
compatible = "mediatek,mt8173-rt5650-rt5676";
|
||||||
mediatek,audio-codec = <&rt5650 &rt5676>;
|
mediatek,audio-codec = <&rt5650 &rt5676 &hdmi0>;
|
||||||
mediatek,platform = <&afe>;
|
mediatek,platform = <&afe>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,21 @@ Required properties:
|
||||||
- mediatek,audio-codec: the phandles of rt5650 codecs
|
- mediatek,audio-codec: the phandles of rt5650 codecs
|
||||||
- mediatek,platform: the phandle of MT8173 ASoC platform
|
- mediatek,platform: the phandle of MT8173 ASoC platform
|
||||||
|
|
||||||
|
Optional subnodes:
|
||||||
|
- codec-capture : the subnode of rt5650 codec capture
|
||||||
|
Required codec-capture subnode properties:
|
||||||
|
- sound-dai: audio codec dai name on capture path
|
||||||
|
<&rt5650 0> : Default setting. Connect rt5650 I2S1 for capture. (dai_name = rt5645-aif1)
|
||||||
|
<&rt5650 1> : Connect rt5650 I2S2 for capture. (dai_name = rt5645-aif2)
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
sound {
|
sound {
|
||||||
compatible = "mediatek,mt8173-rt5650";
|
compatible = "mediatek,mt8173-rt5650";
|
||||||
mediatek,audio-codec = <&rt5650>;
|
mediatek,audio-codec = <&rt5650>;
|
||||||
mediatek,platform = <&afe>;
|
mediatek,platform = <&afe>;
|
||||||
|
codec-capture {
|
||||||
|
sound-dai = <&rt5650 1>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -37,17 +37,18 @@ Required properties:
|
||||||
|
|
||||||
- dai-name: DAI name that describes the IP.
|
- dai-name: DAI name that describes the IP.
|
||||||
|
|
||||||
|
- IP mode: IP working mode depending on associated codec.
|
||||||
|
"HDMI" connected to HDMI codec and support IEC HDMI formats (player only).
|
||||||
|
"SPDIF" connected to SPDIF codec and support SPDIF formats (player only).
|
||||||
|
"PCM" PCM standard mode for I2S or TDM bus.
|
||||||
|
"TDM" TDM mode for TDM bus.
|
||||||
|
|
||||||
Required properties ("st,sti-uni-player" compatibility only):
|
Required properties ("st,sti-uni-player" compatibility only):
|
||||||
- clocks: CPU_DAI IP clock source, listed in the same order than the
|
- clocks: CPU_DAI IP clock source, listed in the same order than the
|
||||||
CPU_DAI properties.
|
CPU_DAI properties.
|
||||||
|
|
||||||
- uniperiph-id: internal SOC IP instance ID.
|
- uniperiph-id: internal SOC IP instance ID.
|
||||||
|
|
||||||
- IP mode: IP working mode depending on associated codec.
|
|
||||||
"HDMI" connected to HDMI codec IP and IEC HDMI formats.
|
|
||||||
"SPDIF"connected to SPDIF codec and support SPDIF formats.
|
|
||||||
"PCM" PCM standard mode for I2S or TDM bus.
|
|
||||||
|
|
||||||
Optional properties:
|
Optional properties:
|
||||||
- pinctrl-0: defined for CPU_DAI@1 and CPU_DAI@4 to describe I2S PIOs for
|
- pinctrl-0: defined for CPU_DAI@1 and CPU_DAI@4 to describe I2S PIOs for
|
||||||
external codecs connection.
|
external codecs connection.
|
||||||
|
@ -56,6 +57,22 @@ Optional properties:
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
sti_uni_player1: sti-uni-player@1 {
|
||||||
|
compatible = "st,sti-uni-player";
|
||||||
|
status = "okay";
|
||||||
|
#sound-dai-cells = <0>;
|
||||||
|
st,syscfg = <&syscfg_core>;
|
||||||
|
clocks = <&clk_s_d0_flexgen CLK_PCM_1>;
|
||||||
|
reg = <0x8D81000 0x158>;
|
||||||
|
interrupts = <GIC_SPI 85 IRQ_TYPE_NONE>;
|
||||||
|
dmas = <&fdma0 3 0 1>;
|
||||||
|
st,dai-name = "Uni Player #1 (I2S)";
|
||||||
|
dma-names = "tx";
|
||||||
|
st,uniperiph-id = <1>;
|
||||||
|
st,version = <5>;
|
||||||
|
st,mode = "TDM";
|
||||||
|
};
|
||||||
|
|
||||||
sti_uni_player2: sti-uni-player@2 {
|
sti_uni_player2: sti-uni-player@2 {
|
||||||
compatible = "st,sti-uni-player";
|
compatible = "st,sti-uni-player";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
@ -65,7 +82,7 @@ Example:
|
||||||
reg = <0x8D82000 0x158>;
|
reg = <0x8D82000 0x158>;
|
||||||
interrupts = <GIC_SPI 86 IRQ_TYPE_NONE>;
|
interrupts = <GIC_SPI 86 IRQ_TYPE_NONE>;
|
||||||
dmas = <&fdma0 4 0 1>;
|
dmas = <&fdma0 4 0 1>;
|
||||||
dai-name = "Uni Player #1 (DAC)";
|
dai-name = "Uni Player #2 (DAC)";
|
||||||
dma-names = "tx";
|
dma-names = "tx";
|
||||||
uniperiph-id = <2>;
|
uniperiph-id = <2>;
|
||||||
version = <5>;
|
version = <5>;
|
||||||
|
@ -82,7 +99,7 @@ Example:
|
||||||
interrupts = <GIC_SPI 89 IRQ_TYPE_NONE>;
|
interrupts = <GIC_SPI 89 IRQ_TYPE_NONE>;
|
||||||
dmas = <&fdma0 7 0 1>;
|
dmas = <&fdma0 7 0 1>;
|
||||||
dma-names = "tx";
|
dma-names = "tx";
|
||||||
dai-name = "Uni Player #1 (PIO)";
|
dai-name = "Uni Player #3 (SPDIF)";
|
||||||
uniperiph-id = <3>;
|
uniperiph-id = <3>;
|
||||||
version = <5>;
|
version = <5>;
|
||||||
mode = "SPDIF";
|
mode = "SPDIF";
|
||||||
|
@ -99,6 +116,7 @@ Example:
|
||||||
dma-names = "rx";
|
dma-names = "rx";
|
||||||
dai-name = "Uni Reader #1 (HDMI RX)";
|
dai-name = "Uni Reader #1 (HDMI RX)";
|
||||||
version = <3>;
|
version = <3>;
|
||||||
|
st,mode = "PCM";
|
||||||
};
|
};
|
||||||
|
|
||||||
2) sti-sas-codec: internal audio codec IPs driver
|
2) sti-sas-codec: internal audio codec IPs driver
|
||||||
|
@ -152,4 +170,20 @@ Example of audio card declaration:
|
||||||
sound-dai = <&sti_sasg_codec 0>;
|
sound-dai = <&sti_sasg_codec 0>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
simple-audio-card,dai-link@2 {
|
||||||
|
/* TDM playback */
|
||||||
|
format = "left_j";
|
||||||
|
frame-inversion = <1>;
|
||||||
|
cpu {
|
||||||
|
sound-dai = <&sti_uni_player1>;
|
||||||
|
dai-tdm-slot-num = <16>;
|
||||||
|
dai-tdm-slot-width = <16>;
|
||||||
|
dai-tdm-slot-tx-mask =
|
||||||
|
<1 1 1 1 0 0 0 0 0 0 1 1 0 0 1 1>;
|
||||||
|
};
|
||||||
|
|
||||||
|
codec {
|
||||||
|
sound-dai = <&sti_sasg_codec 3>;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Texas Instruments TAS5711/TAS5717/TAS5719 stereo power amplifiers
|
Texas Instruments TAS5711/TAS5717/TAS5719/TAS5721 stereo power amplifiers
|
||||||
|
|
||||||
The codec is controlled through an I2C interface. It also has two other
|
The codec is controlled through an I2C interface. It also has two other
|
||||||
signals that can be wired up to GPIOs: reset (strongly recommended), and
|
signals that can be wired up to GPIOs: reset (strongly recommended), and
|
||||||
|
@ -6,7 +6,11 @@ powerdown (optional).
|
||||||
|
|
||||||
Required properties:
|
Required properties:
|
||||||
|
|
||||||
- compatible: "ti,tas5711", "ti,tas5717", or "ti,tas5719"
|
- compatible: should be one of the following:
|
||||||
|
- "ti,tas5711",
|
||||||
|
- "ti,tas5717",
|
||||||
|
- "ti,tas5719",
|
||||||
|
- "ti,tas5721"
|
||||||
- reg: The I2C address of the device
|
- reg: The I2C address of the device
|
||||||
- #sound-dai-cells: must be equal to 0
|
- #sound-dai-cells: must be equal to 0
|
||||||
|
|
||||||
|
@ -25,6 +29,8 @@ Optional properties:
|
||||||
- PVDD_B-supply: regulator phandle for the PVDD_B supply (5711)
|
- PVDD_B-supply: regulator phandle for the PVDD_B supply (5711)
|
||||||
- PVDD_C-supply: regulator phandle for the PVDD_C supply (5711)
|
- PVDD_C-supply: regulator phandle for the PVDD_C supply (5711)
|
||||||
- PVDD_D-supply: regulator phandle for the PVDD_D supply (5711)
|
- PVDD_D-supply: regulator phandle for the PVDD_D supply (5711)
|
||||||
|
- DRVDD-supply: regulator phandle for the DRVDD supply (5721)
|
||||||
|
- PVDD-supply: regulator phandle for the PVDD supply (5721)
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
Texas Instruments TAS5720 Mono Audio amplifier
|
||||||
|
|
||||||
|
The TAS5720 serial control bus communicates through the I2C protocol only. The
|
||||||
|
serial bus is also used for periodic codec fault checking/reporting during
|
||||||
|
audio playback. For more product information please see the links below:
|
||||||
|
|
||||||
|
http://www.ti.com/product/TAS5720L
|
||||||
|
http://www.ti.com/product/TAS5720M
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
|
||||||
|
- compatible : "ti,tas5720"
|
||||||
|
- reg : I2C slave address
|
||||||
|
- dvdd-supply : phandle to a 3.3-V supply for the digital circuitry
|
||||||
|
- pvdd-supply : phandle to a supply used for the Class-D amp and the analog
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
tas5720: tas5720@6c {
|
||||||
|
status = "okay";
|
||||||
|
compatible = "ti,tas5720";
|
||||||
|
reg = <0x6c>;
|
||||||
|
dvdd-supply = <&vdd_3v3_reg>;
|
||||||
|
pvdd-supply = <&_supply_reg>;
|
||||||
|
};
|
|
@ -8,12 +8,12 @@ Required properties:
|
||||||
- compatible: must be "microchip,pic32mzda-dmt".
|
- compatible: must be "microchip,pic32mzda-dmt".
|
||||||
- reg: physical base address of the controller and length of memory mapped
|
- reg: physical base address of the controller and length of memory mapped
|
||||||
region.
|
region.
|
||||||
- clocks: phandle of parent clock (should be &PBCLK7).
|
- clocks: phandle of source clk. Should be <&rootclk PB7CLK>.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
watchdog@1f800a00 {
|
watchdog@1f800a00 {
|
||||||
compatible = "microchip,pic32mzda-dmt";
|
compatible = "microchip,pic32mzda-dmt";
|
||||||
reg = <0x1f800a00 0x80>;
|
reg = <0x1f800a00 0x80>;
|
||||||
clocks = <&PBCLK7>;
|
clocks = <&rootclk PB7CLK>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,12 +7,12 @@ Required properties:
|
||||||
- compatible: must be "microchip,pic32mzda-wdt".
|
- compatible: must be "microchip,pic32mzda-wdt".
|
||||||
- reg: physical base address of the controller and length of memory mapped
|
- reg: physical base address of the controller and length of memory mapped
|
||||||
region.
|
region.
|
||||||
- clocks: phandle of source clk. should be <&LPRC> clk.
|
- clocks: phandle of source clk. Should be <&rootclk LPRCCLK>.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
watchdog@1f800800 {
|
watchdog@1f800800 {
|
||||||
compatible = "microchip,pic32mzda-wdt";
|
compatible = "microchip,pic32mzda-wdt";
|
||||||
reg = <0x1f800800 0x200>;
|
reg = <0x1f800800 0x200>;
|
||||||
clocks = <&LPRC>;
|
clocks = <&rootclk LPRCCLK>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,30 +1,37 @@
|
||||||
Locking scheme used for directory operations is based on two
|
Locking scheme used for directory operations is based on two
|
||||||
kinds of locks - per-inode (->i_mutex) and per-filesystem
|
kinds of locks - per-inode (->i_rwsem) and per-filesystem
|
||||||
(->s_vfs_rename_mutex).
|
(->s_vfs_rename_mutex).
|
||||||
|
|
||||||
When taking the i_mutex on multiple non-directory objects, we
|
When taking the i_rwsem on multiple non-directory objects, we
|
||||||
always acquire the locks in order by increasing address. We'll call
|
always acquire the locks in order by increasing address. We'll call
|
||||||
that "inode pointer" order in the following.
|
that "inode pointer" order in the following.
|
||||||
|
|
||||||
For our purposes all operations fall in 5 classes:
|
For our purposes all operations fall in 5 classes:
|
||||||
|
|
||||||
1) read access. Locking rules: caller locks directory we are accessing.
|
1) read access. Locking rules: caller locks directory we are accessing.
|
||||||
|
The lock is taken shared.
|
||||||
|
|
||||||
2) object creation. Locking rules: same as above.
|
2) object creation. Locking rules: same as above, but the lock is taken
|
||||||
|
exclusive.
|
||||||
|
|
||||||
3) object removal. Locking rules: caller locks parent, finds victim,
|
3) object removal. Locking rules: caller locks parent, finds victim,
|
||||||
locks victim and calls the method.
|
locks victim and calls the method. Locks are exclusive.
|
||||||
|
|
||||||
4) rename() that is _not_ cross-directory. Locking rules: caller locks
|
4) rename() that is _not_ cross-directory. Locking rules: caller locks
|
||||||
the parent and finds source and target. If target already exists, lock
|
the parent and finds source and target. In case of exchange (with
|
||||||
it. If source is a non-directory, lock it. If that means we need to
|
RENAME_EXCHANGE in rename2() flags argument) lock both. In any case,
|
||||||
lock both, lock them in inode pointer order.
|
if the target already exists, lock it. If the source is a non-directory,
|
||||||
|
lock it. If we need to lock both, lock them in inode pointer order.
|
||||||
|
Then call the method. All locks are exclusive.
|
||||||
|
NB: we might get away with locking the the source (and target in exchange
|
||||||
|
case) shared.
|
||||||
|
|
||||||
5) link creation. Locking rules:
|
5) link creation. Locking rules:
|
||||||
* lock parent
|
* lock parent
|
||||||
* check that source is not a directory
|
* check that source is not a directory
|
||||||
* lock source
|
* lock source
|
||||||
* call the method.
|
* call the method.
|
||||||
|
All locks are exclusive.
|
||||||
|
|
||||||
6) cross-directory rename. The trickiest in the whole bunch. Locking
|
6) cross-directory rename. The trickiest in the whole bunch. Locking
|
||||||
rules:
|
rules:
|
||||||
|
@ -35,11 +42,12 @@ rules:
|
||||||
fail with -ENOTEMPTY
|
fail with -ENOTEMPTY
|
||||||
* if new parent is equal to or is a descendent of source
|
* if new parent is equal to or is a descendent of source
|
||||||
fail with -ELOOP
|
fail with -ELOOP
|
||||||
* If target exists, lock it. If source is a non-directory, lock
|
* If it's an exchange, lock both the source and the target.
|
||||||
it. In case that means we need to lock both source and target,
|
* If the target exists, lock it. If the source is a non-directory,
|
||||||
do so in inode pointer order.
|
lock it. If we need to lock both, do so in inode pointer order.
|
||||||
* call the method.
|
* call the method.
|
||||||
|
All ->i_rwsem are taken exclusive. Again, we might get away with locking
|
||||||
|
the the source (and target in exchange case) shared.
|
||||||
|
|
||||||
The rules above obviously guarantee that all directories that are going to be
|
The rules above obviously guarantee that all directories that are going to be
|
||||||
read, modified or removed by method will be locked by caller.
|
read, modified or removed by method will be locked by caller.
|
||||||
|
@ -73,7 +81,7 @@ objects - A < B iff A is an ancestor of B.
|
||||||
attempt to acquire some lock and already holds at least one lock. Let's
|
attempt to acquire some lock and already holds at least one lock. Let's
|
||||||
consider the set of contended locks. First of all, filesystem lock is
|
consider the set of contended locks. First of all, filesystem lock is
|
||||||
not contended, since any process blocked on it is not holding any locks.
|
not contended, since any process blocked on it is not holding any locks.
|
||||||
Thus all processes are blocked on ->i_mutex.
|
Thus all processes are blocked on ->i_rwsem.
|
||||||
|
|
||||||
By (3), any process holding a non-directory lock can only be
|
By (3), any process holding a non-directory lock can only be
|
||||||
waiting on another non-directory lock with a larger address. Therefore
|
waiting on another non-directory lock with a larger address. Therefore
|
||||||
|
|
|
@ -194,15 +194,6 @@ If a file with multiple hard links is copied up, then this will
|
||||||
"break" the link. Changes will not be propagated to other names
|
"break" the link. Changes will not be propagated to other names
|
||||||
referring to the same inode.
|
referring to the same inode.
|
||||||
|
|
||||||
Symlinks in /proc/PID/ and /proc/PID/fd which point to a non-directory
|
|
||||||
object in overlayfs will not contain valid absolute paths, only
|
|
||||||
relative paths leading up to the filesystem's root. This will be
|
|
||||||
fixed in the future.
|
|
||||||
|
|
||||||
Some operations are not atomic, for example a crash during copy_up or
|
|
||||||
rename will leave the filesystem in an inconsistent state. This will
|
|
||||||
be addressed in the future.
|
|
||||||
|
|
||||||
Changes to underlying filesystems
|
Changes to underlying filesystems
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
|
|
|
@ -578,3 +578,10 @@ in your dentry operations instead.
|
||||||
--
|
--
|
||||||
[mandatory]
|
[mandatory]
|
||||||
->atomic_open() calls without O_CREAT may happen in parallel.
|
->atomic_open() calls without O_CREAT may happen in parallel.
|
||||||
|
--
|
||||||
|
[mandatory]
|
||||||
|
->setxattr() and xattr_handler.set() get dentry and inode passed separately.
|
||||||
|
dentry might be yet to be attached to inode, so do _not_ use its ->d_inode
|
||||||
|
in the instances. Rationale: !@#!@# security_d_instantiate() needs to be
|
||||||
|
called before we attach dentry to inode and !@#!@##!@$!$#!@#$!@$!@$ smack
|
||||||
|
->d_instantiate() uses not just ->getxattr() but ->setxattr() as well.
|
||||||
|
|
|
@ -56,6 +56,18 @@ SYSFS FILES
|
||||||
ports/1/pkeys/10 contains the value at index 10 in port 1's P_Key
|
ports/1/pkeys/10 contains the value at index 10 in port 1's P_Key
|
||||||
table.
|
table.
|
||||||
|
|
||||||
|
There is an optional "hw_counters" subdirectory that may be under either
|
||||||
|
the parent device or the port subdirectories or both. If present,
|
||||||
|
there are a list of counters provided by the hardware. They may match
|
||||||
|
some of the counters in the counters directory, but they often include
|
||||||
|
many other counters. In addition to the various counters, there will
|
||||||
|
be a file named "lifespan" that configures how frequently the core
|
||||||
|
should update the counters when they are being accessed (counters are
|
||||||
|
not updated if they are not being accessed). The lifespan is in milli-
|
||||||
|
seconds and defaults to 10 unless set to something else by the driver.
|
||||||
|
Users may echo a value between 0 - 10000 to the lifespan file to set
|
||||||
|
the length of time between updates in milliseconds.
|
||||||
|
|
||||||
MTHCA
|
MTHCA
|
||||||
|
|
||||||
The Mellanox HCA driver also creates the files:
|
The Mellanox HCA driver also creates the files:
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
tcm_qla2xxx jam_host attribute
|
||||||
|
------------------------------
|
||||||
|
There is now a new module endpoint atribute called jam_host
|
||||||
|
attribute: jam_host: boolean=0/1
|
||||||
|
This attribute and accompanying code is only included if the
|
||||||
|
Kconfig parameter TCM_QLA2XXX_DEBUG is set to Y
|
||||||
|
By default this jammer code and functionality is disabled
|
||||||
|
|
||||||
|
Use this attribute to control the discarding of SCSI commands to a
|
||||||
|
selected host.
|
||||||
|
This may be useful for testing error handling and simulating slow drain
|
||||||
|
and other fabric issues.
|
||||||
|
|
||||||
|
Setting a boolean of 1 for the jam_host attribute for a particular host
|
||||||
|
will discard the commands for that host.
|
||||||
|
Reset back to 0 to stop the jamming.
|
||||||
|
|
||||||
|
Enable host 4 to be jammed
|
||||||
|
echo 1 > /sys/kernel/config/target/qla2xxx/21:00:00:24:ff:27:8f:ae/tpgt_1/attrib/jam_host
|
||||||
|
|
||||||
|
Disable jamming on host 4
|
||||||
|
echo 0 > /sys/kernel/config/target/qla2xxx/21:00:00:24:ff:27:8f:ae/tpgt_1/attrib/jam_host
|
|
@ -294,8 +294,6 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
|
||||||
buf += " .tpg_check_prod_mode_write_protect = " + fabric_mod_name + "_check_false,\n"
|
buf += " .tpg_check_prod_mode_write_protect = " + fabric_mod_name + "_check_false,\n"
|
||||||
buf += " .tpg_get_inst_index = " + fabric_mod_name + "_tpg_get_inst_index,\n"
|
buf += " .tpg_get_inst_index = " + fabric_mod_name + "_tpg_get_inst_index,\n"
|
||||||
buf += " .release_cmd = " + fabric_mod_name + "_release_cmd,\n"
|
buf += " .release_cmd = " + fabric_mod_name + "_release_cmd,\n"
|
||||||
buf += " .shutdown_session = " + fabric_mod_name + "_shutdown_session,\n"
|
|
||||||
buf += " .close_session = " + fabric_mod_name + "_close_session,\n"
|
|
||||||
buf += " .sess_get_index = " + fabric_mod_name + "_sess_get_index,\n"
|
buf += " .sess_get_index = " + fabric_mod_name + "_sess_get_index,\n"
|
||||||
buf += " .sess_get_initiator_sid = NULL,\n"
|
buf += " .sess_get_initiator_sid = NULL,\n"
|
||||||
buf += " .write_pending = " + fabric_mod_name + "_write_pending,\n"
|
buf += " .write_pending = " + fabric_mod_name + "_write_pending,\n"
|
||||||
|
@ -467,20 +465,6 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
|
||||||
buf += "}\n\n"
|
buf += "}\n\n"
|
||||||
bufi += "void " + fabric_mod_name + "_release_cmd(struct se_cmd *);\n"
|
bufi += "void " + fabric_mod_name + "_release_cmd(struct se_cmd *);\n"
|
||||||
|
|
||||||
if re.search('shutdown_session\)\(', fo):
|
|
||||||
buf += "int " + fabric_mod_name + "_shutdown_session(struct se_session *se_sess)\n"
|
|
||||||
buf += "{\n"
|
|
||||||
buf += " return 0;\n"
|
|
||||||
buf += "}\n\n"
|
|
||||||
bufi += "int " + fabric_mod_name + "_shutdown_session(struct se_session *);\n"
|
|
||||||
|
|
||||||
if re.search('close_session\)\(', fo):
|
|
||||||
buf += "void " + fabric_mod_name + "_close_session(struct se_session *se_sess)\n"
|
|
||||||
buf += "{\n"
|
|
||||||
buf += " return;\n"
|
|
||||||
buf += "}\n\n"
|
|
||||||
bufi += "void " + fabric_mod_name + "_close_session(struct se_session *);\n"
|
|
||||||
|
|
||||||
if re.search('sess_get_index\)\(', fo):
|
if re.search('sess_get_index\)\(', fo):
|
||||||
buf += "u32 " + fabric_mod_name + "_sess_get_index(struct se_session *se_sess)\n"
|
buf += "u32 " + fabric_mod_name + "_sess_get_index(struct se_session *se_sess)\n"
|
||||||
buf += "{\n"
|
buf += "{\n"
|
||||||
|
|
33
MAINTAINERS
33
MAINTAINERS
|
@ -2304,7 +2304,7 @@ BCACHE (BLOCK LAYER CACHE)
|
||||||
M: Kent Overstreet <kent.overstreet@gmail.com>
|
M: Kent Overstreet <kent.overstreet@gmail.com>
|
||||||
L: linux-bcache@vger.kernel.org
|
L: linux-bcache@vger.kernel.org
|
||||||
W: http://bcache.evilpiepirate.org
|
W: http://bcache.evilpiepirate.org
|
||||||
S: Maintained
|
S: Orphan
|
||||||
F: drivers/md/bcache/
|
F: drivers/md/bcache/
|
||||||
|
|
||||||
BDISP ST MEDIA DRIVER
|
BDISP ST MEDIA DRIVER
|
||||||
|
@ -2505,6 +2505,7 @@ M: Hauke Mehrtens <hauke@hauke-m.de>
|
||||||
M: Rafał Miłecki <zajec5@gmail.com>
|
M: Rafał Miłecki <zajec5@gmail.com>
|
||||||
L: linux-mips@linux-mips.org
|
L: linux-mips@linux-mips.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
F: Documentation/devicetree/bindings/mips/brcm/
|
||||||
F: arch/mips/bcm47xx/*
|
F: arch/mips/bcm47xx/*
|
||||||
F: arch/mips/include/asm/mach-bcm47xx/*
|
F: arch/mips/include/asm/mach-bcm47xx/*
|
||||||
|
|
||||||
|
@ -5308,6 +5309,13 @@ F: drivers/block/cciss*
|
||||||
F: include/linux/cciss_ioctl.h
|
F: include/linux/cciss_ioctl.h
|
||||||
F: include/uapi/linux/cciss_ioctl.h
|
F: include/uapi/linux/cciss_ioctl.h
|
||||||
|
|
||||||
|
HFI1 DRIVER
|
||||||
|
M: Mike Marciniszyn <mike.marciniszyn@intel.com>
|
||||||
|
M: Dennis Dalessandro <dennis.dalessandro@intel.com>
|
||||||
|
L: linux-rdma@vger.kernel.org
|
||||||
|
S: Supported
|
||||||
|
F: drivers/infiniband/hw/hfi1
|
||||||
|
|
||||||
HFS FILESYSTEM
|
HFS FILESYSTEM
|
||||||
L: linux-fsdevel@vger.kernel.org
|
L: linux-fsdevel@vger.kernel.org
|
||||||
S: Orphan
|
S: Orphan
|
||||||
|
@ -5837,7 +5845,6 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git
|
||||||
S: Supported
|
S: Supported
|
||||||
F: Documentation/infiniband/
|
F: Documentation/infiniband/
|
||||||
F: drivers/infiniband/
|
F: drivers/infiniband/
|
||||||
F: drivers/staging/rdma/
|
|
||||||
F: include/uapi/linux/if_infiniband.h
|
F: include/uapi/linux/if_infiniband.h
|
||||||
F: include/uapi/rdma/
|
F: include/uapi/rdma/
|
||||||
F: include/rdma/
|
F: include/rdma/
|
||||||
|
@ -6096,6 +6103,14 @@ S: Maintained
|
||||||
F: arch/x86/include/asm/intel_telemetry.h
|
F: arch/x86/include/asm/intel_telemetry.h
|
||||||
F: drivers/platform/x86/intel_telemetry*
|
F: drivers/platform/x86/intel_telemetry*
|
||||||
|
|
||||||
|
INTEL PMC CORE DRIVER
|
||||||
|
M: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
|
||||||
|
M: Vishwanath Somayaji <vishwanath.somayaji@intel.com>
|
||||||
|
L: platform-driver-x86@vger.kernel.org
|
||||||
|
S: Maintained
|
||||||
|
F: arch/x86/include/asm/pmc_core.h
|
||||||
|
F: drivers/platform/x86/intel_pmc_core*
|
||||||
|
|
||||||
IOC3 ETHERNET DRIVER
|
IOC3 ETHERNET DRIVER
|
||||||
M: Ralf Baechle <ralf@linux-mips.org>
|
M: Ralf Baechle <ralf@linux-mips.org>
|
||||||
L: linux-mips@linux-mips.org
|
L: linux-mips@linux-mips.org
|
||||||
|
@ -6413,8 +6428,9 @@ F: Documentation/kbuild/kconfig-language.txt
|
||||||
F: scripts/kconfig/
|
F: scripts/kconfig/
|
||||||
|
|
||||||
KDUMP
|
KDUMP
|
||||||
M: Vivek Goyal <vgoyal@redhat.com>
|
M: Dave Young <dyoung@redhat.com>
|
||||||
M: Haren Myneni <hbabu@us.ibm.com>
|
M: Baoquan He <bhe@redhat.com>
|
||||||
|
R: Vivek Goyal <vgoyal@redhat.com>
|
||||||
L: kexec@lists.infradead.org
|
L: kexec@lists.infradead.org
|
||||||
W: http://lse.sourceforge.net/kdump/
|
W: http://lse.sourceforge.net/kdump/
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
@ -6560,7 +6576,7 @@ L: kexec@lists.infradead.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: include/linux/kexec.h
|
F: include/linux/kexec.h
|
||||||
F: include/uapi/linux/kexec.h
|
F: include/uapi/linux/kexec.h
|
||||||
F: kernel/kexec.c
|
F: kernel/kexec*
|
||||||
|
|
||||||
KEYS/KEYRINGS:
|
KEYS/KEYRINGS:
|
||||||
M: David Howells <dhowells@redhat.com>
|
M: David Howells <dhowells@redhat.com>
|
||||||
|
@ -7506,6 +7522,7 @@ W: http://www.linux-mips.org/
|
||||||
T: git git://git.linux-mips.org/pub/scm/ralf/linux.git
|
T: git git://git.linux-mips.org/pub/scm/ralf/linux.git
|
||||||
Q: http://patchwork.linux-mips.org/project/linux-mips/list/
|
Q: http://patchwork.linux-mips.org/project/linux-mips/list/
|
||||||
S: Supported
|
S: Supported
|
||||||
|
F: Documentation/devicetree/bindings/mips/
|
||||||
F: Documentation/mips/
|
F: Documentation/mips/
|
||||||
F: arch/mips/
|
F: arch/mips/
|
||||||
|
|
||||||
|
@ -10911,12 +10928,6 @@ M: Arnaud Patard <arnaud.patard@rtp-net.org>
|
||||||
S: Odd Fixes
|
S: Odd Fixes
|
||||||
F: drivers/staging/xgifb/
|
F: drivers/staging/xgifb/
|
||||||
|
|
||||||
HFI1 DRIVER
|
|
||||||
M: Mike Marciniszyn <infinipath@intel.com>
|
|
||||||
L: linux-rdma@vger.kernel.org
|
|
||||||
S: Supported
|
|
||||||
F: drivers/staging/rdma/hfi1
|
|
||||||
|
|
||||||
STARFIRE/DURALAN NETWORK DRIVER
|
STARFIRE/DURALAN NETWORK DRIVER
|
||||||
M: Ion Badulescu <ionut@badula.org>
|
M: Ion Badulescu <ionut@badula.org>
|
||||||
S: Odd Fixes
|
S: Odd Fixes
|
||||||
|
|
6
Makefile
6
Makefile
|
@ -1,8 +1,8 @@
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 6
|
PATCHLEVEL = 7
|
||||||
SUBLEVEL = 0
|
SUBLEVEL = 0
|
||||||
EXTRAVERSION =
|
EXTRAVERSION = -rc1
|
||||||
NAME = Charred Weasel
|
NAME = Psychotic Stoned Sheep
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
# To see a list of typical targets execute "make help"
|
# To see a list of typical targets execute "make help"
|
||||||
|
|
|
@ -598,6 +598,14 @@ config HAVE_STACK_VALIDATION
|
||||||
Architecture supports the 'objtool check' host tool command, which
|
Architecture supports the 'objtool check' host tool command, which
|
||||||
performs compile-time stack metadata validation.
|
performs compile-time stack metadata validation.
|
||||||
|
|
||||||
|
config HAVE_ARCH_HASH
|
||||||
|
bool
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
If this is set, the architecture provides an <asm/hash.h>
|
||||||
|
file which provides platform-specific implementations of some
|
||||||
|
functions in <linux/hash.h> or fs/namei.c.
|
||||||
|
|
||||||
#
|
#
|
||||||
# ABI hall of shame
|
# ABI hall of shame
|
||||||
#
|
#
|
||||||
|
|
|
@ -169,6 +169,7 @@ void __hyp_text __vgic_v3_save_state(struct kvm_vcpu *vcpu)
|
||||||
* Make sure stores to the GIC via the memory mapped interface
|
* Make sure stores to the GIC via the memory mapped interface
|
||||||
* are now visible to the system register interface.
|
* are now visible to the system register interface.
|
||||||
*/
|
*/
|
||||||
|
if (!cpu_if->vgic_sre)
|
||||||
dsb(st);
|
dsb(st);
|
||||||
|
|
||||||
cpu_if->vgic_vmcr = read_gicreg(ICH_VMCR_EL2);
|
cpu_if->vgic_vmcr = read_gicreg(ICH_VMCR_EL2);
|
||||||
|
@ -190,12 +191,11 @@ void __hyp_text __vgic_v3_save_state(struct kvm_vcpu *vcpu)
|
||||||
if (!(vcpu->arch.vgic_cpu.live_lrs & (1UL << i)))
|
if (!(vcpu->arch.vgic_cpu.live_lrs & (1UL << i)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (cpu_if->vgic_elrsr & (1 << i)) {
|
if (cpu_if->vgic_elrsr & (1 << i))
|
||||||
cpu_if->vgic_lr[i] &= ~ICH_LR_STATE;
|
cpu_if->vgic_lr[i] &= ~ICH_LR_STATE;
|
||||||
continue;
|
else
|
||||||
}
|
|
||||||
|
|
||||||
cpu_if->vgic_lr[i] = __gic_v3_get_lr(i);
|
cpu_if->vgic_lr[i] = __gic_v3_get_lr(i);
|
||||||
|
|
||||||
__gic_v3_set_lr(0, i);
|
__gic_v3_set_lr(0, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -236,9 +236,13 @@ void __hyp_text __vgic_v3_save_state(struct kvm_vcpu *vcpu)
|
||||||
|
|
||||||
val = read_gicreg(ICC_SRE_EL2);
|
val = read_gicreg(ICC_SRE_EL2);
|
||||||
write_gicreg(val | ICC_SRE_EL2_ENABLE, ICC_SRE_EL2);
|
write_gicreg(val | ICC_SRE_EL2_ENABLE, ICC_SRE_EL2);
|
||||||
isb(); /* Make sure ENABLE is set at EL2 before setting SRE at EL1 */
|
|
||||||
|
if (!cpu_if->vgic_sre) {
|
||||||
|
/* Make sure ENABLE is set at EL2 before setting SRE at EL1 */
|
||||||
|
isb();
|
||||||
write_gicreg(1, ICC_SRE_EL1);
|
write_gicreg(1, ICC_SRE_EL1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void __hyp_text __vgic_v3_restore_state(struct kvm_vcpu *vcpu)
|
void __hyp_text __vgic_v3_restore_state(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
|
@ -256,8 +260,10 @@ void __hyp_text __vgic_v3_restore_state(struct kvm_vcpu *vcpu)
|
||||||
* been actually programmed with the value we want before
|
* been actually programmed with the value we want before
|
||||||
* starting to mess with the rest of the GIC.
|
* starting to mess with the rest of the GIC.
|
||||||
*/
|
*/
|
||||||
write_gicreg(cpu_if->vgic_sre, ICC_SRE_EL1);
|
if (!cpu_if->vgic_sre) {
|
||||||
|
write_gicreg(0, ICC_SRE_EL1);
|
||||||
isb();
|
isb();
|
||||||
|
}
|
||||||
|
|
||||||
val = read_gicreg(ICH_VTR_EL2);
|
val = read_gicreg(ICH_VTR_EL2);
|
||||||
max_lr_idx = vtr_to_max_lr_idx(val);
|
max_lr_idx = vtr_to_max_lr_idx(val);
|
||||||
|
@ -306,19 +312,19 @@ void __hyp_text __vgic_v3_restore_state(struct kvm_vcpu *vcpu)
|
||||||
* (re)distributors. This ensure the guest will read the
|
* (re)distributors. This ensure the guest will read the
|
||||||
* correct values from the memory-mapped interface.
|
* correct values from the memory-mapped interface.
|
||||||
*/
|
*/
|
||||||
|
if (!cpu_if->vgic_sre) {
|
||||||
isb();
|
isb();
|
||||||
dsb(sy);
|
dsb(sy);
|
||||||
|
}
|
||||||
vcpu->arch.vgic_cpu.live_lrs = live_lrs;
|
vcpu->arch.vgic_cpu.live_lrs = live_lrs;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prevent the guest from touching the GIC system registers if
|
* Prevent the guest from touching the GIC system registers if
|
||||||
* SRE isn't enabled for GICv3 emulation.
|
* SRE isn't enabled for GICv3 emulation.
|
||||||
*/
|
*/
|
||||||
if (!cpu_if->vgic_sre) {
|
|
||||||
write_gicreg(read_gicreg(ICC_SRE_EL2) & ~ICC_SRE_EL2_ENABLE,
|
write_gicreg(read_gicreg(ICC_SRE_EL2) & ~ICC_SRE_EL2_ENABLE,
|
||||||
ICC_SRE_EL2);
|
ICC_SRE_EL2);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void __hyp_text __vgic_v3_init_lrs(void)
|
void __hyp_text __vgic_v3_init_lrs(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -134,6 +134,17 @@ static bool access_gic_sgi(struct kvm_vcpu *vcpu,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool access_gic_sre(struct kvm_vcpu *vcpu,
|
||||||
|
struct sys_reg_params *p,
|
||||||
|
const struct sys_reg_desc *r)
|
||||||
|
{
|
||||||
|
if (p->is_write)
|
||||||
|
return ignore_write(vcpu, p);
|
||||||
|
|
||||||
|
p->regval = vcpu->arch.vgic_cpu.vgic_v3.vgic_sre;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
static bool trap_raz_wi(struct kvm_vcpu *vcpu,
|
static bool trap_raz_wi(struct kvm_vcpu *vcpu,
|
||||||
struct sys_reg_params *p,
|
struct sys_reg_params *p,
|
||||||
const struct sys_reg_desc *r)
|
const struct sys_reg_desc *r)
|
||||||
|
@ -958,7 +969,7 @@ static const struct sys_reg_desc sys_reg_descs[] = {
|
||||||
access_gic_sgi },
|
access_gic_sgi },
|
||||||
/* ICC_SRE_EL1 */
|
/* ICC_SRE_EL1 */
|
||||||
{ Op0(0b11), Op1(0b000), CRn(0b1100), CRm(0b1100), Op2(0b101),
|
{ Op0(0b11), Op1(0b000), CRn(0b1100), CRm(0b1100), Op2(0b101),
|
||||||
trap_raz_wi },
|
access_gic_sre },
|
||||||
|
|
||||||
/* CONTEXTIDR_EL1 */
|
/* CONTEXTIDR_EL1 */
|
||||||
{ Op0(0b11), Op1(0b000), CRn(0b1101), CRm(0b0000), Op2(0b001),
|
{ Op0(0b11), Op1(0b000), CRn(0b1101), CRm(0b0000), Op2(0b001),
|
||||||
|
|
|
@ -20,6 +20,7 @@ config H8300
|
||||||
select HAVE_KERNEL_GZIP
|
select HAVE_KERNEL_GZIP
|
||||||
select HAVE_KERNEL_LZO
|
select HAVE_KERNEL_LZO
|
||||||
select HAVE_ARCH_KGDB
|
select HAVE_ARCH_KGDB
|
||||||
|
select HAVE_ARCH_HASH
|
||||||
select CPU_NO_EFFICIENT_FFS
|
select CPU_NO_EFFICIENT_FFS
|
||||||
|
|
||||||
config RWSEM_GENERIC_SPINLOCK
|
config RWSEM_GENERIC_SPINLOCK
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
#ifndef _ASM_HASH_H
|
||||||
|
#define _ASM_HASH_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The later H8SX models have a 32x32-bit multiply, but the H8/300H
|
||||||
|
* and H8S have only 16x16->32. Since it's tolerably compact, this is
|
||||||
|
* basically an inlined version of the __mulsi3 code. Since the inputs
|
||||||
|
* are not expected to be small, it's also simplfied by skipping the
|
||||||
|
* early-out checks.
|
||||||
|
*
|
||||||
|
* (Since neither CPU has any multi-bit shift instructions, a
|
||||||
|
* shift-and-add version is a non-starter.)
|
||||||
|
*
|
||||||
|
* TODO: come up with an arch-specific version of the hashing in fs/namei.c,
|
||||||
|
* since that is heavily dependent on rotates. Which, as mentioned, suck
|
||||||
|
* horribly on H8.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(CONFIG_CPU_H300H) || defined(CONFIG_CPU_H8S)
|
||||||
|
|
||||||
|
#define HAVE_ARCH__HASH_32 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Multiply by k = 0x61C88647. Fitting this into three registers requires
|
||||||
|
* one extra instruction, but reducing register pressure will probably
|
||||||
|
* make that back and then some.
|
||||||
|
*
|
||||||
|
* GCC asm note: %e1 is the high half of operand %1, while %f1 is the
|
||||||
|
* low half. So if %1 is er4, then %e1 is e4 and %f1 is r4.
|
||||||
|
*
|
||||||
|
* This has been designed to modify x in place, since that's the most
|
||||||
|
* common usage, but preserve k, since hash_64() makes two calls in
|
||||||
|
* quick succession.
|
||||||
|
*/
|
||||||
|
static inline u32 __attribute_const__ __hash_32(u32 x)
|
||||||
|
{
|
||||||
|
u32 temp;
|
||||||
|
|
||||||
|
asm( "mov.w %e1,%f0"
|
||||||
|
"\n mulxu.w %f2,%0" /* klow * xhigh */
|
||||||
|
"\n mov.w %f0,%e1" /* The extra instruction */
|
||||||
|
"\n mov.w %f1,%f0"
|
||||||
|
"\n mulxu.w %e2,%0" /* khigh * xlow */
|
||||||
|
"\n add.w %e1,%f0"
|
||||||
|
"\n mulxu.w %f2,%1" /* klow * xlow */
|
||||||
|
"\n add.w %f0,%e1"
|
||||||
|
: "=&r" (temp), "=r" (x)
|
||||||
|
: "%r" (GOLDEN_RATIO_32), "1" (x));
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif /* _ASM_HASH_H */
|
|
@ -41,6 +41,7 @@ config M68000
|
||||||
select CPU_HAS_NO_UNALIGNED
|
select CPU_HAS_NO_UNALIGNED
|
||||||
select GENERIC_CSUM
|
select GENERIC_CSUM
|
||||||
select CPU_NO_EFFICIENT_FFS
|
select CPU_NO_EFFICIENT_FFS
|
||||||
|
select HAVE_ARCH_HASH
|
||||||
help
|
help
|
||||||
The Freescale (was Motorola) 68000 CPU is the first generation of
|
The Freescale (was Motorola) 68000 CPU is the first generation of
|
||||||
the well known M68K family of processors. The CPU core as well as
|
the well known M68K family of processors. The CPU core as well as
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
#ifndef _ASM_HASH_H
|
||||||
|
#define _ASM_HASH_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If CONFIG_M68000=y (original mc68000/010), this file is #included
|
||||||
|
* to work around the lack of a MULU.L instruction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define HAVE_ARCH__HASH_32 1
|
||||||
|
/*
|
||||||
|
* While it would be legal to substitute a different hash operation
|
||||||
|
* entirely, let's keep it simple and just use an optimized multiply
|
||||||
|
* by GOLDEN_RATIO_32 = 0x61C88647.
|
||||||
|
*
|
||||||
|
* The best way to do that appears to be to multiply by 0x8647 with
|
||||||
|
* shifts and adds, and use mulu.w to multiply the high half by 0x61C8.
|
||||||
|
*
|
||||||
|
* Because the 68000 has multi-cycle shifts, this addition chain is
|
||||||
|
* chosen to minimise the shift distances.
|
||||||
|
*
|
||||||
|
* Despite every attempt to spoon-feed it simple operations, GCC
|
||||||
|
* 6.1.1 doggedly insists on doing annoying things like converting
|
||||||
|
* "lsl.l #2,<reg>" (12 cycles) to two adds (8+8 cycles).
|
||||||
|
*
|
||||||
|
* It also likes to notice two shifts in a row, like "a = x << 2" and
|
||||||
|
* "a <<= 7", and convert that to "a = x << 9". But shifts longer
|
||||||
|
* than 8 bits are extra-slow on m68k, so that's a lose.
|
||||||
|
*
|
||||||
|
* Since the 68000 is a very simple in-order processor with no
|
||||||
|
* instruction scheduling effects on execution time, we can safely
|
||||||
|
* take it out of GCC's hands and write one big asm() block.
|
||||||
|
*
|
||||||
|
* Without calling overhead, this operation is 30 bytes (14 instructions
|
||||||
|
* plus one immediate constant) and 166 cycles.
|
||||||
|
*
|
||||||
|
* (Because %2 is fetched twice, it can't be postincrement, and thus it
|
||||||
|
* can't be a fully general "g" or "m". Register is preferred, but
|
||||||
|
* offsettable memory or immediate will work.)
|
||||||
|
*/
|
||||||
|
static inline u32 __attribute_const__ __hash_32(u32 x)
|
||||||
|
{
|
||||||
|
u32 a, b;
|
||||||
|
|
||||||
|
asm( "move.l %2,%0" /* a = x * 0x0001 */
|
||||||
|
"\n lsl.l #2,%0" /* a = x * 0x0004 */
|
||||||
|
"\n move.l %0,%1"
|
||||||
|
"\n lsl.l #7,%0" /* a = x * 0x0200 */
|
||||||
|
"\n add.l %2,%0" /* a = x * 0x0201 */
|
||||||
|
"\n add.l %0,%1" /* b = x * 0x0205 */
|
||||||
|
"\n add.l %0,%0" /* a = x * 0x0402 */
|
||||||
|
"\n add.l %0,%1" /* b = x * 0x0607 */
|
||||||
|
"\n lsl.l #5,%0" /* a = x * 0x8040 */
|
||||||
|
: "=&d,d" (a), "=&r,r" (b)
|
||||||
|
: "r,roi?" (x)); /* a+b = x*0x8647 */
|
||||||
|
|
||||||
|
return ((u16)(x*0x61c8) << 16) + a + b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* _ASM_HASH_H */
|
|
@ -16,6 +16,7 @@ config MICROBLAZE
|
||||||
select GENERIC_IRQ_SHOW
|
select GENERIC_IRQ_SHOW
|
||||||
select GENERIC_PCI_IOMAP
|
select GENERIC_PCI_IOMAP
|
||||||
select GENERIC_SCHED_CLOCK
|
select GENERIC_SCHED_CLOCK
|
||||||
|
select HAVE_ARCH_HASH
|
||||||
select HAVE_ARCH_KGDB
|
select HAVE_ARCH_KGDB
|
||||||
select HAVE_DEBUG_KMEMLEAK
|
select HAVE_DEBUG_KMEMLEAK
|
||||||
select HAVE_DMA_API_DEBUG
|
select HAVE_DMA_API_DEBUG
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
#ifndef _ASM_HASH_H
|
||||||
|
#define _ASM_HASH_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Fortunately, most people who want to run Linux on Microblaze enable
|
||||||
|
* both multiplier and barrel shifter, but omitting them is technically
|
||||||
|
* a supported configuration.
|
||||||
|
*
|
||||||
|
* With just a barrel shifter, we can implement an efficient constant
|
||||||
|
* multiply using shifts and adds. GCC can find a 9-step solution, but
|
||||||
|
* this 6-step solution was found by Yevgen Voronenko's implementation
|
||||||
|
* of the Hcub algorithm at http://spiral.ece.cmu.edu/mcm/gen.html.
|
||||||
|
*
|
||||||
|
* That software is really not designed for a single multiplier this large,
|
||||||
|
* but if you run it enough times with different seeds, it'll find several
|
||||||
|
* 6-shift, 6-add sequences for computing x * 0x61C88647. They are all
|
||||||
|
* c = (x << 19) + x;
|
||||||
|
* a = (x << 9) + c;
|
||||||
|
* b = (x << 23) + a;
|
||||||
|
* return (a<<11) + (b<<6) + (c<<3) - b;
|
||||||
|
* with variations on the order of the final add.
|
||||||
|
*
|
||||||
|
* Without even a shifter, it's hopless; any hash function will suck.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL == 0
|
||||||
|
|
||||||
|
#define HAVE_ARCH__HASH_32 1
|
||||||
|
|
||||||
|
/* Multiply by GOLDEN_RATIO_32 = 0x61C88647 */
|
||||||
|
static inline u32 __attribute_const__ __hash_32(u32 a)
|
||||||
|
{
|
||||||
|
#if CONFIG_XILINX_MICROBLAZE0_USE_BARREL
|
||||||
|
unsigned int b, c;
|
||||||
|
|
||||||
|
/* Phase 1: Compute three intermediate values */
|
||||||
|
b = a << 23;
|
||||||
|
c = (a << 19) + a;
|
||||||
|
a = (a << 9) + c;
|
||||||
|
b += a;
|
||||||
|
|
||||||
|
/* Phase 2: Compute (a << 11) + (b << 6) + (c << 3) - b */
|
||||||
|
a <<= 5;
|
||||||
|
a += b; /* (a << 5) + b */
|
||||||
|
a <<= 3;
|
||||||
|
a += c; /* (a << 8) + (b << 3) + c */
|
||||||
|
a <<= 3;
|
||||||
|
return a - b; /* (a << 11) + (b << 6) + (c << 3) - b */
|
||||||
|
#else
|
||||||
|
/*
|
||||||
|
* "This is really going to hurt."
|
||||||
|
*
|
||||||
|
* Without a barrel shifter, left shifts are implemented as
|
||||||
|
* repeated additions, and the best we can do is an optimal
|
||||||
|
* addition-subtraction chain. This one is not known to be
|
||||||
|
* optimal, but at 37 steps, it's decent for a 31-bit multiplier.
|
||||||
|
*
|
||||||
|
* Question: given its size (37*4 = 148 bytes per instance),
|
||||||
|
* and slowness, is this worth having inline?
|
||||||
|
*/
|
||||||
|
unsigned int b, c, d;
|
||||||
|
|
||||||
|
b = a << 4; /* 4 */
|
||||||
|
c = b << 1; /* 1 5 */
|
||||||
|
b += a; /* 1 6 */
|
||||||
|
c += b; /* 1 7 */
|
||||||
|
c <<= 3; /* 3 10 */
|
||||||
|
c -= a; /* 1 11 */
|
||||||
|
d = c << 7; /* 7 18 */
|
||||||
|
d += b; /* 1 19 */
|
||||||
|
d <<= 8; /* 8 27 */
|
||||||
|
d += a; /* 1 28 */
|
||||||
|
d <<= 1; /* 1 29 */
|
||||||
|
d += b; /* 1 30 */
|
||||||
|
d <<= 6; /* 6 36 */
|
||||||
|
return d + c; /* 1 37 total instructions*/
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* !CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL */
|
||||||
|
#endif /* _ASM_HASH_H */
|
|
@ -398,6 +398,7 @@ config MACH_PISTACHIO
|
||||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||||
select SYS_SUPPORTS_MIPS_CPS
|
select SYS_SUPPORTS_MIPS_CPS
|
||||||
select SYS_SUPPORTS_MULTITHREADING
|
select SYS_SUPPORTS_MULTITHREADING
|
||||||
|
select SYS_SUPPORTS_RELOCATABLE
|
||||||
select SYS_SUPPORTS_ZBOOT
|
select SYS_SUPPORTS_ZBOOT
|
||||||
select SYS_HAS_EARLY_PRINTK
|
select SYS_HAS_EARLY_PRINTK
|
||||||
select USE_GENERIC_EARLY_PRINTK_8250
|
select USE_GENERIC_EARLY_PRINTK_8250
|
||||||
|
|
|
@ -5,7 +5,7 @@ / {
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
compatible = "ingenic,jz4740";
|
compatible = "ingenic,jz4740";
|
||||||
|
|
||||||
cpuintc: interrupt-controller@0 {
|
cpuintc: interrupt-controller {
|
||||||
#address-cells = <0>;
|
#address-cells = <0>;
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
interrupt-controller;
|
interrupt-controller;
|
||||||
|
|
|
@ -9,7 +9,7 @@ cpu@0 {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
cpuintc: cpuintc@0 {
|
cpuintc: cpuintc {
|
||||||
#address-cells = <0>;
|
#address-cells = <0>;
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
interrupt-controller;
|
interrupt-controller;
|
||||||
|
|
|
@ -9,7 +9,7 @@ cpu@0 {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
cpuintc: cpuintc@0 {
|
cpuintc: cpuintc {
|
||||||
#address-cells = <0>;
|
#address-cells = <0>;
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
interrupt-controller;
|
interrupt-controller;
|
||||||
|
|
|
@ -9,7 +9,7 @@ cpu@0 {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
cpuintc: cpuintc@0 {
|
cpuintc: cpuintc {
|
||||||
#address-cells = <0>;
|
#address-cells = <0>;
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
interrupt-controller;
|
interrupt-controller;
|
||||||
|
|
|
@ -9,7 +9,7 @@ cpu@0 {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
cpuintc: cpuintc@0 {
|
cpuintc: cpuintc {
|
||||||
#address-cells = <0>;
|
#address-cells = <0>;
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
interrupt-controller;
|
interrupt-controller;
|
||||||
|
|
|
@ -10,7 +10,7 @@ memory {
|
||||||
reg = <0x0 0x08000000>;
|
reg = <0x0 0x08000000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpuintc: interrupt-controller@0 {
|
cpuintc: interrupt-controller {
|
||||||
#address-cells = <0>;
|
#address-cells = <0>;
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
interrupt-controller;
|
interrupt-controller;
|
||||||
|
|
|
@ -384,7 +384,7 @@ static int octeon_cpu_callback(struct notifier_block *nfb,
|
||||||
{
|
{
|
||||||
unsigned int cpu = (unsigned long)hcpu;
|
unsigned int cpu = (unsigned long)hcpu;
|
||||||
|
|
||||||
switch (action) {
|
switch (action & ~CPU_TASKS_FROZEN) {
|
||||||
case CPU_UP_PREPARE:
|
case CPU_UP_PREPARE:
|
||||||
octeon_update_boot_vector(cpu);
|
octeon_update_boot_vector(cpu);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -19,6 +19,28 @@
|
||||||
#include <asm/asmmacro-64.h>
|
#include <asm/asmmacro-64.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Helper macros for generating raw instruction encodings.
|
||||||
|
*/
|
||||||
|
#ifdef CONFIG_CPU_MICROMIPS
|
||||||
|
.macro insn32_if_mm enc
|
||||||
|
.insn
|
||||||
|
.hword ((\enc) >> 16)
|
||||||
|
.hword ((\enc) & 0xffff)
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro insn_if_mips enc
|
||||||
|
.endm
|
||||||
|
#else
|
||||||
|
.macro insn32_if_mm enc
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro insn_if_mips enc
|
||||||
|
.insn
|
||||||
|
.word (\enc)
|
||||||
|
.endm
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6)
|
#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6)
|
||||||
.macro local_irq_enable reg=t0
|
.macro local_irq_enable reg=t0
|
||||||
ei
|
ei
|
||||||
|
@ -341,38 +363,6 @@
|
||||||
.endm
|
.endm
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifdef CONFIG_CPU_MICROMIPS
|
|
||||||
#define CFC_MSA_INSN 0x587e0056
|
|
||||||
#define CTC_MSA_INSN 0x583e0816
|
|
||||||
#define LDB_MSA_INSN 0x58000807
|
|
||||||
#define LDH_MSA_INSN 0x58000817
|
|
||||||
#define LDW_MSA_INSN 0x58000827
|
|
||||||
#define LDD_MSA_INSN 0x58000837
|
|
||||||
#define STB_MSA_INSN 0x5800080f
|
|
||||||
#define STH_MSA_INSN 0x5800081f
|
|
||||||
#define STW_MSA_INSN 0x5800082f
|
|
||||||
#define STD_MSA_INSN 0x5800083f
|
|
||||||
#define COPY_SW_MSA_INSN 0x58b00056
|
|
||||||
#define COPY_SD_MSA_INSN 0x58b80056
|
|
||||||
#define INSERT_W_MSA_INSN 0x59300816
|
|
||||||
#define INSERT_D_MSA_INSN 0x59380816
|
|
||||||
#else
|
|
||||||
#define CFC_MSA_INSN 0x787e0059
|
|
||||||
#define CTC_MSA_INSN 0x783e0819
|
|
||||||
#define LDB_MSA_INSN 0x78000820
|
|
||||||
#define LDH_MSA_INSN 0x78000821
|
|
||||||
#define LDW_MSA_INSN 0x78000822
|
|
||||||
#define LDD_MSA_INSN 0x78000823
|
|
||||||
#define STB_MSA_INSN 0x78000824
|
|
||||||
#define STH_MSA_INSN 0x78000825
|
|
||||||
#define STW_MSA_INSN 0x78000826
|
|
||||||
#define STD_MSA_INSN 0x78000827
|
|
||||||
#define COPY_SW_MSA_INSN 0x78b00059
|
|
||||||
#define COPY_SD_MSA_INSN 0x78b80059
|
|
||||||
#define INSERT_W_MSA_INSN 0x79300819
|
|
||||||
#define INSERT_D_MSA_INSN 0x79380819
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Temporary until all toolchains in use include MSA support.
|
* Temporary until all toolchains in use include MSA support.
|
||||||
*/
|
*/
|
||||||
|
@ -380,8 +370,8 @@
|
||||||
.set push
|
.set push
|
||||||
.set noat
|
.set noat
|
||||||
SET_HARDFLOAT
|
SET_HARDFLOAT
|
||||||
.insn
|
insn_if_mips 0x787e0059 | (\cs << 11)
|
||||||
.word CFC_MSA_INSN | (\cs << 11)
|
insn32_if_mm 0x587e0056 | (\cs << 11)
|
||||||
move \rd, $1
|
move \rd, $1
|
||||||
.set pop
|
.set pop
|
||||||
.endm
|
.endm
|
||||||
|
@ -391,7 +381,8 @@
|
||||||
.set noat
|
.set noat
|
||||||
SET_HARDFLOAT
|
SET_HARDFLOAT
|
||||||
move $1, \rs
|
move $1, \rs
|
||||||
.word CTC_MSA_INSN | (\cd << 6)
|
insn_if_mips 0x783e0819 | (\cd << 6)
|
||||||
|
insn32_if_mm 0x583e0816 | (\cd << 6)
|
||||||
.set pop
|
.set pop
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -400,7 +391,8 @@
|
||||||
.set noat
|
.set noat
|
||||||
SET_HARDFLOAT
|
SET_HARDFLOAT
|
||||||
PTR_ADDU $1, \base, \off
|
PTR_ADDU $1, \base, \off
|
||||||
.word LDB_MSA_INSN | (\wd << 6)
|
insn_if_mips 0x78000820 | (\wd << 6)
|
||||||
|
insn32_if_mm 0x58000807 | (\wd << 6)
|
||||||
.set pop
|
.set pop
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -409,7 +401,8 @@
|
||||||
.set noat
|
.set noat
|
||||||
SET_HARDFLOAT
|
SET_HARDFLOAT
|
||||||
PTR_ADDU $1, \base, \off
|
PTR_ADDU $1, \base, \off
|
||||||
.word LDH_MSA_INSN | (\wd << 6)
|
insn_if_mips 0x78000821 | (\wd << 6)
|
||||||
|
insn32_if_mm 0x58000817 | (\wd << 6)
|
||||||
.set pop
|
.set pop
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -418,7 +411,8 @@
|
||||||
.set noat
|
.set noat
|
||||||
SET_HARDFLOAT
|
SET_HARDFLOAT
|
||||||
PTR_ADDU $1, \base, \off
|
PTR_ADDU $1, \base, \off
|
||||||
.word LDW_MSA_INSN | (\wd << 6)
|
insn_if_mips 0x78000822 | (\wd << 6)
|
||||||
|
insn32_if_mm 0x58000827 | (\wd << 6)
|
||||||
.set pop
|
.set pop
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -427,7 +421,8 @@
|
||||||
.set noat
|
.set noat
|
||||||
SET_HARDFLOAT
|
SET_HARDFLOAT
|
||||||
PTR_ADDU $1, \base, \off
|
PTR_ADDU $1, \base, \off
|
||||||
.word LDD_MSA_INSN | (\wd << 6)
|
insn_if_mips 0x78000823 | (\wd << 6)
|
||||||
|
insn32_if_mm 0x58000837 | (\wd << 6)
|
||||||
.set pop
|
.set pop
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -436,7 +431,8 @@
|
||||||
.set noat
|
.set noat
|
||||||
SET_HARDFLOAT
|
SET_HARDFLOAT
|
||||||
PTR_ADDU $1, \base, \off
|
PTR_ADDU $1, \base, \off
|
||||||
.word STB_MSA_INSN | (\wd << 6)
|
insn_if_mips 0x78000824 | (\wd << 6)
|
||||||
|
insn32_if_mm 0x5800080f | (\wd << 6)
|
||||||
.set pop
|
.set pop
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -445,7 +441,8 @@
|
||||||
.set noat
|
.set noat
|
||||||
SET_HARDFLOAT
|
SET_HARDFLOAT
|
||||||
PTR_ADDU $1, \base, \off
|
PTR_ADDU $1, \base, \off
|
||||||
.word STH_MSA_INSN | (\wd << 6)
|
insn_if_mips 0x78000825 | (\wd << 6)
|
||||||
|
insn32_if_mm 0x5800081f | (\wd << 6)
|
||||||
.set pop
|
.set pop
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -454,7 +451,8 @@
|
||||||
.set noat
|
.set noat
|
||||||
SET_HARDFLOAT
|
SET_HARDFLOAT
|
||||||
PTR_ADDU $1, \base, \off
|
PTR_ADDU $1, \base, \off
|
||||||
.word STW_MSA_INSN | (\wd << 6)
|
insn_if_mips 0x78000826 | (\wd << 6)
|
||||||
|
insn32_if_mm 0x5800082f | (\wd << 6)
|
||||||
.set pop
|
.set pop
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -463,7 +461,8 @@
|
||||||
.set noat
|
.set noat
|
||||||
SET_HARDFLOAT
|
SET_HARDFLOAT
|
||||||
PTR_ADDU $1, \base, \off
|
PTR_ADDU $1, \base, \off
|
||||||
.word STD_MSA_INSN | (\wd << 6)
|
insn_if_mips 0x78000827 | (\wd << 6)
|
||||||
|
insn32_if_mm 0x5800083f | (\wd << 6)
|
||||||
.set pop
|
.set pop
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -471,8 +470,8 @@
|
||||||
.set push
|
.set push
|
||||||
.set noat
|
.set noat
|
||||||
SET_HARDFLOAT
|
SET_HARDFLOAT
|
||||||
.insn
|
insn_if_mips 0x78b00059 | (\n << 16) | (\ws << 11)
|
||||||
.word COPY_SW_MSA_INSN | (\n << 16) | (\ws << 11)
|
insn32_if_mm 0x58b00056 | (\n << 16) | (\ws << 11)
|
||||||
.set pop
|
.set pop
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -480,8 +479,8 @@
|
||||||
.set push
|
.set push
|
||||||
.set noat
|
.set noat
|
||||||
SET_HARDFLOAT
|
SET_HARDFLOAT
|
||||||
.insn
|
insn_if_mips 0x78b80059 | (\n << 16) | (\ws << 11)
|
||||||
.word COPY_SD_MSA_INSN | (\n << 16) | (\ws << 11)
|
insn32_if_mm 0x58b80056 | (\n << 16) | (\ws << 11)
|
||||||
.set pop
|
.set pop
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -489,7 +488,8 @@
|
||||||
.set push
|
.set push
|
||||||
.set noat
|
.set noat
|
||||||
SET_HARDFLOAT
|
SET_HARDFLOAT
|
||||||
.word INSERT_W_MSA_INSN | (\n << 16) | (\wd << 6)
|
insn_if_mips 0x79300819 | (\n << 16) | (\wd << 6)
|
||||||
|
insn32_if_mm 0x59300816 | (\n << 16) | (\wd << 6)
|
||||||
.set pop
|
.set pop
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -497,7 +497,8 @@
|
||||||
.set push
|
.set push
|
||||||
.set noat
|
.set noat
|
||||||
SET_HARDFLOAT
|
SET_HARDFLOAT
|
||||||
.word INSERT_D_MSA_INSN | (\n << 16) | (\wd << 6)
|
insn_if_mips 0x79380819 | (\n << 16) | (\wd << 6)
|
||||||
|
insn32_if_mm 0x59380816 | (\n << 16) | (\wd << 6)
|
||||||
.set pop
|
.set pop
|
||||||
.endm
|
.endm
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
* address of a label as argument to inline assembler. Gas otoh has the
|
* address of a label as argument to inline assembler. Gas otoh has the
|
||||||
* annoying difference between la and dla which are only usable for 32-bit
|
* annoying difference between la and dla which are only usable for 32-bit
|
||||||
* rsp. 64-bit code, so can't be used without conditional compilation.
|
* rsp. 64-bit code, so can't be used without conditional compilation.
|
||||||
* The alterantive is switching the assembler to 64-bit code which happens
|
* The alternative is switching the assembler to 64-bit code which happens
|
||||||
* to work right even for 32-bit code...
|
* to work right even for 32-bit code...
|
||||||
*/
|
*/
|
||||||
#define instruction_hazard() \
|
#define instruction_hazard() \
|
||||||
|
@ -133,7 +133,7 @@ do { \
|
||||||
* address of a label as argument to inline assembler. Gas otoh has the
|
* address of a label as argument to inline assembler. Gas otoh has the
|
||||||
* annoying difference between la and dla which are only usable for 32-bit
|
* annoying difference between la and dla which are only usable for 32-bit
|
||||||
* rsp. 64-bit code, so can't be used without conditional compilation.
|
* rsp. 64-bit code, so can't be used without conditional compilation.
|
||||||
* The alterantive is switching the assembler to 64-bit code which happens
|
* The alternative is switching the assembler to 64-bit code which happens
|
||||||
* to work right even for 32-bit code...
|
* to work right even for 32-bit code...
|
||||||
*/
|
*/
|
||||||
#define __instruction_hazard() \
|
#define __instruction_hazard() \
|
||||||
|
|
|
@ -100,7 +100,7 @@ typedef volatile struct au1xxx_ddma_desc {
|
||||||
u32 dscr_nxtptr; /* Next descriptor pointer (mostly) */
|
u32 dscr_nxtptr; /* Next descriptor pointer (mostly) */
|
||||||
/*
|
/*
|
||||||
* First 32 bytes are HW specific!!!
|
* First 32 bytes are HW specific!!!
|
||||||
* Lets have some SW data following -- make sure it's 32 bytes.
|
* Let's have some SW data following -- make sure it's 32 bytes.
|
||||||
*/
|
*/
|
||||||
u32 sw_status;
|
u32 sw_status;
|
||||||
u32 sw_context;
|
u32 sw_context;
|
||||||
|
|
|
@ -140,7 +140,7 @@ static inline int au1300_gpio_getinitlvl(unsigned int gpio)
|
||||||
* Cases 1 and 3 are intended for boards which want to provide their own
|
* Cases 1 and 3 are intended for boards which want to provide their own
|
||||||
* GPIO namespace and -operations (i.e. for example you have 8 GPIOs
|
* GPIO namespace and -operations (i.e. for example you have 8 GPIOs
|
||||||
* which are in part provided by spare Au1300 GPIO pins and in part by
|
* which are in part provided by spare Au1300 GPIO pins and in part by
|
||||||
* an external FPGA but you still want them to be accssible in linux
|
* an external FPGA but you still want them to be accessible in linux
|
||||||
* as gpio0-7. The board can of course use the alchemy_gpioX_* functions
|
* as gpio0-7. The board can of course use the alchemy_gpioX_* functions
|
||||||
* as required).
|
* as required).
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -22,7 +22,7 @@ struct bcm63xx_enet_platform_data {
|
||||||
int has_phy_interrupt;
|
int has_phy_interrupt;
|
||||||
int phy_interrupt;
|
int phy_interrupt;
|
||||||
|
|
||||||
/* if has_phy, use autonegociated pause parameters or force
|
/* if has_phy, use autonegotiated pause parameters or force
|
||||||
* them */
|
* them */
|
||||||
int pause_auto;
|
int pause_auto;
|
||||||
int pause_rx;
|
int pause_rx;
|
||||||
|
|
|
@ -64,7 +64,7 @@ static inline void plat_post_dma_flush(struct device *dev)
|
||||||
|
|
||||||
static inline int plat_device_is_coherent(struct device *dev)
|
static inline int plat_device_is_coherent(struct device *dev)
|
||||||
{
|
{
|
||||||
return 1; /* IP27 non-cohernet mode is unsupported */
|
return 1; /* IP27 non-coherent mode is unsupported */
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __ASM_MACH_IP27_DMA_COHERENCE_H */
|
#endif /* __ASM_MACH_IP27_DMA_COHERENCE_H */
|
||||||
|
|
|
@ -86,7 +86,7 @@ static inline void plat_post_dma_flush(struct device *dev)
|
||||||
|
|
||||||
static inline int plat_device_is_coherent(struct device *dev)
|
static inline int plat_device_is_coherent(struct device *dev)
|
||||||
{
|
{
|
||||||
return 0; /* IP32 is non-cohernet */
|
return 0; /* IP32 is non-coherent */
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __ASM_MACH_IP32_DMA_COHERENCE_H */
|
#endif /* __ASM_MACH_IP32_DMA_COHERENCE_H */
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* during early_printk no ioremap possible at this early stage
|
* during early_printk no ioremap possible at this early stage
|
||||||
* lets use KSEG1 instead
|
* let's use KSEG1 instead
|
||||||
*/
|
*/
|
||||||
#define LTQ_ASC0_BASE_ADDR 0x1E100C00
|
#define LTQ_ASC0_BASE_ADDR 0x1E100C00
|
||||||
#define LTQ_EARLY_ASC KSEG1ADDR(LTQ_ASC0_BASE_ADDR)
|
#define LTQ_EARLY_ASC KSEG1ADDR(LTQ_ASC0_BASE_ADDR)
|
||||||
|
|
|
@ -75,7 +75,7 @@ extern __iomem void *ltq_cgu_membase;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* during early_printk no ioremap is possible
|
* during early_printk no ioremap is possible
|
||||||
* lets use KSEG1 instead
|
* let's use KSEG1 instead
|
||||||
*/
|
*/
|
||||||
#define LTQ_ASC1_BASE_ADDR 0x1E100C00
|
#define LTQ_ASC1_BASE_ADDR 0x1E100C00
|
||||||
#define LTQ_EARLY_ASC KSEG1ADDR(LTQ_ASC1_BASE_ADDR)
|
#define LTQ_EARLY_ASC KSEG1ADDR(LTQ_ASC1_BASE_ADDR)
|
||||||
|
|
|
@ -24,7 +24,7 @@ struct temp_range {
|
||||||
u8 level;
|
u8 level;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CONSTANT_SPEED_POLICY 0 /* at constent speed */
|
#define CONSTANT_SPEED_POLICY 0 /* at constant speed */
|
||||||
#define STEP_SPEED_POLICY 1 /* use up/down arrays to describe policy */
|
#define STEP_SPEED_POLICY 1 /* use up/down arrays to describe policy */
|
||||||
#define KERNEL_HELPER_POLICY 2 /* kernel as a helper to fan control */
|
#define KERNEL_HELPER_POLICY 2 /* kernel as a helper to fan control */
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
(0 << MIPS_SEGCFG_PA_SHIFT) | \
|
(0 << MIPS_SEGCFG_PA_SHIFT) | \
|
||||||
(1 << MIPS_SEGCFG_EU_SHIFT)) << 16)
|
(1 << MIPS_SEGCFG_EU_SHIFT)) << 16)
|
||||||
or t0, t2
|
or t0, t2
|
||||||
mtc0 t0, $5, 2
|
mtc0 t0, CP0_SEGCTL0
|
||||||
|
|
||||||
/* SegCtl1 */
|
/* SegCtl1 */
|
||||||
li t0, ((MIPS_SEGCFG_MUSUK << MIPS_SEGCFG_AM_SHIFT) | \
|
li t0, ((MIPS_SEGCFG_MUSUK << MIPS_SEGCFG_AM_SHIFT) | \
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
(0 << MIPS_SEGCFG_PA_SHIFT) | \
|
(0 << MIPS_SEGCFG_PA_SHIFT) | \
|
||||||
(1 << MIPS_SEGCFG_EU_SHIFT)) << 16)
|
(1 << MIPS_SEGCFG_EU_SHIFT)) << 16)
|
||||||
ins t0, t1, 16, 3
|
ins t0, t1, 16, 3
|
||||||
mtc0 t0, $5, 3
|
mtc0 t0, CP0_SEGCTL1
|
||||||
|
|
||||||
/* SegCtl2 */
|
/* SegCtl2 */
|
||||||
li t0, ((MIPS_SEGCFG_MUSUK << MIPS_SEGCFG_AM_SHIFT) | \
|
li t0, ((MIPS_SEGCFG_MUSUK << MIPS_SEGCFG_AM_SHIFT) | \
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
(4 << MIPS_SEGCFG_PA_SHIFT) | \
|
(4 << MIPS_SEGCFG_PA_SHIFT) | \
|
||||||
(1 << MIPS_SEGCFG_EU_SHIFT)) << 16)
|
(1 << MIPS_SEGCFG_EU_SHIFT)) << 16)
|
||||||
or t0, t2
|
or t0, t2
|
||||||
mtc0 t0, $5, 4
|
mtc0 t0, CP0_SEGCTL2
|
||||||
|
|
||||||
jal mips_ihb
|
jal mips_ihb
|
||||||
mfc0 t0, $16, 5
|
mfc0 t0, $16, 5
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Definitions and decalrations for MIPS MT support that are common between
|
* Definitions and declarations for MIPS MT support that are common between
|
||||||
* the VSMP, and AP/SP kernel models.
|
* the VSMP, and AP/SP kernel models.
|
||||||
*/
|
*/
|
||||||
#ifndef __ASM_MIPS_MT_H
|
#ifndef __ASM_MIPS_MT_H
|
||||||
|
|
|
@ -48,6 +48,9 @@
|
||||||
#define CP0_CONF $3
|
#define CP0_CONF $3
|
||||||
#define CP0_CONTEXT $4
|
#define CP0_CONTEXT $4
|
||||||
#define CP0_PAGEMASK $5
|
#define CP0_PAGEMASK $5
|
||||||
|
#define CP0_SEGCTL0 $5, 2
|
||||||
|
#define CP0_SEGCTL1 $5, 3
|
||||||
|
#define CP0_SEGCTL2 $5, 4
|
||||||
#define CP0_WIRED $6
|
#define CP0_WIRED $6
|
||||||
#define CP0_INFO $7
|
#define CP0_INFO $7
|
||||||
#define CP0_HWRENA $7, 0
|
#define CP0_HWRENA $7, 0
|
||||||
|
@ -726,6 +729,8 @@
|
||||||
#define MIPS_PWFIELD_PTEI_SHIFT 0
|
#define MIPS_PWFIELD_PTEI_SHIFT 0
|
||||||
#define MIPS_PWFIELD_PTEI_MASK 0x0000003f
|
#define MIPS_PWFIELD_PTEI_MASK 0x0000003f
|
||||||
|
|
||||||
|
#define MIPS_PWSIZE_PS_SHIFT 30
|
||||||
|
#define MIPS_PWSIZE_PS_MASK 0x40000000
|
||||||
#define MIPS_PWSIZE_GDW_SHIFT 24
|
#define MIPS_PWSIZE_GDW_SHIFT 24
|
||||||
#define MIPS_PWSIZE_GDW_MASK 0x3f000000
|
#define MIPS_PWSIZE_GDW_MASK 0x3f000000
|
||||||
#define MIPS_PWSIZE_UDW_SHIFT 18
|
#define MIPS_PWSIZE_UDW_SHIFT 18
|
||||||
|
@ -739,6 +744,12 @@
|
||||||
|
|
||||||
#define MIPS_PWCTL_PWEN_SHIFT 31
|
#define MIPS_PWCTL_PWEN_SHIFT 31
|
||||||
#define MIPS_PWCTL_PWEN_MASK 0x80000000
|
#define MIPS_PWCTL_PWEN_MASK 0x80000000
|
||||||
|
#define MIPS_PWCTL_XK_SHIFT 28
|
||||||
|
#define MIPS_PWCTL_XK_MASK 0x10000000
|
||||||
|
#define MIPS_PWCTL_XS_SHIFT 27
|
||||||
|
#define MIPS_PWCTL_XS_MASK 0x08000000
|
||||||
|
#define MIPS_PWCTL_XU_SHIFT 26
|
||||||
|
#define MIPS_PWCTL_XU_MASK 0x04000000
|
||||||
#define MIPS_PWCTL_DPH_SHIFT 7
|
#define MIPS_PWCTL_DPH_SHIFT 7
|
||||||
#define MIPS_PWCTL_DPH_MASK 0x00000080
|
#define MIPS_PWCTL_DPH_MASK 0x00000080
|
||||||
#define MIPS_PWCTL_HUGEPG_SHIFT 6
|
#define MIPS_PWCTL_HUGEPG_SHIFT 6
|
||||||
|
@ -1045,6 +1056,33 @@ static inline int mm_insn_16bit(u16 insn)
|
||||||
return (opcode >= 1 && opcode <= 3) ? 1 : 0;
|
return (opcode >= 1 && opcode <= 3) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Helper macros for generating raw instruction encodings in inline asm.
|
||||||
|
*/
|
||||||
|
#ifdef CONFIG_CPU_MICROMIPS
|
||||||
|
#define _ASM_INSN16_IF_MM(_enc) \
|
||||||
|
".insn\n\t" \
|
||||||
|
".hword (" #_enc ")\n\t"
|
||||||
|
#define _ASM_INSN32_IF_MM(_enc) \
|
||||||
|
".insn\n\t" \
|
||||||
|
".hword ((" #_enc ") >> 16)\n\t" \
|
||||||
|
".hword ((" #_enc ") & 0xffff)\n\t"
|
||||||
|
#else
|
||||||
|
#define _ASM_INSN_IF_MIPS(_enc) \
|
||||||
|
".insn\n\t" \
|
||||||
|
".word (" #_enc ")\n\t"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _ASM_INSN16_IF_MM
|
||||||
|
#define _ASM_INSN16_IF_MM(_enc)
|
||||||
|
#endif
|
||||||
|
#ifndef _ASM_INSN32_IF_MM
|
||||||
|
#define _ASM_INSN32_IF_MM(_enc)
|
||||||
|
#endif
|
||||||
|
#ifndef _ASM_INSN_IF_MIPS
|
||||||
|
#define _ASM_INSN_IF_MIPS(_enc)
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TLB Invalidate Flush
|
* TLB Invalidate Flush
|
||||||
*/
|
*/
|
||||||
|
@ -1053,7 +1091,9 @@ static inline void tlbinvf(void)
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
".set push\n\t"
|
".set push\n\t"
|
||||||
".set noreorder\n\t"
|
".set noreorder\n\t"
|
||||||
".word 0x42000004\n\t" /* tlbinvf */
|
"# tlbinvf\n\t"
|
||||||
|
_ASM_INSN_IF_MIPS(0x42000004)
|
||||||
|
_ASM_INSN32_IF_MM(0x0000537c)
|
||||||
".set pop");
|
".set pop");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1274,9 +1314,9 @@ do { \
|
||||||
" .set push \n" \
|
" .set push \n" \
|
||||||
" .set noat \n" \
|
" .set noat \n" \
|
||||||
" .set mips32r2 \n" \
|
" .set mips32r2 \n" \
|
||||||
" .insn \n" \
|
|
||||||
" # mfhc0 $1, %1 \n" \
|
" # mfhc0 $1, %1 \n" \
|
||||||
" .word (0x40410000 | ((%1 & 0x1f) << 11)) \n" \
|
_ASM_INSN_IF_MIPS(0x40410000 | ((%1 & 0x1f) << 11)) \
|
||||||
|
_ASM_INSN32_IF_MM(0x002000f4 | ((%1 & 0x1f) << 16)) \
|
||||||
" move %0, $1 \n" \
|
" move %0, $1 \n" \
|
||||||
" .set pop \n" \
|
" .set pop \n" \
|
||||||
: "=r" (__res) \
|
: "=r" (__res) \
|
||||||
|
@ -1292,8 +1332,8 @@ do { \
|
||||||
" .set mips32r2 \n" \
|
" .set mips32r2 \n" \
|
||||||
" move $1, %0 \n" \
|
" move $1, %0 \n" \
|
||||||
" # mthc0 $1, %1 \n" \
|
" # mthc0 $1, %1 \n" \
|
||||||
" .insn \n" \
|
_ASM_INSN_IF_MIPS(0x40c10000 | ((%1 & 0x1f) << 11)) \
|
||||||
" .word (0x40c10000 | ((%1 & 0x1f) << 11)) \n" \
|
_ASM_INSN32_IF_MM(0x002002f4 | ((%1 & 0x1f) << 16)) \
|
||||||
" .set pop \n" \
|
" .set pop \n" \
|
||||||
: \
|
: \
|
||||||
: "r" (value), "i" (register)); \
|
: "r" (value), "i" (register)); \
|
||||||
|
@ -1743,7 +1783,8 @@ do { \
|
||||||
".set\tpush\n\t" \
|
".set\tpush\n\t" \
|
||||||
".set\tnoat\n\t" \
|
".set\tnoat\n\t" \
|
||||||
"# mfgc0\t$1, $%1, %2\n\t" \
|
"# mfgc0\t$1, $%1, %2\n\t" \
|
||||||
".word\t(0x40610000 | %1 << 11 | %2)\n\t" \
|
_ASM_INSN_IF_MIPS(0x40610000 | %1 << 11 | %2) \
|
||||||
|
_ASM_INSN32_IF_MM(0x002004fc | %1 << 16 | %2 << 11) \
|
||||||
"move\t%0, $1\n\t" \
|
"move\t%0, $1\n\t" \
|
||||||
".set\tpop" \
|
".set\tpop" \
|
||||||
: "=r" (__res) \
|
: "=r" (__res) \
|
||||||
|
@ -1757,7 +1798,8 @@ do { \
|
||||||
".set\tpush\n\t" \
|
".set\tpush\n\t" \
|
||||||
".set\tnoat\n\t" \
|
".set\tnoat\n\t" \
|
||||||
"# dmfgc0\t$1, $%1, %2\n\t" \
|
"# dmfgc0\t$1, $%1, %2\n\t" \
|
||||||
".word\t(0x40610100 | %1 << 11 | %2)\n\t" \
|
_ASM_INSN_IF_MIPS(0x40610100 | %1 << 11 | %2) \
|
||||||
|
_ASM_INSN32_IF_MM(0x582004fc | %1 << 16 | %2 << 11) \
|
||||||
"move\t%0, $1\n\t" \
|
"move\t%0, $1\n\t" \
|
||||||
".set\tpop" \
|
".set\tpop" \
|
||||||
: "=r" (__res) \
|
: "=r" (__res) \
|
||||||
|
@ -1770,9 +1812,10 @@ do { \
|
||||||
__asm__ __volatile__( \
|
__asm__ __volatile__( \
|
||||||
".set\tpush\n\t" \
|
".set\tpush\n\t" \
|
||||||
".set\tnoat\n\t" \
|
".set\tnoat\n\t" \
|
||||||
"move\t$1, %0\n\t" \
|
"move\t$1, %z0\n\t" \
|
||||||
"# mtgc0\t$1, $%1, %2\n\t" \
|
"# mtgc0\t$1, $%1, %2\n\t" \
|
||||||
".word\t(0x40610200 | %1 << 11 | %2)\n\t" \
|
_ASM_INSN_IF_MIPS(0x40610200 | %1 << 11 | %2) \
|
||||||
|
_ASM_INSN32_IF_MM(0x002006fc | %1 << 16 | %2 << 11) \
|
||||||
".set\tpop" \
|
".set\tpop" \
|
||||||
: : "Jr" ((unsigned int)(value)), \
|
: : "Jr" ((unsigned int)(value)), \
|
||||||
"i" (register), "i" (sel)); \
|
"i" (register), "i" (sel)); \
|
||||||
|
@ -1783,9 +1826,10 @@ do { \
|
||||||
__asm__ __volatile__( \
|
__asm__ __volatile__( \
|
||||||
".set\tpush\n\t" \
|
".set\tpush\n\t" \
|
||||||
".set\tnoat\n\t" \
|
".set\tnoat\n\t" \
|
||||||
"move\t$1, %0\n\t" \
|
"move\t$1, %z0\n\t" \
|
||||||
"# dmtgc0\t$1, $%1, %2\n\t" \
|
"# dmtgc0\t$1, $%1, %2\n\t" \
|
||||||
".word\t(0x40610300 | %1 << 11 | %2)\n\t" \
|
_ASM_INSN_IF_MIPS(0x40610300 | %1 << 11 | %2) \
|
||||||
|
_ASM_INSN32_IF_MM(0x582006fc | %1 << 16 | %2 << 11) \
|
||||||
".set\tpop" \
|
".set\tpop" \
|
||||||
: : "Jr" (value), \
|
: : "Jr" (value), \
|
||||||
"i" (register), "i" (sel)); \
|
"i" (register), "i" (sel)); \
|
||||||
|
@ -2246,7 +2290,6 @@ do { \
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifdef CONFIG_CPU_MICROMIPS
|
|
||||||
#define rddsp(mask) \
|
#define rddsp(mask) \
|
||||||
({ \
|
({ \
|
||||||
unsigned int __res; \
|
unsigned int __res; \
|
||||||
|
@ -2255,8 +2298,8 @@ do { \
|
||||||
" .set push \n" \
|
" .set push \n" \
|
||||||
" .set noat \n" \
|
" .set noat \n" \
|
||||||
" # rddsp $1, %x1 \n" \
|
" # rddsp $1, %x1 \n" \
|
||||||
" .hword ((0x0020067c | (%x1 << 14)) >> 16) \n" \
|
_ASM_INSN_IF_MIPS(0x7c000cb8 | (%x1 << 16)) \
|
||||||
" .hword ((0x0020067c | (%x1 << 14)) & 0xffff) \n" \
|
_ASM_INSN32_IF_MM(0x0020067c | (%x1 << 14)) \
|
||||||
" move %0, $1 \n" \
|
" move %0, $1 \n" \
|
||||||
" .set pop \n" \
|
" .set pop \n" \
|
||||||
: "=r" (__res) \
|
: "=r" (__res) \
|
||||||
|
@ -2271,93 +2314,8 @@ do { \
|
||||||
" .set noat \n" \
|
" .set noat \n" \
|
||||||
" move $1, %0 \n" \
|
" move $1, %0 \n" \
|
||||||
" # wrdsp $1, %x1 \n" \
|
" # wrdsp $1, %x1 \n" \
|
||||||
" .hword ((0x0020167c | (%x1 << 14)) >> 16) \n" \
|
_ASM_INSN_IF_MIPS(0x7c2004f8 | (%x1 << 11)) \
|
||||||
" .hword ((0x0020167c | (%x1 << 14)) & 0xffff) \n" \
|
_ASM_INSN32_IF_MM(0x0020167c | (%x1 << 14)) \
|
||||||
" .set pop \n" \
|
|
||||||
: \
|
|
||||||
: "r" (val), "i" (mask)); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define _umips_dsp_mfxxx(ins) \
|
|
||||||
({ \
|
|
||||||
unsigned long __treg; \
|
|
||||||
\
|
|
||||||
__asm__ __volatile__( \
|
|
||||||
" .set push \n" \
|
|
||||||
" .set noat \n" \
|
|
||||||
" .hword 0x0001 \n" \
|
|
||||||
" .hword %x1 \n" \
|
|
||||||
" move %0, $1 \n" \
|
|
||||||
" .set pop \n" \
|
|
||||||
: "=r" (__treg) \
|
|
||||||
: "i" (ins)); \
|
|
||||||
__treg; \
|
|
||||||
})
|
|
||||||
|
|
||||||
#define _umips_dsp_mtxxx(val, ins) \
|
|
||||||
do { \
|
|
||||||
__asm__ __volatile__( \
|
|
||||||
" .set push \n" \
|
|
||||||
" .set noat \n" \
|
|
||||||
" move $1, %0 \n" \
|
|
||||||
" .hword 0x0001 \n" \
|
|
||||||
" .hword %x1 \n" \
|
|
||||||
" .set pop \n" \
|
|
||||||
: \
|
|
||||||
: "r" (val), "i" (ins)); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define _umips_dsp_mflo(reg) _umips_dsp_mfxxx((reg << 14) | 0x107c)
|
|
||||||
#define _umips_dsp_mfhi(reg) _umips_dsp_mfxxx((reg << 14) | 0x007c)
|
|
||||||
|
|
||||||
#define _umips_dsp_mtlo(val, reg) _umips_dsp_mtxxx(val, ((reg << 14) | 0x307c))
|
|
||||||
#define _umips_dsp_mthi(val, reg) _umips_dsp_mtxxx(val, ((reg << 14) | 0x207c))
|
|
||||||
|
|
||||||
#define mflo0() _umips_dsp_mflo(0)
|
|
||||||
#define mflo1() _umips_dsp_mflo(1)
|
|
||||||
#define mflo2() _umips_dsp_mflo(2)
|
|
||||||
#define mflo3() _umips_dsp_mflo(3)
|
|
||||||
|
|
||||||
#define mfhi0() _umips_dsp_mfhi(0)
|
|
||||||
#define mfhi1() _umips_dsp_mfhi(1)
|
|
||||||
#define mfhi2() _umips_dsp_mfhi(2)
|
|
||||||
#define mfhi3() _umips_dsp_mfhi(3)
|
|
||||||
|
|
||||||
#define mtlo0(x) _umips_dsp_mtlo(x, 0)
|
|
||||||
#define mtlo1(x) _umips_dsp_mtlo(x, 1)
|
|
||||||
#define mtlo2(x) _umips_dsp_mtlo(x, 2)
|
|
||||||
#define mtlo3(x) _umips_dsp_mtlo(x, 3)
|
|
||||||
|
|
||||||
#define mthi0(x) _umips_dsp_mthi(x, 0)
|
|
||||||
#define mthi1(x) _umips_dsp_mthi(x, 1)
|
|
||||||
#define mthi2(x) _umips_dsp_mthi(x, 2)
|
|
||||||
#define mthi3(x) _umips_dsp_mthi(x, 3)
|
|
||||||
|
|
||||||
#else /* !CONFIG_CPU_MICROMIPS */
|
|
||||||
#define rddsp(mask) \
|
|
||||||
({ \
|
|
||||||
unsigned int __res; \
|
|
||||||
\
|
|
||||||
__asm__ __volatile__( \
|
|
||||||
" .set push \n" \
|
|
||||||
" .set noat \n" \
|
|
||||||
" # rddsp $1, %x1 \n" \
|
|
||||||
" .word 0x7c000cb8 | (%x1 << 16) \n" \
|
|
||||||
" move %0, $1 \n" \
|
|
||||||
" .set pop \n" \
|
|
||||||
: "=r" (__res) \
|
|
||||||
: "i" (mask)); \
|
|
||||||
__res; \
|
|
||||||
})
|
|
||||||
|
|
||||||
#define wrdsp(val, mask) \
|
|
||||||
do { \
|
|
||||||
__asm__ __volatile__( \
|
|
||||||
" .set push \n" \
|
|
||||||
" .set noat \n" \
|
|
||||||
" move $1, %0 \n" \
|
|
||||||
" # wrdsp $1, %x1 \n" \
|
|
||||||
" .word 0x7c2004f8 | (%x1 << 11) \n" \
|
|
||||||
" .set pop \n" \
|
" .set pop \n" \
|
||||||
: \
|
: \
|
||||||
: "r" (val), "i" (mask)); \
|
: "r" (val), "i" (mask)); \
|
||||||
|
@ -2370,7 +2328,8 @@ do { \
|
||||||
__asm__ __volatile__( \
|
__asm__ __volatile__( \
|
||||||
" .set push \n" \
|
" .set push \n" \
|
||||||
" .set noat \n" \
|
" .set noat \n" \
|
||||||
" .word (0x00000810 | %1) \n" \
|
_ASM_INSN_IF_MIPS(0x00000810 | %X1) \
|
||||||
|
_ASM_INSN32_IF_MM(0x0001007c | %x1) \
|
||||||
" move %0, $1 \n" \
|
" move %0, $1 \n" \
|
||||||
" .set pop \n" \
|
" .set pop \n" \
|
||||||
: "=r" (__treg) \
|
: "=r" (__treg) \
|
||||||
|
@ -2384,18 +2343,31 @@ do { \
|
||||||
" .set push \n" \
|
" .set push \n" \
|
||||||
" .set noat \n" \
|
" .set noat \n" \
|
||||||
" move $1, %0 \n" \
|
" move $1, %0 \n" \
|
||||||
" .word (0x00200011 | %1) \n" \
|
_ASM_INSN_IF_MIPS(0x00200011 | %X1) \
|
||||||
|
_ASM_INSN32_IF_MM(0x0001207c | %x1) \
|
||||||
" .set pop \n" \
|
" .set pop \n" \
|
||||||
: \
|
: \
|
||||||
: "r" (val), "i" (ins)); \
|
: "r" (val), "i" (ins)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
#ifdef CONFIG_CPU_MICROMIPS
|
||||||
|
|
||||||
|
#define _dsp_mflo(reg) _dsp_mfxxx((reg << 14) | 0x1000)
|
||||||
|
#define _dsp_mfhi(reg) _dsp_mfxxx((reg << 14) | 0x0000)
|
||||||
|
|
||||||
|
#define _dsp_mtlo(val, reg) _dsp_mtxxx(val, ((reg << 14) | 0x1000))
|
||||||
|
#define _dsp_mthi(val, reg) _dsp_mtxxx(val, ((reg << 14) | 0x0000))
|
||||||
|
|
||||||
|
#else /* !CONFIG_CPU_MICROMIPS */
|
||||||
|
|
||||||
#define _dsp_mflo(reg) _dsp_mfxxx((reg << 21) | 0x0002)
|
#define _dsp_mflo(reg) _dsp_mfxxx((reg << 21) | 0x0002)
|
||||||
#define _dsp_mfhi(reg) _dsp_mfxxx((reg << 21) | 0x0000)
|
#define _dsp_mfhi(reg) _dsp_mfxxx((reg << 21) | 0x0000)
|
||||||
|
|
||||||
#define _dsp_mtlo(val, reg) _dsp_mtxxx(val, ((reg << 11) | 0x0002))
|
#define _dsp_mtlo(val, reg) _dsp_mtxxx(val, ((reg << 11) | 0x0002))
|
||||||
#define _dsp_mthi(val, reg) _dsp_mtxxx(val, ((reg << 11) | 0x0000))
|
#define _dsp_mthi(val, reg) _dsp_mtxxx(val, ((reg << 11) | 0x0000))
|
||||||
|
|
||||||
|
#endif /* CONFIG_CPU_MICROMIPS */
|
||||||
|
|
||||||
#define mflo0() _dsp_mflo(0)
|
#define mflo0() _dsp_mflo(0)
|
||||||
#define mflo1() _dsp_mflo(1)
|
#define mflo1() _dsp_mflo(1)
|
||||||
#define mflo2() _dsp_mflo(2)
|
#define mflo2() _dsp_mflo(2)
|
||||||
|
@ -2416,7 +2388,6 @@ do { \
|
||||||
#define mthi2(x) _dsp_mthi(x, 2)
|
#define mthi2(x) _dsp_mthi(x, 2)
|
||||||
#define mthi3(x) _dsp_mthi(x, 3)
|
#define mthi3(x) _dsp_mthi(x, 3)
|
||||||
|
|
||||||
#endif /* CONFIG_CPU_MICROMIPS */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2556,28 +2527,32 @@ static inline void guest_tlb_probe(void)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
"# tlbgp\n\t"
|
"# tlbgp\n\t"
|
||||||
".word 0x42000010");
|
_ASM_INSN_IF_MIPS(0x42000010)
|
||||||
|
_ASM_INSN32_IF_MM(0x0000017c));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void guest_tlb_read(void)
|
static inline void guest_tlb_read(void)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
"# tlbgr\n\t"
|
"# tlbgr\n\t"
|
||||||
".word 0x42000009");
|
_ASM_INSN_IF_MIPS(0x42000009)
|
||||||
|
_ASM_INSN32_IF_MM(0x0000117c));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void guest_tlb_write_indexed(void)
|
static inline void guest_tlb_write_indexed(void)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
"# tlbgwi\n\t"
|
"# tlbgwi\n\t"
|
||||||
".word 0x4200000a");
|
_ASM_INSN_IF_MIPS(0x4200000a)
|
||||||
|
_ASM_INSN32_IF_MM(0x0000217c));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void guest_tlb_write_random(void)
|
static inline void guest_tlb_write_random(void)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
"# tlbgwr\n\t"
|
"# tlbgwr\n\t"
|
||||||
".word 0x4200000e");
|
_ASM_INSN_IF_MIPS(0x4200000e)
|
||||||
|
_ASM_INSN32_IF_MM(0x0000317c));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2587,7 +2562,8 @@ static inline void guest_tlbinvf(void)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
"# tlbginvf\n\t"
|
"# tlbginvf\n\t"
|
||||||
".word 0x4200000c");
|
_ASM_INSN_IF_MIPS(0x4200000c)
|
||||||
|
_ASM_INSN32_IF_MM(0x0000517c));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !TOOLCHAIN_SUPPORTS_VIRT */
|
#endif /* !TOOLCHAIN_SUPPORTS_VIRT */
|
||||||
|
|
|
@ -192,13 +192,6 @@ static inline void write_msa_##name(unsigned int val) \
|
||||||
* allow compilation with toolchains that do not support MSA. Once all
|
* allow compilation with toolchains that do not support MSA. Once all
|
||||||
* toolchains in use support MSA these can be removed.
|
* toolchains in use support MSA these can be removed.
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_CPU_MICROMIPS
|
|
||||||
#define CFC_MSA_INSN 0x587e0056
|
|
||||||
#define CTC_MSA_INSN 0x583e0816
|
|
||||||
#else
|
|
||||||
#define CFC_MSA_INSN 0x787e0059
|
|
||||||
#define CTC_MSA_INSN 0x783e0819
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __BUILD_MSA_CTL_REG(name, cs) \
|
#define __BUILD_MSA_CTL_REG(name, cs) \
|
||||||
static inline unsigned int read_msa_##name(void) \
|
static inline unsigned int read_msa_##name(void) \
|
||||||
|
@ -207,11 +200,12 @@ static inline unsigned int read_msa_##name(void) \
|
||||||
__asm__ __volatile__( \
|
__asm__ __volatile__( \
|
||||||
" .set push\n" \
|
" .set push\n" \
|
||||||
" .set noat\n" \
|
" .set noat\n" \
|
||||||
" .insn\n" \
|
" # cfcmsa $1, $%1\n" \
|
||||||
" .word %1 | (" #cs " << 11)\n" \
|
_ASM_INSN_IF_MIPS(0x787e0059 | %1 << 11) \
|
||||||
|
_ASM_INSN32_IF_MM(0x587e0056 | %1 << 11) \
|
||||||
" move %0, $1\n" \
|
" move %0, $1\n" \
|
||||||
" .set pop\n" \
|
" .set pop\n" \
|
||||||
: "=r"(reg) : "i"(CFC_MSA_INSN)); \
|
: "=r"(reg) : "i"(cs)); \
|
||||||
return reg; \
|
return reg; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
@ -221,10 +215,11 @@ static inline void write_msa_##name(unsigned int val) \
|
||||||
" .set push\n" \
|
" .set push\n" \
|
||||||
" .set noat\n" \
|
" .set noat\n" \
|
||||||
" move $1, %0\n" \
|
" move $1, %0\n" \
|
||||||
" .insn\n" \
|
" # ctcmsa $%1, $1\n" \
|
||||||
" .word %1 | (" #cs " << 6)\n" \
|
_ASM_INSN_IF_MIPS(0x783e0819 | %1 << 6) \
|
||||||
|
_ASM_INSN32_IF_MM(0x583e0816 | %1 << 6) \
|
||||||
" .set pop\n" \
|
" .set pop\n" \
|
||||||
: : "r"(val), "i"(CTC_MSA_INSN)); \
|
: : "r"(val), "i"(cs)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !TOOLCHAIN_SUPPORTS_MSA */
|
#endif /* !TOOLCHAIN_SUPPORTS_MSA */
|
||||||
|
|
|
@ -146,7 +146,7 @@ typedef struct {
|
||||||
* This structure contains the global state of all command queues.
|
* This structure contains the global state of all command queues.
|
||||||
* It is stored in a bootmem named block and shared by all
|
* It is stored in a bootmem named block and shared by all
|
||||||
* applications running on Octeon. Tickets are stored in a differnet
|
* applications running on Octeon. Tickets are stored in a differnet
|
||||||
* cahce line that queue information to reduce the contention on the
|
* cache line that queue information to reduce the contention on the
|
||||||
* ll/sc used to get a ticket. If this is not the case, the update
|
* ll/sc used to get a ticket. If this is not the case, the update
|
||||||
* of queue state causes the ll/sc to fail quite often.
|
* of queue state causes the ll/sc to fail quite often.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -94,7 +94,7 @@ extern int cvmx_helper_board_get_mii_address(int ipd_port);
|
||||||
* @phy_addr: The address of the PHY to program
|
* @phy_addr: The address of the PHY to program
|
||||||
* @link_flags:
|
* @link_flags:
|
||||||
* Flags to control autonegotiation. Bit 0 is autonegotiation
|
* Flags to control autonegotiation. Bit 0 is autonegotiation
|
||||||
* enable/disable to maintain backware compatibility.
|
* enable/disable to maintain backward compatibility.
|
||||||
* @link_info: Link speed to program. If the speed is zero and autonegotiation
|
* @link_info: Link speed to program. If the speed is zero and autonegotiation
|
||||||
* is enabled, all possible negotiation speeds are advertised.
|
* is enabled, all possible negotiation speeds are advertised.
|
||||||
*
|
*
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
enum cvmx_ipd_mode {
|
enum cvmx_ipd_mode {
|
||||||
CVMX_IPD_OPC_MODE_STT = 0LL, /* All blocks DRAM, not cached in L2 */
|
CVMX_IPD_OPC_MODE_STT = 0LL, /* All blocks DRAM, not cached in L2 */
|
||||||
CVMX_IPD_OPC_MODE_STF = 1LL, /* All bloccks into L2 */
|
CVMX_IPD_OPC_MODE_STF = 1LL, /* All blocks into L2 */
|
||||||
CVMX_IPD_OPC_MODE_STF1_STT = 2LL, /* 1st block L2, rest DRAM */
|
CVMX_IPD_OPC_MODE_STF1_STT = 2LL, /* 1st block L2, rest DRAM */
|
||||||
CVMX_IPD_OPC_MODE_STF2_STT = 3LL /* 1st, 2nd blocks L2, rest DRAM */
|
CVMX_IPD_OPC_MODE_STF2_STT = 3LL /* 1st, 2nd blocks L2, rest DRAM */
|
||||||
};
|
};
|
||||||
|
|
|
@ -2051,7 +2051,7 @@ static inline void cvmx_pow_tag_sw_desched(uint32_t tag,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Descchedules the current work queue entry.
|
* Deschedules the current work queue entry.
|
||||||
*
|
*
|
||||||
* @no_sched: no schedule flag value to be set on the work queue
|
* @no_sched: no schedule flag value to be set on the work queue
|
||||||
* entry. If this is set the entry will not be
|
* entry. If this is set the entry will not be
|
||||||
|
|
|
@ -39,7 +39,7 @@ struct hpc3_pbus_dmacregs {
|
||||||
volatile u32 pbdma_dptr; /* pbus dma channel desc ptr */
|
volatile u32 pbdma_dptr; /* pbus dma channel desc ptr */
|
||||||
u32 _unused0[0x1000/4 - 2]; /* padding */
|
u32 _unused0[0x1000/4 - 2]; /* padding */
|
||||||
volatile u32 pbdma_ctrl; /* pbus dma channel control register has
|
volatile u32 pbdma_ctrl; /* pbus dma channel control register has
|
||||||
* copletely different meaning for read
|
* completely different meaning for read
|
||||||
* compared with write */
|
* compared with write */
|
||||||
/* read */
|
/* read */
|
||||||
#define HPC3_PDMACTRL_INT 0x00000001 /* interrupt (cleared after read) */
|
#define HPC3_PDMACTRL_INT 0x00000001 /* interrupt (cleared after read) */
|
||||||
|
|
|
@ -481,7 +481,7 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
|
||||||
/*
|
/*
|
||||||
* OK we are here either because we hit a NAL
|
* OK we are here either because we hit a NAL
|
||||||
* instruction or because we are emulating an
|
* instruction or because we are emulating an
|
||||||
* old bltzal{,l} one. Lets figure out what the
|
* old bltzal{,l} one. Let's figure out what the
|
||||||
* case really is.
|
* case really is.
|
||||||
*/
|
*/
|
||||||
if (!insn.i_format.rs) {
|
if (!insn.i_format.rs) {
|
||||||
|
@ -515,7 +515,7 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
|
||||||
/*
|
/*
|
||||||
* OK we are here either because we hit a BAL
|
* OK we are here either because we hit a BAL
|
||||||
* instruction or because we are emulating an
|
* instruction or because we are emulating an
|
||||||
* old bgezal{,l} one. Lets figure out what the
|
* old bgezal{,l} one. Let's figure out what the
|
||||||
* case really is.
|
* case really is.
|
||||||
*/
|
*/
|
||||||
if (!insn.i_format.rs) {
|
if (!insn.i_format.rs) {
|
||||||
|
|
|
@ -441,6 +441,21 @@ LEAF(mips_cps_boot_vpes)
|
||||||
mfc0 t0, CP0_CONFIG
|
mfc0 t0, CP0_CONFIG
|
||||||
mttc0 t0, CP0_CONFIG
|
mttc0 t0, CP0_CONFIG
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copy the EVA config from this VPE if the CPU supports it.
|
||||||
|
* CONFIG3 must exist to be running MT startup - just read it.
|
||||||
|
*/
|
||||||
|
mfc0 t0, CP0_CONFIG, 3
|
||||||
|
and t0, t0, MIPS_CONF3_SC
|
||||||
|
beqz t0, 3f
|
||||||
|
nop
|
||||||
|
mfc0 t0, CP0_SEGCTL0
|
||||||
|
mttc0 t0, CP0_SEGCTL0
|
||||||
|
mfc0 t0, CP0_SEGCTL1
|
||||||
|
mttc0 t0, CP0_SEGCTL1
|
||||||
|
mfc0 t0, CP0_SEGCTL2
|
||||||
|
mttc0 t0, CP0_SEGCTL2
|
||||||
|
3:
|
||||||
/* Ensure no software interrupts are pending */
|
/* Ensure no software interrupts are pending */
|
||||||
mttc0 zero, CP0_CAUSE
|
mttc0 zero, CP0_CAUSE
|
||||||
mttc0 zero, CP0_STATUS
|
mttc0 zero, CP0_STATUS
|
||||||
|
|
|
@ -833,10 +833,8 @@ static inline unsigned int decode_config5(struct cpuinfo_mips *c)
|
||||||
c->options |= MIPS_CPU_MAAR;
|
c->options |= MIPS_CPU_MAAR;
|
||||||
if (config5 & MIPS_CONF5_LLB)
|
if (config5 & MIPS_CONF5_LLB)
|
||||||
c->options |= MIPS_CPU_RW_LLB;
|
c->options |= MIPS_CPU_RW_LLB;
|
||||||
#ifdef CONFIG_XPA
|
|
||||||
if (config5 & MIPS_CONF5_MVH)
|
if (config5 & MIPS_CONF5_MVH)
|
||||||
c->options |= MIPS_CPU_XPA;
|
c->options |= MIPS_CPU_MVH;
|
||||||
#endif
|
|
||||||
if (cpu_has_mips_r6 && (config5 & MIPS_CONF5_VP))
|
if (cpu_has_mips_r6 && (config5 & MIPS_CONF5_VP))
|
||||||
c->options |= MIPS_CPU_VP;
|
c->options |= MIPS_CPU_VP;
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf,
|
||||||
elf32 = ehdr->e32.e_ident[EI_CLASS] == ELFCLASS32;
|
elf32 = ehdr->e32.e_ident[EI_CLASS] == ELFCLASS32;
|
||||||
flags = elf32 ? ehdr->e32.e_flags : ehdr->e64.e_flags;
|
flags = elf32 ? ehdr->e32.e_flags : ehdr->e64.e_flags;
|
||||||
|
|
||||||
/* Lets see if this is an O32 ELF */
|
/* Let's see if this is an O32 ELF */
|
||||||
if (elf32) {
|
if (elf32) {
|
||||||
if (flags & EF_MIPS_FP64) {
|
if (flags & EF_MIPS_FP64) {
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -54,6 +54,9 @@ void __init init_IRQ(void)
|
||||||
for (i = 0; i < NR_IRQS; i++)
|
for (i = 0; i < NR_IRQS; i++)
|
||||||
irq_set_noprobe(i);
|
irq_set_noprobe(i);
|
||||||
|
|
||||||
|
if (cpu_has_veic)
|
||||||
|
clear_c0_status(ST0_IM);
|
||||||
|
|
||||||
arch_init_irq();
|
arch_init_irq();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2202,7 +2202,7 @@ int mipsr2_decoder(struct pt_regs *regs, u32 inst, unsigned long *fcr31)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lets not return to userland just yet. It's constly and
|
* Let's not return to userland just yet. It's costly and
|
||||||
* it's likely we have more R2 instructions to emulate
|
* it's likely we have more R2 instructions to emulate
|
||||||
*/
|
*/
|
||||||
if (!err && (pass++ < MIPS_R2_EMUL_TOTAL_PASS)) {
|
if (!err && (pass++ < MIPS_R2_EMUL_TOTAL_PASS)) {
|
||||||
|
|
|
@ -345,7 +345,7 @@ static int get_frame_info(struct mips_frame_info *info)
|
||||||
return 0;
|
return 0;
|
||||||
if (info->pc_offset < 0) /* leaf */
|
if (info->pc_offset < 0) /* leaf */
|
||||||
return 1;
|
return 1;
|
||||||
/* prologue seems boggus... */
|
/* prologue seems bogus... */
|
||||||
err:
|
err:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -770,15 +770,7 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs)
|
||||||
sigset_t *oldset = sigmask_to_save();
|
sigset_t *oldset = sigmask_to_save();
|
||||||
int ret;
|
int ret;
|
||||||
struct mips_abi *abi = current->thread.abi;
|
struct mips_abi *abi = current->thread.abi;
|
||||||
#ifdef CONFIG_CPU_MICROMIPS
|
|
||||||
void *vdso;
|
|
||||||
unsigned long tmp = (unsigned long)current->mm->context.vdso;
|
|
||||||
|
|
||||||
set_isa16_mode(tmp);
|
|
||||||
vdso = (void *)tmp;
|
|
||||||
#else
|
|
||||||
void *vdso = current->mm->context.vdso;
|
void *vdso = current->mm->context.vdso;
|
||||||
#endif
|
|
||||||
|
|
||||||
if (regs->regs[0]) {
|
if (regs->regs[0]) {
|
||||||
switch(regs->regs[2]) {
|
switch(regs->regs[2]) {
|
||||||
|
|
|
@ -359,8 +359,12 @@ static void cps_init_secondary(void)
|
||||||
BUG_ON(ident != mips_cm_vp_id(smp_processor_id()));
|
BUG_ON(ident != mips_cm_vp_id(smp_processor_id()));
|
||||||
}
|
}
|
||||||
|
|
||||||
change_c0_status(ST0_IM, STATUSF_IP2 | STATUSF_IP3 | STATUSF_IP4 |
|
if (cpu_has_veic)
|
||||||
STATUSF_IP5 | STATUSF_IP6 | STATUSF_IP7);
|
clear_c0_status(ST0_IM);
|
||||||
|
else
|
||||||
|
change_c0_status(ST0_IM, STATUSF_IP2 | STATUSF_IP3 |
|
||||||
|
STATUSF_IP4 | STATUSF_IP5 |
|
||||||
|
STATUSF_IP6 | STATUSF_IP7);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cps_smp_finish(void)
|
static void cps_smp_finish(void)
|
||||||
|
|
|
@ -43,7 +43,7 @@ static int pvc_line_proc_show(struct seq_file *m, void *v)
|
||||||
{
|
{
|
||||||
int lineno = *(int *)m->private;
|
int lineno = *(int *)m->private;
|
||||||
|
|
||||||
if (lineno < 0 || lineno > PVC_NLINES) {
|
if (lineno < 0 || lineno >= PVC_NLINES) {
|
||||||
printk(KERN_WARNING "proc_read_line: invalid lineno %d\n", lineno);
|
printk(KERN_WARNING "proc_read_line: invalid lineno %d\n", lineno);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ static ssize_t pvc_line_proc_write(struct file *file, const char __user *buf,
|
||||||
char kbuf[PVC_LINELEN];
|
char kbuf[PVC_LINELEN];
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
BUG_ON(lineno < 0 || lineno > PVC_NLINES);
|
BUG_ON(lineno < 0 || lineno >= PVC_NLINES);
|
||||||
|
|
||||||
len = min(count, sizeof(kbuf) - 1);
|
len = min(count, sizeof(kbuf) - 1);
|
||||||
if (copy_from_user(kbuf, buf, len))
|
if (copy_from_user(kbuf, buf, len))
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "libgcc.h"
|
#include "libgcc.h"
|
||||||
|
|
||||||
long long __ashldi3(long long u, word_type b)
|
long long notrace __ashldi3(long long u, word_type b)
|
||||||
{
|
{
|
||||||
DWunion uu, w;
|
DWunion uu, w;
|
||||||
word_type bm;
|
word_type bm;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "libgcc.h"
|
#include "libgcc.h"
|
||||||
|
|
||||||
long long __ashrdi3(long long u, word_type b)
|
long long notrace __ashrdi3(long long u, word_type b)
|
||||||
{
|
{
|
||||||
DWunion uu, w;
|
DWunion uu, w;
|
||||||
word_type bm;
|
word_type bm;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
|
||||||
unsigned long long __bswapdi2(unsigned long long u)
|
unsigned long long notrace __bswapdi2(unsigned long long u)
|
||||||
{
|
{
|
||||||
return (((u) & 0xff00000000000000ull) >> 56) |
|
return (((u) & 0xff00000000000000ull) >> 56) |
|
||||||
(((u) & 0x00ff000000000000ull) >> 40) |
|
(((u) & 0x00ff000000000000ull) >> 40) |
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
|
||||||
unsigned int __bswapsi2(unsigned int u)
|
unsigned int notrace __bswapsi2(unsigned int u)
|
||||||
{
|
{
|
||||||
return (((u) & 0xff000000) >> 24) |
|
return (((u) & 0xff000000) >> 24) |
|
||||||
(((u) & 0x00ff0000) >> 8) |
|
(((u) & 0x00ff0000) >> 8) |
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "libgcc.h"
|
#include "libgcc.h"
|
||||||
|
|
||||||
word_type __cmpdi2(long long a, long long b)
|
word_type notrace __cmpdi2(long long a, long long b)
|
||||||
{
|
{
|
||||||
const DWunion au = {
|
const DWunion au = {
|
||||||
.ll = a
|
.ll = a
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "libgcc.h"
|
#include "libgcc.h"
|
||||||
|
|
||||||
long long __lshrdi3(long long u, word_type b)
|
long long notrace __lshrdi3(long long u, word_type b)
|
||||||
{
|
{
|
||||||
DWunion uu, w;
|
DWunion uu, w;
|
||||||
word_type bm;
|
word_type bm;
|
||||||
|
|
|
@ -256,7 +256,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Macro to build the __copy_user common code
|
* Macro to build the __copy_user common code
|
||||||
* Arguements:
|
* Arguments:
|
||||||
* mode : LEGACY_MODE or EVA_MODE
|
* mode : LEGACY_MODE or EVA_MODE
|
||||||
* from : Source operand. USEROP or KERNELOP
|
* from : Source operand. USEROP or KERNELOP
|
||||||
* to : Destination operand. USEROP or KERNELOP
|
* to : Destination operand. USEROP or KERNELOP
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "libgcc.h"
|
#include "libgcc.h"
|
||||||
|
|
||||||
word_type __ucmpdi2(unsigned long long a, unsigned long long b)
|
word_type notrace __ucmpdi2(unsigned long long a, unsigned long long b)
|
||||||
{
|
{
|
||||||
const DWunion au = {.ll = a};
|
const DWunion au = {.ll = a};
|
||||||
const DWunion bu = {.ll = b};
|
const DWunion bu = {.ll = b};
|
||||||
|
|
|
@ -212,7 +212,7 @@ static void hpet_setup(void)
|
||||||
/* set hpet base address */
|
/* set hpet base address */
|
||||||
smbus_write(SMBUS_PCI_REGB4, HPET_ADDR);
|
smbus_write(SMBUS_PCI_REGB4, HPET_ADDR);
|
||||||
|
|
||||||
/* enable decodeing of access to HPET MMIO*/
|
/* enable decoding of access to HPET MMIO*/
|
||||||
smbus_enable(SMBUS_PCI_REG40, (1 << 28));
|
smbus_enable(SMBUS_PCI_REG40, (1 << 28));
|
||||||
|
|
||||||
/* HPET irq enable */
|
/* HPET irq enable */
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "ieee754.h"
|
#include "ieee754.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Emulate the arbritrary instruction ir at xcp->cp0_epc. Required when
|
* Emulate the arbitrary instruction ir at xcp->cp0_epc. Required when
|
||||||
* we have to emulate the instruction in a COP1 branch delay slot. Do
|
* we have to emulate the instruction in a COP1 branch delay slot. Do
|
||||||
* not change cp0_epc due to the instruction
|
* not change cp0_epc due to the instruction
|
||||||
*
|
*
|
||||||
|
@ -88,7 +88,7 @@ int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc)
|
||||||
fr = (struct emuframe __user *)
|
fr = (struct emuframe __user *)
|
||||||
((regs->regs[29] - sizeof(struct emuframe)) & ~0x7);
|
((regs->regs[29] - sizeof(struct emuframe)) & ~0x7);
|
||||||
|
|
||||||
/* Verify that the stack pointer is not competely insane */
|
/* Verify that the stack pointer is not completely insane */
|
||||||
if (unlikely(!access_ok(VERIFY_WRITE, fr, sizeof(struct emuframe))))
|
if (unlikely(!access_ok(VERIFY_WRITE, fr, sizeof(struct emuframe))))
|
||||||
return SIGBUS;
|
return SIGBUS;
|
||||||
|
|
||||||
|
|
|
@ -2361,8 +2361,9 @@ static void print_htw_config(void)
|
||||||
(config & MIPS_PWFIELD_PTEI_MASK) >> MIPS_PWFIELD_PTEI_SHIFT);
|
(config & MIPS_PWFIELD_PTEI_MASK) >> MIPS_PWFIELD_PTEI_SHIFT);
|
||||||
|
|
||||||
config = read_c0_pwsize();
|
config = read_c0_pwsize();
|
||||||
pr_debug("PWSize (0x%0*lx): GDW: 0x%02lx UDW: 0x%02lx MDW: 0x%02lx PTW: 0x%02lx PTEW: 0x%02lx\n",
|
pr_debug("PWSize (0x%0*lx): PS: 0x%lx GDW: 0x%02lx UDW: 0x%02lx MDW: 0x%02lx PTW: 0x%02lx PTEW: 0x%02lx\n",
|
||||||
field, config,
|
field, config,
|
||||||
|
(config & MIPS_PWSIZE_PS_MASK) >> MIPS_PWSIZE_PS_SHIFT,
|
||||||
(config & MIPS_PWSIZE_GDW_MASK) >> MIPS_PWSIZE_GDW_SHIFT,
|
(config & MIPS_PWSIZE_GDW_MASK) >> MIPS_PWSIZE_GDW_SHIFT,
|
||||||
(config & MIPS_PWSIZE_UDW_MASK) >> MIPS_PWSIZE_UDW_SHIFT,
|
(config & MIPS_PWSIZE_UDW_MASK) >> MIPS_PWSIZE_UDW_SHIFT,
|
||||||
(config & MIPS_PWSIZE_MDW_MASK) >> MIPS_PWSIZE_MDW_SHIFT,
|
(config & MIPS_PWSIZE_MDW_MASK) >> MIPS_PWSIZE_MDW_SHIFT,
|
||||||
|
@ -2370,9 +2371,12 @@ static void print_htw_config(void)
|
||||||
(config & MIPS_PWSIZE_PTEW_MASK) >> MIPS_PWSIZE_PTEW_SHIFT);
|
(config & MIPS_PWSIZE_PTEW_MASK) >> MIPS_PWSIZE_PTEW_SHIFT);
|
||||||
|
|
||||||
pwctl = read_c0_pwctl();
|
pwctl = read_c0_pwctl();
|
||||||
pr_debug("PWCtl (0x%x): PWEn: 0x%x DPH: 0x%x HugePg: 0x%x Psn: 0x%x\n",
|
pr_debug("PWCtl (0x%x): PWEn: 0x%x XK: 0x%x XS: 0x%x XU: 0x%x DPH: 0x%x HugePg: 0x%x Psn: 0x%x\n",
|
||||||
pwctl,
|
pwctl,
|
||||||
(pwctl & MIPS_PWCTL_PWEN_MASK) >> MIPS_PWCTL_PWEN_SHIFT,
|
(pwctl & MIPS_PWCTL_PWEN_MASK) >> MIPS_PWCTL_PWEN_SHIFT,
|
||||||
|
(pwctl & MIPS_PWCTL_XK_MASK) >> MIPS_PWCTL_XK_SHIFT,
|
||||||
|
(pwctl & MIPS_PWCTL_XS_MASK) >> MIPS_PWCTL_XS_SHIFT,
|
||||||
|
(pwctl & MIPS_PWCTL_XU_MASK) >> MIPS_PWCTL_XU_SHIFT,
|
||||||
(pwctl & MIPS_PWCTL_DPH_MASK) >> MIPS_PWCTL_DPH_SHIFT,
|
(pwctl & MIPS_PWCTL_DPH_MASK) >> MIPS_PWCTL_DPH_SHIFT,
|
||||||
(pwctl & MIPS_PWCTL_HUGEPG_MASK) >> MIPS_PWCTL_HUGEPG_SHIFT,
|
(pwctl & MIPS_PWCTL_HUGEPG_MASK) >> MIPS_PWCTL_HUGEPG_SHIFT,
|
||||||
(pwctl & MIPS_PWCTL_PSN_MASK) >> MIPS_PWCTL_PSN_SHIFT);
|
(pwctl & MIPS_PWCTL_PSN_MASK) >> MIPS_PWCTL_PSN_SHIFT);
|
||||||
|
@ -2427,15 +2431,25 @@ static void config_htw_params(void)
|
||||||
if (CONFIG_PGTABLE_LEVELS >= 3)
|
if (CONFIG_PGTABLE_LEVELS >= 3)
|
||||||
pwsize |= ilog2(PTRS_PER_PMD) << MIPS_PWSIZE_MDW_SHIFT;
|
pwsize |= ilog2(PTRS_PER_PMD) << MIPS_PWSIZE_MDW_SHIFT;
|
||||||
|
|
||||||
pwsize |= ilog2(sizeof(pte_t)/4) << MIPS_PWSIZE_PTEW_SHIFT;
|
/* Set pointer size to size of directory pointers */
|
||||||
|
if (config_enabled(CONFIG_64BIT))
|
||||||
|
pwsize |= MIPS_PWSIZE_PS_MASK;
|
||||||
|
/* PTEs may be multiple pointers long (e.g. with XPA) */
|
||||||
|
pwsize |= ((PTE_T_LOG2 - PGD_T_LOG2) << MIPS_PWSIZE_PTEW_SHIFT)
|
||||||
|
& MIPS_PWSIZE_PTEW_MASK;
|
||||||
|
|
||||||
write_c0_pwsize(pwsize);
|
write_c0_pwsize(pwsize);
|
||||||
|
|
||||||
/* Make sure everything is set before we enable the HTW */
|
/* Make sure everything is set before we enable the HTW */
|
||||||
back_to_back_c0_hazard();
|
back_to_back_c0_hazard();
|
||||||
|
|
||||||
/* Enable HTW and disable the rest of the pwctl fields */
|
/*
|
||||||
|
* Enable HTW (and only for XUSeg on 64-bit), and disable the rest of
|
||||||
|
* the pwctl fields.
|
||||||
|
*/
|
||||||
config = 1 << MIPS_PWCTL_PWEN_SHIFT;
|
config = 1 << MIPS_PWCTL_PWEN_SHIFT;
|
||||||
|
if (config_enabled(CONFIG_64BIT))
|
||||||
|
config |= MIPS_PWCTL_XU_MASK;
|
||||||
write_c0_pwctl(config);
|
write_c0_pwctl(config);
|
||||||
pr_info("Hardware Page Table Walker enabled\n");
|
pr_info("Hardware Page Table Walker enabled\n");
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ struct op_counter_config {
|
||||||
unsigned long unit_mask;
|
unsigned long unit_mask;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Per-architecture configury and hooks. */
|
/* Per-architecture configure and hooks. */
|
||||||
struct op_mips_model {
|
struct op_mips_model {
|
||||||
void (*reg_setup) (struct op_counter_config *);
|
void (*reg_setup) (struct op_counter_config *);
|
||||||
void (*cpu_setup) (void *dummy);
|
void (*cpu_setup) (void *dummy);
|
||||||
|
|
|
@ -33,9 +33,9 @@ static u32 emulate_ioc3_cfg(int where, int size)
|
||||||
* The Bridge ASIC supports both type 0 and type 1 access. Type 1 is
|
* The Bridge ASIC supports both type 0 and type 1 access. Type 1 is
|
||||||
* not really documented, so right now I can't write code which uses it.
|
* not really documented, so right now I can't write code which uses it.
|
||||||
* Therefore we use type 0 accesses for now even though they won't work
|
* Therefore we use type 0 accesses for now even though they won't work
|
||||||
* correcly for PCI-to-PCI bridges.
|
* correctly for PCI-to-PCI bridges.
|
||||||
*
|
*
|
||||||
* The function is complicated by the ultimate brokeness of the IOC3 chip
|
* The function is complicated by the ultimate brokenness of the IOC3 chip
|
||||||
* which is used in SGI systems. The IOC3 can only handle 32-bit PCI
|
* which is used in SGI systems. The IOC3 can only handle 32-bit PCI
|
||||||
* accesses and does only decode parts of it's address space.
|
* accesses and does only decode parts of it's address space.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -83,12 +83,16 @@ static void __init plat_setup_iocoherency(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init plat_mem_setup(void)
|
void __init *plat_get_fdt(void)
|
||||||
{
|
{
|
||||||
if (fw_arg0 != -2)
|
if (fw_arg0 != -2)
|
||||||
panic("Device-tree not present");
|
panic("Device-tree not present");
|
||||||
|
return (void *)fw_arg1;
|
||||||
|
}
|
||||||
|
|
||||||
__dt_setup_arch((void *)fw_arg1);
|
void __init plat_mem_setup(void)
|
||||||
|
{
|
||||||
|
__dt_setup_arch(plat_get_fdt());
|
||||||
|
|
||||||
plat_setup_iocoherency();
|
plat_setup_iocoherency();
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,6 +188,41 @@ static struct rt2880_pmx_func gpio_grp_mt7628[] = {
|
||||||
FUNC("gpio", 0, 11, 1),
|
FUNC("gpio", 0, 11, 1),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct rt2880_pmx_func p4led_kn_grp_mt7628[] = {
|
||||||
|
FUNC("jtag", 3, 30, 1),
|
||||||
|
FUNC("util", 2, 30, 1),
|
||||||
|
FUNC("gpio", 1, 30, 1),
|
||||||
|
FUNC("p4led_kn", 0, 30, 1),
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct rt2880_pmx_func p3led_kn_grp_mt7628[] = {
|
||||||
|
FUNC("jtag", 3, 31, 1),
|
||||||
|
FUNC("util", 2, 31, 1),
|
||||||
|
FUNC("gpio", 1, 31, 1),
|
||||||
|
FUNC("p3led_kn", 0, 31, 1),
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct rt2880_pmx_func p2led_kn_grp_mt7628[] = {
|
||||||
|
FUNC("jtag", 3, 32, 1),
|
||||||
|
FUNC("util", 2, 32, 1),
|
||||||
|
FUNC("gpio", 1, 32, 1),
|
||||||
|
FUNC("p2led_kn", 0, 32, 1),
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct rt2880_pmx_func p1led_kn_grp_mt7628[] = {
|
||||||
|
FUNC("jtag", 3, 33, 1),
|
||||||
|
FUNC("util", 2, 33, 1),
|
||||||
|
FUNC("gpio", 1, 33, 1),
|
||||||
|
FUNC("p1led_kn", 0, 33, 1),
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct rt2880_pmx_func p0led_kn_grp_mt7628[] = {
|
||||||
|
FUNC("jtag", 3, 34, 1),
|
||||||
|
FUNC("rsvd", 2, 34, 1),
|
||||||
|
FUNC("gpio", 1, 34, 1),
|
||||||
|
FUNC("p0led_kn", 0, 34, 1),
|
||||||
|
};
|
||||||
|
|
||||||
static struct rt2880_pmx_func wled_kn_grp_mt7628[] = {
|
static struct rt2880_pmx_func wled_kn_grp_mt7628[] = {
|
||||||
FUNC("rsvd", 3, 35, 1),
|
FUNC("rsvd", 3, 35, 1),
|
||||||
FUNC("rsvd", 2, 35, 1),
|
FUNC("rsvd", 2, 35, 1),
|
||||||
|
@ -195,16 +230,61 @@ static struct rt2880_pmx_func wled_kn_grp_mt7628[] = {
|
||||||
FUNC("wled_kn", 0, 35, 1),
|
FUNC("wled_kn", 0, 35, 1),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct rt2880_pmx_func p4led_an_grp_mt7628[] = {
|
||||||
|
FUNC("jtag", 3, 39, 1),
|
||||||
|
FUNC("util", 2, 39, 1),
|
||||||
|
FUNC("gpio", 1, 39, 1),
|
||||||
|
FUNC("p4led_an", 0, 39, 1),
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct rt2880_pmx_func p3led_an_grp_mt7628[] = {
|
||||||
|
FUNC("jtag", 3, 40, 1),
|
||||||
|
FUNC("util", 2, 40, 1),
|
||||||
|
FUNC("gpio", 1, 40, 1),
|
||||||
|
FUNC("p3led_an", 0, 40, 1),
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct rt2880_pmx_func p2led_an_grp_mt7628[] = {
|
||||||
|
FUNC("jtag", 3, 41, 1),
|
||||||
|
FUNC("util", 2, 41, 1),
|
||||||
|
FUNC("gpio", 1, 41, 1),
|
||||||
|
FUNC("p2led_an", 0, 41, 1),
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct rt2880_pmx_func p1led_an_grp_mt7628[] = {
|
||||||
|
FUNC("jtag", 3, 42, 1),
|
||||||
|
FUNC("util", 2, 42, 1),
|
||||||
|
FUNC("gpio", 1, 42, 1),
|
||||||
|
FUNC("p1led_an", 0, 42, 1),
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct rt2880_pmx_func p0led_an_grp_mt7628[] = {
|
||||||
|
FUNC("jtag", 3, 43, 1),
|
||||||
|
FUNC("rsvd", 2, 43, 1),
|
||||||
|
FUNC("gpio", 1, 43, 1),
|
||||||
|
FUNC("p0led_an", 0, 43, 1),
|
||||||
|
};
|
||||||
|
|
||||||
static struct rt2880_pmx_func wled_an_grp_mt7628[] = {
|
static struct rt2880_pmx_func wled_an_grp_mt7628[] = {
|
||||||
FUNC("rsvd", 3, 35, 1),
|
FUNC("rsvd", 3, 44, 1),
|
||||||
FUNC("rsvd", 2, 35, 1),
|
FUNC("rsvd", 2, 44, 1),
|
||||||
FUNC("gpio", 1, 35, 1),
|
FUNC("gpio", 1, 44, 1),
|
||||||
FUNC("wled_an", 0, 35, 1),
|
FUNC("wled_an", 0, 44, 1),
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MT7628_GPIO_MODE_MASK 0x3
|
#define MT7628_GPIO_MODE_MASK 0x3
|
||||||
|
|
||||||
|
#define MT7628_GPIO_MODE_P4LED_KN 58
|
||||||
|
#define MT7628_GPIO_MODE_P3LED_KN 56
|
||||||
|
#define MT7628_GPIO_MODE_P2LED_KN 54
|
||||||
|
#define MT7628_GPIO_MODE_P1LED_KN 52
|
||||||
|
#define MT7628_GPIO_MODE_P0LED_KN 50
|
||||||
#define MT7628_GPIO_MODE_WLED_KN 48
|
#define MT7628_GPIO_MODE_WLED_KN 48
|
||||||
|
#define MT7628_GPIO_MODE_P4LED_AN 42
|
||||||
|
#define MT7628_GPIO_MODE_P3LED_AN 40
|
||||||
|
#define MT7628_GPIO_MODE_P2LED_AN 38
|
||||||
|
#define MT7628_GPIO_MODE_P1LED_AN 36
|
||||||
|
#define MT7628_GPIO_MODE_P0LED_AN 34
|
||||||
#define MT7628_GPIO_MODE_WLED_AN 32
|
#define MT7628_GPIO_MODE_WLED_AN 32
|
||||||
#define MT7628_GPIO_MODE_PWM1 30
|
#define MT7628_GPIO_MODE_PWM1 30
|
||||||
#define MT7628_GPIO_MODE_PWM0 28
|
#define MT7628_GPIO_MODE_PWM0 28
|
||||||
|
@ -223,9 +303,9 @@ static struct rt2880_pmx_func wled_an_grp_mt7628[] = {
|
||||||
#define MT7628_GPIO_MODE_GPIO 0
|
#define MT7628_GPIO_MODE_GPIO 0
|
||||||
|
|
||||||
static struct rt2880_pmx_group mt7628an_pinmux_data[] = {
|
static struct rt2880_pmx_group mt7628an_pinmux_data[] = {
|
||||||
GRP_G("pmw1", pwm1_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
GRP_G("pwm1", pwm1_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
||||||
1, MT7628_GPIO_MODE_PWM1),
|
1, MT7628_GPIO_MODE_PWM1),
|
||||||
GRP_G("pmw0", pwm0_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
GRP_G("pwm0", pwm0_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
||||||
1, MT7628_GPIO_MODE_PWM0),
|
1, MT7628_GPIO_MODE_PWM0),
|
||||||
GRP_G("uart2", uart2_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
GRP_G("uart2", uart2_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
||||||
1, MT7628_GPIO_MODE_UART2),
|
1, MT7628_GPIO_MODE_UART2),
|
||||||
|
@ -251,8 +331,28 @@ static struct rt2880_pmx_group mt7628an_pinmux_data[] = {
|
||||||
1, MT7628_GPIO_MODE_GPIO),
|
1, MT7628_GPIO_MODE_GPIO),
|
||||||
GRP_G("wled_an", wled_an_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
GRP_G("wled_an", wled_an_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
||||||
1, MT7628_GPIO_MODE_WLED_AN),
|
1, MT7628_GPIO_MODE_WLED_AN),
|
||||||
|
GRP_G("p0led_an", p0led_an_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
||||||
|
1, MT7628_GPIO_MODE_P0LED_AN),
|
||||||
|
GRP_G("p1led_an", p1led_an_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
||||||
|
1, MT7628_GPIO_MODE_P1LED_AN),
|
||||||
|
GRP_G("p2led_an", p2led_an_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
||||||
|
1, MT7628_GPIO_MODE_P2LED_AN),
|
||||||
|
GRP_G("p3led_an", p3led_an_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
||||||
|
1, MT7628_GPIO_MODE_P3LED_AN),
|
||||||
|
GRP_G("p4led_an", p4led_an_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
||||||
|
1, MT7628_GPIO_MODE_P4LED_AN),
|
||||||
GRP_G("wled_kn", wled_kn_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
GRP_G("wled_kn", wled_kn_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
||||||
1, MT7628_GPIO_MODE_WLED_KN),
|
1, MT7628_GPIO_MODE_WLED_KN),
|
||||||
|
GRP_G("p0led_kn", p0led_kn_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
||||||
|
1, MT7628_GPIO_MODE_P0LED_KN),
|
||||||
|
GRP_G("p1led_kn", p1led_kn_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
||||||
|
1, MT7628_GPIO_MODE_P1LED_KN),
|
||||||
|
GRP_G("p2led_kn", p2led_kn_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
||||||
|
1, MT7628_GPIO_MODE_P2LED_KN),
|
||||||
|
GRP_G("p3led_kn", p3led_kn_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
||||||
|
1, MT7628_GPIO_MODE_P3LED_KN),
|
||||||
|
GRP_G("p4led_kn", p4led_kn_grp_mt7628, MT7628_GPIO_MODE_MASK,
|
||||||
|
1, MT7628_GPIO_MODE_P4LED_KN),
|
||||||
{ 0 }
|
{ 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ static void hub_setup_prb(nasid_t nasid, int prbnum, int credits)
|
||||||
prb.iprb_ff = force_fire_and_forget ? 1 : 0;
|
prb.iprb_ff = force_fire_and_forget ? 1 : 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the appropriate number of PIO cresits for the widget.
|
* Set the appropriate number of PIO credits for the widget.
|
||||||
*/
|
*/
|
||||||
prb.iprb_xtalkctr = credits;
|
prb.iprb_xtalkctr = credits;
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ typedef unsigned long machreg_t;
|
||||||
static arch_spinlock_t nmi_lock = __ARCH_SPIN_LOCK_UNLOCKED;
|
static arch_spinlock_t nmi_lock = __ARCH_SPIN_LOCK_UNLOCKED;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lets see what else we need to do here. Set up sp, gp?
|
* Let's see what else we need to do here. Set up sp, gp?
|
||||||
*/
|
*/
|
||||||
void nmi_dump(void)
|
void nmi_dump(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -67,7 +67,7 @@ static int xbow_probe(nasid_t nasid)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Okay, here's a xbow. Lets arbitrate and find
|
* Okay, here's a xbow. Let's arbitrate and find
|
||||||
* out if we should initialize it. Set enabled
|
* out if we should initialize it. Set enabled
|
||||||
* hub connected at highest or lowest widget as
|
* hub connected at highest or lowest widget as
|
||||||
* master.
|
* master.
|
||||||
|
|
|
@ -263,7 +263,7 @@ void sni_rm200_mask_and_ack_8259A(struct irq_data *d)
|
||||||
static int spurious_irq_mask;
|
static int spurious_irq_mask;
|
||||||
/*
|
/*
|
||||||
* At this point we can be sure the IRQ is spurious,
|
* At this point we can be sure the IRQ is spurious,
|
||||||
* lets ACK and report it. [once per IRQ]
|
* let's ACK and report it. [once per IRQ]
|
||||||
*/
|
*/
|
||||||
if (!(spurious_irq_mask & irqmask)) {
|
if (!(spurious_irq_mask & irqmask)) {
|
||||||
printk(KERN_DEBUG
|
printk(KERN_DEBUG
|
||||||
|
|
|
@ -5,10 +5,12 @@ obj-vdso-y := elf.o gettimeofday.o sigreturn.o
|
||||||
ccflags-vdso := \
|
ccflags-vdso := \
|
||||||
$(filter -I%,$(KBUILD_CFLAGS)) \
|
$(filter -I%,$(KBUILD_CFLAGS)) \
|
||||||
$(filter -E%,$(KBUILD_CFLAGS)) \
|
$(filter -E%,$(KBUILD_CFLAGS)) \
|
||||||
|
$(filter -mmicromips,$(KBUILD_CFLAGS)) \
|
||||||
$(filter -march=%,$(KBUILD_CFLAGS))
|
$(filter -march=%,$(KBUILD_CFLAGS))
|
||||||
cflags-vdso := $(ccflags-vdso) \
|
cflags-vdso := $(ccflags-vdso) \
|
||||||
$(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \
|
$(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \
|
||||||
-O2 -g -fPIC -fno-common -fno-builtin -G 0 -DDISABLE_BRANCH_PROFILING \
|
-O2 -g -fPIC -fno-strict-aliasing -fno-common -fno-builtin -G 0 \
|
||||||
|
-DDISABLE_BRANCH_PROFILING \
|
||||||
$(call cc-option, -fno-stack-protector)
|
$(call cc-option, -fno-stack-protector)
|
||||||
aflags-vdso := $(ccflags-vdso) \
|
aflags-vdso := $(ccflags-vdso) \
|
||||||
$(filter -I%,$(KBUILD_CFLAGS)) \
|
$(filter -I%,$(KBUILD_CFLAGS)) \
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*
|
*
|
||||||
* Copyright (C) 2001-2002 MontaVista Software Inc.
|
* Copyright (C) 2001-2002 MontaVista Software Inc.
|
||||||
* Author: Yoichi Yuasa <source@mvista.com>
|
* Author: Yoichi Yuasa <source@mvista.com>
|
||||||
* Copuright (C) 2003-2005 Yoichi Yuasa <yuasa@linux-mips.org>
|
* Copyright (C) 2003-2005 Yoichi Yuasa <yuasa@linux-mips.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
#include <sysdep/ptrace.h>
|
#include <sysdep/ptrace.h>
|
||||||
#include <sysdep/archsetjmp.h>
|
#include <sysdep/archsetjmp.h>
|
||||||
|
|
||||||
|
extern int save_i387_registers(int pid, unsigned long *fp_regs);
|
||||||
|
extern int restore_i387_registers(int pid, unsigned long *fp_regs);
|
||||||
extern int save_fp_registers(int pid, unsigned long *fp_regs);
|
extern int save_fp_registers(int pid, unsigned long *fp_regs);
|
||||||
extern int restore_fp_registers(int pid, unsigned long *fp_regs);
|
extern int restore_fp_registers(int pid, unsigned long *fp_regs);
|
||||||
extern int save_fpx_registers(int pid, unsigned long *fp_regs);
|
extern int save_fpx_registers(int pid, unsigned long *fp_regs);
|
||||||
|
|
|
@ -398,6 +398,6 @@ int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu)
|
||||||
{
|
{
|
||||||
int cpu = current_thread_info()->cpu;
|
int cpu = current_thread_info()->cpu;
|
||||||
|
|
||||||
return save_fp_registers(userspace_pid[cpu], (unsigned long *) fpu);
|
return save_i387_registers(userspace_pid[cpu], (unsigned long *) fpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,23 +29,29 @@ void (*sig_info[NSIG])(int, struct siginfo *, struct uml_pt_regs *) = {
|
||||||
|
|
||||||
static void sig_handler_common(int sig, struct siginfo *si, mcontext_t *mc)
|
static void sig_handler_common(int sig, struct siginfo *si, mcontext_t *mc)
|
||||||
{
|
{
|
||||||
struct uml_pt_regs r;
|
struct uml_pt_regs *r;
|
||||||
int save_errno = errno;
|
int save_errno = errno;
|
||||||
|
|
||||||
r.is_user = 0;
|
r = malloc(sizeof(struct uml_pt_regs));
|
||||||
|
if (!r)
|
||||||
|
panic("out of memory");
|
||||||
|
|
||||||
|
r->is_user = 0;
|
||||||
if (sig == SIGSEGV) {
|
if (sig == SIGSEGV) {
|
||||||
/* For segfaults, we want the data from the sigcontext. */
|
/* For segfaults, we want the data from the sigcontext. */
|
||||||
get_regs_from_mc(&r, mc);
|
get_regs_from_mc(r, mc);
|
||||||
GET_FAULTINFO_FROM_MC(r.faultinfo, mc);
|
GET_FAULTINFO_FROM_MC(r->faultinfo, mc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* enable signals if sig isn't IRQ signal */
|
/* enable signals if sig isn't IRQ signal */
|
||||||
if ((sig != SIGIO) && (sig != SIGWINCH) && (sig != SIGALRM))
|
if ((sig != SIGIO) && (sig != SIGWINCH) && (sig != SIGALRM))
|
||||||
unblock_signals();
|
unblock_signals();
|
||||||
|
|
||||||
(*sig_info[sig])(sig, si, &r);
|
(*sig_info[sig])(sig, si, r);
|
||||||
|
|
||||||
errno = save_errno;
|
errno = save_errno;
|
||||||
|
|
||||||
|
free(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -83,11 +89,17 @@ void sig_handler(int sig, struct siginfo *si, mcontext_t *mc)
|
||||||
|
|
||||||
static void timer_real_alarm_handler(mcontext_t *mc)
|
static void timer_real_alarm_handler(mcontext_t *mc)
|
||||||
{
|
{
|
||||||
struct uml_pt_regs regs;
|
struct uml_pt_regs *regs;
|
||||||
|
|
||||||
|
regs = malloc(sizeof(struct uml_pt_regs));
|
||||||
|
if (!regs)
|
||||||
|
panic("out of memory");
|
||||||
|
|
||||||
if (mc != NULL)
|
if (mc != NULL)
|
||||||
get_regs_from_mc(®s, mc);
|
get_regs_from_mc(regs, mc);
|
||||||
timer_handler(SIGALRM, NULL, ®s);
|
timer_handler(SIGALRM, NULL, regs);
|
||||||
|
|
||||||
|
free(regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void timer_alarm_handler(int sig, struct siginfo *unused_si, mcontext_t *mc)
|
void timer_alarm_handler(int sig, struct siginfo *unused_si, mcontext_t *mc)
|
||||||
|
|
|
@ -116,12 +116,12 @@ static struct linux_binfmt aout_format = {
|
||||||
.min_coredump = PAGE_SIZE
|
.min_coredump = PAGE_SIZE
|
||||||
};
|
};
|
||||||
|
|
||||||
static unsigned long set_brk(unsigned long start, unsigned long end)
|
static int set_brk(unsigned long start, unsigned long end)
|
||||||
{
|
{
|
||||||
start = PAGE_ALIGN(start);
|
start = PAGE_ALIGN(start);
|
||||||
end = PAGE_ALIGN(end);
|
end = PAGE_ALIGN(end);
|
||||||
if (end <= start)
|
if (end <= start)
|
||||||
return start;
|
return 0;
|
||||||
return vm_brk(start, end - start);
|
return vm_brk(start, end - start);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -321,7 +321,7 @@ static int load_aout_binary(struct linux_binprm *bprm)
|
||||||
|
|
||||||
error = vm_brk(text_addr & PAGE_MASK, map_size);
|
error = vm_brk(text_addr & PAGE_MASK, map_size);
|
||||||
|
|
||||||
if (error != (text_addr & PAGE_MASK))
|
if (error)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
error = read_code(bprm->file, text_addr, 32,
|
error = read_code(bprm->file, text_addr, 32,
|
||||||
|
@ -350,7 +350,7 @@ static int load_aout_binary(struct linux_binprm *bprm)
|
||||||
|
|
||||||
if (!bprm->file->f_op->mmap || (fd_offset & ~PAGE_MASK) != 0) {
|
if (!bprm->file->f_op->mmap || (fd_offset & ~PAGE_MASK) != 0) {
|
||||||
error = vm_brk(N_TXTADDR(ex), ex.a_text+ex.a_data);
|
error = vm_brk(N_TXTADDR(ex), ex.a_text+ex.a_data);
|
||||||
if (IS_ERR_VALUE(error))
|
if (error)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
read_code(bprm->file, N_TXTADDR(ex), fd_offset,
|
read_code(bprm->file, N_TXTADDR(ex), fd_offset,
|
||||||
|
@ -378,7 +378,7 @@ static int load_aout_binary(struct linux_binprm *bprm)
|
||||||
|
|
||||||
beyond_if:
|
beyond_if:
|
||||||
error = set_brk(current->mm->start_brk, current->mm->brk);
|
error = set_brk(current->mm->start_brk, current->mm->brk);
|
||||||
if (IS_ERR_VALUE(error))
|
if (error)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
set_binfmt(&aout_format);
|
set_binfmt(&aout_format);
|
||||||
|
@ -441,7 +441,7 @@ static int load_aout_library(struct file *file)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
retval = vm_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss);
|
retval = vm_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss);
|
||||||
if (IS_ERR_VALUE(retval))
|
if (retval)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
read_code(file, start_addr, N_TXTOFF(ex),
|
read_code(file, start_addr, N_TXTOFF(ex),
|
||||||
|
@ -461,9 +461,8 @@ static int load_aout_library(struct file *file)
|
||||||
len = PAGE_ALIGN(ex.a_text + ex.a_data);
|
len = PAGE_ALIGN(ex.a_text + ex.a_data);
|
||||||
bss = ex.a_text + ex.a_data + ex.a_bss;
|
bss = ex.a_text + ex.a_data + ex.a_bss;
|
||||||
if (bss > len) {
|
if (bss > len) {
|
||||||
error = vm_brk(start_addr + len, bss - len);
|
retval = vm_brk(start_addr + len, bss - len);
|
||||||
retval = error;
|
if (retval)
|
||||||
if (error != start_addr + len)
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
retval = 0;
|
retval = 0;
|
||||||
|
|
|
@ -99,7 +99,7 @@ struct telemetry_core_ops {
|
||||||
int (*reset_events)(void);
|
int (*reset_events)(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
int telemetry_set_pltdata(struct telemetry_core_ops *ops,
|
int telemetry_set_pltdata(const struct telemetry_core_ops *ops,
|
||||||
struct telemetry_plt_config *pltconfig);
|
struct telemetry_plt_config *pltconfig);
|
||||||
|
|
||||||
int telemetry_clear_pltdata(void);
|
int telemetry_clear_pltdata(void);
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
* Intel Core SoC Power Management Controller Header File
|
||||||
|
*
|
||||||
|
* Copyright (c) 2016, Intel Corporation.
|
||||||
|
* All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Authors: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
|
||||||
|
* Vishwanath Somayaji <vishwanath.somayaji@intel.com>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms and conditions of the GNU General Public License,
|
||||||
|
* version 2, as published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _ASM_PMC_CORE_H
|
||||||
|
#define _ASM_PMC_CORE_H
|
||||||
|
|
||||||
|
/* API to read SLP_S0_RESIDENCY counter */
|
||||||
|
int intel_pmc_slp_s0_counter_read(u32 *data);
|
||||||
|
|
||||||
|
#endif /* _ASM_PMC_CORE_H */
|
|
@ -11,21 +11,56 @@
|
||||||
#endif
|
#endif
|
||||||
#include <longjmp.h>
|
#include <longjmp.h>
|
||||||
#include <sysdep/ptrace_user.h>
|
#include <sysdep/ptrace_user.h>
|
||||||
|
#include <sys/uio.h>
|
||||||
|
#include <asm/sigcontext.h>
|
||||||
|
#include <linux/elf.h>
|
||||||
|
|
||||||
int save_fp_registers(int pid, unsigned long *fp_regs)
|
int have_xstate_support;
|
||||||
|
|
||||||
|
int save_i387_registers(int pid, unsigned long *fp_regs)
|
||||||
{
|
{
|
||||||
if (ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0)
|
if (ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0)
|
||||||
return -errno;
|
return -errno;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int restore_fp_registers(int pid, unsigned long *fp_regs)
|
int save_fp_registers(int pid, unsigned long *fp_regs)
|
||||||
|
{
|
||||||
|
struct iovec iov;
|
||||||
|
|
||||||
|
if (have_xstate_support) {
|
||||||
|
iov.iov_base = fp_regs;
|
||||||
|
iov.iov_len = sizeof(struct _xstate);
|
||||||
|
if (ptrace(PTRACE_GETREGSET, pid, NT_X86_XSTATE, &iov) < 0)
|
||||||
|
return -errno;
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
return save_i387_registers(pid, fp_regs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int restore_i387_registers(int pid, unsigned long *fp_regs)
|
||||||
{
|
{
|
||||||
if (ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0)
|
if (ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0)
|
||||||
return -errno;
|
return -errno;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int restore_fp_registers(int pid, unsigned long *fp_regs)
|
||||||
|
{
|
||||||
|
struct iovec iov;
|
||||||
|
|
||||||
|
if (have_xstate_support) {
|
||||||
|
iov.iov_base = fp_regs;
|
||||||
|
iov.iov_len = sizeof(struct _xstate);
|
||||||
|
if (ptrace(PTRACE_SETREGSET, pid, NT_X86_XSTATE, &iov) < 0)
|
||||||
|
return -errno;
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
return restore_i387_registers(pid, fp_regs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
int have_fpx_regs = 1;
|
int have_fpx_regs = 1;
|
||||||
int save_fpx_registers(int pid, unsigned long *fp_regs)
|
int save_fpx_registers(int pid, unsigned long *fp_regs)
|
||||||
|
@ -85,6 +120,16 @@ int put_fp_registers(int pid, unsigned long *regs)
|
||||||
return restore_fp_registers(pid, regs);
|
return restore_fp_registers(pid, regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void arch_init_registers(int pid)
|
||||||
|
{
|
||||||
|
struct _xstate fp_regs;
|
||||||
|
struct iovec iov;
|
||||||
|
|
||||||
|
iov.iov_base = &fp_regs;
|
||||||
|
iov.iov_len = sizeof(struct _xstate);
|
||||||
|
if (ptrace(PTRACE_GETREGSET, pid, NT_X86_XSTATE, &iov) == 0)
|
||||||
|
have_xstate_support = 1;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
unsigned long get_thread_reg(int reg, jmp_buf *buf)
|
unsigned long get_thread_reg(int reg, jmp_buf *buf)
|
||||||
|
|
|
@ -194,7 +194,8 @@ static int get_fpregs(struct user_i387_struct __user *buf, struct task_struct *c
|
||||||
int err, n, cpu = ((struct thread_info *) child->stack)->cpu;
|
int err, n, cpu = ((struct thread_info *) child->stack)->cpu;
|
||||||
struct user_i387_struct fpregs;
|
struct user_i387_struct fpregs;
|
||||||
|
|
||||||
err = save_fp_registers(userspace_pid[cpu], (unsigned long *) &fpregs);
|
err = save_i387_registers(userspace_pid[cpu],
|
||||||
|
(unsigned long *) &fpregs);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
@ -214,7 +215,7 @@ static int set_fpregs(struct user_i387_struct __user *buf, struct task_struct *c
|
||||||
if (n > 0)
|
if (n > 0)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
return restore_fp_registers(userspace_pid[cpu],
|
return restore_i387_registers(userspace_pid[cpu],
|
||||||
(unsigned long *) &fpregs);
|
(unsigned long *) &fpregs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue