Merge branch 'sched/urgent' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
4765096f4f
|
@ -15,6 +15,8 @@ Constructor parameters:
|
|||
size)
|
||||
5. the number of optional parameters (the parameters with an argument
|
||||
count as two)
|
||||
start_sector n (default: 0)
|
||||
offset from the start of cache device in 512-byte sectors
|
||||
high_watermark n (default: 50)
|
||||
start writeback when the number of used blocks reach this
|
||||
watermark
|
||||
|
|
|
@ -66,7 +66,7 @@ Required root node properties:
|
|||
- "insignal,arndale-octa" - for Exynos5420-based Insignal Arndale
|
||||
Octa board.
|
||||
- "insignal,origen" - for Exynos4210-based Insignal Origen board.
|
||||
- "insignal,origen4412 - for Exynos4412-based Insignal Origen board.
|
||||
- "insignal,origen4412" - for Exynos4412-based Insignal Origen board.
|
||||
|
||||
|
||||
Optional nodes:
|
||||
|
|
|
@ -36,7 +36,7 @@ Optional nodes:
|
|||
|
||||
- port/ports: to describe a connection to an external encoder. The
|
||||
binding follows Documentation/devicetree/bindings/graph.txt and
|
||||
suppors a single port with a single endpoint.
|
||||
supports a single port with a single endpoint.
|
||||
|
||||
- See also Documentation/devicetree/bindings/display/tilcdc/panel.txt and
|
||||
Documentation/devicetree/bindings/display/tilcdc/tfp410.txt for connecting
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Nintendo Wii (Hollywood) GPIO controller
|
||||
|
||||
Required properties:
|
||||
- compatible: "nintendo,hollywood-gpio
|
||||
- compatible: "nintendo,hollywood-gpio"
|
||||
- reg: Physical base address and length of the controller's registers.
|
||||
- gpio-controller: Marks the device node as a GPIO controller.
|
||||
- #gpio-cells: Should be <2>. The first cell is the pin number and the
|
||||
|
|
|
@ -32,7 +32,7 @@ i2c@00000000 {
|
|||
reg = <0x6c>;
|
||||
interrupt-parent = <&gpx1>;
|
||||
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
|
||||
vdd-supply = <&ldo15_reg>";
|
||||
vdd-supply = <&ldo15_reg>;
|
||||
vid-supply = <&ldo18_reg>;
|
||||
reset-gpios = <&gpx1 5 0>;
|
||||
touchscreen-size-x = <1080>;
|
||||
|
|
|
@ -15,7 +15,7 @@ Required properties:
|
|||
include "nvidia,tegra30-ictlr".
|
||||
- reg : Specifies base physical address and size of the registers.
|
||||
Each controller must be described separately (Tegra20 has 4 of them,
|
||||
whereas Tegra30 and later have 5"
|
||||
whereas Tegra30 and later have 5).
|
||||
- interrupt-controller : Identifies the node as an interrupt controller.
|
||||
- #interrupt-cells : Specifies the number of cells needed to encode an
|
||||
interrupt source. The value must be 3.
|
||||
|
|
|
@ -12,7 +12,7 @@ Required properties:
|
|||
specifier, shall be 2
|
||||
- interrupts: interrupts references to primary interrupt controller
|
||||
(only needed for exti controller with multiple exti under
|
||||
same parent interrupt: st,stm32-exti and st,stm32h7-exti")
|
||||
same parent interrupt: st,stm32-exti and st,stm32h7-exti)
|
||||
|
||||
Example:
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ Required properties:
|
|||
- compatible : should contain one of:
|
||||
"brcm,bcm7425-timers"
|
||||
"brcm,bcm7429-timers"
|
||||
"brcm,bcm7435-timers and
|
||||
"brcm,bcm7435-timers" and
|
||||
"brcm,brcmstb-timers"
|
||||
- reg : the timers register range
|
||||
- interrupts : the interrupt line for this timer block
|
||||
|
|
|
@ -238,7 +238,7 @@ PROPERTIES
|
|||
Must include one of the following:
|
||||
- "fsl,fman-dtsec" for dTSEC MAC
|
||||
- "fsl,fman-xgec" for XGEC MAC
|
||||
- "fsl,fman-memac for mEMAC MAC
|
||||
- "fsl,fman-memac" for mEMAC MAC
|
||||
|
||||
- cell-index
|
||||
Usage: required
|
||||
|
|
|
@ -133,7 +133,7 @@ located inside a PM domain with index 0 of a power controller represented by a
|
|||
node with the label "power".
|
||||
In the second example the consumer device are partitioned across two PM domains,
|
||||
the first with index 0 and the second with index 1, of a power controller that
|
||||
is represented by a node with the label "power.
|
||||
is represented by a node with the label "power".
|
||||
|
||||
Optional properties:
|
||||
- required-opps: This contains phandle to an OPP node in another device's OPP
|
||||
|
|
|
@ -16,7 +16,7 @@ Required properties:
|
|||
Optional properties:
|
||||
- ti,enable-ext-control: This is applicable for DCDC1, DCDC2 and DCDC3.
|
||||
If DCDCs are externally controlled then this property should be there.
|
||||
- "dcdc-ext-control-gpios: This is applicable for DCDC1, DCDC2 and DCDC3.
|
||||
- dcdc-ext-control-gpios: This is applicable for DCDC1, DCDC2 and DCDC3.
|
||||
If DCDCs are externally controlled and if it is from GPIO then GPIO
|
||||
number should be provided. If it is externally controlled and no GPIO
|
||||
entry then driver will just configure this rails as external control
|
||||
|
|
|
@ -15,7 +15,7 @@ Please refer to reset.txt in this directory for common reset
|
|||
controller binding usage.
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be st,stih407-softreset";
|
||||
- compatible: Should be "st,stih407-softreset";
|
||||
- #reset-cells: 1, see below
|
||||
|
||||
example:
|
||||
|
|
|
@ -39,7 +39,7 @@ Required properties:
|
|||
|
||||
Optional property:
|
||||
- clock-frequency: Desired I2C bus clock frequency in Hz.
|
||||
When missing default to 400000Hz.
|
||||
When missing default to 100000Hz.
|
||||
|
||||
Child nodes should conform to I2C bus binding as described in i2c.txt.
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ Required properties:
|
|||
|
||||
Board connectors:
|
||||
* Headset Mic
|
||||
* Secondary Mic",
|
||||
* Secondary Mic
|
||||
* DMIC
|
||||
* Ext Spk
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ This binding describes the APQ8096 sound card, which uses qdsp for audio.
|
|||
"Digital Mic3"
|
||||
|
||||
Audio pins and MicBias on WCD9335 Codec:
|
||||
"MIC_BIAS1
|
||||
"MIC_BIAS1"
|
||||
"MIC_BIAS2"
|
||||
"MIC_BIAS3"
|
||||
"MIC_BIAS4"
|
||||
|
|
|
@ -15,7 +15,7 @@ Optional properties:
|
|||
|
||||
Examples:
|
||||
|
||||
onewire@0 {
|
||||
onewire {
|
||||
compatible = "w1-gpio";
|
||||
gpios = <&gpio 126 0>, <&gpio 105 0>;
|
||||
};
|
||||
|
|
|
@ -1490,7 +1490,7 @@ To remove an ARP target:
|
|||
|
||||
To configure the interval between learning packet transmits:
|
||||
# echo 12 > /sys/class/net/bond0/bonding/lp_interval
|
||||
NOTE: the lp_inteval is the number of seconds between instances where
|
||||
NOTE: the lp_interval is the number of seconds between instances where
|
||||
the bonding driver sends learning packets to each slaves peer switch. The
|
||||
default interval is 1 second.
|
||||
|
||||
|
|
|
@ -47,41 +47,45 @@ Driver Configuration Parameters
|
|||
The default value for each parameter is generally the recommended setting,
|
||||
unless otherwise noted.
|
||||
|
||||
Rx Descriptors: Number of receive descriptors. A receive descriptor is a data
|
||||
Rx Descriptors:
|
||||
Number of receive descriptors. A receive descriptor is a data
|
||||
structure that describes a receive buffer and its attributes to the network
|
||||
controller. The data in the descriptor is used by the controller to write
|
||||
data from the controller to host memory. In the 3.x.x driver the valid range
|
||||
for this parameter is 64-256. The default value is 256. This parameter can be
|
||||
changed using the command::
|
||||
|
||||
ethtool -G eth? rx n
|
||||
ethtool -G eth? rx n
|
||||
|
||||
Where n is the number of desired Rx descriptors.
|
||||
|
||||
Tx Descriptors: Number of transmit descriptors. A transmit descriptor is a data
|
||||
Tx Descriptors:
|
||||
Number of transmit descriptors. A transmit descriptor is a data
|
||||
structure that describes a transmit buffer and its attributes to the network
|
||||
controller. The data in the descriptor is used by the controller to read
|
||||
data from the host memory to the controller. In the 3.x.x driver the valid
|
||||
range for this parameter is 64-256. The default value is 128. This parameter
|
||||
can be changed using the command::
|
||||
|
||||
ethtool -G eth? tx n
|
||||
ethtool -G eth? tx n
|
||||
|
||||
Where n is the number of desired Tx descriptors.
|
||||
|
||||
Speed/Duplex: The driver auto-negotiates the link speed and duplex settings by
|
||||
Speed/Duplex:
|
||||
The driver auto-negotiates the link speed and duplex settings by
|
||||
default. The ethtool utility can be used as follows to force speed/duplex.::
|
||||
|
||||
ethtool -s eth? autoneg off speed {10|100} duplex {full|half}
|
||||
ethtool -s eth? autoneg off speed {10|100} duplex {full|half}
|
||||
|
||||
NOTE: setting the speed/duplex to incorrect values will cause the link to
|
||||
fail.
|
||||
|
||||
Event Log Message Level: The driver uses the message level flag to log events
|
||||
Event Log Message Level:
|
||||
The driver uses the message level flag to log events
|
||||
to syslog. The message level can be set at driver load time. It can also be
|
||||
set using the command::
|
||||
|
||||
ethtool -s eth? msglvl n
|
||||
ethtool -s eth? msglvl n
|
||||
|
||||
|
||||
Additional Configurations
|
||||
|
@ -92,7 +96,7 @@ Configuring the Driver on Different Distributions
|
|||
|
||||
Configuring a network driver to load properly when the system is started
|
||||
is distribution dependent. Typically, the configuration process involves
|
||||
adding an alias line to /etc/modprobe.d/*.conf as well as editing other
|
||||
adding an alias line to `/etc/modprobe.d/*.conf` as well as editing other
|
||||
system startup scripts and/or configuration files. Many popular Linux
|
||||
distributions ship with tools to make these changes for you. To learn
|
||||
the proper way to configure a network device for your system, refer to
|
||||
|
@ -160,7 +164,10 @@ This results in unbalanced receive traffic.
|
|||
If you have multiple interfaces in a server, either turn on ARP
|
||||
filtering by
|
||||
|
||||
(1) entering:: echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
|
||||
(1) entering::
|
||||
|
||||
echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
|
||||
|
||||
(this only works if your kernel's version is higher than 2.4.5), or
|
||||
|
||||
(2) installing the interfaces in separate broadcast domains (either
|
||||
|
|
|
@ -34,7 +34,8 @@ Command Line Parameters
|
|||
The default value for each parameter is generally the recommended setting,
|
||||
unless otherwise noted.
|
||||
|
||||
NOTES: For more information about the AutoNeg, Duplex, and Speed
|
||||
NOTES:
|
||||
For more information about the AutoNeg, Duplex, and Speed
|
||||
parameters, see the "Speed and Duplex Configuration" section in
|
||||
this document.
|
||||
|
||||
|
@ -45,22 +46,27 @@ NOTES: For more information about the AutoNeg, Duplex, and Speed
|
|||
|
||||
AutoNeg
|
||||
-------
|
||||
|
||||
(Supported only on adapters with copper connections)
|
||||
Valid Range: 0x01-0x0F, 0x20-0x2F
|
||||
Default Value: 0x2F
|
||||
|
||||
:Valid Range: 0x01-0x0F, 0x20-0x2F
|
||||
:Default Value: 0x2F
|
||||
|
||||
This parameter is a bit-mask that specifies the speed and duplex settings
|
||||
advertised by the adapter. When this parameter is used, the Speed and
|
||||
Duplex parameters must not be specified.
|
||||
|
||||
NOTE: Refer to the Speed and Duplex section of this readme for more
|
||||
NOTE:
|
||||
Refer to the Speed and Duplex section of this readme for more
|
||||
information on the AutoNeg parameter.
|
||||
|
||||
Duplex
|
||||
------
|
||||
|
||||
(Supported only on adapters with copper connections)
|
||||
Valid Range: 0-2 (0=auto-negotiate, 1=half, 2=full)
|
||||
Default Value: 0
|
||||
|
||||
:Valid Range: 0-2 (0=auto-negotiate, 1=half, 2=full)
|
||||
:Default Value: 0
|
||||
|
||||
This defines the direction in which data is allowed to flow. Can be
|
||||
either one or two-directional. If both Duplex and the link partner are
|
||||
|
@ -70,18 +76,22 @@ duplex.
|
|||
|
||||
FlowControl
|
||||
-----------
|
||||
Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx)
|
||||
Default Value: Reads flow control settings from the EEPROM
|
||||
|
||||
:Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx)
|
||||
:Default Value: Reads flow control settings from the EEPROM
|
||||
|
||||
This parameter controls the automatic generation(Tx) and response(Rx)
|
||||
to Ethernet PAUSE frames.
|
||||
|
||||
InterruptThrottleRate
|
||||
---------------------
|
||||
|
||||
(not supported on Intel(R) 82542, 82543 or 82544-based adapters)
|
||||
Valid Range: 0,1,3,4,100-100000 (0=off, 1=dynamic, 3=dynamic conservative,
|
||||
4=simplified balancing)
|
||||
Default Value: 3
|
||||
|
||||
:Valid Range:
|
||||
0,1,3,4,100-100000 (0=off, 1=dynamic, 3=dynamic conservative,
|
||||
4=simplified balancing)
|
||||
:Default Value: 3
|
||||
|
||||
The driver can limit the amount of interrupts per second that the adapter
|
||||
will generate for incoming packets. It does this by writing a value to the
|
||||
|
@ -135,13 +145,15 @@ Setting InterruptThrottleRate to 0 turns off any interrupt moderation
|
|||
and may improve small packet latency, but is generally not suitable
|
||||
for bulk throughput traffic.
|
||||
|
||||
NOTE: InterruptThrottleRate takes precedence over the TxAbsIntDelay and
|
||||
NOTE:
|
||||
InterruptThrottleRate takes precedence over the TxAbsIntDelay and
|
||||
RxAbsIntDelay parameters. In other words, minimizing the receive
|
||||
and/or transmit absolute delays does not force the controller to
|
||||
generate more interrupts than what the Interrupt Throttle Rate
|
||||
allows.
|
||||
|
||||
CAUTION: If you are using the Intel(R) PRO/1000 CT Network Connection
|
||||
CAUTION:
|
||||
If you are using the Intel(R) PRO/1000 CT Network Connection
|
||||
(controller 82547), setting InterruptThrottleRate to a value
|
||||
greater than 75,000, may hang (stop transmitting) adapters
|
||||
under certain network conditions. If this occurs a NETDEV
|
||||
|
@ -151,7 +163,8 @@ CAUTION: If you are using the Intel(R) PRO/1000 CT Network Connection
|
|||
hang, ensure that InterruptThrottleRate is set no greater
|
||||
than 75,000 and is not set to 0.
|
||||
|
||||
NOTE: When e1000 is loaded with default settings and multiple adapters
|
||||
NOTE:
|
||||
When e1000 is loaded with default settings and multiple adapters
|
||||
are in use simultaneously, the CPU utilization may increase non-
|
||||
linearly. In order to limit the CPU utilization without impacting
|
||||
the overall throughput, we recommend that you load the driver as
|
||||
|
@ -168,9 +181,11 @@ NOTE: When e1000 is loaded with default settings and multiple adapters
|
|||
|
||||
RxDescriptors
|
||||
-------------
|
||||
Valid Range: 48-256 for 82542 and 82543-based adapters
|
||||
48-4096 for all other supported adapters
|
||||
Default Value: 256
|
||||
|
||||
:Valid Range:
|
||||
- 48-256 for 82542 and 82543-based adapters
|
||||
- 48-4096 for all other supported adapters
|
||||
:Default Value: 256
|
||||
|
||||
This value specifies the number of receive buffer descriptors allocated
|
||||
by the driver. Increasing this value allows the driver to buffer more
|
||||
|
@ -180,15 +195,17 @@ Each descriptor is 16 bytes. A receive buffer is also allocated for each
|
|||
descriptor and can be either 2048, 4096, 8192, or 16384 bytes, depending
|
||||
on the MTU setting. The maximum MTU size is 16110.
|
||||
|
||||
NOTE: MTU designates the frame size. It only needs to be set for Jumbo
|
||||
NOTE:
|
||||
MTU designates the frame size. It only needs to be set for Jumbo
|
||||
Frames. Depending on the available system resources, the request
|
||||
for a higher number of receive descriptors may be denied. In this
|
||||
case, use a lower number.
|
||||
|
||||
RxIntDelay
|
||||
----------
|
||||
Valid Range: 0-65535 (0=off)
|
||||
Default Value: 0
|
||||
|
||||
:Valid Range: 0-65535 (0=off)
|
||||
:Default Value: 0
|
||||
|
||||
This value delays the generation of receive interrupts in units of 1.024
|
||||
microseconds. Receive interrupt reduction can improve CPU efficiency if
|
||||
|
@ -198,7 +215,8 @@ of TCP traffic. If the system is reporting dropped receives, this value
|
|||
may be set too high, causing the driver to run out of available receive
|
||||
descriptors.
|
||||
|
||||
CAUTION: When setting RxIntDelay to a value other than 0, adapters may
|
||||
CAUTION:
|
||||
When setting RxIntDelay to a value other than 0, adapters may
|
||||
hang (stop transmitting) under certain network conditions. If
|
||||
this occurs a NETDEV WATCHDOG message is logged in the system
|
||||
event log. In addition, the controller is automatically reset,
|
||||
|
@ -207,9 +225,11 @@ CAUTION: When setting RxIntDelay to a value other than 0, adapters may
|
|||
|
||||
RxAbsIntDelay
|
||||
-------------
|
||||
|
||||
(This parameter is supported only on 82540, 82545 and later adapters.)
|
||||
Valid Range: 0-65535 (0=off)
|
||||
Default Value: 128
|
||||
|
||||
:Valid Range: 0-65535 (0=off)
|
||||
:Default Value: 128
|
||||
|
||||
This value, in units of 1.024 microseconds, limits the delay in which a
|
||||
receive interrupt is generated. Useful only if RxIntDelay is non-zero,
|
||||
|
@ -220,9 +240,11 @@ conditions.
|
|||
|
||||
Speed
|
||||
-----
|
||||
|
||||
(This parameter is supported only on adapters with copper connections.)
|
||||
Valid Settings: 0, 10, 100, 1000
|
||||
Default Value: 0 (auto-negotiate at all supported speeds)
|
||||
|
||||
:Valid Settings: 0, 10, 100, 1000
|
||||
:Default Value: 0 (auto-negotiate at all supported speeds)
|
||||
|
||||
Speed forces the line speed to the specified value in megabits per second
|
||||
(Mbps). If this parameter is not specified or is set to 0 and the link
|
||||
|
@ -231,22 +253,26 @@ speed. Duplex should also be set when Speed is set to either 10 or 100.
|
|||
|
||||
TxDescriptors
|
||||
-------------
|
||||
Valid Range: 48-256 for 82542 and 82543-based adapters
|
||||
48-4096 for all other supported adapters
|
||||
Default Value: 256
|
||||
|
||||
:Valid Range:
|
||||
- 48-256 for 82542 and 82543-based adapters
|
||||
- 48-4096 for all other supported adapters
|
||||
:Default Value: 256
|
||||
|
||||
This value is the number of transmit descriptors allocated by the driver.
|
||||
Increasing this value allows the driver to queue more transmits. Each
|
||||
descriptor is 16 bytes.
|
||||
|
||||
NOTE: Depending on the available system resources, the request for a
|
||||
NOTE:
|
||||
Depending on the available system resources, the request for a
|
||||
higher number of transmit descriptors may be denied. In this case,
|
||||
use a lower number.
|
||||
|
||||
TxIntDelay
|
||||
----------
|
||||
Valid Range: 0-65535 (0=off)
|
||||
Default Value: 8
|
||||
|
||||
:Valid Range: 0-65535 (0=off)
|
||||
:Default Value: 8
|
||||
|
||||
This value delays the generation of transmit interrupts in units of
|
||||
1.024 microseconds. Transmit interrupt reduction can improve CPU
|
||||
|
@ -256,9 +282,11 @@ causing the driver to run out of available transmit descriptors.
|
|||
|
||||
TxAbsIntDelay
|
||||
-------------
|
||||
|
||||
(This parameter is supported only on 82540, 82545 and later adapters.)
|
||||
Valid Range: 0-65535 (0=off)
|
||||
Default Value: 32
|
||||
|
||||
:Valid Range: 0-65535 (0=off)
|
||||
:Default Value: 32
|
||||
|
||||
This value, in units of 1.024 microseconds, limits the delay in which a
|
||||
transmit interrupt is generated. Useful only if TxIntDelay is non-zero,
|
||||
|
@ -269,18 +297,21 @@ network conditions.
|
|||
|
||||
XsumRX
|
||||
------
|
||||
|
||||
(This parameter is NOT supported on the 82542-based adapter.)
|
||||
Valid Range: 0-1
|
||||
Default Value: 1
|
||||
|
||||
:Valid Range: 0-1
|
||||
:Default Value: 1
|
||||
|
||||
A value of '1' indicates that the driver should enable IP checksum
|
||||
offload for received packets (both UDP and TCP) to the adapter hardware.
|
||||
|
||||
Copybreak
|
||||
---------
|
||||
Valid Range: 0-xxxxxxx (0=off)
|
||||
Default Value: 256
|
||||
Usage: modprobe e1000.ko copybreak=128
|
||||
|
||||
:Valid Range: 0-xxxxxxx (0=off)
|
||||
:Default Value: 256
|
||||
:Usage: modprobe e1000.ko copybreak=128
|
||||
|
||||
Driver copies all packets below or equaling this size to a fresh RX
|
||||
buffer before handing it up the stack.
|
||||
|
@ -292,8 +323,9 @@ it is also available during runtime at
|
|||
|
||||
SmartPowerDownEnable
|
||||
--------------------
|
||||
Valid Range: 0-1
|
||||
Default Value: 0 (disabled)
|
||||
|
||||
:Valid Range: 0-1
|
||||
:Default Value: 0 (disabled)
|
||||
|
||||
Allows PHY to turn off in lower power states. The user can turn off
|
||||
this parameter in supported chipsets.
|
||||
|
@ -309,14 +341,14 @@ fiber interface board only links at 1000 Mbps full-duplex.
|
|||
|
||||
For copper-based boards, the keywords interact as follows:
|
||||
|
||||
The default operation is auto-negotiate. The board advertises all
|
||||
- The default operation is auto-negotiate. The board advertises all
|
||||
supported speed and duplex combinations, and it links at the highest
|
||||
common speed and duplex mode IF the link partner is set to auto-negotiate.
|
||||
|
||||
If Speed = 1000, limited auto-negotiation is enabled and only 1000 Mbps
|
||||
- If Speed = 1000, limited auto-negotiation is enabled and only 1000 Mbps
|
||||
is advertised (The 1000BaseT spec requires auto-negotiation.)
|
||||
|
||||
If Speed = 10 or 100, then both Speed and Duplex should be set. Auto-
|
||||
- If Speed = 10 or 100, then both Speed and Duplex should be set. Auto-
|
||||
negotiation is disabled, and the AutoNeg parameter is ignored. Partner
|
||||
SHOULD also be forced.
|
||||
|
||||
|
@ -328,13 +360,15 @@ process.
|
|||
The parameter may be specified as either a decimal or hexadecimal value as
|
||||
determined by the bitmap below.
|
||||
|
||||
============== ====== ====== ======= ======= ====== ====== ======= ======
|
||||
Bit position 7 6 5 4 3 2 1 0
|
||||
Decimal Value 128 64 32 16 8 4 2 1
|
||||
Hex value 80 40 20 10 8 4 2 1
|
||||
Speed (Mbps) N/A N/A 1000 N/A 100 100 10 10
|
||||
Duplex Full Full Half Full Half
|
||||
============== ====== ====== ======= ======= ====== ====== ======= ======
|
||||
|
||||
Some examples of using AutoNeg:
|
||||
Some examples of using AutoNeg::
|
||||
|
||||
modprobe e1000 AutoNeg=0x01 (Restricts autonegotiation to 10 Half)
|
||||
modprobe e1000 AutoNeg=1 (Same as above)
|
||||
|
@ -357,56 +391,59 @@ Additional Configurations
|
|||
|
||||
Jumbo Frames
|
||||
------------
|
||||
Jumbo Frames support is enabled by changing the MTU to a value larger
|
||||
than the default of 1500. Use the ifconfig command to increase the MTU
|
||||
size. For example::
|
||||
|
||||
Jumbo Frames support is enabled by changing the MTU to a value larger than
|
||||
the default of 1500. Use the ifconfig command to increase the MTU size.
|
||||
For example::
|
||||
|
||||
ifconfig eth<x> mtu 9000 up
|
||||
|
||||
This setting is not saved across reboots. It can be made permanent if
|
||||
you add::
|
||||
This setting is not saved across reboots. It can be made permanent if
|
||||
you add::
|
||||
|
||||
MTU=9000
|
||||
|
||||
to the file /etc/sysconfig/network-scripts/ifcfg-eth<x>. This example
|
||||
applies to the Red Hat distributions; other distributions may store this
|
||||
setting in a different location.
|
||||
to the file /etc/sysconfig/network-scripts/ifcfg-eth<x>. This example
|
||||
applies to the Red Hat distributions; other distributions may store this
|
||||
setting in a different location.
|
||||
|
||||
Notes: Degradation in throughput performance may be observed in some
|
||||
Jumbo frames environments. If this is observed, increasing the
|
||||
application's socket buffer size and/or increasing the
|
||||
/proc/sys/net/ipv4/tcp_*mem entry values may help. See the specific
|
||||
application manual and /usr/src/linux*/Documentation/
|
||||
networking/ip-sysctl.txt for more details.
|
||||
Notes:
|
||||
Degradation in throughput performance may be observed in some Jumbo frames
|
||||
environments. If this is observed, increasing the application's socket buffer
|
||||
size and/or increasing the /proc/sys/net/ipv4/tcp_*mem entry values may help.
|
||||
See the specific application manual and /usr/src/linux*/Documentation/
|
||||
networking/ip-sysctl.txt for more details.
|
||||
|
||||
- The maximum MTU setting for Jumbo Frames is 16110. This value
|
||||
coincides with the maximum Jumbo Frames size of 16128.
|
||||
- The maximum MTU setting for Jumbo Frames is 16110. This value coincides
|
||||
with the maximum Jumbo Frames size of 16128.
|
||||
|
||||
- Using Jumbo frames at 10 or 100 Mbps is not supported and may result
|
||||
in poor performance or loss of link.
|
||||
- Using Jumbo frames at 10 or 100 Mbps is not supported and may result in
|
||||
poor performance or loss of link.
|
||||
|
||||
- Adapters based on the Intel(R) 82542 and 82573V/E controller do not
|
||||
support Jumbo Frames. These correspond to the following product names:
|
||||
Intel(R) PRO/1000 Gigabit Server Adapter Intel(R) PRO/1000 PM Network
|
||||
Connection
|
||||
- Adapters based on the Intel(R) 82542 and 82573V/E controller do not
|
||||
support Jumbo Frames. These correspond to the following product names::
|
||||
|
||||
Intel(R) PRO/1000 Gigabit Server Adapter
|
||||
Intel(R) PRO/1000 PM Network Connection
|
||||
|
||||
ethtool
|
||||
-------
|
||||
The driver utilizes the ethtool interface for driver configuration and
|
||||
diagnostics, as well as displaying statistical information. The ethtool
|
||||
version 1.6 or later is required for this functionality.
|
||||
|
||||
The latest release of ethtool can be found from
|
||||
https://www.kernel.org/pub/software/network/ethtool/
|
||||
The driver utilizes the ethtool interface for driver configuration and
|
||||
diagnostics, as well as displaying statistical information. The ethtool
|
||||
version 1.6 or later is required for this functionality.
|
||||
|
||||
The latest release of ethtool can be found from
|
||||
https://www.kernel.org/pub/software/network/ethtool/
|
||||
|
||||
Enabling Wake on LAN* (WoL)
|
||||
---------------------------
|
||||
WoL is configured through the ethtool* utility.
|
||||
|
||||
WoL will be enabled on the system during the next shut down or reboot.
|
||||
For this driver version, in order to enable WoL, the e1000 driver must be
|
||||
loaded when shutting down or rebooting the system.
|
||||
WoL is configured through the ethtool* utility.
|
||||
|
||||
WoL will be enabled on the system during the next shut down or reboot.
|
||||
For this driver version, in order to enable WoL, the e1000 driver must be
|
||||
loaded when shutting down or rebooting the system.
|
||||
|
||||
Support
|
||||
=======
|
||||
|
|
|
@ -2523,7 +2523,7 @@ S: Supported
|
|||
F: drivers/scsi/esas2r
|
||||
|
||||
ATUSB IEEE 802.15.4 RADIO DRIVER
|
||||
M: Stefan Schmidt <stefan@osg.samsung.com>
|
||||
M: Stefan Schmidt <stefan@datenfreihafen.org>
|
||||
L: linux-wpan@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/ieee802154/atusb.c
|
||||
|
@ -5790,7 +5790,6 @@ F: include/linux/fsl/
|
|||
|
||||
FREESCALE SOC FS_ENET DRIVER
|
||||
M: Pantelis Antoniou <pantelis.antoniou@gmail.com>
|
||||
M: Vitaly Bordug <vbordug@ru.mvista.com>
|
||||
L: linuxppc-dev@lists.ozlabs.org
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
|
@ -6909,7 +6908,7 @@ F: drivers/clk/clk-versaclock5.c
|
|||
|
||||
IEEE 802.15.4 SUBSYSTEM
|
||||
M: Alexander Aring <alex.aring@gmail.com>
|
||||
M: Stefan Schmidt <stefan@osg.samsung.com>
|
||||
M: Stefan Schmidt <stefan@datenfreihafen.org>
|
||||
L: linux-wpan@vger.kernel.org
|
||||
W: http://wpan.cakelab.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan.git
|
||||
|
@ -8629,7 +8628,7 @@ MARVELL MWIFIEX WIRELESS DRIVER
|
|||
M: Amitkumar Karwar <amitkarwar@gmail.com>
|
||||
M: Nishant Sarmukadam <nishants@marvell.com>
|
||||
M: Ganapathi Bhat <gbhat@marvell.com>
|
||||
M: Xinming Hu <huxm@marvell.com>
|
||||
M: Xinming Hu <huxinming820@gmail.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/wireless/marvell/mwifiex/
|
||||
|
@ -9075,7 +9074,7 @@ S: Maintained
|
|||
F: drivers/usb/mtu3/
|
||||
|
||||
MEGACHIPS STDPXXXX-GE-B850V3-FW LVDS/DP++ BRIDGES
|
||||
M: Peter Senna Tschudin <peter.senna@collabora.com>
|
||||
M: Peter Senna Tschudin <peter.senna@gmail.com>
|
||||
M: Martin Donnelly <martin.donnelly@ge.com>
|
||||
M: Martyn Welch <martyn.welch@collabora.co.uk>
|
||||
S: Maintained
|
||||
|
|
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 18
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc5
|
||||
EXTRAVERSION = -rc6
|
||||
NAME = Merciless Moray
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
@ -1180,13 +1180,10 @@ SYSCALL_DEFINE2(osf_getrusage, int, who, struct rusage32 __user *, ru)
|
|||
SYSCALL_DEFINE4(osf_wait4, pid_t, pid, int __user *, ustatus, int, options,
|
||||
struct rusage32 __user *, ur)
|
||||
{
|
||||
unsigned int status = 0;
|
||||
struct rusage r;
|
||||
long err = kernel_wait4(pid, &status, options, &r);
|
||||
long err = kernel_wait4(pid, ustatus, options, &r);
|
||||
if (err <= 0)
|
||||
return err;
|
||||
if (put_user(status, ustatus))
|
||||
return -EFAULT;
|
||||
if (!ur)
|
||||
return err;
|
||||
if (put_tv_to_tv32(&ur->ru_utime, &r.ru_utime))
|
||||
|
|
|
@ -413,7 +413,7 @@ config ARC_HAS_DIV_REM
|
|||
|
||||
config ARC_HAS_ACCL_REGS
|
||||
bool "Reg Pair ACCL:ACCH (FPU and/or MPY > 6)"
|
||||
default n
|
||||
default y
|
||||
help
|
||||
Depending on the configuration, CPU can contain accumulator reg-pair
|
||||
(also referred to as r58:r59). These can also be used by gcc as GPR so
|
||||
|
|
|
@ -16,7 +16,7 @@ endif
|
|||
|
||||
KBUILD_DEFCONFIG := nsim_700_defconfig
|
||||
|
||||
cflags-y += -fno-common -pipe -fno-builtin -D__linux__
|
||||
cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
|
||||
cflags-$(CONFIG_ISA_ARCOMPACT) += -mA7
|
||||
cflags-$(CONFIG_ISA_ARCV2) += -mcpu=archs
|
||||
|
||||
|
@ -140,16 +140,3 @@ dtbs: scripts
|
|||
|
||||
archclean:
|
||||
$(Q)$(MAKE) $(clean)=$(boot)
|
||||
|
||||
# Hacks to enable final link due to absence of link-time branch relexation
|
||||
# and gcc choosing optimal(shorter) branches at -O3
|
||||
#
|
||||
# vineetg Feb 2010: -mlong-calls switched off for overall kernel build
|
||||
# However lib/decompress_inflate.o (.init.text) calls
|
||||
# zlib_inflate_workspacesize (.text) causing relocation errors.
|
||||
# Thus forcing all exten calls in this file to be long calls
|
||||
export CFLAGS_decompress_inflate.o = -mmedium-calls
|
||||
export CFLAGS_initramfs.o = -mmedium-calls
|
||||
ifdef CONFIG_SMP
|
||||
export CFLAGS_core.o = -mmedium-calls
|
||||
endif
|
||||
|
|
|
@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y
|
|||
# CONFIG_UTS_NS is not set
|
||||
# CONFIG_PID_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE="../arc_initramfs/"
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_PERF_EVENTS=y
|
||||
# CONFIG_VM_EVENT_COUNTERS is not set
|
||||
|
|
|
@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y
|
|||
# CONFIG_UTS_NS is not set
|
||||
# CONFIG_PID_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_PERF_EVENTS=y
|
||||
# CONFIG_VM_EVENT_COUNTERS is not set
|
||||
|
|
|
@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y
|
|||
# CONFIG_UTS_NS is not set
|
||||
# CONFIG_PID_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_PERF_EVENTS=y
|
||||
# CONFIG_VM_EVENT_COUNTERS is not set
|
||||
|
|
|
@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y
|
|||
# CONFIG_UTS_NS is not set
|
||||
# CONFIG_PID_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
|
||||
CONFIG_EXPERT=y
|
||||
CONFIG_PERF_EVENTS=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
|
|
|
@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y
|
|||
# CONFIG_UTS_NS is not set
|
||||
# CONFIG_PID_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_PERF_EVENTS=y
|
||||
# CONFIG_VM_EVENT_COUNTERS is not set
|
||||
|
|
|
@ -9,7 +9,6 @@ CONFIG_NAMESPACES=y
|
|||
# CONFIG_UTS_NS is not set
|
||||
# CONFIG_PID_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_PERF_EVENTS=y
|
||||
# CONFIG_VM_EVENT_COUNTERS is not set
|
||||
|
|
|
@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y
|
|||
# CONFIG_UTS_NS is not set
|
||||
# CONFIG_PID_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE="../arc_initramfs/"
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_PERF_EVENTS=y
|
||||
|
|
|
@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y
|
|||
# CONFIG_UTS_NS is not set
|
||||
# CONFIG_PID_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_PERF_EVENTS=y
|
||||
|
|
|
@ -9,7 +9,6 @@ CONFIG_NAMESPACES=y
|
|||
# CONFIG_UTS_NS is not set
|
||||
# CONFIG_PID_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE="../arc_initramfs_hs/"
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_PERF_EVENTS=y
|
||||
|
|
|
@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y
|
|||
# CONFIG_UTS_NS is not set
|
||||
# CONFIG_PID_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE="../arc_initramfs/"
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_PERF_EVENTS=y
|
||||
|
|
|
@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y
|
|||
# CONFIG_UTS_NS is not set
|
||||
# CONFIG_PID_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE="../arc_initramfs_hs/"
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_PERF_EVENTS=y
|
||||
|
|
|
@ -9,7 +9,6 @@ CONFIG_IKCONFIG_PROC=y
|
|||
# CONFIG_UTS_NS is not set
|
||||
# CONFIG_PID_NS is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE="../arc_initramfs_hs/"
|
||||
CONFIG_PERF_EVENTS=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
CONFIG_KPROBES=y
|
||||
|
|
|
@ -56,7 +56,6 @@ CONFIG_STMMAC_ETH=y
|
|||
# CONFIG_INPUT is not set
|
||||
# CONFIG_SERIO is not set
|
||||
# CONFIG_VT is not set
|
||||
CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
# CONFIG_DEVKMEM is not set
|
||||
CONFIG_SERIAL_8250=y
|
||||
|
|
|
@ -234,6 +234,9 @@
|
|||
POP gp
|
||||
RESTORE_R12_TO_R0
|
||||
|
||||
#ifdef CONFIG_ARC_CURR_IN_REG
|
||||
ld r25, [sp, 12]
|
||||
#endif
|
||||
ld sp, [sp] /* restore original sp */
|
||||
/* orig_r0, ECR, user_r25 skipped automatically */
|
||||
.endm
|
||||
|
@ -315,6 +318,9 @@
|
|||
POP gp
|
||||
RESTORE_R12_TO_R0
|
||||
|
||||
#ifdef CONFIG_ARC_CURR_IN_REG
|
||||
ld r25, [sp, 12]
|
||||
#endif
|
||||
ld sp, [sp] /* restore original sp */
|
||||
/* orig_r0, ECR, user_r25 skipped automatically */
|
||||
.endm
|
||||
|
|
|
@ -86,9 +86,6 @@
|
|||
POP r1
|
||||
POP r0
|
||||
|
||||
#ifdef CONFIG_ARC_CURR_IN_REG
|
||||
ld r25, [sp, 12]
|
||||
#endif
|
||||
.endm
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
|
|
|
@ -34,9 +34,7 @@ struct machine_desc {
|
|||
const char *name;
|
||||
const char **dt_compat;
|
||||
void (*init_early)(void);
|
||||
#ifdef CONFIG_SMP
|
||||
void (*init_per_cpu)(unsigned int);
|
||||
#endif
|
||||
void (*init_machine)(void);
|
||||
void (*init_late)(void);
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ typedef pte_t * pgtable_t;
|
|||
#define virt_addr_valid(kaddr) pfn_valid(virt_to_pfn(kaddr))
|
||||
|
||||
/* Default Permissions for stack/heaps pages (Non Executable) */
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE)
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#define WANT_PAGE_VIRTUAL 1
|
||||
|
||||
|
|
|
@ -377,7 +377,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
|
|||
|
||||
/* Decode a PTE containing swap "identifier "into constituents */
|
||||
#define __swp_type(pte_lookalike) (((pte_lookalike).val) & 0x1f)
|
||||
#define __swp_offset(pte_lookalike) ((pte_lookalike).val << 13)
|
||||
#define __swp_offset(pte_lookalike) ((pte_lookalike).val >> 13)
|
||||
|
||||
/* NOPs, to keep generic kernel happy */
|
||||
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
|
||||
|
|
|
@ -31,10 +31,10 @@ void __init init_IRQ(void)
|
|||
/* a SMP H/w block could do IPI IRQ request here */
|
||||
if (plat_smp_ops.init_per_cpu)
|
||||
plat_smp_ops.init_per_cpu(smp_processor_id());
|
||||
#endif
|
||||
|
||||
if (machine_desc->init_per_cpu)
|
||||
machine_desc->init_per_cpu(smp_processor_id());
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -47,7 +47,8 @@ SYSCALL_DEFINE0(arc_gettls)
|
|||
SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new)
|
||||
{
|
||||
struct pt_regs *regs = current_pt_regs();
|
||||
int uval = -EFAULT;
|
||||
u32 uval;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* This is only for old cores lacking LLOCK/SCOND, which by defintion
|
||||
|
@ -60,23 +61,47 @@ SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new)
|
|||
/* Z indicates to userspace if operation succeded */
|
||||
regs->status32 &= ~STATUS_Z_MASK;
|
||||
|
||||
if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
|
||||
return -EFAULT;
|
||||
ret = access_ok(VERIFY_WRITE, uaddr, sizeof(*uaddr));
|
||||
if (!ret)
|
||||
goto fail;
|
||||
|
||||
again:
|
||||
preempt_disable();
|
||||
|
||||
if (__get_user(uval, uaddr))
|
||||
goto done;
|
||||
ret = __get_user(uval, uaddr);
|
||||
if (ret)
|
||||
goto fault;
|
||||
|
||||
if (uval == expected) {
|
||||
if (!__put_user(new, uaddr))
|
||||
regs->status32 |= STATUS_Z_MASK;
|
||||
}
|
||||
if (uval != expected)
|
||||
goto out;
|
||||
|
||||
done:
|
||||
ret = __put_user(new, uaddr);
|
||||
if (ret)
|
||||
goto fault;
|
||||
|
||||
regs->status32 |= STATUS_Z_MASK;
|
||||
|
||||
out:
|
||||
preempt_enable();
|
||||
return uval;
|
||||
|
||||
fault:
|
||||
preempt_enable();
|
||||
|
||||
return uval;
|
||||
if (unlikely(ret != -EFAULT))
|
||||
goto fail;
|
||||
|
||||
down_read(¤t->mm->mmap_sem);
|
||||
ret = fixup_user_fault(current, current->mm, (unsigned long) uaddr,
|
||||
FAULT_FLAG_WRITE, NULL);
|
||||
up_read(¤t->mm->mmap_sem);
|
||||
|
||||
if (likely(!ret))
|
||||
goto again;
|
||||
|
||||
fail:
|
||||
force_sig(SIGSEGV, current);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
|
|
|
@ -7,5 +7,8 @@
|
|||
|
||||
menuconfig ARC_SOC_HSDK
|
||||
bool "ARC HS Development Kit SOC"
|
||||
depends on ISA_ARCV2
|
||||
select ARC_HAS_ACCL_REGS
|
||||
select CLK_HSDK
|
||||
select RESET_HSDK
|
||||
select MIGHT_HAVE_PCI
|
||||
|
|
|
@ -42,6 +42,66 @@ static void __init hsdk_init_per_cpu(unsigned int cpu)
|
|||
#define SDIO_UHS_REG_EXT (SDIO_BASE + 0x108)
|
||||
#define SDIO_UHS_REG_EXT_DIV_2 (2 << 30)
|
||||
|
||||
#define HSDK_GPIO_INTC (ARC_PERIPHERAL_BASE + 0x3000)
|
||||
|
||||
static void __init hsdk_enable_gpio_intc_wire(void)
|
||||
{
|
||||
/*
|
||||
* Peripherals on CPU Card are wired to cpu intc via intermediate
|
||||
* DW APB GPIO blocks (mainly for debouncing)
|
||||
*
|
||||
* ---------------------
|
||||
* | snps,archs-intc |
|
||||
* ---------------------
|
||||
* |
|
||||
* ----------------------
|
||||
* | snps,archs-idu-intc |
|
||||
* ----------------------
|
||||
* | | | | |
|
||||
* | [eth] [USB] [... other peripherals]
|
||||
* |
|
||||
* -------------------
|
||||
* | snps,dw-apb-intc |
|
||||
* -------------------
|
||||
* | | | |
|
||||
* [Bt] [HAPS] [... other peripherals]
|
||||
*
|
||||
* Current implementation of "irq-dw-apb-ictl" driver doesn't work well
|
||||
* with stacked INTCs. In particular problem happens if its master INTC
|
||||
* not yet instantiated. See discussion here -
|
||||
* https://lkml.org/lkml/2015/3/4/755
|
||||
*
|
||||
* So setup the first gpio block as a passive pass thru and hide it from
|
||||
* DT hardware topology - connect intc directly to cpu intc
|
||||
* The GPIO "wire" needs to be init nevertheless (here)
|
||||
*
|
||||
* One side adv is that peripheral interrupt handling avoids one nested
|
||||
* intc ISR hop
|
||||
*
|
||||
* According to HSDK User's Manual [1], "Table 2 Interrupt Mapping"
|
||||
* we have the following GPIO input lines used as sources of interrupt:
|
||||
* - GPIO[0] - Bluetooth interrupt of RS9113 module
|
||||
* - GPIO[2] - HAPS interrupt (on HapsTrak 3 connector)
|
||||
* - GPIO[3] - Audio codec (MAX9880A) interrupt
|
||||
* - GPIO[8-23] - Available on Arduino and PMOD_x headers
|
||||
* For now there's no use of Arduino and PMOD_x headers in Linux
|
||||
* use-case so we only enable lines 0, 2 and 3.
|
||||
*
|
||||
* [1] https://github.com/foss-for-synopsys-dwc-arc-processors/ARC-Development-Systems-Forum/wiki/docs/ARC_HSDK_User_Guide.pdf
|
||||
*/
|
||||
#define GPIO_INTEN (HSDK_GPIO_INTC + 0x30)
|
||||
#define GPIO_INTMASK (HSDK_GPIO_INTC + 0x34)
|
||||
#define GPIO_INTTYPE_LEVEL (HSDK_GPIO_INTC + 0x38)
|
||||
#define GPIO_INT_POLARITY (HSDK_GPIO_INTC + 0x3c)
|
||||
#define GPIO_INT_CONNECTED_MASK 0x0d
|
||||
|
||||
iowrite32(0xffffffff, (void __iomem *) GPIO_INTMASK);
|
||||
iowrite32(~GPIO_INT_CONNECTED_MASK, (void __iomem *) GPIO_INTMASK);
|
||||
iowrite32(0x00000000, (void __iomem *) GPIO_INTTYPE_LEVEL);
|
||||
iowrite32(0xffffffff, (void __iomem *) GPIO_INT_POLARITY);
|
||||
iowrite32(GPIO_INT_CONNECTED_MASK, (void __iomem *) GPIO_INTEN);
|
||||
}
|
||||
|
||||
static void __init hsdk_init_early(void)
|
||||
{
|
||||
/*
|
||||
|
@ -62,6 +122,8 @@ static void __init hsdk_init_early(void)
|
|||
* minimum possible div-by-2.
|
||||
*/
|
||||
iowrite32(SDIO_UHS_REG_EXT_DIV_2, (void __iomem *) SDIO_UHS_REG_EXT);
|
||||
|
||||
hsdk_enable_gpio_intc_wire();
|
||||
}
|
||||
|
||||
static const char *hsdk_compat[] __initconst = {
|
||||
|
|
|
@ -692,7 +692,7 @@
|
|||
dsa,member = <0 0>;
|
||||
eeprom-length = <512>;
|
||||
interrupt-parent = <&gpio6>;
|
||||
interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
|
||||
|
|
|
@ -159,13 +159,7 @@
|
|||
|
||||
dais = <&mcbsp2_port>, <&mcbsp3_port>;
|
||||
};
|
||||
};
|
||||
|
||||
&dss {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio6 {
|
||||
pwm8: dmtimer-pwm-8 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vibrator_direction_pin>;
|
||||
|
@ -192,7 +186,10 @@
|
|||
pwm-names = "enable", "direction";
|
||||
direction-duty-cycle-ns = <10000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&dss {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dsi1 {
|
||||
|
|
|
@ -2278,17 +2278,15 @@ pfm_smpl_buffer_alloc(struct task_struct *task, struct file *filp, pfm_context_t
|
|||
DPRINT(("smpl_buf @%p\n", smpl_buf));
|
||||
|
||||
/* allocate vma */
|
||||
vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
|
||||
vma = vm_area_alloc(mm);
|
||||
if (!vma) {
|
||||
DPRINT(("Cannot allocate vma\n"));
|
||||
goto error_kmem;
|
||||
}
|
||||
INIT_LIST_HEAD(&vma->anon_vma_chain);
|
||||
|
||||
/*
|
||||
* partially initialize the vma for the sampling buffer
|
||||
*/
|
||||
vma->vm_mm = mm;
|
||||
vma->vm_file = get_file(filp);
|
||||
vma->vm_flags = VM_READ|VM_MAYREAD|VM_DONTEXPAND|VM_DONTDUMP;
|
||||
vma->vm_page_prot = PAGE_READONLY; /* XXX may need to change */
|
||||
|
@ -2346,7 +2344,7 @@ pfm_smpl_buffer_alloc(struct task_struct *task, struct file *filp, pfm_context_t
|
|||
return 0;
|
||||
|
||||
error:
|
||||
kmem_cache_free(vm_area_cachep, vma);
|
||||
vm_area_free(vma);
|
||||
error_kmem:
|
||||
pfm_rvfree(smpl_buf, size);
|
||||
|
||||
|
|
|
@ -114,10 +114,8 @@ ia64_init_addr_space (void)
|
|||
* the problem. When the process attempts to write to the register backing store
|
||||
* for the first time, it will get a SEGFAULT in this case.
|
||||
*/
|
||||
vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
|
||||
vma = vm_area_alloc(current->mm);
|
||||
if (vma) {
|
||||
INIT_LIST_HEAD(&vma->anon_vma_chain);
|
||||
vma->vm_mm = current->mm;
|
||||
vma->vm_start = current->thread.rbs_bot & PAGE_MASK;
|
||||
vma->vm_end = vma->vm_start + PAGE_SIZE;
|
||||
vma->vm_flags = VM_DATA_DEFAULT_FLAGS|VM_GROWSUP|VM_ACCOUNT;
|
||||
|
@ -125,7 +123,7 @@ ia64_init_addr_space (void)
|
|||
down_write(¤t->mm->mmap_sem);
|
||||
if (insert_vm_struct(current->mm, vma)) {
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
kmem_cache_free(vm_area_cachep, vma);
|
||||
vm_area_free(vma);
|
||||
return;
|
||||
}
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
|
@ -133,10 +131,8 @@ ia64_init_addr_space (void)
|
|||
|
||||
/* map NaT-page at address zero to speed up speculative dereferencing of NULL: */
|
||||
if (!(current->personality & MMAP_PAGE_ZERO)) {
|
||||
vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
|
||||
vma = vm_area_alloc(current->mm);
|
||||
if (vma) {
|
||||
INIT_LIST_HEAD(&vma->anon_vma_chain);
|
||||
vma->vm_mm = current->mm;
|
||||
vma->vm_end = PAGE_SIZE;
|
||||
vma->vm_page_prot = __pgprot(pgprot_val(PAGE_READONLY) | _PAGE_MA_NAT);
|
||||
vma->vm_flags = VM_READ | VM_MAYREAD | VM_IO |
|
||||
|
@ -144,7 +140,7 @@ ia64_init_addr_space (void)
|
|||
down_write(¤t->mm->mmap_sem);
|
||||
if (insert_vm_struct(current->mm, vma)) {
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
kmem_cache_free(vm_area_cachep, vma);
|
||||
vm_area_free(vma);
|
||||
return;
|
||||
}
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
|
|
|
@ -12,17 +12,17 @@ config NDS32
|
|||
select CLONE_BACKWARDS
|
||||
select COMMON_CLK
|
||||
select DMA_NONCOHERENT_OPS
|
||||
select GENERIC_ASHLDI3
|
||||
select GENERIC_ASHRDI3
|
||||
select GENERIC_LSHRDI3
|
||||
select GENERIC_CMPDI2
|
||||
select GENERIC_MULDI3
|
||||
select GENERIC_UCMPDI2
|
||||
select GENERIC_ATOMIC64
|
||||
select GENERIC_CPU_DEVICES
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select GENERIC_IRQ_CHIP
|
||||
select GENERIC_IRQ_SHOW
|
||||
select GENERIC_LIB_ASHLDI3
|
||||
select GENERIC_LIB_ASHRDI3
|
||||
select GENERIC_LIB_CMPDI2
|
||||
select GENERIC_LIB_LSHRDI3
|
||||
select GENERIC_LIB_MULDI3
|
||||
select GENERIC_LIB_UCMPDI2
|
||||
select GENERIC_STRNCPY_FROM_USER
|
||||
select GENERIC_STRNLEN_USER
|
||||
select GENERIC_TIME_VSYSCALL
|
||||
|
|
|
@ -34,10 +34,12 @@ ifdef CONFIG_CPU_LITTLE_ENDIAN
|
|||
KBUILD_CFLAGS += $(call cc-option, -EL)
|
||||
KBUILD_AFLAGS += $(call cc-option, -EL)
|
||||
LDFLAGS += $(call cc-option, -EL)
|
||||
CHECKFLAGS += -D__NDS32_EL__
|
||||
else
|
||||
KBUILD_CFLAGS += $(call cc-option, -EB)
|
||||
KBUILD_AFLAGS += $(call cc-option, -EB)
|
||||
LDFLAGS += $(call cc-option, -EB)
|
||||
CHECKFLAGS += -D__NDS32_EB__
|
||||
endif
|
||||
|
||||
boot := arch/nds32/boot
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
#define PG_dcache_dirty PG_arch_1
|
||||
|
||||
void flush_icache_range(unsigned long start, unsigned long end);
|
||||
void flush_icache_page(struct vm_area_struct *vma, struct page *page);
|
||||
#ifdef CONFIG_CPU_CACHE_ALIASING
|
||||
void flush_cache_mm(struct mm_struct *mm);
|
||||
void flush_cache_dup_mm(struct mm_struct *mm);
|
||||
|
@ -34,13 +36,16 @@ void flush_anon_page(struct vm_area_struct *vma,
|
|||
void flush_kernel_dcache_page(struct page *page);
|
||||
void flush_kernel_vmap_range(void *addr, int size);
|
||||
void invalidate_kernel_vmap_range(void *addr, int size);
|
||||
void flush_icache_range(unsigned long start, unsigned long end);
|
||||
void flush_icache_page(struct vm_area_struct *vma, struct page *page);
|
||||
#define flush_dcache_mmap_lock(mapping) xa_lock_irq(&(mapping)->i_pages)
|
||||
#define flush_dcache_mmap_unlock(mapping) xa_unlock_irq(&(mapping)->i_pages)
|
||||
|
||||
#else
|
||||
#include <asm-generic/cacheflush.h>
|
||||
#undef flush_icache_range
|
||||
#undef flush_icache_page
|
||||
#undef flush_icache_user_range
|
||||
void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
|
||||
unsigned long addr, int len);
|
||||
#endif
|
||||
|
||||
#endif /* __NDS32_CACHEFLUSH_H__ */
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
" .popsection\n" \
|
||||
" .pushsection .fixup,\"ax\"\n" \
|
||||
"4: move %0, " err_reg "\n" \
|
||||
" j 3b\n" \
|
||||
" b 3b\n" \
|
||||
" .popsection"
|
||||
|
||||
#define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \
|
||||
|
|
|
@ -278,7 +278,8 @@ static void __init setup_memory(void)
|
|||
|
||||
void __init setup_arch(char **cmdline_p)
|
||||
{
|
||||
early_init_devtree( __dtb_start);
|
||||
early_init_devtree(__atags_pointer ? \
|
||||
phys_to_virt(__atags_pointer) : __dtb_start);
|
||||
|
||||
setup_cpuinfo();
|
||||
|
||||
|
|
|
@ -13,7 +13,39 @@
|
|||
|
||||
extern struct cache_info L1_cache_info[2];
|
||||
|
||||
#ifndef CONFIG_CPU_CACHE_ALIASING
|
||||
void flush_icache_range(unsigned long start, unsigned long end)
|
||||
{
|
||||
unsigned long line_size, flags;
|
||||
line_size = L1_cache_info[DCACHE].line_size;
|
||||
start = start & ~(line_size - 1);
|
||||
end = (end + line_size - 1) & ~(line_size - 1);
|
||||
local_irq_save(flags);
|
||||
cpu_cache_wbinval_range(start, end, 1);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
EXPORT_SYMBOL(flush_icache_range);
|
||||
|
||||
void flush_icache_page(struct vm_area_struct *vma, struct page *page)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long kaddr;
|
||||
local_irq_save(flags);
|
||||
kaddr = (unsigned long)kmap_atomic(page);
|
||||
cpu_cache_wbinval_page(kaddr, vma->vm_flags & VM_EXEC);
|
||||
kunmap_atomic((void *)kaddr);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
EXPORT_SYMBOL(flush_icache_page);
|
||||
|
||||
void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
|
||||
unsigned long addr, int len)
|
||||
{
|
||||
unsigned long kaddr;
|
||||
kaddr = (unsigned long)kmap_atomic(page) + (addr & ~PAGE_MASK);
|
||||
flush_icache_range(kaddr, kaddr + len);
|
||||
kunmap_atomic((void *)kaddr);
|
||||
}
|
||||
|
||||
void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr,
|
||||
pte_t * pte)
|
||||
{
|
||||
|
@ -35,19 +67,15 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr,
|
|||
|
||||
if ((test_and_clear_bit(PG_dcache_dirty, &page->flags)) ||
|
||||
(vma->vm_flags & VM_EXEC)) {
|
||||
|
||||
if (!PageHighMem(page)) {
|
||||
cpu_cache_wbinval_page((unsigned long)
|
||||
page_address(page),
|
||||
vma->vm_flags & VM_EXEC);
|
||||
} else {
|
||||
unsigned long kaddr = (unsigned long)kmap_atomic(page);
|
||||
cpu_cache_wbinval_page(kaddr, vma->vm_flags & VM_EXEC);
|
||||
kunmap_atomic((void *)kaddr);
|
||||
}
|
||||
unsigned long kaddr;
|
||||
local_irq_save(flags);
|
||||
kaddr = (unsigned long)kmap_atomic(page);
|
||||
cpu_cache_wbinval_page(kaddr, vma->vm_flags & VM_EXEC);
|
||||
kunmap_atomic((void *)kaddr);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#ifdef CONFIG_CPU_CACHE_ALIASING
|
||||
extern pte_t va_present(struct mm_struct *mm, unsigned long addr);
|
||||
|
||||
static inline unsigned long aliasing(unsigned long addr, unsigned long page)
|
||||
|
@ -317,52 +345,4 @@ void invalidate_kernel_vmap_range(void *addr, int size)
|
|||
local_irq_restore(flags);
|
||||
}
|
||||
EXPORT_SYMBOL(invalidate_kernel_vmap_range);
|
||||
|
||||
void flush_icache_range(unsigned long start, unsigned long end)
|
||||
{
|
||||
unsigned long line_size, flags;
|
||||
line_size = L1_cache_info[DCACHE].line_size;
|
||||
start = start & ~(line_size - 1);
|
||||
end = (end + line_size - 1) & ~(line_size - 1);
|
||||
local_irq_save(flags);
|
||||
cpu_cache_wbinval_range(start, end, 1);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
EXPORT_SYMBOL(flush_icache_range);
|
||||
|
||||
void flush_icache_page(struct vm_area_struct *vma, struct page *page)
|
||||
{
|
||||
unsigned long flags;
|
||||
local_irq_save(flags);
|
||||
cpu_cache_wbinval_page((unsigned long)page_address(page),
|
||||
vma->vm_flags & VM_EXEC);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr,
|
||||
pte_t * pte)
|
||||
{
|
||||
struct page *page;
|
||||
unsigned long flags;
|
||||
unsigned long pfn = pte_pfn(*pte);
|
||||
|
||||
if (!pfn_valid(pfn))
|
||||
return;
|
||||
|
||||
if (vma->vm_mm == current->active_mm) {
|
||||
local_irq_save(flags);
|
||||
__nds32__mtsr_dsb(addr, NDS32_SR_TLB_VPN);
|
||||
__nds32__tlbop_rwr(*pte);
|
||||
__nds32__isb();
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
page = pfn_to_page(pfn);
|
||||
if (test_and_clear_bit(PG_dcache_dirty, &page->flags) ||
|
||||
(vma->vm_flags & VM_EXEC)) {
|
||||
local_irq_save(flags);
|
||||
cpu_dcache_wbinval_page((unsigned long)page_address(page));
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -243,6 +243,7 @@ endif
|
|||
cpu-as-$(CONFIG_4xx) += -Wa,-m405
|
||||
cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec)
|
||||
cpu-as-$(CONFIG_E200) += -Wa,-me200
|
||||
cpu-as-$(CONFIG_E500) += -Wa,-me500
|
||||
cpu-as-$(CONFIG_PPC_BOOK3S_64) += -Wa,-mpower4
|
||||
cpu-as-$(CONFIG_PPC_E500MC) += $(call as-option,-Wa$(comma)-me500mc)
|
||||
|
||||
|
|
|
@ -35,9 +35,9 @@ extern struct mm_iommu_table_group_mem_t *mm_iommu_lookup_rm(
|
|||
extern struct mm_iommu_table_group_mem_t *mm_iommu_find(struct mm_struct *mm,
|
||||
unsigned long ua, unsigned long entries);
|
||||
extern long mm_iommu_ua_to_hpa(struct mm_iommu_table_group_mem_t *mem,
|
||||
unsigned long ua, unsigned long *hpa);
|
||||
unsigned long ua, unsigned int pageshift, unsigned long *hpa);
|
||||
extern long mm_iommu_ua_to_hpa_rm(struct mm_iommu_table_group_mem_t *mem,
|
||||
unsigned long ua, unsigned long *hpa);
|
||||
unsigned long ua, unsigned int pageshift, unsigned long *hpa);
|
||||
extern long mm_iommu_mapped_inc(struct mm_iommu_table_group_mem_t *mem);
|
||||
extern void mm_iommu_mapped_dec(struct mm_iommu_table_group_mem_t *mem);
|
||||
#endif
|
||||
|
|
|
@ -144,7 +144,9 @@ power9_restore_additional_sprs:
|
|||
mtspr SPRN_MMCR1, r4
|
||||
|
||||
ld r3, STOP_MMCR2(r13)
|
||||
ld r4, PACA_SPRG_VDSO(r13)
|
||||
mtspr SPRN_MMCR2, r3
|
||||
mtspr SPRN_SPRG3, r4
|
||||
blr
|
||||
|
||||
/*
|
||||
|
|
|
@ -449,7 +449,7 @@ long kvmppc_tce_iommu_do_map(struct kvm *kvm, struct iommu_table *tbl,
|
|||
/* This only handles v2 IOMMU type, v1 is handled via ioctl() */
|
||||
return H_TOO_HARD;
|
||||
|
||||
if (WARN_ON_ONCE(mm_iommu_ua_to_hpa(mem, ua, &hpa)))
|
||||
if (WARN_ON_ONCE(mm_iommu_ua_to_hpa(mem, ua, tbl->it_page_shift, &hpa)))
|
||||
return H_HARDWARE;
|
||||
|
||||
if (mm_iommu_mapped_inc(mem))
|
||||
|
|
|
@ -279,7 +279,8 @@ static long kvmppc_rm_tce_iommu_do_map(struct kvm *kvm, struct iommu_table *tbl,
|
|||
if (!mem)
|
||||
return H_TOO_HARD;
|
||||
|
||||
if (WARN_ON_ONCE_RM(mm_iommu_ua_to_hpa_rm(mem, ua, &hpa)))
|
||||
if (WARN_ON_ONCE_RM(mm_iommu_ua_to_hpa_rm(mem, ua, tbl->it_page_shift,
|
||||
&hpa)))
|
||||
return H_HARDWARE;
|
||||
|
||||
pua = (void *) vmalloc_to_phys(pua);
|
||||
|
@ -469,7 +470,8 @@ long kvmppc_rm_h_put_tce_indirect(struct kvm_vcpu *vcpu,
|
|||
|
||||
mem = mm_iommu_lookup_rm(vcpu->kvm->mm, ua, IOMMU_PAGE_SIZE_4K);
|
||||
if (mem)
|
||||
prereg = mm_iommu_ua_to_hpa_rm(mem, ua, &tces) == 0;
|
||||
prereg = mm_iommu_ua_to_hpa_rm(mem, ua,
|
||||
IOMMU_PAGE_SHIFT_4K, &tces) == 0;
|
||||
}
|
||||
|
||||
if (!prereg) {
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <linux/hugetlb.h>
|
||||
#include <linux/swap.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/pte-walk.h>
|
||||
|
||||
static DEFINE_MUTEX(mem_list_mutex);
|
||||
|
||||
|
@ -27,6 +28,7 @@ struct mm_iommu_table_group_mem_t {
|
|||
struct rcu_head rcu;
|
||||
unsigned long used;
|
||||
atomic64_t mapped;
|
||||
unsigned int pageshift;
|
||||
u64 ua; /* userspace address */
|
||||
u64 entries; /* number of entries in hpas[] */
|
||||
u64 *hpas; /* vmalloc'ed */
|
||||
|
@ -125,6 +127,8 @@ long mm_iommu_get(struct mm_struct *mm, unsigned long ua, unsigned long entries,
|
|||
{
|
||||
struct mm_iommu_table_group_mem_t *mem;
|
||||
long i, j, ret = 0, locked_entries = 0;
|
||||
unsigned int pageshift;
|
||||
unsigned long flags;
|
||||
struct page *page = NULL;
|
||||
|
||||
mutex_lock(&mem_list_mutex);
|
||||
|
@ -159,6 +163,12 @@ long mm_iommu_get(struct mm_struct *mm, unsigned long ua, unsigned long entries,
|
|||
goto unlock_exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* For a starting point for a maximum page size calculation
|
||||
* we use @ua and @entries natural alignment to allow IOMMU pages
|
||||
* smaller than huge pages but still bigger than PAGE_SIZE.
|
||||
*/
|
||||
mem->pageshift = __ffs(ua | (entries << PAGE_SHIFT));
|
||||
mem->hpas = vzalloc(array_size(entries, sizeof(mem->hpas[0])));
|
||||
if (!mem->hpas) {
|
||||
kfree(mem);
|
||||
|
@ -199,6 +209,23 @@ long mm_iommu_get(struct mm_struct *mm, unsigned long ua, unsigned long entries,
|
|||
}
|
||||
}
|
||||
populate:
|
||||
pageshift = PAGE_SHIFT;
|
||||
if (PageCompound(page)) {
|
||||
pte_t *pte;
|
||||
struct page *head = compound_head(page);
|
||||
unsigned int compshift = compound_order(head);
|
||||
|
||||
local_irq_save(flags); /* disables as well */
|
||||
pte = find_linux_pte(mm->pgd, ua, NULL, &pageshift);
|
||||
local_irq_restore(flags);
|
||||
|
||||
/* Double check it is still the same pinned page */
|
||||
if (pte && pte_page(*pte) == head &&
|
||||
pageshift == compshift)
|
||||
pageshift = max_t(unsigned int, pageshift,
|
||||
PAGE_SHIFT);
|
||||
}
|
||||
mem->pageshift = min(mem->pageshift, pageshift);
|
||||
mem->hpas[i] = page_to_pfn(page) << PAGE_SHIFT;
|
||||
}
|
||||
|
||||
|
@ -349,7 +376,7 @@ struct mm_iommu_table_group_mem_t *mm_iommu_find(struct mm_struct *mm,
|
|||
EXPORT_SYMBOL_GPL(mm_iommu_find);
|
||||
|
||||
long mm_iommu_ua_to_hpa(struct mm_iommu_table_group_mem_t *mem,
|
||||
unsigned long ua, unsigned long *hpa)
|
||||
unsigned long ua, unsigned int pageshift, unsigned long *hpa)
|
||||
{
|
||||
const long entry = (ua - mem->ua) >> PAGE_SHIFT;
|
||||
u64 *va = &mem->hpas[entry];
|
||||
|
@ -357,6 +384,9 @@ long mm_iommu_ua_to_hpa(struct mm_iommu_table_group_mem_t *mem,
|
|||
if (entry >= mem->entries)
|
||||
return -EFAULT;
|
||||
|
||||
if (pageshift > mem->pageshift)
|
||||
return -EFAULT;
|
||||
|
||||
*hpa = *va | (ua & ~PAGE_MASK);
|
||||
|
||||
return 0;
|
||||
|
@ -364,7 +394,7 @@ long mm_iommu_ua_to_hpa(struct mm_iommu_table_group_mem_t *mem,
|
|||
EXPORT_SYMBOL_GPL(mm_iommu_ua_to_hpa);
|
||||
|
||||
long mm_iommu_ua_to_hpa_rm(struct mm_iommu_table_group_mem_t *mem,
|
||||
unsigned long ua, unsigned long *hpa)
|
||||
unsigned long ua, unsigned int pageshift, unsigned long *hpa)
|
||||
{
|
||||
const long entry = (ua - mem->ua) >> PAGE_SHIFT;
|
||||
void *va = &mem->hpas[entry];
|
||||
|
@ -373,6 +403,9 @@ long mm_iommu_ua_to_hpa_rm(struct mm_iommu_table_group_mem_t *mem,
|
|||
if (entry >= mem->entries)
|
||||
return -EFAULT;
|
||||
|
||||
if (pageshift > mem->pageshift)
|
||||
return -EFAULT;
|
||||
|
||||
pa = (void *) vmalloc_to_phys(va);
|
||||
if (!pa)
|
||||
return -EFAULT;
|
||||
|
|
|
@ -2734,7 +2734,7 @@ generic_inst_dump(unsigned long adr, long count, int praddr,
|
|||
{
|
||||
int nr, dotted;
|
||||
unsigned long first_adr;
|
||||
unsigned long inst, last_inst = 0;
|
||||
unsigned int inst, last_inst = 0;
|
||||
unsigned char val[4];
|
||||
|
||||
dotted = 0;
|
||||
|
@ -2758,7 +2758,7 @@ generic_inst_dump(unsigned long adr, long count, int praddr,
|
|||
dotted = 0;
|
||||
last_inst = inst;
|
||||
if (praddr)
|
||||
printf(REG" %.8lx", adr, inst);
|
||||
printf(REG" %.8x", adr, inst);
|
||||
printf("\t");
|
||||
dump_func(inst, adr);
|
||||
printf("\n");
|
||||
|
|
|
@ -63,7 +63,7 @@ config X86
|
|||
select ARCH_HAS_PTE_SPECIAL
|
||||
select ARCH_HAS_REFCOUNT
|
||||
select ARCH_HAS_UACCESS_FLUSHCACHE if X86_64
|
||||
select ARCH_HAS_UACCESS_MCSAFE if X86_64
|
||||
select ARCH_HAS_UACCESS_MCSAFE if X86_64 && X86_MCE
|
||||
select ARCH_HAS_SET_MEMORY
|
||||
select ARCH_HAS_SG_CHAIN
|
||||
select ARCH_HAS_STRICT_KERNEL_RWX
|
||||
|
|
|
@ -408,9 +408,11 @@ static int alloc_bts_buffer(int cpu)
|
|||
ds->bts_buffer_base = (unsigned long) cea;
|
||||
ds_update_cea(cea, buffer, BTS_BUFFER_SIZE, PAGE_KERNEL);
|
||||
ds->bts_index = ds->bts_buffer_base;
|
||||
max = BTS_RECORD_SIZE * (BTS_BUFFER_SIZE / BTS_RECORD_SIZE);
|
||||
ds->bts_absolute_maximum = ds->bts_buffer_base + max;
|
||||
ds->bts_interrupt_threshold = ds->bts_absolute_maximum - (max / 16);
|
||||
max = BTS_BUFFER_SIZE / BTS_RECORD_SIZE;
|
||||
ds->bts_absolute_maximum = ds->bts_buffer_base +
|
||||
max * BTS_RECORD_SIZE;
|
||||
ds->bts_interrupt_threshold = ds->bts_absolute_maximum -
|
||||
(max / 16) * BTS_RECORD_SIZE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
#ifndef _ASM_X86_MACH_DEFAULT_APM_H
|
||||
#define _ASM_X86_MACH_DEFAULT_APM_H
|
||||
|
||||
#include <asm/nospec-branch.h>
|
||||
|
||||
#ifdef APM_ZERO_SEGS
|
||||
# define APM_DO_ZERO_SEGS \
|
||||
"pushl %%ds\n\t" \
|
||||
|
@ -34,7 +32,6 @@ static inline void apm_bios_call_asm(u32 func, u32 ebx_in, u32 ecx_in,
|
|||
* N.B. We do NOT need a cld after the BIOS call
|
||||
* because we always save and restore the flags.
|
||||
*/
|
||||
firmware_restrict_branch_speculation_start();
|
||||
__asm__ __volatile__(APM_DO_ZERO_SEGS
|
||||
"pushl %%edi\n\t"
|
||||
"pushl %%ebp\n\t"
|
||||
|
@ -47,7 +44,6 @@ static inline void apm_bios_call_asm(u32 func, u32 ebx_in, u32 ecx_in,
|
|||
"=S" (*esi)
|
||||
: "a" (func), "b" (ebx_in), "c" (ecx_in)
|
||||
: "memory", "cc");
|
||||
firmware_restrict_branch_speculation_end();
|
||||
}
|
||||
|
||||
static inline bool apm_bios_call_simple_asm(u32 func, u32 ebx_in,
|
||||
|
@ -60,7 +56,6 @@ static inline bool apm_bios_call_simple_asm(u32 func, u32 ebx_in,
|
|||
* N.B. We do NOT need a cld after the BIOS call
|
||||
* because we always save and restore the flags.
|
||||
*/
|
||||
firmware_restrict_branch_speculation_start();
|
||||
__asm__ __volatile__(APM_DO_ZERO_SEGS
|
||||
"pushl %%edi\n\t"
|
||||
"pushl %%ebp\n\t"
|
||||
|
@ -73,7 +68,6 @@ static inline bool apm_bios_call_simple_asm(u32 func, u32 ebx_in,
|
|||
"=S" (si)
|
||||
: "a" (func), "b" (ebx_in), "c" (ecx_in)
|
||||
: "memory", "cc");
|
||||
firmware_restrict_branch_speculation_end();
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,12 @@ copy_to_user_mcsafe(void *to, const void *from, unsigned len)
|
|||
unsigned long ret;
|
||||
|
||||
__uaccess_begin();
|
||||
ret = memcpy_mcsafe(to, from, len);
|
||||
/*
|
||||
* Note, __memcpy_mcsafe() is explicitly used since it can
|
||||
* handle exceptions / faults. memcpy_mcsafe() may fall back to
|
||||
* memcpy() which lacks this handling.
|
||||
*/
|
||||
ret = __memcpy_mcsafe(to, from, len);
|
||||
__uaccess_end();
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -240,6 +240,7 @@
|
|||
#include <asm/olpc.h>
|
||||
#include <asm/paravirt.h>
|
||||
#include <asm/reboot.h>
|
||||
#include <asm/nospec-branch.h>
|
||||
|
||||
#if defined(CONFIG_APM_DISPLAY_BLANK) && defined(CONFIG_VT)
|
||||
extern int (*console_blank_hook)(int);
|
||||
|
@ -614,11 +615,13 @@ static long __apm_bios_call(void *_call)
|
|||
gdt[0x40 / 8] = bad_bios_desc;
|
||||
|
||||
apm_irq_save(flags);
|
||||
firmware_restrict_branch_speculation_start();
|
||||
APM_DO_SAVE_SEGS;
|
||||
apm_bios_call_asm(call->func, call->ebx, call->ecx,
|
||||
&call->eax, &call->ebx, &call->ecx, &call->edx,
|
||||
&call->esi);
|
||||
APM_DO_RESTORE_SEGS;
|
||||
firmware_restrict_branch_speculation_end();
|
||||
apm_irq_restore(flags);
|
||||
gdt[0x40 / 8] = save_desc_40;
|
||||
put_cpu();
|
||||
|
@ -690,10 +693,12 @@ static long __apm_bios_call_simple(void *_call)
|
|||
gdt[0x40 / 8] = bad_bios_desc;
|
||||
|
||||
apm_irq_save(flags);
|
||||
firmware_restrict_branch_speculation_start();
|
||||
APM_DO_SAVE_SEGS;
|
||||
error = apm_bios_call_simple_asm(call->func, call->ebx, call->ecx,
|
||||
&call->eax);
|
||||
APM_DO_RESTORE_SEGS;
|
||||
firmware_restrict_branch_speculation_end();
|
||||
apm_irq_restore(flags);
|
||||
gdt[0x40 / 8] = save_desc_40;
|
||||
put_cpu();
|
||||
|
|
|
@ -2165,9 +2165,6 @@ static ssize_t store_int_with_restart(struct device *s,
|
|||
if (check_interval == old_check_interval)
|
||||
return ret;
|
||||
|
||||
if (check_interval < 1)
|
||||
check_interval = 1;
|
||||
|
||||
mutex_lock(&mce_sysfs_mutex);
|
||||
mce_restart();
|
||||
mutex_unlock(&mce_sysfs_mutex);
|
||||
|
|
|
@ -138,6 +138,7 @@ static unsigned long kvm_get_tsc_khz(void)
|
|||
src = &hv_clock[cpu].pvti;
|
||||
tsc_khz = pvclock_tsc_khz(src);
|
||||
put_cpu();
|
||||
setup_force_cpu_cap(X86_FEATURE_TSC_KNOWN_FREQ);
|
||||
return tsc_khz;
|
||||
}
|
||||
|
||||
|
@ -319,6 +320,8 @@ void __init kvmclock_init(void)
|
|||
printk(KERN_INFO "kvm-clock: Using msrs %x and %x",
|
||||
msr_kvm_system_time, msr_kvm_wall_clock);
|
||||
|
||||
pvclock_set_pvti_cpu0_va(hv_clock);
|
||||
|
||||
if (kvm_para_has_feature(KVM_FEATURE_CLOCKSOURCE_STABLE_BIT))
|
||||
pvclock_set_flags(PVCLOCK_TSC_STABLE_BIT);
|
||||
|
||||
|
@ -366,14 +369,11 @@ int __init kvm_setup_vsyscall_timeinfo(void)
|
|||
vcpu_time = &hv_clock[cpu].pvti;
|
||||
flags = pvclock_read_flags(vcpu_time);
|
||||
|
||||
if (!(flags & PVCLOCK_TSC_STABLE_BIT)) {
|
||||
put_cpu();
|
||||
return 1;
|
||||
}
|
||||
|
||||
pvclock_set_pvti_cpu0_va(hv_clock);
|
||||
put_cpu();
|
||||
|
||||
if (!(flags & PVCLOCK_TSC_STABLE_BIT))
|
||||
return 1;
|
||||
|
||||
kvm_clock.archdata.vclock_mode = VCLOCK_PVCLOCK;
|
||||
#endif
|
||||
return 0;
|
||||
|
|
|
@ -85,7 +85,7 @@ config KVM_AMD_SEV
|
|||
def_bool y
|
||||
bool "AMD Secure Encrypted Virtualization (SEV) support"
|
||||
depends on KVM_AMD && X86_64
|
||||
depends on CRYPTO_DEV_CCP && CRYPTO_DEV_CCP_DD && CRYPTO_DEV_SP_PSP
|
||||
depends on CRYPTO_DEV_SP_PSP && !(KVM_AMD=y && CRYPTO_DEV_CCP_DD=m)
|
||||
---help---
|
||||
Provides support for launching Encrypted VMs on AMD processors.
|
||||
|
||||
|
|
|
@ -2571,6 +2571,7 @@ static void vmx_save_host_state(struct kvm_vcpu *vcpu)
|
|||
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
||||
#ifdef CONFIG_X86_64
|
||||
int cpu = raw_smp_processor_id();
|
||||
unsigned long fs_base, kernel_gs_base;
|
||||
#endif
|
||||
int i;
|
||||
|
||||
|
@ -2586,12 +2587,20 @@ static void vmx_save_host_state(struct kvm_vcpu *vcpu)
|
|||
vmx->host_state.gs_ldt_reload_needed = vmx->host_state.ldt_sel;
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
save_fsgs_for_kvm();
|
||||
vmx->host_state.fs_sel = current->thread.fsindex;
|
||||
vmx->host_state.gs_sel = current->thread.gsindex;
|
||||
#else
|
||||
savesegment(fs, vmx->host_state.fs_sel);
|
||||
savesegment(gs, vmx->host_state.gs_sel);
|
||||
if (likely(is_64bit_mm(current->mm))) {
|
||||
save_fsgs_for_kvm();
|
||||
vmx->host_state.fs_sel = current->thread.fsindex;
|
||||
vmx->host_state.gs_sel = current->thread.gsindex;
|
||||
fs_base = current->thread.fsbase;
|
||||
kernel_gs_base = current->thread.gsbase;
|
||||
} else {
|
||||
#endif
|
||||
savesegment(fs, vmx->host_state.fs_sel);
|
||||
savesegment(gs, vmx->host_state.gs_sel);
|
||||
#ifdef CONFIG_X86_64
|
||||
fs_base = read_msr(MSR_FS_BASE);
|
||||
kernel_gs_base = read_msr(MSR_KERNEL_GS_BASE);
|
||||
}
|
||||
#endif
|
||||
if (!(vmx->host_state.fs_sel & 7)) {
|
||||
vmcs_write16(HOST_FS_SELECTOR, vmx->host_state.fs_sel);
|
||||
|
@ -2611,10 +2620,10 @@ static void vmx_save_host_state(struct kvm_vcpu *vcpu)
|
|||
savesegment(ds, vmx->host_state.ds_sel);
|
||||
savesegment(es, vmx->host_state.es_sel);
|
||||
|
||||
vmcs_writel(HOST_FS_BASE, current->thread.fsbase);
|
||||
vmcs_writel(HOST_FS_BASE, fs_base);
|
||||
vmcs_writel(HOST_GS_BASE, cpu_kernelmode_gs_base(cpu));
|
||||
|
||||
vmx->msr_host_kernel_gs_base = current->thread.gsbase;
|
||||
vmx->msr_host_kernel_gs_base = kernel_gs_base;
|
||||
if (is_long_mode(&vmx->vcpu))
|
||||
wrmsrl(MSR_KERNEL_GS_BASE, vmx->msr_guest_kernel_gs_base);
|
||||
#else
|
||||
|
@ -4322,11 +4331,7 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf)
|
|||
vmcs_conf->order = get_order(vmcs_conf->size);
|
||||
vmcs_conf->basic_cap = vmx_msr_high & ~0x1fff;
|
||||
|
||||
/* KVM supports Enlightened VMCS v1 only */
|
||||
if (static_branch_unlikely(&enable_evmcs))
|
||||
vmcs_conf->revision_id = KVM_EVMCS_VERSION;
|
||||
else
|
||||
vmcs_conf->revision_id = vmx_msr_low;
|
||||
vmcs_conf->revision_id = vmx_msr_low;
|
||||
|
||||
vmcs_conf->pin_based_exec_ctrl = _pin_based_exec_control;
|
||||
vmcs_conf->cpu_based_exec_ctrl = _cpu_based_exec_control;
|
||||
|
@ -4396,7 +4401,13 @@ static struct vmcs *alloc_vmcs_cpu(int cpu)
|
|||
return NULL;
|
||||
vmcs = page_address(pages);
|
||||
memset(vmcs, 0, vmcs_config.size);
|
||||
vmcs->revision_id = vmcs_config.revision_id; /* vmcs revision id */
|
||||
|
||||
/* KVM supports Enlightened VMCS v1 only */
|
||||
if (static_branch_unlikely(&enable_evmcs))
|
||||
vmcs->revision_id = KVM_EVMCS_VERSION;
|
||||
else
|
||||
vmcs->revision_id = vmcs_config.revision_id;
|
||||
|
||||
return vmcs;
|
||||
}
|
||||
|
||||
|
@ -4564,6 +4575,19 @@ static __init int alloc_kvm_area(void)
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/*
|
||||
* When eVMCS is enabled, alloc_vmcs_cpu() sets
|
||||
* vmcs->revision_id to KVM_EVMCS_VERSION instead of
|
||||
* revision_id reported by MSR_IA32_VMX_BASIC.
|
||||
*
|
||||
* However, even though not explictly documented by
|
||||
* TLFS, VMXArea passed as VMXON argument should
|
||||
* still be marked with revision_id reported by
|
||||
* physical CPU.
|
||||
*/
|
||||
if (static_branch_unlikely(&enable_evmcs))
|
||||
vmcs->revision_id = vmcs_config.revision_id;
|
||||
|
||||
per_cpu(vmxarea, cpu) = vmcs;
|
||||
}
|
||||
return 0;
|
||||
|
@ -11753,7 +11777,6 @@ static int enter_vmx_non_root_mode(struct kvm_vcpu *vcpu)
|
|||
{
|
||||
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
||||
struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
|
||||
u32 msr_entry_idx;
|
||||
u32 exit_qual;
|
||||
int r;
|
||||
|
||||
|
@ -11775,10 +11798,10 @@ static int enter_vmx_non_root_mode(struct kvm_vcpu *vcpu)
|
|||
nested_get_vmcs12_pages(vcpu, vmcs12);
|
||||
|
||||
r = EXIT_REASON_MSR_LOAD_FAIL;
|
||||
msr_entry_idx = nested_vmx_load_msr(vcpu,
|
||||
vmcs12->vm_entry_msr_load_addr,
|
||||
vmcs12->vm_entry_msr_load_count);
|
||||
if (msr_entry_idx)
|
||||
exit_qual = nested_vmx_load_msr(vcpu,
|
||||
vmcs12->vm_entry_msr_load_addr,
|
||||
vmcs12->vm_entry_msr_load_count);
|
||||
if (exit_qual)
|
||||
goto fail;
|
||||
|
||||
/*
|
||||
|
|
|
@ -1097,6 +1097,7 @@ static u32 msr_based_features[] = {
|
|||
|
||||
MSR_F10H_DECFG,
|
||||
MSR_IA32_UCODE_REV,
|
||||
MSR_IA32_ARCH_CAPABILITIES,
|
||||
};
|
||||
|
||||
static unsigned int num_msr_based_features;
|
||||
|
@ -1105,7 +1106,8 @@ static int kvm_get_msr_feature(struct kvm_msr_entry *msr)
|
|||
{
|
||||
switch (msr->index) {
|
||||
case MSR_IA32_UCODE_REV:
|
||||
rdmsrl(msr->index, msr->data);
|
||||
case MSR_IA32_ARCH_CAPABILITIES:
|
||||
rdmsrl_safe(msr->index, &msr->data);
|
||||
break;
|
||||
default:
|
||||
if (kvm_x86_ops->get_msr_feature(msr))
|
||||
|
|
|
@ -1155,8 +1155,10 @@ int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags,
|
|||
|
||||
/* make one iovec available as scatterlist */
|
||||
err = af_alg_make_sg(&rsgl->sgl, &msg->msg_iter, seglen);
|
||||
if (err < 0)
|
||||
if (err < 0) {
|
||||
rsgl->sg_num_bytes = 0;
|
||||
return err;
|
||||
}
|
||||
|
||||
/* chain the new scatterlist with previous one */
|
||||
if (areq->last_rsgl)
|
||||
|
|
|
@ -2042,7 +2042,7 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = {
|
|||
.ident = "Thinkpad X1 Carbon 6th",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "20KGS3JF01"),
|
||||
DMI_MATCH(DMI_PRODUCT_FAMILY, "Thinkpad X1 Carbon 6th"),
|
||||
},
|
||||
},
|
||||
{ },
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include "agp.h"
|
||||
|
||||
static int alpha_core_agp_vm_fault(struct vm_fault *vmf)
|
||||
static vm_fault_t alpha_core_agp_vm_fault(struct vm_fault *vmf)
|
||||
{
|
||||
alpha_agp_info *agp = agp_bridge->dev_private_data;
|
||||
dma_addr_t dma_addr;
|
||||
|
|
|
@ -156,7 +156,7 @@ static u64 amd64_configure(struct pci_dev *hammer, u64 gatt_table)
|
|||
|
||||
/* Address to map to */
|
||||
pci_read_config_dword(hammer, AMD64_GARTAPERTUREBASE, &tmp);
|
||||
aperturebase = tmp << 25;
|
||||
aperturebase = (u64)tmp << 25;
|
||||
aper_base = (aperturebase & PCI_BASE_ADDRESS_MEM_MASK);
|
||||
|
||||
enable_gart_translation(hammer, gatt_table);
|
||||
|
@ -277,7 +277,7 @@ static int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, u16 cap)
|
|||
pci_read_config_dword(nb, AMD64_GARTAPERTURECTL, &nb_order);
|
||||
nb_order = (nb_order >> 1) & 7;
|
||||
pci_read_config_dword(nb, AMD64_GARTAPERTUREBASE, &nb_base);
|
||||
nb_aper = nb_base << 25;
|
||||
nb_aper = (u64)nb_base << 25;
|
||||
|
||||
/* Northbridge seems to contain crap. Try the AGP bridge. */
|
||||
|
||||
|
|
|
@ -2394,6 +2394,18 @@ static bool __init intel_pstate_no_acpi_pss(void)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool __init intel_pstate_no_acpi_pcch(void)
|
||||
{
|
||||
acpi_status status;
|
||||
acpi_handle handle;
|
||||
|
||||
status = acpi_get_handle(NULL, "\\_SB", &handle);
|
||||
if (ACPI_FAILURE(status))
|
||||
return true;
|
||||
|
||||
return !acpi_has_method(handle, "PCCH");
|
||||
}
|
||||
|
||||
static bool __init intel_pstate_has_acpi_ppc(void)
|
||||
{
|
||||
int i;
|
||||
|
@ -2453,7 +2465,10 @@ static bool __init intel_pstate_platform_pwr_mgmt_exists(void)
|
|||
|
||||
switch (plat_info[idx].data) {
|
||||
case PSS:
|
||||
return intel_pstate_no_acpi_pss();
|
||||
if (!intel_pstate_no_acpi_pss())
|
||||
return false;
|
||||
|
||||
return intel_pstate_no_acpi_pcch();
|
||||
case PPC:
|
||||
return intel_pstate_has_acpi_ppc() && !force_load;
|
||||
}
|
||||
|
|
|
@ -580,6 +580,10 @@ static int __init pcc_cpufreq_init(void)
|
|||
{
|
||||
int ret;
|
||||
|
||||
/* Skip initialization if another cpufreq driver is there. */
|
||||
if (cpufreq_get_current_driver())
|
||||
return 0;
|
||||
|
||||
if (acpi_disabled)
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -57,6 +57,10 @@
|
|||
#define ACP_I2S_COMP2_CAP_REG_OFFSET 0xa8
|
||||
#define ACP_I2S_COMP1_PLAY_REG_OFFSET 0x6c
|
||||
#define ACP_I2S_COMP2_PLAY_REG_OFFSET 0x68
|
||||
#define ACP_BT_PLAY_REGS_START 0x14970
|
||||
#define ACP_BT_PLAY_REGS_END 0x14a24
|
||||
#define ACP_BT_COMP1_REG_OFFSET 0xac
|
||||
#define ACP_BT_COMP2_REG_OFFSET 0xa8
|
||||
|
||||
#define mmACP_PGFSM_RETAIN_REG 0x51c9
|
||||
#define mmACP_PGFSM_CONFIG_REG 0x51ca
|
||||
|
@ -77,7 +81,7 @@
|
|||
#define ACP_SOFT_RESET_DONE_TIME_OUT_VALUE 0x000000FF
|
||||
|
||||
#define ACP_TIMEOUT_LOOP 0x000000FF
|
||||
#define ACP_DEVS 3
|
||||
#define ACP_DEVS 4
|
||||
#define ACP_SRC_ID 162
|
||||
|
||||
enum {
|
||||
|
@ -316,14 +320,13 @@ static int acp_hw_init(void *handle)
|
|||
if (adev->acp.acp_cell == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
adev->acp.acp_res = kcalloc(4, sizeof(struct resource), GFP_KERNEL);
|
||||
|
||||
adev->acp.acp_res = kcalloc(5, sizeof(struct resource), GFP_KERNEL);
|
||||
if (adev->acp.acp_res == NULL) {
|
||||
kfree(adev->acp.acp_cell);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
i2s_pdata = kcalloc(2, sizeof(struct i2s_platform_data), GFP_KERNEL);
|
||||
i2s_pdata = kcalloc(3, sizeof(struct i2s_platform_data), GFP_KERNEL);
|
||||
if (i2s_pdata == NULL) {
|
||||
kfree(adev->acp.acp_res);
|
||||
kfree(adev->acp.acp_cell);
|
||||
|
@ -358,6 +361,20 @@ static int acp_hw_init(void *handle)
|
|||
i2s_pdata[1].i2s_reg_comp1 = ACP_I2S_COMP1_CAP_REG_OFFSET;
|
||||
i2s_pdata[1].i2s_reg_comp2 = ACP_I2S_COMP2_CAP_REG_OFFSET;
|
||||
|
||||
i2s_pdata[2].quirks = DW_I2S_QUIRK_COMP_REG_OFFSET;
|
||||
switch (adev->asic_type) {
|
||||
case CHIP_STONEY:
|
||||
i2s_pdata[2].quirks |= DW_I2S_QUIRK_16BIT_IDX_OVERRIDE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
i2s_pdata[2].cap = DWC_I2S_PLAY | DWC_I2S_RECORD;
|
||||
i2s_pdata[2].snd_rates = SNDRV_PCM_RATE_8000_96000;
|
||||
i2s_pdata[2].i2s_reg_comp1 = ACP_BT_COMP1_REG_OFFSET;
|
||||
i2s_pdata[2].i2s_reg_comp2 = ACP_BT_COMP2_REG_OFFSET;
|
||||
|
||||
adev->acp.acp_res[0].name = "acp2x_dma";
|
||||
adev->acp.acp_res[0].flags = IORESOURCE_MEM;
|
||||
adev->acp.acp_res[0].start = acp_base;
|
||||
|
@ -373,13 +390,18 @@ static int acp_hw_init(void *handle)
|
|||
adev->acp.acp_res[2].start = acp_base + ACP_I2S_CAP_REGS_START;
|
||||
adev->acp.acp_res[2].end = acp_base + ACP_I2S_CAP_REGS_END;
|
||||
|
||||
adev->acp.acp_res[3].name = "acp2x_dma_irq";
|
||||
adev->acp.acp_res[3].flags = IORESOURCE_IRQ;
|
||||
adev->acp.acp_res[3].start = amdgpu_irq_create_mapping(adev, 162);
|
||||
adev->acp.acp_res[3].end = adev->acp.acp_res[3].start;
|
||||
adev->acp.acp_res[3].name = "acp2x_dw_bt_i2s_play_cap";
|
||||
adev->acp.acp_res[3].flags = IORESOURCE_MEM;
|
||||
adev->acp.acp_res[3].start = acp_base + ACP_BT_PLAY_REGS_START;
|
||||
adev->acp.acp_res[3].end = acp_base + ACP_BT_PLAY_REGS_END;
|
||||
|
||||
adev->acp.acp_res[4].name = "acp2x_dma_irq";
|
||||
adev->acp.acp_res[4].flags = IORESOURCE_IRQ;
|
||||
adev->acp.acp_res[4].start = amdgpu_irq_create_mapping(adev, 162);
|
||||
adev->acp.acp_res[4].end = adev->acp.acp_res[4].start;
|
||||
|
||||
adev->acp.acp_cell[0].name = "acp_audio_dma";
|
||||
adev->acp.acp_cell[0].num_resources = 4;
|
||||
adev->acp.acp_cell[0].num_resources = 5;
|
||||
adev->acp.acp_cell[0].resources = &adev->acp.acp_res[0];
|
||||
adev->acp.acp_cell[0].platform_data = &adev->asic_type;
|
||||
adev->acp.acp_cell[0].pdata_size = sizeof(adev->asic_type);
|
||||
|
@ -396,6 +418,12 @@ static int acp_hw_init(void *handle)
|
|||
adev->acp.acp_cell[2].platform_data = &i2s_pdata[1];
|
||||
adev->acp.acp_cell[2].pdata_size = sizeof(struct i2s_platform_data);
|
||||
|
||||
adev->acp.acp_cell[3].name = "designware-i2s";
|
||||
adev->acp.acp_cell[3].num_resources = 1;
|
||||
adev->acp.acp_cell[3].resources = &adev->acp.acp_res[3];
|
||||
adev->acp.acp_cell[3].platform_data = &i2s_pdata[2];
|
||||
adev->acp.acp_cell[3].pdata_size = sizeof(struct i2s_platform_data);
|
||||
|
||||
r = mfd_add_hotplug_devices(adev->acp.parent, adev->acp.acp_cell,
|
||||
ACP_DEVS);
|
||||
if (r)
|
||||
|
@ -451,7 +479,6 @@ static int acp_hw_init(void *handle)
|
|||
val = cgs_read_register(adev->acp.cgs_device, mmACP_SOFT_RESET);
|
||||
val &= ~ACP_SOFT_RESET__SoftResetAud_MASK;
|
||||
cgs_write_register(adev->acp.cgs_device, mmACP_SOFT_RESET, val);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -575,6 +575,7 @@ static const struct amdgpu_px_quirk amdgpu_px_quirk_list[] = {
|
|||
{ 0x1002, 0x6900, 0x1002, 0x0124, AMDGPU_PX_QUIRK_FORCE_ATPX },
|
||||
{ 0x1002, 0x6900, 0x1028, 0x0812, AMDGPU_PX_QUIRK_FORCE_ATPX },
|
||||
{ 0x1002, 0x6900, 0x1028, 0x0813, AMDGPU_PX_QUIRK_FORCE_ATPX },
|
||||
{ 0x1002, 0x6900, 0x1025, 0x125A, AMDGPU_PX_QUIRK_FORCE_ATPX },
|
||||
{ 0, 0, 0, 0, 0 },
|
||||
};
|
||||
|
||||
|
|
|
@ -927,6 +927,10 @@ static int amdgpu_cs_ib_vm_chunk(struct amdgpu_device *adev,
|
|||
r = amdgpu_bo_vm_update_pte(p);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
r = reservation_object_reserve_shared(vm->root.base.bo->tbo.resv);
|
||||
if (r)
|
||||
return r;
|
||||
}
|
||||
|
||||
return amdgpu_cs_sync_rings(p);
|
||||
|
|
|
@ -2747,6 +2747,9 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon)
|
|||
if (r)
|
||||
return r;
|
||||
|
||||
/* Make sure IB tests flushed */
|
||||
flush_delayed_work(&adev->late_init_work);
|
||||
|
||||
/* blat the mode back in */
|
||||
if (fbcon) {
|
||||
if (!amdgpu_device_has_dc_support(adev)) {
|
||||
|
|
|
@ -107,6 +107,9 @@ static void amdgpu_vm_bo_base_init(struct amdgpu_vm_bo_base *base,
|
|||
return;
|
||||
list_add_tail(&base->bo_list, &bo->va);
|
||||
|
||||
if (bo->tbo.type == ttm_bo_type_kernel)
|
||||
list_move(&base->vm_status, &vm->relocated);
|
||||
|
||||
if (bo->tbo.resv != vm->root.base.bo->tbo.resv)
|
||||
return;
|
||||
|
||||
|
@ -468,7 +471,6 @@ static int amdgpu_vm_alloc_levels(struct amdgpu_device *adev,
|
|||
pt->parent = amdgpu_bo_ref(parent->base.bo);
|
||||
|
||||
amdgpu_vm_bo_base_init(&entry->base, vm, pt);
|
||||
list_move(&entry->base.vm_status, &vm->relocated);
|
||||
}
|
||||
|
||||
if (level < AMDGPU_VM_PTB) {
|
||||
|
|
|
@ -83,22 +83,21 @@ static ssize_t dm_dp_aux_transfer(struct drm_dp_aux *aux,
|
|||
enum i2c_mot_mode mot = (msg->request & DP_AUX_I2C_MOT) ?
|
||||
I2C_MOT_TRUE : I2C_MOT_FALSE;
|
||||
enum ddc_result res;
|
||||
uint32_t read_bytes = msg->size;
|
||||
ssize_t read_bytes;
|
||||
|
||||
if (WARN_ON(msg->size > 16))
|
||||
return -E2BIG;
|
||||
|
||||
switch (msg->request & ~DP_AUX_I2C_MOT) {
|
||||
case DP_AUX_NATIVE_READ:
|
||||
res = dal_ddc_service_read_dpcd_data(
|
||||
read_bytes = dal_ddc_service_read_dpcd_data(
|
||||
TO_DM_AUX(aux)->ddc_service,
|
||||
false,
|
||||
I2C_MOT_UNDEF,
|
||||
msg->address,
|
||||
msg->buffer,
|
||||
msg->size,
|
||||
&read_bytes);
|
||||
break;
|
||||
msg->size);
|
||||
return read_bytes;
|
||||
case DP_AUX_NATIVE_WRITE:
|
||||
res = dal_ddc_service_write_dpcd_data(
|
||||
TO_DM_AUX(aux)->ddc_service,
|
||||
|
@ -109,15 +108,14 @@ static ssize_t dm_dp_aux_transfer(struct drm_dp_aux *aux,
|
|||
msg->size);
|
||||
break;
|
||||
case DP_AUX_I2C_READ:
|
||||
res = dal_ddc_service_read_dpcd_data(
|
||||
read_bytes = dal_ddc_service_read_dpcd_data(
|
||||
TO_DM_AUX(aux)->ddc_service,
|
||||
true,
|
||||
mot,
|
||||
msg->address,
|
||||
msg->buffer,
|
||||
msg->size,
|
||||
&read_bytes);
|
||||
break;
|
||||
msg->size);
|
||||
return read_bytes;
|
||||
case DP_AUX_I2C_WRITE:
|
||||
res = dal_ddc_service_write_dpcd_data(
|
||||
TO_DM_AUX(aux)->ddc_service,
|
||||
|
@ -139,9 +137,7 @@ static ssize_t dm_dp_aux_transfer(struct drm_dp_aux *aux,
|
|||
r == DDC_RESULT_SUCESSFULL);
|
||||
#endif
|
||||
|
||||
if (res != DDC_RESULT_SUCESSFULL)
|
||||
return -EIO;
|
||||
return read_bytes;
|
||||
return msg->size;
|
||||
}
|
||||
|
||||
static enum drm_connector_status
|
||||
|
|
|
@ -255,8 +255,9 @@ static void pp_to_dc_clock_levels_with_latency(
|
|||
DC_DECODE_PP_CLOCK_TYPE(dc_clk_type));
|
||||
|
||||
for (i = 0; i < clk_level_info->num_levels; i++) {
|
||||
DRM_DEBUG("DM_PPLIB:\t %d\n", pp_clks->data[i].clocks_in_khz);
|
||||
clk_level_info->data[i].clocks_in_khz = pp_clks->data[i].clocks_in_khz;
|
||||
DRM_DEBUG("DM_PPLIB:\t %d in 10kHz\n", pp_clks->data[i].clocks_in_khz);
|
||||
/* translate 10kHz to kHz */
|
||||
clk_level_info->data[i].clocks_in_khz = pp_clks->data[i].clocks_in_khz * 10;
|
||||
clk_level_info->data[i].latency_in_us = pp_clks->data[i].latency_in_us;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -629,14 +629,13 @@ bool dal_ddc_service_query_ddc_data(
|
|||
return ret;
|
||||
}
|
||||
|
||||
enum ddc_result dal_ddc_service_read_dpcd_data(
|
||||
ssize_t dal_ddc_service_read_dpcd_data(
|
||||
struct ddc_service *ddc,
|
||||
bool i2c,
|
||||
enum i2c_mot_mode mot,
|
||||
uint32_t address,
|
||||
uint8_t *data,
|
||||
uint32_t len,
|
||||
uint32_t *read)
|
||||
uint32_t len)
|
||||
{
|
||||
struct aux_payload read_payload = {
|
||||
.i2c_over_aux = i2c,
|
||||
|
@ -653,8 +652,6 @@ enum ddc_result dal_ddc_service_read_dpcd_data(
|
|||
.mot = mot
|
||||
};
|
||||
|
||||
*read = 0;
|
||||
|
||||
if (len > DEFAULT_AUX_MAX_DATA_SIZE) {
|
||||
BREAK_TO_DEBUGGER();
|
||||
return DDC_RESULT_FAILED_INVALID_OPERATION;
|
||||
|
@ -664,8 +661,7 @@ enum ddc_result dal_ddc_service_read_dpcd_data(
|
|||
ddc->ctx->i2caux,
|
||||
ddc->ddc_pin,
|
||||
&command)) {
|
||||
*read = command.payloads->length;
|
||||
return DDC_RESULT_SUCESSFULL;
|
||||
return (ssize_t)command.payloads->length;
|
||||
}
|
||||
|
||||
return DDC_RESULT_FAILED_OPERATION;
|
||||
|
|
|
@ -1767,12 +1767,10 @@ static void dp_test_send_link_training(struct dc_link *link)
|
|||
dp_retrain_link_dp_test(link, &link_settings, false);
|
||||
}
|
||||
|
||||
/* TODO hbr2 compliance eye output is unstable
|
||||
/* TODO Raven hbr2 compliance eye output is unstable
|
||||
* (toggling on and off) with debugger break
|
||||
* This caueses intermittent PHY automation failure
|
||||
* Need to look into the root cause */
|
||||
static uint8_t force_tps4_for_cp2520 = 1;
|
||||
|
||||
static void dp_test_send_phy_test_pattern(struct dc_link *link)
|
||||
{
|
||||
union phy_test_pattern dpcd_test_pattern;
|
||||
|
@ -1832,13 +1830,13 @@ static void dp_test_send_phy_test_pattern(struct dc_link *link)
|
|||
break;
|
||||
case PHY_TEST_PATTERN_CP2520_1:
|
||||
/* CP2520 pattern is unstable, temporarily use TPS4 instead */
|
||||
test_pattern = (force_tps4_for_cp2520 == 1) ?
|
||||
test_pattern = (link->dc->caps.force_dp_tps4_for_cp2520 == 1) ?
|
||||
DP_TEST_PATTERN_TRAINING_PATTERN4 :
|
||||
DP_TEST_PATTERN_HBR2_COMPLIANCE_EYE;
|
||||
break;
|
||||
case PHY_TEST_PATTERN_CP2520_2:
|
||||
/* CP2520 pattern is unstable, temporarily use TPS4 instead */
|
||||
test_pattern = (force_tps4_for_cp2520 == 1) ?
|
||||
test_pattern = (link->dc->caps.force_dp_tps4_for_cp2520 == 1) ?
|
||||
DP_TEST_PATTERN_TRAINING_PATTERN4 :
|
||||
DP_TEST_PATTERN_HBR2_COMPLIANCE_EYE;
|
||||
break;
|
||||
|
|
|
@ -76,6 +76,7 @@ struct dc_caps {
|
|||
bool is_apu;
|
||||
bool dual_link_dvi;
|
||||
bool post_blend_color_processing;
|
||||
bool force_dp_tps4_for_cp2520;
|
||||
};
|
||||
|
||||
struct dc_dcc_surface_param {
|
||||
|
|
|
@ -741,6 +741,29 @@ static struct mem_input_funcs dce_mi_funcs = {
|
|||
.mem_input_is_flip_pending = dce_mi_is_flip_pending
|
||||
};
|
||||
|
||||
static struct mem_input_funcs dce112_mi_funcs = {
|
||||
.mem_input_program_display_marks = dce112_mi_program_display_marks,
|
||||
.allocate_mem_input = dce_mi_allocate_dmif,
|
||||
.free_mem_input = dce_mi_free_dmif,
|
||||
.mem_input_program_surface_flip_and_addr =
|
||||
dce_mi_program_surface_flip_and_addr,
|
||||
.mem_input_program_pte_vm = dce_mi_program_pte_vm,
|
||||
.mem_input_program_surface_config =
|
||||
dce_mi_program_surface_config,
|
||||
.mem_input_is_flip_pending = dce_mi_is_flip_pending
|
||||
};
|
||||
|
||||
static struct mem_input_funcs dce120_mi_funcs = {
|
||||
.mem_input_program_display_marks = dce120_mi_program_display_marks,
|
||||
.allocate_mem_input = dce_mi_allocate_dmif,
|
||||
.free_mem_input = dce_mi_free_dmif,
|
||||
.mem_input_program_surface_flip_and_addr =
|
||||
dce_mi_program_surface_flip_and_addr,
|
||||
.mem_input_program_pte_vm = dce_mi_program_pte_vm,
|
||||
.mem_input_program_surface_config =
|
||||
dce_mi_program_surface_config,
|
||||
.mem_input_is_flip_pending = dce_mi_is_flip_pending
|
||||
};
|
||||
|
||||
void dce_mem_input_construct(
|
||||
struct dce_mem_input *dce_mi,
|
||||
|
@ -769,7 +792,7 @@ void dce112_mem_input_construct(
|
|||
const struct dce_mem_input_mask *mi_mask)
|
||||
{
|
||||
dce_mem_input_construct(dce_mi, ctx, inst, regs, mi_shift, mi_mask);
|
||||
dce_mi->base.funcs->mem_input_program_display_marks = dce112_mi_program_display_marks;
|
||||
dce_mi->base.funcs = &dce112_mi_funcs;
|
||||
}
|
||||
|
||||
void dce120_mem_input_construct(
|
||||
|
@ -781,5 +804,5 @@ void dce120_mem_input_construct(
|
|||
const struct dce_mem_input_mask *mi_mask)
|
||||
{
|
||||
dce_mem_input_construct(dce_mi, ctx, inst, regs, mi_shift, mi_mask);
|
||||
dce_mi->base.funcs->mem_input_program_display_marks = dce120_mi_program_display_marks;
|
||||
dce_mi->base.funcs = &dce120_mi_funcs;
|
||||
}
|
||||
|
|
|
@ -678,9 +678,22 @@ bool dce100_validate_bandwidth(
|
|||
struct dc *dc,
|
||||
struct dc_state *context)
|
||||
{
|
||||
/* TODO implement when needed but for now hardcode max value*/
|
||||
context->bw.dce.dispclk_khz = 681000;
|
||||
context->bw.dce.yclk_khz = 250000 * MEMORY_TYPE_MULTIPLIER;
|
||||
int i;
|
||||
bool at_least_one_pipe = false;
|
||||
|
||||
for (i = 0; i < dc->res_pool->pipe_count; i++) {
|
||||
if (context->res_ctx.pipe_ctx[i].stream)
|
||||
at_least_one_pipe = true;
|
||||
}
|
||||
|
||||
if (at_least_one_pipe) {
|
||||
/* TODO implement when needed but for now hardcode max value*/
|
||||
context->bw.dce.dispclk_khz = 681000;
|
||||
context->bw.dce.yclk_khz = 250000 * MEMORY_TYPE_MULTIPLIER;
|
||||
} else {
|
||||
context->bw.dce.dispclk_khz = 0;
|
||||
context->bw.dce.yclk_khz = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1027,6 +1027,8 @@ static bool construct(
|
|||
dc->caps.max_slave_planes = 1;
|
||||
dc->caps.is_apu = true;
|
||||
dc->caps.post_blend_color_processing = false;
|
||||
/* Raven DP PHY HBR2 eye diagram pattern is not stable. Use TP4 */
|
||||
dc->caps.force_dp_tps4_for_cp2520 = true;
|
||||
|
||||
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
|
||||
dc->debug = debug_defaults_drv;
|
||||
|
|
|
@ -102,14 +102,13 @@ bool dal_ddc_service_query_ddc_data(
|
|||
uint8_t *read_buf,
|
||||
uint32_t read_size);
|
||||
|
||||
enum ddc_result dal_ddc_service_read_dpcd_data(
|
||||
ssize_t dal_ddc_service_read_dpcd_data(
|
||||
struct ddc_service *ddc,
|
||||
bool i2c,
|
||||
enum i2c_mot_mode mot,
|
||||
uint32_t address,
|
||||
uint8_t *data,
|
||||
uint32_t len,
|
||||
uint32_t *read);
|
||||
uint32_t len);
|
||||
|
||||
enum ddc_result dal_ddc_service_write_dpcd_data(
|
||||
struct ddc_service *ddc,
|
||||
|
|
|
@ -381,6 +381,7 @@ int smu7_request_smu_load_fw(struct pp_hwmgr *hwmgr)
|
|||
uint32_t fw_to_load;
|
||||
int result = 0;
|
||||
struct SMU_DRAMData_TOC *toc;
|
||||
uint32_t num_entries = 0;
|
||||
|
||||
if (!hwmgr->reload_fw) {
|
||||
pr_info("skip reloading...\n");
|
||||
|
@ -422,41 +423,41 @@ int smu7_request_smu_load_fw(struct pp_hwmgr *hwmgr)
|
|||
}
|
||||
|
||||
toc = (struct SMU_DRAMData_TOC *)smu_data->header;
|
||||
toc->num_entries = 0;
|
||||
toc->structure_version = 1;
|
||||
|
||||
PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
|
||||
UCODE_ID_RLC_G, &toc->entry[toc->num_entries++]),
|
||||
UCODE_ID_RLC_G, &toc->entry[num_entries++]),
|
||||
"Failed to Get Firmware Entry.", return -EINVAL);
|
||||
PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
|
||||
UCODE_ID_CP_CE, &toc->entry[toc->num_entries++]),
|
||||
UCODE_ID_CP_CE, &toc->entry[num_entries++]),
|
||||
"Failed to Get Firmware Entry.", return -EINVAL);
|
||||
PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
|
||||
UCODE_ID_CP_PFP, &toc->entry[toc->num_entries++]),
|
||||
UCODE_ID_CP_PFP, &toc->entry[num_entries++]),
|
||||
"Failed to Get Firmware Entry.", return -EINVAL);
|
||||
PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
|
||||
UCODE_ID_CP_ME, &toc->entry[toc->num_entries++]),
|
||||
UCODE_ID_CP_ME, &toc->entry[num_entries++]),
|
||||
"Failed to Get Firmware Entry.", return -EINVAL);
|
||||
PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
|
||||
UCODE_ID_CP_MEC, &toc->entry[toc->num_entries++]),
|
||||
UCODE_ID_CP_MEC, &toc->entry[num_entries++]),
|
||||
"Failed to Get Firmware Entry.", return -EINVAL);
|
||||
PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
|
||||
UCODE_ID_CP_MEC_JT1, &toc->entry[toc->num_entries++]),
|
||||
UCODE_ID_CP_MEC_JT1, &toc->entry[num_entries++]),
|
||||
"Failed to Get Firmware Entry.", return -EINVAL);
|
||||
PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
|
||||
UCODE_ID_CP_MEC_JT2, &toc->entry[toc->num_entries++]),
|
||||
UCODE_ID_CP_MEC_JT2, &toc->entry[num_entries++]),
|
||||
"Failed to Get Firmware Entry.", return -EINVAL);
|
||||
PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
|
||||
UCODE_ID_SDMA0, &toc->entry[toc->num_entries++]),
|
||||
UCODE_ID_SDMA0, &toc->entry[num_entries++]),
|
||||
"Failed to Get Firmware Entry.", return -EINVAL);
|
||||
PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
|
||||
UCODE_ID_SDMA1, &toc->entry[toc->num_entries++]),
|
||||
UCODE_ID_SDMA1, &toc->entry[num_entries++]),
|
||||
"Failed to Get Firmware Entry.", return -EINVAL);
|
||||
if (!hwmgr->not_vf)
|
||||
PP_ASSERT_WITH_CODE(0 == smu7_populate_single_firmware_entry(hwmgr,
|
||||
UCODE_ID_MEC_STORAGE, &toc->entry[toc->num_entries++]),
|
||||
UCODE_ID_MEC_STORAGE, &toc->entry[num_entries++]),
|
||||
"Failed to Get Firmware Entry.", return -EINVAL);
|
||||
|
||||
toc->num_entries = num_entries;
|
||||
smu7_send_msg_to_smc_with_parameter(hwmgr, PPSMC_MSG_DRV_DRAM_ADDR_HI, upper_32_bits(smu_data->header_buffer.mc_addr));
|
||||
smu7_send_msg_to_smc_with_parameter(hwmgr, PPSMC_MSG_DRV_DRAM_ADDR_LO, lower_32_bits(smu_data->header_buffer.mc_addr));
|
||||
|
||||
|
|
|
@ -519,8 +519,9 @@ static irqreturn_t armada_drm_irq(int irq, void *arg)
|
|||
u32 v, stat = readl_relaxed(dcrtc->base + LCD_SPU_IRQ_ISR);
|
||||
|
||||
/*
|
||||
* This is rediculous - rather than writing bits to clear, we
|
||||
* have to set the actual status register value. This is racy.
|
||||
* Reading the ISR appears to clear bits provided CLEAN_SPU_IRQ_ISR
|
||||
* is set. Writing has some other effect to acknowledge the IRQ -
|
||||
* without this, we only get a single IRQ.
|
||||
*/
|
||||
writel_relaxed(0, dcrtc->base + LCD_SPU_IRQ_ISR);
|
||||
|
||||
|
@ -1116,16 +1117,22 @@ armada_drm_crtc_set_property(struct drm_crtc *crtc,
|
|||
static int armada_drm_crtc_enable_vblank(struct drm_crtc *crtc)
|
||||
{
|
||||
struct armada_crtc *dcrtc = drm_to_armada_crtc(crtc);
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&dcrtc->irq_lock, flags);
|
||||
armada_drm_crtc_enable_irq(dcrtc, VSYNC_IRQ_ENA);
|
||||
spin_unlock_irqrestore(&dcrtc->irq_lock, flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void armada_drm_crtc_disable_vblank(struct drm_crtc *crtc)
|
||||
{
|
||||
struct armada_crtc *dcrtc = drm_to_armada_crtc(crtc);
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&dcrtc->irq_lock, flags);
|
||||
armada_drm_crtc_disable_irq(dcrtc, VSYNC_IRQ_ENA);
|
||||
spin_unlock_irqrestore(&dcrtc->irq_lock, flags);
|
||||
}
|
||||
|
||||
static const struct drm_crtc_funcs armada_crtc_funcs = {
|
||||
|
@ -1415,6 +1422,7 @@ static int armada_drm_crtc_create(struct drm_device *drm, struct device *dev,
|
|||
CFG_PDWN64x66, dcrtc->base + LCD_SPU_SRAM_PARA1);
|
||||
writel_relaxed(0x2032ff81, dcrtc->base + LCD_SPU_DMA_CTRL1);
|
||||
writel_relaxed(dcrtc->irq_ena, dcrtc->base + LCD_SPU_IRQ_ENA);
|
||||
readl_relaxed(dcrtc->base + LCD_SPU_IRQ_ISR);
|
||||
writel_relaxed(0, dcrtc->base + LCD_SPU_IRQ_ISR);
|
||||
|
||||
ret = devm_request_irq(dev, irq, armada_drm_irq, 0, "armada_drm_crtc",
|
||||
|
|
|
@ -160,6 +160,7 @@ enum {
|
|||
CFG_ALPHAM_GRA = 0x1 << 16,
|
||||
CFG_ALPHAM_CFG = 0x2 << 16,
|
||||
CFG_ALPHA_MASK = 0xff << 8,
|
||||
#define CFG_ALPHA(x) ((x) << 8)
|
||||
CFG_PIXCMD_MASK = 0xff,
|
||||
};
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ struct armada_ovl_plane_properties {
|
|||
uint16_t contrast;
|
||||
uint16_t saturation;
|
||||
uint32_t colorkey_mode;
|
||||
uint32_t colorkey_enable;
|
||||
};
|
||||
|
||||
struct armada_ovl_plane {
|
||||
|
@ -54,11 +55,13 @@ armada_ovl_update_attr(struct armada_ovl_plane_properties *prop,
|
|||
writel_relaxed(0x00002000, dcrtc->base + LCD_SPU_CBSH_HUE);
|
||||
|
||||
spin_lock_irq(&dcrtc->irq_lock);
|
||||
armada_updatel(prop->colorkey_mode | CFG_ALPHAM_GRA,
|
||||
CFG_CKMODE_MASK | CFG_ALPHAM_MASK | CFG_ALPHA_MASK,
|
||||
dcrtc->base + LCD_SPU_DMA_CTRL1);
|
||||
|
||||
armada_updatel(ADV_GRACOLORKEY, 0, dcrtc->base + LCD_SPU_ADV_REG);
|
||||
armada_updatel(prop->colorkey_mode,
|
||||
CFG_CKMODE_MASK | CFG_ALPHAM_MASK | CFG_ALPHA_MASK,
|
||||
dcrtc->base + LCD_SPU_DMA_CTRL1);
|
||||
if (dcrtc->variant->has_spu_adv_reg)
|
||||
armada_updatel(prop->colorkey_enable,
|
||||
ADV_GRACOLORKEY | ADV_VIDCOLORKEY,
|
||||
dcrtc->base + LCD_SPU_ADV_REG);
|
||||
spin_unlock_irq(&dcrtc->irq_lock);
|
||||
}
|
||||
|
||||
|
@ -321,8 +324,17 @@ static int armada_ovl_plane_set_property(struct drm_plane *plane,
|
|||
dplane->prop.colorkey_vb |= K2B(val);
|
||||
update_attr = true;
|
||||
} else if (property == priv->colorkey_mode_prop) {
|
||||
dplane->prop.colorkey_mode &= ~CFG_CKMODE_MASK;
|
||||
dplane->prop.colorkey_mode |= CFG_CKMODE(val);
|
||||
if (val == CKMODE_DISABLE) {
|
||||
dplane->prop.colorkey_mode =
|
||||
CFG_CKMODE(CKMODE_DISABLE) |
|
||||
CFG_ALPHAM_CFG | CFG_ALPHA(255);
|
||||
dplane->prop.colorkey_enable = 0;
|
||||
} else {
|
||||
dplane->prop.colorkey_mode =
|
||||
CFG_CKMODE(val) |
|
||||
CFG_ALPHAM_GRA | CFG_ALPHA(0);
|
||||
dplane->prop.colorkey_enable = ADV_GRACOLORKEY;
|
||||
}
|
||||
update_attr = true;
|
||||
} else if (property == priv->brightness_prop) {
|
||||
dplane->prop.brightness = val - 256;
|
||||
|
@ -453,7 +465,9 @@ int armada_overlay_plane_create(struct drm_device *dev, unsigned long crtcs)
|
|||
dplane->prop.colorkey_yr = 0xfefefe00;
|
||||
dplane->prop.colorkey_ug = 0x01010100;
|
||||
dplane->prop.colorkey_vb = 0x01010100;
|
||||
dplane->prop.colorkey_mode = CFG_CKMODE(CKMODE_RGB);
|
||||
dplane->prop.colorkey_mode = CFG_CKMODE(CKMODE_RGB) |
|
||||
CFG_ALPHAM_GRA | CFG_ALPHA(0);
|
||||
dplane->prop.colorkey_enable = ADV_GRACOLORKEY;
|
||||
dplane->prop.brightness = 0;
|
||||
dplane->prop.contrast = 0x4000;
|
||||
dplane->prop.saturation = 0x4000;
|
||||
|
|
|
@ -553,24 +553,13 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev,
|
|||
|
||||
/* Clone the lessor file to create a new file for us */
|
||||
DRM_DEBUG_LEASE("Allocating lease file\n");
|
||||
path_get(&lessor_file->f_path);
|
||||
lessee_file = alloc_file(&lessor_file->f_path,
|
||||
lessor_file->f_mode,
|
||||
fops_get(lessor_file->f_inode->i_fop));
|
||||
|
||||
lessee_file = filp_clone_open(lessor_file);
|
||||
if (IS_ERR(lessee_file)) {
|
||||
ret = PTR_ERR(lessee_file);
|
||||
goto out_lessee;
|
||||
}
|
||||
|
||||
/* Initialize the new file for DRM */
|
||||
DRM_DEBUG_LEASE("Initializing the file with %p\n", lessee_file->f_op->open);
|
||||
ret = lessee_file->f_op->open(lessee_file->f_inode, lessee_file);
|
||||
if (ret)
|
||||
goto out_lessee_file;
|
||||
|
||||
lessee_priv = lessee_file->private_data;
|
||||
|
||||
/* Change the file to a master one */
|
||||
drm_master_put(&lessee_priv->master);
|
||||
lessee_priv->master = lessee;
|
||||
|
@ -588,9 +577,6 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev,
|
|||
DRM_DEBUG_LEASE("drm_mode_create_lease_ioctl succeeded\n");
|
||||
return 0;
|
||||
|
||||
out_lessee_file:
|
||||
fput(lessee_file);
|
||||
|
||||
out_lessee:
|
||||
drm_master_put(&lessee);
|
||||
|
||||
|
|
|
@ -862,6 +862,7 @@ static int cmd_reg_handler(struct parser_exec_state *s,
|
|||
{
|
||||
struct intel_vgpu *vgpu = s->vgpu;
|
||||
struct intel_gvt *gvt = vgpu->gvt;
|
||||
u32 ctx_sr_ctl;
|
||||
|
||||
if (offset + 4 > gvt->device_info.mmio_size) {
|
||||
gvt_vgpu_err("%s access to (%x) outside of MMIO range\n",
|
||||
|
@ -894,6 +895,28 @@ static int cmd_reg_handler(struct parser_exec_state *s,
|
|||
patch_value(s, cmd_ptr(s, index), VGT_PVINFO_PAGE);
|
||||
}
|
||||
|
||||
/* TODO
|
||||
* Right now only scan LRI command on KBL and in inhibit context.
|
||||
* It's good enough to support initializing mmio by lri command in
|
||||
* vgpu inhibit context on KBL.
|
||||
*/
|
||||
if (IS_KABYLAKE(s->vgpu->gvt->dev_priv) &&
|
||||
intel_gvt_mmio_is_in_ctx(gvt, offset) &&
|
||||
!strncmp(cmd, "lri", 3)) {
|
||||
intel_gvt_hypervisor_read_gpa(s->vgpu,
|
||||
s->workload->ring_context_gpa + 12, &ctx_sr_ctl, 4);
|
||||
/* check inhibit context */
|
||||
if (ctx_sr_ctl & 1) {
|
||||
u32 data = cmd_val(s, index + 1);
|
||||
|
||||
if (intel_gvt_mmio_has_mode_mask(s->vgpu->gvt, offset))
|
||||
intel_vgpu_mask_mmio_write(vgpu,
|
||||
offset, &data, 4);
|
||||
else
|
||||
vgpu_vreg(vgpu, offset) = data;
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: Update the global mask if this MMIO is a masked-MMIO */
|
||||
intel_gvt_mmio_set_cmd_accessed(gvt, offset);
|
||||
return 0;
|
||||
|
|
|
@ -268,6 +268,8 @@ struct intel_gvt_mmio {
|
|||
#define F_CMD_ACCESSED (1 << 5)
|
||||
/* This reg could be accessed by unaligned address */
|
||||
#define F_UNALIGN (1 << 6)
|
||||
/* This reg is saved/restored in context */
|
||||
#define F_IN_CTX (1 << 7)
|
||||
|
||||
struct gvt_mmio_block *mmio_block;
|
||||
unsigned int num_mmio_block;
|
||||
|
@ -639,6 +641,33 @@ static inline bool intel_gvt_mmio_has_mode_mask(
|
|||
return gvt->mmio.mmio_attribute[offset >> 2] & F_MODE_MASK;
|
||||
}
|
||||
|
||||
/**
|
||||
* intel_gvt_mmio_is_in_ctx - check if a MMIO has in-ctx mask
|
||||
* @gvt: a GVT device
|
||||
* @offset: register offset
|
||||
*
|
||||
* Returns:
|
||||
* True if a MMIO has a in-context mask, false if it isn't.
|
||||
*
|
||||
*/
|
||||
static inline bool intel_gvt_mmio_is_in_ctx(
|
||||
struct intel_gvt *gvt, unsigned int offset)
|
||||
{
|
||||
return gvt->mmio.mmio_attribute[offset >> 2] & F_IN_CTX;
|
||||
}
|
||||
|
||||
/**
|
||||
* intel_gvt_mmio_set_in_ctx - mask a MMIO in logical context
|
||||
* @gvt: a GVT device
|
||||
* @offset: register offset
|
||||
*
|
||||
*/
|
||||
static inline void intel_gvt_mmio_set_in_ctx(
|
||||
struct intel_gvt *gvt, unsigned int offset)
|
||||
{
|
||||
gvt->mmio.mmio_attribute[offset >> 2] |= F_IN_CTX;
|
||||
}
|
||||
|
||||
int intel_gvt_debugfs_add_vgpu(struct intel_vgpu *vgpu);
|
||||
void intel_gvt_debugfs_remove_vgpu(struct intel_vgpu *vgpu);
|
||||
int intel_gvt_debugfs_init(struct intel_gvt *gvt);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue