mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
iio: adc: ad7173: add SPI offload support
Merge series from David Lechner <dlechner@baylibre.com>: Also there is a new dt-binding and driver for a special SPI offload trigger FPGA IP core that is used in this particular setup.
This commit is contained in:
commit
d2c0e95525
5
.mailmap
5
.mailmap
|
|
@ -223,6 +223,8 @@ Dmitry Safonov <0x7f454c46@gmail.com> <d.safonov@partner.samsung.com>
|
|||
Dmitry Safonov <0x7f454c46@gmail.com> <dsafonov@virtuozzo.com>
|
||||
Domen Puncer <domen@coderock.org>
|
||||
Douglas Gilbert <dougg@torque.net>
|
||||
Drew Fustini <fustini@kernel.org> <drew@pdp7.com>
|
||||
<duje@dujemihanovic.xyz> <duje.mihanovic@skole.hr>
|
||||
Ed L. Cashin <ecashin@coraid.com>
|
||||
Elliot Berman <quic_eberman@quicinc.com> <eberman@codeaurora.org>
|
||||
Enric Balletbo i Serra <eballetbo@kernel.org> <enric.balletbo@collabora.com>
|
||||
|
|
@ -830,3 +832,6 @@ Yosry Ahmed <yosry.ahmed@linux.dev> <yosryahmed@google.com>
|
|||
Yusuke Goda <goda.yusuke@renesas.com>
|
||||
Zack Rusin <zack.rusin@broadcom.com> <zackr@vmware.com>
|
||||
Zhu Yanjun <zyjzyj2000@gmail.com> <yanjunz@nvidia.com>
|
||||
Zijun Hu <zijun.hu@oss.qualcomm.com> <quic_zijuhu@quicinc.com>
|
||||
Zijun Hu <zijun.hu@oss.qualcomm.com> <zijuhu@codeaurora.org>
|
||||
Zijun Hu <zijun_hu@htc.com>
|
||||
|
|
|
|||
5
CREDITS
5
CREDITS
|
|
@ -2981,6 +2981,11 @@ S: 521 Pleasant Valley Road
|
|||
S: Potsdam, New York 13676
|
||||
S: USA
|
||||
|
||||
N: Shannon Nelson
|
||||
E: sln@onemain.com
|
||||
D: Worked on several network drivers including
|
||||
D: ixgbe, i40e, ionic, pds_core, pds_vdpa, pds_fwctl
|
||||
|
||||
N: Dave Neuer
|
||||
E: dave.neuer@pobox.com
|
||||
D: Helped implement support for Compaq's H31xx series iPAQs
|
||||
|
|
|
|||
|
|
@ -49,6 +49,12 @@ Description:
|
|||
(RO) Supported minimum scrub cycle duration in seconds
|
||||
by the memory scrubber.
|
||||
|
||||
Device-based scrub: returns the minimum scrub cycle
|
||||
supported by the memory device.
|
||||
|
||||
Region-based scrub: returns the max of minimum scrub cycles
|
||||
supported by individual memory devices that back the region.
|
||||
|
||||
What: /sys/bus/edac/devices/<dev-name>/scrubX/max_cycle_duration
|
||||
Date: March 2025
|
||||
KernelVersion: 6.15
|
||||
|
|
@ -57,6 +63,16 @@ Description:
|
|||
(RO) Supported maximum scrub cycle duration in seconds
|
||||
by the memory scrubber.
|
||||
|
||||
Device-based scrub: returns the maximum scrub cycle supported
|
||||
by the memory device.
|
||||
|
||||
Region-based scrub: returns the min of maximum scrub cycles
|
||||
supported by individual memory devices that back the region.
|
||||
|
||||
If the memory device does not provide maximum scrub cycle
|
||||
information, return the maximum supported value of the scrub
|
||||
cycle field.
|
||||
|
||||
What: /sys/bus/edac/devices/<dev-name>/scrubX/current_cycle_duration
|
||||
Date: March 2025
|
||||
KernelVersion: 6.15
|
||||
|
|
|
|||
|
|
@ -233,10 +233,16 @@ attempts in order to enforce the LRU property which have increasing impacts on
|
|||
other CPUs involved in the following operation attempts:
|
||||
|
||||
- Attempt to use CPU-local state to batch operations
|
||||
- Attempt to fetch free nodes from global lists
|
||||
- Attempt to fetch ``target_free`` free nodes from global lists
|
||||
- Attempt to pull any node from a global list and remove it from the hashmap
|
||||
- Attempt to pull any node from any CPU's list and remove it from the hashmap
|
||||
|
||||
The number of nodes to borrow from the global list in a batch, ``target_free``,
|
||||
depends on the size of the map. Larger batch size reduces lock contention, but
|
||||
may also exhaust the global structure. The value is computed at map init to
|
||||
avoid exhaustion, by limiting aggregate reservation by all CPUs to half the map
|
||||
size. With a minimum of a single element and maximum budget of 128 at a time.
|
||||
|
||||
This algorithm is described visually in the following diagram. See the
|
||||
description in commit 3a08c2fd7634 ("bpf: LRU List") for a full explanation of
|
||||
the corresponding operations:
|
||||
|
|
|
|||
|
|
@ -35,18 +35,18 @@ digraph {
|
|||
fn_bpf_lru_list_pop_free_to_local [shape=rectangle,fillcolor=2,
|
||||
label="Flush local pending,
|
||||
Rotate Global list, move
|
||||
LOCAL_FREE_TARGET
|
||||
target_free
|
||||
from global -> local"]
|
||||
// Also corresponds to:
|
||||
// fn__local_list_flush()
|
||||
// fn_bpf_lru_list_rotate()
|
||||
fn___bpf_lru_node_move_to_free[shape=diamond,fillcolor=2,
|
||||
label="Able to free\nLOCAL_FREE_TARGET\nnodes?"]
|
||||
label="Able to free\ntarget_free\nnodes?"]
|
||||
|
||||
fn___bpf_lru_list_shrink_inactive [shape=rectangle,fillcolor=3,
|
||||
label="Shrink inactive list
|
||||
up to remaining
|
||||
LOCAL_FREE_TARGET
|
||||
target_free
|
||||
(global LRU -> local)"]
|
||||
fn___bpf_lru_list_shrink [shape=diamond,fillcolor=2,
|
||||
label="> 0 entries in\nlocal free list?"]
|
||||
|
|
|
|||
|
|
@ -118,15 +118,11 @@ $defs:
|
|||
ti,lvds-vod-swing-clock-microvolt:
|
||||
description: LVDS diferential output voltage <min max> for clock
|
||||
lanes in microvolts.
|
||||
$ref: /schemas/types.yaml#/definitions/uint32-array
|
||||
minItems: 2
|
||||
maxItems: 2
|
||||
|
||||
ti,lvds-vod-swing-data-microvolt:
|
||||
description: LVDS diferential output voltage <min max> for data
|
||||
lanes in microvolts.
|
||||
$ref: /schemas/types.yaml#/definitions/uint32-array
|
||||
minItems: 2
|
||||
maxItems: 2
|
||||
|
||||
allOf:
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ allOf:
|
|||
- ns16550
|
||||
- ns16550a
|
||||
then:
|
||||
anyOf:
|
||||
oneOf:
|
||||
- required: [ clock-frequency ]
|
||||
- required: [ clocks ]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
Altera JTAG UART
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "ALTR,juart-1.0" <DEPRECATED>
|
||||
- compatible : should be "altr,juart-1.0"
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
Altera UART
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "ALTR,uart-1.0" <DEPRECATED>
|
||||
- compatible : should be "altr,uart-1.0"
|
||||
|
||||
Optional properties:
|
||||
- clock-frequency : frequency of the clock input to the UART
|
||||
19
Documentation/devicetree/bindings/serial/altr,juart-1.0.yaml
Normal file
19
Documentation/devicetree/bindings/serial/altr,juart-1.0.yaml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/serial/altr,juart-1.0.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Altera JTAG UART
|
||||
|
||||
maintainers:
|
||||
- Dinh Nguyen <dinguyen@kernel.org>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: altr,juart-1.0
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
||||
additionalProperties: false
|
||||
25
Documentation/devicetree/bindings/serial/altr,uart-1.0.yaml
Normal file
25
Documentation/devicetree/bindings/serial/altr,uart-1.0.yaml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/serial/altr,uart-1.0.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Altera UART
|
||||
|
||||
maintainers:
|
||||
- Dinh Nguyen <dinguyen@kernel.org>
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/serial/serial.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: altr,uart-1.0
|
||||
|
||||
clock-frequency:
|
||||
description: Frequency of the clock input to the UART.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas//soc/fsl/fsl,ls1028a-reset.yaml#
|
||||
$id: http://devicetree.org/schemas/soc/fsl/fsl,ls1028a-reset.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Freescale Layerscape Reset Registers Module
|
||||
|
|
|
|||
|
|
@ -0,0 +1,49 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
# Copyright (c) 2025 Analog Devices, Inc.
|
||||
# Copyright (c) 2025 BayLibre, SAS
|
||||
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/trigger-source/adi,util-sigma-delta-spi.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Analog Devices Util Sigma-Delta SPI IP Core
|
||||
|
||||
maintainers:
|
||||
- David Lechner <dlechner@baylibre.com>
|
||||
|
||||
description:
|
||||
The Util Sigma-Delta SPI is an FPGA IP core from Analog Devices that provides
|
||||
a SPI offload trigger from the RDY signal of the combined DOUT/RDY pin of
|
||||
the sigma-delta family of ADCs.
|
||||
https://analogdevicesinc.github.io/hdl/library/util_sigma_delta_spi/index.html
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: adi,util-sigma-delta-spi
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
'#trigger-source-cells':
|
||||
const: 0
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- '#trigger-source-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
trigger@40000 {
|
||||
reg = <0x40000 0x1000>;
|
||||
compatible = "adi,util-sigma-delta-spi";
|
||||
clocks = <&clk 0>;
|
||||
#trigger-source-cells = <0>;
|
||||
};
|
||||
|
|
@ -1249,3 +1249,12 @@ Using try_lookup_noperm() will require linux/namei.h to be included.
|
|||
|
||||
Calling conventions for ->d_automount() have changed; we should *not* grab
|
||||
an extra reference to new mount - it should be returned with refcount 1.
|
||||
|
||||
---
|
||||
|
||||
collect_mounts()/drop_collected_mounts()/iterate_mounts() are gone now.
|
||||
Replacement is collect_paths()/drop_collected_path(), with no special
|
||||
iterator needed. Instead of a cloned mount tree, the new interface returns
|
||||
an array of struct path, one for each mount collect_mounts() would've
|
||||
created. These struct path point to locations in the caller's namespace
|
||||
that would be roots of the cloned mounts.
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@ $schema: https://json-schema.org/draft-07/schema
|
|||
|
||||
# Common defines
|
||||
$defs:
|
||||
name:
|
||||
type: string
|
||||
pattern: ^[0-9a-z-]+$
|
||||
uint:
|
||||
type: integer
|
||||
minimum: 0
|
||||
|
|
@ -76,7 +79,7 @@ properties:
|
|||
additionalProperties: False
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
$ref: '#/$defs/name'
|
||||
header:
|
||||
description: For C-compatible languages, header which already defines this value.
|
||||
type: string
|
||||
|
|
@ -103,7 +106,7 @@ properties:
|
|||
additionalProperties: False
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
$ref: '#/$defs/name'
|
||||
value:
|
||||
type: integer
|
||||
doc:
|
||||
|
|
@ -132,7 +135,7 @@ properties:
|
|||
additionalProperties: False
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
$ref: '#/$defs/name'
|
||||
type:
|
||||
description: The netlink attribute type
|
||||
enum: [ u8, u16, u32, u64, s8, s16, s32, s64, string, binary ]
|
||||
|
|
@ -169,7 +172,7 @@ properties:
|
|||
name:
|
||||
description: |
|
||||
Name used when referring to this space in other definitions, not used outside of the spec.
|
||||
type: string
|
||||
$ref: '#/$defs/name'
|
||||
name-prefix:
|
||||
description: |
|
||||
Prefix for the C enum name of the attributes. Default family[name]-set[name]-a-
|
||||
|
|
@ -206,7 +209,7 @@ properties:
|
|||
additionalProperties: False
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
$ref: '#/$defs/name'
|
||||
type: &attr-type
|
||||
description: The netlink attribute type
|
||||
enum: [ unused, pad, flag, binary, bitfield32,
|
||||
|
|
@ -348,7 +351,7 @@ properties:
|
|||
properties:
|
||||
name:
|
||||
description: Name of the operation, also defining its C enum value in uAPI.
|
||||
type: string
|
||||
$ref: '#/$defs/name'
|
||||
doc:
|
||||
description: Documentation for the command.
|
||||
type: string
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@ $schema: https://json-schema.org/draft-07/schema
|
|||
|
||||
# Common defines
|
||||
$defs:
|
||||
name:
|
||||
type: string
|
||||
pattern: ^[0-9a-z-]+$
|
||||
uint:
|
||||
type: integer
|
||||
minimum: 0
|
||||
|
|
@ -29,7 +32,7 @@ additionalProperties: False
|
|||
properties:
|
||||
name:
|
||||
description: Name of the genetlink family.
|
||||
type: string
|
||||
$ref: '#/$defs/name'
|
||||
doc:
|
||||
type: string
|
||||
protocol:
|
||||
|
|
@ -48,7 +51,7 @@ properties:
|
|||
additionalProperties: False
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
$ref: '#/$defs/name'
|
||||
header:
|
||||
description: For C-compatible languages, header which already defines this value.
|
||||
type: string
|
||||
|
|
@ -75,7 +78,7 @@ properties:
|
|||
additionalProperties: False
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
$ref: '#/$defs/name'
|
||||
value:
|
||||
type: integer
|
||||
doc:
|
||||
|
|
@ -96,7 +99,7 @@ properties:
|
|||
name:
|
||||
description: |
|
||||
Name used when referring to this space in other definitions, not used outside of the spec.
|
||||
type: string
|
||||
$ref: '#/$defs/name'
|
||||
name-prefix:
|
||||
description: |
|
||||
Prefix for the C enum name of the attributes. Default family[name]-set[name]-a-
|
||||
|
|
@ -121,7 +124,7 @@ properties:
|
|||
additionalProperties: False
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
$ref: '#/$defs/name'
|
||||
type: &attr-type
|
||||
enum: [ unused, pad, flag, binary,
|
||||
uint, sint, u8, u16, u32, u64, s8, s16, s32, s64,
|
||||
|
|
@ -243,7 +246,7 @@ properties:
|
|||
properties:
|
||||
name:
|
||||
description: Name of the operation, also defining its C enum value in uAPI.
|
||||
type: string
|
||||
$ref: '#/$defs/name'
|
||||
doc:
|
||||
description: Documentation for the command.
|
||||
type: string
|
||||
|
|
@ -327,7 +330,7 @@ properties:
|
|||
name:
|
||||
description: |
|
||||
The name for the group, used to form the define and the value of the define.
|
||||
type: string
|
||||
$ref: '#/$defs/name'
|
||||
flags: *cmd_flags
|
||||
|
||||
kernel-family:
|
||||
|
|
|
|||
|
|
@ -6,6 +6,12 @@ $schema: https://json-schema.org/draft-07/schema
|
|||
|
||||
# Common defines
|
||||
$defs:
|
||||
name:
|
||||
type: string
|
||||
pattern: ^[0-9a-z-]+$
|
||||
name-cap:
|
||||
type: string
|
||||
pattern: ^[0-9a-zA-Z-]+$
|
||||
uint:
|
||||
type: integer
|
||||
minimum: 0
|
||||
|
|
@ -71,7 +77,7 @@ properties:
|
|||
additionalProperties: False
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
$ref: '#/$defs/name'
|
||||
header:
|
||||
description: For C-compatible languages, header which already defines this value.
|
||||
type: string
|
||||
|
|
@ -98,7 +104,7 @@ properties:
|
|||
additionalProperties: False
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
$ref: '#/$defs/name'
|
||||
value:
|
||||
type: integer
|
||||
doc:
|
||||
|
|
@ -124,7 +130,7 @@ properties:
|
|||
additionalProperties: False
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
$ref: '#/$defs/name-cap'
|
||||
type:
|
||||
description: |
|
||||
The netlink attribute type. Members of type 'binary' or 'pad'
|
||||
|
|
@ -183,7 +189,7 @@ properties:
|
|||
name:
|
||||
description: |
|
||||
Name used when referring to this space in other definitions, not used outside of the spec.
|
||||
type: string
|
||||
$ref: '#/$defs/name'
|
||||
name-prefix:
|
||||
description: |
|
||||
Prefix for the C enum name of the attributes. Default family[name]-set[name]-a-
|
||||
|
|
@ -220,7 +226,7 @@ properties:
|
|||
additionalProperties: False
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
$ref: '#/$defs/name'
|
||||
type: &attr-type
|
||||
description: The netlink attribute type
|
||||
enum: [ unused, pad, flag, binary, bitfield32,
|
||||
|
|
@ -408,7 +414,7 @@ properties:
|
|||
properties:
|
||||
name:
|
||||
description: Name of the operation, also defining its C enum value in uAPI.
|
||||
type: string
|
||||
$ref: '#/$defs/name'
|
||||
doc:
|
||||
description: Documentation for the command.
|
||||
type: string
|
||||
|
|
|
|||
|
|
@ -38,15 +38,15 @@ definitions:
|
|||
-
|
||||
name: dsa
|
||||
-
|
||||
name: pci_pf
|
||||
name: pci-pf
|
||||
-
|
||||
name: pci_vf
|
||||
name: pci-vf
|
||||
-
|
||||
name: virtual
|
||||
-
|
||||
name: unused
|
||||
-
|
||||
name: pci_sf
|
||||
name: pci-sf
|
||||
-
|
||||
type: enum
|
||||
name: port-fn-state
|
||||
|
|
@ -220,7 +220,7 @@ definitions:
|
|||
-
|
||||
name: flag
|
||||
-
|
||||
name: nul_string
|
||||
name: nul-string
|
||||
value: 10
|
||||
-
|
||||
name: binary
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ definitions:
|
|||
value: 10000
|
||||
-
|
||||
type: const
|
||||
name: pin-frequency-77_5-khz
|
||||
name: pin-frequency-77-5-khz
|
||||
value: 77500
|
||||
-
|
||||
type: const
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ definitions:
|
|||
name: started
|
||||
doc: The firmware flashing process has started.
|
||||
-
|
||||
name: in_progress
|
||||
name: in-progress
|
||||
doc: The firmware flashing process is in progress.
|
||||
-
|
||||
name: completed
|
||||
|
|
@ -1422,7 +1422,7 @@ attribute-sets:
|
|||
name: hkey
|
||||
type: binary
|
||||
-
|
||||
name: input_xfrm
|
||||
name: input-xfrm
|
||||
type: u32
|
||||
-
|
||||
name: start-context
|
||||
|
|
@ -2238,7 +2238,7 @@ operations:
|
|||
- hfunc
|
||||
- indir
|
||||
- hkey
|
||||
- input_xfrm
|
||||
- input-xfrm
|
||||
dump:
|
||||
request:
|
||||
attributes:
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ kernel-policy: global
|
|||
definitions:
|
||||
-
|
||||
type: enum
|
||||
name: encap_type
|
||||
name: encap-type
|
||||
name-prefix: fou-encap-
|
||||
enum-name:
|
||||
entries: [ unspec, direct, gue ]
|
||||
|
|
@ -43,26 +43,26 @@ attribute-sets:
|
|||
name: type
|
||||
type: u8
|
||||
-
|
||||
name: remcsum_nopartial
|
||||
name: remcsum-nopartial
|
||||
type: flag
|
||||
-
|
||||
name: local_v4
|
||||
name: local-v4
|
||||
type: u32
|
||||
-
|
||||
name: local_v6
|
||||
name: local-v6
|
||||
type: binary
|
||||
checks:
|
||||
min-len: 16
|
||||
-
|
||||
name: peer_v4
|
||||
name: peer-v4
|
||||
type: u32
|
||||
-
|
||||
name: peer_v6
|
||||
name: peer-v6
|
||||
type: binary
|
||||
checks:
|
||||
min-len: 16
|
||||
-
|
||||
name: peer_port
|
||||
name: peer-port
|
||||
type: u16
|
||||
byte-order: big-endian
|
||||
-
|
||||
|
|
@ -90,12 +90,12 @@ operations:
|
|||
- port
|
||||
- ipproto
|
||||
- type
|
||||
- remcsum_nopartial
|
||||
- local_v4
|
||||
- peer_v4
|
||||
- local_v6
|
||||
- peer_v6
|
||||
- peer_port
|
||||
- remcsum-nopartial
|
||||
- local-v4
|
||||
- peer-v4
|
||||
- local-v6
|
||||
- peer-v6
|
||||
- peer-port
|
||||
- ifindex
|
||||
|
||||
-
|
||||
|
|
@ -112,11 +112,11 @@ operations:
|
|||
- af
|
||||
- ifindex
|
||||
- port
|
||||
- peer_port
|
||||
- local_v4
|
||||
- peer_v4
|
||||
- local_v6
|
||||
- peer_v6
|
||||
- peer-port
|
||||
- local-v4
|
||||
- peer-v4
|
||||
- local-v6
|
||||
- peer-v6
|
||||
|
||||
-
|
||||
name: get
|
||||
|
|
|
|||
|
|
@ -57,21 +57,21 @@ definitions:
|
|||
doc: >-
|
||||
A new subflow has been established. 'error' should not be set.
|
||||
Attributes: token, family, loc_id, rem_id, saddr4 | saddr6, daddr4 |
|
||||
daddr6, sport, dport, backup, if_idx [, error].
|
||||
daddr6, sport, dport, backup, if-idx [, error].
|
||||
-
|
||||
name: sub-closed
|
||||
doc: >-
|
||||
A subflow has been closed. An error (copy of sk_err) could be set if an
|
||||
error has been detected for this subflow.
|
||||
Attributes: token, family, loc_id, rem_id, saddr4 | saddr6, daddr4 |
|
||||
daddr6, sport, dport, backup, if_idx [, error].
|
||||
daddr6, sport, dport, backup, if-idx [, error].
|
||||
-
|
||||
name: sub-priority
|
||||
value: 13
|
||||
doc: >-
|
||||
The priority of a subflow has changed. 'error' should not be set.
|
||||
Attributes: token, family, loc_id, rem_id, saddr4 | saddr6, daddr4 |
|
||||
daddr6, sport, dport, backup, if_idx [, error].
|
||||
daddr6, sport, dport, backup, if-idx [, error].
|
||||
-
|
||||
name: listener-created
|
||||
value: 15
|
||||
|
|
@ -255,7 +255,7 @@ attribute-sets:
|
|||
name: timeout
|
||||
type: u32
|
||||
-
|
||||
name: if_idx
|
||||
name: if-idx
|
||||
type: u32
|
||||
-
|
||||
name: reset-reason
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ attribute-sets:
|
|||
name: proc
|
||||
type: u32
|
||||
-
|
||||
name: service_time
|
||||
name: service-time
|
||||
type: s64
|
||||
-
|
||||
name: pad
|
||||
|
|
@ -139,7 +139,7 @@ operations:
|
|||
- prog
|
||||
- version
|
||||
- proc
|
||||
- service_time
|
||||
- service-time
|
||||
- saddr4
|
||||
- daddr4
|
||||
- saddr6
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ definitions:
|
|||
type: struct
|
||||
members:
|
||||
-
|
||||
name: nd_target
|
||||
name: nd-target
|
||||
type: binary
|
||||
len: 16
|
||||
byte-order: big-endian
|
||||
|
|
@ -258,12 +258,12 @@ definitions:
|
|||
type: struct
|
||||
members:
|
||||
-
|
||||
name: vlan_tpid
|
||||
name: vlan-tpid
|
||||
type: u16
|
||||
byte-order: big-endian
|
||||
doc: Tag protocol identifier (TPID) to push.
|
||||
-
|
||||
name: vlan_tci
|
||||
name: vlan-tci
|
||||
type: u16
|
||||
byte-order: big-endian
|
||||
doc: Tag control identifier (TCI) to push.
|
||||
|
|
|
|||
|
|
@ -603,7 +603,7 @@ definitions:
|
|||
name: optmask
|
||||
type: u32
|
||||
-
|
||||
name: if_stats_msg
|
||||
name: if-stats-msg
|
||||
type: struct
|
||||
members:
|
||||
-
|
||||
|
|
@ -2486,7 +2486,7 @@ operations:
|
|||
name: getstats
|
||||
doc: Get / dump link stats.
|
||||
attribute-set: stats-attrs
|
||||
fixed-header: if_stats_msg
|
||||
fixed-header: if-stats-msg
|
||||
do:
|
||||
request:
|
||||
value: 94
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ definitions:
|
|||
type: u8
|
||||
doc: log(P_max / (qth-max - qth-min))
|
||||
-
|
||||
name: Scell_log
|
||||
name: Scell-log
|
||||
type: u8
|
||||
doc: cell size for idle damping
|
||||
-
|
||||
|
|
@ -253,7 +253,7 @@ definitions:
|
|||
name: DPs
|
||||
type: u32
|
||||
-
|
||||
name: def_DP
|
||||
name: def-DP
|
||||
type: u32
|
||||
-
|
||||
name: grio
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ Admin Function driver
|
|||
As mentioned above RVU PF0 is called the admin function (AF), this driver
|
||||
supports resource provisioning and configuration of functional blocks.
|
||||
Doesn't handle any I/O. It sets up few basic stuff but most of the
|
||||
funcionality is achieved via configuration requests from PFs and VFs.
|
||||
functionality is achieved via configuration requests from PFs and VFs.
|
||||
|
||||
PF/VFs communicates with AF via a shared memory region (mailbox). Upon
|
||||
receiving requests AF does resource provisioning and other HW configuration.
|
||||
|
|
|
|||
55
MAINTAINERS
55
MAINTAINERS
|
|
@ -11155,7 +11155,8 @@ F: include/linux/platform_data/huawei-gaokun-ec.h
|
|||
|
||||
HUGETLB SUBSYSTEM
|
||||
M: Muchun Song <muchun.song@linux.dev>
|
||||
R: Oscar Salvador <osalvador@suse.de>
|
||||
M: Oscar Salvador <osalvador@suse.de>
|
||||
R: David Hildenbrand <david@redhat.com>
|
||||
L: linux-mm@kvack.org
|
||||
S: Maintained
|
||||
F: Documentation/ABI/testing/sysfs-kernel-mm-hugepages
|
||||
|
|
@ -11166,6 +11167,7 @@ F: fs/hugetlbfs/
|
|||
F: include/linux/hugetlb.h
|
||||
F: include/trace/events/hugetlbfs.h
|
||||
F: mm/hugetlb.c
|
||||
F: mm/hugetlb_cgroup.c
|
||||
F: mm/hugetlb_cma.c
|
||||
F: mm/hugetlb_cma.h
|
||||
F: mm/hugetlb_vmemmap.c
|
||||
|
|
@ -13345,6 +13347,7 @@ M: Alexander Graf <graf@amazon.com>
|
|||
M: Mike Rapoport <rppt@kernel.org>
|
||||
M: Changyuan Lyu <changyuanl@google.com>
|
||||
L: kexec@lists.infradead.org
|
||||
L: linux-mm@kvack.org
|
||||
S: Maintained
|
||||
F: Documentation/admin-guide/mm/kho.rst
|
||||
F: Documentation/core-api/kho/*
|
||||
|
|
@ -15673,11 +15676,16 @@ MEMBLOCK AND MEMORY MANAGEMENT INITIALIZATION
|
|||
M: Mike Rapoport <rppt@kernel.org>
|
||||
L: linux-mm@kvack.org
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git for-next
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git fixes
|
||||
F: Documentation/core-api/boot-time-mm.rst
|
||||
F: Documentation/core-api/kho/bindings/memblock/*
|
||||
F: include/linux/memblock.h
|
||||
F: mm/bootmem_info.c
|
||||
F: mm/memblock.c
|
||||
F: mm/memtest.c
|
||||
F: mm/mm_init.c
|
||||
F: mm/rodata_test.c
|
||||
F: tools/testing/memblock/
|
||||
|
||||
MEMORY ALLOCATION PROFILING
|
||||
|
|
@ -15732,7 +15740,6 @@ F: Documentation/admin-guide/mm/
|
|||
F: Documentation/mm/
|
||||
F: include/linux/gfp.h
|
||||
F: include/linux/gfp_types.h
|
||||
F: include/linux/memfd.h
|
||||
F: include/linux/memory_hotplug.h
|
||||
F: include/linux/memory-tiers.h
|
||||
F: include/linux/mempolicy.h
|
||||
|
|
@ -15792,6 +15799,10 @@ S: Maintained
|
|||
W: http://www.linux-mm.org
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
|
||||
F: mm/gup.c
|
||||
F: mm/gup_test.c
|
||||
F: mm/gup_test.h
|
||||
F: tools/testing/selftests/mm/gup_longterm.c
|
||||
F: tools/testing/selftests/mm/gup_test.c
|
||||
|
||||
MEMORY MANAGEMENT - KSM (Kernel Samepage Merging)
|
||||
M: Andrew Morton <akpm@linux-foundation.org>
|
||||
|
|
@ -15839,6 +15850,17 @@ F: mm/numa.c
|
|||
F: mm/numa_emulation.c
|
||||
F: mm/numa_memblks.c
|
||||
|
||||
MEMORY MANAGEMENT - OOM KILLER
|
||||
M: Michal Hocko <mhocko@suse.com>
|
||||
R: David Rientjes <rientjes@google.com>
|
||||
R: Shakeel Butt <shakeel.butt@linux.dev>
|
||||
L: linux-mm@kvack.org
|
||||
S: Maintained
|
||||
F: include/linux/oom.h
|
||||
F: include/trace/events/oom.h
|
||||
F: include/uapi/linux/oom.h
|
||||
F: mm/oom_kill.c
|
||||
|
||||
MEMORY MANAGEMENT - PAGE ALLOCATOR
|
||||
M: Andrew Morton <akpm@linux-foundation.org>
|
||||
M: Vlastimil Babka <vbabka@suse.cz>
|
||||
|
|
@ -15853,8 +15875,17 @@ F: include/linux/compaction.h
|
|||
F: include/linux/gfp.h
|
||||
F: include/linux/page-isolation.h
|
||||
F: mm/compaction.c
|
||||
F: mm/debug_page_alloc.c
|
||||
F: mm/fail_page_alloc.c
|
||||
F: mm/page_alloc.c
|
||||
F: mm/page_ext.c
|
||||
F: mm/page_frag_cache.c
|
||||
F: mm/page_isolation.c
|
||||
F: mm/page_owner.c
|
||||
F: mm/page_poison.c
|
||||
F: mm/page_reporting.c
|
||||
F: mm/show_mem.c
|
||||
F: mm/shuffle.c
|
||||
|
||||
MEMORY MANAGEMENT - RECLAIM
|
||||
M: Andrew Morton <akpm@linux-foundation.org>
|
||||
|
|
@ -15868,6 +15899,7 @@ L: linux-mm@kvack.org
|
|||
S: Maintained
|
||||
F: mm/pt_reclaim.c
|
||||
F: mm/vmscan.c
|
||||
F: mm/workingset.c
|
||||
|
||||
MEMORY MANAGEMENT - RMAP (REVERSE MAPPING)
|
||||
M: Andrew Morton <akpm@linux-foundation.org>
|
||||
|
|
@ -15880,6 +15912,7 @@ R: Harry Yoo <harry.yoo@oracle.com>
|
|||
L: linux-mm@kvack.org
|
||||
S: Maintained
|
||||
F: include/linux/rmap.h
|
||||
F: mm/page_vma_mapped.c
|
||||
F: mm/rmap.c
|
||||
|
||||
MEMORY MANAGEMENT - SECRETMEM
|
||||
|
|
@ -15912,9 +15945,9 @@ F: mm/swapfile.c
|
|||
MEMORY MANAGEMENT - THP (TRANSPARENT HUGE PAGE)
|
||||
M: Andrew Morton <akpm@linux-foundation.org>
|
||||
M: David Hildenbrand <david@redhat.com>
|
||||
M: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
|
||||
R: Zi Yan <ziy@nvidia.com>
|
||||
R: Baolin Wang <baolin.wang@linux.alibaba.com>
|
||||
R: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
|
||||
R: Liam R. Howlett <Liam.Howlett@oracle.com>
|
||||
R: Nico Pache <npache@redhat.com>
|
||||
R: Ryan Roberts <ryan.roberts@arm.com>
|
||||
|
|
@ -15972,11 +16005,14 @@ S: Maintained
|
|||
W: http://www.linux-mm.org
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
|
||||
F: include/trace/events/mmap.h
|
||||
F: mm/mincore.c
|
||||
F: mm/mlock.c
|
||||
F: mm/mmap.c
|
||||
F: mm/mprotect.c
|
||||
F: mm/mremap.c
|
||||
F: mm/mseal.c
|
||||
F: mm/msync.c
|
||||
F: mm/nommu.c
|
||||
F: mm/vma.c
|
||||
F: mm/vma.h
|
||||
F: mm/vma_exec.c
|
||||
|
|
@ -21374,7 +21410,7 @@ N: spacemit
|
|||
K: spacemit
|
||||
|
||||
RISC-V THEAD SoC SUPPORT
|
||||
M: Drew Fustini <drew@pdp7.com>
|
||||
M: Drew Fustini <fustini@kernel.org>
|
||||
M: Guo Ren <guoren@kernel.org>
|
||||
M: Fu Wei <wefu@redhat.com>
|
||||
L: linux-riscv@lists.infradead.org
|
||||
|
|
@ -23377,7 +23413,7 @@ F: include/linux/mtd/spi-nor.h
|
|||
|
||||
SPI OFFLOAD
|
||||
R: David Lechner <dlechner@baylibre.com>
|
||||
F: drivers/spi/spi-offload-trigger-pwm.c
|
||||
F: drivers/spi/spi-offload-trigger-*.c
|
||||
F: drivers/spi/spi-offload.c
|
||||
F: include/linux/spi/offload/
|
||||
K: spi_offload
|
||||
|
|
@ -24063,6 +24099,7 @@ M: Bin Du <bin.du@amd.com>
|
|||
L: linux-i2c@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/i2c/busses/i2c-designware-amdisp.c
|
||||
F: include/linux/soc/amd/isp4_misc.h
|
||||
|
||||
SYNOPSYS DESIGNWARE MMC/SD/SDIO DRIVER
|
||||
M: Jaehoon Chung <jh80.chung@samsung.com>
|
||||
|
|
@ -25027,8 +25064,11 @@ M: Hugh Dickins <hughd@google.com>
|
|||
R: Baolin Wang <baolin.wang@linux.alibaba.com>
|
||||
L: linux-mm@kvack.org
|
||||
S: Maintained
|
||||
F: include/linux/memfd.h
|
||||
F: include/linux/shmem_fs.h
|
||||
F: mm/memfd.c
|
||||
F: mm/shmem.c
|
||||
F: mm/shmem_quota.c
|
||||
|
||||
TOMOYO SECURITY MODULE
|
||||
M: Kentaro Takeda <takedakn@nttdata.co.jp>
|
||||
|
|
@ -25195,6 +25235,11 @@ W: https://github.com/srcres258/linux-doc
|
|||
T: git git://github.com/srcres258/linux-doc.git doc-zh-tw
|
||||
F: Documentation/translations/zh_TW/
|
||||
|
||||
TRIGGER SOURCE - ADI UTIL SIGMA DELTA SPI
|
||||
M: David Lechner <dlechner@baylibre.com>
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/trigger-source/adi,util-sigma-delta-spi.yaml
|
||||
|
||||
TRIGGER SOURCE - PWM
|
||||
M: David Lechner <dlechner@baylibre.com>
|
||||
S: Maintained
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -2,7 +2,7 @@
|
|||
VERSION = 6
|
||||
PATCHLEVEL = 16
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc3
|
||||
EXTRAVERSION = -rc4
|
||||
NAME = Baby Opossum Posse
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
|||
|
|
@ -18,12 +18,12 @@
|
|||
/*
|
||||
* This gives the physical RAM offset.
|
||||
*/
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
#ifndef PHYS_OFFSET
|
||||
#define PHYS_OFFSET _UL(0)
|
||||
#endif
|
||||
extern unsigned long vm_map_base;
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
#ifndef IO_BASE
|
||||
#define IO_BASE CSR_DMW0_BASE
|
||||
|
|
@ -66,7 +66,7 @@ extern unsigned long vm_map_base;
|
|||
#define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000)
|
||||
#endif
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
#ifdef __ASSEMBLER__
|
||||
#define _ATYPE_
|
||||
#define _ATYPE32_
|
||||
#define _ATYPE64_
|
||||
|
|
@ -85,7 +85,7 @@ extern unsigned long vm_map_base;
|
|||
/*
|
||||
* 32/64-bit LoongArch address spaces
|
||||
*/
|
||||
#ifdef __ASSEMBLY__
|
||||
#ifdef __ASSEMBLER__
|
||||
#define _ACAST32_
|
||||
#define _ACAST64_
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#ifndef _ASM_ALTERNATIVE_ASM_H
|
||||
#define _ASM_ALTERNATIVE_ASM_H
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
#ifdef __ASSEMBLER__
|
||||
|
||||
#include <asm/asm.h>
|
||||
|
||||
|
|
@ -77,6 +77,6 @@
|
|||
.previous
|
||||
.endm
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
#endif /* _ASM_ALTERNATIVE_ASM_H */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#ifndef _ASM_ALTERNATIVE_H
|
||||
#define _ASM_ALTERNATIVE_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/stddef.h>
|
||||
|
|
@ -106,6 +106,6 @@ extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end);
|
|||
#define alternative_2(oldinstr, newinstr1, feature1, newinstr2, feature2) \
|
||||
(asm volatile(ALTERNATIVE_2(oldinstr, newinstr1, feature1, newinstr2, feature2) ::: "memory"))
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
#endif /* _ASM_ALTERNATIVE_H */
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#define EX_TYPE_UACCESS_ERR_ZERO 2
|
||||
#define EX_TYPE_BPF 3
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
#ifdef __ASSEMBLER__
|
||||
|
||||
#define __ASM_EXTABLE_RAW(insn, fixup, type, data) \
|
||||
.pushsection __ex_table, "a"; \
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
__ASM_EXTABLE_RAW(\insn, \fixup, EX_TYPE_FIXUP, 0)
|
||||
.endm
|
||||
|
||||
#else /* __ASSEMBLY__ */
|
||||
#else /* __ASSEMBLER__ */
|
||||
|
||||
#include <linux/bits.h>
|
||||
#include <linux/stringify.h>
|
||||
|
|
@ -60,6 +60,6 @@
|
|||
#define _ASM_EXTABLE_UACCESS_ERR(insn, fixup, err) \
|
||||
_ASM_EXTABLE_UACCESS_ERR_ZERO(insn, fixup, err, zero)
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
#endif /* __ASM_ASM_EXTABLE_H */
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@
|
|||
#define LONG_SRA srai.w
|
||||
#define LONG_SRAV sra.w
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
#ifdef __ASSEMBLER__
|
||||
#define LONG .word
|
||||
#endif
|
||||
#define LONGSIZE 4
|
||||
|
|
@ -131,7 +131,7 @@
|
|||
#define LONG_SRA srai.d
|
||||
#define LONG_SRAV sra.d
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
#ifdef __ASSEMBLER__
|
||||
#define LONG .dword
|
||||
#endif
|
||||
#define LONGSIZE 8
|
||||
|
|
@ -158,7 +158,7 @@
|
|||
|
||||
#define PTR_SCALESHIFT 2
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
#ifdef __ASSEMBLER__
|
||||
#define PTR .word
|
||||
#endif
|
||||
#define PTRSIZE 4
|
||||
|
|
@ -181,7 +181,7 @@
|
|||
|
||||
#define PTR_SCALESHIFT 3
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
#ifdef __ASSEMBLER__
|
||||
#define PTR .dword
|
||||
#endif
|
||||
#define PTRSIZE 8
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
#define PRID_PRODUCT_MASK 0x0fff
|
||||
|
||||
#if !defined(__ASSEMBLY__)
|
||||
#if !defined(__ASSEMBLER__)
|
||||
|
||||
enum cpu_type_enum {
|
||||
CPU_UNKNOWN,
|
||||
|
|
@ -55,7 +55,7 @@ enum cpu_type_enum {
|
|||
CPU_LAST
|
||||
};
|
||||
|
||||
#endif /* !__ASSEMBLY */
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
/*
|
||||
* ISA Level encodings
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#ifndef CONFIG_DYNAMIC_FTRACE
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ __arch_ftrace_set_direct_caller(struct pt_regs *regs, unsigned long addr)
|
|||
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
#endif /* CONFIG_FUNCTION_TRACER */
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#ifndef __ASM_GPR_NUM_H
|
||||
#define __ASM_GPR_NUM_H
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
#ifdef __ASSEMBLER__
|
||||
|
||||
.equ .L__gpr_num_zero, 0
|
||||
.irp num,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
.equ .L__gpr_num_$s\num, 23 + \num
|
||||
.endr
|
||||
|
||||
#else /* __ASSEMBLY__ */
|
||||
#else /* __ASSEMBLER__ */
|
||||
|
||||
#define __DEFINE_ASM_GPR_NUMS \
|
||||
" .equ .L__gpr_num_zero, 0\n" \
|
||||
|
|
@ -47,6 +47,6 @@
|
|||
" .equ .L__gpr_num_$s\\num, 23 + \\num\n" \
|
||||
" .endr\n" \
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
#endif /* __ASM_GPR_NUM_H */
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#ifndef _ASM_IRQFLAGS_H
|
||||
#define _ASM_IRQFLAGS_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/stringify.h>
|
||||
|
|
@ -80,6 +80,6 @@ static inline int arch_irqs_disabled(void)
|
|||
return arch_irqs_disabled_flags(arch_local_save_flags());
|
||||
}
|
||||
|
||||
#endif /* #ifndef __ASSEMBLY__ */
|
||||
#endif /* #ifndef __ASSEMBLER__ */
|
||||
|
||||
#endif /* _ASM_IRQFLAGS_H */
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef __ASM_JUMP_LABEL_H
|
||||
#define __ASM_JUMP_LABEL_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
|
|
@ -50,5 +50,5 @@ static __always_inline bool arch_static_branch_jump(struct static_key * const ke
|
|||
return true;
|
||||
}
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
#endif /* __ASM_JUMP_LABEL_H */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#ifndef __ASM_KASAN_H
|
||||
#define __ASM_KASAN_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/mmzone.h>
|
||||
|
|
|
|||
|
|
@ -9,15 +9,15 @@
|
|||
#include <linux/linkage.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
#include <larchintrin.h>
|
||||
|
||||
/* CPUCFG */
|
||||
#define read_cpucfg(reg) __cpucfg(reg)
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
#ifdef __ASSEMBLER__
|
||||
|
||||
/* LoongArch Registers */
|
||||
#define REG_ZERO 0x0
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
#define REG_S7 0x1e
|
||||
#define REG_S8 0x1f
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
/* Bit fields for CPUCFG registers */
|
||||
#define LOONGARCH_CPUCFG0 0x0
|
||||
|
|
@ -171,7 +171,7 @@
|
|||
* SW emulation for KVM hypervirsor, see arch/loongarch/include/uapi/asm/kvm_para.h
|
||||
*/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
/* CSR */
|
||||
#define csr_read32(reg) __csrrd_w(reg)
|
||||
|
|
@ -187,7 +187,7 @@
|
|||
#define iocsr_write32(val, reg) __iocsrwr_w(val, reg)
|
||||
#define iocsr_write64(val, reg) __iocsrwr_d(val, reg)
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
/* CSR register number */
|
||||
|
||||
|
|
@ -1195,7 +1195,7 @@
|
|||
#define LOONGARCH_IOCSR_EXTIOI_ROUTE_BASE 0x1c00
|
||||
#define IOCSR_EXTIOI_VECTOR_NUM 256
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
static __always_inline u64 drdtime(void)
|
||||
{
|
||||
|
|
@ -1357,7 +1357,7 @@ __BUILD_CSR_OP(tlbidx)
|
|||
#define clear_csr_estat(val) \
|
||||
csr_xchg32(~(val), val, LOONGARCH_CSR_ESTAT)
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
/* Generic EntryLo bit definitions */
|
||||
#define ENTRYLO_V (_ULCAST_(1) << 0)
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
#define ORC_TYPE_REGS 3
|
||||
#define ORC_TYPE_REGS_PARTIAL 4
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
/*
|
||||
* This struct is more or less a vastly simplified version of the DWARF Call
|
||||
* Frame Information standard. It contains only the necessary parts of DWARF
|
||||
|
|
@ -53,6 +53,6 @@ struct orc_entry {
|
|||
unsigned int type:3;
|
||||
unsigned int signal:1;
|
||||
};
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
#endif /* _ORC_TYPES_H */
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#define HPAGE_MASK (~(HPAGE_SIZE - 1))
|
||||
#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/pfn.h>
|
||||
|
|
@ -110,6 +110,6 @@ extern int __virt_addr_valid(volatile void *kaddr);
|
|||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
#endif /* _ASM_PAGE_H */
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@
|
|||
#define PAGE_KERNEL_WUC __pgprot(_PAGE_PRESENT | __READABLE | __WRITEABLE | \
|
||||
_PAGE_GLOBAL | _PAGE_KERN | _CACHE_WUC)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#define _PAGE_IOREMAP pgprot_val(PAGE_KERNEL_SUC)
|
||||
|
||||
|
|
@ -127,6 +127,6 @@ static inline pgprot_t pgprot_writecombine(pgprot_t _prot)
|
|||
return __pgprot(prot);
|
||||
}
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
#endif /* _ASM_PGTABLE_BITS_H */
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
|
||||
#define USER_PTRS_PER_PGD ((TASK_SIZE64 / PGDIR_SIZE)?(TASK_SIZE64 / PGDIR_SIZE):1)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#include <linux/mm_types.h>
|
||||
#include <linux/mmzone.h>
|
||||
|
|
@ -618,6 +618,6 @@ static inline long pmd_protnone(pmd_t pmd)
|
|||
#define HAVE_ARCH_UNMAPPED_AREA
|
||||
#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
#endif /* _ASM_PGTABLE_H */
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#define Pref_Load 0
|
||||
#define Pref_Store 8
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
#ifdef __ASSEMBLER__
|
||||
|
||||
.macro __pref hint addr
|
||||
#ifdef CONFIG_CPU_HAS_PREFETCH
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ int loongson_cpu_disable(void);
|
|||
void loongson_cpu_die(unsigned int cpu);
|
||||
#endif
|
||||
|
||||
static inline void plat_smp_setup(void)
|
||||
static inline void __init plat_smp_setup(void)
|
||||
{
|
||||
loongson_smp_setup();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#include <asm/processor.h>
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ static inline struct thread_info *current_thread_info(void)
|
|||
|
||||
register unsigned long current_stack_pointer __asm__("$sp");
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
/* thread information allocation */
|
||||
#define THREAD_SIZE SZ_16K
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#include <asm-generic/int-ll64.h>
|
||||
#include <uapi/asm/types.h>
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
#ifdef __ASSEMBLER__
|
||||
#define _ULCAST_
|
||||
#define _U64CAST_
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include <linux/objtool.h>
|
||||
#include <asm/orc_types.h>
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
#ifdef __ASSEMBLER__
|
||||
|
||||
.macro UNWIND_HINT_UNDEFINED
|
||||
UNWIND_HINT type=UNWIND_HINT_TYPE_UNDEFINED
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
UNWIND_HINT sp_reg=ORC_REG_SP type=UNWIND_HINT_TYPE_CALL
|
||||
.endm
|
||||
|
||||
#else /* !__ASSEMBLY__ */
|
||||
#else /* !__ASSEMBLER__ */
|
||||
|
||||
#define UNWIND_HINT_SAVE \
|
||||
UNWIND_HINT(UNWIND_HINT_TYPE_SAVE, 0, 0, 0)
|
||||
|
|
@ -31,6 +31,6 @@
|
|||
#define UNWIND_HINT_RESTORE \
|
||||
UNWIND_HINT(UNWIND_HINT_TYPE_RESTORE, 0, 0, 0)
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
#endif /* _ASM_LOONGARCH_UNWIND_HINTS_H */
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef _VDSO_ARCH_DATA_H
|
||||
#define _VDSO_ARCH_DATA_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#include <asm/asm.h>
|
||||
#include <asm/vdso.h>
|
||||
|
|
@ -20,6 +20,6 @@ struct vdso_arch_data {
|
|||
struct vdso_pcpu_data pdata[NR_CPUS];
|
||||
};
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#ifndef __ASM_VDSO_GETRANDOM_H
|
||||
#define __ASM_VDSO_GETRANDOM_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#include <asm/unistd.h>
|
||||
#include <asm/vdso/vdso.h>
|
||||
|
|
@ -28,6 +28,6 @@ static __always_inline ssize_t getrandom_syscall(void *_buffer, size_t _len, uns
|
|||
return ret;
|
||||
}
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
#endif /* __ASM_VDSO_GETRANDOM_H */
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef __ASM_VDSO_GETTIMEOFDAY_H
|
||||
#define __ASM_VDSO_GETTIMEOFDAY_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#include <asm/unistd.h>
|
||||
#include <asm/vdso/vdso.h>
|
||||
|
|
@ -89,6 +89,6 @@ static inline bool loongarch_vdso_hres_capable(void)
|
|||
}
|
||||
#define __arch_vdso_hres_capable loongarch_vdso_hres_capable
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
#endif /* __ASM_VDSO_GETTIMEOFDAY_H */
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
#ifndef __ASM_VDSO_PROCESSOR_H
|
||||
#define __ASM_VDSO_PROCESSOR_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#define cpu_relax() barrier()
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
#endif /* __ASM_VDSO_PROCESSOR_H */
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef _ASM_VDSO_VDSO_H
|
||||
#define _ASM_VDSO_VDSO_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#include <asm/asm.h>
|
||||
#include <asm/page.h>
|
||||
|
|
@ -16,6 +16,6 @@
|
|||
|
||||
#define VVAR_SIZE (VDSO_NR_PAGES << PAGE_SHIFT)
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
#ifndef __ASM_VDSO_VSYSCALL_H
|
||||
#define __ASM_VDSO_VSYSCALL_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#include <vdso/datapage.h>
|
||||
|
||||
/* The asm-generic header needs to be included after the definitions above */
|
||||
#include <asm-generic/vdso/vsyscall.h>
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
#endif /* __ASM_VDSO_VSYSCALL_H */
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/efi-bgrt.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/memblock.h>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
#include <linux/export.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/module.h>
|
||||
#include <asm/alternative.h>
|
||||
|
|
|
|||
|
|
@ -144,6 +144,18 @@ void __init efi_init(void)
|
|||
if (efi_memmap_init_early(&data) < 0)
|
||||
panic("Unable to map EFI memory map.\n");
|
||||
|
||||
/*
|
||||
* Reserve the physical memory region occupied by the EFI
|
||||
* memory map table (header + descriptors). This is crucial
|
||||
* for kdump, as the kdump kernel relies on this original
|
||||
* memmap passed by the bootloader. Without reservation,
|
||||
* this region could be overwritten by the primary kernel.
|
||||
* Also, set the EFI_PRESERVE_BS_REGIONS flag to indicate that
|
||||
* critical boot services code/data regions like this are preserved.
|
||||
*/
|
||||
memblock_reserve((phys_addr_t)boot_memmap, sizeof(*tbl) + data.size);
|
||||
set_bit(EFI_PRESERVE_BS_REGIONS, &efi.flags);
|
||||
|
||||
early_memunmap(tbl, sizeof(*tbl));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include <linux/binfmts.h>
|
||||
#include <linux/elf.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#include <asm/cpu-features.h>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/init.h>
|
||||
#include <asm/fpu.h>
|
||||
#include <asm/smp.h>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/export.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irq_work.h>
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ static int constant_timer_next_event(unsigned long delta, struct clock_event_dev
|
|||
return 0;
|
||||
}
|
||||
|
||||
static unsigned long __init get_loops_per_jiffy(void)
|
||||
static unsigned long get_loops_per_jiffy(void)
|
||||
{
|
||||
unsigned long lpj = (unsigned long)const_clock_freq;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/kexec.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/extable.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/sched/mm.h>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2022 Loongson Technology Corporation Limited
|
||||
*/
|
||||
#include <asm/unwind.h>
|
||||
#include <linux/export.h>
|
||||
|
||||
unsigned long unwind_get_return_address(struct unwind_state *state)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
#include <linux/objtool.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/objtool.h>
|
||||
#include <linux/sort.h>
|
||||
#include <asm/exception.h>
|
||||
#include <asm/orc_header.h>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2022 Loongson Technology Corporation Limited
|
||||
*/
|
||||
#include <linux/cpumask.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/ftrace.h>
|
||||
#include <linux/kallsyms.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
|
||||
static void eiointc_set_sw_coreisr(struct loongarch_eiointc *s)
|
||||
{
|
||||
int ipnum, cpu, irq_index, irq_mask, irq;
|
||||
int ipnum, cpu, cpuid, irq_index, irq_mask, irq;
|
||||
struct kvm_vcpu *vcpu;
|
||||
|
||||
for (irq = 0; irq < EIOINTC_IRQS; irq++) {
|
||||
ipnum = s->ipmap.reg_u8[irq / 32];
|
||||
|
|
@ -20,7 +21,12 @@ static void eiointc_set_sw_coreisr(struct loongarch_eiointc *s)
|
|||
irq_index = irq / 32;
|
||||
irq_mask = BIT(irq & 0x1f);
|
||||
|
||||
cpu = s->coremap.reg_u8[irq];
|
||||
cpuid = s->coremap.reg_u8[irq];
|
||||
vcpu = kvm_get_vcpu_by_cpuid(s->kvm, cpuid);
|
||||
if (!vcpu)
|
||||
continue;
|
||||
|
||||
cpu = vcpu->vcpu_id;
|
||||
if (!!(s->coreisr.reg_u32[cpu][irq_index] & irq_mask))
|
||||
set_bit(irq, s->sw_coreisr[cpu][ipnum]);
|
||||
else
|
||||
|
|
@ -66,20 +72,25 @@ static void eiointc_update_irq(struct loongarch_eiointc *s, int irq, int level)
|
|||
}
|
||||
|
||||
static inline void eiointc_update_sw_coremap(struct loongarch_eiointc *s,
|
||||
int irq, void *pvalue, u32 len, bool notify)
|
||||
int irq, u64 val, u32 len, bool notify)
|
||||
{
|
||||
int i, cpu;
|
||||
u64 val = *(u64 *)pvalue;
|
||||
int i, cpu, cpuid;
|
||||
struct kvm_vcpu *vcpu;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
cpu = val & 0xff;
|
||||
cpuid = val & 0xff;
|
||||
val = val >> 8;
|
||||
|
||||
if (!(s->status & BIT(EIOINTC_ENABLE_CPU_ENCODE))) {
|
||||
cpu = ffs(cpu) - 1;
|
||||
cpu = (cpu >= 4) ? 0 : cpu;
|
||||
cpuid = ffs(cpuid) - 1;
|
||||
cpuid = (cpuid >= 4) ? 0 : cpuid;
|
||||
}
|
||||
|
||||
vcpu = kvm_get_vcpu_by_cpuid(s->kvm, cpuid);
|
||||
if (!vcpu)
|
||||
continue;
|
||||
|
||||
cpu = vcpu->vcpu_id;
|
||||
if (s->sw_coremap[irq + i] == cpu)
|
||||
continue;
|
||||
|
||||
|
|
@ -305,6 +316,11 @@ static int kvm_eiointc_read(struct kvm_vcpu *vcpu,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (addr & (len - 1)) {
|
||||
kvm_err("%s: eiointc not aligned addr %llx len %d\n", __func__, addr, len);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
vcpu->kvm->stat.eiointc_read_exits++;
|
||||
spin_lock_irqsave(&eiointc->lock, flags);
|
||||
switch (len) {
|
||||
|
|
@ -398,7 +414,7 @@ static int loongarch_eiointc_writeb(struct kvm_vcpu *vcpu,
|
|||
irq = offset - EIOINTC_COREMAP_START;
|
||||
index = irq;
|
||||
s->coremap.reg_u8[index] = data;
|
||||
eiointc_update_sw_coremap(s, irq, (void *)&data, sizeof(data), true);
|
||||
eiointc_update_sw_coremap(s, irq, data, sizeof(data), true);
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
|
|
@ -436,17 +452,16 @@ static int loongarch_eiointc_writew(struct kvm_vcpu *vcpu,
|
|||
break;
|
||||
case EIOINTC_ENABLE_START ... EIOINTC_ENABLE_END:
|
||||
index = (offset - EIOINTC_ENABLE_START) >> 1;
|
||||
old_data = s->enable.reg_u32[index];
|
||||
old_data = s->enable.reg_u16[index];
|
||||
s->enable.reg_u16[index] = data;
|
||||
/*
|
||||
* 1: enable irq.
|
||||
* update irq when isr is set.
|
||||
*/
|
||||
data = s->enable.reg_u16[index] & ~old_data & s->isr.reg_u16[index];
|
||||
index = index << 1;
|
||||
for (i = 0; i < sizeof(data); i++) {
|
||||
u8 mask = (data >> (i * 8)) & 0xff;
|
||||
eiointc_enable_irq(vcpu, s, index + i, mask, 1);
|
||||
eiointc_enable_irq(vcpu, s, index * 2 + i, mask, 1);
|
||||
}
|
||||
/*
|
||||
* 0: disable irq.
|
||||
|
|
@ -455,7 +470,7 @@ static int loongarch_eiointc_writew(struct kvm_vcpu *vcpu,
|
|||
data = ~s->enable.reg_u16[index] & old_data & s->isr.reg_u16[index];
|
||||
for (i = 0; i < sizeof(data); i++) {
|
||||
u8 mask = (data >> (i * 8)) & 0xff;
|
||||
eiointc_enable_irq(vcpu, s, index, mask, 0);
|
||||
eiointc_enable_irq(vcpu, s, index * 2 + i, mask, 0);
|
||||
}
|
||||
break;
|
||||
case EIOINTC_BOUNCE_START ... EIOINTC_BOUNCE_END:
|
||||
|
|
@ -484,7 +499,7 @@ static int loongarch_eiointc_writew(struct kvm_vcpu *vcpu,
|
|||
irq = offset - EIOINTC_COREMAP_START;
|
||||
index = irq >> 1;
|
||||
s->coremap.reg_u16[index] = data;
|
||||
eiointc_update_sw_coremap(s, irq, (void *)&data, sizeof(data), true);
|
||||
eiointc_update_sw_coremap(s, irq, data, sizeof(data), true);
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
|
|
@ -529,10 +544,9 @@ static int loongarch_eiointc_writel(struct kvm_vcpu *vcpu,
|
|||
* update irq when isr is set.
|
||||
*/
|
||||
data = s->enable.reg_u32[index] & ~old_data & s->isr.reg_u32[index];
|
||||
index = index << 2;
|
||||
for (i = 0; i < sizeof(data); i++) {
|
||||
u8 mask = (data >> (i * 8)) & 0xff;
|
||||
eiointc_enable_irq(vcpu, s, index + i, mask, 1);
|
||||
eiointc_enable_irq(vcpu, s, index * 4 + i, mask, 1);
|
||||
}
|
||||
/*
|
||||
* 0: disable irq.
|
||||
|
|
@ -541,7 +555,7 @@ static int loongarch_eiointc_writel(struct kvm_vcpu *vcpu,
|
|||
data = ~s->enable.reg_u32[index] & old_data & s->isr.reg_u32[index];
|
||||
for (i = 0; i < sizeof(data); i++) {
|
||||
u8 mask = (data >> (i * 8)) & 0xff;
|
||||
eiointc_enable_irq(vcpu, s, index, mask, 0);
|
||||
eiointc_enable_irq(vcpu, s, index * 4 + i, mask, 0);
|
||||
}
|
||||
break;
|
||||
case EIOINTC_BOUNCE_START ... EIOINTC_BOUNCE_END:
|
||||
|
|
@ -570,7 +584,7 @@ static int loongarch_eiointc_writel(struct kvm_vcpu *vcpu,
|
|||
irq = offset - EIOINTC_COREMAP_START;
|
||||
index = irq >> 2;
|
||||
s->coremap.reg_u32[index] = data;
|
||||
eiointc_update_sw_coremap(s, irq, (void *)&data, sizeof(data), true);
|
||||
eiointc_update_sw_coremap(s, irq, data, sizeof(data), true);
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
|
|
@ -615,10 +629,9 @@ static int loongarch_eiointc_writeq(struct kvm_vcpu *vcpu,
|
|||
* update irq when isr is set.
|
||||
*/
|
||||
data = s->enable.reg_u64[index] & ~old_data & s->isr.reg_u64[index];
|
||||
index = index << 3;
|
||||
for (i = 0; i < sizeof(data); i++) {
|
||||
u8 mask = (data >> (i * 8)) & 0xff;
|
||||
eiointc_enable_irq(vcpu, s, index + i, mask, 1);
|
||||
eiointc_enable_irq(vcpu, s, index * 8 + i, mask, 1);
|
||||
}
|
||||
/*
|
||||
* 0: disable irq.
|
||||
|
|
@ -627,7 +640,7 @@ static int loongarch_eiointc_writeq(struct kvm_vcpu *vcpu,
|
|||
data = ~s->enable.reg_u64[index] & old_data & s->isr.reg_u64[index];
|
||||
for (i = 0; i < sizeof(data); i++) {
|
||||
u8 mask = (data >> (i * 8)) & 0xff;
|
||||
eiointc_enable_irq(vcpu, s, index, mask, 0);
|
||||
eiointc_enable_irq(vcpu, s, index * 8 + i, mask, 0);
|
||||
}
|
||||
break;
|
||||
case EIOINTC_BOUNCE_START ... EIOINTC_BOUNCE_END:
|
||||
|
|
@ -656,7 +669,7 @@ static int loongarch_eiointc_writeq(struct kvm_vcpu *vcpu,
|
|||
irq = offset - EIOINTC_COREMAP_START;
|
||||
index = irq >> 3;
|
||||
s->coremap.reg_u64[index] = data;
|
||||
eiointc_update_sw_coremap(s, irq, (void *)&data, sizeof(data), true);
|
||||
eiointc_update_sw_coremap(s, irq, data, sizeof(data), true);
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
|
|
@ -679,6 +692,11 @@ static int kvm_eiointc_write(struct kvm_vcpu *vcpu,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (addr & (len - 1)) {
|
||||
kvm_err("%s: eiointc not aligned addr %llx len %d\n", __func__, addr, len);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
vcpu->kvm->stat.eiointc_write_exits++;
|
||||
spin_lock_irqsave(&eiointc->lock, flags);
|
||||
switch (len) {
|
||||
|
|
@ -787,7 +805,7 @@ static int kvm_eiointc_ctrl_access(struct kvm_device *dev,
|
|||
int ret = 0;
|
||||
unsigned long flags;
|
||||
unsigned long type = (unsigned long)attr->attr;
|
||||
u32 i, start_irq;
|
||||
u32 i, start_irq, val;
|
||||
void __user *data;
|
||||
struct loongarch_eiointc *s = dev->kvm->arch.eiointc;
|
||||
|
||||
|
|
@ -795,8 +813,14 @@ static int kvm_eiointc_ctrl_access(struct kvm_device *dev,
|
|||
spin_lock_irqsave(&s->lock, flags);
|
||||
switch (type) {
|
||||
case KVM_DEV_LOONGARCH_EXTIOI_CTRL_INIT_NUM_CPU:
|
||||
if (copy_from_user(&s->num_cpu, data, 4))
|
||||
if (copy_from_user(&val, data, 4))
|
||||
ret = -EFAULT;
|
||||
else {
|
||||
if (val >= EIOINTC_ROUTE_MAX_VCPUS)
|
||||
ret = -EINVAL;
|
||||
else
|
||||
s->num_cpu = val;
|
||||
}
|
||||
break;
|
||||
case KVM_DEV_LOONGARCH_EXTIOI_CTRL_INIT_FEATURE:
|
||||
if (copy_from_user(&s->features, data, 4))
|
||||
|
|
@ -809,7 +833,7 @@ static int kvm_eiointc_ctrl_access(struct kvm_device *dev,
|
|||
for (i = 0; i < (EIOINTC_IRQS / 4); i++) {
|
||||
start_irq = i * 4;
|
||||
eiointc_update_sw_coremap(s, start_irq,
|
||||
(void *)&s->coremap.reg_u32[i], sizeof(u32), false);
|
||||
s->coremap.reg_u32[i], sizeof(u32), false);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
@ -824,7 +848,7 @@ static int kvm_eiointc_regs_access(struct kvm_device *dev,
|
|||
struct kvm_device_attr *attr,
|
||||
bool is_write)
|
||||
{
|
||||
int addr, cpuid, offset, ret = 0;
|
||||
int addr, cpu, offset, ret = 0;
|
||||
unsigned long flags;
|
||||
void *p = NULL;
|
||||
void __user *data;
|
||||
|
|
@ -832,7 +856,7 @@ static int kvm_eiointc_regs_access(struct kvm_device *dev,
|
|||
|
||||
s = dev->kvm->arch.eiointc;
|
||||
addr = attr->attr;
|
||||
cpuid = addr >> 16;
|
||||
cpu = addr >> 16;
|
||||
addr &= 0xffff;
|
||||
data = (void __user *)attr->addr;
|
||||
switch (addr) {
|
||||
|
|
@ -857,8 +881,11 @@ static int kvm_eiointc_regs_access(struct kvm_device *dev,
|
|||
p = &s->isr.reg_u32[offset];
|
||||
break;
|
||||
case EIOINTC_COREISR_START ... EIOINTC_COREISR_END:
|
||||
if (cpu >= s->num_cpu)
|
||||
return -EINVAL;
|
||||
|
||||
offset = (addr - EIOINTC_COREISR_START) / 4;
|
||||
p = &s->coreisr.reg_u32[cpuid][offset];
|
||||
p = &s->coreisr.reg_u32[cpu][offset];
|
||||
break;
|
||||
case EIOINTC_COREMAP_START ... EIOINTC_COREMAP_END:
|
||||
offset = (addr - EIOINTC_COREMAP_START) / 4;
|
||||
|
|
@ -899,9 +926,15 @@ static int kvm_eiointc_sw_status_access(struct kvm_device *dev,
|
|||
data = (void __user *)attr->addr;
|
||||
switch (addr) {
|
||||
case KVM_DEV_LOONGARCH_EXTIOI_SW_STATUS_NUM_CPU:
|
||||
if (is_write)
|
||||
return ret;
|
||||
|
||||
p = &s->num_cpu;
|
||||
break;
|
||||
case KVM_DEV_LOONGARCH_EXTIOI_SW_STATUS_FEATURE:
|
||||
if (is_write)
|
||||
return ret;
|
||||
|
||||
p = &s->features;
|
||||
break;
|
||||
case KVM_DEV_LOONGARCH_EXTIOI_SW_STATUS_STATE:
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include <asm/cpu-features.h>
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/unaligned.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
// Copyright (C) 2019-2020 Arm Ltd.
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/kasan-checks.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -16,12 +16,12 @@ void __init early_iounmap(void __iomem *addr, unsigned long size)
|
|||
|
||||
}
|
||||
|
||||
void *early_memremap_ro(resource_size_t phys_addr, unsigned long size)
|
||||
void * __init early_memremap_ro(resource_size_t phys_addr, unsigned long size)
|
||||
{
|
||||
return early_memremap(phys_addr, size);
|
||||
}
|
||||
|
||||
void *early_memremap_prot(resource_size_t phys_addr, unsigned long size,
|
||||
void * __init early_memremap_prot(resource_size_t phys_addr, unsigned long size,
|
||||
unsigned long prot_val)
|
||||
{
|
||||
return early_memremap(phys_addr, size);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
* Copyright (C) 2020-2022 Loongson Technology Corporation Limited
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/types.h>
|
||||
|
|
|
|||
|
|
@ -1075,7 +1075,6 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
|
|||
*/
|
||||
#ifdef CONFIG_64BIT
|
||||
#define TASK_SIZE_64 (PGDIR_SIZE * PTRS_PER_PGD / 2)
|
||||
#define TASK_SIZE_MAX LONG_MAX
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
#define TASK_SIZE_32 (_AC(0x80000000, UL) - PAGE_SIZE)
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ static inline void __runtime_fixup_32(__le16 *lui_parcel, __le16 *addi_parcel, u
|
|||
addi_insn_mask &= 0x07fff;
|
||||
}
|
||||
|
||||
if (lower_immediate & 0x00000fff) {
|
||||
if (lower_immediate & 0x00000fff || lui_insn == RISCV_INSN_NOP4) {
|
||||
/* replace upper 12 bits of addi with lower 12 bits of val */
|
||||
addi_insn &= addi_insn_mask;
|
||||
addi_insn |= (lower_immediate & 0x00000fff) << 20;
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ do { \
|
|||
|
||||
#ifdef CONFIG_CC_HAS_ASM_GOTO_OUTPUT
|
||||
#define __get_user_8(x, ptr, label) \
|
||||
do { \
|
||||
u32 __user *__ptr = (u32 __user *)(ptr); \
|
||||
u32 __lo, __hi; \
|
||||
asm_goto_output( \
|
||||
|
|
@ -141,7 +142,7 @@ do { \
|
|||
: : label); \
|
||||
(x) = (__typeof__(x))((__typeof__((x) - (x)))( \
|
||||
(((u64)__hi << 32) | __lo))); \
|
||||
|
||||
} while (0)
|
||||
#else /* !CONFIG_CC_HAS_ASM_GOTO_OUTPUT */
|
||||
#define __get_user_8(x, ptr, label) \
|
||||
do { \
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ static __always_inline ssize_t getrandom_syscall(void *_buffer, size_t _len, uns
|
|||
register unsigned int flags asm("a2") = _flags;
|
||||
|
||||
asm volatile ("ecall\n"
|
||||
: "+r" (ret)
|
||||
: "=r" (ret)
|
||||
: "r" (nr), "r" (buffer), "r" (len), "r" (flags)
|
||||
: "memory");
|
||||
|
||||
|
|
|
|||
|
|
@ -205,11 +205,11 @@ static inline void __riscv_v_vstate_save(struct __riscv_v_ext_state *save_to,
|
|||
THEAD_VSETVLI_T4X0E8M8D1
|
||||
THEAD_VSB_V_V0T0
|
||||
"add t0, t0, t4\n\t"
|
||||
THEAD_VSB_V_V0T0
|
||||
THEAD_VSB_V_V8T0
|
||||
"add t0, t0, t4\n\t"
|
||||
THEAD_VSB_V_V0T0
|
||||
THEAD_VSB_V_V16T0
|
||||
"add t0, t0, t4\n\t"
|
||||
THEAD_VSB_V_V0T0
|
||||
THEAD_VSB_V_V24T0
|
||||
: : "r" (datap) : "memory", "t0", "t4");
|
||||
} else {
|
||||
asm volatile (
|
||||
|
|
@ -241,11 +241,11 @@ static inline void __riscv_v_vstate_restore(struct __riscv_v_ext_state *restore_
|
|||
THEAD_VSETVLI_T4X0E8M8D1
|
||||
THEAD_VLB_V_V0T0
|
||||
"add t0, t0, t4\n\t"
|
||||
THEAD_VLB_V_V0T0
|
||||
THEAD_VLB_V_V8T0
|
||||
"add t0, t0, t4\n\t"
|
||||
THEAD_VLB_V_V0T0
|
||||
THEAD_VLB_V_V16T0
|
||||
"add t0, t0, t4\n\t"
|
||||
THEAD_VLB_V_V0T0
|
||||
THEAD_VLB_V_V24T0
|
||||
: : "r" (datap) : "memory", "t0", "t4");
|
||||
} else {
|
||||
asm volatile (
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ atomic_t hart_lottery __section(".sdata")
|
|||
#endif
|
||||
;
|
||||
unsigned long boot_cpu_hartid;
|
||||
EXPORT_SYMBOL_GPL(boot_cpu_hartid);
|
||||
|
||||
/*
|
||||
* Place kernel memory regions on the resource tree so that
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@ static int handle_scalar_misaligned_load(struct pt_regs *regs)
|
|||
|
||||
val.data_u64 = 0;
|
||||
if (user_mode(regs)) {
|
||||
if (copy_from_user_nofault(&val, (u8 __user *)addr, len))
|
||||
if (copy_from_user(&val, (u8 __user *)addr, len))
|
||||
return -1;
|
||||
} else {
|
||||
memcpy(&val, (u8 *)addr, len);
|
||||
|
|
@ -555,7 +555,7 @@ static int handle_scalar_misaligned_store(struct pt_regs *regs)
|
|||
return -EOPNOTSUPP;
|
||||
|
||||
if (user_mode(regs)) {
|
||||
if (copy_to_user_nofault((u8 __user *)addr, &val, len))
|
||||
if (copy_to_user((u8 __user *)addr, &val, len))
|
||||
return -1;
|
||||
} else {
|
||||
memcpy((u8 *)addr, &val, len);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ SECTIONS
|
|||
*(.data .data.* .gnu.linkonce.d.*)
|
||||
*(.dynbss)
|
||||
*(.bss .bss.* .gnu.linkonce.b.*)
|
||||
}
|
||||
} :text
|
||||
|
||||
.note : { *(.note.*) } :text :note
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#include <linux/types.h>
|
||||
|
||||
/* All SiFive vendor extensions supported in Linux */
|
||||
const struct riscv_isa_ext_data riscv_isa_vendor_ext_sifive[] = {
|
||||
static const struct riscv_isa_ext_data riscv_isa_vendor_ext_sifive[] = {
|
||||
__RISCV_ISA_EXT_DATA(xsfvfnrclipxfqf, RISCV_ISA_VENDOR_EXT_XSFVFNRCLIPXFQF),
|
||||
__RISCV_ISA_EXT_DATA(xsfvfwmaccqqq, RISCV_ISA_VENDOR_EXT_XSFVFWMACCQQQ),
|
||||
__RISCV_ISA_EXT_DATA(xsfvqmaccdod, RISCV_ISA_VENDOR_EXT_XSFVQMACCDOD),
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ static __always_inline unsigned long regs_get_kernel_stack_nth(struct pt_regs *r
|
|||
addr = kernel_stack_pointer(regs) + n * sizeof(long);
|
||||
if (!regs_within_kernel_stack(regs, addr))
|
||||
return 0;
|
||||
return READ_ONCE_NOCHECK(addr);
|
||||
return READ_ONCE_NOCHECK(*(unsigned long *)addr);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ int start_io_thread(struct os_helper_thread **td_out, int *fd_out)
|
|||
*fd_out = fds[1];
|
||||
|
||||
err = os_set_fd_block(*fd_out, 0);
|
||||
err = os_set_fd_block(kernel_fd, 0);
|
||||
err |= os_set_fd_block(kernel_fd, 0);
|
||||
if (err) {
|
||||
printk("start_io_thread - failed to set nonblocking I/O.\n");
|
||||
goto out_close;
|
||||
|
|
|
|||
|
|
@ -1625,35 +1625,19 @@ static void vector_eth_configure(
|
|||
|
||||
device->dev = dev;
|
||||
|
||||
*vp = ((struct vector_private)
|
||||
{
|
||||
.list = LIST_HEAD_INIT(vp->list),
|
||||
.dev = dev,
|
||||
.unit = n,
|
||||
.options = get_transport_options(def),
|
||||
.rx_irq = 0,
|
||||
.tx_irq = 0,
|
||||
.parsed = def,
|
||||
.max_packet = get_mtu(def) + ETH_HEADER_OTHER,
|
||||
/* TODO - we need to calculate headroom so that ip header
|
||||
* is 16 byte aligned all the time
|
||||
*/
|
||||
.headroom = get_headroom(def),
|
||||
.form_header = NULL,
|
||||
.verify_header = NULL,
|
||||
.header_rxbuffer = NULL,
|
||||
.header_txbuffer = NULL,
|
||||
.header_size = 0,
|
||||
.rx_header_size = 0,
|
||||
.rexmit_scheduled = false,
|
||||
.opened = false,
|
||||
.transport_data = NULL,
|
||||
.in_write_poll = false,
|
||||
.coalesce = 2,
|
||||
.req_size = get_req_size(def),
|
||||
.in_error = false,
|
||||
.bpf = NULL
|
||||
});
|
||||
INIT_LIST_HEAD(&vp->list);
|
||||
vp->dev = dev;
|
||||
vp->unit = n;
|
||||
vp->options = get_transport_options(def);
|
||||
vp->parsed = def;
|
||||
vp->max_packet = get_mtu(def) + ETH_HEADER_OTHER;
|
||||
/*
|
||||
* TODO - we need to calculate headroom so that ip header
|
||||
* is 16 byte aligned all the time
|
||||
*/
|
||||
vp->headroom = get_headroom(def);
|
||||
vp->coalesce = 2;
|
||||
vp->req_size = get_req_size(def);
|
||||
|
||||
dev->features = dev->hw_features = (NETIF_F_SG | NETIF_F_FRAGLIST);
|
||||
INIT_WORK(&vp->reset_tx, vector_reset_tx);
|
||||
|
|
|
|||
|
|
@ -570,6 +570,17 @@ static void uml_vfio_release_device(struct uml_vfio_device *dev)
|
|||
kfree(dev);
|
||||
}
|
||||
|
||||
static struct uml_vfio_device *uml_vfio_find_device(const char *device)
|
||||
{
|
||||
struct uml_vfio_device *dev;
|
||||
|
||||
list_for_each_entry(dev, ¨_vfio_devices, list) {
|
||||
if (!strcmp(dev->name, device))
|
||||
return dev;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int uml_vfio_cmdline_set(const char *device, const struct kernel_param *kp)
|
||||
{
|
||||
struct uml_vfio_device *dev;
|
||||
|
|
@ -582,6 +593,9 @@ static int uml_vfio_cmdline_set(const char *device, const struct kernel_param *k
|
|||
uml_vfio_container.fd = fd;
|
||||
}
|
||||
|
||||
if (uml_vfio_find_device(device))
|
||||
return -EEXIST;
|
||||
|
||||
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,14 @@
|
|||
#include <asm/cpufeature.h>
|
||||
#include <asm/msr.h>
|
||||
|
||||
/*
|
||||
* Define bits that are always set to 1 in DR7, only bit 10 is
|
||||
* architecturally reserved to '1'.
|
||||
*
|
||||
* This is also the init/reset value for DR7.
|
||||
*/
|
||||
#define DR7_FIXED_1 0x00000400
|
||||
|
||||
DECLARE_PER_CPU(unsigned long, cpu_dr7);
|
||||
|
||||
#ifndef CONFIG_PARAVIRT_XXL
|
||||
|
|
@ -100,8 +108,8 @@ static __always_inline void native_set_debugreg(int regno, unsigned long value)
|
|||
|
||||
static inline void hw_breakpoint_disable(void)
|
||||
{
|
||||
/* Zero the control register for HW Breakpoint */
|
||||
set_debugreg(0UL, 7);
|
||||
/* Reset the control register for HW Breakpoint */
|
||||
set_debugreg(DR7_FIXED_1, 7);
|
||||
|
||||
/* Zero-out the individual HW breakpoint address registers */
|
||||
set_debugreg(0UL, 0);
|
||||
|
|
@ -125,9 +133,12 @@ static __always_inline unsigned long local_db_save(void)
|
|||
return 0;
|
||||
|
||||
get_debugreg(dr7, 7);
|
||||
dr7 &= ~0x400; /* architecturally set bit */
|
||||
|
||||
/* Architecturally set bit */
|
||||
dr7 &= ~DR7_FIXED_1;
|
||||
if (dr7)
|
||||
set_debugreg(0, 7);
|
||||
set_debugreg(DR7_FIXED_1, 7);
|
||||
|
||||
/*
|
||||
* Ensure the compiler doesn't lower the above statements into
|
||||
* the critical section; disabling breakpoints late would not
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include <asm/apic.h>
|
||||
#include <asm/pvclock-abi.h>
|
||||
#include <asm/debugreg.h>
|
||||
#include <asm/desc.h>
|
||||
#include <asm/mtrr.h>
|
||||
#include <asm/msr-index.h>
|
||||
|
|
@ -249,7 +250,6 @@ enum x86_intercept_stage;
|
|||
#define DR7_BP_EN_MASK 0x000000ff
|
||||
#define DR7_GE (1 << 9)
|
||||
#define DR7_GD (1 << 13)
|
||||
#define DR7_FIXED_1 0x00000400
|
||||
#define DR7_VOLATILE 0xffff2bff
|
||||
|
||||
#define KVM_GUESTDBG_VALID_MASK \
|
||||
|
|
|
|||
|
|
@ -15,7 +15,26 @@
|
|||
which debugging register was responsible for the trap. The other bits
|
||||
are either reserved or not of interest to us. */
|
||||
|
||||
/* Define reserved bits in DR6 which are always set to 1 */
|
||||
/*
|
||||
* Define bits in DR6 which are set to 1 by default.
|
||||
*
|
||||
* This is also the DR6 architectural value following Power-up, Reset or INIT.
|
||||
*
|
||||
* Note, with the introduction of Bus Lock Detection (BLD) and Restricted
|
||||
* Transactional Memory (RTM), the DR6 register has been modified:
|
||||
*
|
||||
* 1) BLD flag (bit 11) is no longer reserved to 1 if the CPU supports
|
||||
* Bus Lock Detection. The assertion of a bus lock could clear it.
|
||||
*
|
||||
* 2) RTM flag (bit 16) is no longer reserved to 1 if the CPU supports
|
||||
* restricted transactional memory. #DB occurred inside an RTM region
|
||||
* could clear it.
|
||||
*
|
||||
* Apparently, DR6.BLD and DR6.RTM are active low bits.
|
||||
*
|
||||
* As a result, DR6_RESERVED is an incorrect name now, but it is kept for
|
||||
* compatibility.
|
||||
*/
|
||||
#define DR6_RESERVED (0xFFFF0FF0)
|
||||
|
||||
#define DR_TRAP0 (0x1) /* db0 */
|
||||
|
|
|
|||
|
|
@ -2243,20 +2243,16 @@ EXPORT_PER_CPU_SYMBOL(__stack_chk_guard);
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Clear all 6 debug registers:
|
||||
*/
|
||||
static void clear_all_debug_regs(void)
|
||||
static void initialize_debug_regs(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
/* Ignore db4, db5 */
|
||||
if ((i == 4) || (i == 5))
|
||||
continue;
|
||||
|
||||
set_debugreg(0, i);
|
||||
}
|
||||
/* Control register first -- to make sure everything is disabled. */
|
||||
set_debugreg(DR7_FIXED_1, 7);
|
||||
set_debugreg(DR6_RESERVED, 6);
|
||||
/* dr5 and dr4 don't exist */
|
||||
set_debugreg(0, 3);
|
||||
set_debugreg(0, 2);
|
||||
set_debugreg(0, 1);
|
||||
set_debugreg(0, 0);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_KGDB
|
||||
|
|
@ -2417,7 +2413,7 @@ void cpu_init(void)
|
|||
|
||||
load_mm_ldt(&init_mm);
|
||||
|
||||
clear_all_debug_regs();
|
||||
initialize_debug_regs();
|
||||
dbg_restore_debug_regs();
|
||||
|
||||
doublefault_init_cpu_tss();
|
||||
|
|
|
|||
|
|
@ -385,7 +385,7 @@ static void kgdb_disable_hw_debug(struct pt_regs *regs)
|
|||
struct perf_event *bp;
|
||||
|
||||
/* Disable hardware debugging while we are in kgdb: */
|
||||
set_debugreg(0UL, 7);
|
||||
set_debugreg(DR7_FIXED_1, 7);
|
||||
for (i = 0; i < HBP_NUM; i++) {
|
||||
if (!breakinfo[i].enabled)
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ void __show_regs(struct pt_regs *regs, enum show_regs_mode mode,
|
|||
|
||||
/* Only print out debug registers if they are in their non-default state. */
|
||||
if ((d0 == 0) && (d1 == 0) && (d2 == 0) && (d3 == 0) &&
|
||||
(d6 == DR6_RESERVED) && (d7 == 0x400))
|
||||
(d6 == DR6_RESERVED) && (d7 == DR7_FIXED_1))
|
||||
return;
|
||||
|
||||
printk("%sDR0: %08lx DR1: %08lx DR2: %08lx DR3: %08lx\n",
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ void __show_regs(struct pt_regs *regs, enum show_regs_mode mode,
|
|||
|
||||
/* Only print out debug registers if they are in their non-default state. */
|
||||
if (!((d0 == 0) && (d1 == 0) && (d2 == 0) && (d3 == 0) &&
|
||||
(d6 == DR6_RESERVED) && (d7 == 0x400))) {
|
||||
(d6 == DR6_RESERVED) && (d7 == DR7_FIXED_1))) {
|
||||
printk("%sDR0: %016lx DR1: %016lx DR2: %016lx\n",
|
||||
log_lvl, d0, d1, d2);
|
||||
printk("%sDR3: %016lx DR6: %016lx DR7: %016lx\n",
|
||||
|
|
|
|||
|
|
@ -1022,24 +1022,32 @@ static bool is_sysenter_singlestep(struct pt_regs *regs)
|
|||
#endif
|
||||
}
|
||||
|
||||
static __always_inline unsigned long debug_read_clear_dr6(void)
|
||||
static __always_inline unsigned long debug_read_reset_dr6(void)
|
||||
{
|
||||
unsigned long dr6;
|
||||
|
||||
get_debugreg(dr6, 6);
|
||||
dr6 ^= DR6_RESERVED; /* Flip to positive polarity */
|
||||
|
||||
/*
|
||||
* The Intel SDM says:
|
||||
*
|
||||
* Certain debug exceptions may clear bits 0-3. The remaining
|
||||
* contents of the DR6 register are never cleared by the
|
||||
* processor. To avoid confusion in identifying debug
|
||||
* exceptions, debug handlers should clear the register before
|
||||
* returning to the interrupted task.
|
||||
* Certain debug exceptions may clear bits 0-3 of DR6.
|
||||
*
|
||||
* Keep it simple: clear DR6 immediately.
|
||||
* BLD induced #DB clears DR6.BLD and any other debug
|
||||
* exception doesn't modify DR6.BLD.
|
||||
*
|
||||
* RTM induced #DB clears DR6.RTM and any other debug
|
||||
* exception sets DR6.RTM.
|
||||
*
|
||||
* To avoid confusion in identifying debug exceptions,
|
||||
* debug handlers should set DR6.BLD and DR6.RTM, and
|
||||
* clear other DR6 bits before returning.
|
||||
*
|
||||
* Keep it simple: write DR6 with its architectural reset
|
||||
* value 0xFFFF0FF0, defined as DR6_RESERVED, immediately.
|
||||
*/
|
||||
get_debugreg(dr6, 6);
|
||||
set_debugreg(DR6_RESERVED, 6);
|
||||
dr6 ^= DR6_RESERVED; /* Flip to positive polarity */
|
||||
|
||||
return dr6;
|
||||
}
|
||||
|
|
@ -1239,13 +1247,13 @@ static noinstr void exc_debug_user(struct pt_regs *regs, unsigned long dr6)
|
|||
/* IST stack entry */
|
||||
DEFINE_IDTENTRY_DEBUG(exc_debug)
|
||||
{
|
||||
exc_debug_kernel(regs, debug_read_clear_dr6());
|
||||
exc_debug_kernel(regs, debug_read_reset_dr6());
|
||||
}
|
||||
|
||||
/* User entry, runs on regular task stack */
|
||||
DEFINE_IDTENTRY_DEBUG_USER(exc_debug)
|
||||
{
|
||||
exc_debug_user(regs, debug_read_clear_dr6());
|
||||
exc_debug_user(regs, debug_read_reset_dr6());
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_FRED
|
||||
|
|
@ -1264,7 +1272,7 @@ DEFINE_FREDENTRY_DEBUG(exc_debug)
|
|||
{
|
||||
/*
|
||||
* FRED #DB stores DR6 on the stack in the format which
|
||||
* debug_read_clear_dr6() returns for the IDT entry points.
|
||||
* debug_read_reset_dr6() returns for the IDT entry points.
|
||||
*/
|
||||
unsigned long dr6 = fred_event_data(regs);
|
||||
|
||||
|
|
@ -1279,7 +1287,7 @@ DEFINE_FREDENTRY_DEBUG(exc_debug)
|
|||
/* 32 bit does not have separate entry points. */
|
||||
DEFINE_IDTENTRY_RAW(exc_debug)
|
||||
{
|
||||
unsigned long dr6 = debug_read_clear_dr6();
|
||||
unsigned long dr6 = debug_read_reset_dr6();
|
||||
|
||||
if (user_mode(regs))
|
||||
exc_debug_user(regs, dr6);
|
||||
|
|
|
|||
|
|
@ -11035,7 +11035,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
|
|||
|
||||
if (unlikely(vcpu->arch.switch_db_regs &&
|
||||
!(vcpu->arch.switch_db_regs & KVM_DEBUGREG_AUTO_SWITCH))) {
|
||||
set_debugreg(0, 7);
|
||||
set_debugreg(DR7_FIXED_1, 7);
|
||||
set_debugreg(vcpu->arch.eff_db[0], 0);
|
||||
set_debugreg(vcpu->arch.eff_db[1], 1);
|
||||
set_debugreg(vcpu->arch.eff_db[2], 2);
|
||||
|
|
@ -11044,7 +11044,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
|
|||
if (unlikely(vcpu->arch.switch_db_regs & KVM_DEBUGREG_WONT_EXIT))
|
||||
kvm_x86_call(set_dr6)(vcpu, vcpu->arch.dr6);
|
||||
} else if (unlikely(hw_breakpoint_active())) {
|
||||
set_debugreg(0, 7);
|
||||
set_debugreg(DR7_FIXED_1, 7);
|
||||
}
|
||||
|
||||
vcpu->arch.host_debugctl = get_debugctlmsr();
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ static int fpregs_legacy_set(struct task_struct *target,
|
|||
from = kbuf;
|
||||
}
|
||||
|
||||
return um_fxsr_from_i387(fxsave, &buf);
|
||||
return um_fxsr_from_i387(fxsave, from);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -128,23 +128,27 @@ static void part_stat_read_all(struct block_device *part,
|
|||
static void bdev_count_inflight_rw(struct block_device *part,
|
||||
unsigned int inflight[2], bool mq_driver)
|
||||
{
|
||||
int write = 0;
|
||||
int read = 0;
|
||||
int cpu;
|
||||
|
||||
if (mq_driver) {
|
||||
blk_mq_in_driver_rw(part, inflight);
|
||||
} else {
|
||||
for_each_possible_cpu(cpu) {
|
||||
inflight[READ] += part_stat_local_read_cpu(
|
||||
part, in_flight[READ], cpu);
|
||||
inflight[WRITE] += part_stat_local_read_cpu(
|
||||
part, in_flight[WRITE], cpu);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (WARN_ON_ONCE((int)inflight[READ] < 0))
|
||||
inflight[READ] = 0;
|
||||
if (WARN_ON_ONCE((int)inflight[WRITE] < 0))
|
||||
inflight[WRITE] = 0;
|
||||
for_each_possible_cpu(cpu) {
|
||||
read += part_stat_local_read_cpu(part, in_flight[READ], cpu);
|
||||
write += part_stat_local_read_cpu(part, in_flight[WRITE], cpu);
|
||||
}
|
||||
|
||||
/*
|
||||
* While iterating all CPUs, some IOs may be issued from a CPU already
|
||||
* traversed and complete on a CPU that has not yet been traversed,
|
||||
* causing the inflight number to be negative.
|
||||
*/
|
||||
inflight[READ] = read > 0 ? read : 0;
|
||||
inflight[WRITE] = write > 0 ? write : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
125
crypto/wp512.c
125
crypto/wp512.c
|
|
@ -21,10 +21,10 @@
|
|||
*/
|
||||
#include <crypto/internal/hash.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mm.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/unaligned.h>
|
||||
|
||||
#define WP512_DIGEST_SIZE 64
|
||||
#define WP384_DIGEST_SIZE 48
|
||||
|
|
@ -37,9 +37,6 @@
|
|||
|
||||
struct wp512_ctx {
|
||||
u8 bitLength[WP512_LENGTHBYTES];
|
||||
u8 buffer[WP512_BLOCK_SIZE];
|
||||
int bufferBits;
|
||||
int bufferPos;
|
||||
u64 hash[WP512_DIGEST_SIZE/8];
|
||||
};
|
||||
|
||||
|
|
@ -779,16 +776,16 @@ static const u64 rc[WHIRLPOOL_ROUNDS] = {
|
|||
* The core Whirlpool transform.
|
||||
*/
|
||||
|
||||
static __no_kmsan_checks void wp512_process_buffer(struct wp512_ctx *wctx) {
|
||||
static __no_kmsan_checks void wp512_process_buffer(struct wp512_ctx *wctx,
|
||||
const u8 *buffer) {
|
||||
int i, r;
|
||||
u64 K[8]; /* the round key */
|
||||
u64 block[8]; /* mu(buffer) */
|
||||
u64 state[8]; /* the cipher state */
|
||||
u64 L[8];
|
||||
const __be64 *buffer = (const __be64 *)wctx->buffer;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
block[i] = be64_to_cpu(buffer[i]);
|
||||
block[i] = get_unaligned_be64(buffer + i * 8);
|
||||
|
||||
state[0] = block[0] ^ (K[0] = wctx->hash[0]);
|
||||
state[1] = block[1] ^ (K[1] = wctx->hash[1]);
|
||||
|
|
@ -991,8 +988,6 @@ static int wp512_init(struct shash_desc *desc) {
|
|||
int i;
|
||||
|
||||
memset(wctx->bitLength, 0, 32);
|
||||
wctx->bufferBits = wctx->bufferPos = 0;
|
||||
wctx->buffer[0] = 0;
|
||||
for (i = 0; i < 8; i++) {
|
||||
wctx->hash[i] = 0L;
|
||||
}
|
||||
|
|
@ -1000,84 +995,54 @@ static int wp512_init(struct shash_desc *desc) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int wp512_update(struct shash_desc *desc, const u8 *source,
|
||||
unsigned int len)
|
||||
static void wp512_add_length(u8 *bitLength, u64 value)
|
||||
{
|
||||
struct wp512_ctx *wctx = shash_desc_ctx(desc);
|
||||
int sourcePos = 0;
|
||||
unsigned int bits_len = len * 8; // convert to number of bits
|
||||
int sourceGap = (8 - ((int)bits_len & 7)) & 7;
|
||||
int bufferRem = wctx->bufferBits & 7;
|
||||
u32 carry;
|
||||
int i;
|
||||
u32 b, carry;
|
||||
u8 *buffer = wctx->buffer;
|
||||
u8 *bitLength = wctx->bitLength;
|
||||
int bufferBits = wctx->bufferBits;
|
||||
int bufferPos = wctx->bufferPos;
|
||||
|
||||
u64 value = bits_len;
|
||||
for (i = 31, carry = 0; i >= 0 && (carry != 0 || value != 0ULL); i--) {
|
||||
carry += bitLength[i] + ((u32)value & 0xff);
|
||||
bitLength[i] = (u8)carry;
|
||||
carry >>= 8;
|
||||
value >>= 8;
|
||||
}
|
||||
while (bits_len > 8) {
|
||||
b = ((source[sourcePos] << sourceGap) & 0xff) |
|
||||
((source[sourcePos + 1] & 0xff) >> (8 - sourceGap));
|
||||
buffer[bufferPos++] |= (u8)(b >> bufferRem);
|
||||
bufferBits += 8 - bufferRem;
|
||||
if (bufferBits == WP512_BLOCK_SIZE * 8) {
|
||||
wp512_process_buffer(wctx);
|
||||
bufferBits = bufferPos = 0;
|
||||
}
|
||||
buffer[bufferPos] = b << (8 - bufferRem);
|
||||
bufferBits += bufferRem;
|
||||
bits_len -= 8;
|
||||
sourcePos++;
|
||||
}
|
||||
if (bits_len > 0) {
|
||||
b = (source[sourcePos] << sourceGap) & 0xff;
|
||||
buffer[bufferPos] |= b >> bufferRem;
|
||||
} else {
|
||||
b = 0;
|
||||
}
|
||||
if (bufferRem + bits_len < 8) {
|
||||
bufferBits += bits_len;
|
||||
} else {
|
||||
bufferPos++;
|
||||
bufferBits += 8 - bufferRem;
|
||||
bits_len -= 8 - bufferRem;
|
||||
if (bufferBits == WP512_BLOCK_SIZE * 8) {
|
||||
wp512_process_buffer(wctx);
|
||||
bufferBits = bufferPos = 0;
|
||||
}
|
||||
buffer[bufferPos] = b << (8 - bufferRem);
|
||||
bufferBits += (int)bits_len;
|
||||
}
|
||||
|
||||
wctx->bufferBits = bufferBits;
|
||||
wctx->bufferPos = bufferPos;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int wp512_final(struct shash_desc *desc, u8 *out)
|
||||
static int wp512_update(struct shash_desc *desc, const u8 *source,
|
||||
unsigned int len)
|
||||
{
|
||||
struct wp512_ctx *wctx = shash_desc_ctx(desc);
|
||||
unsigned int remain = len % WP512_BLOCK_SIZE;
|
||||
u64 bits_len = (len - remain) * 8ull;
|
||||
u8 *bitLength = wctx->bitLength;
|
||||
|
||||
wp512_add_length(bitLength, bits_len);
|
||||
do {
|
||||
wp512_process_buffer(wctx, source);
|
||||
source += WP512_BLOCK_SIZE;
|
||||
bits_len -= WP512_BLOCK_SIZE * 8;
|
||||
} while (bits_len);
|
||||
|
||||
return remain;
|
||||
}
|
||||
|
||||
static int wp512_finup(struct shash_desc *desc, const u8 *src,
|
||||
unsigned int bufferPos, u8 *out)
|
||||
{
|
||||
struct wp512_ctx *wctx = shash_desc_ctx(desc);
|
||||
int i;
|
||||
u8 *buffer = wctx->buffer;
|
||||
u8 *bitLength = wctx->bitLength;
|
||||
int bufferBits = wctx->bufferBits;
|
||||
int bufferPos = wctx->bufferPos;
|
||||
__be64 *digest = (__be64 *)out;
|
||||
u8 buffer[WP512_BLOCK_SIZE];
|
||||
|
||||
buffer[bufferPos] |= 0x80U >> (bufferBits & 7);
|
||||
wp512_add_length(bitLength, bufferPos * 8);
|
||||
memcpy(buffer, src, bufferPos);
|
||||
buffer[bufferPos] = 0x80U;
|
||||
bufferPos++;
|
||||
if (bufferPos > WP512_BLOCK_SIZE - WP512_LENGTHBYTES) {
|
||||
if (bufferPos < WP512_BLOCK_SIZE)
|
||||
memset(&buffer[bufferPos], 0, WP512_BLOCK_SIZE - bufferPos);
|
||||
wp512_process_buffer(wctx);
|
||||
wp512_process_buffer(wctx, buffer);
|
||||
bufferPos = 0;
|
||||
}
|
||||
if (bufferPos < WP512_BLOCK_SIZE - WP512_LENGTHBYTES)
|
||||
|
|
@ -1086,31 +1051,32 @@ static int wp512_final(struct shash_desc *desc, u8 *out)
|
|||
bufferPos = WP512_BLOCK_SIZE - WP512_LENGTHBYTES;
|
||||
memcpy(&buffer[WP512_BLOCK_SIZE - WP512_LENGTHBYTES],
|
||||
bitLength, WP512_LENGTHBYTES);
|
||||
wp512_process_buffer(wctx);
|
||||
wp512_process_buffer(wctx, buffer);
|
||||
memzero_explicit(buffer, sizeof(buffer));
|
||||
for (i = 0; i < WP512_DIGEST_SIZE/8; i++)
|
||||
digest[i] = cpu_to_be64(wctx->hash[i]);
|
||||
wctx->bufferBits = bufferBits;
|
||||
wctx->bufferPos = bufferPos;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int wp384_final(struct shash_desc *desc, u8 *out)
|
||||
static int wp384_finup(struct shash_desc *desc, const u8 *src,
|
||||
unsigned int len, u8 *out)
|
||||
{
|
||||
u8 D[64];
|
||||
|
||||
wp512_final(desc, D);
|
||||
wp512_finup(desc, src, len, D);
|
||||
memcpy(out, D, WP384_DIGEST_SIZE);
|
||||
memzero_explicit(D, WP512_DIGEST_SIZE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int wp256_final(struct shash_desc *desc, u8 *out)
|
||||
static int wp256_finup(struct shash_desc *desc, const u8 *src,
|
||||
unsigned int len, u8 *out)
|
||||
{
|
||||
u8 D[64];
|
||||
|
||||
wp512_final(desc, D);
|
||||
wp512_finup(desc, src, len, D);
|
||||
memcpy(out, D, WP256_DIGEST_SIZE);
|
||||
memzero_explicit(D, WP512_DIGEST_SIZE);
|
||||
|
||||
|
|
@ -1121,11 +1087,12 @@ static struct shash_alg wp_algs[3] = { {
|
|||
.digestsize = WP512_DIGEST_SIZE,
|
||||
.init = wp512_init,
|
||||
.update = wp512_update,
|
||||
.final = wp512_final,
|
||||
.finup = wp512_finup,
|
||||
.descsize = sizeof(struct wp512_ctx),
|
||||
.base = {
|
||||
.cra_name = "wp512",
|
||||
.cra_driver_name = "wp512-generic",
|
||||
.cra_flags = CRYPTO_AHASH_ALG_BLOCK_ONLY,
|
||||
.cra_blocksize = WP512_BLOCK_SIZE,
|
||||
.cra_module = THIS_MODULE,
|
||||
}
|
||||
|
|
@ -1133,11 +1100,12 @@ static struct shash_alg wp_algs[3] = { {
|
|||
.digestsize = WP384_DIGEST_SIZE,
|
||||
.init = wp512_init,
|
||||
.update = wp512_update,
|
||||
.final = wp384_final,
|
||||
.finup = wp384_finup,
|
||||
.descsize = sizeof(struct wp512_ctx),
|
||||
.base = {
|
||||
.cra_name = "wp384",
|
||||
.cra_driver_name = "wp384-generic",
|
||||
.cra_flags = CRYPTO_AHASH_ALG_BLOCK_ONLY,
|
||||
.cra_blocksize = WP512_BLOCK_SIZE,
|
||||
.cra_module = THIS_MODULE,
|
||||
}
|
||||
|
|
@ -1145,11 +1113,12 @@ static struct shash_alg wp_algs[3] = { {
|
|||
.digestsize = WP256_DIGEST_SIZE,
|
||||
.init = wp512_init,
|
||||
.update = wp512_update,
|
||||
.final = wp256_final,
|
||||
.finup = wp256_finup,
|
||||
.descsize = sizeof(struct wp512_ctx),
|
||||
.base = {
|
||||
.cra_name = "wp256",
|
||||
.cra_driver_name = "wp256-generic",
|
||||
.cra_flags = CRYPTO_AHASH_ALG_BLOCK_ONLY,
|
||||
.cra_blocksize = WP512_BLOCK_SIZE,
|
||||
.cra_module = THIS_MODULE,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1450,7 +1450,7 @@ static bool ahci_broken_lpm(struct pci_dev *pdev)
|
|||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "ASUSPRO D840MB_M840SA"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "ASUSPRO D840MB_M840SA"),
|
||||
},
|
||||
/* 320 is broken, there is no known good version. */
|
||||
},
|
||||
|
|
|
|||
|
|
@ -852,6 +852,8 @@ queue_skb(struct idt77252_dev *card, struct vc_map *vc,
|
|||
|
||||
IDT77252_PRV_PADDR(skb) = dma_map_single(&card->pcidev->dev, skb->data,
|
||||
skb->len, DMA_TO_DEVICE);
|
||||
if (dma_mapping_error(&card->pcidev->dev, IDT77252_PRV_PADDR(skb)))
|
||||
return -ENOMEM;
|
||||
|
||||
error = -EINVAL;
|
||||
|
||||
|
|
@ -1857,6 +1859,8 @@ add_rx_skb(struct idt77252_dev *card, int queue,
|
|||
paddr = dma_map_single(&card->pcidev->dev, skb->data,
|
||||
skb_end_pointer(skb) - skb->data,
|
||||
DMA_FROM_DEVICE);
|
||||
if (dma_mapping_error(&card->pcidev->dev, paddr))
|
||||
goto outpoolrm;
|
||||
IDT77252_PRV_PADDR(skb) = paddr;
|
||||
|
||||
if (push_rx_skb(card, skb, queue)) {
|
||||
|
|
@ -1871,6 +1875,7 @@ add_rx_skb(struct idt77252_dev *card, int queue,
|
|||
dma_unmap_single(&card->pcidev->dev, IDT77252_PRV_PADDR(skb),
|
||||
skb_end_pointer(skb) - skb->data, DMA_FROM_DEVICE);
|
||||
|
||||
outpoolrm:
|
||||
handle = IDT77252_PRV_POOL(skb);
|
||||
card->sbpool[POOL_QUEUE(handle)].skb[POOL_INDEX(handle)] = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -1148,8 +1148,8 @@ static inline void __ublk_complete_rq(struct request *req)
|
|||
blk_mq_end_request(req, res);
|
||||
}
|
||||
|
||||
static void ublk_complete_io_cmd(struct ublk_io *io, struct request *req,
|
||||
int res, unsigned issue_flags)
|
||||
static struct io_uring_cmd *__ublk_prep_compl_io_cmd(struct ublk_io *io,
|
||||
struct request *req)
|
||||
{
|
||||
/* read cmd first because req will overwrite it */
|
||||
struct io_uring_cmd *cmd = io->cmd;
|
||||
|
|
@ -1164,6 +1164,13 @@ static void ublk_complete_io_cmd(struct ublk_io *io, struct request *req,
|
|||
io->flags &= ~UBLK_IO_FLAG_ACTIVE;
|
||||
|
||||
io->req = req;
|
||||
return cmd;
|
||||
}
|
||||
|
||||
static void ublk_complete_io_cmd(struct ublk_io *io, struct request *req,
|
||||
int res, unsigned issue_flags)
|
||||
{
|
||||
struct io_uring_cmd *cmd = __ublk_prep_compl_io_cmd(io, req);
|
||||
|
||||
/* tell ublksrv one io request is coming */
|
||||
io_uring_cmd_done(cmd, res, 0, issue_flags);
|
||||
|
|
@ -1416,6 +1423,14 @@ static blk_status_t ublk_queue_rq(struct blk_mq_hw_ctx *hctx,
|
|||
return BLK_STS_OK;
|
||||
}
|
||||
|
||||
static inline bool ublk_belong_to_same_batch(const struct ublk_io *io,
|
||||
const struct ublk_io *io2)
|
||||
{
|
||||
return (io_uring_cmd_ctx_handle(io->cmd) ==
|
||||
io_uring_cmd_ctx_handle(io2->cmd)) &&
|
||||
(io->task == io2->task);
|
||||
}
|
||||
|
||||
static void ublk_queue_rqs(struct rq_list *rqlist)
|
||||
{
|
||||
struct rq_list requeue_list = { };
|
||||
|
|
@ -1427,7 +1442,8 @@ static void ublk_queue_rqs(struct rq_list *rqlist)
|
|||
struct ublk_queue *this_q = req->mq_hctx->driver_data;
|
||||
struct ublk_io *this_io = &this_q->ios[req->tag];
|
||||
|
||||
if (io && io->task != this_io->task && !rq_list_empty(&submit_list))
|
||||
if (io && !ublk_belong_to_same_batch(io, this_io) &&
|
||||
!rq_list_empty(&submit_list))
|
||||
ublk_queue_cmd_list(io, &submit_list);
|
||||
io = this_io;
|
||||
|
||||
|
|
@ -2148,10 +2164,9 @@ static int ublk_commit_and_fetch(const struct ublk_queue *ubq,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static bool ublk_get_data(const struct ublk_queue *ubq, struct ublk_io *io)
|
||||
static bool ublk_get_data(const struct ublk_queue *ubq, struct ublk_io *io,
|
||||
struct request *req)
|
||||
{
|
||||
struct request *req = io->req;
|
||||
|
||||
/*
|
||||
* We have handled UBLK_IO_NEED_GET_DATA command,
|
||||
* so clear UBLK_IO_FLAG_NEED_GET_DATA now and just
|
||||
|
|
@ -2178,6 +2193,7 @@ static int __ublk_ch_uring_cmd(struct io_uring_cmd *cmd,
|
|||
u32 cmd_op = cmd->cmd_op;
|
||||
unsigned tag = ub_cmd->tag;
|
||||
int ret = -EINVAL;
|
||||
struct request *req;
|
||||
|
||||
pr_devel("%s: received: cmd op %d queue %d tag %d result %d\n",
|
||||
__func__, cmd->cmd_op, ub_cmd->q_id, tag,
|
||||
|
|
@ -2236,11 +2252,19 @@ static int __ublk_ch_uring_cmd(struct io_uring_cmd *cmd,
|
|||
goto out;
|
||||
break;
|
||||
case UBLK_IO_NEED_GET_DATA:
|
||||
io->addr = ub_cmd->addr;
|
||||
if (!ublk_get_data(ubq, io))
|
||||
return -EIOCBQUEUED;
|
||||
|
||||
return UBLK_IO_RES_OK;
|
||||
/*
|
||||
* ublk_get_data() may fail and fallback to requeue, so keep
|
||||
* uring_cmd active first and prepare for handling new requeued
|
||||
* request
|
||||
*/
|
||||
req = io->req;
|
||||
ublk_fill_io_cmd(io, cmd, ub_cmd->addr);
|
||||
io->flags &= ~UBLK_IO_FLAG_OWNED_BY_SRV;
|
||||
if (likely(ublk_get_data(ubq, io, req))) {
|
||||
__ublk_prep_compl_io_cmd(io, req);
|
||||
return UBLK_IO_RES_OK;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
goto out;
|
||||
}
|
||||
|
|
@ -2825,7 +2849,8 @@ static int ublk_ctrl_add_dev(const struct ublksrv_ctrl_cmd *header)
|
|||
if (copy_from_user(&info, argp, sizeof(info)))
|
||||
return -EFAULT;
|
||||
|
||||
if (info.queue_depth > UBLK_MAX_QUEUE_DEPTH || info.nr_hw_queues > UBLK_MAX_NR_QUEUES)
|
||||
if (info.queue_depth > UBLK_MAX_QUEUE_DEPTH || !info.queue_depth ||
|
||||
info.nr_hw_queues > UBLK_MAX_NR_QUEUES || !info.nr_hw_queues)
|
||||
return -EINVAL;
|
||||
|
||||
if (capable(CAP_SYS_ADMIN))
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user