mirror of
https://github.com/torvalds/linux
synced 2024-09-06 18:01:05 +00:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR. No conflicts or adjacent changes. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
cf244463a2
13
CREDITS
13
CREDITS
|
@ -2161,6 +2161,19 @@ N: Mike Kravetz
|
||||||
E: mike.kravetz@oracle.com
|
E: mike.kravetz@oracle.com
|
||||||
D: Maintenance and development of the hugetlb subsystem
|
D: Maintenance and development of the hugetlb subsystem
|
||||||
|
|
||||||
|
N: Seth Jennings
|
||||||
|
E: sjenning@redhat.com
|
||||||
|
D: Creation and maintenance of zswap
|
||||||
|
|
||||||
|
N: Dan Streetman
|
||||||
|
E: ddstreet@ieee.org
|
||||||
|
D: Maintenance and development of zswap
|
||||||
|
D: Creation and maintenance of the zpool API
|
||||||
|
|
||||||
|
N: Vitaly Wool
|
||||||
|
E: vitaly.wool@konsulko.com
|
||||||
|
D: Maintenance and development of zswap
|
||||||
|
|
||||||
N: Andreas S. Krebs
|
N: Andreas S. Krebs
|
||||||
E: akrebs@altavista.net
|
E: akrebs@altavista.net
|
||||||
D: CYPRESS CY82C693 chipset IDE, Digital's PC-Alpha 164SX boards
|
D: CYPRESS CY82C693 chipset IDE, Digital's PC-Alpha 164SX boards
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
What: /sys/class/<iface>/queues/rx-<queue>/rps_cpus
|
What: /sys/class/net/<iface>/queues/rx-<queue>/rps_cpus
|
||||||
Date: March 2010
|
Date: March 2010
|
||||||
KernelVersion: 2.6.35
|
KernelVersion: 2.6.35
|
||||||
Contact: netdev@vger.kernel.org
|
Contact: netdev@vger.kernel.org
|
||||||
|
@ -8,7 +8,7 @@ Description:
|
||||||
network device queue. Possible values depend on the number
|
network device queue. Possible values depend on the number
|
||||||
of available CPU(s) in the system.
|
of available CPU(s) in the system.
|
||||||
|
|
||||||
What: /sys/class/<iface>/queues/rx-<queue>/rps_flow_cnt
|
What: /sys/class/net/<iface>/queues/rx-<queue>/rps_flow_cnt
|
||||||
Date: April 2010
|
Date: April 2010
|
||||||
KernelVersion: 2.6.35
|
KernelVersion: 2.6.35
|
||||||
Contact: netdev@vger.kernel.org
|
Contact: netdev@vger.kernel.org
|
||||||
|
@ -16,7 +16,7 @@ Description:
|
||||||
Number of Receive Packet Steering flows being currently
|
Number of Receive Packet Steering flows being currently
|
||||||
processed by this particular network device receive queue.
|
processed by this particular network device receive queue.
|
||||||
|
|
||||||
What: /sys/class/<iface>/queues/tx-<queue>/tx_timeout
|
What: /sys/class/net/<iface>/queues/tx-<queue>/tx_timeout
|
||||||
Date: November 2011
|
Date: November 2011
|
||||||
KernelVersion: 3.3
|
KernelVersion: 3.3
|
||||||
Contact: netdev@vger.kernel.org
|
Contact: netdev@vger.kernel.org
|
||||||
|
@ -24,7 +24,7 @@ Description:
|
||||||
Indicates the number of transmit timeout events seen by this
|
Indicates the number of transmit timeout events seen by this
|
||||||
network interface transmit queue.
|
network interface transmit queue.
|
||||||
|
|
||||||
What: /sys/class/<iface>/queues/tx-<queue>/tx_maxrate
|
What: /sys/class/net/<iface>/queues/tx-<queue>/tx_maxrate
|
||||||
Date: March 2015
|
Date: March 2015
|
||||||
KernelVersion: 4.1
|
KernelVersion: 4.1
|
||||||
Contact: netdev@vger.kernel.org
|
Contact: netdev@vger.kernel.org
|
||||||
|
@ -32,7 +32,7 @@ Description:
|
||||||
A Mbps max-rate set for the queue, a value of zero means disabled,
|
A Mbps max-rate set for the queue, a value of zero means disabled,
|
||||||
default is disabled.
|
default is disabled.
|
||||||
|
|
||||||
What: /sys/class/<iface>/queues/tx-<queue>/xps_cpus
|
What: /sys/class/net/<iface>/queues/tx-<queue>/xps_cpus
|
||||||
Date: November 2010
|
Date: November 2010
|
||||||
KernelVersion: 2.6.38
|
KernelVersion: 2.6.38
|
||||||
Contact: netdev@vger.kernel.org
|
Contact: netdev@vger.kernel.org
|
||||||
|
@ -42,7 +42,7 @@ Description:
|
||||||
network device transmit queue. Possible values depend on the
|
network device transmit queue. Possible values depend on the
|
||||||
number of available CPU(s) in the system.
|
number of available CPU(s) in the system.
|
||||||
|
|
||||||
What: /sys/class/<iface>/queues/tx-<queue>/xps_rxqs
|
What: /sys/class/net/<iface>/queues/tx-<queue>/xps_rxqs
|
||||||
Date: June 2018
|
Date: June 2018
|
||||||
KernelVersion: 4.18.0
|
KernelVersion: 4.18.0
|
||||||
Contact: netdev@vger.kernel.org
|
Contact: netdev@vger.kernel.org
|
||||||
|
@ -53,7 +53,7 @@ Description:
|
||||||
number of available receive queue(s) in the network device.
|
number of available receive queue(s) in the network device.
|
||||||
Default is disabled.
|
Default is disabled.
|
||||||
|
|
||||||
What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/hold_time
|
What: /sys/class/net/<iface>/queues/tx-<queue>/byte_queue_limits/hold_time
|
||||||
Date: November 2011
|
Date: November 2011
|
||||||
KernelVersion: 3.3
|
KernelVersion: 3.3
|
||||||
Contact: netdev@vger.kernel.org
|
Contact: netdev@vger.kernel.org
|
||||||
|
@ -62,7 +62,7 @@ Description:
|
||||||
of this particular network device transmit queue.
|
of this particular network device transmit queue.
|
||||||
Default value is 1000.
|
Default value is 1000.
|
||||||
|
|
||||||
What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/inflight
|
What: /sys/class/net/<iface>/queues/tx-<queue>/byte_queue_limits/inflight
|
||||||
Date: November 2011
|
Date: November 2011
|
||||||
KernelVersion: 3.3
|
KernelVersion: 3.3
|
||||||
Contact: netdev@vger.kernel.org
|
Contact: netdev@vger.kernel.org
|
||||||
|
@ -70,7 +70,7 @@ Description:
|
||||||
Indicates the number of bytes (objects) in flight on this
|
Indicates the number of bytes (objects) in flight on this
|
||||||
network device transmit queue.
|
network device transmit queue.
|
||||||
|
|
||||||
What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/limit
|
What: /sys/class/net/<iface>/queues/tx-<queue>/byte_queue_limits/limit
|
||||||
Date: November 2011
|
Date: November 2011
|
||||||
KernelVersion: 3.3
|
KernelVersion: 3.3
|
||||||
Contact: netdev@vger.kernel.org
|
Contact: netdev@vger.kernel.org
|
||||||
|
@ -79,7 +79,7 @@ Description:
|
||||||
on this network device transmit queue. This value is clamped
|
on this network device transmit queue. This value is clamped
|
||||||
to be within the bounds defined by limit_max and limit_min.
|
to be within the bounds defined by limit_max and limit_min.
|
||||||
|
|
||||||
What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/limit_max
|
What: /sys/class/net/<iface>/queues/tx-<queue>/byte_queue_limits/limit_max
|
||||||
Date: November 2011
|
Date: November 2011
|
||||||
KernelVersion: 3.3
|
KernelVersion: 3.3
|
||||||
Contact: netdev@vger.kernel.org
|
Contact: netdev@vger.kernel.org
|
||||||
|
@ -88,7 +88,7 @@ Description:
|
||||||
queued on this network device transmit queue. See
|
queued on this network device transmit queue. See
|
||||||
include/linux/dynamic_queue_limits.h for the default value.
|
include/linux/dynamic_queue_limits.h for the default value.
|
||||||
|
|
||||||
What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/limit_min
|
What: /sys/class/net/<iface>/queues/tx-<queue>/byte_queue_limits/limit_min
|
||||||
Date: November 2011
|
Date: November 2011
|
||||||
KernelVersion: 3.3
|
KernelVersion: 3.3
|
||||||
Contact: netdev@vger.kernel.org
|
Contact: netdev@vger.kernel.org
|
||||||
|
|
|
@ -10,6 +10,7 @@ What: /sys/devices/platform/silicom-platform/power_cycle
|
||||||
Date: November 2023
|
Date: November 2023
|
||||||
KernelVersion: 6.7
|
KernelVersion: 6.7
|
||||||
Contact: Henry Shi <henrys@silicom-usa.com>
|
Contact: Henry Shi <henrys@silicom-usa.com>
|
||||||
|
Description:
|
||||||
This file allow user to power cycle the platform.
|
This file allow user to power cycle the platform.
|
||||||
Default value is 0; when set to 1, it powers down
|
Default value is 0; when set to 1, it powers down
|
||||||
the platform, waits 5 seconds, then powers on the
|
the platform, waits 5 seconds, then powers on the
|
||||||
|
|
|
@ -101,8 +101,8 @@ External References
|
||||||
email threads
|
email threads
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
* `Initial discussion on the New subsystem for acceleration devices <https://lkml.org/lkml/2022/7/31/83>`_ - Oded Gabbay (2022)
|
* `Initial discussion on the New subsystem for acceleration devices <https://lore.kernel.org/lkml/CAFCwf11=9qpNAepL7NL+YAV_QO=Wv6pnWPhKHKAepK3fNn+2Dg@mail.gmail.com/>`_ - Oded Gabbay (2022)
|
||||||
* `patch-set to add the new subsystem <https://lkml.org/lkml/2022/10/22/544>`_ - Oded Gabbay (2022)
|
* `patch-set to add the new subsystem <https://lore.kernel.org/lkml/20221022214622.18042-1-ogabbay@kernel.org/>`_ - Oded Gabbay (2022)
|
||||||
|
|
||||||
Conference talks
|
Conference talks
|
||||||
----------------
|
----------------
|
||||||
|
|
|
@ -218,8 +218,3 @@ bytes respectively. Such letter suffixes can also be entirely omitted:
|
||||||
|
|
||||||
.. include:: kernel-parameters.txt
|
.. include:: kernel-parameters.txt
|
||||||
:literal:
|
:literal:
|
||||||
|
|
||||||
Todo
|
|
||||||
----
|
|
||||||
|
|
||||||
Add more DRM drivers.
|
|
||||||
|
|
|
@ -243,13 +243,9 @@ To reduce its OS jitter, do any of the following:
|
||||||
3. Do any of the following needed to avoid jitter that your
|
3. Do any of the following needed to avoid jitter that your
|
||||||
application cannot tolerate:
|
application cannot tolerate:
|
||||||
|
|
||||||
a. Build your kernel with CONFIG_SLUB=y rather than
|
a. Avoid using oprofile, thus avoiding OS jitter from
|
||||||
CONFIG_SLAB=y, thus avoiding the slab allocator's periodic
|
|
||||||
use of each CPU's workqueues to run its cache_reap()
|
|
||||||
function.
|
|
||||||
b. Avoid using oprofile, thus avoiding OS jitter from
|
|
||||||
wq_sync_buffer().
|
wq_sync_buffer().
|
||||||
c. Limit your CPU frequency so that a CPU-frequency
|
b. Limit your CPU frequency so that a CPU-frequency
|
||||||
governor is not required, possibly enlisting the aid of
|
governor is not required, possibly enlisting the aid of
|
||||||
special heatsinks or other cooling technologies. If done
|
special heatsinks or other cooling technologies. If done
|
||||||
correctly, and if you CPU architecture permits, you should
|
correctly, and if you CPU architecture permits, you should
|
||||||
|
@ -259,7 +255,7 @@ To reduce its OS jitter, do any of the following:
|
||||||
|
|
||||||
WARNING: Please check your CPU specifications to
|
WARNING: Please check your CPU specifications to
|
||||||
make sure that this is safe on your particular system.
|
make sure that this is safe on your particular system.
|
||||||
d. As of v3.18, Christoph Lameter's on-demand vmstat workers
|
c. As of v3.18, Christoph Lameter's on-demand vmstat workers
|
||||||
commit prevents OS jitter due to vmstat_update() on
|
commit prevents OS jitter due to vmstat_update() on
|
||||||
CONFIG_SMP=y systems. Before v3.18, is not possible
|
CONFIG_SMP=y systems. Before v3.18, is not possible
|
||||||
to entirely get rid of the OS jitter, but you can
|
to entirely get rid of the OS jitter, but you can
|
||||||
|
@ -274,7 +270,7 @@ To reduce its OS jitter, do any of the following:
|
||||||
(based on an earlier one from Gilad Ben-Yossef) that
|
(based on an earlier one from Gilad Ben-Yossef) that
|
||||||
reduces or even eliminates vmstat overhead for some
|
reduces or even eliminates vmstat overhead for some
|
||||||
workloads at https://lore.kernel.org/r/00000140e9dfd6bd-40db3d4f-c1be-434f-8132-7820f81bb586-000000@email.amazonses.com.
|
workloads at https://lore.kernel.org/r/00000140e9dfd6bd-40db3d4f-c1be-434f-8132-7820f81bb586-000000@email.amazonses.com.
|
||||||
e. If running on high-end powerpc servers, build with
|
d. If running on high-end powerpc servers, build with
|
||||||
CONFIG_PPC_RTAS_DAEMON=n. This prevents the RTAS
|
CONFIG_PPC_RTAS_DAEMON=n. This prevents the RTAS
|
||||||
daemon from running on each CPU every second or so.
|
daemon from running on each CPU every second or so.
|
||||||
(This will require editing Kconfig files and will defeat
|
(This will require editing Kconfig files and will defeat
|
||||||
|
@ -282,12 +278,12 @@ To reduce its OS jitter, do any of the following:
|
||||||
due to the rtas_event_scan() function.
|
due to the rtas_event_scan() function.
|
||||||
WARNING: Please check your CPU specifications to
|
WARNING: Please check your CPU specifications to
|
||||||
make sure that this is safe on your particular system.
|
make sure that this is safe on your particular system.
|
||||||
f. If running on Cell Processor, build your kernel with
|
e. If running on Cell Processor, build your kernel with
|
||||||
CBE_CPUFREQ_SPU_GOVERNOR=n to avoid OS jitter from
|
CBE_CPUFREQ_SPU_GOVERNOR=n to avoid OS jitter from
|
||||||
spu_gov_work().
|
spu_gov_work().
|
||||||
WARNING: Please check your CPU specifications to
|
WARNING: Please check your CPU specifications to
|
||||||
make sure that this is safe on your particular system.
|
make sure that this is safe on your particular system.
|
||||||
g. If running on PowerMAC, build your kernel with
|
f. If running on PowerMAC, build your kernel with
|
||||||
CONFIG_PMAC_RACKMETER=n to disable the CPU-meter,
|
CONFIG_PMAC_RACKMETER=n to disable the CPU-meter,
|
||||||
avoiding OS jitter from rackmeter_do_timer().
|
avoiding OS jitter from rackmeter_do_timer().
|
||||||
|
|
||||||
|
|
|
@ -671,8 +671,23 @@ Testing Static Functions
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
If we do not want to expose functions or variables for testing, one option is to
|
If we do not want to expose functions or variables for testing, one option is to
|
||||||
conditionally ``#include`` the test file at the end of your .c file. For
|
conditionally export the used symbol. For example:
|
||||||
example:
|
|
||||||
|
.. code-block:: c
|
||||||
|
|
||||||
|
/* In my_file.c */
|
||||||
|
|
||||||
|
VISIBLE_IF_KUNIT int do_interesting_thing();
|
||||||
|
EXPORT_SYMBOL_IF_KUNIT(do_interesting_thing);
|
||||||
|
|
||||||
|
/* In my_file.h */
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_KUNIT)
|
||||||
|
int do_interesting_thing(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Alternatively, you could conditionally ``#include`` the test file at the end of
|
||||||
|
your .c file. For example:
|
||||||
|
|
||||||
.. code-block:: c
|
.. code-block:: c
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ allOf:
|
||||||
clocks:
|
clocks:
|
||||||
minItems: 6
|
minItems: 6
|
||||||
maxItems: 6
|
maxItems: 6
|
||||||
regs:
|
reg:
|
||||||
minItems: 2
|
minItems: 2
|
||||||
maxItems: 2
|
maxItems: 2
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ allOf:
|
||||||
clocks:
|
clocks:
|
||||||
minItems: 4
|
minItems: 4
|
||||||
maxItems: 4
|
maxItems: 4
|
||||||
regs:
|
reg:
|
||||||
minItems: 2
|
minItems: 2
|
||||||
maxItems: 2
|
maxItems: 2
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ allOf:
|
||||||
clocks:
|
clocks:
|
||||||
minItems: 3
|
minItems: 3
|
||||||
maxItems: 3
|
maxItems: 3
|
||||||
regs:
|
reg:
|
||||||
minItems: 1
|
minItems: 1
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ properties:
|
||||||
compatible:
|
compatible:
|
||||||
items:
|
items:
|
||||||
- enum:
|
- enum:
|
||||||
- ti,k3-j721s2-wave521c
|
- ti,j721s2-wave521c
|
||||||
- const: cnm,wave521c
|
- const: cnm,wave521c
|
||||||
|
|
||||||
reg:
|
reg:
|
||||||
|
@ -53,7 +53,7 @@ additionalProperties: false
|
||||||
examples:
|
examples:
|
||||||
- |
|
- |
|
||||||
vpu: video-codec@12345678 {
|
vpu: video-codec@12345678 {
|
||||||
compatible = "ti,k3-j721s2-wave521c", "cnm,wave521c";
|
compatible = "ti,j721s2-wave521c", "cnm,wave521c";
|
||||||
reg = <0x12345678 0x1000>;
|
reg = <0x12345678 0x1000>;
|
||||||
clocks = <&clks 42>;
|
clocks = <&clks 42>;
|
||||||
interrupts = <42>;
|
interrupts = <42>;
|
||||||
|
|
|
@ -942,6 +942,10 @@ attribute-sets:
|
||||||
-
|
-
|
||||||
name: gro-ipv4-max-size
|
name: gro-ipv4-max-size
|
||||||
type: u32
|
type: u32
|
||||||
|
-
|
||||||
|
name: dpll-pin
|
||||||
|
type: nest
|
||||||
|
nested-attributes: link-dpll-pin-attrs
|
||||||
-
|
-
|
||||||
name: af-spec-attrs
|
name: af-spec-attrs
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -1627,6 +1631,12 @@ attribute-sets:
|
||||||
-
|
-
|
||||||
name: used
|
name: used
|
||||||
type: u8
|
type: u8
|
||||||
|
-
|
||||||
|
name: link-dpll-pin-attrs
|
||||||
|
attributes:
|
||||||
|
-
|
||||||
|
name: id
|
||||||
|
type: u32
|
||||||
|
|
||||||
sub-messages:
|
sub-messages:
|
||||||
-
|
-
|
||||||
|
|
|
@ -12,5 +12,7 @@
|
||||||
<script type="text/javascript"> <!--
|
<script type="text/javascript"> <!--
|
||||||
var sbar = document.getElementsByClassName("sphinxsidebar")[0];
|
var sbar = document.getElementsByClassName("sphinxsidebar")[0];
|
||||||
let currents = document.getElementsByClassName("current")
|
let currents = document.getElementsByClassName("current")
|
||||||
sbar.scrollTop = currents[currents.length - 1].offsetTop;
|
if (currents.length) {
|
||||||
|
sbar.scrollTop = currents[currents.length - 1].offsetTop;
|
||||||
|
}
|
||||||
--> </script>
|
--> </script>
|
||||||
|
|
23
MAINTAINERS
23
MAINTAINERS
|
@ -3168,10 +3168,10 @@ F: drivers/hwmon/asus-ec-sensors.c
|
||||||
|
|
||||||
ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS
|
ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS
|
||||||
M: Corentin Chary <corentin.chary@gmail.com>
|
M: Corentin Chary <corentin.chary@gmail.com>
|
||||||
L: acpi4asus-user@lists.sourceforge.net
|
M: Luke D. Jones <luke@ljones.dev>
|
||||||
L: platform-driver-x86@vger.kernel.org
|
L: platform-driver-x86@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
W: http://acpi4asus.sf.net
|
W: https://asus-linux.org/
|
||||||
F: drivers/platform/x86/asus*.c
|
F: drivers/platform/x86/asus*.c
|
||||||
F: drivers/platform/x86/eeepc*.c
|
F: drivers/platform/x86/eeepc*.c
|
||||||
|
|
||||||
|
@ -5961,7 +5961,6 @@ S: Maintained
|
||||||
F: drivers/platform/x86/dell/dell-wmi-descriptor.c
|
F: drivers/platform/x86/dell/dell-wmi-descriptor.c
|
||||||
|
|
||||||
DELL WMI HARDWARE PRIVACY SUPPORT
|
DELL WMI HARDWARE PRIVACY SUPPORT
|
||||||
M: Perry Yuan <Perry.Yuan@dell.com>
|
|
||||||
L: Dell.Client.Kernel@dell.com
|
L: Dell.Client.Kernel@dell.com
|
||||||
L: platform-driver-x86@vger.kernel.org
|
L: platform-driver-x86@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
@ -10287,7 +10286,7 @@ F: drivers/scsi/ibmvscsi/ibmvscsi*
|
||||||
F: include/scsi/viosrp.h
|
F: include/scsi/viosrp.h
|
||||||
|
|
||||||
IBM Power Virtual SCSI Device Target Driver
|
IBM Power Virtual SCSI Device Target Driver
|
||||||
M: Michael Cyr <mikecyr@linux.ibm.com>
|
M: Tyrel Datwyler <tyreld@linux.ibm.com>
|
||||||
L: linux-scsi@vger.kernel.org
|
L: linux-scsi@vger.kernel.org
|
||||||
L: target-devel@vger.kernel.org
|
L: target-devel@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
|
@ -11729,6 +11728,7 @@ F: fs/smb/server/
|
||||||
KERNEL UNIT TESTING FRAMEWORK (KUnit)
|
KERNEL UNIT TESTING FRAMEWORK (KUnit)
|
||||||
M: Brendan Higgins <brendanhiggins@google.com>
|
M: Brendan Higgins <brendanhiggins@google.com>
|
||||||
M: David Gow <davidgow@google.com>
|
M: David Gow <davidgow@google.com>
|
||||||
|
R: Rae Moar <rmoar@google.com>
|
||||||
L: linux-kselftest@vger.kernel.org
|
L: linux-kselftest@vger.kernel.org
|
||||||
L: kunit-dev@googlegroups.com
|
L: kunit-dev@googlegroups.com
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
@ -12907,6 +12907,8 @@ M: Alejandro Colomar <alx@kernel.org>
|
||||||
L: linux-man@vger.kernel.org
|
L: linux-man@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
W: http://www.kernel.org/doc/man-pages
|
W: http://www.kernel.org/doc/man-pages
|
||||||
|
T: git git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git
|
||||||
|
T: git git://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git
|
||||||
|
|
||||||
MANAGEMENT COMPONENT TRANSPORT PROTOCOL (MCTP)
|
MANAGEMENT COMPONENT TRANSPORT PROTOCOL (MCTP)
|
||||||
M: Jeremy Kerr <jk@codeconstruct.com.au>
|
M: Jeremy Kerr <jk@codeconstruct.com.au>
|
||||||
|
@ -15182,6 +15184,7 @@ F: Documentation/networking/net_cachelines/net_device.rst
|
||||||
F: drivers/connector/
|
F: drivers/connector/
|
||||||
F: drivers/net/
|
F: drivers/net/
|
||||||
F: include/dt-bindings/net/
|
F: include/dt-bindings/net/
|
||||||
|
F: include/linux/cn_proc.h
|
||||||
F: include/linux/etherdevice.h
|
F: include/linux/etherdevice.h
|
||||||
F: include/linux/fcdevice.h
|
F: include/linux/fcdevice.h
|
||||||
F: include/linux/fddidevice.h
|
F: include/linux/fddidevice.h
|
||||||
|
@ -15189,6 +15192,7 @@ F: include/linux/hippidevice.h
|
||||||
F: include/linux/if_*
|
F: include/linux/if_*
|
||||||
F: include/linux/inetdevice.h
|
F: include/linux/inetdevice.h
|
||||||
F: include/linux/netdevice.h
|
F: include/linux/netdevice.h
|
||||||
|
F: include/uapi/linux/cn_proc.h
|
||||||
F: include/uapi/linux/if_*
|
F: include/uapi/linux/if_*
|
||||||
F: include/uapi/linux/netdevice.h
|
F: include/uapi/linux/netdevice.h
|
||||||
X: drivers/net/wireless/
|
X: drivers/net/wireless/
|
||||||
|
@ -18093,7 +18097,6 @@ F: drivers/net/ethernet/qualcomm/emac/
|
||||||
|
|
||||||
QUALCOMM ETHQOS ETHERNET DRIVER
|
QUALCOMM ETHQOS ETHERNET DRIVER
|
||||||
M: Vinod Koul <vkoul@kernel.org>
|
M: Vinod Koul <vkoul@kernel.org>
|
||||||
R: Bhupesh Sharma <bhupesh.sharma@linaro.org>
|
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
L: linux-arm-msm@vger.kernel.org
|
L: linux-arm-msm@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
@ -20561,6 +20564,7 @@ F: Documentation/translations/sp_SP/
|
||||||
|
|
||||||
SPARC + UltraSPARC (sparc/sparc64)
|
SPARC + UltraSPARC (sparc/sparc64)
|
||||||
M: "David S. Miller" <davem@davemloft.net>
|
M: "David S. Miller" <davem@davemloft.net>
|
||||||
|
M: Andreas Larsson <andreas@gaisler.com>
|
||||||
L: sparclinux@vger.kernel.org
|
L: sparclinux@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
Q: http://patchwork.ozlabs.org/project/sparclinux/list/
|
Q: http://patchwork.ozlabs.org/project/sparclinux/list/
|
||||||
|
@ -24351,13 +24355,6 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs.git
|
||||||
F: Documentation/filesystems/zonefs.rst
|
F: Documentation/filesystems/zonefs.rst
|
||||||
F: fs/zonefs/
|
F: fs/zonefs/
|
||||||
|
|
||||||
ZPOOL COMPRESSED PAGE STORAGE API
|
|
||||||
M: Dan Streetman <ddstreet@ieee.org>
|
|
||||||
L: linux-mm@kvack.org
|
|
||||||
S: Maintained
|
|
||||||
F: include/linux/zpool.h
|
|
||||||
F: mm/zpool.c
|
|
||||||
|
|
||||||
ZR36067 VIDEO FOR LINUX DRIVER
|
ZR36067 VIDEO FOR LINUX DRIVER
|
||||||
M: Corentin Labbe <clabbe@baylibre.com>
|
M: Corentin Labbe <clabbe@baylibre.com>
|
||||||
L: mjpeg-users@lists.sourceforge.net
|
L: mjpeg-users@lists.sourceforge.net
|
||||||
|
@ -24409,7 +24406,9 @@ M: Nhat Pham <nphamcs@gmail.com>
|
||||||
L: linux-mm@kvack.org
|
L: linux-mm@kvack.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: Documentation/admin-guide/mm/zswap.rst
|
F: Documentation/admin-guide/mm/zswap.rst
|
||||||
|
F: include/linux/zpool.h
|
||||||
F: include/linux/zswap.h
|
F: include/linux/zswap.h
|
||||||
|
F: mm/zpool.c
|
||||||
F: mm/zswap.c
|
F: mm/zswap.c
|
||||||
|
|
||||||
THE REST
|
THE REST
|
||||||
|
|
16
Makefile
16
Makefile
|
@ -2,7 +2,7 @@
|
||||||
VERSION = 6
|
VERSION = 6
|
||||||
PATCHLEVEL = 8
|
PATCHLEVEL = 8
|
||||||
SUBLEVEL = 0
|
SUBLEVEL = 0
|
||||||
EXTRAVERSION = -rc1
|
EXTRAVERSION = -rc2
|
||||||
NAME = Hurr durr I'ma ninja sloth
|
NAME = Hurr durr I'ma ninja sloth
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
|
@ -294,15 +294,15 @@ may-sync-config := 1
|
||||||
single-build :=
|
single-build :=
|
||||||
|
|
||||||
ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),)
|
ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),)
|
||||||
ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
|
ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
|
||||||
need-config :=
|
need-config :=
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(filter $(no-sync-config-targets), $(MAKECMDGOALS)),)
|
ifneq ($(filter $(no-sync-config-targets), $(MAKECMDGOALS)),)
|
||||||
ifeq ($(filter-out $(no-sync-config-targets), $(MAKECMDGOALS)),)
|
ifeq ($(filter-out $(no-sync-config-targets), $(MAKECMDGOALS)),)
|
||||||
may-sync-config :=
|
may-sync-config :=
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
need-compiler := $(may-sync-config)
|
need-compiler := $(may-sync-config)
|
||||||
|
@ -323,9 +323,9 @@ endif
|
||||||
# We cannot build single targets and the others at the same time
|
# We cannot build single targets and the others at the same time
|
||||||
ifneq ($(filter $(single-targets), $(MAKECMDGOALS)),)
|
ifneq ($(filter $(single-targets), $(MAKECMDGOALS)),)
|
||||||
single-build := 1
|
single-build := 1
|
||||||
ifneq ($(filter-out $(single-targets), $(MAKECMDGOALS)),)
|
ifneq ($(filter-out $(single-targets), $(MAKECMDGOALS)),)
|
||||||
mixed-build := 1
|
mixed-build := 1
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# For "make -j clean all", "make -j mrproper defconfig all", etc.
|
# For "make -j clean all", "make -j mrproper defconfig all", etc.
|
||||||
|
@ -1666,7 +1666,7 @@ help:
|
||||||
@echo ' (sparse by default)'
|
@echo ' (sparse by default)'
|
||||||
@echo ' make C=2 [targets] Force check of all c source with $$CHECK'
|
@echo ' make C=2 [targets] Force check of all c source with $$CHECK'
|
||||||
@echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections'
|
@echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections'
|
||||||
@echo ' make W=n [targets] Enable extra build checks, n=1,2,3 where'
|
@echo ' make W=n [targets] Enable extra build checks, n=1,2,3,c,e where'
|
||||||
@echo ' 1: warnings which may be relevant and do not occur too often'
|
@echo ' 1: warnings which may be relevant and do not occur too often'
|
||||||
@echo ' 2: warnings which occur quite often but may still be relevant'
|
@echo ' 2: warnings which occur quite often but may still be relevant'
|
||||||
@echo ' 3: more obscure warnings, can most likely be ignored'
|
@echo ' 3: more obscure warnings, can most likely be ignored'
|
||||||
|
|
|
@ -673,6 +673,7 @@ config SHADOW_CALL_STACK
|
||||||
bool "Shadow Call Stack"
|
bool "Shadow Call Stack"
|
||||||
depends on ARCH_SUPPORTS_SHADOW_CALL_STACK
|
depends on ARCH_SUPPORTS_SHADOW_CALL_STACK
|
||||||
depends on DYNAMIC_FTRACE_WITH_ARGS || DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER
|
depends on DYNAMIC_FTRACE_WITH_ARGS || DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER
|
||||||
|
depends on MMU
|
||||||
help
|
help
|
||||||
This option enables the compiler's Shadow Call Stack, which
|
This option enables the compiler's Shadow Call Stack, which
|
||||||
uses a shadow stack to protect function return addresses from
|
uses a shadow stack to protect function return addresses from
|
||||||
|
|
|
@ -45,8 +45,8 @@ spi1_gpio: spi1-gpio {
|
||||||
num-chipselects = <1>;
|
num-chipselects = <1>;
|
||||||
cs-gpios = <&gpio0 ASPEED_GPIO(Z, 0) GPIO_ACTIVE_LOW>;
|
cs-gpios = <&gpio0 ASPEED_GPIO(Z, 0) GPIO_ACTIVE_LOW>;
|
||||||
|
|
||||||
tpmdev@0 {
|
tpm@0 {
|
||||||
compatible = "tcg,tpm_tis-spi";
|
compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
|
||||||
spi-max-frequency = <33000000>;
|
spi-max-frequency = <33000000>;
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -80,8 +80,8 @@ spi_gpio: spi {
|
||||||
gpio-miso = <&gpio ASPEED_GPIO(R, 5) GPIO_ACTIVE_HIGH>;
|
gpio-miso = <&gpio ASPEED_GPIO(R, 5) GPIO_ACTIVE_HIGH>;
|
||||||
num-chipselects = <1>;
|
num-chipselects = <1>;
|
||||||
|
|
||||||
tpmdev@0 {
|
tpm@0 {
|
||||||
compatible = "tcg,tpm_tis-spi";
|
compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
|
||||||
spi-max-frequency = <33000000>;
|
spi-max-frequency = <33000000>;
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -456,7 +456,7 @@ &i2c1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
tpm: tpm@2e {
|
tpm: tpm@2e {
|
||||||
compatible = "tcg,tpm-tis-i2c";
|
compatible = "nuvoton,npct75x", "tcg,tpm-tis-i2c";
|
||||||
reg = <0x2e>;
|
reg = <0x2e>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -35,8 +35,8 @@ spi_gpio: spi {
|
||||||
gpio-mosi = <&gpio0 ASPEED_GPIO(X, 4) GPIO_ACTIVE_HIGH>;
|
gpio-mosi = <&gpio0 ASPEED_GPIO(X, 4) GPIO_ACTIVE_HIGH>;
|
||||||
gpio-miso = <&gpio0 ASPEED_GPIO(X, 5) GPIO_ACTIVE_HIGH>;
|
gpio-miso = <&gpio0 ASPEED_GPIO(X, 5) GPIO_ACTIVE_HIGH>;
|
||||||
|
|
||||||
tpmdev@0 {
|
tpm@0 {
|
||||||
compatible = "tcg,tpm_tis-spi";
|
compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
|
||||||
spi-max-frequency = <33000000>;
|
spi-max-frequency = <33000000>;
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -116,7 +116,7 @@ &ecspi1 {
|
||||||
tpm_tis: tpm@1 {
|
tpm_tis: tpm@1 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pinctrl_tpm>;
|
pinctrl-0 = <&pinctrl_tpm>;
|
||||||
compatible = "tcg,tpm_tis-spi";
|
compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
|
||||||
reg = <1>;
|
reg = <1>;
|
||||||
spi-max-frequency = <20000000>;
|
spi-max-frequency = <20000000>;
|
||||||
interrupt-parent = <&gpio5>;
|
interrupt-parent = <&gpio5>;
|
||||||
|
|
|
@ -130,7 +130,7 @@ &ecspi4 {
|
||||||
* TCG specification - Section 6.4.1 Clocking:
|
* TCG specification - Section 6.4.1 Clocking:
|
||||||
* TPM shall support a SPI clock frequency range of 10-24 MHz.
|
* TPM shall support a SPI clock frequency range of 10-24 MHz.
|
||||||
*/
|
*/
|
||||||
st33htph: tpm-tis@0 {
|
st33htph: tpm@0 {
|
||||||
compatible = "st,st33htpm-spi", "tcg,tpm_tis-spi";
|
compatible = "st,st33htpm-spi", "tcg,tpm_tis-spi";
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
spi-max-frequency = <24000000>;
|
spi-max-frequency = <24000000>;
|
||||||
|
|
|
@ -434,6 +434,7 @@ &exynos_usbphy {
|
||||||
};
|
};
|
||||||
|
|
||||||
&fimd {
|
&fimd {
|
||||||
|
samsung,invert-vclk;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -217,7 +217,7 @@ &spi1 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&spi1_pins>;
|
pinctrl-0 = <&spi1_pins>;
|
||||||
|
|
||||||
tpm_spi_tis@0 {
|
tpm@0 {
|
||||||
compatible = "tcg,tpm_tis-spi";
|
compatible = "tcg,tpm_tis-spi";
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
spi-max-frequency = <500000>;
|
spi-max-frequency = <500000>;
|
||||||
|
|
|
@ -289,7 +289,7 @@ cmu_misc: clock-controller@10010000 {
|
||||||
#clock-cells = <1>;
|
#clock-cells = <1>;
|
||||||
clocks = <&cmu_top CLK_DOUT_CMU_MISC_BUS>,
|
clocks = <&cmu_top CLK_DOUT_CMU_MISC_BUS>,
|
||||||
<&cmu_top CLK_DOUT_CMU_MISC_SSS>;
|
<&cmu_top CLK_DOUT_CMU_MISC_SSS>;
|
||||||
clock-names = "dout_cmu_misc_bus", "dout_cmu_misc_sss";
|
clock-names = "bus", "sss";
|
||||||
};
|
};
|
||||||
|
|
||||||
watchdog_cl0: watchdog@10060000 {
|
watchdog_cl0: watchdog@10060000 {
|
||||||
|
|
|
@ -120,7 +120,7 @@ can0: can@0 {
|
||||||
};
|
};
|
||||||
|
|
||||||
tpm: tpm@1 {
|
tpm: tpm@1 {
|
||||||
compatible = "tcg,tpm_tis-spi";
|
compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
|
||||||
interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
|
interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
|
||||||
interrupt-parent = <&gpio2>;
|
interrupt-parent = <&gpio2>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
|
|
|
@ -89,7 +89,7 @@ &ecspi2 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
tpm@1 {
|
tpm@1 {
|
||||||
compatible = "tcg,tpm_tis-spi";
|
compatible = "atmel,attpm20p", "tcg,tpm_tis-spi";
|
||||||
reg = <0x1>;
|
reg = <0x1>;
|
||||||
spi-max-frequency = <36000000>;
|
spi-max-frequency = <36000000>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -109,7 +109,7 @@ &ecspi2 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
tpm@1 {
|
tpm@1 {
|
||||||
compatible = "tcg,tpm_tis-spi";
|
compatible = "atmel,attpm20p", "tcg,tpm_tis-spi";
|
||||||
reg = <0x1>;
|
reg = <0x1>;
|
||||||
spi-max-frequency = <36000000>;
|
spi-max-frequency = <36000000>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -234,7 +234,7 @@ &ecspi2 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
tpm: tpm@0 {
|
tpm: tpm@0 {
|
||||||
compatible = "infineon,slb9670";
|
compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pinctrl_tpm>;
|
pinctrl-0 = <&pinctrl_tpm>;
|
||||||
|
|
|
@ -103,7 +103,7 @@ &ecspi2 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
tpm@1 {
|
tpm@1 {
|
||||||
compatible = "tcg,tpm_tis-spi";
|
compatible = "atmel,attpm20p", "tcg,tpm_tis-spi";
|
||||||
reg = <0x1>;
|
reg = <0x1>;
|
||||||
spi-max-frequency = <36000000>;
|
spi-max-frequency = <36000000>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -115,7 +115,7 @@ &ecspi2 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
tpm@1 {
|
tpm@1 {
|
||||||
compatible = "tcg,tpm_tis-spi";
|
compatible = "atmel,attpm20p", "tcg,tpm_tis-spi";
|
||||||
reg = <0x1>;
|
reg = <0x1>;
|
||||||
spi-max-frequency = <36000000>;
|
spi-max-frequency = <36000000>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -196,7 +196,7 @@ &ecspi1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
tpm@0 {
|
tpm@0 {
|
||||||
compatible = "tcg,tpm_tis-spi";
|
compatible = "atmel,attpm20p", "tcg,tpm_tis-spi";
|
||||||
reg = <0x0>;
|
reg = <0x0>;
|
||||||
spi-max-frequency = <36000000>;
|
spi-max-frequency = <36000000>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -65,7 +65,7 @@ &ecspi2 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
tpm@0 {
|
tpm@0 {
|
||||||
compatible = "infineon,slb9670";
|
compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
spi-max-frequency = <43000000>;
|
spi-max-frequency = <43000000>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -888,7 +888,7 @@ &spi0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
cs-gpios = <&pio 86 GPIO_ACTIVE_LOW>;
|
cs-gpios = <&pio 86 GPIO_ACTIVE_LOW>;
|
||||||
|
|
||||||
cr50@0 {
|
tpm@0 {
|
||||||
compatible = "google,cr50";
|
compatible = "google,cr50";
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
spi-max-frequency = <1000000>;
|
spi-max-frequency = <1000000>;
|
||||||
|
|
|
@ -1402,7 +1402,7 @@ &spi5 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&spi5_pins>;
|
pinctrl-0 = <&spi5_pins>;
|
||||||
|
|
||||||
cr50@0 {
|
tpm@0 {
|
||||||
compatible = "google,cr50";
|
compatible = "google,cr50";
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
interrupts-extended = <&pio 171 IRQ_TYPE_EDGE_RISING>;
|
interrupts-extended = <&pio 171 IRQ_TYPE_EDGE_RISING>;
|
||||||
|
|
|
@ -70,7 +70,7 @@ &cpu_alert1 {
|
||||||
&spi0 {
|
&spi0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
cr50@0 {
|
tpm@0 {
|
||||||
compatible = "google,cr50";
|
compatible = "google,cr50";
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
interrupt-parent = <&gpio0>;
|
interrupt-parent = <&gpio0>;
|
||||||
|
|
|
@ -706,7 +706,7 @@ &sound {
|
||||||
&spi2 {
|
&spi2 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
cr50@0 {
|
tpm@0 {
|
||||||
compatible = "google,cr50";
|
compatible = "google,cr50";
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
interrupt-parent = <&gpio1>;
|
interrupt-parent = <&gpio1>;
|
||||||
|
|
|
@ -60,7 +60,7 @@ int kvm_own_lsx(struct kvm_vcpu *vcpu);
|
||||||
void kvm_save_lsx(struct loongarch_fpu *fpu);
|
void kvm_save_lsx(struct loongarch_fpu *fpu);
|
||||||
void kvm_restore_lsx(struct loongarch_fpu *fpu);
|
void kvm_restore_lsx(struct loongarch_fpu *fpu);
|
||||||
#else
|
#else
|
||||||
static inline int kvm_own_lsx(struct kvm_vcpu *vcpu) { }
|
static inline int kvm_own_lsx(struct kvm_vcpu *vcpu) { return -EINVAL; }
|
||||||
static inline void kvm_save_lsx(struct loongarch_fpu *fpu) { }
|
static inline void kvm_save_lsx(struct loongarch_fpu *fpu) { }
|
||||||
static inline void kvm_restore_lsx(struct loongarch_fpu *fpu) { }
|
static inline void kvm_restore_lsx(struct loongarch_fpu *fpu) { }
|
||||||
#endif
|
#endif
|
||||||
|
@ -70,7 +70,7 @@ int kvm_own_lasx(struct kvm_vcpu *vcpu);
|
||||||
void kvm_save_lasx(struct loongarch_fpu *fpu);
|
void kvm_save_lasx(struct loongarch_fpu *fpu);
|
||||||
void kvm_restore_lasx(struct loongarch_fpu *fpu);
|
void kvm_restore_lasx(struct loongarch_fpu *fpu);
|
||||||
#else
|
#else
|
||||||
static inline int kvm_own_lasx(struct kvm_vcpu *vcpu) { }
|
static inline int kvm_own_lasx(struct kvm_vcpu *vcpu) { return -EINVAL; }
|
||||||
static inline void kvm_save_lasx(struct loongarch_fpu *fpu) { }
|
static inline void kvm_save_lasx(struct loongarch_fpu *fpu) { }
|
||||||
static inline void kvm_restore_lasx(struct loongarch_fpu *fpu) { }
|
static inline void kvm_restore_lasx(struct loongarch_fpu *fpu) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -509,7 +509,6 @@ asmlinkage void start_secondary(void)
|
||||||
sync_counter();
|
sync_counter();
|
||||||
cpu = raw_smp_processor_id();
|
cpu = raw_smp_processor_id();
|
||||||
set_my_cpu_offset(per_cpu_offset(cpu));
|
set_my_cpu_offset(per_cpu_offset(cpu));
|
||||||
rcutree_report_cpu_starting(cpu);
|
|
||||||
|
|
||||||
cpu_probe();
|
cpu_probe();
|
||||||
constant_clockevent_init();
|
constant_clockevent_init();
|
||||||
|
|
|
@ -675,7 +675,7 @@ static bool fault_supports_huge_mapping(struct kvm_memory_slot *memslot,
|
||||||
*
|
*
|
||||||
* There are several ways to safely use this helper:
|
* There are several ways to safely use this helper:
|
||||||
*
|
*
|
||||||
* - Check mmu_invalidate_retry_hva() after grabbing the mapping level, before
|
* - Check mmu_invalidate_retry_gfn() after grabbing the mapping level, before
|
||||||
* consuming it. In this case, mmu_lock doesn't need to be held during the
|
* consuming it. In this case, mmu_lock doesn't need to be held during the
|
||||||
* lookup, but it does need to be held while checking the MMU notifier.
|
* lookup, but it does need to be held while checking the MMU notifier.
|
||||||
*
|
*
|
||||||
|
@ -855,7 +855,7 @@ static int kvm_map_page(struct kvm_vcpu *vcpu, unsigned long gpa, bool write)
|
||||||
|
|
||||||
/* Check if an invalidation has taken place since we got pfn */
|
/* Check if an invalidation has taken place since we got pfn */
|
||||||
spin_lock(&kvm->mmu_lock);
|
spin_lock(&kvm->mmu_lock);
|
||||||
if (mmu_invalidate_retry_hva(kvm, mmu_seq, hva)) {
|
if (mmu_invalidate_retry_gfn(kvm, mmu_seq, gfn)) {
|
||||||
/*
|
/*
|
||||||
* This can happen when mappings are changed asynchronously, but
|
* This can happen when mappings are changed asynchronously, but
|
||||||
* also synchronously if a COW is triggered by
|
* also synchronously if a COW is triggered by
|
||||||
|
|
|
@ -284,12 +284,16 @@ static void setup_tlb_handler(int cpu)
|
||||||
set_handler(EXCCODE_TLBNR * VECSIZE, handle_tlb_protect, VECSIZE);
|
set_handler(EXCCODE_TLBNR * VECSIZE, handle_tlb_protect, VECSIZE);
|
||||||
set_handler(EXCCODE_TLBNX * VECSIZE, handle_tlb_protect, VECSIZE);
|
set_handler(EXCCODE_TLBNX * VECSIZE, handle_tlb_protect, VECSIZE);
|
||||||
set_handler(EXCCODE_TLBPE * VECSIZE, handle_tlb_protect, VECSIZE);
|
set_handler(EXCCODE_TLBPE * VECSIZE, handle_tlb_protect, VECSIZE);
|
||||||
}
|
} else {
|
||||||
|
int vec_sz __maybe_unused;
|
||||||
|
void *addr __maybe_unused;
|
||||||
|
struct page *page __maybe_unused;
|
||||||
|
|
||||||
|
/* Avoid lockdep warning */
|
||||||
|
rcutree_report_cpu_starting(cpu);
|
||||||
|
|
||||||
#ifdef CONFIG_NUMA
|
#ifdef CONFIG_NUMA
|
||||||
else {
|
vec_sz = sizeof(exception_handlers);
|
||||||
void *addr;
|
|
||||||
struct page *page;
|
|
||||||
const int vec_sz = sizeof(exception_handlers);
|
|
||||||
|
|
||||||
if (pcpu_handlers[cpu])
|
if (pcpu_handlers[cpu])
|
||||||
return;
|
return;
|
||||||
|
@ -305,8 +309,8 @@ static void setup_tlb_handler(int cpu)
|
||||||
csr_write64(pcpu_handlers[cpu], LOONGARCH_CSR_EENTRY);
|
csr_write64(pcpu_handlers[cpu], LOONGARCH_CSR_EENTRY);
|
||||||
csr_write64(pcpu_handlers[cpu], LOONGARCH_CSR_MERRENTRY);
|
csr_write64(pcpu_handlers[cpu], LOONGARCH_CSR_MERRENTRY);
|
||||||
csr_write64(pcpu_handlers[cpu] + 80*VECSIZE, LOONGARCH_CSR_TLBRENTRY);
|
csr_write64(pcpu_handlers[cpu] + 80*VECSIZE, LOONGARCH_CSR_TLBRENTRY);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void tlb_init(int cpu)
|
void tlb_init(int cpu)
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
KBUILD_DEFCONFIG := multi_defconfig
|
KBUILD_DEFCONFIG := multi_defconfig
|
||||||
|
|
||||||
ifdef cross_compiling
|
ifdef cross_compiling
|
||||||
ifeq ($(CROSS_COMPILE),)
|
ifeq ($(CROSS_COMPILE),)
|
||||||
CROSS_COMPILE := $(call cc-cross-prefix, \
|
CROSS_COMPILE := $(call cc-cross-prefix, \
|
||||||
m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
|
m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include <linux/string.h>
|
#include <linux/string.h>
|
||||||
|
|
||||||
#include <asm/bootinfo.h>
|
#include <asm/bootinfo.h>
|
||||||
|
#include <prom.h>
|
||||||
|
|
||||||
int prom_argc;
|
int prom_argc;
|
||||||
char **prom_argv;
|
char **prom_argv;
|
||||||
|
|
|
@ -30,13 +30,11 @@
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/dma-map-ops.h> /* for dma_default_coherent */
|
#include <linux/dma-map-ops.h> /* for dma_default_coherent */
|
||||||
|
|
||||||
|
#include <asm/bootinfo.h>
|
||||||
#include <asm/mipsregs.h>
|
#include <asm/mipsregs.h>
|
||||||
|
|
||||||
#include <au1000.h>
|
#include <au1000.h>
|
||||||
|
|
||||||
extern void __init board_setup(void);
|
|
||||||
extern void __init alchemy_set_lpj(void);
|
|
||||||
|
|
||||||
static bool alchemy_dma_coherent(void)
|
static bool alchemy_dma_coherent(void)
|
||||||
{
|
{
|
||||||
switch (alchemy_get_cputype()) {
|
switch (alchemy_get_cputype()) {
|
||||||
|
|
|
@ -702,7 +702,7 @@ static struct ssb_sprom bcm63xx_sprom = {
|
||||||
.boardflags_hi = 0x0000,
|
.boardflags_hi = 0x0000,
|
||||||
};
|
};
|
||||||
|
|
||||||
int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out)
|
static int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out)
|
||||||
{
|
{
|
||||||
if (bus->bustype == SSB_BUSTYPE_PCI) {
|
if (bus->bustype == SSB_BUSTYPE_PCI) {
|
||||||
memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom));
|
memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom));
|
||||||
|
|
|
@ -26,7 +26,7 @@ static struct platform_device bcm63xx_rng_device = {
|
||||||
.resource = rng_resources,
|
.resource = rng_resources,
|
||||||
};
|
};
|
||||||
|
|
||||||
int __init bcm63xx_rng_register(void)
|
static int __init bcm63xx_rng_register(void)
|
||||||
{
|
{
|
||||||
if (!BCMCPU_IS_6368())
|
if (!BCMCPU_IS_6368())
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <bcm63xx_cpu.h>
|
#include <bcm63xx_cpu.h>
|
||||||
|
#include <bcm63xx_dev_uart.h>
|
||||||
|
|
||||||
static struct resource uart0_resources[] = {
|
static struct resource uart0_resources[] = {
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,7 +34,7 @@ static struct platform_device bcm63xx_wdt_device = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
int __init bcm63xx_wdt_register(void)
|
static int __init bcm63xx_wdt_register(void)
|
||||||
{
|
{
|
||||||
wdt_resources[0].start = bcm63xx_regset_address(RSET_WDT);
|
wdt_resources[0].start = bcm63xx_regset_address(RSET_WDT);
|
||||||
wdt_resources[0].end = wdt_resources[0].start;
|
wdt_resources[0].end = wdt_resources[0].start;
|
||||||
|
|
|
@ -72,7 +72,7 @@ static inline int enable_irq_for_cpu(int cpu, struct irq_data *d,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define BUILD_IPIC_INTERNAL(width) \
|
#define BUILD_IPIC_INTERNAL(width) \
|
||||||
void __dispatch_internal_##width(int cpu) \
|
static void __dispatch_internal_##width(int cpu) \
|
||||||
{ \
|
{ \
|
||||||
u32 pending[width / 32]; \
|
u32 pending[width / 32]; \
|
||||||
unsigned int src, tgt; \
|
unsigned int src, tgt; \
|
||||||
|
|
|
@ -159,7 +159,7 @@ void __init plat_mem_setup(void)
|
||||||
board_setup();
|
board_setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
int __init bcm63xx_register_devices(void)
|
static int __init bcm63xx_register_devices(void)
|
||||||
{
|
{
|
||||||
/* register gpiochip */
|
/* register gpiochip */
|
||||||
bcm63xx_gpio_init();
|
bcm63xx_gpio_init();
|
||||||
|
|
|
@ -178,7 +178,7 @@ int bcm63xx_timer_set(int id, int monotonic, unsigned int countdown_us)
|
||||||
|
|
||||||
EXPORT_SYMBOL(bcm63xx_timer_set);
|
EXPORT_SYMBOL(bcm63xx_timer_set);
|
||||||
|
|
||||||
int bcm63xx_timer_init(void)
|
static int bcm63xx_timer_init(void)
|
||||||
{
|
{
|
||||||
int ret, irq;
|
int ret, irq;
|
||||||
u32 reg;
|
u32 reg;
|
||||||
|
|
|
@ -23,9 +23,6 @@
|
||||||
|
|
||||||
#include <cobalt.h>
|
#include <cobalt.h>
|
||||||
|
|
||||||
extern void cobalt_machine_restart(char *command);
|
|
||||||
extern void cobalt_machine_halt(void);
|
|
||||||
|
|
||||||
const char *get_system_type(void)
|
const char *get_system_type(void)
|
||||||
{
|
{
|
||||||
switch (cobalt_board_id) {
|
switch (cobalt_board_id) {
|
||||||
|
|
|
@ -37,7 +37,7 @@ static unsigned int nr_prom_mem __initdata;
|
||||||
*/
|
*/
|
||||||
#define ARC_PAGE_SHIFT 12
|
#define ARC_PAGE_SHIFT 12
|
||||||
|
|
||||||
struct linux_mdesc * __init ArcGetMemoryDescriptor(struct linux_mdesc *Current)
|
static struct linux_mdesc * __init ArcGetMemoryDescriptor(struct linux_mdesc *Current)
|
||||||
{
|
{
|
||||||
return (struct linux_mdesc *) ARC_CALL1(get_mdesc, Current);
|
return (struct linux_mdesc *) ARC_CALL1(get_mdesc, Current);
|
||||||
}
|
}
|
||||||
|
|
|
@ -597,6 +597,9 @@
|
||||||
|
|
||||||
#include <asm/cpu.h>
|
#include <asm/cpu.h>
|
||||||
|
|
||||||
|
void alchemy_set_lpj(void);
|
||||||
|
void board_setup(void);
|
||||||
|
|
||||||
/* helpers to access the SYS_* registers */
|
/* helpers to access the SYS_* registers */
|
||||||
static inline unsigned long alchemy_rdsys(int regofs)
|
static inline unsigned long alchemy_rdsys(int regofs)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,4 +19,7 @@ extern int cobalt_board_id;
|
||||||
#define COBALT_BRD_ID_QUBE2 0x5
|
#define COBALT_BRD_ID_QUBE2 0x5
|
||||||
#define COBALT_BRD_ID_RAQ2 0x6
|
#define COBALT_BRD_ID_RAQ2 0x6
|
||||||
|
|
||||||
|
void cobalt_machine_halt(void);
|
||||||
|
void cobalt_machine_restart(char *command);
|
||||||
|
|
||||||
#endif /* __ASM_COBALT_H */
|
#endif /* __ASM_COBALT_H */
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
#include <asm/cpu-features.h>
|
#include <asm/cpu-features.h>
|
||||||
#include <asm/cpu-info.h>
|
#include <asm/cpu-info.h>
|
||||||
|
#include <asm/fpu.h>
|
||||||
|
|
||||||
#ifdef CONFIG_MIPS_FP_SUPPORT
|
#ifdef CONFIG_MIPS_FP_SUPPORT
|
||||||
|
|
||||||
|
@ -309,6 +310,11 @@ void mips_set_personality_nan(struct arch_elf_state *state)
|
||||||
struct cpuinfo_mips *c = &boot_cpu_data;
|
struct cpuinfo_mips *c = &boot_cpu_data;
|
||||||
struct task_struct *t = current;
|
struct task_struct *t = current;
|
||||||
|
|
||||||
|
/* Do this early so t->thread.fpu.fcr31 won't be clobbered in case
|
||||||
|
* we are preempted before the lose_fpu(0) in start_thread.
|
||||||
|
*/
|
||||||
|
lose_fpu(0);
|
||||||
|
|
||||||
t->thread.fpu.fcr31 = c->fpu_csr31;
|
t->thread.fpu.fcr31 = c->fpu_csr31;
|
||||||
switch (state->nan_2008) {
|
switch (state->nan_2008) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
|
@ -2007,7 +2007,13 @@ unsigned long vi_handlers[64];
|
||||||
|
|
||||||
void reserve_exception_space(phys_addr_t addr, unsigned long size)
|
void reserve_exception_space(phys_addr_t addr, unsigned long size)
|
||||||
{
|
{
|
||||||
memblock_reserve(addr, size);
|
/*
|
||||||
|
* reserve exception space on CPUs other than CPU0
|
||||||
|
* is too late, since memblock is unavailable when APs
|
||||||
|
* up
|
||||||
|
*/
|
||||||
|
if (smp_processor_id() == 0)
|
||||||
|
memblock_reserve(addr, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init *set_except_vector(int n, void *addr)
|
void __init *set_except_vector(int n, void *addr)
|
||||||
|
|
|
@ -108,10 +108,9 @@ void __init prom_init(void)
|
||||||
prom_init_cmdline();
|
prom_init_cmdline();
|
||||||
|
|
||||||
#if defined(CONFIG_MIPS_MT_SMP)
|
#if defined(CONFIG_MIPS_MT_SMP)
|
||||||
if (cpu_has_mipsmt) {
|
lantiq_smp_ops = vsmp_smp_ops;
|
||||||
lantiq_smp_ops = vsmp_smp_ops;
|
if (cpu_has_mipsmt)
|
||||||
lantiq_smp_ops.init_secondary = lantiq_init_secondary;
|
lantiq_smp_ops.init_secondary = lantiq_init_secondary;
|
||||||
register_smp_ops(&lantiq_smp_ops);
|
register_smp_ops(&lantiq_smp_ops);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,6 +103,9 @@ void __init szmem(unsigned int node)
|
||||||
if (loongson_sysconf.vgabios_addr)
|
if (loongson_sysconf.vgabios_addr)
|
||||||
memblock_reserve(virt_to_phys((void *)loongson_sysconf.vgabios_addr),
|
memblock_reserve(virt_to_phys((void *)loongson_sysconf.vgabios_addr),
|
||||||
SZ_256K);
|
SZ_256K);
|
||||||
|
/* set nid for reserved memory */
|
||||||
|
memblock_set_node((u64)node << 44, (u64)(node + 1) << 44,
|
||||||
|
&memblock.reserved, node);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_NUMA
|
#ifndef CONFIG_NUMA
|
||||||
|
|
|
@ -132,6 +132,8 @@ static void __init node_mem_init(unsigned int node)
|
||||||
|
|
||||||
/* Reserve pfn range 0~node[0]->node_start_pfn */
|
/* Reserve pfn range 0~node[0]->node_start_pfn */
|
||||||
memblock_reserve(0, PAGE_SIZE * start_pfn);
|
memblock_reserve(0, PAGE_SIZE * start_pfn);
|
||||||
|
/* set nid for reserved memory on node 0 */
|
||||||
|
memblock_set_node(0, 1ULL << 44, &memblock.reserved, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
obj-y := ip27-berr.o ip27-irq.o ip27-init.o ip27-klconfig.o \
|
obj-y := ip27-berr.o ip27-irq.o ip27-init.o ip27-klconfig.o \
|
||||||
ip27-klnuma.o ip27-memory.o ip27-nmi.o ip27-reset.o ip27-timer.o \
|
ip27-klnuma.o ip27-memory.o ip27-nmi.o ip27-reset.o ip27-timer.o \
|
||||||
ip27-hubio.o ip27-xtalk.o
|
ip27-xtalk.o
|
||||||
|
|
||||||
obj-$(CONFIG_EARLY_PRINTK) += ip27-console.o
|
obj-$(CONFIG_EARLY_PRINTK) += ip27-console.o
|
||||||
obj-$(CONFIG_SMP) += ip27-smp.o
|
obj-$(CONFIG_SMP) += ip27-smp.o
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
#include <asm/traps.h>
|
#include <asm/traps.h>
|
||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
|
|
||||||
|
#include "ip27-common.h"
|
||||||
|
|
||||||
static void dump_hub_information(unsigned long errst0, unsigned long errst1)
|
static void dump_hub_information(unsigned long errst0, unsigned long errst1)
|
||||||
{
|
{
|
||||||
static char *err_type[2][8] = {
|
static char *err_type[2][8] = {
|
||||||
|
@ -57,7 +59,7 @@ static void dump_hub_information(unsigned long errst0, unsigned long errst1)
|
||||||
[st0.pi_stat0_fmt.s0_err_type] ? : "invalid");
|
[st0.pi_stat0_fmt.s0_err_type] ? : "invalid");
|
||||||
}
|
}
|
||||||
|
|
||||||
int ip27_be_handler(struct pt_regs *regs, int is_fixup)
|
static int ip27_be_handler(struct pt_regs *regs, int is_fixup)
|
||||||
{
|
{
|
||||||
unsigned long errst0, errst1;
|
unsigned long errst0, errst1;
|
||||||
int data = regs->cp0_cause & 4;
|
int data = regs->cp0_cause & 4;
|
||||||
|
|
|
@ -10,6 +10,7 @@ extern void hub_rt_clock_event_init(void);
|
||||||
extern void hub_rtc_init(nasid_t nasid);
|
extern void hub_rtc_init(nasid_t nasid);
|
||||||
extern void install_cpu_nmi_handler(int slice);
|
extern void install_cpu_nmi_handler(int slice);
|
||||||
extern void install_ipi(void);
|
extern void install_ipi(void);
|
||||||
|
extern void ip27_be_init(void);
|
||||||
extern void ip27_reboot_setup(void);
|
extern void ip27_reboot_setup(void);
|
||||||
extern const struct plat_smp_ops ip27_smp_ops;
|
extern const struct plat_smp_ops ip27_smp_ops;
|
||||||
extern unsigned long node_getfirstfree(nasid_t nasid);
|
extern unsigned long node_getfirstfree(nasid_t nasid);
|
||||||
|
@ -17,4 +18,5 @@ extern void per_cpu_init(void);
|
||||||
extern void replicate_kernel_text(void);
|
extern void replicate_kernel_text(void);
|
||||||
extern void setup_replication_mask(void);
|
extern void setup_replication_mask(void);
|
||||||
|
|
||||||
|
|
||||||
#endif /* __IP27_COMMON_H */
|
#endif /* __IP27_COMMON_H */
|
||||||
|
|
|
@ -1,185 +0,0 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-only
|
|
||||||
/*
|
|
||||||
* Copyright (C) 1992-1997, 2000-2003 Silicon Graphics, Inc.
|
|
||||||
* Copyright (C) 2004 Christoph Hellwig.
|
|
||||||
*
|
|
||||||
* Support functions for the HUB ASIC - mostly PIO mapping related.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/bitops.h>
|
|
||||||
#include <linux/string.h>
|
|
||||||
#include <linux/mmzone.h>
|
|
||||||
#include <asm/sn/addrs.h>
|
|
||||||
#include <asm/sn/arch.h>
|
|
||||||
#include <asm/sn/agent.h>
|
|
||||||
#include <asm/sn/io.h>
|
|
||||||
#include <asm/xtalk/xtalk.h>
|
|
||||||
|
|
||||||
|
|
||||||
static int force_fire_and_forget = 1;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* hub_pio_map - establish a HUB PIO mapping
|
|
||||||
*
|
|
||||||
* @nasid: nasid to perform PIO mapping on
|
|
||||||
* @widget: widget ID to perform PIO mapping for
|
|
||||||
* @xtalk_addr: xtalk_address that needs to be mapped
|
|
||||||
* @size: size of the PIO mapping
|
|
||||||
*
|
|
||||||
**/
|
|
||||||
unsigned long hub_pio_map(nasid_t nasid, xwidgetnum_t widget,
|
|
||||||
unsigned long xtalk_addr, size_t size)
|
|
||||||
{
|
|
||||||
unsigned i;
|
|
||||||
|
|
||||||
/* use small-window mapping if possible */
|
|
||||||
if ((xtalk_addr % SWIN_SIZE) + size <= SWIN_SIZE)
|
|
||||||
return NODE_SWIN_BASE(nasid, widget) + (xtalk_addr % SWIN_SIZE);
|
|
||||||
|
|
||||||
if ((xtalk_addr % BWIN_SIZE) + size > BWIN_SIZE) {
|
|
||||||
printk(KERN_WARNING "PIO mapping at hub %d widget %d addr 0x%lx"
|
|
||||||
" too big (%ld)\n",
|
|
||||||
nasid, widget, xtalk_addr, size);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
xtalk_addr &= ~(BWIN_SIZE-1);
|
|
||||||
for (i = 0; i < HUB_NUM_BIG_WINDOW; i++) {
|
|
||||||
if (test_and_set_bit(i, hub_data(nasid)->h_bigwin_used))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The code below does a PIO write to setup an ITTE entry.
|
|
||||||
*
|
|
||||||
* We need to prevent other CPUs from seeing our updated
|
|
||||||
* memory shadow of the ITTE (in the piomap) until the ITTE
|
|
||||||
* entry is actually set up; otherwise, another CPU might
|
|
||||||
* attempt a PIO prematurely.
|
|
||||||
*
|
|
||||||
* Also, the only way we can know that an entry has been
|
|
||||||
* received by the hub and can be used by future PIO reads/
|
|
||||||
* writes is by reading back the ITTE entry after writing it.
|
|
||||||
*
|
|
||||||
* For these two reasons, we PIO read back the ITTE entry
|
|
||||||
* after we write it.
|
|
||||||
*/
|
|
||||||
IIO_ITTE_PUT(nasid, i, HUB_PIO_MAP_TO_MEM, widget, xtalk_addr);
|
|
||||||
__raw_readq(IIO_ITTE_GET(nasid, i));
|
|
||||||
|
|
||||||
return NODE_BWIN_BASE(nasid, widget) + (xtalk_addr % BWIN_SIZE);
|
|
||||||
}
|
|
||||||
|
|
||||||
printk(KERN_WARNING "unable to establish PIO mapping for at"
|
|
||||||
" hub %d widget %d addr 0x%lx\n",
|
|
||||||
nasid, widget, xtalk_addr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* hub_setup_prb(nasid, prbnum, credits, conveyor)
|
|
||||||
*
|
|
||||||
* Put a PRB into fire-and-forget mode if conveyor isn't set. Otherwise,
|
|
||||||
* put it into conveyor belt mode with the specified number of credits.
|
|
||||||
*/
|
|
||||||
static void hub_setup_prb(nasid_t nasid, int prbnum, int credits)
|
|
||||||
{
|
|
||||||
union iprb_u prb;
|
|
||||||
int prb_offset;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get the current register value.
|
|
||||||
*/
|
|
||||||
prb_offset = IIO_IOPRB(prbnum);
|
|
||||||
prb.iprb_regval = REMOTE_HUB_L(nasid, prb_offset);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Clear out some fields.
|
|
||||||
*/
|
|
||||||
prb.iprb_ovflow = 1;
|
|
||||||
prb.iprb_bnakctr = 0;
|
|
||||||
prb.iprb_anakctr = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Enable or disable fire-and-forget mode.
|
|
||||||
*/
|
|
||||||
prb.iprb_ff = force_fire_and_forget ? 1 : 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Set the appropriate number of PIO credits for the widget.
|
|
||||||
*/
|
|
||||||
prb.iprb_xtalkctr = credits;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Store the new value to the register.
|
|
||||||
*/
|
|
||||||
REMOTE_HUB_S(nasid, prb_offset, prb.iprb_regval);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* hub_set_piomode - set pio mode for a given hub
|
|
||||||
*
|
|
||||||
* @nasid: physical node ID for the hub in question
|
|
||||||
*
|
|
||||||
* Put the hub into either "PIO conveyor belt" mode or "fire-and-forget" mode.
|
|
||||||
* To do this, we have to make absolutely sure that no PIOs are in progress
|
|
||||||
* so we turn off access to all widgets for the duration of the function.
|
|
||||||
*
|
|
||||||
* XXX - This code should really check what kind of widget we're talking
|
|
||||||
* to. Bridges can only handle three requests, but XG will do more.
|
|
||||||
* How many can crossbow handle to widget 0? We're assuming 1.
|
|
||||||
*
|
|
||||||
* XXX - There is a bug in the crossbow that link reset PIOs do not
|
|
||||||
* return write responses. The easiest solution to this problem is to
|
|
||||||
* leave widget 0 (xbow) in fire-and-forget mode at all times. This
|
|
||||||
* only affects pio's to xbow registers, which should be rare.
|
|
||||||
**/
|
|
||||||
static void hub_set_piomode(nasid_t nasid)
|
|
||||||
{
|
|
||||||
u64 ii_iowa;
|
|
||||||
union hubii_wcr_u ii_wcr;
|
|
||||||
unsigned i;
|
|
||||||
|
|
||||||
ii_iowa = REMOTE_HUB_L(nasid, IIO_OUTWIDGET_ACCESS);
|
|
||||||
REMOTE_HUB_S(nasid, IIO_OUTWIDGET_ACCESS, 0);
|
|
||||||
|
|
||||||
ii_wcr.wcr_reg_value = REMOTE_HUB_L(nasid, IIO_WCR);
|
|
||||||
|
|
||||||
if (ii_wcr.iwcr_dir_con) {
|
|
||||||
/*
|
|
||||||
* Assume a bridge here.
|
|
||||||
*/
|
|
||||||
hub_setup_prb(nasid, 0, 3);
|
|
||||||
} else {
|
|
||||||
/*
|
|
||||||
* Assume a crossbow here.
|
|
||||||
*/
|
|
||||||
hub_setup_prb(nasid, 0, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* XXX - Here's where we should take the widget type into
|
|
||||||
* when account assigning credits.
|
|
||||||
*/
|
|
||||||
for (i = HUB_WIDGET_ID_MIN; i <= HUB_WIDGET_ID_MAX; i++)
|
|
||||||
hub_setup_prb(nasid, i, 3);
|
|
||||||
|
|
||||||
REMOTE_HUB_S(nasid, IIO_OUTWIDGET_ACCESS, ii_iowa);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* hub_pio_init - PIO-related hub initialization
|
|
||||||
*
|
|
||||||
* @hub: hubinfo structure for our hub
|
|
||||||
*/
|
|
||||||
void hub_pio_init(nasid_t nasid)
|
|
||||||
{
|
|
||||||
unsigned i;
|
|
||||||
|
|
||||||
/* initialize big window piomaps for this hub */
|
|
||||||
bitmap_zero(hub_data(nasid)->h_bigwin_used, HUB_NUM_BIG_WINDOW);
|
|
||||||
for (i = 0; i < HUB_NUM_BIG_WINDOW; i++)
|
|
||||||
IIO_ITTE_DISABLE(nasid, i);
|
|
||||||
|
|
||||||
hub_set_piomode(nasid);
|
|
||||||
}
|
|
|
@ -23,6 +23,8 @@
|
||||||
#include <asm/sn/intr.h>
|
#include <asm/sn/intr.h>
|
||||||
#include <asm/sn/irq_alloc.h>
|
#include <asm/sn/irq_alloc.h>
|
||||||
|
|
||||||
|
#include "ip27-common.h"
|
||||||
|
|
||||||
struct hub_irq_data {
|
struct hub_irq_data {
|
||||||
u64 *irq_mask[2];
|
u64 *irq_mask[2];
|
||||||
cpuid_t cpu;
|
cpuid_t cpu;
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <asm/page.h>
|
#include <asm/page.h>
|
||||||
#include <asm/pgalloc.h>
|
#include <asm/pgalloc.h>
|
||||||
#include <asm/sections.h>
|
#include <asm/sections.h>
|
||||||
|
#include <asm/sgialib.h>
|
||||||
|
|
||||||
#include <asm/sn/arch.h>
|
#include <asm/sn/arch.h>
|
||||||
#include <asm/sn/agent.h>
|
#include <asm/sn/agent.h>
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
#include <asm/sn/arch.h>
|
#include <asm/sn/arch.h>
|
||||||
#include <asm/sn/agent.h>
|
#include <asm/sn/agent.h>
|
||||||
|
|
||||||
|
#include "ip27-common.h"
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
#define NODE_NUM_CPUS(n) CNODE_NUM_CPUS(n)
|
#define NODE_NUM_CPUS(n) CNODE_NUM_CPUS(n)
|
||||||
#else
|
#else
|
||||||
|
@ -23,16 +25,7 @@
|
||||||
typedef unsigned long machreg_t;
|
typedef unsigned long machreg_t;
|
||||||
|
|
||||||
static arch_spinlock_t nmi_lock = __ARCH_SPIN_LOCK_UNLOCKED;
|
static arch_spinlock_t nmi_lock = __ARCH_SPIN_LOCK_UNLOCKED;
|
||||||
|
static void nmi_dump(void);
|
||||||
/*
|
|
||||||
* Let's see what else we need to do here. Set up sp, gp?
|
|
||||||
*/
|
|
||||||
void nmi_dump(void)
|
|
||||||
{
|
|
||||||
void cont_nmi_dump(void);
|
|
||||||
|
|
||||||
cont_nmi_dump();
|
|
||||||
}
|
|
||||||
|
|
||||||
void install_cpu_nmi_handler(int slice)
|
void install_cpu_nmi_handler(int slice)
|
||||||
{
|
{
|
||||||
|
@ -53,7 +46,7 @@ void install_cpu_nmi_handler(int slice)
|
||||||
* into the eframe format for the node under consideration.
|
* into the eframe format for the node under consideration.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void nmi_cpu_eframe_save(nasid_t nasid, int slice)
|
static void nmi_cpu_eframe_save(nasid_t nasid, int slice)
|
||||||
{
|
{
|
||||||
struct reg_struct *nr;
|
struct reg_struct *nr;
|
||||||
int i;
|
int i;
|
||||||
|
@ -129,7 +122,7 @@ void nmi_cpu_eframe_save(nasid_t nasid, int slice)
|
||||||
pr_emerg("\n");
|
pr_emerg("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void nmi_dump_hub_irq(nasid_t nasid, int slice)
|
static void nmi_dump_hub_irq(nasid_t nasid, int slice)
|
||||||
{
|
{
|
||||||
u64 mask0, mask1, pend0, pend1;
|
u64 mask0, mask1, pend0, pend1;
|
||||||
|
|
||||||
|
@ -153,7 +146,7 @@ void nmi_dump_hub_irq(nasid_t nasid, int slice)
|
||||||
* Copy the cpu registers which have been saved in the IP27prom format
|
* Copy the cpu registers which have been saved in the IP27prom format
|
||||||
* into the eframe format for the node under consideration.
|
* into the eframe format for the node under consideration.
|
||||||
*/
|
*/
|
||||||
void nmi_node_eframe_save(nasid_t nasid)
|
static void nmi_node_eframe_save(nasid_t nasid)
|
||||||
{
|
{
|
||||||
int slice;
|
int slice;
|
||||||
|
|
||||||
|
@ -170,8 +163,7 @@ void nmi_node_eframe_save(nasid_t nasid)
|
||||||
/*
|
/*
|
||||||
* Save the nmi cpu registers for all cpus in the system.
|
* Save the nmi cpu registers for all cpus in the system.
|
||||||
*/
|
*/
|
||||||
void
|
static void nmi_eframes_save(void)
|
||||||
nmi_eframes_save(void)
|
|
||||||
{
|
{
|
||||||
nasid_t nasid;
|
nasid_t nasid;
|
||||||
|
|
||||||
|
@ -179,8 +171,7 @@ nmi_eframes_save(void)
|
||||||
nmi_node_eframe_save(nasid);
|
nmi_node_eframe_save(nasid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void nmi_dump(void)
|
||||||
cont_nmi_dump(void)
|
|
||||||
{
|
{
|
||||||
#ifndef REAL_NMI_SIGNAL
|
#ifndef REAL_NMI_SIGNAL
|
||||||
static atomic_t nmied_cpus = ATOMIC_INIT(0);
|
static atomic_t nmied_cpus = ATOMIC_INIT(0);
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
|
|
||||||
#include <asm/sn/ioc3.h>
|
#include <asm/sn/ioc3.h>
|
||||||
|
#include <asm/setup.h>
|
||||||
|
|
||||||
static inline struct ioc3_uartregs *console_uart(void)
|
static inline struct ioc3_uartregs *console_uart(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include <linux/percpu.h>
|
#include <linux/percpu.h>
|
||||||
#include <linux/memblock.h>
|
#include <linux/memblock.h>
|
||||||
|
|
||||||
|
#include <asm/bootinfo.h>
|
||||||
#include <asm/smp-ops.h>
|
#include <asm/smp-ops.h>
|
||||||
#include <asm/sgialib.h>
|
#include <asm/sgialib.h>
|
||||||
#include <asm/time.h>
|
#include <asm/time.h>
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#include <asm/ip32/crime.h>
|
#include <asm/ip32/crime.h>
|
||||||
#include <asm/ip32/mace.h>
|
#include <asm/ip32/mace.h>
|
||||||
|
|
||||||
|
#include "ip32-common.h"
|
||||||
|
|
||||||
struct sgi_crime __iomem *crime;
|
struct sgi_crime __iomem *crime;
|
||||||
struct sgi_mace __iomem *mace;
|
struct sgi_mace __iomem *mace;
|
||||||
|
|
||||||
|
@ -39,7 +41,7 @@ void __init crime_init(void)
|
||||||
id, rev, field, (unsigned long) CRIME_BASE);
|
id, rev, field, (unsigned long) CRIME_BASE);
|
||||||
}
|
}
|
||||||
|
|
||||||
irqreturn_t crime_memerr_intr(unsigned int irq, void *dev_id)
|
irqreturn_t crime_memerr_intr(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
unsigned long stat, addr;
|
unsigned long stat, addr;
|
||||||
int fatal = 0;
|
int fatal = 0;
|
||||||
|
@ -90,7 +92,7 @@ irqreturn_t crime_memerr_intr(unsigned int irq, void *dev_id)
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
irqreturn_t crime_cpuerr_intr(unsigned int irq, void *dev_id)
|
irqreturn_t crime_cpuerr_intr(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
unsigned long stat = crime->cpu_error_stat & CRIME_CPU_ERROR_MASK;
|
unsigned long stat = crime->cpu_error_stat & CRIME_CPU_ERROR_MASK;
|
||||||
unsigned long addr = crime->cpu_error_addr & CRIME_CPU_ERROR_ADDR_MASK;
|
unsigned long addr = crime->cpu_error_addr & CRIME_CPU_ERROR_ADDR_MASK;
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#include <asm/ptrace.h>
|
#include <asm/ptrace.h>
|
||||||
#include <asm/tlbdebug.h>
|
#include <asm/tlbdebug.h>
|
||||||
|
|
||||||
|
#include "ip32-common.h"
|
||||||
|
|
||||||
static int ip32_be_handler(struct pt_regs *regs, int is_fixup)
|
static int ip32_be_handler(struct pt_regs *regs, int is_fixup)
|
||||||
{
|
{
|
||||||
int data = regs->cp0_cause & 4;
|
int data = regs->cp0_cause & 4;
|
||||||
|
|
15
arch/mips/sgi-ip32/ip32-common.h
Normal file
15
arch/mips/sgi-ip32/ip32-common.h
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#ifndef __IP32_COMMON_H
|
||||||
|
#define __IP32_COMMON_H
|
||||||
|
|
||||||
|
#include <linux/init.h>
|
||||||
|
#include <linux/interrupt.h>
|
||||||
|
|
||||||
|
void __init crime_init(void);
|
||||||
|
irqreturn_t crime_memerr_intr(int irq, void *dev_id);
|
||||||
|
irqreturn_t crime_cpuerr_intr(int irq, void *dev_id);
|
||||||
|
void __init ip32_be_init(void);
|
||||||
|
void ip32_prepare_poweroff(void);
|
||||||
|
|
||||||
|
#endif /* __IP32_COMMON_H */
|
|
@ -28,6 +28,8 @@
|
||||||
#include <asm/ip32/mace.h>
|
#include <asm/ip32/mace.h>
|
||||||
#include <asm/ip32/ip32_ints.h>
|
#include <asm/ip32/ip32_ints.h>
|
||||||
|
|
||||||
|
#include "ip32-common.h"
|
||||||
|
|
||||||
/* issue a PIO read to make sure no PIO writes are pending */
|
/* issue a PIO read to make sure no PIO writes are pending */
|
||||||
static inline void flush_crime_bus(void)
|
static inline void flush_crime_bus(void)
|
||||||
{
|
{
|
||||||
|
@ -107,10 +109,6 @@ static inline void flush_mace_bus(void)
|
||||||
* is quite different anyway.
|
* is quite different anyway.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Some initial interrupts to set up */
|
|
||||||
extern irqreturn_t crime_memerr_intr(int irq, void *dev_id);
|
|
||||||
extern irqreturn_t crime_cpuerr_intr(int irq, void *dev_id);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is for pure CRIME interrupts - ie not MACE. The advantage?
|
* This is for pure CRIME interrupts - ie not MACE. The advantage?
|
||||||
* We get to split the register in half and do faster lookups.
|
* We get to split the register in half and do faster lookups.
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include <asm/ip32/crime.h>
|
#include <asm/ip32/crime.h>
|
||||||
#include <asm/bootinfo.h>
|
#include <asm/bootinfo.h>
|
||||||
#include <asm/page.h>
|
#include <asm/page.h>
|
||||||
|
#include <asm/sgialib.h>
|
||||||
|
|
||||||
extern void crime_init(void);
|
extern void crime_init(void);
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
#include <asm/ip32/crime.h>
|
#include <asm/ip32/crime.h>
|
||||||
#include <asm/ip32/ip32_ints.h>
|
#include <asm/ip32/ip32_ints.h>
|
||||||
|
|
||||||
|
#include "ip32-common.h"
|
||||||
|
|
||||||
#define POWERDOWN_TIMEOUT 120
|
#define POWERDOWN_TIMEOUT 120
|
||||||
/*
|
/*
|
||||||
* Blink frequency during reboot grace period and when panicked.
|
* Blink frequency during reboot grace period and when panicked.
|
||||||
|
|
|
@ -26,8 +26,7 @@
|
||||||
#include <asm/ip32/mace.h>
|
#include <asm/ip32/mace.h>
|
||||||
#include <asm/ip32/ip32_ints.h>
|
#include <asm/ip32/ip32_ints.h>
|
||||||
|
|
||||||
extern void ip32_be_init(void);
|
#include "ip32-common.h"
|
||||||
extern void crime_init(void);
|
|
||||||
|
|
||||||
#ifdef CONFIG_SGI_O2MACE_ETH
|
#ifdef CONFIG_SGI_O2MACE_ETH
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -25,7 +25,6 @@ config PARISC
|
||||||
select RTC_DRV_GENERIC
|
select RTC_DRV_GENERIC
|
||||||
select INIT_ALL_POSSIBLE
|
select INIT_ALL_POSSIBLE
|
||||||
select BUG
|
select BUG
|
||||||
select BUILDTIME_TABLE_SORT
|
|
||||||
select HAVE_KERNEL_UNCOMPRESSED
|
select HAVE_KERNEL_UNCOMPRESSED
|
||||||
select HAVE_PCI
|
select HAVE_PCI
|
||||||
select HAVE_PERF_EVENTS
|
select HAVE_PERF_EVENTS
|
||||||
|
|
|
@ -50,12 +50,12 @@ export CROSS32CC
|
||||||
|
|
||||||
# Set default cross compiler for kernel build
|
# Set default cross compiler for kernel build
|
||||||
ifdef cross_compiling
|
ifdef cross_compiling
|
||||||
ifeq ($(CROSS_COMPILE),)
|
ifeq ($(CROSS_COMPILE),)
|
||||||
CC_SUFFIXES = linux linux-gnu unknown-linux-gnu suse-linux
|
CC_SUFFIXES = linux linux-gnu unknown-linux-gnu suse-linux
|
||||||
CROSS_COMPILE := $(call cc-cross-prefix, \
|
CROSS_COMPILE := $(call cc-cross-prefix, \
|
||||||
$(foreach a,$(CC_ARCHES), \
|
$(foreach a,$(CC_ARCHES), \
|
||||||
$(foreach s,$(CC_SUFFIXES),$(a)-$(s)-)))
|
$(foreach s,$(CC_SUFFIXES),$(a)-$(s)-)))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_DYNAMIC_FTRACE
|
ifdef CONFIG_DYNAMIC_FTRACE
|
||||||
|
|
|
@ -576,6 +576,7 @@
|
||||||
.section __ex_table,"aw" ! \
|
.section __ex_table,"aw" ! \
|
||||||
.align 4 ! \
|
.align 4 ! \
|
||||||
.word (fault_addr - .), (except_addr - .) ! \
|
.word (fault_addr - .), (except_addr - .) ! \
|
||||||
|
or %r0,%r0,%r0 ! \
|
||||||
.previous
|
.previous
|
||||||
|
|
||||||
|
|
||||||
|
|
64
arch/parisc/include/asm/extable.h
Normal file
64
arch/parisc/include/asm/extable.h
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
|
#ifndef __PARISC_EXTABLE_H
|
||||||
|
#define __PARISC_EXTABLE_H
|
||||||
|
|
||||||
|
#include <asm/ptrace.h>
|
||||||
|
#include <linux/compiler.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The exception table consists of three addresses:
|
||||||
|
*
|
||||||
|
* - A relative address to the instruction that is allowed to fault.
|
||||||
|
* - A relative address at which the program should continue (fixup routine)
|
||||||
|
* - An asm statement which specifies which CPU register will
|
||||||
|
* receive -EFAULT when an exception happens if the lowest bit in
|
||||||
|
* the fixup address is set.
|
||||||
|
*
|
||||||
|
* Note: The register specified in the err_opcode instruction will be
|
||||||
|
* modified at runtime if a fault happens. Register %r0 will be ignored.
|
||||||
|
*
|
||||||
|
* Since relative addresses are used, 32bit values are sufficient even on
|
||||||
|
* 64bit kernel.
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct pt_regs;
|
||||||
|
int fixup_exception(struct pt_regs *regs);
|
||||||
|
|
||||||
|
#define ARCH_HAS_RELATIVE_EXTABLE
|
||||||
|
struct exception_table_entry {
|
||||||
|
int insn; /* relative address of insn that is allowed to fault. */
|
||||||
|
int fixup; /* relative address of fixup routine */
|
||||||
|
int err_opcode; /* sample opcode with register which holds error code */
|
||||||
|
};
|
||||||
|
|
||||||
|
#define ASM_EXCEPTIONTABLE_ENTRY( fault_addr, except_addr, opcode )\
|
||||||
|
".section __ex_table,\"aw\"\n" \
|
||||||
|
".align 4\n" \
|
||||||
|
".word (" #fault_addr " - .), (" #except_addr " - .)\n" \
|
||||||
|
opcode "\n" \
|
||||||
|
".previous\n"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ASM_EXCEPTIONTABLE_ENTRY_EFAULT() creates a special exception table entry
|
||||||
|
* (with lowest bit set) for which the fault handler in fixup_exception() will
|
||||||
|
* load -EFAULT on fault into the register specified by the err_opcode instruction,
|
||||||
|
* and zeroes the target register in case of a read fault in get_user().
|
||||||
|
*/
|
||||||
|
#define ASM_EXCEPTIONTABLE_VAR(__err_var) \
|
||||||
|
int __err_var = 0
|
||||||
|
#define ASM_EXCEPTIONTABLE_ENTRY_EFAULT( fault_addr, except_addr, register )\
|
||||||
|
ASM_EXCEPTIONTABLE_ENTRY( fault_addr, except_addr + 1, "or %%r0,%%r0," register)
|
||||||
|
|
||||||
|
static inline void swap_ex_entry_fixup(struct exception_table_entry *a,
|
||||||
|
struct exception_table_entry *b,
|
||||||
|
struct exception_table_entry tmp,
|
||||||
|
int delta)
|
||||||
|
{
|
||||||
|
a->fixup = b->fixup + delta;
|
||||||
|
b->fixup = tmp.fixup - delta;
|
||||||
|
a->err_opcode = b->err_opcode;
|
||||||
|
b->err_opcode = tmp.err_opcode;
|
||||||
|
}
|
||||||
|
#define swap_ex_entry_fixup swap_ex_entry_fixup
|
||||||
|
|
||||||
|
#endif
|
|
@ -8,7 +8,8 @@
|
||||||
"copy %%r0,%0\n" \
|
"copy %%r0,%0\n" \
|
||||||
"8:\tlpa %%r0(%1),%0\n" \
|
"8:\tlpa %%r0(%1),%0\n" \
|
||||||
"9:\n" \
|
"9:\n" \
|
||||||
ASM_EXCEPTIONTABLE_ENTRY(8b, 9b) \
|
ASM_EXCEPTIONTABLE_ENTRY(8b, 9b, \
|
||||||
|
"or %%r0,%%r0,%%r0") \
|
||||||
: "=&r" (pa) \
|
: "=&r" (pa) \
|
||||||
: "r" (va) \
|
: "r" (va) \
|
||||||
: "memory" \
|
: "memory" \
|
||||||
|
@ -22,7 +23,8 @@
|
||||||
"copy %%r0,%0\n" \
|
"copy %%r0,%0\n" \
|
||||||
"8:\tlpa %%r0(%%sr3,%1),%0\n" \
|
"8:\tlpa %%r0(%%sr3,%1),%0\n" \
|
||||||
"9:\n" \
|
"9:\n" \
|
||||||
ASM_EXCEPTIONTABLE_ENTRY(8b, 9b) \
|
ASM_EXCEPTIONTABLE_ENTRY(8b, 9b, \
|
||||||
|
"or %%r0,%%r0,%%r0") \
|
||||||
: "=&r" (pa) \
|
: "=&r" (pa) \
|
||||||
: "r" (va) \
|
: "r" (va) \
|
||||||
: "memory" \
|
: "memory" \
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
*/
|
*/
|
||||||
#include <asm/page.h>
|
#include <asm/page.h>
|
||||||
#include <asm/cache.h>
|
#include <asm/cache.h>
|
||||||
|
#include <asm/extable.h>
|
||||||
|
|
||||||
#include <linux/bug.h>
|
#include <linux/bug.h>
|
||||||
#include <linux/string.h>
|
#include <linux/string.h>
|
||||||
|
@ -26,37 +27,6 @@
|
||||||
#define STD_USER(sr, x, ptr) __put_user_asm(sr, "std", x, ptr)
|
#define STD_USER(sr, x, ptr) __put_user_asm(sr, "std", x, ptr)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* The exception table contains two values: the first is the relative offset to
|
|
||||||
* the address of the instruction that is allowed to fault, and the second is
|
|
||||||
* the relative offset to the address of the fixup routine. Since relative
|
|
||||||
* addresses are used, 32bit values are sufficient even on 64bit kernel.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define ARCH_HAS_RELATIVE_EXTABLE
|
|
||||||
struct exception_table_entry {
|
|
||||||
int insn; /* relative address of insn that is allowed to fault. */
|
|
||||||
int fixup; /* relative address of fixup routine */
|
|
||||||
};
|
|
||||||
|
|
||||||
#define ASM_EXCEPTIONTABLE_ENTRY( fault_addr, except_addr )\
|
|
||||||
".section __ex_table,\"aw\"\n" \
|
|
||||||
".align 4\n" \
|
|
||||||
".word (" #fault_addr " - .), (" #except_addr " - .)\n\t" \
|
|
||||||
".previous\n"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ASM_EXCEPTIONTABLE_ENTRY_EFAULT() creates a special exception table entry
|
|
||||||
* (with lowest bit set) for which the fault handler in fixup_exception() will
|
|
||||||
* load -EFAULT into %r29 for a read or write fault, and zeroes the target
|
|
||||||
* register in case of a read fault in get_user().
|
|
||||||
*/
|
|
||||||
#define ASM_EXCEPTIONTABLE_REG 29
|
|
||||||
#define ASM_EXCEPTIONTABLE_VAR(__variable) \
|
|
||||||
register long __variable __asm__ ("r29") = 0
|
|
||||||
#define ASM_EXCEPTIONTABLE_ENTRY_EFAULT( fault_addr, except_addr )\
|
|
||||||
ASM_EXCEPTIONTABLE_ENTRY( fault_addr, except_addr + 1)
|
|
||||||
|
|
||||||
#define __get_user_internal(sr, val, ptr) \
|
#define __get_user_internal(sr, val, ptr) \
|
||||||
({ \
|
({ \
|
||||||
ASM_EXCEPTIONTABLE_VAR(__gu_err); \
|
ASM_EXCEPTIONTABLE_VAR(__gu_err); \
|
||||||
|
@ -83,7 +53,7 @@ struct exception_table_entry {
|
||||||
\
|
\
|
||||||
__asm__("1: " ldx " 0(%%sr%2,%3),%0\n" \
|
__asm__("1: " ldx " 0(%%sr%2,%3),%0\n" \
|
||||||
"9:\n" \
|
"9:\n" \
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b) \
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b, "%1") \
|
||||||
: "=r"(__gu_val), "+r"(__gu_err) \
|
: "=r"(__gu_val), "+r"(__gu_err) \
|
||||||
: "i"(sr), "r"(ptr)); \
|
: "i"(sr), "r"(ptr)); \
|
||||||
\
|
\
|
||||||
|
@ -115,8 +85,8 @@ struct exception_table_entry {
|
||||||
"1: ldw 0(%%sr%2,%3),%0\n" \
|
"1: ldw 0(%%sr%2,%3),%0\n" \
|
||||||
"2: ldw 4(%%sr%2,%3),%R0\n" \
|
"2: ldw 4(%%sr%2,%3),%R0\n" \
|
||||||
"9:\n" \
|
"9:\n" \
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b) \
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b, "%1") \
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 9b) \
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 9b, "%1") \
|
||||||
: "=&r"(__gu_tmp.l), "+r"(__gu_err) \
|
: "=&r"(__gu_tmp.l), "+r"(__gu_err) \
|
||||||
: "i"(sr), "r"(ptr)); \
|
: "i"(sr), "r"(ptr)); \
|
||||||
\
|
\
|
||||||
|
@ -174,7 +144,7 @@ struct exception_table_entry {
|
||||||
__asm__ __volatile__ ( \
|
__asm__ __volatile__ ( \
|
||||||
"1: " stx " %1,0(%%sr%2,%3)\n" \
|
"1: " stx " %1,0(%%sr%2,%3)\n" \
|
||||||
"9:\n" \
|
"9:\n" \
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b) \
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b, "%0") \
|
||||||
: "+r"(__pu_err) \
|
: "+r"(__pu_err) \
|
||||||
: "r"(x), "i"(sr), "r"(ptr))
|
: "r"(x), "i"(sr), "r"(ptr))
|
||||||
|
|
||||||
|
@ -186,15 +156,14 @@ struct exception_table_entry {
|
||||||
"1: stw %1,0(%%sr%2,%3)\n" \
|
"1: stw %1,0(%%sr%2,%3)\n" \
|
||||||
"2: stw %R1,4(%%sr%2,%3)\n" \
|
"2: stw %R1,4(%%sr%2,%3)\n" \
|
||||||
"9:\n" \
|
"9:\n" \
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b) \
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b, "%0") \
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 9b) \
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 9b, "%0") \
|
||||||
: "+r"(__pu_err) \
|
: "+r"(__pu_err) \
|
||||||
: "r"(__val), "i"(sr), "r"(ptr)); \
|
: "r"(__val), "i"(sr), "r"(ptr)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#endif /* !defined(CONFIG_64BIT) */
|
#endif /* !defined(CONFIG_64BIT) */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Complex access routines -- external declarations
|
* Complex access routines -- external declarations
|
||||||
*/
|
*/
|
||||||
|
@ -216,7 +185,4 @@ unsigned long __must_check raw_copy_from_user(void *dst, const void __user *src,
|
||||||
#define INLINE_COPY_TO_USER
|
#define INLINE_COPY_TO_USER
|
||||||
#define INLINE_COPY_FROM_USER
|
#define INLINE_COPY_FROM_USER
|
||||||
|
|
||||||
struct pt_regs;
|
|
||||||
int fixup_exception(struct pt_regs *regs);
|
|
||||||
|
|
||||||
#endif /* __PARISC_UACCESS_H */
|
#endif /* __PARISC_UACCESS_H */
|
||||||
|
|
|
@ -58,7 +58,7 @@ int pa_serialize_tlb_flushes __ro_after_init;
|
||||||
|
|
||||||
struct pdc_cache_info cache_info __ro_after_init;
|
struct pdc_cache_info cache_info __ro_after_init;
|
||||||
#ifndef CONFIG_PA20
|
#ifndef CONFIG_PA20
|
||||||
struct pdc_btlb_info btlb_info __ro_after_init;
|
struct pdc_btlb_info btlb_info;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DEFINE_STATIC_KEY_TRUE(parisc_has_cache);
|
DEFINE_STATIC_KEY_TRUE(parisc_has_cache);
|
||||||
|
@ -264,6 +264,10 @@ parisc_cache_init(void)
|
||||||
icache_stride = CAFL_STRIDE(cache_info.ic_conf);
|
icache_stride = CAFL_STRIDE(cache_info.ic_conf);
|
||||||
#undef CAFL_STRIDE
|
#undef CAFL_STRIDE
|
||||||
|
|
||||||
|
/* stride needs to be non-zero, otherwise cache flushes will not work */
|
||||||
|
WARN_ON(cache_info.dc_size && dcache_stride == 0);
|
||||||
|
WARN_ON(cache_info.ic_size && icache_stride == 0);
|
||||||
|
|
||||||
if ((boot_cpu_data.pdc.capabilities & PDC_MODEL_NVA_MASK) ==
|
if ((boot_cpu_data.pdc.capabilities & PDC_MODEL_NVA_MASK) ==
|
||||||
PDC_MODEL_NVA_UNSUPPORTED) {
|
PDC_MODEL_NVA_UNSUPPORTED) {
|
||||||
printk(KERN_WARNING "parisc_cache_init: Only equivalent aliasing supported!\n");
|
printk(KERN_WARNING "parisc_cache_init: Only equivalent aliasing supported!\n");
|
||||||
|
@ -850,7 +854,7 @@ SYSCALL_DEFINE3(cacheflush, unsigned long, addr, unsigned long, bytes,
|
||||||
#endif
|
#endif
|
||||||
" fic,m %3(%4,%0)\n"
|
" fic,m %3(%4,%0)\n"
|
||||||
"2: sync\n"
|
"2: sync\n"
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 2b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 2b, "%1")
|
||||||
: "+r" (start), "+r" (error)
|
: "+r" (start), "+r" (error)
|
||||||
: "r" (end), "r" (dcache_stride), "i" (SR_USER));
|
: "r" (end), "r" (dcache_stride), "i" (SR_USER));
|
||||||
}
|
}
|
||||||
|
@ -865,7 +869,7 @@ SYSCALL_DEFINE3(cacheflush, unsigned long, addr, unsigned long, bytes,
|
||||||
#endif
|
#endif
|
||||||
" fdc,m %3(%4,%0)\n"
|
" fdc,m %3(%4,%0)\n"
|
||||||
"2: sync\n"
|
"2: sync\n"
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 2b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 2b, "%1")
|
||||||
: "+r" (start), "+r" (error)
|
: "+r" (start), "+r" (error)
|
||||||
: "r" (end), "r" (icache_stride), "i" (SR_USER));
|
: "r" (end), "r" (icache_stride), "i" (SR_USER));
|
||||||
}
|
}
|
||||||
|
|
|
@ -742,7 +742,7 @@ parse_tree_node(struct device *parent, int index, struct hardware_path *modpath)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (device_for_each_child(parent, &recurse_data, descend_children))
|
if (device_for_each_child(parent, &recurse_data, descend_children))
|
||||||
{ /* nothing */ };
|
{ /* nothing */ }
|
||||||
|
|
||||||
return d.dev;
|
return d.dev;
|
||||||
}
|
}
|
||||||
|
@ -1004,6 +1004,9 @@ static __init int qemu_print_iodc_data(struct device *lin_dev, void *data)
|
||||||
|
|
||||||
pr_info("\n");
|
pr_info("\n");
|
||||||
|
|
||||||
|
/* Prevent hung task messages when printing on serial console */
|
||||||
|
cond_resched();
|
||||||
|
|
||||||
pr_info("#define HPA_%08lx_DESCRIPTION \"%s\"\n",
|
pr_info("#define HPA_%08lx_DESCRIPTION \"%s\"\n",
|
||||||
hpa, parisc_hardware_description(&dev->id));
|
hpa, parisc_hardware_description(&dev->id));
|
||||||
|
|
||||||
|
|
|
@ -120,8 +120,8 @@ static int emulate_ldh(struct pt_regs *regs, int toreg)
|
||||||
"2: ldbs 1(%%sr1,%3), %0\n"
|
"2: ldbs 1(%%sr1,%3), %0\n"
|
||||||
" depw %2, 23, 24, %0\n"
|
" depw %2, 23, 24, %0\n"
|
||||||
"3: \n"
|
"3: \n"
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b, "%1")
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b, "%1")
|
||||||
: "+r" (val), "+r" (ret), "=&r" (temp1)
|
: "+r" (val), "+r" (ret), "=&r" (temp1)
|
||||||
: "r" (saddr), "r" (regs->isr) );
|
: "r" (saddr), "r" (regs->isr) );
|
||||||
|
|
||||||
|
@ -152,8 +152,8 @@ static int emulate_ldw(struct pt_regs *regs, int toreg, int flop)
|
||||||
" mtctl %2,11\n"
|
" mtctl %2,11\n"
|
||||||
" vshd %0,%3,%0\n"
|
" vshd %0,%3,%0\n"
|
||||||
"3: \n"
|
"3: \n"
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b, "%1")
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b, "%1")
|
||||||
: "+r" (val), "+r" (ret), "=&r" (temp1), "=&r" (temp2)
|
: "+r" (val), "+r" (ret), "=&r" (temp1), "=&r" (temp2)
|
||||||
: "r" (saddr), "r" (regs->isr) );
|
: "r" (saddr), "r" (regs->isr) );
|
||||||
|
|
||||||
|
@ -189,8 +189,8 @@ static int emulate_ldd(struct pt_regs *regs, int toreg, int flop)
|
||||||
" mtsar %%r19\n"
|
" mtsar %%r19\n"
|
||||||
" shrpd %0,%%r20,%%sar,%0\n"
|
" shrpd %0,%%r20,%%sar,%0\n"
|
||||||
"3: \n"
|
"3: \n"
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b, "%1")
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b, "%1")
|
||||||
: "=r" (val), "+r" (ret)
|
: "=r" (val), "+r" (ret)
|
||||||
: "0" (val), "r" (saddr), "r" (regs->isr)
|
: "0" (val), "r" (saddr), "r" (regs->isr)
|
||||||
: "r19", "r20" );
|
: "r19", "r20" );
|
||||||
|
@ -209,9 +209,9 @@ static int emulate_ldd(struct pt_regs *regs, int toreg, int flop)
|
||||||
" vshd %0,%R0,%0\n"
|
" vshd %0,%R0,%0\n"
|
||||||
" vshd %R0,%4,%R0\n"
|
" vshd %R0,%4,%R0\n"
|
||||||
"4: \n"
|
"4: \n"
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 4b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 4b, "%1")
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 4b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 4b, "%1")
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(3b, 4b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(3b, 4b, "%1")
|
||||||
: "+r" (val), "+r" (ret), "+r" (saddr), "=&r" (shift), "=&r" (temp1)
|
: "+r" (val), "+r" (ret), "+r" (saddr), "=&r" (shift), "=&r" (temp1)
|
||||||
: "r" (regs->isr) );
|
: "r" (regs->isr) );
|
||||||
}
|
}
|
||||||
|
@ -244,8 +244,8 @@ static int emulate_sth(struct pt_regs *regs, int frreg)
|
||||||
"1: stb %1, 0(%%sr1, %3)\n"
|
"1: stb %1, 0(%%sr1, %3)\n"
|
||||||
"2: stb %2, 1(%%sr1, %3)\n"
|
"2: stb %2, 1(%%sr1, %3)\n"
|
||||||
"3: \n"
|
"3: \n"
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b, "%0")
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b, "%0")
|
||||||
: "+r" (ret), "=&r" (temp1)
|
: "+r" (ret), "=&r" (temp1)
|
||||||
: "r" (val), "r" (regs->ior), "r" (regs->isr) );
|
: "r" (val), "r" (regs->ior), "r" (regs->isr) );
|
||||||
|
|
||||||
|
@ -285,8 +285,8 @@ static int emulate_stw(struct pt_regs *regs, int frreg, int flop)
|
||||||
" stw %%r20,0(%%sr1,%2)\n"
|
" stw %%r20,0(%%sr1,%2)\n"
|
||||||
" stw %%r21,4(%%sr1,%2)\n"
|
" stw %%r21,4(%%sr1,%2)\n"
|
||||||
"3: \n"
|
"3: \n"
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b, "%0")
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b, "%0")
|
||||||
: "+r" (ret)
|
: "+r" (ret)
|
||||||
: "r" (val), "r" (regs->ior), "r" (regs->isr)
|
: "r" (val), "r" (regs->ior), "r" (regs->isr)
|
||||||
: "r19", "r20", "r21", "r22", "r1" );
|
: "r19", "r20", "r21", "r22", "r1" );
|
||||||
|
@ -329,10 +329,10 @@ static int emulate_std(struct pt_regs *regs, int frreg, int flop)
|
||||||
"3: std %%r20,0(%%sr1,%2)\n"
|
"3: std %%r20,0(%%sr1,%2)\n"
|
||||||
"4: std %%r21,8(%%sr1,%2)\n"
|
"4: std %%r21,8(%%sr1,%2)\n"
|
||||||
"5: \n"
|
"5: \n"
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 5b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 5b, "%0")
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 5b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 5b, "%0")
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(3b, 5b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(3b, 5b, "%0")
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(4b, 5b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(4b, 5b, "%0")
|
||||||
: "+r" (ret)
|
: "+r" (ret)
|
||||||
: "r" (val), "r" (regs->ior), "r" (regs->isr)
|
: "r" (val), "r" (regs->ior), "r" (regs->isr)
|
||||||
: "r19", "r20", "r21", "r22", "r1" );
|
: "r19", "r20", "r21", "r22", "r1" );
|
||||||
|
@ -357,11 +357,11 @@ static int emulate_std(struct pt_regs *regs, int frreg, int flop)
|
||||||
"4: stw %%r1,4(%%sr1,%2)\n"
|
"4: stw %%r1,4(%%sr1,%2)\n"
|
||||||
"5: stw %R1,8(%%sr1,%2)\n"
|
"5: stw %R1,8(%%sr1,%2)\n"
|
||||||
"6: \n"
|
"6: \n"
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 6b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 6b, "%0")
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 6b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 6b, "%0")
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(3b, 6b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(3b, 6b, "%0")
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(4b, 6b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(4b, 6b, "%0")
|
||||||
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(5b, 6b)
|
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(5b, 6b, "%0")
|
||||||
: "+r" (ret)
|
: "+r" (ret)
|
||||||
: "r" (val), "r" (regs->ior), "r" (regs->isr)
|
: "r" (val), "r" (regs->ior), "r" (regs->isr)
|
||||||
: "r19", "r20", "r21", "r1" );
|
: "r19", "r20", "r21", "r1" );
|
||||||
|
|
|
@ -127,7 +127,7 @@ SECTIONS
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RO_DATA(8)
|
RO_DATA(PAGE_SIZE)
|
||||||
|
|
||||||
/* unwind info */
|
/* unwind info */
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
|
@ -150,11 +150,16 @@ int fixup_exception(struct pt_regs *regs)
|
||||||
* Fix up get_user() and put_user().
|
* Fix up get_user() and put_user().
|
||||||
* ASM_EXCEPTIONTABLE_ENTRY_EFAULT() sets the least-significant
|
* ASM_EXCEPTIONTABLE_ENTRY_EFAULT() sets the least-significant
|
||||||
* bit in the relative address of the fixup routine to indicate
|
* bit in the relative address of the fixup routine to indicate
|
||||||
* that gr[ASM_EXCEPTIONTABLE_REG] should be loaded with
|
* that the register encoded in the "or %r0,%r0,register"
|
||||||
* -EFAULT to report a userspace access error.
|
* opcode should be loaded with -EFAULT to report a userspace
|
||||||
|
* access error.
|
||||||
*/
|
*/
|
||||||
if (fix->fixup & 1) {
|
if (fix->fixup & 1) {
|
||||||
regs->gr[ASM_EXCEPTIONTABLE_REG] = -EFAULT;
|
int fault_error_reg = fix->err_opcode & 0x1f;
|
||||||
|
if (!WARN_ON(!fault_error_reg))
|
||||||
|
regs->gr[fault_error_reg] = -EFAULT;
|
||||||
|
pr_debug("Unalignment fixup of register %d at %pS\n",
|
||||||
|
fault_error_reg, (void*)regs->iaoq[0]);
|
||||||
|
|
||||||
/* zero target register for get_user() */
|
/* zero target register for get_user() */
|
||||||
if (parisc_acctyp(0, regs->iir) == VM_READ) {
|
if (parisc_acctyp(0, regs->iir) == VM_READ) {
|
||||||
|
|
|
@ -93,144 +93,160 @@ clint_mswi: interrupt-controller@7094000000 {
|
||||||
<&cpu63_intc 3>;
|
<&cpu63_intc 3>;
|
||||||
};
|
};
|
||||||
|
|
||||||
clint_mtimer0: timer@70ac000000 {
|
clint_mtimer0: timer@70ac004000 {
|
||||||
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
||||||
reg = <0x00000070 0xac000000 0x00000000 0x00007ff8>;
|
reg = <0x00000070 0xac004000 0x00000000 0x0000c000>;
|
||||||
|
reg-names = "mtimecmp";
|
||||||
interrupts-extended = <&cpu0_intc 7>,
|
interrupts-extended = <&cpu0_intc 7>,
|
||||||
<&cpu1_intc 7>,
|
<&cpu1_intc 7>,
|
||||||
<&cpu2_intc 7>,
|
<&cpu2_intc 7>,
|
||||||
<&cpu3_intc 7>;
|
<&cpu3_intc 7>;
|
||||||
};
|
};
|
||||||
|
|
||||||
clint_mtimer1: timer@70ac010000 {
|
clint_mtimer1: timer@70ac014000 {
|
||||||
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
||||||
reg = <0x00000070 0xac010000 0x00000000 0x00007ff8>;
|
reg = <0x00000070 0xac014000 0x00000000 0x0000c000>;
|
||||||
|
reg-names = "mtimecmp";
|
||||||
interrupts-extended = <&cpu4_intc 7>,
|
interrupts-extended = <&cpu4_intc 7>,
|
||||||
<&cpu5_intc 7>,
|
<&cpu5_intc 7>,
|
||||||
<&cpu6_intc 7>,
|
<&cpu6_intc 7>,
|
||||||
<&cpu7_intc 7>;
|
<&cpu7_intc 7>;
|
||||||
};
|
};
|
||||||
|
|
||||||
clint_mtimer2: timer@70ac020000 {
|
clint_mtimer2: timer@70ac024000 {
|
||||||
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
||||||
reg = <0x00000070 0xac020000 0x00000000 0x00007ff8>;
|
reg = <0x00000070 0xac024000 0x00000000 0x0000c000>;
|
||||||
|
reg-names = "mtimecmp";
|
||||||
interrupts-extended = <&cpu8_intc 7>,
|
interrupts-extended = <&cpu8_intc 7>,
|
||||||
<&cpu9_intc 7>,
|
<&cpu9_intc 7>,
|
||||||
<&cpu10_intc 7>,
|
<&cpu10_intc 7>,
|
||||||
<&cpu11_intc 7>;
|
<&cpu11_intc 7>;
|
||||||
};
|
};
|
||||||
|
|
||||||
clint_mtimer3: timer@70ac030000 {
|
clint_mtimer3: timer@70ac034000 {
|
||||||
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
||||||
reg = <0x00000070 0xac030000 0x00000000 0x00007ff8>;
|
reg = <0x00000070 0xac034000 0x00000000 0x0000c000>;
|
||||||
|
reg-names = "mtimecmp";
|
||||||
interrupts-extended = <&cpu12_intc 7>,
|
interrupts-extended = <&cpu12_intc 7>,
|
||||||
<&cpu13_intc 7>,
|
<&cpu13_intc 7>,
|
||||||
<&cpu14_intc 7>,
|
<&cpu14_intc 7>,
|
||||||
<&cpu15_intc 7>;
|
<&cpu15_intc 7>;
|
||||||
};
|
};
|
||||||
|
|
||||||
clint_mtimer4: timer@70ac040000 {
|
clint_mtimer4: timer@70ac044000 {
|
||||||
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
||||||
reg = <0x00000070 0xac040000 0x00000000 0x00007ff8>;
|
reg = <0x00000070 0xac044000 0x00000000 0x0000c000>;
|
||||||
|
reg-names = "mtimecmp";
|
||||||
interrupts-extended = <&cpu16_intc 7>,
|
interrupts-extended = <&cpu16_intc 7>,
|
||||||
<&cpu17_intc 7>,
|
<&cpu17_intc 7>,
|
||||||
<&cpu18_intc 7>,
|
<&cpu18_intc 7>,
|
||||||
<&cpu19_intc 7>;
|
<&cpu19_intc 7>;
|
||||||
};
|
};
|
||||||
|
|
||||||
clint_mtimer5: timer@70ac050000 {
|
clint_mtimer5: timer@70ac054000 {
|
||||||
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
||||||
reg = <0x00000070 0xac050000 0x00000000 0x00007ff8>;
|
reg = <0x00000070 0xac054000 0x00000000 0x0000c000>;
|
||||||
|
reg-names = "mtimecmp";
|
||||||
interrupts-extended = <&cpu20_intc 7>,
|
interrupts-extended = <&cpu20_intc 7>,
|
||||||
<&cpu21_intc 7>,
|
<&cpu21_intc 7>,
|
||||||
<&cpu22_intc 7>,
|
<&cpu22_intc 7>,
|
||||||
<&cpu23_intc 7>;
|
<&cpu23_intc 7>;
|
||||||
};
|
};
|
||||||
|
|
||||||
clint_mtimer6: timer@70ac060000 {
|
clint_mtimer6: timer@70ac064000 {
|
||||||
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
||||||
reg = <0x00000070 0xac060000 0x00000000 0x00007ff8>;
|
reg = <0x00000070 0xac064000 0x00000000 0x0000c000>;
|
||||||
|
reg-names = "mtimecmp";
|
||||||
interrupts-extended = <&cpu24_intc 7>,
|
interrupts-extended = <&cpu24_intc 7>,
|
||||||
<&cpu25_intc 7>,
|
<&cpu25_intc 7>,
|
||||||
<&cpu26_intc 7>,
|
<&cpu26_intc 7>,
|
||||||
<&cpu27_intc 7>;
|
<&cpu27_intc 7>;
|
||||||
};
|
};
|
||||||
|
|
||||||
clint_mtimer7: timer@70ac070000 {
|
clint_mtimer7: timer@70ac074000 {
|
||||||
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
||||||
reg = <0x00000070 0xac070000 0x00000000 0x00007ff8>;
|
reg = <0x00000070 0xac074000 0x00000000 0x0000c000>;
|
||||||
|
reg-names = "mtimecmp";
|
||||||
interrupts-extended = <&cpu28_intc 7>,
|
interrupts-extended = <&cpu28_intc 7>,
|
||||||
<&cpu29_intc 7>,
|
<&cpu29_intc 7>,
|
||||||
<&cpu30_intc 7>,
|
<&cpu30_intc 7>,
|
||||||
<&cpu31_intc 7>;
|
<&cpu31_intc 7>;
|
||||||
};
|
};
|
||||||
|
|
||||||
clint_mtimer8: timer@70ac080000 {
|
clint_mtimer8: timer@70ac084000 {
|
||||||
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
||||||
reg = <0x00000070 0xac080000 0x00000000 0x00007ff8>;
|
reg = <0x00000070 0xac084000 0x00000000 0x0000c000>;
|
||||||
|
reg-names = "mtimecmp";
|
||||||
interrupts-extended = <&cpu32_intc 7>,
|
interrupts-extended = <&cpu32_intc 7>,
|
||||||
<&cpu33_intc 7>,
|
<&cpu33_intc 7>,
|
||||||
<&cpu34_intc 7>,
|
<&cpu34_intc 7>,
|
||||||
<&cpu35_intc 7>;
|
<&cpu35_intc 7>;
|
||||||
};
|
};
|
||||||
|
|
||||||
clint_mtimer9: timer@70ac090000 {
|
clint_mtimer9: timer@70ac094000 {
|
||||||
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
||||||
reg = <0x00000070 0xac090000 0x00000000 0x00007ff8>;
|
reg = <0x00000070 0xac094000 0x00000000 0x0000c000>;
|
||||||
|
reg-names = "mtimecmp";
|
||||||
interrupts-extended = <&cpu36_intc 7>,
|
interrupts-extended = <&cpu36_intc 7>,
|
||||||
<&cpu37_intc 7>,
|
<&cpu37_intc 7>,
|
||||||
<&cpu38_intc 7>,
|
<&cpu38_intc 7>,
|
||||||
<&cpu39_intc 7>;
|
<&cpu39_intc 7>;
|
||||||
};
|
};
|
||||||
|
|
||||||
clint_mtimer10: timer@70ac0a0000 {
|
clint_mtimer10: timer@70ac0a4000 {
|
||||||
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
||||||
reg = <0x00000070 0xac0a0000 0x00000000 0x00007ff8>;
|
reg = <0x00000070 0xac0a4000 0x00000000 0x0000c000>;
|
||||||
|
reg-names = "mtimecmp";
|
||||||
interrupts-extended = <&cpu40_intc 7>,
|
interrupts-extended = <&cpu40_intc 7>,
|
||||||
<&cpu41_intc 7>,
|
<&cpu41_intc 7>,
|
||||||
<&cpu42_intc 7>,
|
<&cpu42_intc 7>,
|
||||||
<&cpu43_intc 7>;
|
<&cpu43_intc 7>;
|
||||||
};
|
};
|
||||||
|
|
||||||
clint_mtimer11: timer@70ac0b0000 {
|
clint_mtimer11: timer@70ac0b4000 {
|
||||||
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
||||||
reg = <0x00000070 0xac0b0000 0x00000000 0x00007ff8>;
|
reg = <0x00000070 0xac0b4000 0x00000000 0x0000c000>;
|
||||||
|
reg-names = "mtimecmp";
|
||||||
interrupts-extended = <&cpu44_intc 7>,
|
interrupts-extended = <&cpu44_intc 7>,
|
||||||
<&cpu45_intc 7>,
|
<&cpu45_intc 7>,
|
||||||
<&cpu46_intc 7>,
|
<&cpu46_intc 7>,
|
||||||
<&cpu47_intc 7>;
|
<&cpu47_intc 7>;
|
||||||
};
|
};
|
||||||
|
|
||||||
clint_mtimer12: timer@70ac0c0000 {
|
clint_mtimer12: timer@70ac0c4000 {
|
||||||
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
||||||
reg = <0x00000070 0xac0c0000 0x00000000 0x00007ff8>;
|
reg = <0x00000070 0xac0c4000 0x00000000 0x0000c000>;
|
||||||
|
reg-names = "mtimecmp";
|
||||||
interrupts-extended = <&cpu48_intc 7>,
|
interrupts-extended = <&cpu48_intc 7>,
|
||||||
<&cpu49_intc 7>,
|
<&cpu49_intc 7>,
|
||||||
<&cpu50_intc 7>,
|
<&cpu50_intc 7>,
|
||||||
<&cpu51_intc 7>;
|
<&cpu51_intc 7>;
|
||||||
};
|
};
|
||||||
|
|
||||||
clint_mtimer13: timer@70ac0d0000 {
|
clint_mtimer13: timer@70ac0d4000 {
|
||||||
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
||||||
reg = <0x00000070 0xac0d0000 0x00000000 0x00007ff8>;
|
reg = <0x00000070 0xac0d4000 0x00000000 0x0000c000>;
|
||||||
|
reg-names = "mtimecmp";
|
||||||
interrupts-extended = <&cpu52_intc 7>,
|
interrupts-extended = <&cpu52_intc 7>,
|
||||||
<&cpu53_intc 7>,
|
<&cpu53_intc 7>,
|
||||||
<&cpu54_intc 7>,
|
<&cpu54_intc 7>,
|
||||||
<&cpu55_intc 7>;
|
<&cpu55_intc 7>;
|
||||||
};
|
};
|
||||||
|
|
||||||
clint_mtimer14: timer@70ac0e0000 {
|
clint_mtimer14: timer@70ac0e4000 {
|
||||||
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
||||||
reg = <0x00000070 0xac0e0000 0x00000000 0x00007ff8>;
|
reg = <0x00000070 0xac0e4000 0x00000000 0x0000c000>;
|
||||||
|
reg-names = "mtimecmp";
|
||||||
interrupts-extended = <&cpu56_intc 7>,
|
interrupts-extended = <&cpu56_intc 7>,
|
||||||
<&cpu57_intc 7>,
|
<&cpu57_intc 7>,
|
||||||
<&cpu58_intc 7>,
|
<&cpu58_intc 7>,
|
||||||
<&cpu59_intc 7>;
|
<&cpu59_intc 7>;
|
||||||
};
|
};
|
||||||
|
|
||||||
clint_mtimer15: timer@70ac0f0000 {
|
clint_mtimer15: timer@70ac0f4000 {
|
||||||
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
|
||||||
reg = <0x00000070 0xac0f0000 0x00000000 0x00007ff8>;
|
reg = <0x00000070 0xac0f4000 0x00000000 0x0000c000>;
|
||||||
|
reg-names = "mtimecmp";
|
||||||
interrupts-extended = <&cpu60_intc 7>,
|
interrupts-extended = <&cpu60_intc 7>,
|
||||||
<&cpu61_intc 7>,
|
<&cpu61_intc 7>,
|
||||||
<&cpu62_intc 7>,
|
<&cpu62_intc 7>,
|
||||||
|
|
|
@ -115,7 +115,9 @@ archprepare:
|
||||||
$(Q)$(MAKE) $(build)=$(HOST_DIR)/um include/generated/user_constants.h
|
$(Q)$(MAKE) $(build)=$(HOST_DIR)/um include/generated/user_constants.h
|
||||||
|
|
||||||
LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
|
LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
|
||||||
LINK-$(CONFIG_LD_SCRIPT_DYN) += $(call cc-option, -no-pie)
|
ifdef CONFIG_LD_SCRIPT_DYN
|
||||||
|
LINK-$(call gcc-min-version, 60100)$(CONFIG_CC_IS_CLANG) += -no-pie
|
||||||
|
endif
|
||||||
LINK-$(CONFIG_LD_SCRIPT_DYN_RPATH) += -Wl,-rpath,/lib
|
LINK-$(CONFIG_LD_SCRIPT_DYN_RPATH) += -Wl,-rpath,/lib
|
||||||
|
|
||||||
CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,) \
|
CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,) \
|
||||||
|
|
|
@ -112,13 +112,13 @@ ifeq ($(CONFIG_X86_32),y)
|
||||||
# temporary until string.h is fixed
|
# temporary until string.h is fixed
|
||||||
KBUILD_CFLAGS += -ffreestanding
|
KBUILD_CFLAGS += -ffreestanding
|
||||||
|
|
||||||
ifeq ($(CONFIG_STACKPROTECTOR),y)
|
ifeq ($(CONFIG_STACKPROTECTOR),y)
|
||||||
ifeq ($(CONFIG_SMP),y)
|
ifeq ($(CONFIG_SMP),y)
|
||||||
KBUILD_CFLAGS += -mstack-protector-guard-reg=fs -mstack-protector-guard-symbol=__stack_chk_guard
|
KBUILD_CFLAGS += -mstack-protector-guard-reg=fs -mstack-protector-guard-symbol=__stack_chk_guard
|
||||||
else
|
else
|
||||||
KBUILD_CFLAGS += -mstack-protector-guard=global
|
KBUILD_CFLAGS += -mstack-protector-guard=global
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
BITS := 64
|
BITS := 64
|
||||||
UTS_MACHINE := x86_64
|
UTS_MACHINE := x86_64
|
||||||
|
|
|
@ -81,10 +81,8 @@
|
||||||
#define X86_FEATURE_K6_MTRR ( 3*32+ 1) /* AMD K6 nonstandard MTRRs */
|
#define X86_FEATURE_K6_MTRR ( 3*32+ 1) /* AMD K6 nonstandard MTRRs */
|
||||||
#define X86_FEATURE_CYRIX_ARR ( 3*32+ 2) /* Cyrix ARRs (= MTRRs) */
|
#define X86_FEATURE_CYRIX_ARR ( 3*32+ 2) /* Cyrix ARRs (= MTRRs) */
|
||||||
#define X86_FEATURE_CENTAUR_MCR ( 3*32+ 3) /* Centaur MCRs (= MTRRs) */
|
#define X86_FEATURE_CENTAUR_MCR ( 3*32+ 3) /* Centaur MCRs (= MTRRs) */
|
||||||
|
|
||||||
/* CPU types for specific tunings: */
|
|
||||||
#define X86_FEATURE_K8 ( 3*32+ 4) /* "" Opteron, Athlon64 */
|
#define X86_FEATURE_K8 ( 3*32+ 4) /* "" Opteron, Athlon64 */
|
||||||
/* FREE, was #define X86_FEATURE_K7 ( 3*32+ 5) "" Athlon */
|
#define X86_FEATURE_ZEN5 ( 3*32+ 5) /* "" CPU based on Zen5 microarchitecture */
|
||||||
#define X86_FEATURE_P3 ( 3*32+ 6) /* "" P3 */
|
#define X86_FEATURE_P3 ( 3*32+ 6) /* "" P3 */
|
||||||
#define X86_FEATURE_P4 ( 3*32+ 7) /* "" P4 */
|
#define X86_FEATURE_P4 ( 3*32+ 7) /* "" P4 */
|
||||||
#define X86_FEATURE_CONSTANT_TSC ( 3*32+ 8) /* TSC ticks at a constant rate */
|
#define X86_FEATURE_CONSTANT_TSC ( 3*32+ 8) /* TSC ticks at a constant rate */
|
||||||
|
|
|
@ -162,6 +162,8 @@
|
||||||
#define INTEL_FAM6_ATOM_CRESTMONT_X 0xAF /* Sierra Forest */
|
#define INTEL_FAM6_ATOM_CRESTMONT_X 0xAF /* Sierra Forest */
|
||||||
#define INTEL_FAM6_ATOM_CRESTMONT 0xB6 /* Grand Ridge */
|
#define INTEL_FAM6_ATOM_CRESTMONT 0xB6 /* Grand Ridge */
|
||||||
|
|
||||||
|
#define INTEL_FAM6_ATOM_DARKMONT_X 0xDD /* Clearwater Forest */
|
||||||
|
|
||||||
/* Xeon Phi */
|
/* Xeon Phi */
|
||||||
|
|
||||||
#define INTEL_FAM6_XEON_PHI_KNL 0x57 /* Knights Landing */
|
#define INTEL_FAM6_XEON_PHI_KNL 0x57 /* Knights Landing */
|
||||||
|
|
|
@ -64,6 +64,7 @@ static inline bool kmsan_virt_addr_valid(void *addr)
|
||||||
{
|
{
|
||||||
unsigned long x = (unsigned long)addr;
|
unsigned long x = (unsigned long)addr;
|
||||||
unsigned long y = x - __START_KERNEL_map;
|
unsigned long y = x - __START_KERNEL_map;
|
||||||
|
bool ret;
|
||||||
|
|
||||||
/* use the carry flag to determine if x was < __START_KERNEL_map */
|
/* use the carry flag to determine if x was < __START_KERNEL_map */
|
||||||
if (unlikely(x > y)) {
|
if (unlikely(x > y)) {
|
||||||
|
@ -79,7 +80,21 @@ static inline bool kmsan_virt_addr_valid(void *addr)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return pfn_valid(x >> PAGE_SHIFT);
|
/*
|
||||||
|
* pfn_valid() relies on RCU, and may call into the scheduler on exiting
|
||||||
|
* the critical section. However, this would result in recursion with
|
||||||
|
* KMSAN. Therefore, disable preemption here, and re-enable preemption
|
||||||
|
* below while suppressing reschedules to avoid recursion.
|
||||||
|
*
|
||||||
|
* Note, this sacrifices occasionally breaking scheduling guarantees.
|
||||||
|
* Although, a kernel compiled with KMSAN has already given up on any
|
||||||
|
* performance guarantees due to being heavily instrumented.
|
||||||
|
*/
|
||||||
|
preempt_disable();
|
||||||
|
ret = pfn_valid(x >> PAGE_SHIFT);
|
||||||
|
preempt_enable_no_resched();
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !MODULE */
|
#endif /* !MODULE */
|
||||||
|
|
|
@ -58,12 +58,29 @@ extern long __ia32_sys_ni_syscall(const struct pt_regs *regs);
|
||||||
,,regs->di,,regs->si,,regs->dx \
|
,,regs->di,,regs->si,,regs->dx \
|
||||||
,,regs->r10,,regs->r8,,regs->r9) \
|
,,regs->r10,,regs->r8,,regs->r9) \
|
||||||
|
|
||||||
|
|
||||||
|
/* SYSCALL_PT_ARGS is Adapted from s390x */
|
||||||
|
#define SYSCALL_PT_ARG6(m, t1, t2, t3, t4, t5, t6) \
|
||||||
|
SYSCALL_PT_ARG5(m, t1, t2, t3, t4, t5), m(t6, (regs->bp))
|
||||||
|
#define SYSCALL_PT_ARG5(m, t1, t2, t3, t4, t5) \
|
||||||
|
SYSCALL_PT_ARG4(m, t1, t2, t3, t4), m(t5, (regs->di))
|
||||||
|
#define SYSCALL_PT_ARG4(m, t1, t2, t3, t4) \
|
||||||
|
SYSCALL_PT_ARG3(m, t1, t2, t3), m(t4, (regs->si))
|
||||||
|
#define SYSCALL_PT_ARG3(m, t1, t2, t3) \
|
||||||
|
SYSCALL_PT_ARG2(m, t1, t2), m(t3, (regs->dx))
|
||||||
|
#define SYSCALL_PT_ARG2(m, t1, t2) \
|
||||||
|
SYSCALL_PT_ARG1(m, t1), m(t2, (regs->cx))
|
||||||
|
#define SYSCALL_PT_ARG1(m, t1) m(t1, (regs->bx))
|
||||||
|
#define SYSCALL_PT_ARGS(x, ...) SYSCALL_PT_ARG##x(__VA_ARGS__)
|
||||||
|
|
||||||
|
#define __SC_COMPAT_CAST(t, a) \
|
||||||
|
(__typeof(__builtin_choose_expr(__TYPE_IS_L(t), 0, 0U))) \
|
||||||
|
(unsigned int)a
|
||||||
|
|
||||||
/* Mapping of registers to parameters for syscalls on i386 */
|
/* Mapping of registers to parameters for syscalls on i386 */
|
||||||
#define SC_IA32_REGS_TO_ARGS(x, ...) \
|
#define SC_IA32_REGS_TO_ARGS(x, ...) \
|
||||||
__MAP(x,__SC_ARGS \
|
SYSCALL_PT_ARGS(x, __SC_COMPAT_CAST, \
|
||||||
,,(unsigned int)regs->bx,,(unsigned int)regs->cx \
|
__MAP(x, __SC_TYPE, __VA_ARGS__)) \
|
||||||
,,(unsigned int)regs->dx,,(unsigned int)regs->si \
|
|
||||||
,,(unsigned int)regs->di,,(unsigned int)regs->bp)
|
|
||||||
|
|
||||||
#define __SYS_STUB0(abi, name) \
|
#define __SYS_STUB0(abi, name) \
|
||||||
long __##abi##_##name(const struct pt_regs *regs); \
|
long __##abi##_##name(const struct pt_regs *regs); \
|
||||||
|
|
|
@ -403,7 +403,7 @@ noinstr void BUG_func(void)
|
||||||
{
|
{
|
||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(BUG_func);
|
EXPORT_SYMBOL(BUG_func);
|
||||||
|
|
||||||
#define CALL_RIP_REL_OPCODE 0xff
|
#define CALL_RIP_REL_OPCODE 0xff
|
||||||
#define CALL_RIP_REL_MODRM 0x15
|
#define CALL_RIP_REL_MODRM 0x15
|
||||||
|
|
|
@ -538,7 +538,7 @@ static void bsp_init_amd(struct cpuinfo_x86 *c)
|
||||||
|
|
||||||
/* Figure out Zen generations: */
|
/* Figure out Zen generations: */
|
||||||
switch (c->x86) {
|
switch (c->x86) {
|
||||||
case 0x17: {
|
case 0x17:
|
||||||
switch (c->x86_model) {
|
switch (c->x86_model) {
|
||||||
case 0x00 ... 0x2f:
|
case 0x00 ... 0x2f:
|
||||||
case 0x50 ... 0x5f:
|
case 0x50 ... 0x5f:
|
||||||
|
@ -554,8 +554,8 @@ static void bsp_init_amd(struct cpuinfo_x86 *c)
|
||||||
goto warn;
|
goto warn;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case 0x19: {
|
case 0x19:
|
||||||
switch (c->x86_model) {
|
switch (c->x86_model) {
|
||||||
case 0x00 ... 0x0f:
|
case 0x00 ... 0x0f:
|
||||||
case 0x20 ... 0x5f:
|
case 0x20 ... 0x5f:
|
||||||
|
@ -569,7 +569,20 @@ static void bsp_init_amd(struct cpuinfo_x86 *c)
|
||||||
goto warn;
|
goto warn;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
case 0x1a:
|
||||||
|
switch (c->x86_model) {
|
||||||
|
case 0x00 ... 0x0f:
|
||||||
|
case 0x20 ... 0x2f:
|
||||||
|
case 0x40 ... 0x4f:
|
||||||
|
case 0x70 ... 0x7f:
|
||||||
|
setup_force_cpu_cap(X86_FEATURE_ZEN5);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
goto warn;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1039,6 +1052,11 @@ static void init_amd_zen4(struct cpuinfo_x86 *c)
|
||||||
msr_set_bit(MSR_ZEN4_BP_CFG, MSR_ZEN4_BP_CFG_SHARED_BTB_FIX_BIT);
|
msr_set_bit(MSR_ZEN4_BP_CFG, MSR_ZEN4_BP_CFG_SHARED_BTB_FIX_BIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void init_amd_zen5(struct cpuinfo_x86 *c)
|
||||||
|
{
|
||||||
|
init_amd_zen_common();
|
||||||
|
}
|
||||||
|
|
||||||
static void init_amd(struct cpuinfo_x86 *c)
|
static void init_amd(struct cpuinfo_x86 *c)
|
||||||
{
|
{
|
||||||
u64 vm_cr;
|
u64 vm_cr;
|
||||||
|
@ -1084,6 +1102,8 @@ static void init_amd(struct cpuinfo_x86 *c)
|
||||||
init_amd_zen3(c);
|
init_amd_zen3(c);
|
||||||
else if (boot_cpu_has(X86_FEATURE_ZEN4))
|
else if (boot_cpu_has(X86_FEATURE_ZEN4))
|
||||||
init_amd_zen4(c);
|
init_amd_zen4(c);
|
||||||
|
else if (boot_cpu_has(X86_FEATURE_ZEN5))
|
||||||
|
init_amd_zen5(c);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enable workaround for FXSAVE leak on CPUs
|
* Enable workaround for FXSAVE leak on CPUs
|
||||||
|
|
|
@ -205,12 +205,19 @@ static int bio_copy_user_iov(struct request *rq, struct rq_map_data *map_data,
|
||||||
/*
|
/*
|
||||||
* success
|
* success
|
||||||
*/
|
*/
|
||||||
if ((iov_iter_rw(iter) == WRITE &&
|
if (iov_iter_rw(iter) == WRITE &&
|
||||||
(!map_data || !map_data->null_mapped)) ||
|
(!map_data || !map_data->null_mapped)) {
|
||||||
(map_data && map_data->from_user)) {
|
|
||||||
ret = bio_copy_from_iter(bio, iter);
|
ret = bio_copy_from_iter(bio, iter);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
} else if (map_data && map_data->from_user) {
|
||||||
|
struct iov_iter iter2 = *iter;
|
||||||
|
|
||||||
|
/* This is the copy-in part of SG_DXFER_TO_FROM_DEV. */
|
||||||
|
iter2.data_source = ITER_SOURCE;
|
||||||
|
ret = bio_copy_from_iter(bio, &iter2);
|
||||||
|
if (ret)
|
||||||
|
goto cleanup;
|
||||||
} else {
|
} else {
|
||||||
if (bmd->is_our_pages)
|
if (bmd->is_our_pages)
|
||||||
zero_fill_bio(bio);
|
zero_fill_bio(bio);
|
||||||
|
|
|
@ -20,8 +20,6 @@ static int blkpg_do_ioctl(struct block_device *bdev,
|
||||||
struct blkpg_partition p;
|
struct blkpg_partition p;
|
||||||
sector_t start, length;
|
sector_t start, length;
|
||||||
|
|
||||||
if (disk->flags & GENHD_FL_NO_PART)
|
|
||||||
return -EINVAL;
|
|
||||||
if (!capable(CAP_SYS_ADMIN))
|
if (!capable(CAP_SYS_ADMIN))
|
||||||
return -EACCES;
|
return -EACCES;
|
||||||
if (copy_from_user(&p, upart, sizeof(struct blkpg_partition)))
|
if (copy_from_user(&p, upart, sizeof(struct blkpg_partition)))
|
||||||
|
|
|
@ -439,6 +439,11 @@ int bdev_add_partition(struct gendisk *disk, int partno, sector_t start,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (disk->flags & GENHD_FL_NO_PART) {
|
||||||
|
ret = -EINVAL;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
if (partition_overlaps(disk, start, length, -1)) {
|
if (partition_overlaps(disk, start, length, -1)) {
|
||||||
ret = -EBUSY;
|
ret = -EBUSY;
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
@ -102,7 +102,7 @@ static int reset_pending_show(struct seq_file *s, void *v)
|
||||||
{
|
{
|
||||||
struct ivpu_device *vdev = seq_to_ivpu(s);
|
struct ivpu_device *vdev = seq_to_ivpu(s);
|
||||||
|
|
||||||
seq_printf(s, "%d\n", atomic_read(&vdev->pm->in_reset));
|
seq_printf(s, "%d\n", atomic_read(&vdev->pm->reset_pending));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +130,9 @@ dvfs_mode_fops_write(struct file *file, const char __user *user_buf, size_t size
|
||||||
|
|
||||||
fw->dvfs_mode = dvfs_mode;
|
fw->dvfs_mode = dvfs_mode;
|
||||||
|
|
||||||
ivpu_pm_schedule_recovery(vdev);
|
ret = pci_try_reset_function(to_pci_dev(vdev->drm.dev));
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
@ -190,7 +192,10 @@ fw_profiling_freq_fops_write(struct file *file, const char __user *user_buf,
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ivpu_hw_profiling_freq_drive(vdev, enable);
|
ivpu_hw_profiling_freq_drive(vdev, enable);
|
||||||
ivpu_pm_schedule_recovery(vdev);
|
|
||||||
|
ret = pci_try_reset_function(to_pci_dev(vdev->drm.dev));
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
@ -301,11 +306,18 @@ static ssize_t
|
||||||
ivpu_force_recovery_fn(struct file *file, const char __user *user_buf, size_t size, loff_t *pos)
|
ivpu_force_recovery_fn(struct file *file, const char __user *user_buf, size_t size, loff_t *pos)
|
||||||
{
|
{
|
||||||
struct ivpu_device *vdev = file->private_data;
|
struct ivpu_device *vdev = file->private_data;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (!size)
|
if (!size)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
ivpu_pm_schedule_recovery(vdev);
|
ret = ivpu_rpm_get(vdev);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
ivpu_pm_trigger_recovery(vdev, "debugfs");
|
||||||
|
flush_work(&vdev->pm->recovery_work);
|
||||||
|
ivpu_rpm_put(vdev);
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include <linux/firmware.h>
|
#include <linux/firmware.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
|
#include <linux/pm_runtime.h>
|
||||||
|
|
||||||
#include <drm/drm_accel.h>
|
#include <drm/drm_accel.h>
|
||||||
#include <drm/drm_file.h>
|
#include <drm/drm_file.h>
|
||||||
|
@ -17,6 +18,7 @@
|
||||||
#include "ivpu_debugfs.h"
|
#include "ivpu_debugfs.h"
|
||||||
#include "ivpu_drv.h"
|
#include "ivpu_drv.h"
|
||||||
#include "ivpu_fw.h"
|
#include "ivpu_fw.h"
|
||||||
|
#include "ivpu_fw_log.h"
|
||||||
#include "ivpu_gem.h"
|
#include "ivpu_gem.h"
|
||||||
#include "ivpu_hw.h"
|
#include "ivpu_hw.h"
|
||||||
#include "ivpu_ipc.h"
|
#include "ivpu_ipc.h"
|
||||||
|
@ -65,22 +67,20 @@ struct ivpu_file_priv *ivpu_file_priv_get(struct ivpu_file_priv *file_priv)
|
||||||
return file_priv;
|
return file_priv;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ivpu_file_priv *ivpu_file_priv_get_by_ctx_id(struct ivpu_device *vdev, unsigned long id)
|
static void file_priv_unbind(struct ivpu_device *vdev, struct ivpu_file_priv *file_priv)
|
||||||
{
|
{
|
||||||
struct ivpu_file_priv *file_priv;
|
mutex_lock(&file_priv->lock);
|
||||||
|
if (file_priv->bound) {
|
||||||
|
ivpu_dbg(vdev, FILE, "file_priv unbind: ctx %u\n", file_priv->ctx.id);
|
||||||
|
|
||||||
xa_lock_irq(&vdev->context_xa);
|
ivpu_cmdq_release_all_locked(file_priv);
|
||||||
file_priv = xa_load(&vdev->context_xa, id);
|
ivpu_jsm_context_release(vdev, file_priv->ctx.id);
|
||||||
/* file_priv may still be in context_xa during file_priv_release() */
|
ivpu_bo_unbind_all_bos_from_context(vdev, &file_priv->ctx);
|
||||||
if (file_priv && !kref_get_unless_zero(&file_priv->ref))
|
ivpu_mmu_user_context_fini(vdev, &file_priv->ctx);
|
||||||
file_priv = NULL;
|
file_priv->bound = false;
|
||||||
xa_unlock_irq(&vdev->context_xa);
|
drm_WARN_ON(&vdev->drm, !xa_erase_irq(&vdev->context_xa, file_priv->ctx.id));
|
||||||
|
}
|
||||||
if (file_priv)
|
mutex_unlock(&file_priv->lock);
|
||||||
ivpu_dbg(vdev, KREF, "file_priv get by id: ctx %u refcount %u\n",
|
|
||||||
file_priv->ctx.id, kref_read(&file_priv->ref));
|
|
||||||
|
|
||||||
return file_priv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void file_priv_release(struct kref *ref)
|
static void file_priv_release(struct kref *ref)
|
||||||
|
@ -88,13 +88,15 @@ static void file_priv_release(struct kref *ref)
|
||||||
struct ivpu_file_priv *file_priv = container_of(ref, struct ivpu_file_priv, ref);
|
struct ivpu_file_priv *file_priv = container_of(ref, struct ivpu_file_priv, ref);
|
||||||
struct ivpu_device *vdev = file_priv->vdev;
|
struct ivpu_device *vdev = file_priv->vdev;
|
||||||
|
|
||||||
ivpu_dbg(vdev, FILE, "file_priv release: ctx %u\n", file_priv->ctx.id);
|
ivpu_dbg(vdev, FILE, "file_priv release: ctx %u bound %d\n",
|
||||||
|
file_priv->ctx.id, (bool)file_priv->bound);
|
||||||
|
|
||||||
|
pm_runtime_get_sync(vdev->drm.dev);
|
||||||
|
mutex_lock(&vdev->context_list_lock);
|
||||||
|
file_priv_unbind(vdev, file_priv);
|
||||||
|
mutex_unlock(&vdev->context_list_lock);
|
||||||
|
pm_runtime_put_autosuspend(vdev->drm.dev);
|
||||||
|
|
||||||
ivpu_cmdq_release_all(file_priv);
|
|
||||||
ivpu_jsm_context_release(vdev, file_priv->ctx.id);
|
|
||||||
ivpu_bo_remove_all_bos_from_context(vdev, &file_priv->ctx);
|
|
||||||
ivpu_mmu_user_context_fini(vdev, &file_priv->ctx);
|
|
||||||
drm_WARN_ON(&vdev->drm, xa_erase_irq(&vdev->context_xa, file_priv->ctx.id) != file_priv);
|
|
||||||
mutex_destroy(&file_priv->lock);
|
mutex_destroy(&file_priv->lock);
|
||||||
kfree(file_priv);
|
kfree(file_priv);
|
||||||
}
|
}
|
||||||
|
@ -176,9 +178,6 @@ static int ivpu_get_param_ioctl(struct drm_device *dev, void *data, struct drm_f
|
||||||
case DRM_IVPU_PARAM_CONTEXT_BASE_ADDRESS:
|
case DRM_IVPU_PARAM_CONTEXT_BASE_ADDRESS:
|
||||||
args->value = vdev->hw->ranges.user.start;
|
args->value = vdev->hw->ranges.user.start;
|
||||||
break;
|
break;
|
||||||
case DRM_IVPU_PARAM_CONTEXT_PRIORITY:
|
|
||||||
args->value = file_priv->priority;
|
|
||||||
break;
|
|
||||||
case DRM_IVPU_PARAM_CONTEXT_ID:
|
case DRM_IVPU_PARAM_CONTEXT_ID:
|
||||||
args->value = file_priv->ctx.id;
|
args->value = file_priv->ctx.id;
|
||||||
break;
|
break;
|
||||||
|
@ -218,17 +217,10 @@ static int ivpu_get_param_ioctl(struct drm_device *dev, void *data, struct drm_f
|
||||||
|
|
||||||
static int ivpu_set_param_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
|
static int ivpu_set_param_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
|
||||||
{
|
{
|
||||||
struct ivpu_file_priv *file_priv = file->driver_priv;
|
|
||||||
struct drm_ivpu_param *args = data;
|
struct drm_ivpu_param *args = data;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
switch (args->param) {
|
switch (args->param) {
|
||||||
case DRM_IVPU_PARAM_CONTEXT_PRIORITY:
|
|
||||||
if (args->value <= DRM_IVPU_CONTEXT_PRIORITY_REALTIME)
|
|
||||||
file_priv->priority = args->value;
|
|
||||||
else
|
|
||||||
ret = -EINVAL;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
}
|
}
|
||||||
|
@ -241,50 +233,53 @@ static int ivpu_open(struct drm_device *dev, struct drm_file *file)
|
||||||
struct ivpu_device *vdev = to_ivpu_device(dev);
|
struct ivpu_device *vdev = to_ivpu_device(dev);
|
||||||
struct ivpu_file_priv *file_priv;
|
struct ivpu_file_priv *file_priv;
|
||||||
u32 ctx_id;
|
u32 ctx_id;
|
||||||
void *old;
|
int idx, ret;
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = xa_alloc_irq(&vdev->context_xa, &ctx_id, NULL, vdev->context_xa_limit, GFP_KERNEL);
|
if (!drm_dev_enter(dev, &idx))
|
||||||
if (ret) {
|
return -ENODEV;
|
||||||
ivpu_err(vdev, "Failed to allocate context id: %d\n", ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
file_priv = kzalloc(sizeof(*file_priv), GFP_KERNEL);
|
file_priv = kzalloc(sizeof(*file_priv), GFP_KERNEL);
|
||||||
if (!file_priv) {
|
if (!file_priv) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto err_xa_erase;
|
goto err_dev_exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
file_priv->vdev = vdev;
|
file_priv->vdev = vdev;
|
||||||
file_priv->priority = DRM_IVPU_CONTEXT_PRIORITY_NORMAL;
|
file_priv->bound = true;
|
||||||
kref_init(&file_priv->ref);
|
kref_init(&file_priv->ref);
|
||||||
mutex_init(&file_priv->lock);
|
mutex_init(&file_priv->lock);
|
||||||
|
|
||||||
|
mutex_lock(&vdev->context_list_lock);
|
||||||
|
|
||||||
|
ret = xa_alloc_irq(&vdev->context_xa, &ctx_id, file_priv,
|
||||||
|
vdev->context_xa_limit, GFP_KERNEL);
|
||||||
|
if (ret) {
|
||||||
|
ivpu_err(vdev, "Failed to allocate context id: %d\n", ret);
|
||||||
|
goto err_unlock;
|
||||||
|
}
|
||||||
|
|
||||||
ret = ivpu_mmu_user_context_init(vdev, &file_priv->ctx, ctx_id);
|
ret = ivpu_mmu_user_context_init(vdev, &file_priv->ctx, ctx_id);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_mutex_destroy;
|
goto err_xa_erase;
|
||||||
|
|
||||||
old = xa_store_irq(&vdev->context_xa, ctx_id, file_priv, GFP_KERNEL);
|
mutex_unlock(&vdev->context_list_lock);
|
||||||
if (xa_is_err(old)) {
|
drm_dev_exit(idx);
|
||||||
ret = xa_err(old);
|
|
||||||
ivpu_err(vdev, "Failed to store context %u: %d\n", ctx_id, ret);
|
file->driver_priv = file_priv;
|
||||||
goto err_ctx_fini;
|
|
||||||
}
|
|
||||||
|
|
||||||
ivpu_dbg(vdev, FILE, "file_priv create: ctx %u process %s pid %d\n",
|
ivpu_dbg(vdev, FILE, "file_priv create: ctx %u process %s pid %d\n",
|
||||||
ctx_id, current->comm, task_pid_nr(current));
|
ctx_id, current->comm, task_pid_nr(current));
|
||||||
|
|
||||||
file->driver_priv = file_priv;
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_ctx_fini:
|
|
||||||
ivpu_mmu_user_context_fini(vdev, &file_priv->ctx);
|
|
||||||
err_mutex_destroy:
|
|
||||||
mutex_destroy(&file_priv->lock);
|
|
||||||
kfree(file_priv);
|
|
||||||
err_xa_erase:
|
err_xa_erase:
|
||||||
xa_erase_irq(&vdev->context_xa, ctx_id);
|
xa_erase_irq(&vdev->context_xa, ctx_id);
|
||||||
|
err_unlock:
|
||||||
|
mutex_unlock(&vdev->context_list_lock);
|
||||||
|
mutex_destroy(&file_priv->lock);
|
||||||
|
kfree(file_priv);
|
||||||
|
err_dev_exit:
|
||||||
|
drm_dev_exit(idx);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,8 +335,6 @@ static int ivpu_wait_for_ready(struct ivpu_device *vdev)
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
ivpu_dbg(vdev, PM, "VPU ready message received successfully\n");
|
ivpu_dbg(vdev, PM, "VPU ready message received successfully\n");
|
||||||
else
|
|
||||||
ivpu_hw_diagnose_failure(vdev);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -369,6 +362,9 @@ int ivpu_boot(struct ivpu_device *vdev)
|
||||||
ret = ivpu_wait_for_ready(vdev);
|
ret = ivpu_wait_for_ready(vdev);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
ivpu_err(vdev, "Failed to boot the firmware: %d\n", ret);
|
ivpu_err(vdev, "Failed to boot the firmware: %d\n", ret);
|
||||||
|
ivpu_hw_diagnose_failure(vdev);
|
||||||
|
ivpu_mmu_evtq_dump(vdev);
|
||||||
|
ivpu_fw_log_dump(vdev);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -540,6 +536,10 @@ static int ivpu_dev_init(struct ivpu_device *vdev)
|
||||||
lockdep_set_class(&vdev->submitted_jobs_xa.xa_lock, &submitted_jobs_xa_lock_class_key);
|
lockdep_set_class(&vdev->submitted_jobs_xa.xa_lock, &submitted_jobs_xa_lock_class_key);
|
||||||
INIT_LIST_HEAD(&vdev->bo_list);
|
INIT_LIST_HEAD(&vdev->bo_list);
|
||||||
|
|
||||||
|
ret = drmm_mutex_init(&vdev->drm, &vdev->context_list_lock);
|
||||||
|
if (ret)
|
||||||
|
goto err_xa_destroy;
|
||||||
|
|
||||||
ret = drmm_mutex_init(&vdev->drm, &vdev->bo_list_lock);
|
ret = drmm_mutex_init(&vdev->drm, &vdev->bo_list_lock);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_xa_destroy;
|
goto err_xa_destroy;
|
||||||
|
@ -611,14 +611,30 @@ static int ivpu_dev_init(struct ivpu_device *vdev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ivpu_bo_unbind_all_user_contexts(struct ivpu_device *vdev)
|
||||||
|
{
|
||||||
|
struct ivpu_file_priv *file_priv;
|
||||||
|
unsigned long ctx_id;
|
||||||
|
|
||||||
|
mutex_lock(&vdev->context_list_lock);
|
||||||
|
|
||||||
|
xa_for_each(&vdev->context_xa, ctx_id, file_priv)
|
||||||
|
file_priv_unbind(vdev, file_priv);
|
||||||
|
|
||||||
|
mutex_unlock(&vdev->context_list_lock);
|
||||||
|
}
|
||||||
|
|
||||||
static void ivpu_dev_fini(struct ivpu_device *vdev)
|
static void ivpu_dev_fini(struct ivpu_device *vdev)
|
||||||
{
|
{
|
||||||
ivpu_pm_disable(vdev);
|
ivpu_pm_disable(vdev);
|
||||||
ivpu_shutdown(vdev);
|
ivpu_shutdown(vdev);
|
||||||
if (IVPU_WA(d3hot_after_power_off))
|
if (IVPU_WA(d3hot_after_power_off))
|
||||||
pci_set_power_state(to_pci_dev(vdev->drm.dev), PCI_D3hot);
|
pci_set_power_state(to_pci_dev(vdev->drm.dev), PCI_D3hot);
|
||||||
|
|
||||||
|
ivpu_jobs_abort_all(vdev);
|
||||||
ivpu_job_done_consumer_fini(vdev);
|
ivpu_job_done_consumer_fini(vdev);
|
||||||
ivpu_pm_cancel_recovery(vdev);
|
ivpu_pm_cancel_recovery(vdev);
|
||||||
|
ivpu_bo_unbind_all_user_contexts(vdev);
|
||||||
|
|
||||||
ivpu_ipc_fini(vdev);
|
ivpu_ipc_fini(vdev);
|
||||||
ivpu_fw_fini(vdev);
|
ivpu_fw_fini(vdev);
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
#define IVPU_DBG_JSM BIT(10)
|
#define IVPU_DBG_JSM BIT(10)
|
||||||
#define IVPU_DBG_KREF BIT(11)
|
#define IVPU_DBG_KREF BIT(11)
|
||||||
#define IVPU_DBG_RPM BIT(12)
|
#define IVPU_DBG_RPM BIT(12)
|
||||||
|
#define IVPU_DBG_MMU_MAP BIT(13)
|
||||||
|
|
||||||
#define ivpu_err(vdev, fmt, ...) \
|
#define ivpu_err(vdev, fmt, ...) \
|
||||||
drm_err(&(vdev)->drm, "%s(): " fmt, __func__, ##__VA_ARGS__)
|
drm_err(&(vdev)->drm, "%s(): " fmt, __func__, ##__VA_ARGS__)
|
||||||
|
@ -114,6 +115,7 @@ struct ivpu_device {
|
||||||
|
|
||||||
struct ivpu_mmu_context gctx;
|
struct ivpu_mmu_context gctx;
|
||||||
struct ivpu_mmu_context rctx;
|
struct ivpu_mmu_context rctx;
|
||||||
|
struct mutex context_list_lock; /* Protects user context addition/removal */
|
||||||
struct xarray context_xa;
|
struct xarray context_xa;
|
||||||
struct xa_limit context_xa_limit;
|
struct xa_limit context_xa_limit;
|
||||||
|
|
||||||
|
@ -145,8 +147,8 @@ struct ivpu_file_priv {
|
||||||
struct mutex lock; /* Protects cmdq */
|
struct mutex lock; /* Protects cmdq */
|
||||||
struct ivpu_cmdq *cmdq[IVPU_NUM_ENGINES];
|
struct ivpu_cmdq *cmdq[IVPU_NUM_ENGINES];
|
||||||
struct ivpu_mmu_context ctx;
|
struct ivpu_mmu_context ctx;
|
||||||
u32 priority;
|
|
||||||
bool has_mmu_faults;
|
bool has_mmu_faults;
|
||||||
|
bool bound;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int ivpu_dbg_mask;
|
extern int ivpu_dbg_mask;
|
||||||
|
@ -162,7 +164,6 @@ extern bool ivpu_disable_mmu_cont_pages;
|
||||||
extern int ivpu_test_mode;
|
extern int ivpu_test_mode;
|
||||||
|
|
||||||
struct ivpu_file_priv *ivpu_file_priv_get(struct ivpu_file_priv *file_priv);
|
struct ivpu_file_priv *ivpu_file_priv_get(struct ivpu_file_priv *file_priv);
|
||||||
struct ivpu_file_priv *ivpu_file_priv_get_by_ctx_id(struct ivpu_device *vdev, unsigned long id);
|
|
||||||
void ivpu_file_priv_put(struct ivpu_file_priv **link);
|
void ivpu_file_priv_put(struct ivpu_file_priv **link);
|
||||||
|
|
||||||
int ivpu_boot(struct ivpu_device *vdev);
|
int ivpu_boot(struct ivpu_device *vdev);
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue