mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 02:04:19 +08:00
Merge 5.0-rc2 into driver-core-next
We want the driver core changes in that branch in here to build on top of. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
commit
bdfe0df1e9
@ -279,3 +279,12 @@ Description:
|
|||||||
size in 512B sectors of the zones of the device, with
|
size in 512B sectors of the zones of the device, with
|
||||||
the eventual exception of the last zone of the device
|
the eventual exception of the last zone of the device
|
||||||
which may be smaller.
|
which may be smaller.
|
||||||
|
|
||||||
|
What: /sys/block/<disk>/queue/io_timeout
|
||||||
|
Date: November 2018
|
||||||
|
Contact: Weiping Zhang <zhangweiping@didiglobal.com>
|
||||||
|
Description:
|
||||||
|
io_timeout is the request timeout in milliseconds. If a request
|
||||||
|
does not complete in this time then the block driver timeout
|
||||||
|
handler is invoked. That timeout handler can decide to retry
|
||||||
|
the request, to fail it or to start a device recovery strategy.
|
||||||
|
@ -122,11 +122,18 @@ Description:
|
|||||||
statistics (bd_count, bd_reads, bd_writes) in a format
|
statistics (bd_count, bd_reads, bd_writes) in a format
|
||||||
similar to block layer statistics file format.
|
similar to block layer statistics file format.
|
||||||
|
|
||||||
|
What: /sys/block/zram<id>/writeback_limit_enable
|
||||||
|
Date: November 2018
|
||||||
|
Contact: Minchan Kim <minchan@kernel.org>
|
||||||
|
Description:
|
||||||
|
The writeback_limit_enable file is read-write and specifies
|
||||||
|
eanbe of writeback_limit feature. "1" means eable the feature.
|
||||||
|
No limit "0" is the initial state.
|
||||||
|
|
||||||
What: /sys/block/zram<id>/writeback_limit
|
What: /sys/block/zram<id>/writeback_limit
|
||||||
Date: November 2018
|
Date: November 2018
|
||||||
Contact: Minchan Kim <minchan@kernel.org>
|
Contact: Minchan Kim <minchan@kernel.org>
|
||||||
Description:
|
Description:
|
||||||
The writeback_limit file is read-write and specifies the maximum
|
The writeback_limit file is read-write and specifies the maximum
|
||||||
amount of writeback ZRAM can do. The limit could be changed
|
amount of writeback ZRAM can do. The limit could be changed
|
||||||
in run time and "0" means disable the limit.
|
in run time.
|
||||||
No limit is the initial state.
|
|
||||||
|
@ -357,6 +357,13 @@ video playing/streaming, a very low drop rate may be more important
|
|||||||
than maximum throughput. In these cases, consider setting the
|
than maximum throughput. In these cases, consider setting the
|
||||||
strict_guarantees parameter.
|
strict_guarantees parameter.
|
||||||
|
|
||||||
|
slice_idle_us
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Controls the same tuning parameter as slice_idle, but in microseconds.
|
||||||
|
Either tunable can be used to set idling behavior. Afterwards, the
|
||||||
|
other tunable will reflect the newly set value in sysfs.
|
||||||
|
|
||||||
strict_guarantees
|
strict_guarantees
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
@ -88,7 +88,8 @@ shared_tags=[0/1]: Default: 0
|
|||||||
|
|
||||||
zoned=[0/1]: Default: 0
|
zoned=[0/1]: Default: 0
|
||||||
0: Block device is exposed as a random-access block device.
|
0: Block device is exposed as a random-access block device.
|
||||||
1: Block device is exposed as a host-managed zoned block device.
|
1: Block device is exposed as a host-managed zoned block device. Requires
|
||||||
|
CONFIG_BLK_DEV_ZONED.
|
||||||
|
|
||||||
zone_size=[MB]: Default: 256
|
zone_size=[MB]: Default: 256
|
||||||
Per zone size when exposed as a zoned block device. Must be a power of two.
|
Per zone size when exposed as a zoned block device. Must be a power of two.
|
||||||
|
@ -67,6 +67,13 @@ If set to a value larger than 0, the kernel will put the process issuing
|
|||||||
IO to sleep for this amount of microseconds before entering classic
|
IO to sleep for this amount of microseconds before entering classic
|
||||||
polling.
|
polling.
|
||||||
|
|
||||||
|
io_timeout (RW)
|
||||||
|
---------------
|
||||||
|
io_timeout is the request timeout in milliseconds. If a request does not
|
||||||
|
complete in this time then the block driver timeout handler is invoked.
|
||||||
|
That timeout handler can decide to retry the request, to fail it or to start
|
||||||
|
a device recovery strategy.
|
||||||
|
|
||||||
iostats (RW)
|
iostats (RW)
|
||||||
-------------
|
-------------
|
||||||
This file is used to control (on/off) the iostats accounting of the
|
This file is used to control (on/off) the iostats accounting of the
|
||||||
|
@ -156,22 +156,23 @@ Per-device statistics are exported as various nodes under /sys/block/zram<id>/
|
|||||||
A brief description of exported device attributes. For more details please
|
A brief description of exported device attributes. For more details please
|
||||||
read Documentation/ABI/testing/sysfs-block-zram.
|
read Documentation/ABI/testing/sysfs-block-zram.
|
||||||
|
|
||||||
Name access description
|
Name access description
|
||||||
---- ------ -----------
|
---- ------ -----------
|
||||||
disksize RW show and set the device's disk size
|
disksize RW show and set the device's disk size
|
||||||
initstate RO shows the initialization state of the device
|
initstate RO shows the initialization state of the device
|
||||||
reset WO trigger device reset
|
reset WO trigger device reset
|
||||||
mem_used_max WO reset the `mem_used_max' counter (see later)
|
mem_used_max WO reset the `mem_used_max' counter (see later)
|
||||||
mem_limit WO specifies the maximum amount of memory ZRAM can use
|
mem_limit WO specifies the maximum amount of memory ZRAM can use
|
||||||
to store the compressed data
|
to store the compressed data
|
||||||
writeback_limit WO specifies the maximum amount of write IO zram can
|
writeback_limit WO specifies the maximum amount of write IO zram can
|
||||||
write out to backing device as 4KB unit
|
write out to backing device as 4KB unit
|
||||||
max_comp_streams RW the number of possible concurrent compress operations
|
writeback_limit_enable RW show and set writeback_limit feature
|
||||||
comp_algorithm RW show and change the compression algorithm
|
max_comp_streams RW the number of possible concurrent compress operations
|
||||||
compact WO trigger memory compaction
|
comp_algorithm RW show and change the compression algorithm
|
||||||
debug_stat RO this file is used for zram debugging purposes
|
compact WO trigger memory compaction
|
||||||
backing_dev RW set up backend storage for zram to write out
|
debug_stat RO this file is used for zram debugging purposes
|
||||||
idle WO mark allocated slot as idle
|
backing_dev RW set up backend storage for zram to write out
|
||||||
|
idle WO mark allocated slot as idle
|
||||||
|
|
||||||
|
|
||||||
User space is advised to use the following files to read the device statistics.
|
User space is advised to use the following files to read the device statistics.
|
||||||
@ -280,32 +281,51 @@ With the command, zram writeback idle pages from memory to the storage.
|
|||||||
If there are lots of write IO with flash device, potentially, it has
|
If there are lots of write IO with flash device, potentially, it has
|
||||||
flash wearout problem so that admin needs to design write limitation
|
flash wearout problem so that admin needs to design write limitation
|
||||||
to guarantee storage health for entire product life.
|
to guarantee storage health for entire product life.
|
||||||
To overcome the concern, zram supports "writeback_limit".
|
|
||||||
The "writeback_limit"'s default value is 0 so that it doesn't limit
|
To overcome the concern, zram supports "writeback_limit" feature.
|
||||||
any writeback. If admin want to measure writeback count in a certain
|
The "writeback_limit_enable"'s default value is 0 so that it doesn't limit
|
||||||
period, he could know it via /sys/block/zram0/bd_stat's 3rd column.
|
any writeback. IOW, if admin want to apply writeback budget, he should
|
||||||
|
enable writeback_limit_enable via
|
||||||
|
|
||||||
|
$ echo 1 > /sys/block/zramX/writeback_limit_enable
|
||||||
|
|
||||||
|
Once writeback_limit_enable is set, zram doesn't allow any writeback
|
||||||
|
until admin set the budget via /sys/block/zramX/writeback_limit.
|
||||||
|
|
||||||
|
(If admin doesn't enable writeback_limit_enable, writeback_limit's value
|
||||||
|
assigned via /sys/block/zramX/writeback_limit is meaninless.)
|
||||||
|
|
||||||
If admin want to limit writeback as per-day 400M, he could do it
|
If admin want to limit writeback as per-day 400M, he could do it
|
||||||
like below.
|
like below.
|
||||||
|
|
||||||
MB_SHIFT=20
|
$ MB_SHIFT=20
|
||||||
4K_SHIFT=12
|
$ 4K_SHIFT=12
|
||||||
echo $((400<<MB_SHIFT>>4K_SHIFT)) > \
|
$ echo $((400<<MB_SHIFT>>4K_SHIFT)) > \
|
||||||
/sys/block/zram0/writeback_limit.
|
/sys/block/zram0/writeback_limit.
|
||||||
|
$ echo 1 > /sys/block/zram0/writeback_limit_enable
|
||||||
|
|
||||||
If admin want to allow further write again, he could do it like below
|
If admin want to allow further write again once the bugdet is exausted,
|
||||||
|
he could do it like below
|
||||||
|
|
||||||
echo 0 > /sys/block/zram0/writeback_limit
|
$ echo $((400<<MB_SHIFT>>4K_SHIFT)) > \
|
||||||
|
/sys/block/zram0/writeback_limit
|
||||||
|
|
||||||
If admin want to see remaining writeback budget since he set,
|
If admin want to see remaining writeback budget since he set,
|
||||||
|
|
||||||
cat /sys/block/zram0/writeback_limit
|
$ cat /sys/block/zramX/writeback_limit
|
||||||
|
|
||||||
|
If admin want to disable writeback limit, he could do
|
||||||
|
|
||||||
|
$ echo 0 > /sys/block/zramX/writeback_limit_enable
|
||||||
|
|
||||||
The writeback_limit count will reset whenever you reset zram(e.g.,
|
The writeback_limit count will reset whenever you reset zram(e.g.,
|
||||||
system reboot, echo 1 > /sys/block/zramX/reset) so keeping how many of
|
system reboot, echo 1 > /sys/block/zramX/reset) so keeping how many of
|
||||||
writeback happened until you reset the zram to allocate extra writeback
|
writeback happened until you reset the zram to allocate extra writeback
|
||||||
budget in next setting is user's job.
|
budget in next setting is user's job.
|
||||||
|
|
||||||
|
If admin want to measure writeback count in a certain period, he could
|
||||||
|
know it via /sys/block/zram0/bd_stat's 3rd column.
|
||||||
|
|
||||||
= memory tracking
|
= memory tracking
|
||||||
|
|
||||||
With CONFIG_ZRAM_MEMORY_TRACKING, user can know information of the
|
With CONFIG_ZRAM_MEMORY_TRACKING, user can know information of the
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
Altera SOCFPGA Reset Manager
|
Altera SOCFPGA Reset Manager
|
||||||
|
|
||||||
Required properties:
|
Required properties:
|
||||||
- compatible : "altr,rst-mgr"
|
- compatible : "altr,rst-mgr" for (Cyclone5/Arria5/Arria10)
|
||||||
|
"altr,stratix10-rst-mgr","altr,rst-mgr" for Stratix10 ARM64 SoC
|
||||||
- reg : Should contain 1 register ranges(address and length)
|
- reg : Should contain 1 register ranges(address and length)
|
||||||
- altr,modrst-offset : Should contain the offset of the first modrst register.
|
- altr,modrst-offset : Should contain the offset of the first modrst register.
|
||||||
- #reset-cells: 1
|
- #reset-cells: 1
|
||||||
|
@ -120,27 +120,30 @@ Example:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
USB3 core reset
|
Peripheral core reset in glue layer
|
||||||
---------------
|
-----------------------------------
|
||||||
|
|
||||||
USB3 core reset belongs to USB3 glue layer. Before using the core reset,
|
Some peripheral core reset belongs to its own glue layer. Before using
|
||||||
it is necessary to control the clocks and resets to enable this layer.
|
this core reset, it is necessary to control the clocks and resets to enable
|
||||||
These clocks and resets should be described in each property.
|
this layer. These clocks and resets should be described in each property.
|
||||||
|
|
||||||
Required properties:
|
Required properties:
|
||||||
- compatible: Should be
|
- compatible: Should be
|
||||||
"socionext,uniphier-pro4-usb3-reset" - for Pro4 SoC
|
"socionext,uniphier-pro4-usb3-reset" - for Pro4 SoC USB3
|
||||||
"socionext,uniphier-pxs2-usb3-reset" - for PXs2 SoC
|
"socionext,uniphier-pxs2-usb3-reset" - for PXs2 SoC USB3
|
||||||
"socionext,uniphier-ld20-usb3-reset" - for LD20 SoC
|
"socionext,uniphier-ld20-usb3-reset" - for LD20 SoC USB3
|
||||||
"socionext,uniphier-pxs3-usb3-reset" - for PXs3 SoC
|
"socionext,uniphier-pxs3-usb3-reset" - for PXs3 SoC USB3
|
||||||
|
"socionext,uniphier-pro4-ahci-reset" - for Pro4 SoC AHCI
|
||||||
|
"socionext,uniphier-pxs2-ahci-reset" - for PXs2 SoC AHCI
|
||||||
|
"socionext,uniphier-pxs3-ahci-reset" - for PXs3 SoC AHCI
|
||||||
- #reset-cells: Should be 1.
|
- #reset-cells: Should be 1.
|
||||||
- reg: Specifies offset and length of the register set for the device.
|
- reg: Specifies offset and length of the register set for the device.
|
||||||
- clocks: A list of phandles to the clock gate for USB3 glue layer.
|
- clocks: A list of phandles to the clock gate for the glue layer.
|
||||||
According to the clock-names, appropriate clocks are required.
|
According to the clock-names, appropriate clocks are required.
|
||||||
- clock-names: Should contain
|
- clock-names: Should contain
|
||||||
"gio", "link" - for Pro4 SoC
|
"gio", "link" - for Pro4 SoC
|
||||||
"link" - for others
|
"link" - for others
|
||||||
- resets: A list of phandles to the reset control for USB3 glue layer.
|
- resets: A list of phandles to the reset control for the glue layer.
|
||||||
According to the reset-names, appropriate resets are required.
|
According to the reset-names, appropriate resets are required.
|
||||||
- reset-names: Should contain
|
- reset-names: Should contain
|
||||||
"gio", "link" - for Pro4 SoC
|
"gio", "link" - for Pro4 SoC
|
||||||
|
@ -124,11 +124,11 @@ struct bus_attribute {
|
|||||||
ssize_t (*store)(struct bus_type *, const char * buf, size_t count);
|
ssize_t (*store)(struct bus_type *, const char * buf, size_t count);
|
||||||
};
|
};
|
||||||
|
|
||||||
Bus drivers can export attributes using the BUS_ATTR macro that works
|
Bus drivers can export attributes using the BUS_ATTR_RW macro that works
|
||||||
similarly to the DEVICE_ATTR macro for devices. For example, a definition
|
similarly to the DEVICE_ATTR_RW macro for devices. For example, a
|
||||||
like this:
|
definition like this:
|
||||||
|
|
||||||
static BUS_ATTR(debug,0644,show_debug,store_debug);
|
static BUS_ATTR_RW(debug);
|
||||||
|
|
||||||
is equivalent to declaring:
|
is equivalent to declaring:
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | TODO |
|
| arm: | TODO |
|
||||||
| arm64: | TODO |
|
| arm64: | TODO |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | ok |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | ok |
|
| hexagon: | ok |
|
||||||
| ia64: | ok |
|
| ia64: | ok |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | ok |
|
| c6x: | ok |
|
||||||
|
| csky: | ok |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | ok |
|
| hexagon: | ok |
|
||||||
| ia64: | ok |
|
| ia64: | ok |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | TODO |
|
| arm: | TODO |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | ok |
|
| h8300: | ok |
|
||||||
| hexagon: | ok |
|
| hexagon: | ok |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | TODO |
|
| arm: | TODO |
|
||||||
| arm64: | TODO |
|
| arm64: | TODO |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | ok |
|
| ia64: | ok |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | ok |
|
| ia64: | ok |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | TODO |
|
| arm64: | TODO |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | TODO |
|
| arm: | TODO |
|
||||||
| arm64: | TODO |
|
| arm64: | TODO |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | ok |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | TODO |
|
| arm: | TODO |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | ok |
|
| hexagon: | ok |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | TODO |
|
| arm: | TODO |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | ok |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | TODO |
|
| arm: | TODO |
|
||||||
| arm64: | TODO |
|
| arm64: | TODO |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | ok |
|
| ia64: | ok |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | ok |
|
| hexagon: | ok |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | .. |
|
| arm: | .. |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | .. |
|
| c6x: | .. |
|
||||||
|
| csky: | .. |
|
||||||
| h8300: | .. |
|
| h8300: | .. |
|
||||||
| hexagon: | .. |
|
| hexagon: | .. |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | ok |
|
| c6x: | ok |
|
||||||
|
| csky: | ok |
|
||||||
| h8300: | ok |
|
| h8300: | ok |
|
||||||
| hexagon: | ok |
|
| hexagon: | ok |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | .. |
|
| ia64: | .. |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | TODO |
|
| arm: | TODO |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | ok |
|
| c6x: | ok |
|
||||||
|
| csky: | ok |
|
||||||
| h8300: | ok |
|
| h8300: | ok |
|
||||||
| hexagon: | ok |
|
| hexagon: | ok |
|
||||||
| ia64: | ok |
|
| ia64: | ok |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | ok |
|
| ia64: | ok |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | TODO |
|
| arm: | TODO |
|
||||||
| arm64: | TODO |
|
| arm64: | TODO |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | ok |
|
| ia64: | ok |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | .. |
|
| c6x: | .. |
|
||||||
|
| csky: | .. |
|
||||||
| h8300: | .. |
|
| h8300: | .. |
|
||||||
| hexagon: | .. |
|
| hexagon: | .. |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | TODO |
|
| arm: | TODO |
|
||||||
| arm64: | TODO |
|
| arm64: | TODO |
|
||||||
| c6x: | .. |
|
| c6x: | .. |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | .. |
|
| h8300: | .. |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | TODO |
|
| arm: | TODO |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | TODO |
|
| arm: | TODO |
|
||||||
| arm64: | TODO |
|
| arm64: | TODO |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | .. |
|
| arm: | .. |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | .. |
|
| c6x: | .. |
|
||||||
|
| csky: | .. |
|
||||||
| h8300: | .. |
|
| h8300: | .. |
|
||||||
| hexagon: | .. |
|
| hexagon: | .. |
|
||||||
| ia64: | ok |
|
| ia64: | ok |
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
| arm: | ok |
|
| arm: | ok |
|
||||||
| arm64: | ok |
|
| arm64: | ok |
|
||||||
| c6x: | TODO |
|
| c6x: | TODO |
|
||||||
|
| csky: | TODO |
|
||||||
| h8300: | TODO |
|
| h8300: | TODO |
|
||||||
| hexagon: | TODO |
|
| hexagon: | TODO |
|
||||||
| ia64: | TODO |
|
| ia64: | TODO |
|
||||||
|
@ -344,7 +344,9 @@ struct bus_attribute {
|
|||||||
|
|
||||||
Declaring:
|
Declaring:
|
||||||
|
|
||||||
BUS_ATTR(_name, _mode, _show, _store)
|
static BUS_ATTR_RW(name);
|
||||||
|
static BUS_ATTR_RO(name);
|
||||||
|
static BUS_ATTR_WO(name);
|
||||||
|
|
||||||
Creation/Removal:
|
Creation/Removal:
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ Do some work...
|
|||||||
The same can also be done from an application program.
|
The same can also be done from an application program.
|
||||||
|
|
||||||
Disable specific CPU's specific idle state from cpuidle sysfs (see
|
Disable specific CPU's specific idle state from cpuidle sysfs (see
|
||||||
Documentation/cpuidle/sysfs.txt):
|
Documentation/admin-guide/pm/cpuidle.rst):
|
||||||
# echo 1 > /sys/devices/system/cpu/cpu$cpu/cpuidle/state$state/disable
|
# echo 1 > /sys/devices/system/cpu/cpu$cpu/cpuidle/state$state/disable
|
||||||
|
|
||||||
|
|
||||||
|
@ -242,6 +242,6 @@ References
|
|||||||
==========
|
==========
|
||||||
|
|
||||||
.. [white-paper] http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2013/12/AMD_Memory_Encryption_Whitepaper_v7-Public.pdf
|
.. [white-paper] http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2013/12/AMD_Memory_Encryption_Whitepaper_v7-Public.pdf
|
||||||
.. [api-spec] http://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf
|
.. [api-spec] http://support.amd.com/TechDocs/55766_SEV-KM_API_Specification.pdf
|
||||||
.. [amd-apm] http://support.amd.com/TechDocs/24593.pdf (section 15.34)
|
.. [amd-apm] http://support.amd.com/TechDocs/24593.pdf (section 15.34)
|
||||||
.. [kvm-forum] http://www.linux-kvm.org/images/7/74/02x08A-Thomas_Lendacky-AMDs_Virtualizatoin_Memory_Encryption_Technology.pdf
|
.. [kvm-forum] http://www.linux-kvm.org/images/7/74/02x08A-Thomas_Lendacky-AMDs_Virtualizatoin_Memory_Encryption_Technology.pdf
|
||||||
|
@ -9,7 +9,7 @@ Fenghua Yu <fenghua.yu@intel.com>
|
|||||||
Tony Luck <tony.luck@intel.com>
|
Tony Luck <tony.luck@intel.com>
|
||||||
Vikas Shivappa <vikas.shivappa@intel.com>
|
Vikas Shivappa <vikas.shivappa@intel.com>
|
||||||
|
|
||||||
This feature is enabled by the CONFIG_RESCTRL and the X86 /proc/cpuinfo
|
This feature is enabled by the CONFIG_X86_RESCTRL and the x86 /proc/cpuinfo
|
||||||
flag bits:
|
flag bits:
|
||||||
RDT (Resource Director Technology) Allocation - "rdt_a"
|
RDT (Resource Director Technology) Allocation - "rdt_a"
|
||||||
CAT (Cache Allocation Technology) - "cat_l3", "cat_l2"
|
CAT (Cache Allocation Technology) - "cat_l3", "cat_l2"
|
||||||
|
16
MAINTAINERS
16
MAINTAINERS
@ -3951,7 +3951,7 @@ L: netdev@vger.kernel.org
|
|||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/net/ethernet/ti/cpmac.c
|
F: drivers/net/ethernet/ti/cpmac.c
|
||||||
|
|
||||||
CPU FREQUENCY DRIVERS
|
CPU FREQUENCY SCALING FRAMEWORK
|
||||||
M: "Rafael J. Wysocki" <rjw@rjwysocki.net>
|
M: "Rafael J. Wysocki" <rjw@rjwysocki.net>
|
||||||
M: Viresh Kumar <viresh.kumar@linaro.org>
|
M: Viresh Kumar <viresh.kumar@linaro.org>
|
||||||
L: linux-pm@vger.kernel.org
|
L: linux-pm@vger.kernel.org
|
||||||
@ -3959,6 +3959,8 @@ S: Maintained
|
|||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
|
||||||
T: git git://git.linaro.org/people/vireshk/linux.git (For ARM Updates)
|
T: git git://git.linaro.org/people/vireshk/linux.git (For ARM Updates)
|
||||||
B: https://bugzilla.kernel.org
|
B: https://bugzilla.kernel.org
|
||||||
|
F: Documentation/admin-guide/pm/cpufreq.rst
|
||||||
|
F: Documentation/admin-guide/pm/intel_pstate.rst
|
||||||
F: Documentation/cpu-freq/
|
F: Documentation/cpu-freq/
|
||||||
F: Documentation/devicetree/bindings/cpufreq/
|
F: Documentation/devicetree/bindings/cpufreq/
|
||||||
F: drivers/cpufreq/
|
F: drivers/cpufreq/
|
||||||
@ -4006,13 +4008,14 @@ S: Supported
|
|||||||
F: drivers/cpuidle/cpuidle-exynos.c
|
F: drivers/cpuidle/cpuidle-exynos.c
|
||||||
F: arch/arm/mach-exynos/pm.c
|
F: arch/arm/mach-exynos/pm.c
|
||||||
|
|
||||||
CPUIDLE DRIVERS
|
CPU IDLE TIME MANAGEMENT FRAMEWORK
|
||||||
M: "Rafael J. Wysocki" <rjw@rjwysocki.net>
|
M: "Rafael J. Wysocki" <rjw@rjwysocki.net>
|
||||||
M: Daniel Lezcano <daniel.lezcano@linaro.org>
|
M: Daniel Lezcano <daniel.lezcano@linaro.org>
|
||||||
L: linux-pm@vger.kernel.org
|
L: linux-pm@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
|
||||||
B: https://bugzilla.kernel.org
|
B: https://bugzilla.kernel.org
|
||||||
|
F: Documentation/admin-guide/pm/cpuidle.rst
|
||||||
F: drivers/cpuidle/*
|
F: drivers/cpuidle/*
|
||||||
F: include/linux/cpuidle.h
|
F: include/linux/cpuidle.h
|
||||||
|
|
||||||
@ -13820,8 +13823,9 @@ F: drivers/media/mmc/siano/
|
|||||||
|
|
||||||
SIFIVE DRIVERS
|
SIFIVE DRIVERS
|
||||||
M: Palmer Dabbelt <palmer@sifive.com>
|
M: Palmer Dabbelt <palmer@sifive.com>
|
||||||
|
M: Paul Walmsley <paul.walmsley@sifive.com>
|
||||||
L: linux-riscv@lists.infradead.org
|
L: linux-riscv@lists.infradead.org
|
||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux.git
|
T: git git://github.com/sifive/riscv-linux.git
|
||||||
S: Supported
|
S: Supported
|
||||||
K: sifive
|
K: sifive
|
||||||
N: sifive
|
N: sifive
|
||||||
@ -14432,6 +14436,11 @@ M: Florian Schilhabel <florian.c.schilhabel@googlemail.com>.
|
|||||||
S: Odd Fixes
|
S: Odd Fixes
|
||||||
F: drivers/staging/rtl8712/
|
F: drivers/staging/rtl8712/
|
||||||
|
|
||||||
|
STAGING - REALTEK RTL8188EU DRIVERS
|
||||||
|
M: Larry Finger <Larry.Finger@lwfinger.net>
|
||||||
|
S: Odd Fixes
|
||||||
|
F: drivers/staging/rtl8188eu/
|
||||||
|
|
||||||
STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER
|
STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER
|
||||||
M: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
|
M: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
|
||||||
M: Teddy Wang <teddy.wang@siliconmotion.com>
|
M: Teddy Wang <teddy.wang@siliconmotion.com>
|
||||||
@ -15802,7 +15811,6 @@ M: Alan Stern <stern@rowland.harvard.edu>
|
|||||||
L: linux-usb@vger.kernel.org
|
L: linux-usb@vger.kernel.org
|
||||||
L: usb-storage@lists.one-eyed-alien.net
|
L: usb-storage@lists.one-eyed-alien.net
|
||||||
S: Maintained
|
S: Maintained
|
||||||
W: http://www.one-eyed-alien.net/~mdharm/linux-usb/
|
|
||||||
F: drivers/usb/storage/
|
F: drivers/usb/storage/
|
||||||
|
|
||||||
USB MIDI DRIVER
|
USB MIDI DRIVER
|
||||||
|
2
Makefile
2
Makefile
@ -2,7 +2,7 @@
|
|||||||
VERSION = 5
|
VERSION = 5
|
||||||
PATCHLEVEL = 0
|
PATCHLEVEL = 0
|
||||||
SUBLEVEL = 0
|
SUBLEVEL = 0
|
||||||
EXTRAVERSION = -rc1
|
EXTRAVERSION = -rc2
|
||||||
NAME = Shy Crocodile
|
NAME = Shy Crocodile
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
|
@ -94,6 +94,28 @@
|
|||||||
regulator-boot-on;
|
regulator-boot-on;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
baseboard_3v3: fixedregulator-3v3 {
|
||||||
|
/* TPS73701DCQ */
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "baseboard_3v3";
|
||||||
|
regulator-min-microvolt = <3300000>;
|
||||||
|
regulator-max-microvolt = <3300000>;
|
||||||
|
vin-supply = <&vbat>;
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
};
|
||||||
|
|
||||||
|
baseboard_1v8: fixedregulator-1v8 {
|
||||||
|
/* TPS73701DCQ */
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "baseboard_1v8";
|
||||||
|
regulator-min-microvolt = <1800000>;
|
||||||
|
regulator-max-microvolt = <1800000>;
|
||||||
|
vin-supply = <&vbat>;
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
};
|
||||||
|
|
||||||
backlight_lcd: backlight-regulator {
|
backlight_lcd: backlight-regulator {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
regulator-name = "lcd_backlight_pwr";
|
regulator-name = "lcd_backlight_pwr";
|
||||||
@ -105,7 +127,7 @@
|
|||||||
|
|
||||||
sound {
|
sound {
|
||||||
compatible = "simple-audio-card";
|
compatible = "simple-audio-card";
|
||||||
simple-audio-card,name = "DA850/OMAP-L138 EVM";
|
simple-audio-card,name = "DA850-OMAPL138 EVM";
|
||||||
simple-audio-card,widgets =
|
simple-audio-card,widgets =
|
||||||
"Line", "Line In",
|
"Line", "Line In",
|
||||||
"Line", "Line Out";
|
"Line", "Line Out";
|
||||||
@ -210,10 +232,9 @@
|
|||||||
|
|
||||||
/* Regulators */
|
/* Regulators */
|
||||||
IOVDD-supply = <&vdcdc2_reg>;
|
IOVDD-supply = <&vdcdc2_reg>;
|
||||||
/* Derived from VBAT: Baseboard 3.3V / 1.8V */
|
AVDD-supply = <&baseboard_3v3>;
|
||||||
AVDD-supply = <&vbat>;
|
DRVDD-supply = <&baseboard_3v3>;
|
||||||
DRVDD-supply = <&vbat>;
|
DVDD-supply = <&baseboard_1v8>;
|
||||||
DVDD-supply = <&vbat>;
|
|
||||||
};
|
};
|
||||||
tca6416: gpio@20 {
|
tca6416: gpio@20 {
|
||||||
compatible = "ti,tca6416";
|
compatible = "ti,tca6416";
|
||||||
|
@ -39,9 +39,39 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
vcc_5vd: fixedregulator-vcc_5vd {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "vcc_5vd";
|
||||||
|
regulator-min-microvolt = <5000000>;
|
||||||
|
regulator-max-microvolt = <5000000>;
|
||||||
|
regulator-boot-on;
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc_3v3d: fixedregulator-vcc_3v3d {
|
||||||
|
/* TPS650250 - VDCDC1 */
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "vcc_3v3d";
|
||||||
|
regulator-min-microvolt = <3300000>;
|
||||||
|
regulator-max-microvolt = <3300000>;
|
||||||
|
vin-supply = <&vcc_5vd>;
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc_1v8d: fixedregulator-vcc_1v8d {
|
||||||
|
/* TPS650250 - VDCDC2 */
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "vcc_1v8d";
|
||||||
|
regulator-min-microvolt = <1800000>;
|
||||||
|
regulator-max-microvolt = <1800000>;
|
||||||
|
vin-supply = <&vcc_5vd>;
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
};
|
||||||
|
|
||||||
sound {
|
sound {
|
||||||
compatible = "simple-audio-card";
|
compatible = "simple-audio-card";
|
||||||
simple-audio-card,name = "DA850/OMAP-L138 LCDK";
|
simple-audio-card,name = "DA850-OMAPL138 LCDK";
|
||||||
simple-audio-card,widgets =
|
simple-audio-card,widgets =
|
||||||
"Line", "Line In",
|
"Line", "Line In",
|
||||||
"Line", "Line Out";
|
"Line", "Line Out";
|
||||||
@ -221,6 +251,12 @@
|
|||||||
compatible = "ti,tlv320aic3106";
|
compatible = "ti,tlv320aic3106";
|
||||||
reg = <0x18>;
|
reg = <0x18>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
|
/* Regulators */
|
||||||
|
IOVDD-supply = <&vcc_3v3d>;
|
||||||
|
AVDD-supply = <&vcc_3v3d>;
|
||||||
|
DRVDD-supply = <&vcc_3v3d>;
|
||||||
|
DVDD-supply = <&vcc_1v8d>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -36,8 +36,8 @@
|
|||||||
compatible = "gpio-fan";
|
compatible = "gpio-fan";
|
||||||
pinctrl-0 = <&pmx_fan_high_speed &pmx_fan_low_speed>;
|
pinctrl-0 = <&pmx_fan_high_speed &pmx_fan_low_speed>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
gpios = <&gpio1 14 GPIO_ACTIVE_LOW
|
gpios = <&gpio1 14 GPIO_ACTIVE_HIGH
|
||||||
&gpio1 13 GPIO_ACTIVE_LOW>;
|
&gpio1 13 GPIO_ACTIVE_HIGH>;
|
||||||
gpio-fan,speed-map = <0 0
|
gpio-fan,speed-map = <0 0
|
||||||
3000 1
|
3000 1
|
||||||
6000 2>;
|
6000 2>;
|
||||||
|
@ -208,9 +208,9 @@ static struct gpiod_lookup_table mmc_gpios_table = {
|
|||||||
.dev_id = "da830-mmc.0",
|
.dev_id = "da830-mmc.0",
|
||||||
.table = {
|
.table = {
|
||||||
/* gpio chip 1 contains gpio range 32-63 */
|
/* gpio chip 1 contains gpio range 32-63 */
|
||||||
GPIO_LOOKUP("davinci_gpio.0", DA830_MMCSD_CD_PIN, "cd",
|
GPIO_LOOKUP("davinci_gpio", DA830_MMCSD_CD_PIN, "cd",
|
||||||
GPIO_ACTIVE_LOW),
|
GPIO_ACTIVE_LOW),
|
||||||
GPIO_LOOKUP("davinci_gpio.0", DA830_MMCSD_WP_PIN, "wp",
|
GPIO_LOOKUP("davinci_gpio", DA830_MMCSD_WP_PIN, "wp",
|
||||||
GPIO_ACTIVE_LOW),
|
GPIO_ACTIVE_LOW),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -805,9 +805,9 @@ static struct gpiod_lookup_table mmc_gpios_table = {
|
|||||||
.dev_id = "da830-mmc.0",
|
.dev_id = "da830-mmc.0",
|
||||||
.table = {
|
.table = {
|
||||||
/* gpio chip 2 contains gpio range 64-95 */
|
/* gpio chip 2 contains gpio range 64-95 */
|
||||||
GPIO_LOOKUP("davinci_gpio.0", DA850_MMCSD_CD_PIN, "cd",
|
GPIO_LOOKUP("davinci_gpio", DA850_MMCSD_CD_PIN, "cd",
|
||||||
GPIO_ACTIVE_LOW),
|
GPIO_ACTIVE_LOW),
|
||||||
GPIO_LOOKUP("davinci_gpio.0", DA850_MMCSD_WP_PIN, "wp",
|
GPIO_LOOKUP("davinci_gpio", DA850_MMCSD_WP_PIN, "wp",
|
||||||
GPIO_ACTIVE_HIGH),
|
GPIO_ACTIVE_HIGH),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -117,9 +117,9 @@ static struct platform_device davinci_nand_device = {
|
|||||||
static struct gpiod_lookup_table i2c_recovery_gpiod_table = {
|
static struct gpiod_lookup_table i2c_recovery_gpiod_table = {
|
||||||
.dev_id = "i2c_davinci.1",
|
.dev_id = "i2c_davinci.1",
|
||||||
.table = {
|
.table = {
|
||||||
GPIO_LOOKUP("davinci_gpio.0", DM355_I2C_SDA_PIN, "sda",
|
GPIO_LOOKUP("davinci_gpio", DM355_I2C_SDA_PIN, "sda",
|
||||||
GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
|
GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
|
||||||
GPIO_LOOKUP("davinci_gpio.0", DM355_I2C_SCL_PIN, "scl",
|
GPIO_LOOKUP("davinci_gpio", DM355_I2C_SCL_PIN, "scl",
|
||||||
GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
|
GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -660,9 +660,9 @@ static struct i2c_board_info __initdata i2c_info[] = {
|
|||||||
static struct gpiod_lookup_table i2c_recovery_gpiod_table = {
|
static struct gpiod_lookup_table i2c_recovery_gpiod_table = {
|
||||||
.dev_id = "i2c_davinci.1",
|
.dev_id = "i2c_davinci.1",
|
||||||
.table = {
|
.table = {
|
||||||
GPIO_LOOKUP("davinci_gpio.0", DM644X_I2C_SDA_PIN, "sda",
|
GPIO_LOOKUP("davinci_gpio", DM644X_I2C_SDA_PIN, "sda",
|
||||||
GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
|
GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
|
||||||
GPIO_LOOKUP("davinci_gpio.0", DM644X_I2C_SCL_PIN, "scl",
|
GPIO_LOOKUP("davinci_gpio", DM644X_I2C_SCL_PIN, "scl",
|
||||||
GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
|
GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -134,9 +134,9 @@ static const short hawk_mmcsd0_pins[] = {
|
|||||||
static struct gpiod_lookup_table mmc_gpios_table = {
|
static struct gpiod_lookup_table mmc_gpios_table = {
|
||||||
.dev_id = "da830-mmc.0",
|
.dev_id = "da830-mmc.0",
|
||||||
.table = {
|
.table = {
|
||||||
GPIO_LOOKUP("davinci_gpio.0", DA850_HAWK_MMCSD_CD_PIN, "cd",
|
GPIO_LOOKUP("davinci_gpio", DA850_HAWK_MMCSD_CD_PIN, "cd",
|
||||||
GPIO_ACTIVE_LOW),
|
GPIO_ACTIVE_LOW),
|
||||||
GPIO_LOOKUP("davinci_gpio.0", DA850_HAWK_MMCSD_WP_PIN, "wp",
|
GPIO_LOOKUP("davinci_gpio", DA850_HAWK_MMCSD_WP_PIN, "wp",
|
||||||
GPIO_ACTIVE_LOW),
|
GPIO_ACTIVE_LOW),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -390,10 +390,14 @@ static int __ref impd1_probe(struct lm_device *dev)
|
|||||||
char *mmciname;
|
char *mmciname;
|
||||||
|
|
||||||
lookup = devm_kzalloc(&dev->dev,
|
lookup = devm_kzalloc(&dev->dev,
|
||||||
sizeof(*lookup) + 3 * sizeof(struct gpiod_lookup),
|
struct_size(lookup, table, 3),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
chipname = devm_kstrdup(&dev->dev, devname, GFP_KERNEL);
|
chipname = devm_kstrdup(&dev->dev, devname, GFP_KERNEL);
|
||||||
mmciname = kasprintf(GFP_KERNEL, "lm%x:00700", dev->id);
|
mmciname = devm_kasprintf(&dev->dev, GFP_KERNEL,
|
||||||
|
"lm%x:00700", dev->id);
|
||||||
|
if (!lookup || !chipname || !mmciname)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
lookup->dev_id = mmciname;
|
lookup->dev_id = mmciname;
|
||||||
/*
|
/*
|
||||||
* Offsets on GPIO block 1:
|
* Offsets on GPIO block 1:
|
||||||
|
@ -32,6 +32,8 @@ void __iomem *rst_manager_base_addr;
|
|||||||
void __iomem *sdr_ctl_base_addr;
|
void __iomem *sdr_ctl_base_addr;
|
||||||
unsigned long socfpga_cpu1start_addr;
|
unsigned long socfpga_cpu1start_addr;
|
||||||
|
|
||||||
|
extern void __init socfpga_reset_init(void);
|
||||||
|
|
||||||
static void __init socfpga_sysmgr_init(void)
|
static void __init socfpga_sysmgr_init(void)
|
||||||
{
|
{
|
||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
@ -64,6 +66,7 @@ static void __init socfpga_init_irq(void)
|
|||||||
|
|
||||||
if (IS_ENABLED(CONFIG_EDAC_ALTERA_OCRAM))
|
if (IS_ENABLED(CONFIG_EDAC_ALTERA_OCRAM))
|
||||||
socfpga_init_ocram_ecc();
|
socfpga_init_ocram_ecc();
|
||||||
|
socfpga_reset_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __init socfpga_arria10_init_irq(void)
|
static void __init socfpga_arria10_init_irq(void)
|
||||||
@ -74,6 +77,7 @@ static void __init socfpga_arria10_init_irq(void)
|
|||||||
socfpga_init_arria10_l2_ecc();
|
socfpga_init_arria10_l2_ecc();
|
||||||
if (IS_ENABLED(CONFIG_EDAC_ALTERA_OCRAM))
|
if (IS_ENABLED(CONFIG_EDAC_ALTERA_OCRAM))
|
||||||
socfpga_init_arria10_ocram_ecc();
|
socfpga_init_arria10_ocram_ecc();
|
||||||
|
socfpga_reset_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void socfpga_cyclone5_restart(enum reboot_mode mode, const char *cmd)
|
static void socfpga_cyclone5_restart(enum reboot_mode mode, const char *cmd)
|
||||||
|
@ -183,7 +183,7 @@
|
|||||||
pinctrl-0 = <&cp0_pcie_pins>;
|
pinctrl-0 = <&cp0_pcie_pins>;
|
||||||
num-lanes = <4>;
|
num-lanes = <4>;
|
||||||
num-viewport = <8>;
|
num-viewport = <8>;
|
||||||
reset-gpio = <&cp0_gpio1 20 GPIO_ACTIVE_LOW>;
|
reset-gpios = <&cp0_gpio2 20 GPIO_ACTIVE_LOW>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -28,6 +28,23 @@
|
|||||||
method = "smc";
|
method = "smc";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
reserved-memory {
|
||||||
|
#address-cells = <2>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
ranges;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This area matches the mapping done with a
|
||||||
|
* mainline U-Boot, and should be updated by the
|
||||||
|
* bootloader.
|
||||||
|
*/
|
||||||
|
|
||||||
|
psci-area@4000000 {
|
||||||
|
reg = <0x0 0x4000000 0x0 0x200000>;
|
||||||
|
no-map;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
ap806 {
|
ap806 {
|
||||||
#address-cells = <2>;
|
#address-cells = <2>;
|
||||||
#size-cells = <2>;
|
#size-cells = <2>;
|
||||||
|
@ -506,11 +506,15 @@ CONFIG_SND_SOC_ROCKCHIP=m
|
|||||||
CONFIG_SND_SOC_ROCKCHIP_SPDIF=m
|
CONFIG_SND_SOC_ROCKCHIP_SPDIF=m
|
||||||
CONFIG_SND_SOC_ROCKCHIP_RT5645=m
|
CONFIG_SND_SOC_ROCKCHIP_RT5645=m
|
||||||
CONFIG_SND_SOC_RK3399_GRU_SOUND=m
|
CONFIG_SND_SOC_RK3399_GRU_SOUND=m
|
||||||
|
CONFIG_SND_MESON_AXG_SOUND_CARD=m
|
||||||
CONFIG_SND_SOC_SAMSUNG=y
|
CONFIG_SND_SOC_SAMSUNG=y
|
||||||
CONFIG_SND_SOC_RCAR=m
|
CONFIG_SND_SOC_RCAR=m
|
||||||
CONFIG_SND_SOC_AK4613=m
|
CONFIG_SND_SOC_AK4613=m
|
||||||
CONFIG_SND_SIMPLE_CARD=m
|
CONFIG_SND_SIMPLE_CARD=m
|
||||||
CONFIG_SND_AUDIO_GRAPH_CARD=m
|
CONFIG_SND_AUDIO_GRAPH_CARD=m
|
||||||
|
CONFIG_SND_SOC_ES7134=m
|
||||||
|
CONFIG_SND_SOC_ES7241=m
|
||||||
|
CONFIG_SND_SOC_TAS571X=m
|
||||||
CONFIG_I2C_HID=m
|
CONFIG_I2C_HID=m
|
||||||
CONFIG_USB=y
|
CONFIG_USB=y
|
||||||
CONFIG_USB_OTG=y
|
CONFIG_USB_OTG=y
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#ifndef __ASM_PROTOTYPES_H
|
#ifndef __ASM_PROTOTYPES_H
|
||||||
#define __ASM_PROTOTYPES_H
|
#define __ASM_PROTOTYPES_H
|
||||||
/*
|
/*
|
||||||
* CONFIG_MODEVERIONS requires a C declaration to generate the appropriate CRC
|
* CONFIG_MODVERSIONS requires a C declaration to generate the appropriate CRC
|
||||||
* for each symbol. Since commit:
|
* for each symbol. Since commit:
|
||||||
*
|
*
|
||||||
* 4efca4ed05cbdfd1 ("kbuild: modversions for EXPORT_SYMBOL() for asm")
|
* 4efca4ed05cbdfd1 ("kbuild: modversions for EXPORT_SYMBOL() for asm")
|
||||||
|
@ -58,6 +58,12 @@
|
|||||||
*/
|
*/
|
||||||
#define ARCH_DMA_MINALIGN (128)
|
#define ARCH_DMA_MINALIGN (128)
|
||||||
|
|
||||||
|
#ifdef CONFIG_KASAN_SW_TAGS
|
||||||
|
#define ARCH_SLAB_MINALIGN (1ULL << KASAN_SHADOW_SCALE_SHIFT)
|
||||||
|
#else
|
||||||
|
#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
#include <linux/bitops.h>
|
#include <linux/bitops.h>
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
#ifndef __ASM_MMU_H
|
#ifndef __ASM_MMU_H
|
||||||
#define __ASM_MMU_H
|
#define __ASM_MMU_H
|
||||||
|
|
||||||
|
#include <asm/cputype.h>
|
||||||
|
|
||||||
#define MMCF_AARCH32 0x1 /* mm context flag for AArch32 executables */
|
#define MMCF_AARCH32 0x1 /* mm context flag for AArch32 executables */
|
||||||
#define USER_ASID_BIT 48
|
#define USER_ASID_BIT 48
|
||||||
#define USER_ASID_FLAG (UL(1) << USER_ASID_BIT)
|
#define USER_ASID_FLAG (UL(1) << USER_ASID_BIT)
|
||||||
@ -44,6 +46,45 @@ static inline bool arm64_kernel_unmapped_at_el0(void)
|
|||||||
cpus_have_const_cap(ARM64_UNMAP_KERNEL_AT_EL0);
|
cpus_have_const_cap(ARM64_UNMAP_KERNEL_AT_EL0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool arm64_kernel_use_ng_mappings(void)
|
||||||
|
{
|
||||||
|
bool tx1_bug;
|
||||||
|
|
||||||
|
/* What's a kpti? Use global mappings if we don't know. */
|
||||||
|
if (!IS_ENABLED(CONFIG_UNMAP_KERNEL_AT_EL0))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Note: this function is called before the CPU capabilities have
|
||||||
|
* been configured, so our early mappings will be global. If we
|
||||||
|
* later determine that kpti is required, then
|
||||||
|
* kpti_install_ng_mappings() will make them non-global.
|
||||||
|
*/
|
||||||
|
if (!IS_ENABLED(CONFIG_RANDOMIZE_BASE))
|
||||||
|
return arm64_kernel_unmapped_at_el0();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* KASLR is enabled so we're going to be enabling kpti on non-broken
|
||||||
|
* CPUs regardless of their susceptibility to Meltdown. Rather
|
||||||
|
* than force everybody to go through the G -> nG dance later on,
|
||||||
|
* just put down non-global mappings from the beginning.
|
||||||
|
*/
|
||||||
|
if (!IS_ENABLED(CONFIG_CAVIUM_ERRATUM_27456)) {
|
||||||
|
tx1_bug = false;
|
||||||
|
#ifndef MODULE
|
||||||
|
} else if (!static_branch_likely(&arm64_const_caps_ready)) {
|
||||||
|
extern const struct midr_range cavium_erratum_27456_cpus[];
|
||||||
|
|
||||||
|
tx1_bug = is_midr_in_range_list(read_cpuid_id(),
|
||||||
|
cavium_erratum_27456_cpus);
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
tx1_bug = __cpus_have_const_cap(ARM64_WORKAROUND_CAVIUM_27456);
|
||||||
|
}
|
||||||
|
|
||||||
|
return !tx1_bug && kaslr_offset() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
typedef void (*bp_hardening_cb_t)(void);
|
typedef void (*bp_hardening_cb_t)(void);
|
||||||
|
|
||||||
struct bp_hardening_data {
|
struct bp_hardening_data {
|
||||||
|
@ -37,8 +37,8 @@
|
|||||||
#define _PROT_DEFAULT (PTE_TYPE_PAGE | PTE_AF | PTE_SHARED)
|
#define _PROT_DEFAULT (PTE_TYPE_PAGE | PTE_AF | PTE_SHARED)
|
||||||
#define _PROT_SECT_DEFAULT (PMD_TYPE_SECT | PMD_SECT_AF | PMD_SECT_S)
|
#define _PROT_SECT_DEFAULT (PMD_TYPE_SECT | PMD_SECT_AF | PMD_SECT_S)
|
||||||
|
|
||||||
#define PTE_MAYBE_NG (arm64_kernel_unmapped_at_el0() ? PTE_NG : 0)
|
#define PTE_MAYBE_NG (arm64_kernel_use_ng_mappings() ? PTE_NG : 0)
|
||||||
#define PMD_MAYBE_NG (arm64_kernel_unmapped_at_el0() ? PMD_SECT_NG : 0)
|
#define PMD_MAYBE_NG (arm64_kernel_use_ng_mappings() ? PMD_SECT_NG : 0)
|
||||||
|
|
||||||
#define PROT_DEFAULT (_PROT_DEFAULT | PTE_MAYBE_NG)
|
#define PROT_DEFAULT (_PROT_DEFAULT | PTE_MAYBE_NG)
|
||||||
#define PROT_SECT_DEFAULT (_PROT_SECT_DEFAULT | PMD_MAYBE_NG)
|
#define PROT_SECT_DEFAULT (_PROT_SECT_DEFAULT | PMD_MAYBE_NG)
|
||||||
|
@ -553,7 +553,7 @@ static const struct midr_range arm64_repeat_tlbi_cpus[] = {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_CAVIUM_ERRATUM_27456
|
#ifdef CONFIG_CAVIUM_ERRATUM_27456
|
||||||
static const struct midr_range cavium_erratum_27456_cpus[] = {
|
const struct midr_range cavium_erratum_27456_cpus[] = {
|
||||||
/* Cavium ThunderX, T88 pass 1.x - 2.1 */
|
/* Cavium ThunderX, T88 pass 1.x - 2.1 */
|
||||||
MIDR_RANGE(MIDR_THUNDERX, 0, 0, 1, 1),
|
MIDR_RANGE(MIDR_THUNDERX, 0, 0, 1, 1),
|
||||||
/* Cavium ThunderX, T81 pass 1.0 */
|
/* Cavium ThunderX, T81 pass 1.0 */
|
||||||
|
@ -983,7 +983,7 @@ static bool unmap_kernel_at_el0(const struct arm64_cpu_capabilities *entry,
|
|||||||
|
|
||||||
/* Useful for KASLR robustness */
|
/* Useful for KASLR robustness */
|
||||||
if (IS_ENABLED(CONFIG_RANDOMIZE_BASE))
|
if (IS_ENABLED(CONFIG_RANDOMIZE_BASE))
|
||||||
return true;
|
return kaslr_offset() > 0;
|
||||||
|
|
||||||
/* Don't force KPTI for CPUs that are not vulnerable */
|
/* Don't force KPTI for CPUs that are not vulnerable */
|
||||||
if (is_midr_in_range_list(read_cpuid_id(), kpti_safe_list))
|
if (is_midr_in_range_list(read_cpuid_id(), kpti_safe_list))
|
||||||
@ -1003,7 +1003,12 @@ kpti_install_ng_mappings(const struct arm64_cpu_capabilities *__unused)
|
|||||||
static bool kpti_applied = false;
|
static bool kpti_applied = false;
|
||||||
int cpu = smp_processor_id();
|
int cpu = smp_processor_id();
|
||||||
|
|
||||||
if (kpti_applied)
|
/*
|
||||||
|
* We don't need to rewrite the page-tables if either we've done
|
||||||
|
* it already or we have KASLR enabled and therefore have not
|
||||||
|
* created any global mappings at all.
|
||||||
|
*/
|
||||||
|
if (kpti_applied || kaslr_offset() > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
remap_fn = (void *)__pa_symbol(idmap_kpti_install_ng_mappings);
|
remap_fn = (void *)__pa_symbol(idmap_kpti_install_ng_mappings);
|
||||||
|
@ -475,6 +475,7 @@ ENDPROC(__primary_switched)
|
|||||||
|
|
||||||
ENTRY(kimage_vaddr)
|
ENTRY(kimage_vaddr)
|
||||||
.quad _text - TEXT_OFFSET
|
.quad _text - TEXT_OFFSET
|
||||||
|
EXPORT_SYMBOL(kimage_vaddr)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we're fortunate enough to boot at EL2, ensure that the world is
|
* If we're fortunate enough to boot at EL2, ensure that the world is
|
||||||
|
@ -87,7 +87,9 @@ static int setup_dtb(struct kimage *image,
|
|||||||
|
|
||||||
/* add kaslr-seed */
|
/* add kaslr-seed */
|
||||||
ret = fdt_delprop(dtb, off, FDT_PROP_KASLR_SEED);
|
ret = fdt_delprop(dtb, off, FDT_PROP_KASLR_SEED);
|
||||||
if (ret && (ret != -FDT_ERR_NOTFOUND))
|
if (ret == -FDT_ERR_NOTFOUND)
|
||||||
|
ret = 0;
|
||||||
|
else if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (rng_is_initialized()) {
|
if (rng_is_initialized()) {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
include include/uapi/asm-generic/Kbuild.asm
|
include include/uapi/asm-generic/Kbuild.asm
|
||||||
|
|
||||||
generic-y += kvm_para.h
|
generic-y += kvm_para.h
|
||||||
|
generic-y += shmparam.h
|
||||||
generic-y += ucontext.h
|
generic-y += ucontext.h
|
||||||
|
@ -15,6 +15,31 @@ extern void iounmap(void *addr);
|
|||||||
extern int remap_area_pages(unsigned long address, phys_addr_t phys_addr,
|
extern int remap_area_pages(unsigned long address, phys_addr_t phys_addr,
|
||||||
size_t size, unsigned long flags);
|
size_t size, unsigned long flags);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* I/O memory access primitives. Reads are ordered relative to any
|
||||||
|
* following Normal memory access. Writes are ordered relative to any prior
|
||||||
|
* Normal memory access.
|
||||||
|
*
|
||||||
|
* For CACHEV1 (807, 810), store instruction could fast retire, so we need
|
||||||
|
* another mb() to prevent st fast retire.
|
||||||
|
*
|
||||||
|
* For CACHEV2 (860), store instruction with PAGE_ATTR_NO_BUFFERABLE won't
|
||||||
|
* fast retire.
|
||||||
|
*/
|
||||||
|
#define readb(c) ({ u8 __v = readb_relaxed(c); rmb(); __v; })
|
||||||
|
#define readw(c) ({ u16 __v = readw_relaxed(c); rmb(); __v; })
|
||||||
|
#define readl(c) ({ u32 __v = readl_relaxed(c); rmb(); __v; })
|
||||||
|
|
||||||
|
#ifdef CONFIG_CPU_HAS_CACHEV2
|
||||||
|
#define writeb(v,c) ({ wmb(); writeb_relaxed((v),(c)); })
|
||||||
|
#define writew(v,c) ({ wmb(); writew_relaxed((v),(c)); })
|
||||||
|
#define writel(v,c) ({ wmb(); writel_relaxed((v),(c)); })
|
||||||
|
#else
|
||||||
|
#define writeb(v,c) ({ wmb(); writeb_relaxed((v),(c)); mb(); })
|
||||||
|
#define writew(v,c) ({ wmb(); writew_relaxed((v),(c)); mb(); })
|
||||||
|
#define writel(v,c) ({ wmb(); writel_relaxed((v),(c)); mb(); })
|
||||||
|
#endif
|
||||||
|
|
||||||
#define ioremap_nocache(phy, sz) ioremap(phy, sz)
|
#define ioremap_nocache(phy, sz) ioremap(phy, sz)
|
||||||
#define ioremap_wc ioremap_nocache
|
#define ioremap_wc ioremap_nocache
|
||||||
#define ioremap_wt ioremap_nocache
|
#define ioremap_wt ioremap_nocache
|
||||||
|
@ -24,41 +24,34 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
|
|||||||
|
|
||||||
extern void pgd_init(unsigned long *p);
|
extern void pgd_init(unsigned long *p);
|
||||||
|
|
||||||
static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
|
static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm)
|
||||||
unsigned long address)
|
|
||||||
{
|
{
|
||||||
pte_t *pte;
|
pte_t *pte;
|
||||||
unsigned long *kaddr, i;
|
unsigned long i;
|
||||||
|
|
||||||
pte = (pte_t *) __get_free_pages(GFP_KERNEL | __GFP_RETRY_MAYFAIL,
|
pte = (pte_t *) __get_free_page(GFP_KERNEL);
|
||||||
PTE_ORDER);
|
if (!pte)
|
||||||
kaddr = (unsigned long *)pte;
|
return NULL;
|
||||||
if (address & 0x80000000)
|
|
||||||
for (i = 0; i < (PAGE_SIZE/4); i++)
|
for (i = 0; i < PAGE_SIZE/sizeof(pte_t); i++)
|
||||||
*(kaddr + i) = 0x1;
|
(pte + i)->pte_low = _PAGE_GLOBAL;
|
||||||
else
|
|
||||||
clear_page(kaddr);
|
|
||||||
|
|
||||||
return pte;
|
return pte;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct page *pte_alloc_one(struct mm_struct *mm,
|
static inline struct page *pte_alloc_one(struct mm_struct *mm)
|
||||||
unsigned long address)
|
|
||||||
{
|
{
|
||||||
struct page *pte;
|
struct page *pte;
|
||||||
unsigned long *kaddr, i;
|
|
||||||
|
|
||||||
pte = alloc_pages(GFP_KERNEL | __GFP_RETRY_MAYFAIL, PTE_ORDER);
|
pte = alloc_pages(GFP_KERNEL | __GFP_ZERO, 0);
|
||||||
if (pte) {
|
if (!pte)
|
||||||
kaddr = kmap_atomic(pte);
|
return NULL;
|
||||||
if (address & 0x80000000) {
|
|
||||||
for (i = 0; i < (PAGE_SIZE/4); i++)
|
if (!pgtable_page_ctor(pte)) {
|
||||||
*(kaddr + i) = 0x1;
|
__free_page(pte);
|
||||||
} else
|
return NULL;
|
||||||
clear_page(kaddr);
|
|
||||||
kunmap_atomic(kaddr);
|
|
||||||
pgtable_page_ctor(pte);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return pte;
|
return pte;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include <linux/spinlock.h>
|
#include <linux/spinlock.h>
|
||||||
#include <asm/pgtable.h>
|
#include <asm/pgtable.h>
|
||||||
|
|
||||||
#if defined(__CSKYABIV2__)
|
#ifdef CONFIG_CPU_CK810
|
||||||
#define IS_BSR32(hi16, lo16) (((hi16) & 0xFC00) == 0xE000)
|
#define IS_BSR32(hi16, lo16) (((hi16) & 0xFC00) == 0xE000)
|
||||||
#define IS_JSRI32(hi16, lo16) ((hi16) == 0xEAE0)
|
#define IS_JSRI32(hi16, lo16) ((hi16) == 0xEAE0)
|
||||||
|
|
||||||
@ -25,6 +25,26 @@
|
|||||||
*(uint16_t *)(addr) = 0xE8Fa; \
|
*(uint16_t *)(addr) = 0xE8Fa; \
|
||||||
*((uint16_t *)(addr) + 1) = 0x0000; \
|
*((uint16_t *)(addr) + 1) = 0x0000; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
static void jsri_2_lrw_jsr(uint32_t *location)
|
||||||
|
{
|
||||||
|
uint16_t *location_tmp = (uint16_t *)location;
|
||||||
|
|
||||||
|
if (IS_BSR32(*location_tmp, *(location_tmp + 1)))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (IS_JSRI32(*location_tmp, *(location_tmp + 1))) {
|
||||||
|
/* jsri 0x... --> lrw r26, 0x... */
|
||||||
|
CHANGE_JSRI_TO_LRW(location);
|
||||||
|
/* lsli r0, r0 --> jsr r26 */
|
||||||
|
SET_JSR32_R26(location + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static void inline jsri_2_lrw_jsr(uint32_t *location)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
|
int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
|
||||||
@ -35,9 +55,6 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
|
|||||||
Elf32_Sym *sym;
|
Elf32_Sym *sym;
|
||||||
uint32_t *location;
|
uint32_t *location;
|
||||||
short *temp;
|
short *temp;
|
||||||
#if defined(__CSKYABIV2__)
|
|
||||||
uint16_t *location_tmp;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
|
for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
|
||||||
/* This is where to make the change */
|
/* This is where to make the change */
|
||||||
@ -59,18 +76,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
|
|||||||
case R_CSKY_PCRELJSR_IMM11BY2:
|
case R_CSKY_PCRELJSR_IMM11BY2:
|
||||||
break;
|
break;
|
||||||
case R_CSKY_PCRELJSR_IMM26BY2:
|
case R_CSKY_PCRELJSR_IMM26BY2:
|
||||||
#if defined(__CSKYABIV2__)
|
jsri_2_lrw_jsr(location);
|
||||||
location_tmp = (uint16_t *)location;
|
|
||||||
if (IS_BSR32(*location_tmp, *(location_tmp + 1)))
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (IS_JSRI32(*location_tmp, *(location_tmp + 1))) {
|
|
||||||
/* jsri 0x... --> lrw r26, 0x... */
|
|
||||||
CHANGE_JSRI_TO_LRW(location);
|
|
||||||
/* lsli r0, r0 --> jsr r26 */
|
|
||||||
SET_JSR32_R26(location + 1);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case R_CSKY_ADDR_HI16:
|
case R_CSKY_ADDR_HI16:
|
||||||
temp = ((short *)location) + 1;
|
temp = ((short *)location) + 1;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
include include/uapi/asm-generic/Kbuild.asm
|
include include/uapi/asm-generic/Kbuild.asm
|
||||||
|
|
||||||
generic-y += kvm_para.h
|
generic-y += kvm_para.h
|
||||||
|
generic-y += shmparam.h
|
||||||
generic-y += ucontext.h
|
generic-y += ucontext.h
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
include include/uapi/asm-generic/Kbuild.asm
|
include include/uapi/asm-generic/Kbuild.asm
|
||||||
|
|
||||||
|
generic-y += shmparam.h
|
||||||
generic-y += ucontext.h
|
generic-y += ucontext.h
|
||||||
|
@ -2,3 +2,4 @@ include include/uapi/asm-generic/Kbuild.asm
|
|||||||
|
|
||||||
generated-y += unistd_32.h
|
generated-y += unistd_32.h
|
||||||
generic-y += kvm_para.h
|
generic-y += kvm_para.h
|
||||||
|
generic-y += shmparam.h
|
||||||
|
@ -2,4 +2,5 @@ include include/uapi/asm-generic/Kbuild.asm
|
|||||||
|
|
||||||
generated-y += unistd_32.h
|
generated-y += unistd_32.h
|
||||||
generic-y += kvm_para.h
|
generic-y += kvm_para.h
|
||||||
|
generic-y += shmparam.h
|
||||||
generic-y += ucontext.h
|
generic-y += ucontext.h
|
||||||
|
@ -129,9 +129,9 @@ ltq_dma_alloc(struct ltq_dma_channel *ch)
|
|||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
ch->desc = 0;
|
ch->desc = 0;
|
||||||
ch->desc_base = dma_zalloc_coherent(ch->dev,
|
ch->desc_base = dma_alloc_coherent(ch->dev,
|
||||||
LTQ_DESC_NUM * LTQ_DESC_SIZE,
|
LTQ_DESC_NUM * LTQ_DESC_SIZE,
|
||||||
&ch->phys, GFP_ATOMIC);
|
&ch->phys, GFP_ATOMIC);
|
||||||
|
|
||||||
spin_lock_irqsave(<q_dma_lock, flags);
|
spin_lock_irqsave(<q_dma_lock, flags);
|
||||||
ltq_dma_w32(ch->nr, LTQ_DMA_CS);
|
ltq_dma_w32(ch->nr, LTQ_DMA_CS);
|
||||||
|
@ -58,8 +58,12 @@
|
|||||||
/* Ensure that addr is below task's addr_limit */
|
/* Ensure that addr is below task's addr_limit */
|
||||||
#define __addr_ok(addr) ((unsigned long) addr < get_fs())
|
#define __addr_ok(addr) ((unsigned long) addr < get_fs())
|
||||||
|
|
||||||
#define access_ok(addr, size) \
|
#define access_ok(addr, size) \
|
||||||
__range_ok((unsigned long)addr, (unsigned long)size)
|
({ \
|
||||||
|
unsigned long __ao_addr = (unsigned long)(addr); \
|
||||||
|
unsigned long __ao_size = (unsigned long)(size); \
|
||||||
|
__range_ok(__ao_addr, __ao_size); \
|
||||||
|
})
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These are the main single-value transfer routines. They automatically
|
* These are the main single-value transfer routines. They automatically
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
include include/uapi/asm-generic/Kbuild.asm
|
include include/uapi/asm-generic/Kbuild.asm
|
||||||
|
|
||||||
generic-y += kvm_para.h
|
generic-y += kvm_para.h
|
||||||
|
generic-y += shmparam.h
|
||||||
generic-y += ucontext.h
|
generic-y += ucontext.h
|
||||||
|
@ -255,7 +255,7 @@ int pasemi_dma_alloc_ring(struct pasemi_dmachan *chan, int ring_size)
|
|||||||
|
|
||||||
chan->ring_size = ring_size;
|
chan->ring_size = ring_size;
|
||||||
|
|
||||||
chan->ring_virt = dma_zalloc_coherent(&dma_pdev->dev,
|
chan->ring_virt = dma_alloc_coherent(&dma_pdev->dev,
|
||||||
ring_size * sizeof(u64),
|
ring_size * sizeof(u64),
|
||||||
&chan->ring_dma, GFP_KERNEL);
|
&chan->ring_dma, GFP_KERNEL);
|
||||||
|
|
||||||
|
@ -756,9 +756,10 @@ fsl_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize outbound message descriptor ring */
|
/* Initialize outbound message descriptor ring */
|
||||||
rmu->msg_tx_ring.virt = dma_zalloc_coherent(priv->dev,
|
rmu->msg_tx_ring.virt = dma_alloc_coherent(priv->dev,
|
||||||
rmu->msg_tx_ring.size * RIO_MSG_DESC_SIZE,
|
rmu->msg_tx_ring.size * RIO_MSG_DESC_SIZE,
|
||||||
&rmu->msg_tx_ring.phys, GFP_KERNEL);
|
&rmu->msg_tx_ring.phys,
|
||||||
|
GFP_KERNEL);
|
||||||
if (!rmu->msg_tx_ring.virt) {
|
if (!rmu->msg_tx_ring.virt) {
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
goto out_dma;
|
goto out_dma;
|
||||||
|
@ -28,11 +28,13 @@ config RISCV
|
|||||||
select GENERIC_STRNLEN_USER
|
select GENERIC_STRNLEN_USER
|
||||||
select GENERIC_SMP_IDLE_THREAD
|
select GENERIC_SMP_IDLE_THREAD
|
||||||
select GENERIC_ATOMIC64 if !64BIT || !RISCV_ISA_A
|
select GENERIC_ATOMIC64 if !64BIT || !RISCV_ISA_A
|
||||||
|
select HAVE_ARCH_AUDITSYSCALL
|
||||||
select HAVE_MEMBLOCK_NODE_MAP
|
select HAVE_MEMBLOCK_NODE_MAP
|
||||||
select HAVE_DMA_CONTIGUOUS
|
select HAVE_DMA_CONTIGUOUS
|
||||||
select HAVE_FUTEX_CMPXCHG if FUTEX
|
select HAVE_FUTEX_CMPXCHG if FUTEX
|
||||||
select HAVE_GENERIC_DMA_COHERENT
|
select HAVE_GENERIC_DMA_COHERENT
|
||||||
select HAVE_PERF_EVENTS
|
select HAVE_PERF_EVENTS
|
||||||
|
select HAVE_SYSCALL_TRACEPOINTS
|
||||||
select IRQ_DOMAIN
|
select IRQ_DOMAIN
|
||||||
select RISCV_ISA_A if SMP
|
select RISCV_ISA_A if SMP
|
||||||
select SPARSE_IRQ
|
select SPARSE_IRQ
|
||||||
@ -40,6 +42,7 @@ config RISCV
|
|||||||
select HAVE_ARCH_TRACEHOOK
|
select HAVE_ARCH_TRACEHOOK
|
||||||
select HAVE_PCI
|
select HAVE_PCI
|
||||||
select MODULES_USE_ELF_RELA if MODULES
|
select MODULES_USE_ELF_RELA if MODULES
|
||||||
|
select MODULE_SECTIONS if MODULES
|
||||||
select THREAD_INFO_IN_TASK
|
select THREAD_INFO_IN_TASK
|
||||||
select PCI_DOMAINS_GENERIC if PCI
|
select PCI_DOMAINS_GENERIC if PCI
|
||||||
select PCI_MSI if PCI
|
select PCI_MSI if PCI
|
||||||
@ -152,7 +155,6 @@ choice
|
|||||||
bool "2GiB"
|
bool "2GiB"
|
||||||
config MAXPHYSMEM_128GB
|
config MAXPHYSMEM_128GB
|
||||||
depends on 64BIT && CMODEL_MEDANY
|
depends on 64BIT && CMODEL_MEDANY
|
||||||
select MODULE_SECTIONS if MODULES
|
|
||||||
bool "128GiB"
|
bool "128GiB"
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
|
@ -9,12 +9,12 @@
|
|||||||
#define MODULE_ARCH_VERMAGIC "riscv"
|
#define MODULE_ARCH_VERMAGIC "riscv"
|
||||||
|
|
||||||
struct module;
|
struct module;
|
||||||
u64 module_emit_got_entry(struct module *mod, u64 val);
|
unsigned long module_emit_got_entry(struct module *mod, unsigned long val);
|
||||||
u64 module_emit_plt_entry(struct module *mod, u64 val);
|
unsigned long module_emit_plt_entry(struct module *mod, unsigned long val);
|
||||||
|
|
||||||
#ifdef CONFIG_MODULE_SECTIONS
|
#ifdef CONFIG_MODULE_SECTIONS
|
||||||
struct mod_section {
|
struct mod_section {
|
||||||
struct elf64_shdr *shdr;
|
Elf_Shdr *shdr;
|
||||||
int num_entries;
|
int num_entries;
|
||||||
int max_entries;
|
int max_entries;
|
||||||
};
|
};
|
||||||
@ -26,18 +26,18 @@ struct mod_arch_specific {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct got_entry {
|
struct got_entry {
|
||||||
u64 symbol_addr; /* the real variable address */
|
unsigned long symbol_addr; /* the real variable address */
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline struct got_entry emit_got_entry(u64 val)
|
static inline struct got_entry emit_got_entry(unsigned long val)
|
||||||
{
|
{
|
||||||
return (struct got_entry) {val};
|
return (struct got_entry) {val};
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct got_entry *get_got_entry(u64 val,
|
static inline struct got_entry *get_got_entry(unsigned long val,
|
||||||
const struct mod_section *sec)
|
const struct mod_section *sec)
|
||||||
{
|
{
|
||||||
struct got_entry *got = (struct got_entry *)sec->shdr->sh_addr;
|
struct got_entry *got = (struct got_entry *)(sec->shdr->sh_addr);
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < sec->num_entries; i++) {
|
for (i = 0; i < sec->num_entries; i++) {
|
||||||
if (got[i].symbol_addr == val)
|
if (got[i].symbol_addr == val)
|
||||||
@ -62,7 +62,9 @@ struct plt_entry {
|
|||||||
#define REG_T0 0x5
|
#define REG_T0 0x5
|
||||||
#define REG_T1 0x6
|
#define REG_T1 0x6
|
||||||
|
|
||||||
static inline struct plt_entry emit_plt_entry(u64 val, u64 plt, u64 got_plt)
|
static inline struct plt_entry emit_plt_entry(unsigned long val,
|
||||||
|
unsigned long plt,
|
||||||
|
unsigned long got_plt)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* U-Type encoding:
|
* U-Type encoding:
|
||||||
@ -76,7 +78,7 @@ static inline struct plt_entry emit_plt_entry(u64 val, u64 plt, u64 got_plt)
|
|||||||
* +------------+------------+--------+----------+----------+
|
* +------------+------------+--------+----------+----------+
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
u64 offset = got_plt - plt;
|
unsigned long offset = got_plt - plt;
|
||||||
u32 hi20 = (offset + 0x800) & 0xfffff000;
|
u32 hi20 = (offset + 0x800) & 0xfffff000;
|
||||||
u32 lo12 = (offset - hi20);
|
u32 lo12 = (offset - hi20);
|
||||||
return (struct plt_entry) {
|
return (struct plt_entry) {
|
||||||
@ -86,7 +88,7 @@ static inline struct plt_entry emit_plt_entry(u64 val, u64 plt, u64 got_plt)
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int get_got_plt_idx(u64 val, const struct mod_section *sec)
|
static inline int get_got_plt_idx(unsigned long val, const struct mod_section *sec)
|
||||||
{
|
{
|
||||||
struct got_entry *got_plt = (struct got_entry *)sec->shdr->sh_addr;
|
struct got_entry *got_plt = (struct got_entry *)sec->shdr->sh_addr;
|
||||||
int i;
|
int i;
|
||||||
@ -97,9 +99,9 @@ static inline int get_got_plt_idx(u64 val, const struct mod_section *sec)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct plt_entry *get_plt_entry(u64 val,
|
static inline struct plt_entry *get_plt_entry(unsigned long val,
|
||||||
const struct mod_section *sec_plt,
|
const struct mod_section *sec_plt,
|
||||||
const struct mod_section *sec_got_plt)
|
const struct mod_section *sec_got_plt)
|
||||||
{
|
{
|
||||||
struct plt_entry *plt = (struct plt_entry *)sec_plt->shdr->sh_addr;
|
struct plt_entry *plt = (struct plt_entry *)sec_plt->shdr->sh_addr;
|
||||||
int got_plt_idx = get_got_plt_idx(val, sec_got_plt);
|
int got_plt_idx = get_got_plt_idx(val, sec_got_plt);
|
||||||
|
@ -113,6 +113,11 @@ static inline void frame_pointer_set(struct pt_regs *regs,
|
|||||||
SET_FP(regs, val);
|
SET_FP(regs, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline unsigned long regs_return_value(struct pt_regs *regs)
|
||||||
|
{
|
||||||
|
return regs->a0;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
||||||
#endif /* _ASM_RISCV_PTRACE_H */
|
#endif /* _ASM_RISCV_PTRACE_H */
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#ifndef _ASM_RISCV_SYSCALL_H
|
#ifndef _ASM_RISCV_SYSCALL_H
|
||||||
#define _ASM_RISCV_SYSCALL_H
|
#define _ASM_RISCV_SYSCALL_H
|
||||||
|
|
||||||
|
#include <uapi/linux/audit.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
|
|
||||||
@ -99,4 +100,13 @@ static inline void syscall_set_arguments(struct task_struct *task,
|
|||||||
memcpy(®s->a1 + i * sizeof(regs->a1), args, n * sizeof(regs->a0));
|
memcpy(®s->a1 + i * sizeof(regs->a1), args, n * sizeof(regs->a0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int syscall_get_arch(void)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_64BIT
|
||||||
|
return AUDIT_ARCH_RISCV64;
|
||||||
|
#else
|
||||||
|
return AUDIT_ARCH_RISCV32;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* _ASM_RISCV_SYSCALL_H */
|
#endif /* _ASM_RISCV_SYSCALL_H */
|
||||||
|
@ -80,13 +80,19 @@ struct thread_info {
|
|||||||
#define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */
|
#define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */
|
||||||
#define TIF_MEMDIE 5 /* is terminating due to OOM killer */
|
#define TIF_MEMDIE 5 /* is terminating due to OOM killer */
|
||||||
#define TIF_SYSCALL_TRACEPOINT 6 /* syscall tracepoint instrumentation */
|
#define TIF_SYSCALL_TRACEPOINT 6 /* syscall tracepoint instrumentation */
|
||||||
|
#define TIF_SYSCALL_AUDIT 7 /* syscall auditing */
|
||||||
|
|
||||||
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
|
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
|
||||||
#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
|
#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
|
||||||
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
|
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
|
||||||
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
|
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
|
||||||
|
#define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT)
|
||||||
|
#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
|
||||||
|
|
||||||
#define _TIF_WORK_MASK \
|
#define _TIF_WORK_MASK \
|
||||||
(_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | _TIF_NEED_RESCHED)
|
(_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | _TIF_NEED_RESCHED)
|
||||||
|
|
||||||
|
#define _TIF_SYSCALL_WORK \
|
||||||
|
(_TIF_SYSCALL_TRACE | _TIF_SYSCALL_TRACEPOINT | _TIF_SYSCALL_AUDIT)
|
||||||
|
|
||||||
#endif /* _ASM_RISCV_THREAD_INFO_H */
|
#endif /* _ASM_RISCV_THREAD_INFO_H */
|
||||||
|
@ -19,3 +19,5 @@
|
|||||||
#define __ARCH_WANT_SYS_CLONE
|
#define __ARCH_WANT_SYS_CLONE
|
||||||
|
|
||||||
#include <uapi/asm/unistd.h>
|
#include <uapi/asm/unistd.h>
|
||||||
|
|
||||||
|
#define NR_syscalls (__NR_syscalls)
|
||||||
|
@ -201,7 +201,7 @@ handle_syscall:
|
|||||||
REG_S s2, PT_SEPC(sp)
|
REG_S s2, PT_SEPC(sp)
|
||||||
/* Trace syscalls, but only if requested by the user. */
|
/* Trace syscalls, but only if requested by the user. */
|
||||||
REG_L t0, TASK_TI_FLAGS(tp)
|
REG_L t0, TASK_TI_FLAGS(tp)
|
||||||
andi t0, t0, _TIF_SYSCALL_TRACE
|
andi t0, t0, _TIF_SYSCALL_WORK
|
||||||
bnez t0, handle_syscall_trace_enter
|
bnez t0, handle_syscall_trace_enter
|
||||||
check_syscall_nr:
|
check_syscall_nr:
|
||||||
/* Check to make sure we don't jump to a bogus syscall number. */
|
/* Check to make sure we don't jump to a bogus syscall number. */
|
||||||
@ -221,7 +221,7 @@ ret_from_syscall:
|
|||||||
REG_S a0, PT_A0(sp)
|
REG_S a0, PT_A0(sp)
|
||||||
/* Trace syscalls, but only if requested by the user. */
|
/* Trace syscalls, but only if requested by the user. */
|
||||||
REG_L t0, TASK_TI_FLAGS(tp)
|
REG_L t0, TASK_TI_FLAGS(tp)
|
||||||
andi t0, t0, _TIF_SYSCALL_TRACE
|
andi t0, t0, _TIF_SYSCALL_WORK
|
||||||
bnez t0, handle_syscall_trace_exit
|
bnez t0, handle_syscall_trace_exit
|
||||||
|
|
||||||
ret_from_exception:
|
ret_from_exception:
|
||||||
|
@ -9,14 +9,14 @@
|
|||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
|
||||||
u64 module_emit_got_entry(struct module *mod, u64 val)
|
unsigned long module_emit_got_entry(struct module *mod, unsigned long val)
|
||||||
{
|
{
|
||||||
struct mod_section *got_sec = &mod->arch.got;
|
struct mod_section *got_sec = &mod->arch.got;
|
||||||
int i = got_sec->num_entries;
|
int i = got_sec->num_entries;
|
||||||
struct got_entry *got = get_got_entry(val, got_sec);
|
struct got_entry *got = get_got_entry(val, got_sec);
|
||||||
|
|
||||||
if (got)
|
if (got)
|
||||||
return (u64)got;
|
return (unsigned long)got;
|
||||||
|
|
||||||
/* There is no duplicate entry, create a new one */
|
/* There is no duplicate entry, create a new one */
|
||||||
got = (struct got_entry *)got_sec->shdr->sh_addr;
|
got = (struct got_entry *)got_sec->shdr->sh_addr;
|
||||||
@ -25,10 +25,10 @@ u64 module_emit_got_entry(struct module *mod, u64 val)
|
|||||||
got_sec->num_entries++;
|
got_sec->num_entries++;
|
||||||
BUG_ON(got_sec->num_entries > got_sec->max_entries);
|
BUG_ON(got_sec->num_entries > got_sec->max_entries);
|
||||||
|
|
||||||
return (u64)&got[i];
|
return (unsigned long)&got[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 module_emit_plt_entry(struct module *mod, u64 val)
|
unsigned long module_emit_plt_entry(struct module *mod, unsigned long val)
|
||||||
{
|
{
|
||||||
struct mod_section *got_plt_sec = &mod->arch.got_plt;
|
struct mod_section *got_plt_sec = &mod->arch.got_plt;
|
||||||
struct got_entry *got_plt;
|
struct got_entry *got_plt;
|
||||||
@ -37,27 +37,29 @@ u64 module_emit_plt_entry(struct module *mod, u64 val)
|
|||||||
int i = plt_sec->num_entries;
|
int i = plt_sec->num_entries;
|
||||||
|
|
||||||
if (plt)
|
if (plt)
|
||||||
return (u64)plt;
|
return (unsigned long)plt;
|
||||||
|
|
||||||
/* There is no duplicate entry, create a new one */
|
/* There is no duplicate entry, create a new one */
|
||||||
got_plt = (struct got_entry *)got_plt_sec->shdr->sh_addr;
|
got_plt = (struct got_entry *)got_plt_sec->shdr->sh_addr;
|
||||||
got_plt[i] = emit_got_entry(val);
|
got_plt[i] = emit_got_entry(val);
|
||||||
plt = (struct plt_entry *)plt_sec->shdr->sh_addr;
|
plt = (struct plt_entry *)plt_sec->shdr->sh_addr;
|
||||||
plt[i] = emit_plt_entry(val, (u64)&plt[i], (u64)&got_plt[i]);
|
plt[i] = emit_plt_entry(val,
|
||||||
|
(unsigned long)&plt[i],
|
||||||
|
(unsigned long)&got_plt[i]);
|
||||||
|
|
||||||
plt_sec->num_entries++;
|
plt_sec->num_entries++;
|
||||||
got_plt_sec->num_entries++;
|
got_plt_sec->num_entries++;
|
||||||
BUG_ON(plt_sec->num_entries > plt_sec->max_entries);
|
BUG_ON(plt_sec->num_entries > plt_sec->max_entries);
|
||||||
|
|
||||||
return (u64)&plt[i];
|
return (unsigned long)&plt[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
static int is_rela_equal(const Elf64_Rela *x, const Elf64_Rela *y)
|
static int is_rela_equal(const Elf_Rela *x, const Elf_Rela *y)
|
||||||
{
|
{
|
||||||
return x->r_info == y->r_info && x->r_addend == y->r_addend;
|
return x->r_info == y->r_info && x->r_addend == y->r_addend;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool duplicate_rela(const Elf64_Rela *rela, int idx)
|
static bool duplicate_rela(const Elf_Rela *rela, int idx)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < idx; i++) {
|
for (i = 0; i < idx; i++) {
|
||||||
@ -67,13 +69,13 @@ static bool duplicate_rela(const Elf64_Rela *rela, int idx)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void count_max_entries(Elf64_Rela *relas, int num,
|
static void count_max_entries(Elf_Rela *relas, int num,
|
||||||
unsigned int *plts, unsigned int *gots)
|
unsigned int *plts, unsigned int *gots)
|
||||||
{
|
{
|
||||||
unsigned int type, i;
|
unsigned int type, i;
|
||||||
|
|
||||||
for (i = 0; i < num; i++) {
|
for (i = 0; i < num; i++) {
|
||||||
type = ELF64_R_TYPE(relas[i].r_info);
|
type = ELF_RISCV_R_TYPE(relas[i].r_info);
|
||||||
if (type == R_RISCV_CALL_PLT) {
|
if (type == R_RISCV_CALL_PLT) {
|
||||||
if (!duplicate_rela(relas, i))
|
if (!duplicate_rela(relas, i))
|
||||||
(*plts)++;
|
(*plts)++;
|
||||||
@ -118,9 +120,9 @@ int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs,
|
|||||||
|
|
||||||
/* Calculate the maxinum number of entries */
|
/* Calculate the maxinum number of entries */
|
||||||
for (i = 0; i < ehdr->e_shnum; i++) {
|
for (i = 0; i < ehdr->e_shnum; i++) {
|
||||||
Elf64_Rela *relas = (void *)ehdr + sechdrs[i].sh_offset;
|
Elf_Rela *relas = (void *)ehdr + sechdrs[i].sh_offset;
|
||||||
int num_rela = sechdrs[i].sh_size / sizeof(Elf64_Rela);
|
int num_rela = sechdrs[i].sh_size / sizeof(Elf_Rela);
|
||||||
Elf64_Shdr *dst_sec = sechdrs + sechdrs[i].sh_info;
|
Elf_Shdr *dst_sec = sechdrs + sechdrs[i].sh_info;
|
||||||
|
|
||||||
if (sechdrs[i].sh_type != SHT_RELA)
|
if (sechdrs[i].sh_type != SHT_RELA)
|
||||||
continue;
|
continue;
|
||||||
|
@ -18,12 +18,15 @@
|
|||||||
#include <asm/ptrace.h>
|
#include <asm/ptrace.h>
|
||||||
#include <asm/syscall.h>
|
#include <asm/syscall.h>
|
||||||
#include <asm/thread_info.h>
|
#include <asm/thread_info.h>
|
||||||
|
#include <linux/audit.h>
|
||||||
#include <linux/ptrace.h>
|
#include <linux/ptrace.h>
|
||||||
#include <linux/elf.h>
|
#include <linux/elf.h>
|
||||||
#include <linux/regset.h>
|
#include <linux/regset.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/sched/task_stack.h>
|
#include <linux/sched/task_stack.h>
|
||||||
#include <linux/tracehook.h>
|
#include <linux/tracehook.h>
|
||||||
|
|
||||||
|
#define CREATE_TRACE_POINTS
|
||||||
#include <trace/events/syscalls.h>
|
#include <trace/events/syscalls.h>
|
||||||
|
|
||||||
enum riscv_regset {
|
enum riscv_regset {
|
||||||
@ -163,15 +166,19 @@ void do_syscall_trace_enter(struct pt_regs *regs)
|
|||||||
if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
|
if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
|
||||||
trace_sys_enter(regs, syscall_get_nr(current, regs));
|
trace_sys_enter(regs, syscall_get_nr(current, regs));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
audit_syscall_entry(regs->a7, regs->a0, regs->a1, regs->a2, regs->a3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void do_syscall_trace_exit(struct pt_regs *regs)
|
void do_syscall_trace_exit(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
|
audit_syscall_exit(regs);
|
||||||
|
|
||||||
if (test_thread_flag(TIF_SYSCALL_TRACE))
|
if (test_thread_flag(TIF_SYSCALL_TRACE))
|
||||||
tracehook_report_syscall_exit(regs, 0);
|
tracehook_report_syscall_exit(regs, 0);
|
||||||
|
|
||||||
#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
|
#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
|
||||||
if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
|
if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
|
||||||
trace_sys_exit(regs, regs->regs[0]);
|
trace_sys_exit(regs, regs_return_value(regs));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,14 @@ asmlinkage void __init setup_vm(void)
|
|||||||
|
|
||||||
void __init parse_dtb(unsigned int hartid, void *dtb)
|
void __init parse_dtb(unsigned int hartid, void *dtb)
|
||||||
{
|
{
|
||||||
early_init_dt_scan(__va(dtb));
|
if (!early_init_dt_scan(__va(dtb)))
|
||||||
|
return;
|
||||||
|
|
||||||
|
pr_err("No DTB passed to the kernel\n");
|
||||||
|
#ifdef CONFIG_CMDLINE_FORCE
|
||||||
|
strlcpy(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
|
||||||
|
pr_info("Forcing kernel command line to: %s\n", boot_command_line);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __init setup_bootmem(void)
|
static void __init setup_bootmem(void)
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user