Linux 4.18-rc6
-----BEGIN PGP SIGNATURE----- iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAltU8z0eHHRvcnZhbGRz QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiG5X8H/2fJr7m3k242+t76 sitwvx1eoPqTgryW59dRKm9IuXAGA+AjauvHzaz1QxomeQa50JghGWefD0eiJfkA 1AphQ/24EOiAbbVk084dAI/C2p122dE4D5Fy7CrfLnuouyrbFaZI5STbnrRct7sR 9deeYW0GDHO1Uenp4WDCj0baaqJqaevZ+7GG09DnWpya2nQtSkGBjqn6GpYmrfOU mqFuxAX8mEOW6cwK16y/vYtnVjuuMAiZ63/OJ8AQ6d6ArGLwAsdn7f8Fn4I4tEr2 L0d3CRLUyegms4++Dmlu05k64buQu46WlPhjCZc5/Ts4kjrNxBuHejj2/jeSnUSt vJJlibI= =42a5 -----END PGP SIGNATURE----- Merge tag 'v4.18-rc6' into for-4.19/block2 Pull in 4.18-rc6 to get the NVMe core AEN change to avoid a merge conflict down the line. Signed-of-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Коммит
05b9ba4b55
|
@ -4846,3 +4846,8 @@
|
|||
xirc2ps_cs= [NET,PCMCIA]
|
||||
Format:
|
||||
<irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]]
|
||||
|
||||
xhci-hcd.quirks [USB,KNL]
|
||||
A hex value specifying bitmask with supplemental xhci
|
||||
host controller quirks. Meaning of each bit can be
|
||||
consulted in header drivers/usb/host/xhci.h.
|
||||
|
|
|
@ -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>;
|
||||
};
|
||||
|
|
|
@ -50,6 +50,11 @@ LDFLAGS_MODULE
|
|||
--------------------------------------------------
|
||||
Additional options used for $(LD) when linking modules.
|
||||
|
||||
KBUILD_KCONFIG
|
||||
--------------------------------------------------
|
||||
Set the top-level Kconfig file to the value of this environment
|
||||
variable. The default name is "Kconfig".
|
||||
|
||||
KBUILD_VERBOSE
|
||||
--------------------------------------------------
|
||||
Set the kbuild verbosity. Can be assigned same values as "V=...".
|
||||
|
@ -88,7 +93,8 @@ In most cases the name of the architecture is the same as the
|
|||
directory name found in the arch/ directory.
|
||||
But some architectures such as x86 and sparc have aliases.
|
||||
x86: i386 for 32 bit, x86_64 for 64 bit
|
||||
sparc: sparc for 32 bit, sparc64 for 64 bit
|
||||
sh: sh for 32 bit, sh64 for 64 bit
|
||||
sparc: sparc32 for 32 bit, sparc64 for 64 bit
|
||||
|
||||
CROSS_COMPILE
|
||||
--------------------------------------------------
|
||||
|
@ -148,15 +154,6 @@ stripped after they are installed. If INSTALL_MOD_STRIP is '1', then
|
|||
the default option --strip-debug will be used. Otherwise,
|
||||
INSTALL_MOD_STRIP value will be used as the options to the strip command.
|
||||
|
||||
INSTALL_FW_PATH
|
||||
--------------------------------------------------
|
||||
INSTALL_FW_PATH specifies where to install the firmware blobs.
|
||||
The default value is:
|
||||
|
||||
$(INSTALL_MOD_PATH)/lib/firmware
|
||||
|
||||
The value can be overridden in which case the default value is ignored.
|
||||
|
||||
INSTALL_HDR_PATH
|
||||
--------------------------------------------------
|
||||
INSTALL_HDR_PATH specifies where to install user space headers when
|
||||
|
|
|
@ -2,9 +2,9 @@ This file contains some assistance for using "make *config".
|
|||
|
||||
Use "make help" to list all of the possible configuration targets.
|
||||
|
||||
The xconfig ('qconf') and menuconfig ('mconf') programs also
|
||||
have embedded help text. Be sure to check it for navigation,
|
||||
search, and other general help text.
|
||||
The xconfig ('qconf'), menuconfig ('mconf'), and nconfig ('nconf')
|
||||
programs also have embedded help text. Be sure to check that for
|
||||
navigation, search, and other general help text.
|
||||
|
||||
======================================================================
|
||||
General
|
||||
|
@ -17,13 +17,16 @@ this happens, using a previously working .config file and running
|
|||
for you, so you may find that you need to see what NEW kernel
|
||||
symbols have been introduced.
|
||||
|
||||
To see a list of new config symbols when using "make oldconfig", use
|
||||
To see a list of new config symbols, use
|
||||
|
||||
cp user/some/old.config .config
|
||||
make listnewconfig
|
||||
|
||||
and the config program will list any new symbols, one per line.
|
||||
|
||||
Alternatively, you can use the brute force method:
|
||||
|
||||
make oldconfig
|
||||
scripts/diffconfig .config.old .config | less
|
||||
|
||||
______________________________________________________________________
|
||||
|
@ -160,7 +163,7 @@ Searching in menuconfig:
|
|||
This lists all config symbols that contain "hotplug",
|
||||
e.g., HOTPLUG_CPU, MEMORY_HOTPLUG.
|
||||
|
||||
For search help, enter / followed TAB-TAB-TAB (to highlight
|
||||
For search help, enter / followed by TAB-TAB (to highlight
|
||||
<Help>) and Enter. This will tell you that you can also use
|
||||
regular expressions (regexes) in the search string, so if you
|
||||
are not interested in MEMORY_HOTPLUG, you could try
|
||||
|
@ -202,6 +205,39 @@ Example:
|
|||
make MENUCONFIG_MODE=single_menu menuconfig
|
||||
|
||||
|
||||
======================================================================
|
||||
nconfig
|
||||
--------------------------------------------------
|
||||
|
||||
nconfig is an alternate text-based configurator. It lists function
|
||||
keys across the bottom of the terminal (window) that execute commands.
|
||||
You can also just use the corresponding numeric key to execute the
|
||||
commands unless you are in a data entry window. E.g., instead of F6
|
||||
for Save, you can just press 6.
|
||||
|
||||
Use F1 for Global help or F3 for the Short help menu.
|
||||
|
||||
Searching in nconfig:
|
||||
|
||||
You can search either in the menu entry "prompt" strings
|
||||
or in the configuration symbols.
|
||||
|
||||
Use / to begin a search through the menu entries. This does
|
||||
not support regular expressions. Use <Down> or <Up> for
|
||||
Next hit and Previous hit, respectively. Use <Esc> to
|
||||
terminate the search mode.
|
||||
|
||||
F8 (SymSearch) searches the configuration symbols for the
|
||||
given string or regular expression (regex).
|
||||
|
||||
NCONFIG_MODE
|
||||
--------------------------------------------------
|
||||
This mode shows all sub-menus in one large tree.
|
||||
|
||||
Example:
|
||||
make NCONFIG_MODE=single_menu nconfig
|
||||
|
||||
|
||||
======================================================================
|
||||
xconfig
|
||||
--------------------------------------------------
|
||||
|
@ -230,8 +266,7 @@ gconfig
|
|||
|
||||
Searching in gconfig:
|
||||
|
||||
None (gconfig isn't maintained as well as xconfig or menuconfig);
|
||||
however, gconfig does have a few more viewing choices than
|
||||
xconfig does.
|
||||
There is no search command in gconfig. However, gconfig does
|
||||
have several different viewing choices, modes, and options.
|
||||
|
||||
###
|
||||
|
|
|
@ -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
|
||||
=======
|
||||
|
|
18
MAINTAINERS
18
MAINTAINERS
|
@ -581,7 +581,7 @@ W: https://www.infradead.org/~dhowells/kafs/
|
|||
|
||||
AGPGART DRIVER
|
||||
M: David Airlie <airlied@linux.ie>
|
||||
T: git git://people.freedesktop.org/~airlied/linux (part of drm maint)
|
||||
T: git git://anongit.freedesktop.org/drm/drm
|
||||
S: Maintained
|
||||
F: drivers/char/agp/
|
||||
F: include/linux/agp*
|
||||
|
@ -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
|
||||
|
@ -4460,6 +4460,7 @@ F: Documentation/blockdev/drbd/
|
|||
|
||||
DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
|
||||
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
R: "Rafael J. Wysocki" <rafael@kernel.org>
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
|
||||
S: Supported
|
||||
F: Documentation/kobject.txt
|
||||
|
@ -4630,7 +4631,7 @@ F: include/uapi/drm/vmwgfx_drm.h
|
|||
DRM DRIVERS
|
||||
M: David Airlie <airlied@linux.ie>
|
||||
L: dri-devel@lists.freedesktop.org
|
||||
T: git git://people.freedesktop.org/~airlied/linux
|
||||
T: git git://anongit.freedesktop.org/drm/drm
|
||||
B: https://bugs.freedesktop.org/
|
||||
C: irc://chat.freenode.net/dri-devel
|
||||
S: Maintained
|
||||
|
@ -5789,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
|
||||
|
@ -6908,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
|
||||
|
@ -8628,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/
|
||||
|
@ -9074,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
|
||||
|
@ -10213,11 +10213,13 @@ F: sound/soc/codecs/sgtl5000*
|
|||
|
||||
NXP TDA998X DRM DRIVER
|
||||
M: Russell King <linux@armlinux.org.uk>
|
||||
S: Supported
|
||||
S: Maintained
|
||||
T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda998x-devel
|
||||
T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda998x-fixes
|
||||
F: drivers/gpu/drm/i2c/tda998x_drv.c
|
||||
F: include/drm/i2c/tda998x.h
|
||||
F: include/dt-bindings/display/tda998x.h
|
||||
K: "nxp,tda998x"
|
||||
|
||||
NXP TFA9879 DRIVER
|
||||
M: Peter Rosin <peda@axentia.se>
|
||||
|
|
10
Makefile
10
Makefile
|
@ -2,7 +2,7 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 18
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc4
|
||||
EXTRAVERSION = -rc6
|
||||
NAME = Merciless Moray
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -353,9 +353,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
|
|||
else if [ -x /bin/bash ]; then echo /bin/bash; \
|
||||
else echo sh; fi ; fi)
|
||||
|
||||
HOST_LFS_CFLAGS := $(shell getconf LFS_CFLAGS)
|
||||
HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS)
|
||||
HOST_LFS_LIBS := $(shell getconf LFS_LIBS)
|
||||
HOST_LFS_CFLAGS := $(shell getconf LFS_CFLAGS 2>/dev/null)
|
||||
HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS 2>/dev/null)
|
||||
HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null)
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTCXX = g++
|
||||
|
@ -1712,6 +1712,6 @@ endif # skip-makefile
|
|||
PHONY += FORCE
|
||||
FORCE:
|
||||
|
||||
# Declare the contents of the .PHONY variable as phony. We keep that
|
||||
# Declare the contents of the PHONY variable as phony. We keep that
|
||||
# information in a variable so we can use it in if_changed and friends.
|
||||
.PHONY: $(PHONY)
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -91,6 +91,11 @@
|
|||
};
|
||||
};
|
||||
|
||||
/* Table Table 5-79 of the TRM shows 480ab000 is reserved */
|
||||
&usb_otg_hs {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&iva {
|
||||
status = "disabled";
|
||||
};
|
||||
|
|
|
@ -547,7 +547,7 @@
|
|||
|
||||
thermal: thermal@e8078 {
|
||||
compatible = "marvell,armada380-thermal";
|
||||
reg = <0xe4078 0x4>, <0xe4074 0x4>;
|
||||
reg = <0xe4078 0x4>, <0xe4070 0x8>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -177,7 +177,7 @@ M_CLASS(streq r3, [r12, #PMSAv8_MAIR1])
|
|||
bic r0, r0, #CR_I
|
||||
#endif
|
||||
mcr p15, 0, r0, c1, c0, 0 @ write control reg
|
||||
isb
|
||||
instr_sync
|
||||
#elif defined (CONFIG_CPU_V7M)
|
||||
#ifdef CONFIG_ARM_MPU
|
||||
ldreq r3, [r12, MPU_CTRL]
|
||||
|
|
|
@ -109,6 +109,45 @@ void omap5_erratum_workaround_801819(void)
|
|||
static inline void omap5_erratum_workaround_801819(void) { }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HARDEN_BRANCH_PREDICTOR
|
||||
/*
|
||||
* Configure ACR and enable ACTLR[0] (Enable invalidates of BTB with
|
||||
* ICIALLU) to activate the workaround for secondary Core.
|
||||
* NOTE: it is assumed that the primary core's configuration is done
|
||||
* by the boot loader (kernel will detect a misconfiguration and complain
|
||||
* if this is not done).
|
||||
*
|
||||
* In General Purpose(GP) devices, ACR bit settings can only be done
|
||||
* by ROM code in "secure world" using the smc call and there is no
|
||||
* option to update the "firmware" on such devices. This also works for
|
||||
* High security(HS) devices, as a backup option in case the
|
||||
* "update" is not done in the "security firmware".
|
||||
*/
|
||||
static void omap5_secondary_harden_predictor(void)
|
||||
{
|
||||
u32 acr, acr_mask;
|
||||
|
||||
asm volatile ("mrc p15, 0, %0, c1, c0, 1" : "=r" (acr));
|
||||
|
||||
/*
|
||||
* ACTLR[0] (Enable invalidates of BTB with ICIALLU)
|
||||
*/
|
||||
acr_mask = BIT(0);
|
||||
|
||||
/* Do we already have it done.. if yes, skip expensive smc */
|
||||
if ((acr & acr_mask) == acr_mask)
|
||||
return;
|
||||
|
||||
acr |= acr_mask;
|
||||
omap_smc1(OMAP5_DRA7_MON_SET_ACR_INDEX, acr);
|
||||
|
||||
pr_debug("%s: ARM ACR setup for CVE_2017_5715 applied on CPU%d\n",
|
||||
__func__, smp_processor_id());
|
||||
}
|
||||
#else
|
||||
static inline void omap5_secondary_harden_predictor(void) { }
|
||||
#endif
|
||||
|
||||
static void omap4_secondary_init(unsigned int cpu)
|
||||
{
|
||||
/*
|
||||
|
@ -131,6 +170,8 @@ static void omap4_secondary_init(unsigned int cpu)
|
|||
set_cntfreq();
|
||||
/* Configure ACR to disable streaming WA for 801819 */
|
||||
omap5_erratum_workaround_801819();
|
||||
/* Enable ACR to allow for ICUALLU workaround */
|
||||
omap5_secondary_harden_predictor();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -185,7 +185,7 @@ static int pxa_irq_suspend(void)
|
|||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
|
||||
for (i = 0; i < DIV_ROUND_UP(pxa_internal_irq_nr, 32); i++) {
|
||||
void __iomem *base = irq_base(i);
|
||||
|
||||
saved_icmr[i] = __raw_readl(base + ICMR);
|
||||
|
@ -204,7 +204,7 @@ static void pxa_irq_resume(void)
|
|||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
|
||||
for (i = 0; i < DIV_ROUND_UP(pxa_internal_irq_nr, 32); i++) {
|
||||
void __iomem *base = irq_base(i);
|
||||
|
||||
__raw_writel(saved_icmr[i], base + ICMR);
|
||||
|
|
|
@ -736,20 +736,29 @@ static int __mark_rodata_ro(void *unused)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int kernel_set_to_readonly __read_mostly;
|
||||
|
||||
void mark_rodata_ro(void)
|
||||
{
|
||||
kernel_set_to_readonly = 1;
|
||||
stop_machine(__mark_rodata_ro, NULL, NULL);
|
||||
debug_checkwx();
|
||||
}
|
||||
|
||||
void set_kernel_text_rw(void)
|
||||
{
|
||||
if (!kernel_set_to_readonly)
|
||||
return;
|
||||
|
||||
set_section_perms(ro_perms, ARRAY_SIZE(ro_perms), false,
|
||||
current->active_mm);
|
||||
}
|
||||
|
||||
void set_kernel_text_ro(void)
|
||||
{
|
||||
if (!kernel_set_to_readonly)
|
||||
return;
|
||||
|
||||
set_section_perms(ro_perms, ARRAY_SIZE(ro_perms), true,
|
||||
current->active_mm);
|
||||
}
|
||||
|
|
|
@ -60,13 +60,15 @@ ifeq ($(CONFIG_CPU_BIG_ENDIAN), y)
|
|||
KBUILD_CPPFLAGS += -mbig-endian
|
||||
CHECKFLAGS += -D__AARCH64EB__
|
||||
AS += -EB
|
||||
LDFLAGS += -EB -maarch64elfb
|
||||
# We must use the linux target here, since distributions don't tend to package
|
||||
# the ELF linker scripts with binutils, and this results in a build failure.
|
||||
LDFLAGS += -EB -maarch64linuxb
|
||||
UTS_MACHINE := aarch64_be
|
||||
else
|
||||
KBUILD_CPPFLAGS += -mlittle-endian
|
||||
CHECKFLAGS += -D__AARCH64EL__
|
||||
AS += -EL
|
||||
LDFLAGS += -EL -maarch64elf
|
||||
LDFLAGS += -EL -maarch64linux # See comment above
|
||||
UTS_MACHINE := aarch64
|
||||
endif
|
||||
|
||||
|
|
|
@ -29,20 +29,15 @@ DECLARE_PER_CPU(bool, kernel_neon_busy);
|
|||
static __must_check inline bool may_use_simd(void)
|
||||
{
|
||||
/*
|
||||
* The raw_cpu_read() is racy if called with preemption enabled.
|
||||
* This is not a bug: kernel_neon_busy is only set when
|
||||
* preemption is disabled, so we cannot migrate to another CPU
|
||||
* while it is set, nor can we migrate to a CPU where it is set.
|
||||
* So, if we find it clear on some CPU then we're guaranteed to
|
||||
* find it clear on any CPU we could migrate to.
|
||||
*
|
||||
* If we are in between kernel_neon_begin()...kernel_neon_end(),
|
||||
* the flag will be set, but preemption is also disabled, so we
|
||||
* can't migrate to another CPU and spuriously see it become
|
||||
* false.
|
||||
* kernel_neon_busy is only set while preemption is disabled,
|
||||
* and is clear whenever preemption is enabled. Since
|
||||
* this_cpu_read() is atomic w.r.t. preemption, kernel_neon_busy
|
||||
* cannot change under our feet -- if it's set we cannot be
|
||||
* migrated, and if it's clear we cannot be migrated to a CPU
|
||||
* where it is set.
|
||||
*/
|
||||
return !in_irq() && !irqs_disabled() && !in_nmi() &&
|
||||
!raw_cpu_read(kernel_neon_busy);
|
||||
!this_cpu_read(kernel_neon_busy);
|
||||
}
|
||||
|
||||
#else /* ! CONFIG_KERNEL_MODE_NEON */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <linux/kallsyms.h>
|
||||
#include <linux/random.h>
|
||||
#include <linux/prctl.h>
|
||||
#include <linux/nmi.h>
|
||||
|
||||
#include <asm/asm.h>
|
||||
#include <asm/bootinfo.h>
|
||||
|
@ -655,28 +656,42 @@ unsigned long arch_align_stack(unsigned long sp)
|
|||
return sp & ALMASK;
|
||||
}
|
||||
|
||||
static void arch_dump_stack(void *info)
|
||||
static DEFINE_PER_CPU(call_single_data_t, backtrace_csd);
|
||||
static struct cpumask backtrace_csd_busy;
|
||||
|
||||
static void handle_backtrace(void *info)
|
||||
{
|
||||
struct pt_regs *regs;
|
||||
nmi_cpu_backtrace(get_irq_regs());
|
||||
cpumask_clear_cpu(smp_processor_id(), &backtrace_csd_busy);
|
||||
}
|
||||
|
||||
regs = get_irq_regs();
|
||||
static void raise_backtrace(cpumask_t *mask)
|
||||
{
|
||||
call_single_data_t *csd;
|
||||
int cpu;
|
||||
|
||||
if (regs)
|
||||
show_regs(regs);
|
||||
for_each_cpu(cpu, mask) {
|
||||
/*
|
||||
* If we previously sent an IPI to the target CPU & it hasn't
|
||||
* cleared its bit in the busy cpumask then it didn't handle
|
||||
* our previous IPI & it's not safe for us to reuse the
|
||||
* call_single_data_t.
|
||||
*/
|
||||
if (cpumask_test_and_set_cpu(cpu, &backtrace_csd_busy)) {
|
||||
pr_warn("Unable to send backtrace IPI to CPU%u - perhaps it hung?\n",
|
||||
cpu);
|
||||
continue;
|
||||
}
|
||||
|
||||
dump_stack();
|
||||
csd = &per_cpu(backtrace_csd, cpu);
|
||||
csd->func = handle_backtrace;
|
||||
smp_call_function_single_async(cpu, csd);
|
||||
}
|
||||
}
|
||||
|
||||
void arch_trigger_cpumask_backtrace(const cpumask_t *mask, bool exclude_self)
|
||||
{
|
||||
long this_cpu = get_cpu();
|
||||
|
||||
if (cpumask_test_cpu(this_cpu, mask) && !exclude_self)
|
||||
dump_stack();
|
||||
|
||||
smp_call_function_many(mask, arch_dump_stack, NULL, 1);
|
||||
|
||||
put_cpu();
|
||||
nmi_trigger_cpumask_backtrace(mask, exclude_self, raise_backtrace);
|
||||
}
|
||||
|
||||
int mips_get_process_fp_mode(struct task_struct *task)
|
||||
|
|
|
@ -351,6 +351,7 @@ static void __show_regs(const struct pt_regs *regs)
|
|||
void show_regs(struct pt_regs *regs)
|
||||
{
|
||||
__show_regs((struct pt_regs *)regs);
|
||||
dump_stack();
|
||||
}
|
||||
|
||||
void show_registers(struct pt_regs *regs)
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <linux/export.h>
|
||||
#include <asm/addrspace.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
@ -98,6 +99,20 @@ static int remap_area_pages(unsigned long address, phys_addr_t phys_addr,
|
|||
return error;
|
||||
}
|
||||
|
||||
static int __ioremap_check_ram(unsigned long start_pfn, unsigned long nr_pages,
|
||||
void *arg)
|
||||
{
|
||||
unsigned long i;
|
||||
|
||||
for (i = 0; i < nr_pages; i++) {
|
||||
if (pfn_valid(start_pfn + i) &&
|
||||
!PageReserved(pfn_to_page(start_pfn + i)))
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generic mapping function (not visible outside):
|
||||
*/
|
||||
|
@ -116,8 +131,8 @@ static int remap_area_pages(unsigned long address, phys_addr_t phys_addr,
|
|||
|
||||
void __iomem * __ioremap(phys_addr_t phys_addr, phys_addr_t size, unsigned long flags)
|
||||
{
|
||||
unsigned long offset, pfn, last_pfn;
|
||||
struct vm_struct * area;
|
||||
unsigned long offset;
|
||||
phys_addr_t last_addr;
|
||||
void * addr;
|
||||
|
||||
|
@ -137,18 +152,16 @@ void __iomem * __ioremap(phys_addr_t phys_addr, phys_addr_t size, unsigned long
|
|||
return (void __iomem *) CKSEG1ADDR(phys_addr);
|
||||
|
||||
/*
|
||||
* Don't allow anybody to remap normal RAM that we're using..
|
||||
* Don't allow anybody to remap RAM that may be allocated by the page
|
||||
* allocator, since that could lead to races & data clobbering.
|
||||
*/
|
||||
if (phys_addr < virt_to_phys(high_memory)) {
|
||||
char *t_addr, *t_end;
|
||||
struct page *page;
|
||||
|
||||
t_addr = __va(phys_addr);
|
||||
t_end = t_addr + (size - 1);
|
||||
|
||||
for(page = virt_to_page(t_addr); page <= virt_to_page(t_end); page++)
|
||||
if(!PageReserved(page))
|
||||
return NULL;
|
||||
pfn = PFN_DOWN(phys_addr);
|
||||
last_pfn = PFN_DOWN(last_addr);
|
||||
if (walk_system_ram_range(pfn, last_pfn - pfn + 1, NULL,
|
||||
__ioremap_check_ram) == 1) {
|
||||
WARN_ONCE(1, "ioremap on RAM at %pa - %pa\n",
|
||||
&phys_addr, &last_addr);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -114,18 +114,12 @@ __setup_efi_pci(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom)
|
|||
struct pci_setup_rom *rom = NULL;
|
||||
efi_status_t status;
|
||||
unsigned long size;
|
||||
uint64_t attributes, romsize;
|
||||
uint64_t romsize;
|
||||
void *romimage;
|
||||
|
||||
status = efi_call_proto(efi_pci_io_protocol, attributes, pci,
|
||||
EfiPciIoAttributeOperationGet, 0ULL,
|
||||
&attributes);
|
||||
if (status != EFI_SUCCESS)
|
||||
return status;
|
||||
|
||||
/*
|
||||
* Some firmware images contain EFI function pointers at the place where the
|
||||
* romimage and romsize fields are supposed to be. Typically the EFI
|
||||
* Some firmware images contain EFI function pointers at the place where
|
||||
* the romimage and romsize fields are supposed to be. Typically the EFI
|
||||
* code is mapped at high addresses, translating to an unrealistically
|
||||
* large romsize. The UEFI spec limits the size of option ROMs to 16
|
||||
* MiB so we reject any ROMs over 16 MiB in size to catch this.
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -6,7 +6,7 @@ purgatory-y := purgatory.o stack.o setup-x86_$(BITS).o sha256.o entry64.o string
|
|||
targets += $(purgatory-y)
|
||||
PURGATORY_OBJS = $(addprefix $(obj)/,$(purgatory-y))
|
||||
|
||||
$(obj)/sha256.o: $(srctree)/lib/sha256.c
|
||||
$(obj)/sha256.o: $(srctree)/lib/sha256.c FORCE
|
||||
$(call if_changed_rule,cc_o_c)
|
||||
|
||||
LDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined -nostdlib -z nodefaultlib
|
||||
|
|
|
@ -1207,12 +1207,20 @@ asmlinkage __visible void __init xen_start_kernel(void)
|
|||
|
||||
xen_setup_features();
|
||||
|
||||
xen_setup_machphys_mapping();
|
||||
|
||||
/* Install Xen paravirt ops */
|
||||
pv_info = xen_info;
|
||||
pv_init_ops.patch = paravirt_patch_default;
|
||||
pv_cpu_ops = xen_cpu_ops;
|
||||
xen_init_irq_ops();
|
||||
|
||||
/*
|
||||
* Setup xen_vcpu early because it is needed for
|
||||
* local_irq_disable(), irqs_disabled(), e.g. in printk().
|
||||
*
|
||||
* Don't do the full vcpu_info placement stuff until we have
|
||||
* the cpu_possible_mask and a non-dummy shared_info.
|
||||
*/
|
||||
xen_vcpu_info_reset(0);
|
||||
|
||||
x86_platform.get_nmi_reason = xen_get_nmi_reason;
|
||||
|
||||
|
@ -1225,10 +1233,12 @@ asmlinkage __visible void __init xen_start_kernel(void)
|
|||
* Set up some pagetable state before starting to set any ptes.
|
||||
*/
|
||||
|
||||
xen_setup_machphys_mapping();
|
||||
xen_init_mmu_ops();
|
||||
|
||||
/* Prevent unwanted bits from being set in PTEs. */
|
||||
__supported_pte_mask &= ~_PAGE_GLOBAL;
|
||||
__default_kernel_pte_mask &= ~_PAGE_GLOBAL;
|
||||
|
||||
/*
|
||||
* Prevent page tables from being allocated in highmem, even
|
||||
|
@ -1249,20 +1259,9 @@ asmlinkage __visible void __init xen_start_kernel(void)
|
|||
get_cpu_cap(&boot_cpu_data);
|
||||
x86_configure_nx();
|
||||
|
||||
xen_init_irq_ops();
|
||||
|
||||
/* Let's presume PV guests always boot on vCPU with id 0. */
|
||||
per_cpu(xen_vcpu_id, 0) = 0;
|
||||
|
||||
/*
|
||||
* Setup xen_vcpu early because idt_setup_early_handler needs it for
|
||||
* local_irq_disable(), irqs_disabled().
|
||||
*
|
||||
* Don't do the full vcpu_info placement stuff until we have
|
||||
* the cpu_possible_mask and a non-dummy shared_info.
|
||||
*/
|
||||
xen_vcpu_info_reset(0);
|
||||
|
||||
idt_setup_early_handler();
|
||||
|
||||
xen_init_capabilities();
|
||||
|
|
|
@ -128,8 +128,6 @@ static const struct pv_irq_ops xen_irq_ops __initconst = {
|
|||
|
||||
void __init xen_init_irq_ops(void)
|
||||
{
|
||||
/* For PVH we use default pv_irq_ops settings. */
|
||||
if (!xen_feature(XENFEAT_hvm_callback_vector))
|
||||
pv_irq_ops = xen_irq_ops;
|
||||
pv_irq_ops = xen_irq_ops;
|
||||
x86_init.irqs.intr_init = xen_init_IRQ;
|
||||
}
|
||||
|
|
|
@ -196,8 +196,6 @@ bsg_map_hdr(struct request_queue *q, struct sg_io_v4 *hdr, fmode_t mode)
|
|||
} else if (hdr->din_xfer_len) {
|
||||
ret = blk_rq_map_user(q, rq, NULL, uptr64(hdr->din_xferp),
|
||||
hdr->din_xfer_len, GFP_KERNEL);
|
||||
} else {
|
||||
ret = blk_rq_map_user(q, rq, NULL, NULL, 0, GFP_KERNEL);
|
||||
}
|
||||
|
||||
if (ret)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -51,16 +51,23 @@ acpi_status acpi_hw_legacy_sleep(u8 sleep_state)
|
|||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
/*
|
||||
* 1) Disable all GPEs
|
||||
* 2) Enable all wakeup GPEs
|
||||
*/
|
||||
/* Disable all GPEs */
|
||||
status = acpi_hw_disable_all_gpes();
|
||||
if (ACPI_FAILURE(status)) {
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
/*
|
||||
* If the target sleep state is S5, clear all GPEs and fixed events too
|
||||
*/
|
||||
if (sleep_state == ACPI_STATE_S5) {
|
||||
status = acpi_hw_clear_acpi_status();
|
||||
if (ACPI_FAILURE(status)) {
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
}
|
||||
acpi_gbl_system_awake_and_running = FALSE;
|
||||
|
||||
/* Enable all wakeup GPEs */
|
||||
status = acpi_hw_enable_all_wakeup_gpes();
|
||||
if (ACPI_FAILURE(status)) {
|
||||
return_ACPI_STATUS(status);
|
||||
|
|
|
@ -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"),
|
||||
},
|
||||
},
|
||||
{ },
|
||||
|
|
|
@ -408,6 +408,8 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
|
|||
const guid_t *guid;
|
||||
int rc, i;
|
||||
|
||||
if (cmd_rc)
|
||||
*cmd_rc = -EINVAL;
|
||||
func = cmd;
|
||||
if (cmd == ND_CMD_CALL) {
|
||||
call_pkg = buf;
|
||||
|
@ -518,6 +520,8 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
|
|||
* If we return an error (like elsewhere) then caller wouldn't
|
||||
* be able to rely upon data returned to make calculation.
|
||||
*/
|
||||
if (cmd_rc)
|
||||
*cmd_rc = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1273,7 +1277,7 @@ static ssize_t scrub_show(struct device *dev,
|
|||
|
||||
mutex_lock(&acpi_desc->init_mutex);
|
||||
rc = sprintf(buf, "%d%s", acpi_desc->scrub_count,
|
||||
work_busy(&acpi_desc->dwork.work)
|
||||
acpi_desc->scrub_busy
|
||||
&& !acpi_desc->cancel ? "+\n" : "\n");
|
||||
mutex_unlock(&acpi_desc->init_mutex);
|
||||
}
|
||||
|
@ -2939,6 +2943,32 @@ static unsigned int __acpi_nfit_scrub(struct acpi_nfit_desc *acpi_desc,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void __sched_ars(struct acpi_nfit_desc *acpi_desc, unsigned int tmo)
|
||||
{
|
||||
lockdep_assert_held(&acpi_desc->init_mutex);
|
||||
|
||||
acpi_desc->scrub_busy = 1;
|
||||
/* note this should only be set from within the workqueue */
|
||||
if (tmo)
|
||||
acpi_desc->scrub_tmo = tmo;
|
||||
queue_delayed_work(nfit_wq, &acpi_desc->dwork, tmo * HZ);
|
||||
}
|
||||
|
||||
static void sched_ars(struct acpi_nfit_desc *acpi_desc)
|
||||
{
|
||||
__sched_ars(acpi_desc, 0);
|
||||
}
|
||||
|
||||
static void notify_ars_done(struct acpi_nfit_desc *acpi_desc)
|
||||
{
|
||||
lockdep_assert_held(&acpi_desc->init_mutex);
|
||||
|
||||
acpi_desc->scrub_busy = 0;
|
||||
acpi_desc->scrub_count++;
|
||||
if (acpi_desc->scrub_count_state)
|
||||
sysfs_notify_dirent(acpi_desc->scrub_count_state);
|
||||
}
|
||||
|
||||
static void acpi_nfit_scrub(struct work_struct *work)
|
||||
{
|
||||
struct acpi_nfit_desc *acpi_desc;
|
||||
|
@ -2949,14 +2979,10 @@ static void acpi_nfit_scrub(struct work_struct *work)
|
|||
mutex_lock(&acpi_desc->init_mutex);
|
||||
query_rc = acpi_nfit_query_poison(acpi_desc);
|
||||
tmo = __acpi_nfit_scrub(acpi_desc, query_rc);
|
||||
if (tmo) {
|
||||
queue_delayed_work(nfit_wq, &acpi_desc->dwork, tmo * HZ);
|
||||
acpi_desc->scrub_tmo = tmo;
|
||||
} else {
|
||||
acpi_desc->scrub_count++;
|
||||
if (acpi_desc->scrub_count_state)
|
||||
sysfs_notify_dirent(acpi_desc->scrub_count_state);
|
||||
}
|
||||
if (tmo)
|
||||
__sched_ars(acpi_desc, tmo);
|
||||
else
|
||||
notify_ars_done(acpi_desc);
|
||||
memset(acpi_desc->ars_status, 0, acpi_desc->max_ars);
|
||||
mutex_unlock(&acpi_desc->init_mutex);
|
||||
}
|
||||
|
@ -3037,7 +3063,7 @@ static int acpi_nfit_register_regions(struct acpi_nfit_desc *acpi_desc)
|
|||
break;
|
||||
}
|
||||
|
||||
queue_delayed_work(nfit_wq, &acpi_desc->dwork, 0);
|
||||
sched_ars(acpi_desc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -3239,7 +3265,7 @@ int acpi_nfit_ars_rescan(struct acpi_nfit_desc *acpi_desc, unsigned long flags)
|
|||
}
|
||||
}
|
||||
if (scheduled) {
|
||||
queue_delayed_work(nfit_wq, &acpi_desc->dwork, 0);
|
||||
sched_ars(acpi_desc);
|
||||
dev_dbg(dev, "ars_scan triggered\n");
|
||||
}
|
||||
mutex_unlock(&acpi_desc->init_mutex);
|
||||
|
|
|
@ -203,6 +203,7 @@ struct acpi_nfit_desc {
|
|||
unsigned int max_ars;
|
||||
unsigned int scrub_count;
|
||||
unsigned int scrub_mode;
|
||||
unsigned int scrub_busy:1;
|
||||
unsigned int cancel:1;
|
||||
unsigned long dimm_cmd_force_en;
|
||||
unsigned long bus_cmd_force_en;
|
||||
|
|
|
@ -398,7 +398,6 @@ config SATA_DWC_VDEBUG
|
|||
|
||||
config SATA_HIGHBANK
|
||||
tristate "Calxeda Highbank SATA support"
|
||||
depends on HAS_DMA
|
||||
depends on ARCH_HIGHBANK || COMPILE_TEST
|
||||
help
|
||||
This option enables support for the Calxeda Highbank SoC's
|
||||
|
@ -408,7 +407,6 @@ config SATA_HIGHBANK
|
|||
|
||||
config SATA_MV
|
||||
tristate "Marvell SATA support"
|
||||
depends on HAS_DMA
|
||||
depends on PCI || ARCH_DOVE || ARCH_MV78XX0 || \
|
||||
ARCH_MVEBU || ARCH_ORION5X || COMPILE_TEST
|
||||
select GENERIC_PHY
|
||||
|
|
|
@ -400,6 +400,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
|
|||
{ PCI_VDEVICE(INTEL, 0x0f23), board_ahci_mobile }, /* Bay Trail AHCI */
|
||||
{ PCI_VDEVICE(INTEL, 0x22a3), board_ahci_mobile }, /* Cherry Tr. AHCI */
|
||||
{ PCI_VDEVICE(INTEL, 0x5ae3), board_ahci_mobile }, /* ApolloLake AHCI */
|
||||
{ PCI_VDEVICE(INTEL, 0x34d3), board_ahci_mobile }, /* Ice Lake LP AHCI */
|
||||
|
||||
/* JMicron 360/1/3/5/6, match class to avoid IDE function */
|
||||
{ PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
|
||||
|
@ -1280,6 +1281,59 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
|
|||
return strcmp(buf, dmi->driver_data) < 0;
|
||||
}
|
||||
|
||||
static bool ahci_broken_lpm(struct pci_dev *pdev)
|
||||
{
|
||||
static const struct dmi_system_id sysids[] = {
|
||||
/* Various Lenovo 50 series have LPM issues with older BIOSen */
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X250"),
|
||||
},
|
||||
.driver_data = "20180406", /* 1.31 */
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L450"),
|
||||
},
|
||||
.driver_data = "20180420", /* 1.28 */
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T450s"),
|
||||
},
|
||||
.driver_data = "20180315", /* 1.33 */
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W541"),
|
||||
},
|
||||
/*
|
||||
* Note date based on release notes, 2.35 has been
|
||||
* reported to be good, but I've been unable to get
|
||||
* a hold of the reporter to get the DMI BIOS date.
|
||||
* TODO: fix this.
|
||||
*/
|
||||
.driver_data = "20180310", /* 2.35 */
|
||||
},
|
||||
{ } /* terminate list */
|
||||
};
|
||||
const struct dmi_system_id *dmi = dmi_first_match(sysids);
|
||||
int year, month, date;
|
||||
char buf[9];
|
||||
|
||||
if (!dmi)
|
||||
return false;
|
||||
|
||||
dmi_get_date(DMI_BIOS_DATE, &year, &month, &date);
|
||||
snprintf(buf, sizeof(buf), "%04d%02d%02d", year, month, date);
|
||||
|
||||
return strcmp(buf, dmi->driver_data) < 0;
|
||||
}
|
||||
|
||||
static bool ahci_broken_online(struct pci_dev *pdev)
|
||||
{
|
||||
#define ENCODE_BUSDEVFN(bus, slot, func) \
|
||||
|
@ -1694,6 +1748,12 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
"quirky BIOS, skipping spindown on poweroff\n");
|
||||
}
|
||||
|
||||
if (ahci_broken_lpm(pdev)) {
|
||||
pi.flags |= ATA_FLAG_NO_LPM;
|
||||
dev_warn(&pdev->dev,
|
||||
"BIOS update required for Link Power Management support\n");
|
||||
}
|
||||
|
||||
if (ahci_broken_suspend(pdev)) {
|
||||
hpriv->flags |= AHCI_HFLAG_NO_SUSPEND;
|
||||
dev_warn(&pdev->dev,
|
||||
|
|
|
@ -82,7 +82,7 @@ static void ahci_mvebu_regret_option(struct ahci_host_priv *hpriv)
|
|||
*
|
||||
* Return: 0 on success; Error code otherwise.
|
||||
*/
|
||||
int ahci_mvebu_stop_engine(struct ata_port *ap)
|
||||
static int ahci_mvebu_stop_engine(struct ata_port *ap)
|
||||
{
|
||||
void __iomem *port_mmio = ahci_port_base(ap);
|
||||
u32 tmp, port_fbs;
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче