mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
Merge "Merge tag 'android12-5.10.185_r00' into android12-5.10" into android12-5.10
This commit is contained in:
@@ -894,10 +894,6 @@
|
|||||||
|
|
||||||
debugpat [X86] Enable PAT debugging
|
debugpat [X86] Enable PAT debugging
|
||||||
|
|
||||||
decnet.addr= [HW,NET]
|
|
||||||
Format: <area>[,<node>]
|
|
||||||
See also Documentation/networking/decnet.rst.
|
|
||||||
|
|
||||||
default_hugepagesz=
|
default_hugepagesz=
|
||||||
[HW] The size of the default HugeTLB page. This is
|
[HW] The size of the default HugeTLB page. This is
|
||||||
the size represented by the legacy /proc/ hugepages
|
the size represented by the legacy /proc/ hugepages
|
||||||
|
|||||||
@@ -34,13 +34,14 @@ Table : Subdirectories in /proc/sys/net
|
|||||||
========= =================== = ========== ==================
|
========= =================== = ========== ==================
|
||||||
Directory Content Directory Content
|
Directory Content Directory Content
|
||||||
========= =================== = ========== ==================
|
========= =================== = ========== ==================
|
||||||
core General parameter appletalk Appletalk protocol
|
802 E802 protocol mptcp Multipath TCP
|
||||||
unix Unix domain sockets netrom NET/ROM
|
appletalk Appletalk protocol netfilter Network Filter
|
||||||
802 E802 protocol ax25 AX25
|
ax25 AX25 netrom NET/ROM
|
||||||
ethernet Ethernet protocol rose X.25 PLP layer
|
bridge Bridging rose X.25 PLP layer
|
||||||
ipv4 IP version 4 x25 X.25 protocol
|
core General parameter tipc TIPC
|
||||||
bridge Bridging decnet DEC net
|
ethernet Ethernet protocol unix Unix domain sockets
|
||||||
ipv6 IP version 6 tipc TIPC
|
ipv4 IP version 4 x25 X.25 protocol
|
||||||
|
ipv6 IP version 6
|
||||||
========= =================== = ========== ==================
|
========= =================== = ========== ==================
|
||||||
|
|
||||||
1. /proc/sys/net/core - Network core options
|
1. /proc/sys/net/core - Network core options
|
||||||
|
|||||||
@@ -24,11 +24,8 @@ String Conversions
|
|||||||
.. kernel-doc:: lib/vsprintf.c
|
.. kernel-doc:: lib/vsprintf.c
|
||||||
:export:
|
:export:
|
||||||
|
|
||||||
.. kernel-doc:: include/linux/kernel.h
|
.. kernel-doc:: include/linux/kstrtox.h
|
||||||
:functions: kstrtol
|
:functions: kstrtol kstrtoul
|
||||||
|
|
||||||
.. kernel-doc:: include/linux/kernel.h
|
|
||||||
:functions: kstrtoul
|
|
||||||
|
|
||||||
.. kernel-doc:: lib/kstrtox.c
|
.. kernel-doc:: lib/kstrtox.c
|
||||||
:export:
|
:export:
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ properties:
|
|||||||
- description: Error interrupt
|
- description: Error interrupt
|
||||||
- description: Receive buffer full interrupt
|
- description: Receive buffer full interrupt
|
||||||
- description: Transmit buffer empty interrupt
|
- description: Transmit buffer empty interrupt
|
||||||
- description: Transmit End interrupt
|
- description: Break interrupt
|
||||||
- items:
|
- items:
|
||||||
- description: Error interrupt
|
- description: Error interrupt
|
||||||
- description: Receive buffer full interrupt
|
- description: Receive buffer full interrupt
|
||||||
@@ -89,7 +89,7 @@ properties:
|
|||||||
- const: eri
|
- const: eri
|
||||||
- const: rxi
|
- const: rxi
|
||||||
- const: txi
|
- const: txi
|
||||||
- const: tei
|
- const: bri
|
||||||
- items:
|
- items:
|
||||||
- const: eri
|
- const: eri
|
||||||
- const: rxi
|
- const: rxi
|
||||||
|
|||||||
@@ -50,7 +50,9 @@ properties:
|
|||||||
description: TDM TX current sense time slot.
|
description: TDM TX current sense time slot.
|
||||||
|
|
||||||
'#sound-dai-cells':
|
'#sound-dai-cells':
|
||||||
const: 1
|
# The codec has a single DAI, the #sound-dai-cells=<1>; case is left in for backward
|
||||||
|
# compatibility but is deprecated.
|
||||||
|
enum: [0, 1]
|
||||||
|
|
||||||
required:
|
required:
|
||||||
- compatible
|
- compatible
|
||||||
@@ -67,7 +69,7 @@ examples:
|
|||||||
codec: codec@4c {
|
codec: codec@4c {
|
||||||
compatible = "ti,tas2562";
|
compatible = "ti,tas2562";
|
||||||
reg = <0x4c>;
|
reg = <0x4c>;
|
||||||
#sound-dai-cells = <1>;
|
#sound-dai-cells = <0>;
|
||||||
interrupt-parent = <&gpio1>;
|
interrupt-parent = <&gpio1>;
|
||||||
interrupts = <14>;
|
interrupts = <14>;
|
||||||
shutdown-gpios = <&gpio1 15 0>;
|
shutdown-gpios = <&gpio1 15 0>;
|
||||||
|
|||||||
@@ -46,7 +46,9 @@ properties:
|
|||||||
description: TDM TX voltage sense time slot.
|
description: TDM TX voltage sense time slot.
|
||||||
|
|
||||||
'#sound-dai-cells':
|
'#sound-dai-cells':
|
||||||
const: 1
|
# The codec has a single DAI, the #sound-dai-cells=<1>; case is left in for backward
|
||||||
|
# compatibility but is deprecated.
|
||||||
|
enum: [0, 1]
|
||||||
|
|
||||||
required:
|
required:
|
||||||
- compatible
|
- compatible
|
||||||
@@ -63,7 +65,7 @@ examples:
|
|||||||
codec: codec@38 {
|
codec: codec@38 {
|
||||||
compatible = "ti,tas2764";
|
compatible = "ti,tas2764";
|
||||||
reg = <0x38>;
|
reg = <0x38>;
|
||||||
#sound-dai-cells = <1>;
|
#sound-dai-cells = <0>;
|
||||||
interrupt-parent = <&gpio1>;
|
interrupt-parent = <&gpio1>;
|
||||||
interrupts = <14>;
|
interrupts = <14>;
|
||||||
reset-gpios = <&gpio1 15 0>;
|
reset-gpios = <&gpio1 15 0>;
|
||||||
|
|||||||
@@ -52,7 +52,9 @@ properties:
|
|||||||
- 1 # Falling edge
|
- 1 # Falling edge
|
||||||
|
|
||||||
'#sound-dai-cells':
|
'#sound-dai-cells':
|
||||||
const: 1
|
# The codec has a single DAI, the #sound-dai-cells=<1>; case is left in for backward
|
||||||
|
# compatibility but is deprecated.
|
||||||
|
enum: [0, 1]
|
||||||
|
|
||||||
required:
|
required:
|
||||||
- compatible
|
- compatible
|
||||||
@@ -69,7 +71,7 @@ examples:
|
|||||||
codec: codec@41 {
|
codec: codec@41 {
|
||||||
compatible = "ti,tas2770";
|
compatible = "ti,tas2770";
|
||||||
reg = <0x41>;
|
reg = <0x41>;
|
||||||
#sound-dai-cells = <1>;
|
#sound-dai-cells = <0>;
|
||||||
interrupt-parent = <&gpio1>;
|
interrupt-parent = <&gpio1>;
|
||||||
interrupts = <14>;
|
interrupts = <14>;
|
||||||
reset-gpio = <&gpio1 15 0>;
|
reset-gpio = <&gpio1 15 0>;
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ properties:
|
|||||||
description:
|
description:
|
||||||
size of memory intended as internal memory for endpoints
|
size of memory intended as internal memory for endpoints
|
||||||
buffers expressed in KB
|
buffers expressed in KB
|
||||||
$ref: /schemas/types.yaml#/definitions/uint32
|
$ref: /schemas/types.yaml#/definitions/uint16
|
||||||
|
|
||||||
cdns,phyrst-a-enable:
|
cdns,phyrst-a-enable:
|
||||||
description: Enable resetting of PHY if Rx fail is detected
|
description: Enable resetting of PHY if Rx fail is detected
|
||||||
|
|||||||
@@ -1358,7 +1358,7 @@ Mutex API reference
|
|||||||
Futex API reference
|
Futex API reference
|
||||||
===================
|
===================
|
||||||
|
|
||||||
.. kernel-doc:: kernel/futex.c
|
.. kernel-doc:: kernel/futex/core.c
|
||||||
:internal:
|
:internal:
|
||||||
|
|
||||||
Further reading
|
Further reading
|
||||||
|
|||||||
@@ -1,243 +0,0 @@
|
|||||||
.. SPDX-License-Identifier: GPL-2.0
|
|
||||||
|
|
||||||
=========================================
|
|
||||||
Linux DECnet Networking Layer Information
|
|
||||||
=========================================
|
|
||||||
|
|
||||||
1. Other documentation....
|
|
||||||
==========================
|
|
||||||
|
|
||||||
- Project Home Pages
|
|
||||||
- http://www.chygwyn.com/ - Kernel info
|
|
||||||
- http://linux-decnet.sourceforge.net/ - Userland tools
|
|
||||||
- http://www.sourceforge.net/projects/linux-decnet/ - Status page
|
|
||||||
|
|
||||||
2. Configuring the kernel
|
|
||||||
=========================
|
|
||||||
|
|
||||||
Be sure to turn on the following options:
|
|
||||||
|
|
||||||
- CONFIG_DECNET (obviously)
|
|
||||||
- CONFIG_PROC_FS (to see what's going on)
|
|
||||||
- CONFIG_SYSCTL (for easy configuration)
|
|
||||||
|
|
||||||
if you want to try out router support (not properly debugged yet)
|
|
||||||
you'll need the following options as well...
|
|
||||||
|
|
||||||
- CONFIG_DECNET_ROUTER (to be able to add/delete routes)
|
|
||||||
- CONFIG_NETFILTER (will be required for the DECnet routing daemon)
|
|
||||||
|
|
||||||
Don't turn on SIOCGIFCONF support for DECnet unless you are really sure
|
|
||||||
that you need it, in general you won't and it can cause ifconfig to
|
|
||||||
malfunction.
|
|
||||||
|
|
||||||
Run time configuration has changed slightly from the 2.4 system. If you
|
|
||||||
want to configure an endnode, then the simplified procedure is as follows:
|
|
||||||
|
|
||||||
- Set the MAC address on your ethernet card before starting _any_ other
|
|
||||||
network protocols.
|
|
||||||
|
|
||||||
As soon as your network card is brought into the UP state, DECnet should
|
|
||||||
start working. If you need something more complicated or are unsure how
|
|
||||||
to set the MAC address, see the next section. Also all configurations which
|
|
||||||
worked with 2.4 will work under 2.5 with no change.
|
|
||||||
|
|
||||||
3. Command line options
|
|
||||||
=======================
|
|
||||||
|
|
||||||
You can set a DECnet address on the kernel command line for compatibility
|
|
||||||
with the 2.4 configuration procedure, but in general it's not needed any more.
|
|
||||||
If you do st a DECnet address on the command line, it has only one purpose
|
|
||||||
which is that its added to the addresses on the loopback device.
|
|
||||||
|
|
||||||
With 2.4 kernels, DECnet would only recognise addresses as local if they
|
|
||||||
were added to the loopback device. In 2.5, any local interface address
|
|
||||||
can be used to loop back to the local machine. Of course this does not
|
|
||||||
prevent you adding further addresses to the loopback device if you
|
|
||||||
want to.
|
|
||||||
|
|
||||||
N.B. Since the address list of an interface determines the addresses for
|
|
||||||
which "hello" messages are sent, if you don't set an address on the loopback
|
|
||||||
interface then you won't see any entries in /proc/net/neigh for the local
|
|
||||||
host until such time as you start a connection. This doesn't affect the
|
|
||||||
operation of the local communications in any other way though.
|
|
||||||
|
|
||||||
The kernel command line takes options looking like the following::
|
|
||||||
|
|
||||||
decnet.addr=1,2
|
|
||||||
|
|
||||||
the two numbers are the node address 1,2 = 1.2 For 2.2.xx kernels
|
|
||||||
and early 2.3.xx kernels, you must use a comma when specifying the
|
|
||||||
DECnet address like this. For more recent 2.3.xx kernels, you may
|
|
||||||
use almost any character except space, although a `.` would be the most
|
|
||||||
obvious choice :-)
|
|
||||||
|
|
||||||
There used to be a third number specifying the node type. This option
|
|
||||||
has gone away in favour of a per interface node type. This is now set
|
|
||||||
using /proc/sys/net/decnet/conf/<dev>/forwarding. This file can be
|
|
||||||
set with a single digit, 0=EndNode, 1=L1 Router and 2=L2 Router.
|
|
||||||
|
|
||||||
There are also equivalent options for modules. The node address can
|
|
||||||
also be set through the /proc/sys/net/decnet/ files, as can other system
|
|
||||||
parameters.
|
|
||||||
|
|
||||||
Currently the only supported devices are ethernet and ip_gre. The
|
|
||||||
ethernet address of your ethernet card has to be set according to the DECnet
|
|
||||||
address of the node in order for it to be autoconfigured (and then appear in
|
|
||||||
/proc/net/decnet_dev). There is a utility available at the above
|
|
||||||
FTP sites called dn2ethaddr which can compute the correct ethernet
|
|
||||||
address to use. The address can be set by ifconfig either before or
|
|
||||||
at the time the device is brought up. If you are using RedHat you can
|
|
||||||
add the line::
|
|
||||||
|
|
||||||
MACADDR=AA:00:04:00:03:04
|
|
||||||
|
|
||||||
or something similar, to /etc/sysconfig/network-scripts/ifcfg-eth0 or
|
|
||||||
wherever your network card's configuration lives. Setting the MAC address
|
|
||||||
of your ethernet card to an address starting with "hi-ord" will cause a
|
|
||||||
DECnet address which matches to be added to the interface (which you can
|
|
||||||
verify with iproute2).
|
|
||||||
|
|
||||||
The default device for routing can be set through the /proc filesystem
|
|
||||||
by setting /proc/sys/net/decnet/default_device to the
|
|
||||||
device you want DECnet to route packets out of when no specific route
|
|
||||||
is available. Usually this will be eth0, for example::
|
|
||||||
|
|
||||||
echo -n "eth0" >/proc/sys/net/decnet/default_device
|
|
||||||
|
|
||||||
If you don't set the default device, then it will default to the first
|
|
||||||
ethernet card which has been autoconfigured as described above. You can
|
|
||||||
confirm that by looking in the default_device file of course.
|
|
||||||
|
|
||||||
There is a list of what the other files under /proc/sys/net/decnet/ do
|
|
||||||
on the kernel patch web site (shown above).
|
|
||||||
|
|
||||||
4. Run time kernel configuration
|
|
||||||
================================
|
|
||||||
|
|
||||||
|
|
||||||
This is either done through the sysctl/proc interface (see the kernel web
|
|
||||||
pages for details on what the various options do) or through the iproute2
|
|
||||||
package in the same way as IPv4/6 configuration is performed.
|
|
||||||
|
|
||||||
Documentation for iproute2 is included with the package, although there is
|
|
||||||
as yet no specific section on DECnet, most of the features apply to both
|
|
||||||
IP and DECnet, albeit with DECnet addresses instead of IP addresses and
|
|
||||||
a reduced functionality.
|
|
||||||
|
|
||||||
If you want to configure a DECnet router you'll need the iproute2 package
|
|
||||||
since its the _only_ way to add and delete routes currently. Eventually
|
|
||||||
there will be a routing daemon to send and receive routing messages for
|
|
||||||
each interface and update the kernel routing tables accordingly. The
|
|
||||||
routing daemon will use netfilter to listen to routing packets, and
|
|
||||||
rtnetlink to update the kernels routing tables.
|
|
||||||
|
|
||||||
The DECnet raw socket layer has been removed since it was there purely
|
|
||||||
for use by the routing daemon which will now use netfilter (a much cleaner
|
|
||||||
and more generic solution) instead.
|
|
||||||
|
|
||||||
5. How can I tell if its working?
|
|
||||||
=================================
|
|
||||||
|
|
||||||
Here is a quick guide of what to look for in order to know if your DECnet
|
|
||||||
kernel subsystem is working.
|
|
||||||
|
|
||||||
- Is the node address set (see /proc/sys/net/decnet/node_address)
|
|
||||||
- Is the node of the correct type
|
|
||||||
(see /proc/sys/net/decnet/conf/<dev>/forwarding)
|
|
||||||
- Is the Ethernet MAC address of each Ethernet card set to match
|
|
||||||
the DECnet address. If in doubt use the dn2ethaddr utility available
|
|
||||||
at the ftp archive.
|
|
||||||
- If the previous two steps are satisfied, and the Ethernet card is up,
|
|
||||||
you should find that it is listed in /proc/net/decnet_dev and also
|
|
||||||
that it appears as a directory in /proc/sys/net/decnet/conf/. The
|
|
||||||
loopback device (lo) should also appear and is required to communicate
|
|
||||||
within a node.
|
|
||||||
- If you have any DECnet routers on your network, they should appear
|
|
||||||
in /proc/net/decnet_neigh, otherwise this file will only contain the
|
|
||||||
entry for the node itself (if it doesn't check to see if lo is up).
|
|
||||||
- If you want to send to any node which is not listed in the
|
|
||||||
/proc/net/decnet_neigh file, you'll need to set the default device
|
|
||||||
to point to an Ethernet card with connection to a router. This is
|
|
||||||
again done with the /proc/sys/net/decnet/default_device file.
|
|
||||||
- Try starting a simple server and client, like the dnping/dnmirror
|
|
||||||
over the loopback interface. With luck they should communicate.
|
|
||||||
For this step and those after, you'll need the DECnet library
|
|
||||||
which can be obtained from the above ftp sites as well as the
|
|
||||||
actual utilities themselves.
|
|
||||||
- If this seems to work, then try talking to a node on your local
|
|
||||||
network, and see if you can obtain the same results.
|
|
||||||
- At this point you are on your own... :-)
|
|
||||||
|
|
||||||
6. How to send a bug report
|
|
||||||
===========================
|
|
||||||
|
|
||||||
If you've found a bug and want to report it, then there are several things
|
|
||||||
you can do to help me work out exactly what it is that is wrong. Useful
|
|
||||||
information (_most_ of which _is_ _essential_) includes:
|
|
||||||
|
|
||||||
- What kernel version are you running ?
|
|
||||||
- What version of the patch are you running ?
|
|
||||||
- How far though the above set of tests can you get ?
|
|
||||||
- What is in the /proc/decnet* files and /proc/sys/net/decnet/* files ?
|
|
||||||
- Which services are you running ?
|
|
||||||
- Which client caused the problem ?
|
|
||||||
- How much data was being transferred ?
|
|
||||||
- Was the network congested ?
|
|
||||||
- How can the problem be reproduced ?
|
|
||||||
- Can you use tcpdump to get a trace ? (N.B. Most (all?) versions of
|
|
||||||
tcpdump don't understand how to dump DECnet properly, so including
|
|
||||||
the hex listing of the packet contents is _essential_, usually the -x flag.
|
|
||||||
You may also need to increase the length grabbed with the -s flag. The
|
|
||||||
-e flag also provides very useful information (ethernet MAC addresses))
|
|
||||||
|
|
||||||
7. MAC FAQ
|
|
||||||
==========
|
|
||||||
|
|
||||||
A quick FAQ on ethernet MAC addresses to explain how Linux and DECnet
|
|
||||||
interact and how to get the best performance from your hardware.
|
|
||||||
|
|
||||||
Ethernet cards are designed to normally only pass received network frames
|
|
||||||
to a host computer when they are addressed to it, or to the broadcast address.
|
|
||||||
|
|
||||||
Linux has an interface which allows the setting of extra addresses for
|
|
||||||
an ethernet card to listen to. If the ethernet card supports it, the
|
|
||||||
filtering operation will be done in hardware, if not the extra unwanted packets
|
|
||||||
received will be discarded by the host computer. In the latter case,
|
|
||||||
significant processor time and bus bandwidth can be used up on a busy
|
|
||||||
network (see the NAPI documentation for a longer explanation of these
|
|
||||||
effects).
|
|
||||||
|
|
||||||
DECnet makes use of this interface to allow running DECnet on an ethernet
|
|
||||||
card which has already been configured using TCP/IP (presumably using the
|
|
||||||
built in MAC address of the card, as usual) and/or to allow multiple DECnet
|
|
||||||
addresses on each physical interface. If you do this, be aware that if your
|
|
||||||
ethernet card doesn't support perfect hashing in its MAC address filter
|
|
||||||
then your computer will be doing more work than required. Some cards
|
|
||||||
will simply set themselves into promiscuous mode in order to receive
|
|
||||||
packets from the DECnet specified addresses. So if you have one of these
|
|
||||||
cards its better to set the MAC address of the card as described above
|
|
||||||
to gain the best efficiency. Better still is to use a card which supports
|
|
||||||
NAPI as well.
|
|
||||||
|
|
||||||
|
|
||||||
8. Mailing list
|
|
||||||
===============
|
|
||||||
|
|
||||||
If you are keen to get involved in development, or want to ask questions
|
|
||||||
about configuration, or even just report bugs, then there is a mailing
|
|
||||||
list that you can join, details are at:
|
|
||||||
|
|
||||||
http://sourceforge.net/mail/?group_id=4993
|
|
||||||
|
|
||||||
9. Legal Info
|
|
||||||
=============
|
|
||||||
|
|
||||||
The Linux DECnet project team have placed their code under the GPL. The
|
|
||||||
software is provided "as is" and without warranty express or implied.
|
|
||||||
DECnet is a trademark of Compaq. This software is not a product of
|
|
||||||
Compaq. We acknowledge the help of people at Compaq in providing extra
|
|
||||||
documentation above and beyond what was previously publicly available.
|
|
||||||
|
|
||||||
Steve Whitehouse <SteveW@ACM.org>
|
|
||||||
|
|
||||||
@@ -46,7 +46,6 @@ Contents:
|
|||||||
cdc_mbim
|
cdc_mbim
|
||||||
dccp
|
dccp
|
||||||
dctcp
|
dctcp
|
||||||
decnet
|
|
||||||
dns_resolver
|
dns_resolver
|
||||||
driver
|
driver
|
||||||
eql
|
eql
|
||||||
|
|||||||
105
Documentation/powerpc/associativity.rst
Normal file
105
Documentation/powerpc/associativity.rst
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
============================
|
||||||
|
NUMA resource associativity
|
||||||
|
============================
|
||||||
|
|
||||||
|
Associativity represents the groupings of the various platform resources into
|
||||||
|
domains of substantially similar mean performance relative to resources outside
|
||||||
|
of that domain. Resources subsets of a given domain that exhibit better
|
||||||
|
performance relative to each other than relative to other resources subsets
|
||||||
|
are represented as being members of a sub-grouping domain. This performance
|
||||||
|
characteristic is presented in terms of NUMA node distance within the Linux kernel.
|
||||||
|
From the platform view, these groups are also referred to as domains.
|
||||||
|
|
||||||
|
PAPR interface currently supports different ways of communicating these resource
|
||||||
|
grouping details to the OS. These are referred to as Form 0, Form 1 and Form2
|
||||||
|
associativity grouping. Form 0 is the oldest format and is now considered deprecated.
|
||||||
|
|
||||||
|
Hypervisor indicates the type/form of associativity used via "ibm,architecture-vec-5 property".
|
||||||
|
Bit 0 of byte 5 in the "ibm,architecture-vec-5" property indicates usage of Form 0 or Form 1.
|
||||||
|
A value of 1 indicates the usage of Form 1 associativity. For Form 2 associativity
|
||||||
|
bit 2 of byte 5 in the "ibm,architecture-vec-5" property is used.
|
||||||
|
|
||||||
|
Form 0
|
||||||
|
------
|
||||||
|
Form 0 associativity supports only two NUMA distances (LOCAL and REMOTE).
|
||||||
|
|
||||||
|
Form 1
|
||||||
|
------
|
||||||
|
With Form 1 a combination of ibm,associativity-reference-points, and ibm,associativity
|
||||||
|
device tree properties are used to determine the NUMA distance between resource groups/domains.
|
||||||
|
|
||||||
|
The “ibm,associativity” property contains a list of one or more numbers (domainID)
|
||||||
|
representing the resource’s platform grouping domains.
|
||||||
|
|
||||||
|
The “ibm,associativity-reference-points” property contains a list of one or more numbers
|
||||||
|
(domainID index) that represents the 1 based ordinal in the associativity lists.
|
||||||
|
The list of domainID indexes represents an increasing hierarchy of resource grouping.
|
||||||
|
|
||||||
|
ex:
|
||||||
|
{ primary domainID index, secondary domainID index, tertiary domainID index.. }
|
||||||
|
|
||||||
|
Linux kernel uses the domainID at the primary domainID index as the NUMA node id.
|
||||||
|
Linux kernel computes NUMA distance between two domains by recursively comparing
|
||||||
|
if they belong to the same higher-level domains. For mismatch at every higher
|
||||||
|
level of the resource group, the kernel doubles the NUMA distance between the
|
||||||
|
comparing domains.
|
||||||
|
|
||||||
|
Form 2
|
||||||
|
-------
|
||||||
|
Form 2 associativity format adds separate device tree properties representing NUMA node distance
|
||||||
|
thereby making the node distance computation flexible. Form 2 also allows flexible primary
|
||||||
|
domain numbering. With numa distance computation now detached from the index value in
|
||||||
|
"ibm,associativity-reference-points" property, Form 2 allows a large number of primary domain
|
||||||
|
ids at the same domainID index representing resource groups of different performance/latency
|
||||||
|
characteristics.
|
||||||
|
|
||||||
|
Hypervisor indicates the usage of FORM2 associativity using bit 2 of byte 5 in the
|
||||||
|
"ibm,architecture-vec-5" property.
|
||||||
|
|
||||||
|
"ibm,numa-lookup-index-table" property contains a list of one or more numbers representing
|
||||||
|
the domainIDs present in the system. The offset of the domainID in this property is
|
||||||
|
used as an index while computing numa distance information via "ibm,numa-distance-table".
|
||||||
|
|
||||||
|
prop-encoded-array: The number N of the domainIDs encoded as with encode-int, followed by
|
||||||
|
N domainID encoded as with encode-int
|
||||||
|
|
||||||
|
For ex:
|
||||||
|
"ibm,numa-lookup-index-table" = {4, 0, 8, 250, 252}. The offset of domainID 8 (2) is used when
|
||||||
|
computing the distance of domain 8 from other domains present in the system. For the rest of
|
||||||
|
this document, this offset will be referred to as domain distance offset.
|
||||||
|
|
||||||
|
"ibm,numa-distance-table" property contains a list of one or more numbers representing the NUMA
|
||||||
|
distance between resource groups/domains present in the system.
|
||||||
|
|
||||||
|
prop-encoded-array: The number N of the distance values encoded as with encode-int, followed by
|
||||||
|
N distance values encoded as with encode-bytes. The max distance value we could encode is 255.
|
||||||
|
The number N must be equal to the square of m where m is the number of domainIDs in the
|
||||||
|
numa-lookup-index-table.
|
||||||
|
|
||||||
|
For ex:
|
||||||
|
ibm,numa-lookup-index-table = <3 0 8 40>;
|
||||||
|
ibm,numa-distace-table = <9>, /bits/ 8 < 10 20 80 20 10 160 80 160 10>;
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
| 0 8 40
|
||||||
|
--|------------
|
||||||
|
|
|
||||||
|
0 | 10 20 80
|
||||||
|
|
|
||||||
|
8 | 20 10 160
|
||||||
|
|
|
||||||
|
40| 80 160 10
|
||||||
|
|
||||||
|
A possible "ibm,associativity" property for resources in node 0, 8 and 40
|
||||||
|
|
||||||
|
{ 3, 6, 7, 0 }
|
||||||
|
{ 3, 6, 9, 8 }
|
||||||
|
{ 3, 6, 7, 40}
|
||||||
|
|
||||||
|
With "ibm,associativity-reference-points" { 0x3 }
|
||||||
|
|
||||||
|
"ibm,lookup-index-table" helps in having a compact representation of distance matrix.
|
||||||
|
Since domainID can be sparse, the matrix of distances can also be effectively sparse.
|
||||||
|
With "ibm,lookup-index-table" we can achieve a compact representation of
|
||||||
|
distance information.
|
||||||
@@ -7,6 +7,7 @@ powerpc
|
|||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
|
associativity
|
||||||
booting
|
booting
|
||||||
bootwrapper
|
bootwrapper
|
||||||
cpu_families
|
cpu_families
|
||||||
|
|||||||
@@ -704,7 +704,7 @@ ref
|
|||||||
no-jd
|
no-jd
|
||||||
BIOS setup but without jack-detection
|
BIOS setup but without jack-detection
|
||||||
intel
|
intel
|
||||||
Intel DG45* mobos
|
Intel D*45* mobos
|
||||||
dell-m6-amic
|
dell-m6-amic
|
||||||
Dell desktops/laptops with analog mics
|
Dell desktops/laptops with analog mics
|
||||||
dell-m6-dmic
|
dell-m6-dmic
|
||||||
|
|||||||
@@ -1400,7 +1400,7 @@ Riferimento per l'API dei Mutex
|
|||||||
Riferimento per l'API dei Futex
|
Riferimento per l'API dei Futex
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
.. kernel-doc:: kernel/futex.c
|
.. kernel-doc:: kernel/futex/core.c
|
||||||
:internal:
|
:internal:
|
||||||
|
|
||||||
Approfondimenti
|
Approfondimenti
|
||||||
|
|||||||
@@ -303,7 +303,6 @@ Code Seq# Include File Comments
|
|||||||
0x89 00-06 arch/x86/include/asm/sockios.h
|
0x89 00-06 arch/x86/include/asm/sockios.h
|
||||||
0x89 0B-DF linux/sockios.h
|
0x89 0B-DF linux/sockios.h
|
||||||
0x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range
|
0x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range
|
||||||
0x89 E0-EF linux/dn.h PROTOPRIVATE range
|
|
||||||
0x89 F0-FF linux/sockios.h SIOCDEVPRIVATE range
|
0x89 F0-FF linux/sockios.h SIOCDEVPRIVATE range
|
||||||
0x8B all linux/wireless.h
|
0x8B all linux/wireless.h
|
||||||
0x8C 00-3F WiNRADiO driver
|
0x8C 00-3F WiNRADiO driver
|
||||||
|
|||||||
@@ -4905,13 +4905,6 @@ F: include/linux/tfrc.h
|
|||||||
F: include/uapi/linux/dccp.h
|
F: include/uapi/linux/dccp.h
|
||||||
F: net/dccp/
|
F: net/dccp/
|
||||||
|
|
||||||
DECnet NETWORK LAYER
|
|
||||||
L: linux-decnet-user@lists.sourceforge.net
|
|
||||||
S: Orphan
|
|
||||||
W: http://linux-decnet.sourceforge.net
|
|
||||||
F: Documentation/networking/decnet.rst
|
|
||||||
F: net/decnet/
|
|
||||||
|
|
||||||
DECSTATION PLATFORM SUPPORT
|
DECSTATION PLATFORM SUPPORT
|
||||||
M: "Maciej W. Rozycki" <macro@linux-mips.org>
|
M: "Maciej W. Rozycki" <macro@linux-mips.org>
|
||||||
L: linux-mips@vger.kernel.org
|
L: linux-mips@vger.kernel.org
|
||||||
|
|||||||
14
Makefile
14
Makefile
@@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 5
|
VERSION = 5
|
||||||
PATCHLEVEL = 10
|
PATCHLEVEL = 10
|
||||||
SUBLEVEL = 177
|
SUBLEVEL = 185
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = Dare mighty things
|
NAME = Dare mighty things
|
||||||
|
|
||||||
@@ -596,8 +596,10 @@ endif
|
|||||||
ifneq ($(GCC_TOOLCHAIN),)
|
ifneq ($(GCC_TOOLCHAIN),)
|
||||||
CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN)
|
CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN)
|
||||||
endif
|
endif
|
||||||
ifneq ($(LLVM_IAS),1)
|
ifeq ($(LLVM_IAS),1)
|
||||||
CLANG_FLAGS += -no-integrated-as
|
CLANG_FLAGS += -fintegrated-as
|
||||||
|
else
|
||||||
|
CLANG_FLAGS += -fno-integrated-as
|
||||||
endif
|
endif
|
||||||
CLANG_FLAGS += -Werror=unknown-warning-option
|
CLANG_FLAGS += -Werror=unknown-warning-option
|
||||||
KBUILD_CFLAGS += $(CLANG_FLAGS)
|
KBUILD_CFLAGS += $(CLANG_FLAGS)
|
||||||
@@ -827,6 +829,10 @@ endif
|
|||||||
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
|
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
|
||||||
|
|
||||||
KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
|
KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
|
||||||
|
|
||||||
|
# These result in bogus false positives
|
||||||
|
KBUILD_CFLAGS += $(call cc-disable-warning, dangling-pointer)
|
||||||
|
|
||||||
ifdef CONFIG_FRAME_POINTER
|
ifdef CONFIG_FRAME_POINTER
|
||||||
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
||||||
else
|
else
|
||||||
@@ -870,7 +876,7 @@ else
|
|||||||
DEBUG_CFLAGS += -g
|
DEBUG_CFLAGS += -g
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(LLVM_IAS),1)
|
ifdef CONFIG_AS_IS_LLVM
|
||||||
KBUILD_AFLAGS += -g
|
KBUILD_AFLAGS += -g
|
||||||
else
|
else
|
||||||
KBUILD_AFLAGS += -Wa,-gdwarf-2
|
KBUILD_AFLAGS += -Wa,-gdwarf-2
|
||||||
|
|||||||
@@ -179,7 +179,7 @@
|
|||||||
compatible = "wlf,wm8960";
|
compatible = "wlf,wm8960";
|
||||||
reg = <0x1a>;
|
reg = <0x1a>;
|
||||||
clocks = <&pmu_system_controller 0>;
|
clocks = <&pmu_system_controller 0>;
|
||||||
clock-names = "MCLK1";
|
clock-names = "mclk";
|
||||||
wlf,shared-lrclk;
|
wlf,shared-lrclk;
|
||||||
#sound-dai-cells = <0>;
|
#sound-dai-cells = <0>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -609,6 +609,22 @@
|
|||||||
clock-frequency = <100000>;
|
clock-frequency = <100000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&mcspi1 {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
&mcspi2 {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
&mcspi3 {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
&mcspi4 {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
&usb_otg_hs {
|
&usb_otg_hs {
|
||||||
interface-type = <0>;
|
interface-type = <0>;
|
||||||
usb-phy = <&usb2_phy>;
|
usb-phy = <&usb2_phy>;
|
||||||
|
|||||||
@@ -414,8 +414,8 @@
|
|||||||
#address-cells = <3>;
|
#address-cells = <3>;
|
||||||
#size-cells = <2>;
|
#size-cells = <2>;
|
||||||
|
|
||||||
ranges = <0x81000000 0 0x40200000 0x40200000 0 0x00100000>,
|
ranges = <0x81000000 0x0 0x00000000 0x40200000 0x0 0x00100000>,
|
||||||
<0x82000000 0 0x40300000 0x40300000 0 0x00d00000>;
|
<0x82000000 0x0 0x40300000 0x40300000 0x0 0x00d00000>;
|
||||||
|
|
||||||
interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-names = "msi";
|
interrupt-names = "msi";
|
||||||
|
|||||||
@@ -465,8 +465,8 @@
|
|||||||
#address-cells = <3>;
|
#address-cells = <3>;
|
||||||
#size-cells = <2>;
|
#size-cells = <2>;
|
||||||
|
|
||||||
ranges = <0x81000000 0 0x0fe00000 0x0fe00000 0 0x00100000 /* downstream I/O */
|
ranges = <0x81000000 0x0 0x00000000 0x0fe00000 0x0 0x00010000 /* I/O */
|
||||||
0x82000000 0 0x08000000 0x08000000 0 0x07e00000>; /* non-prefetchable memory */
|
0x82000000 0x0 0x08000000 0x08000000 0x0 0x07e00000>; /* MEM */
|
||||||
|
|
||||||
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-names = "msi";
|
interrupt-names = "msi";
|
||||||
@@ -516,8 +516,8 @@
|
|||||||
#address-cells = <3>;
|
#address-cells = <3>;
|
||||||
#size-cells = <2>;
|
#size-cells = <2>;
|
||||||
|
|
||||||
ranges = <0x81000000 0 0x31e00000 0x31e00000 0 0x00100000 /* downstream I/O */
|
ranges = <0x81000000 0x0 0x00000000 0x31e00000 0x0 0x00010000 /* I/O */
|
||||||
0x82000000 0 0x2e000000 0x2e000000 0 0x03e00000>; /* non-prefetchable memory */
|
0x82000000 0x0 0x2e000000 0x2e000000 0x0 0x03e00000>; /* MEM */
|
||||||
|
|
||||||
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-names = "msi";
|
interrupt-names = "msi";
|
||||||
@@ -567,8 +567,8 @@
|
|||||||
#address-cells = <3>;
|
#address-cells = <3>;
|
||||||
#size-cells = <2>;
|
#size-cells = <2>;
|
||||||
|
|
||||||
ranges = <0x81000000 0 0x35e00000 0x35e00000 0 0x00100000 /* downstream I/O */
|
ranges = <0x81000000 0x0 0x00000000 0x35e00000 0x0 0x00010000 /* I/O */
|
||||||
0x82000000 0 0x32000000 0x32000000 0 0x03e00000>; /* non-prefetchable memory */
|
0x82000000 0x0 0x32000000 0x32000000 0x0 0x03e00000>; /* MEM */
|
||||||
|
|
||||||
interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-names = "msi";
|
interrupt-names = "msi";
|
||||||
|
|||||||
@@ -959,7 +959,7 @@
|
|||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
spdif: sound@ff88b0000 {
|
spdif: sound@ff8b0000 {
|
||||||
compatible = "rockchip,rk3288-spdif", "rockchip,rk3066-spdif";
|
compatible = "rockchip,rk3288-spdif", "rockchip,rk3066-spdif";
|
||||||
reg = <0x0 0xff8b0000 0x0 0x10000>;
|
reg = <0x0 0xff8b0000 0x0 0x10000>;
|
||||||
#sound-dai-cells = <0>;
|
#sound-dai-cells = <0>;
|
||||||
|
|||||||
@@ -583,7 +583,7 @@
|
|||||||
interrupts = <29>;
|
interrupts = <29>;
|
||||||
clocks = <&clocks CLK_CSIS>,
|
clocks = <&clocks CLK_CSIS>,
|
||||||
<&clocks SCLK_CSIS>;
|
<&clocks SCLK_CSIS>;
|
||||||
clock-names = "clk_csis",
|
clock-names = "csis",
|
||||||
"sclk_csis";
|
"sclk_csis";
|
||||||
bus-width = <4>;
|
bus-width = <4>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
|||||||
@@ -284,6 +284,88 @@
|
|||||||
slew-rate = <2>;
|
slew-rate = <2>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
can1_pins_a: can1-0 {
|
||||||
|
pins1 {
|
||||||
|
pinmux = <STM32_PINMUX('A', 12, AF9)>; /* CAN1_TX */
|
||||||
|
};
|
||||||
|
pins2 {
|
||||||
|
pinmux = <STM32_PINMUX('A', 11, AF9)>; /* CAN1_RX */
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
can1_pins_b: can1-1 {
|
||||||
|
pins1 {
|
||||||
|
pinmux = <STM32_PINMUX('B', 9, AF9)>; /* CAN1_TX */
|
||||||
|
};
|
||||||
|
pins2 {
|
||||||
|
pinmux = <STM32_PINMUX('B', 8, AF9)>; /* CAN1_RX */
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
can1_pins_c: can1-2 {
|
||||||
|
pins1 {
|
||||||
|
pinmux = <STM32_PINMUX('D', 1, AF9)>; /* CAN1_TX */
|
||||||
|
};
|
||||||
|
pins2 {
|
||||||
|
pinmux = <STM32_PINMUX('D', 0, AF9)>; /* CAN1_RX */
|
||||||
|
bias-pull-up;
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
can1_pins_d: can1-3 {
|
||||||
|
pins1 {
|
||||||
|
pinmux = <STM32_PINMUX('H', 13, AF9)>; /* CAN1_TX */
|
||||||
|
};
|
||||||
|
pins2 {
|
||||||
|
pinmux = <STM32_PINMUX('H', 14, AF9)>; /* CAN1_RX */
|
||||||
|
bias-pull-up;
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
can2_pins_a: can2-0 {
|
||||||
|
pins1 {
|
||||||
|
pinmux = <STM32_PINMUX('B', 6, AF9)>; /* CAN2_TX */
|
||||||
|
};
|
||||||
|
pins2 {
|
||||||
|
pinmux = <STM32_PINMUX('B', 5, AF9)>; /* CAN2_RX */
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
can2_pins_b: can2-1 {
|
||||||
|
pins1 {
|
||||||
|
pinmux = <STM32_PINMUX('B', 13, AF9)>; /* CAN2_TX */
|
||||||
|
};
|
||||||
|
pins2 {
|
||||||
|
pinmux = <STM32_PINMUX('B', 12, AF9)>; /* CAN2_RX */
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
can3_pins_a: can3-0 {
|
||||||
|
pins1 {
|
||||||
|
pinmux = <STM32_PINMUX('A', 15, AF11)>; /* CAN3_TX */
|
||||||
|
};
|
||||||
|
pins2 {
|
||||||
|
pinmux = <STM32_PINMUX('A', 8, AF11)>; /* CAN3_RX */
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
can3_pins_b: can3-1 {
|
||||||
|
pins1 {
|
||||||
|
pinmux = <STM32_PINMUX('B', 4, AF11)>; /* CAN3_TX */
|
||||||
|
};
|
||||||
|
pins2 {
|
||||||
|
pinmux = <STM32_PINMUX('B', 3, AF11)>; /* CAN3_RX */
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1102,7 +1102,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sai2a_sleep_pins_c: sai2a-2 {
|
sai2a_sleep_pins_c: sai2a-sleep-2 {
|
||||||
pins {
|
pins {
|
||||||
pinmux = <STM32_PINMUX('D', 13, ANALOG)>, /* SAI2_SCK_A */
|
pinmux = <STM32_PINMUX('D', 13, ANALOG)>, /* SAI2_SCK_A */
|
||||||
<STM32_PINMUX('D', 11, ANALOG)>, /* SAI2_SD_A */
|
<STM32_PINMUX('D', 11, ANALOG)>, /* SAI2_SD_A */
|
||||||
|
|||||||
@@ -132,6 +132,7 @@
|
|||||||
reg = <0x2c0f0000 0x1000>;
|
reg = <0x2c0f0000 0x1000>;
|
||||||
interrupts = <0 84 4>;
|
interrupts = <0 84 4>;
|
||||||
cache-level = <2>;
|
cache-level = <2>;
|
||||||
|
cache-unified;
|
||||||
};
|
};
|
||||||
|
|
||||||
pmu {
|
pmu {
|
||||||
|
|||||||
@@ -672,7 +672,6 @@ CONFIG_DRM_IMX_LDB=m
|
|||||||
CONFIG_DRM_IMX_HDMI=m
|
CONFIG_DRM_IMX_HDMI=m
|
||||||
CONFIG_DRM_ATMEL_HLCDC=m
|
CONFIG_DRM_ATMEL_HLCDC=m
|
||||||
CONFIG_DRM_RCAR_DU=m
|
CONFIG_DRM_RCAR_DU=m
|
||||||
CONFIG_DRM_RCAR_LVDS=y
|
|
||||||
CONFIG_DRM_SUN4I=m
|
CONFIG_DRM_SUN4I=m
|
||||||
CONFIG_DRM_MSM=m
|
CONFIG_DRM_MSM=m
|
||||||
CONFIG_DRM_FSL_DCU=m
|
CONFIG_DRM_FSL_DCU=m
|
||||||
|
|||||||
@@ -300,6 +300,29 @@ static int unwind_exec_pop_subset_r0_to_r3(struct unwind_ctrl_block *ctrl,
|
|||||||
return URC_OK;
|
return URC_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static unsigned long unwind_decode_uleb128(struct unwind_ctrl_block *ctrl)
|
||||||
|
{
|
||||||
|
unsigned long bytes = 0;
|
||||||
|
unsigned long insn;
|
||||||
|
unsigned long result = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* unwind_get_byte() will advance `ctrl` one instruction at a time, so
|
||||||
|
* loop until we get an instruction byte where bit 7 is not set.
|
||||||
|
*
|
||||||
|
* Note: This decodes a maximum of 4 bytes to output 28 bits data where
|
||||||
|
* max is 0xfffffff: that will cover a vsp increment of 1073742336, hence
|
||||||
|
* it is sufficient for unwinding the stack.
|
||||||
|
*/
|
||||||
|
do {
|
||||||
|
insn = unwind_get_byte(ctrl);
|
||||||
|
result |= (insn & 0x7f) << (bytes * 7);
|
||||||
|
bytes++;
|
||||||
|
} while (!!(insn & 0x80) && (bytes != sizeof(result)));
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Execute the current unwind instruction.
|
* Execute the current unwind instruction.
|
||||||
*/
|
*/
|
||||||
@@ -353,7 +376,7 @@ static int unwind_exec_insn(struct unwind_ctrl_block *ctrl)
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto error;
|
goto error;
|
||||||
} else if (insn == 0xb2) {
|
} else if (insn == 0xb2) {
|
||||||
unsigned long uleb128 = unwind_get_byte(ctrl);
|
unsigned long uleb128 = unwind_decode_uleb128(ctrl);
|
||||||
|
|
||||||
ctrl->vrs[SP] += 0x204 + (uleb128 << 2);
|
ctrl->vrs[SP] += 0x204 + (uleb128 << 2);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/**
|
/*
|
||||||
* arch/arm/mac-sa1100/jornada720_ssp.c
|
* arch/arm/mac-sa1100/jornada720_ssp.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006/2007 Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
|
* Copyright (C) 2006/2007 Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
|
||||||
@@ -26,6 +26,7 @@ static unsigned long jornada_ssp_flags;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* jornada_ssp_reverse - reverses input byte
|
* jornada_ssp_reverse - reverses input byte
|
||||||
|
* @byte: input byte to reverse
|
||||||
*
|
*
|
||||||
* we need to reverse all data we receive from the mcu due to its physical location
|
* we need to reverse all data we receive from the mcu due to its physical location
|
||||||
* returns : 01110111 -> 11101110
|
* returns : 01110111 -> 11101110
|
||||||
@@ -46,6 +47,7 @@ EXPORT_SYMBOL(jornada_ssp_reverse);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* jornada_ssp_byte - waits for ready ssp bus and sends byte
|
* jornada_ssp_byte - waits for ready ssp bus and sends byte
|
||||||
|
* @byte: input byte to transmit
|
||||||
*
|
*
|
||||||
* waits for fifo buffer to clear and then transmits, if it doesn't then we will
|
* waits for fifo buffer to clear and then transmits, if it doesn't then we will
|
||||||
* timeout after <timeout> rounds. Needs mcu running before its called.
|
* timeout after <timeout> rounds. Needs mcu running before its called.
|
||||||
@@ -77,6 +79,7 @@ EXPORT_SYMBOL(jornada_ssp_byte);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* jornada_ssp_inout - decide if input is command or trading byte
|
* jornada_ssp_inout - decide if input is command or trading byte
|
||||||
|
* @byte: input byte to send (may be %TXDUMMY)
|
||||||
*
|
*
|
||||||
* returns : (jornada_ssp_byte(byte)) on success
|
* returns : (jornada_ssp_byte(byte)) on success
|
||||||
* : %-ETIMEDOUT on timeout failure
|
* : %-ETIMEDOUT on timeout failure
|
||||||
|
|||||||
@@ -1604,10 +1604,9 @@
|
|||||||
|
|
||||||
dmc: bus@38000 {
|
dmc: bus@38000 {
|
||||||
compatible = "simple-bus";
|
compatible = "simple-bus";
|
||||||
reg = <0x0 0x38000 0x0 0x400>;
|
|
||||||
#address-cells = <2>;
|
#address-cells = <2>;
|
||||||
#size-cells = <2>;
|
#size-cells = <2>;
|
||||||
ranges = <0x0 0x0 0x0 0x38000 0x0 0x400>;
|
ranges = <0x0 0x0 0x0 0x38000 0x0 0x2000>;
|
||||||
|
|
||||||
canvas: video-lut@48 {
|
canvas: video-lut@48 {
|
||||||
compatible = "amlogic,canvas";
|
compatible = "amlogic,canvas";
|
||||||
|
|||||||
@@ -128,7 +128,7 @@
|
|||||||
rohm,reset-snvs-powered;
|
rohm,reset-snvs-powered;
|
||||||
|
|
||||||
#clock-cells = <0>;
|
#clock-cells = <0>;
|
||||||
clocks = <&osc_32k 0>;
|
clocks = <&osc_32k>;
|
||||||
clock-output-names = "clk-32k-out";
|
clock-output-names = "clk-32k-out";
|
||||||
|
|
||||||
regulators {
|
regulators {
|
||||||
|
|||||||
@@ -98,11 +98,17 @@
|
|||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
|
||||||
ethphy: ethernet-phy@4 {
|
ethphy: ethernet-phy@4 { /* AR8033 or ADIN1300 */
|
||||||
compatible = "ethernet-phy-ieee802.3-c22";
|
compatible = "ethernet-phy-ieee802.3-c22";
|
||||||
reg = <4>;
|
reg = <4>;
|
||||||
reset-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
|
reset-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
|
||||||
reset-assert-us = <10000>;
|
reset-assert-us = <10000>;
|
||||||
|
/*
|
||||||
|
* Deassert delay:
|
||||||
|
* ADIN1300 requires 5ms.
|
||||||
|
* AR8033 requires 1ms.
|
||||||
|
*/
|
||||||
|
reset-deassert-us = <20000>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -60,11 +60,11 @@
|
|||||||
perst-gpio = <&tlmm 58 0x1>;
|
perst-gpio = <&tlmm 58 0x1>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&pcie_phy0 {
|
&pcie_qmp0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&pcie_phy1 {
|
&pcie_qmp1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -607,10 +607,8 @@
|
|||||||
phys = <&pcie_phy1>;
|
phys = <&pcie_phy1>;
|
||||||
phy-names = "pciephy";
|
phy-names = "pciephy";
|
||||||
|
|
||||||
ranges = <0x81000000 0 0x10200000 0x10200000
|
ranges = <0x81000000 0x0 0x00000000 0x10200000 0x0 0x10000>, /* I/O */
|
||||||
0 0x10000>, /* downstream I/O */
|
<0x82000000 0x0 0x10220000 0x10220000 0x0 0xfde0000>; /* MEM */
|
||||||
<0x82000000 0 0x10220000 0x10220000
|
|
||||||
0 0xfde0000>; /* non-prefetchable memory */
|
|
||||||
|
|
||||||
interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-names = "msi";
|
interrupt-names = "msi";
|
||||||
@@ -671,10 +669,8 @@
|
|||||||
phys = <&pcie_phy0>;
|
phys = <&pcie_phy0>;
|
||||||
phy-names = "pciephy";
|
phy-names = "pciephy";
|
||||||
|
|
||||||
ranges = <0x81000000 0 0x20200000 0x20200000
|
ranges = <0x81000000 0x0 0x00000000 0x20200000 0x0 0x10000>, /* I/O */
|
||||||
0 0x10000>, /* downstream I/O */
|
<0x82000000 0x0 0x20220000 0x20220000 0x0 0xfde0000>; /* MEM */
|
||||||
<0x82000000 0 0x20220000 0x20220000
|
|
||||||
0 0xfde0000>; /* non-prefetchable memory */
|
|
||||||
|
|
||||||
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-names = "msi";
|
interrupt-names = "msi";
|
||||||
|
|||||||
@@ -744,8 +744,8 @@
|
|||||||
|
|
||||||
#address-cells = <3>;
|
#address-cells = <3>;
|
||||||
#size-cells = <2>;
|
#size-cells = <2>;
|
||||||
ranges = <0x01000000 0x0 0x0c200000 0x0c200000 0x0 0x100000>,
|
ranges = <0x01000000 0x0 0x00000000 0x0c200000 0x0 0x100000>,
|
||||||
<0x02000000 0x0 0x0c300000 0x0c300000 0x0 0xd00000>;
|
<0x02000000 0x0 0x0c300000 0x0c300000 0x0 0xd00000>;
|
||||||
|
|
||||||
interrupts = <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-names = "msi";
|
interrupt-names = "msi";
|
||||||
@@ -796,8 +796,8 @@
|
|||||||
|
|
||||||
#address-cells = <3>;
|
#address-cells = <3>;
|
||||||
#size-cells = <2>;
|
#size-cells = <2>;
|
||||||
ranges = <0x01000000 0x0 0x0d200000 0x0d200000 0x0 0x100000>,
|
ranges = <0x01000000 0x0 0x00000000 0x0d200000 0x0 0x100000>,
|
||||||
<0x02000000 0x0 0x0d300000 0x0d300000 0x0 0xd00000>;
|
<0x02000000 0x0 0x0d300000 0x0d300000 0x0 0xd00000>;
|
||||||
|
|
||||||
interrupts = <GIC_SPI 413 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 413 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-names = "msi";
|
interrupt-names = "msi";
|
||||||
@@ -845,8 +845,8 @@
|
|||||||
|
|
||||||
#address-cells = <3>;
|
#address-cells = <3>;
|
||||||
#size-cells = <2>;
|
#size-cells = <2>;
|
||||||
ranges = <0x01000000 0x0 0x0e200000 0x0e200000 0x0 0x100000>,
|
ranges = <0x01000000 0x0 0x00000000 0x0e200000 0x0 0x100000>,
|
||||||
<0x02000000 0x0 0x0e300000 0x0e300000 0x0 0x1d00000>;
|
<0x02000000 0x0 0x0e300000 0x0e300000 0x0 0x1d00000>;
|
||||||
|
|
||||||
device_type = "pci";
|
device_type = "pci";
|
||||||
|
|
||||||
@@ -1771,8 +1771,11 @@
|
|||||||
interrupts = <0 131 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <0 131 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
phys = <&hsusb_phy1>, <&ssusb_phy_0>;
|
phys = <&hsusb_phy1>, <&ssusb_phy_0>;
|
||||||
phy-names = "usb2-phy", "usb3-phy";
|
phy-names = "usb2-phy", "usb3-phy";
|
||||||
|
snps,hird-threshold = /bits/ 8 <0>;
|
||||||
snps,dis_u2_susphy_quirk;
|
snps,dis_u2_susphy_quirk;
|
||||||
snps,dis_enblslpm_quirk;
|
snps,dis_enblslpm_quirk;
|
||||||
|
snps,is-utmi-l1-suspend;
|
||||||
|
tx-fifo-resize;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -942,7 +942,7 @@
|
|||||||
phys = <&pciephy>;
|
phys = <&pciephy>;
|
||||||
phy-names = "pciephy";
|
phy-names = "pciephy";
|
||||||
|
|
||||||
ranges = <0x01000000 0x0 0x1b200000 0x1b200000 0x0 0x100000>,
|
ranges = <0x01000000 0x0 0x00000000 0x1b200000 0x0 0x100000>,
|
||||||
<0x02000000 0x0 0x1b300000 0x1b300000 0x0 0xd00000>;
|
<0x02000000 0x0 0x1b300000 0x1b300000 0x0 0xd00000>;
|
||||||
|
|
||||||
#interrupt-cells = <1>;
|
#interrupt-cells = <1>;
|
||||||
@@ -1187,7 +1187,7 @@
|
|||||||
compatible = "arm,coresight-stm", "arm,primecell";
|
compatible = "arm,coresight-stm", "arm,primecell";
|
||||||
reg = <0x06002000 0x1000>,
|
reg = <0x06002000 0x1000>,
|
||||||
<0x16280000 0x180000>;
|
<0x16280000 0x180000>;
|
||||||
reg-names = "stm-base", "stm-data-base";
|
reg-names = "stm-base", "stm-stimulus-base";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
|
||||||
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
clocks = <&rpmcc RPM_SMD_QDSS_CLK>, <&rpmcc RPM_SMD_QDSS_A_CLK>;
|
||||||
|
|||||||
@@ -196,8 +196,8 @@
|
|||||||
cpu-idle-states = <&LITTLE_CPU_SLEEP_0
|
cpu-idle-states = <&LITTLE_CPU_SLEEP_0
|
||||||
&LITTLE_CPU_SLEEP_1
|
&LITTLE_CPU_SLEEP_1
|
||||||
&CLUSTER_SLEEP_0>;
|
&CLUSTER_SLEEP_0>;
|
||||||
capacity-dmips-mhz = <607>;
|
capacity-dmips-mhz = <611>;
|
||||||
dynamic-power-coefficient = <100>;
|
dynamic-power-coefficient = <154>;
|
||||||
qcom,freq-domain = <&cpufreq_hw 0>;
|
qcom,freq-domain = <&cpufreq_hw 0>;
|
||||||
operating-points-v2 = <&cpu0_opp_table>;
|
operating-points-v2 = <&cpu0_opp_table>;
|
||||||
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
||||||
@@ -221,8 +221,8 @@
|
|||||||
cpu-idle-states = <&LITTLE_CPU_SLEEP_0
|
cpu-idle-states = <&LITTLE_CPU_SLEEP_0
|
||||||
&LITTLE_CPU_SLEEP_1
|
&LITTLE_CPU_SLEEP_1
|
||||||
&CLUSTER_SLEEP_0>;
|
&CLUSTER_SLEEP_0>;
|
||||||
capacity-dmips-mhz = <607>;
|
capacity-dmips-mhz = <611>;
|
||||||
dynamic-power-coefficient = <100>;
|
dynamic-power-coefficient = <154>;
|
||||||
qcom,freq-domain = <&cpufreq_hw 0>;
|
qcom,freq-domain = <&cpufreq_hw 0>;
|
||||||
operating-points-v2 = <&cpu0_opp_table>;
|
operating-points-v2 = <&cpu0_opp_table>;
|
||||||
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
||||||
@@ -243,8 +243,8 @@
|
|||||||
cpu-idle-states = <&LITTLE_CPU_SLEEP_0
|
cpu-idle-states = <&LITTLE_CPU_SLEEP_0
|
||||||
&LITTLE_CPU_SLEEP_1
|
&LITTLE_CPU_SLEEP_1
|
||||||
&CLUSTER_SLEEP_0>;
|
&CLUSTER_SLEEP_0>;
|
||||||
capacity-dmips-mhz = <607>;
|
capacity-dmips-mhz = <611>;
|
||||||
dynamic-power-coefficient = <100>;
|
dynamic-power-coefficient = <154>;
|
||||||
qcom,freq-domain = <&cpufreq_hw 0>;
|
qcom,freq-domain = <&cpufreq_hw 0>;
|
||||||
operating-points-v2 = <&cpu0_opp_table>;
|
operating-points-v2 = <&cpu0_opp_table>;
|
||||||
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
||||||
@@ -265,8 +265,8 @@
|
|||||||
cpu-idle-states = <&LITTLE_CPU_SLEEP_0
|
cpu-idle-states = <&LITTLE_CPU_SLEEP_0
|
||||||
&LITTLE_CPU_SLEEP_1
|
&LITTLE_CPU_SLEEP_1
|
||||||
&CLUSTER_SLEEP_0>;
|
&CLUSTER_SLEEP_0>;
|
||||||
capacity-dmips-mhz = <607>;
|
capacity-dmips-mhz = <611>;
|
||||||
dynamic-power-coefficient = <100>;
|
dynamic-power-coefficient = <154>;
|
||||||
qcom,freq-domain = <&cpufreq_hw 0>;
|
qcom,freq-domain = <&cpufreq_hw 0>;
|
||||||
operating-points-v2 = <&cpu0_opp_table>;
|
operating-points-v2 = <&cpu0_opp_table>;
|
||||||
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
||||||
@@ -288,7 +288,7 @@
|
|||||||
cpu-idle-states = <&BIG_CPU_SLEEP_0
|
cpu-idle-states = <&BIG_CPU_SLEEP_0
|
||||||
&BIG_CPU_SLEEP_1
|
&BIG_CPU_SLEEP_1
|
||||||
&CLUSTER_SLEEP_0>;
|
&CLUSTER_SLEEP_0>;
|
||||||
dynamic-power-coefficient = <396>;
|
dynamic-power-coefficient = <442>;
|
||||||
qcom,freq-domain = <&cpufreq_hw 1>;
|
qcom,freq-domain = <&cpufreq_hw 1>;
|
||||||
operating-points-v2 = <&cpu4_opp_table>;
|
operating-points-v2 = <&cpu4_opp_table>;
|
||||||
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
||||||
@@ -310,7 +310,7 @@
|
|||||||
cpu-idle-states = <&BIG_CPU_SLEEP_0
|
cpu-idle-states = <&BIG_CPU_SLEEP_0
|
||||||
&BIG_CPU_SLEEP_1
|
&BIG_CPU_SLEEP_1
|
||||||
&CLUSTER_SLEEP_0>;
|
&CLUSTER_SLEEP_0>;
|
||||||
dynamic-power-coefficient = <396>;
|
dynamic-power-coefficient = <442>;
|
||||||
qcom,freq-domain = <&cpufreq_hw 1>;
|
qcom,freq-domain = <&cpufreq_hw 1>;
|
||||||
operating-points-v2 = <&cpu4_opp_table>;
|
operating-points-v2 = <&cpu4_opp_table>;
|
||||||
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
||||||
@@ -332,7 +332,7 @@
|
|||||||
cpu-idle-states = <&BIG_CPU_SLEEP_0
|
cpu-idle-states = <&BIG_CPU_SLEEP_0
|
||||||
&BIG_CPU_SLEEP_1
|
&BIG_CPU_SLEEP_1
|
||||||
&CLUSTER_SLEEP_0>;
|
&CLUSTER_SLEEP_0>;
|
||||||
dynamic-power-coefficient = <396>;
|
dynamic-power-coefficient = <442>;
|
||||||
qcom,freq-domain = <&cpufreq_hw 1>;
|
qcom,freq-domain = <&cpufreq_hw 1>;
|
||||||
operating-points-v2 = <&cpu4_opp_table>;
|
operating-points-v2 = <&cpu4_opp_table>;
|
||||||
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
||||||
@@ -354,7 +354,7 @@
|
|||||||
cpu-idle-states = <&BIG_CPU_SLEEP_0
|
cpu-idle-states = <&BIG_CPU_SLEEP_0
|
||||||
&BIG_CPU_SLEEP_1
|
&BIG_CPU_SLEEP_1
|
||||||
&CLUSTER_SLEEP_0>;
|
&CLUSTER_SLEEP_0>;
|
||||||
dynamic-power-coefficient = <396>;
|
dynamic-power-coefficient = <442>;
|
||||||
qcom,freq-domain = <&cpufreq_hw 1>;
|
qcom,freq-domain = <&cpufreq_hw 1>;
|
||||||
operating-points-v2 = <&cpu4_opp_table>;
|
operating-points-v2 = <&cpu4_opp_table>;
|
||||||
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
|
||||||
@@ -1816,8 +1816,8 @@
|
|||||||
#address-cells = <3>;
|
#address-cells = <3>;
|
||||||
#size-cells = <2>;
|
#size-cells = <2>;
|
||||||
|
|
||||||
ranges = <0x01000000 0x0 0x60200000 0 0x60200000 0x0 0x100000>,
|
ranges = <0x01000000 0x0 0x00000000 0x0 0x60200000 0x0 0x100000>,
|
||||||
<0x02000000 0x0 0x60300000 0 0x60300000 0x0 0xd00000>;
|
<0x02000000 0x0 0x60300000 0x0 0x60300000 0x0 0xd00000>;
|
||||||
|
|
||||||
interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-names = "msi";
|
interrupt-names = "msi";
|
||||||
@@ -1920,7 +1920,7 @@
|
|||||||
#address-cells = <3>;
|
#address-cells = <3>;
|
||||||
#size-cells = <2>;
|
#size-cells = <2>;
|
||||||
|
|
||||||
ranges = <0x01000000 0x0 0x40200000 0x0 0x40200000 0x0 0x100000>,
|
ranges = <0x01000000 0x0 0x00000000 0x0 0x40200000 0x0 0x100000>,
|
||||||
<0x02000000 0x0 0x40300000 0x0 0x40300000 0x0 0x1fd00000>;
|
<0x02000000 0x0 0x40300000 0x0 0x40300000 0x0 0x1fd00000>;
|
||||||
|
|
||||||
interrupts = <GIC_SPI 307 IRQ_TYPE_EDGE_RISING>;
|
interrupts = <GIC_SPI 307 IRQ_TYPE_EDGE_RISING>;
|
||||||
|
|||||||
@@ -49,17 +49,14 @@
|
|||||||
opp-shared;
|
opp-shared;
|
||||||
opp-800000000 {
|
opp-800000000 {
|
||||||
opp-hz = /bits/ 64 <800000000>;
|
opp-hz = /bits/ 64 <800000000>;
|
||||||
opp-microvolt = <820000>;
|
|
||||||
clock-latency-ns = <300000>;
|
clock-latency-ns = <300000>;
|
||||||
};
|
};
|
||||||
opp-1000000000 {
|
opp-1000000000 {
|
||||||
opp-hz = /bits/ 64 <1000000000>;
|
opp-hz = /bits/ 64 <1000000000>;
|
||||||
opp-microvolt = <820000>;
|
|
||||||
clock-latency-ns = <300000>;
|
clock-latency-ns = <300000>;
|
||||||
};
|
};
|
||||||
opp-1200000000 {
|
opp-1200000000 {
|
||||||
opp-hz = /bits/ 64 <1200000000>;
|
opp-hz = /bits/ 64 <1200000000>;
|
||||||
opp-microvolt = <820000>;
|
|
||||||
clock-latency-ns = <300000>;
|
clock-latency-ns = <300000>;
|
||||||
opp-suspend;
|
opp-suspend;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -60,17 +60,14 @@
|
|||||||
opp-shared;
|
opp-shared;
|
||||||
opp-800000000 {
|
opp-800000000 {
|
||||||
opp-hz = /bits/ 64 <800000000>;
|
opp-hz = /bits/ 64 <800000000>;
|
||||||
opp-microvolt = <820000>;
|
|
||||||
clock-latency-ns = <300000>;
|
clock-latency-ns = <300000>;
|
||||||
};
|
};
|
||||||
opp-1000000000 {
|
opp-1000000000 {
|
||||||
opp-hz = /bits/ 64 <1000000000>;
|
opp-hz = /bits/ 64 <1000000000>;
|
||||||
opp-microvolt = <820000>;
|
|
||||||
clock-latency-ns = <300000>;
|
clock-latency-ns = <300000>;
|
||||||
};
|
};
|
||||||
opp-1200000000 {
|
opp-1200000000 {
|
||||||
opp-hz = /bits/ 64 <1200000000>;
|
opp-hz = /bits/ 64 <1200000000>;
|
||||||
opp-microvolt = <820000>;
|
|
||||||
clock-latency-ns = <300000>;
|
clock-latency-ns = <300000>;
|
||||||
opp-suspend;
|
opp-suspend;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ void user_regs_reset_single_step(struct user_pt_regs *regs,
|
|||||||
void kernel_enable_single_step(struct pt_regs *regs);
|
void kernel_enable_single_step(struct pt_regs *regs);
|
||||||
void kernel_disable_single_step(void);
|
void kernel_disable_single_step(void);
|
||||||
int kernel_active_single_step(void);
|
int kernel_active_single_step(void);
|
||||||
|
void kernel_rewind_single_step(struct pt_regs *regs);
|
||||||
|
|
||||||
#ifdef CONFIG_HAVE_HW_BREAKPOINT
|
#ifdef CONFIG_HAVE_HW_BREAKPOINT
|
||||||
int reinstall_suspended_bps(struct pt_regs *regs);
|
int reinstall_suspended_bps(struct pt_regs *regs);
|
||||||
|
|||||||
@@ -9,15 +9,16 @@
|
|||||||
#ifdef CONFIG_SHADOW_CALL_STACK
|
#ifdef CONFIG_SHADOW_CALL_STACK
|
||||||
scs_sp .req x18
|
scs_sp .req x18
|
||||||
|
|
||||||
.macro scs_load tsk, tmp
|
.macro scs_load_current
|
||||||
ldr scs_sp, [\tsk, #TSK_TI_SCS_SP]
|
get_current_task scs_sp
|
||||||
|
ldr scs_sp, [scs_sp, #TSK_TI_SCS_SP]
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro scs_save tsk, tmp
|
.macro scs_save tsk, tmp
|
||||||
str scs_sp, [\tsk, #TSK_TI_SCS_SP]
|
str scs_sp, [\tsk, #TSK_TI_SCS_SP]
|
||||||
.endm
|
.endm
|
||||||
#else
|
#else
|
||||||
.macro scs_load tsk, tmp
|
.macro scs_load_current
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro scs_save tsk, tmp
|
.macro scs_save tsk, tmp
|
||||||
|
|||||||
@@ -439,6 +439,11 @@ int kernel_active_single_step(void)
|
|||||||
}
|
}
|
||||||
NOKPROBE_SYMBOL(kernel_active_single_step);
|
NOKPROBE_SYMBOL(kernel_active_single_step);
|
||||||
|
|
||||||
|
void kernel_rewind_single_step(struct pt_regs *regs)
|
||||||
|
{
|
||||||
|
set_regs_spsr_ss(regs);
|
||||||
|
}
|
||||||
|
|
||||||
/* ptrace API */
|
/* ptrace API */
|
||||||
void user_enable_single_step(struct task_struct *task)
|
void user_enable_single_step(struct task_struct *task)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ alternative_if ARM64_HAS_ADDRESS_AUTH
|
|||||||
alternative_else_nop_endif
|
alternative_else_nop_endif
|
||||||
1:
|
1:
|
||||||
|
|
||||||
scs_load tsk, x20
|
scs_load_current
|
||||||
.else
|
.else
|
||||||
add x21, sp, #S_FRAME_SIZE
|
add x21, sp, #S_FRAME_SIZE
|
||||||
get_current_task tsk
|
get_current_task tsk
|
||||||
@@ -1122,7 +1122,7 @@ SYM_FUNC_START(cpu_switch_to)
|
|||||||
msr sp_el0, x1
|
msr sp_el0, x1
|
||||||
ptrauth_keys_install_kernel x1, x8, x9, x10
|
ptrauth_keys_install_kernel x1, x8, x9, x10
|
||||||
scs_save x0, x8
|
scs_save x0, x8
|
||||||
scs_load x1, x8
|
scs_load_current
|
||||||
ret
|
ret
|
||||||
SYM_FUNC_END(cpu_switch_to)
|
SYM_FUNC_END(cpu_switch_to)
|
||||||
NOKPROBE(cpu_switch_to)
|
NOKPROBE(cpu_switch_to)
|
||||||
|
|||||||
@@ -621,7 +621,7 @@ SYM_FUNC_START_LOCAL(__secondary_switched)
|
|||||||
ldr x2, [x0, #CPU_BOOT_TASK]
|
ldr x2, [x0, #CPU_BOOT_TASK]
|
||||||
cbz x2, __secondary_too_slow
|
cbz x2, __secondary_too_slow
|
||||||
msr sp_el0, x2
|
msr sp_el0, x2
|
||||||
scs_load x2, x3
|
scs_load_current
|
||||||
mov x29, #0
|
mov x29, #0
|
||||||
mov x30, #0
|
mov x30, #0
|
||||||
|
|
||||||
|
|||||||
@@ -223,6 +223,8 @@ int kgdb_arch_handle_exception(int exception_vector, int signo,
|
|||||||
*/
|
*/
|
||||||
if (!kernel_active_single_step())
|
if (!kernel_active_single_step())
|
||||||
kernel_enable_single_step(linux_regs);
|
kernel_enable_single_step(linux_regs);
|
||||||
|
else
|
||||||
|
kernel_rewind_single_step(linux_regs);
|
||||||
err = 0;
|
err = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -499,6 +499,8 @@ int kvm_arm_set_fw_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
|
|||||||
u64 val;
|
u64 val;
|
||||||
int wa_level;
|
int wa_level;
|
||||||
|
|
||||||
|
if (KVM_REG_SIZE(reg->id) != sizeof(val))
|
||||||
|
return -ENOENT;
|
||||||
if (copy_from_user(&val, uaddr, KVM_REG_SIZE(reg->id)))
|
if (copy_from_user(&val, uaddr, KVM_REG_SIZE(reg->id)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
|
|||||||
@@ -484,8 +484,8 @@ static void do_bad_area(unsigned long far, unsigned int esr,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define VM_FAULT_BADMAP 0x010000
|
#define VM_FAULT_BADMAP ((__force vm_fault_t)0x010000)
|
||||||
#define VM_FAULT_BADACCESS 0x020000
|
#define VM_FAULT_BADACCESS ((__force vm_fault_t)0x020000)
|
||||||
|
|
||||||
static int __do_page_fault(struct vm_area_struct *vma, unsigned long addr,
|
static int __do_page_fault(struct vm_area_struct *vma, unsigned long addr,
|
||||||
unsigned int mm_flags, unsigned long vm_flags,
|
unsigned int mm_flags, unsigned long vm_flags,
|
||||||
|
|||||||
@@ -581,7 +581,7 @@ static int salinfo_cpu_pre_down(unsigned int cpu)
|
|||||||
* 'data' contains an integer that corresponds to the feature we're
|
* 'data' contains an integer that corresponds to the feature we're
|
||||||
* testing
|
* testing
|
||||||
*/
|
*/
|
||||||
static int proc_salinfo_show(struct seq_file *m, void *v)
|
static int __maybe_unused proc_salinfo_show(struct seq_file *m, void *v)
|
||||||
{
|
{
|
||||||
unsigned long data = (unsigned long)v;
|
unsigned long data = (unsigned long)v;
|
||||||
seq_puts(m, (sal_platform_features & data) ? "1\n" : "0\n");
|
seq_puts(m, (sal_platform_features & data) ? "1\n" : "0\n");
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ skip:
|
|||||||
return __per_cpu_start + __per_cpu_offset[smp_processor_id()];
|
return __per_cpu_start + __per_cpu_offset[smp_processor_id()];
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline __init void
|
||||||
alloc_per_cpu_data(void)
|
alloc_per_cpu_data(void)
|
||||||
{
|
{
|
||||||
size_t size = PERCPU_PAGE_SIZE * num_possible_cpus();
|
size_t size = PERCPU_PAGE_SIZE * num_possible_cpus();
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ huge_pte_offset (struct mm_struct *mm, unsigned long addr, unsigned long sz)
|
|||||||
|
|
||||||
pgd = pgd_offset(mm, taddr);
|
pgd = pgd_offset(mm, taddr);
|
||||||
if (pgd_present(*pgd)) {
|
if (pgd_present(*pgd)) {
|
||||||
p4d = p4d_offset(pgd, addr);
|
p4d = p4d_offset(pgd, taddr);
|
||||||
if (p4d_present(*p4d)) {
|
if (p4d_present(*p4d)) {
|
||||||
pud = pud_offset(p4d, taddr);
|
pud = pud_offset(p4d, taddr);
|
||||||
if (pud_present(*pud)) {
|
if (pud_present(*pud)) {
|
||||||
|
|||||||
@@ -882,11 +882,17 @@ static inline int rt_setup_ucontext(struct ucontext __user *uc, struct pt_regs *
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline void __user *
|
static inline void __user *
|
||||||
get_sigframe(struct ksignal *ksig, size_t frame_size)
|
get_sigframe(struct ksignal *ksig, struct pt_regs *tregs, size_t frame_size)
|
||||||
{
|
{
|
||||||
unsigned long usp = sigsp(rdusp(), ksig);
|
unsigned long usp = sigsp(rdusp(), ksig);
|
||||||
|
unsigned long gap = 0;
|
||||||
|
|
||||||
return (void __user *)((usp - frame_size) & -8UL);
|
if (CPU_IS_020_OR_030 && tregs->format == 0xb) {
|
||||||
|
/* USP is unreliable so use worst-case value */
|
||||||
|
gap = 256;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (void __user *)((usp - gap - frame_size) & -8UL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int setup_frame(struct ksignal *ksig, sigset_t *set,
|
static int setup_frame(struct ksignal *ksig, sigset_t *set,
|
||||||
@@ -904,7 +910,7 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
|
|||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
frame = get_sigframe(ksig, sizeof(*frame) + fsize);
|
frame = get_sigframe(ksig, tregs, sizeof(*frame) + fsize);
|
||||||
|
|
||||||
if (fsize)
|
if (fsize)
|
||||||
err |= copy_to_user (frame + 1, regs + 1, fsize);
|
err |= copy_to_user (frame + 1, regs + 1, fsize);
|
||||||
@@ -976,7 +982,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
|
|||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
frame = get_sigframe(ksig, sizeof(*frame));
|
frame = get_sigframe(ksig, tregs, sizeof(*frame));
|
||||||
|
|
||||||
if (fsize)
|
if (fsize)
|
||||||
err |= copy_to_user (&frame->uc.uc_extra, regs + 1, fsize);
|
err |= copy_to_user (&frame->uc.uc_extra, regs + 1, fsize);
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <linux/dma-map-ops.h> /* for dma_default_coherent */
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
@@ -623,17 +624,18 @@ u32 au1xxx_dbdma_put_source(u32 chanid, dma_addr_t buf, int nbytes, u32 flags)
|
|||||||
dp->dscr_cmd0 &= ~DSCR_CMD0_IE;
|
dp->dscr_cmd0 &= ~DSCR_CMD0_IE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* There is an errata on the Au1200/Au1550 parts that could result
|
* There is an erratum on certain Au1200/Au1550 revisions that could
|
||||||
* in "stale" data being DMA'ed. It has to do with the snoop logic on
|
* result in "stale" data being DMA'ed. It has to do with the snoop
|
||||||
* the cache eviction buffer. DMA_NONCOHERENT is on by default for
|
* logic on the cache eviction buffer. dma_default_coherent is set
|
||||||
* these parts. If it is fixed in the future, these dma_cache_inv will
|
* to false on these parts.
|
||||||
* just be nothing more than empty macros. See io.h.
|
|
||||||
*/
|
*/
|
||||||
dma_cache_wback_inv((unsigned long)buf, nbytes);
|
if (!dma_default_coherent)
|
||||||
|
dma_cache_wback_inv(KSEG0ADDR(buf), nbytes);
|
||||||
dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */
|
dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */
|
||||||
wmb(); /* drain writebuffer */
|
wmb(); /* drain writebuffer */
|
||||||
dma_cache_wback_inv((unsigned long)dp, sizeof(*dp));
|
dma_cache_wback_inv((unsigned long)dp, sizeof(*dp));
|
||||||
ctp->chan_ptr->ddma_dbell = 0;
|
ctp->chan_ptr->ddma_dbell = 0;
|
||||||
|
wmb(); /* force doorbell write out to dma engine */
|
||||||
|
|
||||||
/* Get next descriptor pointer. */
|
/* Get next descriptor pointer. */
|
||||||
ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
|
ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
|
||||||
@@ -685,17 +687,18 @@ u32 au1xxx_dbdma_put_dest(u32 chanid, dma_addr_t buf, int nbytes, u32 flags)
|
|||||||
dp->dscr_source1, dp->dscr_dest0, dp->dscr_dest1);
|
dp->dscr_source1, dp->dscr_dest0, dp->dscr_dest1);
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* There is an errata on the Au1200/Au1550 parts that could result in
|
* There is an erratum on certain Au1200/Au1550 revisions that could
|
||||||
* "stale" data being DMA'ed. It has to do with the snoop logic on the
|
* result in "stale" data being DMA'ed. It has to do with the snoop
|
||||||
* cache eviction buffer. DMA_NONCOHERENT is on by default for these
|
* logic on the cache eviction buffer. dma_default_coherent is set
|
||||||
* parts. If it is fixed in the future, these dma_cache_inv will just
|
* to false on these parts.
|
||||||
* be nothing more than empty macros. See io.h.
|
|
||||||
*/
|
*/
|
||||||
dma_cache_inv((unsigned long)buf, nbytes);
|
if (!dma_default_coherent)
|
||||||
|
dma_cache_inv(KSEG0ADDR(buf), nbytes);
|
||||||
dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */
|
dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */
|
||||||
wmb(); /* drain writebuffer */
|
wmb(); /* drain writebuffer */
|
||||||
dma_cache_wback_inv((unsigned long)dp, sizeof(*dp));
|
dma_cache_wback_inv((unsigned long)dp, sizeof(*dp));
|
||||||
ctp->chan_ptr->ddma_dbell = 0;
|
ctp->chan_ptr->ddma_dbell = 0;
|
||||||
|
wmb(); /* force doorbell write out to dma engine */
|
||||||
|
|
||||||
/* Get next descriptor pointer. */
|
/* Get next descriptor pointer. */
|
||||||
ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
|
ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
|
||||||
|
|||||||
@@ -53,8 +53,6 @@ CONFIG_IPV6_SUBTREES=y
|
|||||||
CONFIG_NETWORK_SECMARK=y
|
CONFIG_NETWORK_SECMARK=y
|
||||||
CONFIG_IP_SCTP=m
|
CONFIG_IP_SCTP=m
|
||||||
CONFIG_VLAN_8021Q=m
|
CONFIG_VLAN_8021Q=m
|
||||||
CONFIG_DECNET=m
|
|
||||||
CONFIG_DECNET_ROUTER=y
|
|
||||||
# CONFIG_WIRELESS is not set
|
# CONFIG_WIRELESS is not set
|
||||||
# CONFIG_UEVENT_HELPER is not set
|
# CONFIG_UEVENT_HELPER is not set
|
||||||
# CONFIG_FW_LOADER is not set
|
# CONFIG_FW_LOADER is not set
|
||||||
|
|||||||
@@ -49,8 +49,6 @@ CONFIG_IPV6_SUBTREES=y
|
|||||||
CONFIG_NETWORK_SECMARK=y
|
CONFIG_NETWORK_SECMARK=y
|
||||||
CONFIG_IP_SCTP=m
|
CONFIG_IP_SCTP=m
|
||||||
CONFIG_VLAN_8021Q=m
|
CONFIG_VLAN_8021Q=m
|
||||||
CONFIG_DECNET=m
|
|
||||||
CONFIG_DECNET_ROUTER=y
|
|
||||||
# CONFIG_WIRELESS is not set
|
# CONFIG_WIRELESS is not set
|
||||||
# CONFIG_UEVENT_HELPER is not set
|
# CONFIG_UEVENT_HELPER is not set
|
||||||
# CONFIG_FW_LOADER is not set
|
# CONFIG_FW_LOADER is not set
|
||||||
|
|||||||
@@ -48,8 +48,6 @@ CONFIG_IPV6_SUBTREES=y
|
|||||||
CONFIG_NETWORK_SECMARK=y
|
CONFIG_NETWORK_SECMARK=y
|
||||||
CONFIG_IP_SCTP=m
|
CONFIG_IP_SCTP=m
|
||||||
CONFIG_VLAN_8021Q=m
|
CONFIG_VLAN_8021Q=m
|
||||||
CONFIG_DECNET=m
|
|
||||||
CONFIG_DECNET_ROUTER=y
|
|
||||||
# CONFIG_WIRELESS is not set
|
# CONFIG_WIRELESS is not set
|
||||||
# CONFIG_UEVENT_HELPER is not set
|
# CONFIG_UEVENT_HELPER is not set
|
||||||
# CONFIG_FW_LOADER is not set
|
# CONFIG_FW_LOADER is not set
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ CONFIG_IP_NF_RAW=m
|
|||||||
CONFIG_IP_NF_ARPTABLES=m
|
CONFIG_IP_NF_ARPTABLES=m
|
||||||
CONFIG_IP_NF_ARPFILTER=m
|
CONFIG_IP_NF_ARPFILTER=m
|
||||||
CONFIG_IP_NF_ARP_MANGLE=m
|
CONFIG_IP_NF_ARP_MANGLE=m
|
||||||
CONFIG_DECNET_NF_GRABULATOR=m
|
|
||||||
CONFIG_BRIDGE_NF_EBTABLES=m
|
CONFIG_BRIDGE_NF_EBTABLES=m
|
||||||
CONFIG_BRIDGE_EBT_BROUTE=m
|
CONFIG_BRIDGE_EBT_BROUTE=m
|
||||||
CONFIG_BRIDGE_EBT_T_FILTER=m
|
CONFIG_BRIDGE_EBT_T_FILTER=m
|
||||||
@@ -99,7 +98,6 @@ CONFIG_ATM_MPOA=m
|
|||||||
CONFIG_ATM_BR2684=m
|
CONFIG_ATM_BR2684=m
|
||||||
CONFIG_BRIDGE=m
|
CONFIG_BRIDGE=m
|
||||||
CONFIG_VLAN_8021Q=m
|
CONFIG_VLAN_8021Q=m
|
||||||
CONFIG_DECNET=m
|
|
||||||
CONFIG_LLC2=m
|
CONFIG_LLC2=m
|
||||||
CONFIG_ATALK=m
|
CONFIG_ATALK=m
|
||||||
CONFIG_DEV_APPLETALK=m
|
CONFIG_DEV_APPLETALK=m
|
||||||
|
|||||||
@@ -117,7 +117,6 @@ CONFIG_IP6_NF_FILTER=m
|
|||||||
CONFIG_IP6_NF_TARGET_REJECT=m
|
CONFIG_IP6_NF_TARGET_REJECT=m
|
||||||
CONFIG_IP6_NF_MANGLE=m
|
CONFIG_IP6_NF_MANGLE=m
|
||||||
CONFIG_IP6_NF_RAW=m
|
CONFIG_IP6_NF_RAW=m
|
||||||
CONFIG_DECNET_NF_GRABULATOR=m
|
|
||||||
CONFIG_BRIDGE_NF_EBTABLES=m
|
CONFIG_BRIDGE_NF_EBTABLES=m
|
||||||
CONFIG_BRIDGE_EBT_BROUTE=m
|
CONFIG_BRIDGE_EBT_BROUTE=m
|
||||||
CONFIG_BRIDGE_EBT_T_FILTER=m
|
CONFIG_BRIDGE_EBT_T_FILTER=m
|
||||||
@@ -147,7 +146,6 @@ CONFIG_ATM_MPOA=m
|
|||||||
CONFIG_ATM_BR2684=m
|
CONFIG_ATM_BR2684=m
|
||||||
CONFIG_BRIDGE=m
|
CONFIG_BRIDGE=m
|
||||||
CONFIG_VLAN_8021Q=m
|
CONFIG_VLAN_8021Q=m
|
||||||
CONFIG_DECNET=m
|
|
||||||
CONFIG_LLC2=m
|
CONFIG_LLC2=m
|
||||||
CONFIG_ATALK=m
|
CONFIG_ATALK=m
|
||||||
CONFIG_DEV_APPLETALK=m
|
CONFIG_DEV_APPLETALK=m
|
||||||
|
|||||||
@@ -200,7 +200,6 @@ CONFIG_IP6_NF_TARGET_REJECT=m
|
|||||||
CONFIG_IP6_NF_MANGLE=m
|
CONFIG_IP6_NF_MANGLE=m
|
||||||
CONFIG_IP6_NF_RAW=m
|
CONFIG_IP6_NF_RAW=m
|
||||||
CONFIG_IP6_NF_SECURITY=m
|
CONFIG_IP6_NF_SECURITY=m
|
||||||
CONFIG_DECNET_NF_GRABULATOR=m
|
|
||||||
CONFIG_BRIDGE_NF_EBTABLES=m
|
CONFIG_BRIDGE_NF_EBTABLES=m
|
||||||
CONFIG_BRIDGE_EBT_BROUTE=m
|
CONFIG_BRIDGE_EBT_BROUTE=m
|
||||||
CONFIG_BRIDGE_EBT_T_FILTER=m
|
CONFIG_BRIDGE_EBT_T_FILTER=m
|
||||||
@@ -234,7 +233,6 @@ CONFIG_ATM_BR2684=m
|
|||||||
CONFIG_BRIDGE=m
|
CONFIG_BRIDGE=m
|
||||||
CONFIG_VLAN_8021Q=m
|
CONFIG_VLAN_8021Q=m
|
||||||
CONFIG_VLAN_8021Q_GVRP=y
|
CONFIG_VLAN_8021Q_GVRP=y
|
||||||
CONFIG_DECNET=m
|
|
||||||
CONFIG_LLC2=m
|
CONFIG_LLC2=m
|
||||||
CONFIG_ATALK=m
|
CONFIG_ATALK=m
|
||||||
CONFIG_DEV_APPLETALK=m
|
CONFIG_DEV_APPLETALK=m
|
||||||
|
|||||||
@@ -198,7 +198,6 @@ CONFIG_IP6_NF_TARGET_REJECT=m
|
|||||||
CONFIG_IP6_NF_MANGLE=m
|
CONFIG_IP6_NF_MANGLE=m
|
||||||
CONFIG_IP6_NF_RAW=m
|
CONFIG_IP6_NF_RAW=m
|
||||||
CONFIG_IP6_NF_SECURITY=m
|
CONFIG_IP6_NF_SECURITY=m
|
||||||
CONFIG_DECNET_NF_GRABULATOR=m
|
|
||||||
CONFIG_BRIDGE_NF_EBTABLES=m
|
CONFIG_BRIDGE_NF_EBTABLES=m
|
||||||
CONFIG_BRIDGE_EBT_BROUTE=m
|
CONFIG_BRIDGE_EBT_BROUTE=m
|
||||||
CONFIG_BRIDGE_EBT_T_FILTER=m
|
CONFIG_BRIDGE_EBT_T_FILTER=m
|
||||||
@@ -232,7 +231,6 @@ CONFIG_ATM_BR2684=m
|
|||||||
CONFIG_BRIDGE=m
|
CONFIG_BRIDGE=m
|
||||||
CONFIG_VLAN_8021Q=m
|
CONFIG_VLAN_8021Q=m
|
||||||
CONFIG_VLAN_8021Q_GVRP=y
|
CONFIG_VLAN_8021Q_GVRP=y
|
||||||
CONFIG_DECNET=m
|
|
||||||
CONFIG_LLC2=m
|
CONFIG_LLC2=m
|
||||||
CONFIG_ATALK=m
|
CONFIG_ATALK=m
|
||||||
CONFIG_DEV_APPLETALK=m
|
CONFIG_DEV_APPLETALK=m
|
||||||
|
|||||||
@@ -116,7 +116,6 @@ CONFIG_IP6_NF_FILTER=m
|
|||||||
CONFIG_IP6_NF_TARGET_REJECT=m
|
CONFIG_IP6_NF_TARGET_REJECT=m
|
||||||
CONFIG_IP6_NF_MANGLE=m
|
CONFIG_IP6_NF_MANGLE=m
|
||||||
CONFIG_IP6_NF_RAW=m
|
CONFIG_IP6_NF_RAW=m
|
||||||
CONFIG_DECNET_NF_GRABULATOR=m
|
|
||||||
CONFIG_BRIDGE_NF_EBTABLES=m
|
CONFIG_BRIDGE_NF_EBTABLES=m
|
||||||
CONFIG_BRIDGE_EBT_BROUTE=m
|
CONFIG_BRIDGE_EBT_BROUTE=m
|
||||||
CONFIG_BRIDGE_EBT_T_FILTER=m
|
CONFIG_BRIDGE_EBT_T_FILTER=m
|
||||||
@@ -137,7 +136,6 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
|
|||||||
CONFIG_BRIDGE_EBT_SNAT=m
|
CONFIG_BRIDGE_EBT_SNAT=m
|
||||||
CONFIG_BRIDGE_EBT_LOG=m
|
CONFIG_BRIDGE_EBT_LOG=m
|
||||||
CONFIG_BRIDGE=m
|
CONFIG_BRIDGE=m
|
||||||
CONFIG_DECNET=m
|
|
||||||
CONFIG_NET_SCHED=y
|
CONFIG_NET_SCHED=y
|
||||||
CONFIG_NET_SCH_CBQ=m
|
CONFIG_NET_SCH_CBQ=m
|
||||||
CONFIG_NET_SCH_HTB=m
|
CONFIG_NET_SCH_HTB=m
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ char *fw_getenv(char *envname)
|
|||||||
{
|
{
|
||||||
char *result = NULL;
|
char *result = NULL;
|
||||||
|
|
||||||
if (_fw_envp != NULL) {
|
if (_fw_envp != NULL && fw_envp(0) != NULL) {
|
||||||
/*
|
/*
|
||||||
* Return a pointer to the given environment variable.
|
* Return a pointer to the given environment variable.
|
||||||
* YAMON uses "name", "value" pairs, while U-Boot uses
|
* YAMON uses "name", "value" pairs, while U-Boot uses
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ ATOMIC_OPS(atomic64, xor, s64, ^=, xor, lld, scd)
|
|||||||
* The function returns the old value of @v minus @i.
|
* The function returns the old value of @v minus @i.
|
||||||
*/
|
*/
|
||||||
#define ATOMIC_SIP_OP(pfx, type, op, ll, sc) \
|
#define ATOMIC_SIP_OP(pfx, type, op, ll, sc) \
|
||||||
static __inline__ int pfx##_sub_if_positive(type i, pfx##_t * v) \
|
static __inline__ type pfx##_sub_if_positive(type i, pfx##_t * v) \
|
||||||
{ \
|
{ \
|
||||||
type temp, result; \
|
type temp, result; \
|
||||||
\
|
\
|
||||||
|
|||||||
@@ -154,10 +154,6 @@ static unsigned long __init init_initrd(void)
|
|||||||
pr_err("initrd start must be page aligned\n");
|
pr_err("initrd start must be page aligned\n");
|
||||||
goto disable;
|
goto disable;
|
||||||
}
|
}
|
||||||
if (initrd_start < PAGE_OFFSET) {
|
|
||||||
pr_err("initrd start < PAGE_OFFSET\n");
|
|
||||||
goto disable;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sanitize initrd addresses. For example firmware
|
* Sanitize initrd addresses. For example firmware
|
||||||
@@ -170,6 +166,11 @@ static unsigned long __init init_initrd(void)
|
|||||||
initrd_end = (unsigned long)__va(end);
|
initrd_end = (unsigned long)__va(end);
|
||||||
initrd_start = (unsigned long)__va(__pa(initrd_start));
|
initrd_start = (unsigned long)__va(__pa(initrd_start));
|
||||||
|
|
||||||
|
if (initrd_start < PAGE_OFFSET) {
|
||||||
|
pr_err("initrd start < PAGE_OFFSET\n");
|
||||||
|
goto disable;
|
||||||
|
}
|
||||||
|
|
||||||
ROOT_DEV = Root_RAM0;
|
ROOT_DEV = Root_RAM0;
|
||||||
return PFN_UP(end);
|
return PFN_UP(end);
|
||||||
disable:
|
disable:
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
#define EMITS_PT_NOTE
|
#define EMITS_PT_NOTE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define RUNTIME_DISCARD_EXIT
|
||||||
|
|
||||||
#include <asm-generic/vmlinux.lds.h>
|
#include <asm-generic/vmlinux.lds.h>
|
||||||
|
|
||||||
#undef mips
|
#undef mips
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
rx-fifo-depth = <8192>;
|
rx-fifo-depth = <8192>;
|
||||||
tx-fifo-depth = <8192>;
|
tx-fifo-depth = <8192>;
|
||||||
address-bits = <48>;
|
address-bits = <48>;
|
||||||
max-frame-size = <1518>;
|
max-frame-size = <1500>;
|
||||||
local-mac-address = [00 00 00 00 00 00];
|
local-mac-address = [00 00 00 00 00 00];
|
||||||
altr,has-supplementary-unicast;
|
altr,has-supplementary-unicast;
|
||||||
altr,enable-sup-addr = <1>;
|
altr,enable-sup-addr = <1>;
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
interrupt-names = "rx_irq", "tx_irq";
|
interrupt-names = "rx_irq", "tx_irq";
|
||||||
rx-fifo-depth = <8192>;
|
rx-fifo-depth = <8192>;
|
||||||
tx-fifo-depth = <8192>;
|
tx-fifo-depth = <8192>;
|
||||||
max-frame-size = <1518>;
|
max-frame-size = <1500>;
|
||||||
local-mac-address = [ 00 00 00 00 00 00 ];
|
local-mac-address = [ 00 00 00 00 00 00 ];
|
||||||
phy-mode = "rgmii-id";
|
phy-mode = "rgmii-id";
|
||||||
phy-handle = <&phy0>;
|
phy-handle = <&phy0>;
|
||||||
|
|||||||
@@ -173,7 +173,6 @@ handler: ;\
|
|||||||
l.sw PT_GPR28(r1),r28 ;\
|
l.sw PT_GPR28(r1),r28 ;\
|
||||||
l.sw PT_GPR29(r1),r29 ;\
|
l.sw PT_GPR29(r1),r29 ;\
|
||||||
/* r30 already save */ ;\
|
/* r30 already save */ ;\
|
||||||
/* l.sw PT_GPR30(r1),r30*/ ;\
|
|
||||||
l.sw PT_GPR31(r1),r31 ;\
|
l.sw PT_GPR31(r1),r31 ;\
|
||||||
TRACE_IRQS_OFF_ENTRY ;\
|
TRACE_IRQS_OFF_ENTRY ;\
|
||||||
/* Store -1 in orig_gpr11 for non-syscall exceptions */ ;\
|
/* Store -1 in orig_gpr11 for non-syscall exceptions */ ;\
|
||||||
@@ -211,9 +210,8 @@ handler: ;\
|
|||||||
l.sw PT_GPR27(r1),r27 ;\
|
l.sw PT_GPR27(r1),r27 ;\
|
||||||
l.sw PT_GPR28(r1),r28 ;\
|
l.sw PT_GPR28(r1),r28 ;\
|
||||||
l.sw PT_GPR29(r1),r29 ;\
|
l.sw PT_GPR29(r1),r29 ;\
|
||||||
/* r31 already saved */ ;\
|
/* r30 already saved */ ;\
|
||||||
l.sw PT_GPR30(r1),r30 ;\
|
l.sw PT_GPR31(r1),r31 ;\
|
||||||
/* l.sw PT_GPR31(r1),r31 */ ;\
|
|
||||||
/* Store -1 in orig_gpr11 for non-syscall exceptions */ ;\
|
/* Store -1 in orig_gpr11 for non-syscall exceptions */ ;\
|
||||||
l.addi r30,r0,-1 ;\
|
l.addi r30,r0,-1 ;\
|
||||||
l.sw PT_ORIG_GPR11(r1),r30 ;\
|
l.sw PT_ORIG_GPR11(r1),r30 ;\
|
||||||
|
|||||||
@@ -57,6 +57,11 @@ extern void flush_dcache_page(struct page *page);
|
|||||||
|
|
||||||
#define flush_dcache_mmap_lock(mapping) xa_lock_irq(&mapping->i_pages)
|
#define flush_dcache_mmap_lock(mapping) xa_lock_irq(&mapping->i_pages)
|
||||||
#define flush_dcache_mmap_unlock(mapping) xa_unlock_irq(&mapping->i_pages)
|
#define flush_dcache_mmap_unlock(mapping) xa_unlock_irq(&mapping->i_pages)
|
||||||
|
#define flush_dcache_mmap_lock_irqsave(mapping, flags) \
|
||||||
|
xa_lock_irqsave(&mapping->i_pages, flags)
|
||||||
|
#define flush_dcache_mmap_unlock_irqrestore(mapping, flags) \
|
||||||
|
xa_unlock_irqrestore(&mapping->i_pages, flags)
|
||||||
|
|
||||||
|
|
||||||
#define flush_icache_page(vma,page) do { \
|
#define flush_icache_page(vma,page) do { \
|
||||||
flush_kernel_dcache_page(page); \
|
flush_kernel_dcache_page(page); \
|
||||||
|
|||||||
@@ -327,6 +327,7 @@ void flush_dcache_page(struct page *page)
|
|||||||
struct vm_area_struct *mpnt;
|
struct vm_area_struct *mpnt;
|
||||||
unsigned long offset;
|
unsigned long offset;
|
||||||
unsigned long addr, old_addr = 0;
|
unsigned long addr, old_addr = 0;
|
||||||
|
unsigned long flags;
|
||||||
pgoff_t pgoff;
|
pgoff_t pgoff;
|
||||||
|
|
||||||
if (mapping && !mapping_mapped(mapping)) {
|
if (mapping && !mapping_mapped(mapping)) {
|
||||||
@@ -346,7 +347,7 @@ void flush_dcache_page(struct page *page)
|
|||||||
* declared as MAP_PRIVATE or MAP_SHARED), so we only need
|
* declared as MAP_PRIVATE or MAP_SHARED), so we only need
|
||||||
* to flush one address here for them all to become coherent */
|
* to flush one address here for them all to become coherent */
|
||||||
|
|
||||||
flush_dcache_mmap_lock(mapping);
|
flush_dcache_mmap_lock_irqsave(mapping, flags);
|
||||||
vma_interval_tree_foreach(mpnt, &mapping->i_mmap, pgoff, pgoff) {
|
vma_interval_tree_foreach(mpnt, &mapping->i_mmap, pgoff, pgoff) {
|
||||||
offset = (pgoff - mpnt->vm_pgoff) << PAGE_SHIFT;
|
offset = (pgoff - mpnt->vm_pgoff) << PAGE_SHIFT;
|
||||||
addr = mpnt->vm_start + offset;
|
addr = mpnt->vm_start + offset;
|
||||||
@@ -369,7 +370,7 @@ void flush_dcache_page(struct page *page)
|
|||||||
old_addr = addr;
|
old_addr = addr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
flush_dcache_mmap_unlock(mapping);
|
flush_dcache_mmap_unlock_irqrestore(mapping, flags);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(flush_dcache_page);
|
EXPORT_SYMBOL(flush_dcache_page);
|
||||||
|
|
||||||
|
|||||||
@@ -446,11 +446,27 @@ void arch_dma_free(struct device *dev, size_t size, void *vaddr,
|
|||||||
void arch_sync_dma_for_device(phys_addr_t paddr, size_t size,
|
void arch_sync_dma_for_device(phys_addr_t paddr, size_t size,
|
||||||
enum dma_data_direction dir)
|
enum dma_data_direction dir)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* fdc: The data cache line is written back to memory, if and only if
|
||||||
|
* it is dirty, and then invalidated from the data cache.
|
||||||
|
*/
|
||||||
flush_kernel_dcache_range((unsigned long)phys_to_virt(paddr), size);
|
flush_kernel_dcache_range((unsigned long)phys_to_virt(paddr), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void arch_sync_dma_for_cpu(phys_addr_t paddr, size_t size,
|
void arch_sync_dma_for_cpu(phys_addr_t paddr, size_t size,
|
||||||
enum dma_data_direction dir)
|
enum dma_data_direction dir)
|
||||||
{
|
{
|
||||||
flush_kernel_dcache_range((unsigned long)phys_to_virt(paddr), size);
|
unsigned long addr = (unsigned long) phys_to_virt(paddr);
|
||||||
|
|
||||||
|
switch (dir) {
|
||||||
|
case DMA_TO_DEVICE:
|
||||||
|
case DMA_BIDIRECTIONAL:
|
||||||
|
flush_kernel_dcache_range(addr, size);
|
||||||
|
return;
|
||||||
|
case DMA_FROM_DEVICE:
|
||||||
|
purge_kernel_dcache_range_asm(addr, addr + size);
|
||||||
|
return;
|
||||||
|
default:
|
||||||
|
BUG();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,13 +123,18 @@ void machine_power_off(void)
|
|||||||
/* It seems we have no way to power the system off via
|
/* It seems we have no way to power the system off via
|
||||||
* software. The user has to press the button himself. */
|
* software. The user has to press the button himself. */
|
||||||
|
|
||||||
printk(KERN_EMERG "System shut down completed.\n"
|
printk("Power off or press RETURN to reboot.\n");
|
||||||
"Please power this system off now.");
|
|
||||||
|
|
||||||
/* prevent soft lockup/stalled CPU messages for endless loop. */
|
/* prevent soft lockup/stalled CPU messages for endless loop. */
|
||||||
rcu_sysrq_start();
|
rcu_sysrq_start();
|
||||||
lockup_detector_soft_poweroff();
|
lockup_detector_soft_poweroff();
|
||||||
for (;;);
|
while (1) {
|
||||||
|
/* reboot if user presses RETURN key */
|
||||||
|
if (pdc_iodc_getc() == 13) {
|
||||||
|
printk("Rebooting...\n");
|
||||||
|
machine_restart(NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void (*pm_power_off)(void);
|
void (*pm_power_off)(void);
|
||||||
|
|||||||
@@ -248,9 +248,6 @@ ENTRY_CFI(real64_call_asm)
|
|||||||
/* save fn */
|
/* save fn */
|
||||||
copy %arg2, %r31
|
copy %arg2, %r31
|
||||||
|
|
||||||
/* set up the new ap */
|
|
||||||
ldo 64(%arg1), %r29
|
|
||||||
|
|
||||||
/* load up the arg registers from the saved arg area */
|
/* load up the arg registers from the saved arg area */
|
||||||
/* 32-bit calling convention passes first 4 args in registers */
|
/* 32-bit calling convention passes first 4 args in registers */
|
||||||
ldd 0*REG_SZ(%arg1), %arg0 /* note overwriting arg0 */
|
ldd 0*REG_SZ(%arg1), %arg0 /* note overwriting arg0 */
|
||||||
@@ -262,7 +259,9 @@ ENTRY_CFI(real64_call_asm)
|
|||||||
ldd 7*REG_SZ(%arg1), %r19
|
ldd 7*REG_SZ(%arg1), %r19
|
||||||
ldd 1*REG_SZ(%arg1), %arg1 /* do this one last! */
|
ldd 1*REG_SZ(%arg1), %arg1 /* do this one last! */
|
||||||
|
|
||||||
|
/* set up real-mode stack and real-mode ap */
|
||||||
tophys_r1 %sp
|
tophys_r1 %sp
|
||||||
|
ldo -16(%sp), %r29 /* Reference param save area */
|
||||||
|
|
||||||
b,l rfi_virt2real,%r2
|
b,l rfi_virt2real,%r2
|
||||||
nop
|
nop
|
||||||
|
|||||||
@@ -305,8 +305,8 @@ static void handle_break(struct pt_regs *regs)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_KGDB
|
#ifdef CONFIG_KGDB
|
||||||
if (unlikely(iir == PARISC_KGDB_COMPILED_BREAK_INSN ||
|
if (unlikely((iir == PARISC_KGDB_COMPILED_BREAK_INSN ||
|
||||||
iir == PARISC_KGDB_BREAK_INSN)) {
|
iir == PARISC_KGDB_BREAK_INSN)) && !user_mode(regs)) {
|
||||||
kgdb_handle_exception(9, SIGTRAP, 0, regs);
|
kgdb_handle_exception(9, SIGTRAP, 0, regs);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -245,8 +245,6 @@ CONFIG_ATM_LANE=m
|
|||||||
CONFIG_ATM_BR2684=m
|
CONFIG_ATM_BR2684=m
|
||||||
CONFIG_BRIDGE=m
|
CONFIG_BRIDGE=m
|
||||||
CONFIG_VLAN_8021Q=m
|
CONFIG_VLAN_8021Q=m
|
||||||
CONFIG_DECNET=m
|
|
||||||
CONFIG_DECNET_ROUTER=y
|
|
||||||
CONFIG_ATALK=m
|
CONFIG_ATALK=m
|
||||||
CONFIG_DEV_APPLETALK=m
|
CONFIG_DEV_APPLETALK=m
|
||||||
CONFIG_IPDDP=m
|
CONFIG_IPDDP=m
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
#define FW_FEATURE_OPAL ASM_CONST(0x0000000010000000)
|
#define FW_FEATURE_OPAL ASM_CONST(0x0000000010000000)
|
||||||
#define FW_FEATURE_SET_MODE ASM_CONST(0x0000000040000000)
|
#define FW_FEATURE_SET_MODE ASM_CONST(0x0000000040000000)
|
||||||
#define FW_FEATURE_BEST_ENERGY ASM_CONST(0x0000000080000000)
|
#define FW_FEATURE_BEST_ENERGY ASM_CONST(0x0000000080000000)
|
||||||
#define FW_FEATURE_TYPE1_AFFINITY ASM_CONST(0x0000000100000000)
|
#define FW_FEATURE_FORM1_AFFINITY ASM_CONST(0x0000000100000000)
|
||||||
#define FW_FEATURE_PRRN ASM_CONST(0x0000000200000000)
|
#define FW_FEATURE_PRRN ASM_CONST(0x0000000200000000)
|
||||||
#define FW_FEATURE_DRMEM_V2 ASM_CONST(0x0000000400000000)
|
#define FW_FEATURE_DRMEM_V2 ASM_CONST(0x0000000400000000)
|
||||||
#define FW_FEATURE_DRC_INFO ASM_CONST(0x0000000800000000)
|
#define FW_FEATURE_DRC_INFO ASM_CONST(0x0000000800000000)
|
||||||
@@ -53,6 +53,7 @@
|
|||||||
#define FW_FEATURE_ULTRAVISOR ASM_CONST(0x0000004000000000)
|
#define FW_FEATURE_ULTRAVISOR ASM_CONST(0x0000004000000000)
|
||||||
#define FW_FEATURE_STUFF_TCE ASM_CONST(0x0000008000000000)
|
#define FW_FEATURE_STUFF_TCE ASM_CONST(0x0000008000000000)
|
||||||
#define FW_FEATURE_RPT_INVALIDATE ASM_CONST(0x0000010000000000)
|
#define FW_FEATURE_RPT_INVALIDATE ASM_CONST(0x0000010000000000)
|
||||||
|
#define FW_FEATURE_FORM2_AFFINITY ASM_CONST(0x0000020000000000)
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
@@ -69,11 +70,11 @@ enum {
|
|||||||
FW_FEATURE_SPLPAR | FW_FEATURE_LPAR |
|
FW_FEATURE_SPLPAR | FW_FEATURE_LPAR |
|
||||||
FW_FEATURE_CMO | FW_FEATURE_VPHN | FW_FEATURE_XCMO |
|
FW_FEATURE_CMO | FW_FEATURE_VPHN | FW_FEATURE_XCMO |
|
||||||
FW_FEATURE_SET_MODE | FW_FEATURE_BEST_ENERGY |
|
FW_FEATURE_SET_MODE | FW_FEATURE_BEST_ENERGY |
|
||||||
FW_FEATURE_TYPE1_AFFINITY | FW_FEATURE_PRRN |
|
FW_FEATURE_FORM1_AFFINITY | FW_FEATURE_PRRN |
|
||||||
FW_FEATURE_HPT_RESIZE | FW_FEATURE_DRMEM_V2 |
|
FW_FEATURE_HPT_RESIZE | FW_FEATURE_DRMEM_V2 |
|
||||||
FW_FEATURE_DRC_INFO | FW_FEATURE_BLOCK_REMOVE |
|
FW_FEATURE_DRC_INFO | FW_FEATURE_BLOCK_REMOVE |
|
||||||
FW_FEATURE_PAPR_SCM | FW_FEATURE_ULTRAVISOR |
|
FW_FEATURE_PAPR_SCM | FW_FEATURE_ULTRAVISOR |
|
||||||
FW_FEATURE_RPT_INVALIDATE,
|
FW_FEATURE_RPT_INVALIDATE | FW_FEATURE_FORM2_AFFINITY,
|
||||||
FW_FEATURE_PSERIES_ALWAYS = 0,
|
FW_FEATURE_PSERIES_ALWAYS = 0,
|
||||||
FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL | FW_FEATURE_ULTRAVISOR,
|
FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL | FW_FEATURE_ULTRAVISOR,
|
||||||
FW_FEATURE_POWERNV_ALWAYS = 0,
|
FW_FEATURE_POWERNV_ALWAYS = 0,
|
||||||
|
|||||||
@@ -147,8 +147,9 @@ extern int of_read_drc_info_cell(struct property **prop,
|
|||||||
#define OV5_MSI 0x0201 /* PCIe/MSI support */
|
#define OV5_MSI 0x0201 /* PCIe/MSI support */
|
||||||
#define OV5_CMO 0x0480 /* Cooperative Memory Overcommitment */
|
#define OV5_CMO 0x0480 /* Cooperative Memory Overcommitment */
|
||||||
#define OV5_XCMO 0x0440 /* Page Coalescing */
|
#define OV5_XCMO 0x0440 /* Page Coalescing */
|
||||||
#define OV5_TYPE1_AFFINITY 0x0580 /* Type 1 NUMA affinity */
|
#define OV5_FORM1_AFFINITY 0x0580 /* FORM1 NUMA affinity */
|
||||||
#define OV5_PRRN 0x0540 /* Platform Resource Reassignment */
|
#define OV5_PRRN 0x0540 /* Platform Resource Reassignment */
|
||||||
|
#define OV5_FORM2_AFFINITY 0x0520 /* Form2 NUMA affinity */
|
||||||
#define OV5_HP_EVT 0x0604 /* Hot Plug Event support */
|
#define OV5_HP_EVT 0x0604 /* Hot Plug Event support */
|
||||||
#define OV5_RESIZE_HPT 0x0601 /* Hash Page Table resizing */
|
#define OV5_RESIZE_HPT 0x0601 /* Hash Page Table resizing */
|
||||||
#define OV5_PFO_HW_RNG 0x1180 /* PFO Random Number Generator */
|
#define OV5_PFO_HW_RNG 0x1180 /* PFO Random Number Generator */
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ static inline int pcibus_to_node(struct pci_bus *bus)
|
|||||||
cpu_all_mask : \
|
cpu_all_mask : \
|
||||||
cpumask_of_node(pcibus_to_node(bus)))
|
cpumask_of_node(pcibus_to_node(bus)))
|
||||||
|
|
||||||
extern int cpu_distance(__be32 *cpu1_assoc, __be32 *cpu2_assoc);
|
int cpu_relative_distance(__be32 *cpu1_assoc, __be32 *cpu2_assoc);
|
||||||
extern int __node_distance(int, int);
|
extern int __node_distance(int, int);
|
||||||
#define node_distance(a, b) __node_distance(a, b)
|
#define node_distance(a, b) __node_distance(a, b)
|
||||||
|
|
||||||
@@ -64,6 +64,7 @@ static inline int early_cpu_to_node(int cpu)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int of_drconf_to_nid_single(struct drmem_lmb *lmb);
|
int of_drconf_to_nid_single(struct drmem_lmb *lmb);
|
||||||
|
void update_numa_distance(struct device_node *node);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@@ -83,7 +84,7 @@ static inline void sysfs_remove_device_from_node(struct device *dev,
|
|||||||
|
|
||||||
static inline void update_numa_cpu_lookup_table(unsigned int cpu, int node) {}
|
static inline void update_numa_cpu_lookup_table(unsigned int cpu, int node) {}
|
||||||
|
|
||||||
static inline int cpu_distance(__be32 *cpu1_assoc, __be32 *cpu2_assoc)
|
static inline int cpu_relative_distance(__be32 *cpu1_assoc, __be32 *cpu2_assoc)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -93,6 +94,7 @@ static inline int of_drconf_to_nid_single(struct drmem_lmb *lmb)
|
|||||||
return first_online_node;
|
return first_online_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void update_numa_distance(struct device_node *node) {}
|
||||||
#endif /* CONFIG_NUMA */
|
#endif /* CONFIG_NUMA */
|
||||||
|
|
||||||
#if defined(CONFIG_NUMA) && defined(CONFIG_PPC_SPLPAR)
|
#if defined(CONFIG_NUMA) && defined(CONFIG_PPC_SPLPAR)
|
||||||
|
|||||||
@@ -1069,7 +1069,8 @@ static const struct ibm_arch_vec ibm_architecture_vec_template __initconst = {
|
|||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
#endif
|
#endif
|
||||||
.associativity = OV5_FEAT(OV5_TYPE1_AFFINITY) | OV5_FEAT(OV5_PRRN),
|
.associativity = OV5_FEAT(OV5_FORM1_AFFINITY) | OV5_FEAT(OV5_PRRN) |
|
||||||
|
OV5_FEAT(OV5_FORM2_AFFINITY),
|
||||||
.bin_opts = OV5_FEAT(OV5_RESIZE_HPT) | OV5_FEAT(OV5_HP_EVT),
|
.bin_opts = OV5_FEAT(OV5_RESIZE_HPT) | OV5_FEAT(OV5_HP_EVT),
|
||||||
.micro_checkpoint = 0,
|
.micro_checkpoint = 0,
|
||||||
.reserved0 = 0,
|
.reserved0 = 0,
|
||||||
|
|||||||
@@ -399,7 +399,7 @@ static char *__fetch_rtas_last_error(char *altbuf)
|
|||||||
buf = kmalloc(RTAS_ERROR_LOG_MAX, GFP_ATOMIC);
|
buf = kmalloc(RTAS_ERROR_LOG_MAX, GFP_ATOMIC);
|
||||||
}
|
}
|
||||||
if (buf)
|
if (buf)
|
||||||
memcpy(buf, rtas_err_buf, RTAS_ERROR_LOG_MAX);
|
memmove(buf, rtas_err_buf, RTAS_ERROR_LOG_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
|
|||||||
@@ -1064,8 +1064,8 @@ void radix__ptep_set_access_flags(struct vm_area_struct *vma, pte_t *ptep,
|
|||||||
pte_t entry, unsigned long address, int psize)
|
pte_t entry, unsigned long address, int psize)
|
||||||
{
|
{
|
||||||
struct mm_struct *mm = vma->vm_mm;
|
struct mm_struct *mm = vma->vm_mm;
|
||||||
unsigned long set = pte_val(entry) & (_PAGE_DIRTY | _PAGE_ACCESSED |
|
unsigned long set = pte_val(entry) & (_PAGE_DIRTY | _PAGE_SOFT_DIRTY |
|
||||||
_PAGE_RW | _PAGE_EXEC);
|
_PAGE_ACCESSED | _PAGE_RW | _PAGE_EXEC);
|
||||||
|
|
||||||
unsigned long change = pte_val(entry) ^ pte_val(*ptep);
|
unsigned long change = pte_val(entry) ^ pte_val(*ptep);
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -51,14 +51,22 @@ EXPORT_SYMBOL(numa_cpu_lookup_table);
|
|||||||
EXPORT_SYMBOL(node_to_cpumask_map);
|
EXPORT_SYMBOL(node_to_cpumask_map);
|
||||||
EXPORT_SYMBOL(node_data);
|
EXPORT_SYMBOL(node_data);
|
||||||
|
|
||||||
static int min_common_depth;
|
static int primary_domain_index;
|
||||||
static int n_mem_addr_cells, n_mem_size_cells;
|
static int n_mem_addr_cells, n_mem_size_cells;
|
||||||
static int form1_affinity;
|
|
||||||
|
#define FORM0_AFFINITY 0
|
||||||
|
#define FORM1_AFFINITY 1
|
||||||
|
#define FORM2_AFFINITY 2
|
||||||
|
static int affinity_form;
|
||||||
|
|
||||||
#define MAX_DISTANCE_REF_POINTS 4
|
#define MAX_DISTANCE_REF_POINTS 4
|
||||||
static int distance_ref_points_depth;
|
static int distance_ref_points_depth;
|
||||||
static const __be32 *distance_ref_points;
|
static const __be32 *distance_ref_points;
|
||||||
static int distance_lookup_table[MAX_NUMNODES][MAX_DISTANCE_REF_POINTS];
|
static int distance_lookup_table[MAX_NUMNODES][MAX_DISTANCE_REF_POINTS];
|
||||||
|
static int numa_distance_table[MAX_NUMNODES][MAX_NUMNODES] = {
|
||||||
|
[0 ... MAX_NUMNODES - 1] = { [0 ... MAX_NUMNODES - 1] = -1 }
|
||||||
|
};
|
||||||
|
static int numa_id_index_table[MAX_NUMNODES] = { [0 ... MAX_NUMNODES - 1] = NUMA_NO_NODE };
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allocate node_to_cpumask_map based on number of available nodes
|
* Allocate node_to_cpumask_map based on number of available nodes
|
||||||
@@ -163,7 +171,55 @@ static void unmap_cpu_from_node(unsigned long cpu)
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_HOTPLUG_CPU || CONFIG_PPC_SPLPAR */
|
#endif /* CONFIG_HOTPLUG_CPU || CONFIG_PPC_SPLPAR */
|
||||||
|
|
||||||
int cpu_distance(__be32 *cpu1_assoc, __be32 *cpu2_assoc)
|
static int __associativity_to_nid(const __be32 *associativity,
|
||||||
|
int max_array_sz)
|
||||||
|
{
|
||||||
|
int nid;
|
||||||
|
/*
|
||||||
|
* primary_domain_index is 1 based array index.
|
||||||
|
*/
|
||||||
|
int index = primary_domain_index - 1;
|
||||||
|
|
||||||
|
if (!numa_enabled || index >= max_array_sz)
|
||||||
|
return NUMA_NO_NODE;
|
||||||
|
|
||||||
|
nid = of_read_number(&associativity[index], 1);
|
||||||
|
|
||||||
|
/* POWER4 LPAR uses 0xffff as invalid node */
|
||||||
|
if (nid == 0xffff || nid >= nr_node_ids)
|
||||||
|
nid = NUMA_NO_NODE;
|
||||||
|
return nid;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* Returns nid in the range [0..nr_node_ids], or -1 if no useful NUMA
|
||||||
|
* info is found.
|
||||||
|
*/
|
||||||
|
static int associativity_to_nid(const __be32 *associativity)
|
||||||
|
{
|
||||||
|
int array_sz = of_read_number(associativity, 1);
|
||||||
|
|
||||||
|
/* Skip the first element in the associativity array */
|
||||||
|
return __associativity_to_nid((associativity + 1), array_sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int __cpu_form2_relative_distance(__be32 *cpu1_assoc, __be32 *cpu2_assoc)
|
||||||
|
{
|
||||||
|
int dist;
|
||||||
|
int node1, node2;
|
||||||
|
|
||||||
|
node1 = associativity_to_nid(cpu1_assoc);
|
||||||
|
node2 = associativity_to_nid(cpu2_assoc);
|
||||||
|
|
||||||
|
dist = numa_distance_table[node1][node2];
|
||||||
|
if (dist <= LOCAL_DISTANCE)
|
||||||
|
return 0;
|
||||||
|
else if (dist <= REMOTE_DISTANCE)
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int __cpu_form1_relative_distance(__be32 *cpu1_assoc, __be32 *cpu2_assoc)
|
||||||
{
|
{
|
||||||
int dist = 0;
|
int dist = 0;
|
||||||
|
|
||||||
@@ -179,6 +235,15 @@ int cpu_distance(__be32 *cpu1_assoc, __be32 *cpu2_assoc)
|
|||||||
return dist;
|
return dist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int cpu_relative_distance(__be32 *cpu1_assoc, __be32 *cpu2_assoc)
|
||||||
|
{
|
||||||
|
/* We should not get called with FORM0 */
|
||||||
|
VM_WARN_ON(affinity_form == FORM0_AFFINITY);
|
||||||
|
if (affinity_form == FORM1_AFFINITY)
|
||||||
|
return __cpu_form1_relative_distance(cpu1_assoc, cpu2_assoc);
|
||||||
|
return __cpu_form2_relative_distance(cpu1_assoc, cpu2_assoc);
|
||||||
|
}
|
||||||
|
|
||||||
/* must hold reference to node during call */
|
/* must hold reference to node during call */
|
||||||
static const __be32 *of_get_associativity(struct device_node *dev)
|
static const __be32 *of_get_associativity(struct device_node *dev)
|
||||||
{
|
{
|
||||||
@@ -190,7 +255,9 @@ int __node_distance(int a, int b)
|
|||||||
int i;
|
int i;
|
||||||
int distance = LOCAL_DISTANCE;
|
int distance = LOCAL_DISTANCE;
|
||||||
|
|
||||||
if (!form1_affinity)
|
if (affinity_form == FORM2_AFFINITY)
|
||||||
|
return numa_distance_table[a][b];
|
||||||
|
else if (affinity_form == FORM0_AFFINITY)
|
||||||
return ((a == b) ? LOCAL_DISTANCE : REMOTE_DISTANCE);
|
return ((a == b) ? LOCAL_DISTANCE : REMOTE_DISTANCE);
|
||||||
|
|
||||||
for (i = 0; i < distance_ref_points_depth; i++) {
|
for (i = 0; i < distance_ref_points_depth; i++) {
|
||||||
@@ -205,52 +272,6 @@ int __node_distance(int a, int b)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(__node_distance);
|
EXPORT_SYMBOL(__node_distance);
|
||||||
|
|
||||||
static void initialize_distance_lookup_table(int nid,
|
|
||||||
const __be32 *associativity)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if (!form1_affinity)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (i = 0; i < distance_ref_points_depth; i++) {
|
|
||||||
const __be32 *entry;
|
|
||||||
|
|
||||||
entry = &associativity[be32_to_cpu(distance_ref_points[i]) - 1];
|
|
||||||
distance_lookup_table[nid][i] = of_read_number(entry, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns nid in the range [0..nr_node_ids], or -1 if no useful NUMA
|
|
||||||
* info is found.
|
|
||||||
*/
|
|
||||||
static int associativity_to_nid(const __be32 *associativity)
|
|
||||||
{
|
|
||||||
int nid = NUMA_NO_NODE;
|
|
||||||
|
|
||||||
if (!numa_enabled)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
if (of_read_number(associativity, 1) >= min_common_depth)
|
|
||||||
nid = of_read_number(&associativity[min_common_depth], 1);
|
|
||||||
|
|
||||||
/* POWER4 LPAR uses 0xffff as invalid node */
|
|
||||||
if (nid == 0xffff || nid >= nr_node_ids)
|
|
||||||
nid = NUMA_NO_NODE;
|
|
||||||
|
|
||||||
if (nid > 0 &&
|
|
||||||
of_read_number(associativity, 1) >= distance_ref_points_depth) {
|
|
||||||
/*
|
|
||||||
* Skip the length field and send start of associativity array
|
|
||||||
*/
|
|
||||||
initialize_distance_lookup_table(nid, associativity + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
|
||||||
return nid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Returns the nid associated with the given device tree node,
|
/* Returns the nid associated with the given device tree node,
|
||||||
* or -1 if not found.
|
* or -1 if not found.
|
||||||
*/
|
*/
|
||||||
@@ -284,10 +305,159 @@ int of_node_to_nid(struct device_node *device)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(of_node_to_nid);
|
EXPORT_SYMBOL(of_node_to_nid);
|
||||||
|
|
||||||
static int __init find_min_common_depth(void)
|
static void __initialize_form1_numa_distance(const __be32 *associativity,
|
||||||
|
int max_array_sz)
|
||||||
{
|
{
|
||||||
int depth;
|
int i, nid;
|
||||||
|
|
||||||
|
if (affinity_form != FORM1_AFFINITY)
|
||||||
|
return;
|
||||||
|
|
||||||
|
nid = __associativity_to_nid(associativity, max_array_sz);
|
||||||
|
if (nid != NUMA_NO_NODE) {
|
||||||
|
for (i = 0; i < distance_ref_points_depth; i++) {
|
||||||
|
const __be32 *entry;
|
||||||
|
int index = be32_to_cpu(distance_ref_points[i]) - 1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* broken hierarchy, return with broken distance table
|
||||||
|
*/
|
||||||
|
if (WARN(index >= max_array_sz, "Broken ibm,associativity property"))
|
||||||
|
return;
|
||||||
|
|
||||||
|
entry = &associativity[index];
|
||||||
|
distance_lookup_table[nid][i] = of_read_number(entry, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void initialize_form1_numa_distance(const __be32 *associativity)
|
||||||
|
{
|
||||||
|
int array_sz;
|
||||||
|
|
||||||
|
array_sz = of_read_number(associativity, 1);
|
||||||
|
/* Skip the first element in the associativity array */
|
||||||
|
__initialize_form1_numa_distance(associativity + 1, array_sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Used to update distance information w.r.t newly added node.
|
||||||
|
*/
|
||||||
|
void update_numa_distance(struct device_node *node)
|
||||||
|
{
|
||||||
|
int nid;
|
||||||
|
|
||||||
|
if (affinity_form == FORM0_AFFINITY)
|
||||||
|
return;
|
||||||
|
else if (affinity_form == FORM1_AFFINITY) {
|
||||||
|
const __be32 *associativity;
|
||||||
|
|
||||||
|
associativity = of_get_associativity(node);
|
||||||
|
if (!associativity)
|
||||||
|
return;
|
||||||
|
|
||||||
|
initialize_form1_numa_distance(associativity);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FORM2 affinity */
|
||||||
|
nid = of_node_to_nid_single(node);
|
||||||
|
if (nid == NUMA_NO_NODE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* With FORM2 we expect NUMA distance of all possible NUMA
|
||||||
|
* nodes to be provided during boot.
|
||||||
|
*/
|
||||||
|
WARN(numa_distance_table[nid][nid] == -1,
|
||||||
|
"NUMA distance details for node %d not provided\n", nid);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(update_numa_distance);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ibm,numa-lookup-index-table= {N, domainid1, domainid2, ..... domainidN}
|
||||||
|
* ibm,numa-distance-table = { N, 1, 2, 4, 5, 1, 6, .... N elements}
|
||||||
|
*/
|
||||||
|
static void initialize_form2_numa_distance_lookup_table(void)
|
||||||
|
{
|
||||||
|
int i, j;
|
||||||
struct device_node *root;
|
struct device_node *root;
|
||||||
|
const __u8 *numa_dist_table;
|
||||||
|
const __be32 *numa_lookup_index;
|
||||||
|
int numa_dist_table_length;
|
||||||
|
int max_numa_index, distance_index;
|
||||||
|
|
||||||
|
if (firmware_has_feature(FW_FEATURE_OPAL))
|
||||||
|
root = of_find_node_by_path("/ibm,opal");
|
||||||
|
else
|
||||||
|
root = of_find_node_by_path("/rtas");
|
||||||
|
if (!root)
|
||||||
|
root = of_find_node_by_path("/");
|
||||||
|
|
||||||
|
numa_lookup_index = of_get_property(root, "ibm,numa-lookup-index-table", NULL);
|
||||||
|
max_numa_index = of_read_number(&numa_lookup_index[0], 1);
|
||||||
|
|
||||||
|
/* first element of the array is the size and is encode-int */
|
||||||
|
numa_dist_table = of_get_property(root, "ibm,numa-distance-table", NULL);
|
||||||
|
numa_dist_table_length = of_read_number((const __be32 *)&numa_dist_table[0], 1);
|
||||||
|
/* Skip the size which is encoded int */
|
||||||
|
numa_dist_table += sizeof(__be32);
|
||||||
|
|
||||||
|
pr_debug("numa_dist_table_len = %d, numa_dist_indexes_len = %d\n",
|
||||||
|
numa_dist_table_length, max_numa_index);
|
||||||
|
|
||||||
|
for (i = 0; i < max_numa_index; i++)
|
||||||
|
/* +1 skip the max_numa_index in the property */
|
||||||
|
numa_id_index_table[i] = of_read_number(&numa_lookup_index[i + 1], 1);
|
||||||
|
|
||||||
|
|
||||||
|
if (numa_dist_table_length != max_numa_index * max_numa_index) {
|
||||||
|
WARN(1, "Wrong NUMA distance information\n");
|
||||||
|
/* consider everybody else just remote. */
|
||||||
|
for (i = 0; i < max_numa_index; i++) {
|
||||||
|
for (j = 0; j < max_numa_index; j++) {
|
||||||
|
int nodeA = numa_id_index_table[i];
|
||||||
|
int nodeB = numa_id_index_table[j];
|
||||||
|
|
||||||
|
if (nodeA == nodeB)
|
||||||
|
numa_distance_table[nodeA][nodeB] = LOCAL_DISTANCE;
|
||||||
|
else
|
||||||
|
numa_distance_table[nodeA][nodeB] = REMOTE_DISTANCE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
distance_index = 0;
|
||||||
|
for (i = 0; i < max_numa_index; i++) {
|
||||||
|
for (j = 0; j < max_numa_index; j++) {
|
||||||
|
int nodeA = numa_id_index_table[i];
|
||||||
|
int nodeB = numa_id_index_table[j];
|
||||||
|
|
||||||
|
numa_distance_table[nodeA][nodeB] = numa_dist_table[distance_index++];
|
||||||
|
pr_debug("dist[%d][%d]=%d ", nodeA, nodeB, numa_distance_table[nodeA][nodeB]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
of_node_put(root);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int __init find_primary_domain_index(void)
|
||||||
|
{
|
||||||
|
int index;
|
||||||
|
struct device_node *root;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check for which form of affinity.
|
||||||
|
*/
|
||||||
|
if (firmware_has_feature(FW_FEATURE_OPAL)) {
|
||||||
|
affinity_form = FORM1_AFFINITY;
|
||||||
|
} else if (firmware_has_feature(FW_FEATURE_FORM2_AFFINITY)) {
|
||||||
|
dbg("Using form 2 affinity\n");
|
||||||
|
affinity_form = FORM2_AFFINITY;
|
||||||
|
} else if (firmware_has_feature(FW_FEATURE_FORM1_AFFINITY)) {
|
||||||
|
dbg("Using form 1 affinity\n");
|
||||||
|
affinity_form = FORM1_AFFINITY;
|
||||||
|
} else
|
||||||
|
affinity_form = FORM0_AFFINITY;
|
||||||
|
|
||||||
if (firmware_has_feature(FW_FEATURE_OPAL))
|
if (firmware_has_feature(FW_FEATURE_OPAL))
|
||||||
root = of_find_node_by_path("/ibm,opal");
|
root = of_find_node_by_path("/ibm,opal");
|
||||||
@@ -318,25 +488,21 @@ static int __init find_min_common_depth(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
distance_ref_points_depth /= sizeof(int);
|
distance_ref_points_depth /= sizeof(int);
|
||||||
|
if (affinity_form == FORM0_AFFINITY) {
|
||||||
if (firmware_has_feature(FW_FEATURE_OPAL) ||
|
|
||||||
firmware_has_feature(FW_FEATURE_TYPE1_AFFINITY)) {
|
|
||||||
dbg("Using form 1 affinity\n");
|
|
||||||
form1_affinity = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (form1_affinity) {
|
|
||||||
depth = of_read_number(distance_ref_points, 1);
|
|
||||||
} else {
|
|
||||||
if (distance_ref_points_depth < 2) {
|
if (distance_ref_points_depth < 2) {
|
||||||
printk(KERN_WARNING "NUMA: "
|
printk(KERN_WARNING "NUMA: "
|
||||||
"short ibm,associativity-reference-points\n");
|
"short ibm,associativity-reference-points\n");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
depth = of_read_number(&distance_ref_points[1], 1);
|
index = of_read_number(&distance_ref_points[1], 1);
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* Both FORM1 and FORM2 affinity find the primary domain details
|
||||||
|
* at the same offset.
|
||||||
|
*/
|
||||||
|
index = of_read_number(distance_ref_points, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Warn and cap if the hardware supports more than
|
* Warn and cap if the hardware supports more than
|
||||||
* MAX_DISTANCE_REF_POINTS domains.
|
* MAX_DISTANCE_REF_POINTS domains.
|
||||||
@@ -348,7 +514,7 @@ static int __init find_min_common_depth(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
of_node_put(root);
|
of_node_put(root);
|
||||||
return depth;
|
return index;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
of_node_put(root);
|
of_node_put(root);
|
||||||
@@ -426,6 +592,38 @@ static int of_get_assoc_arrays(struct assoc_arrays *aa)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int get_nid_and_numa_distance(struct drmem_lmb *lmb)
|
||||||
|
{
|
||||||
|
struct assoc_arrays aa = { .arrays = NULL };
|
||||||
|
int default_nid = NUMA_NO_NODE;
|
||||||
|
int nid = default_nid;
|
||||||
|
int rc, index;
|
||||||
|
|
||||||
|
if ((primary_domain_index < 0) || !numa_enabled)
|
||||||
|
return default_nid;
|
||||||
|
|
||||||
|
rc = of_get_assoc_arrays(&aa);
|
||||||
|
if (rc)
|
||||||
|
return default_nid;
|
||||||
|
|
||||||
|
if (primary_domain_index <= aa.array_sz &&
|
||||||
|
!(lmb->flags & DRCONF_MEM_AI_INVALID) && lmb->aa_index < aa.n_arrays) {
|
||||||
|
const __be32 *associativity;
|
||||||
|
|
||||||
|
index = lmb->aa_index * aa.array_sz;
|
||||||
|
associativity = &aa.arrays[index];
|
||||||
|
nid = __associativity_to_nid(associativity, aa.array_sz);
|
||||||
|
if (nid > 0 && affinity_form == FORM1_AFFINITY) {
|
||||||
|
/*
|
||||||
|
* lookup array associativity entries have
|
||||||
|
* no length of the array as the first element.
|
||||||
|
*/
|
||||||
|
__initialize_form1_numa_distance(associativity, aa.array_sz);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nid;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is like of_node_to_nid_single() for memory represented in the
|
* This is like of_node_to_nid_single() for memory represented in the
|
||||||
* ibm,dynamic-reconfiguration-memory node.
|
* ibm,dynamic-reconfiguration-memory node.
|
||||||
@@ -437,35 +635,28 @@ int of_drconf_to_nid_single(struct drmem_lmb *lmb)
|
|||||||
int nid = default_nid;
|
int nid = default_nid;
|
||||||
int rc, index;
|
int rc, index;
|
||||||
|
|
||||||
if ((min_common_depth < 0) || !numa_enabled)
|
if ((primary_domain_index < 0) || !numa_enabled)
|
||||||
return default_nid;
|
return default_nid;
|
||||||
|
|
||||||
rc = of_get_assoc_arrays(&aa);
|
rc = of_get_assoc_arrays(&aa);
|
||||||
if (rc)
|
if (rc)
|
||||||
return default_nid;
|
return default_nid;
|
||||||
|
|
||||||
if (min_common_depth <= aa.array_sz &&
|
if (primary_domain_index <= aa.array_sz &&
|
||||||
!(lmb->flags & DRCONF_MEM_AI_INVALID) && lmb->aa_index < aa.n_arrays) {
|
!(lmb->flags & DRCONF_MEM_AI_INVALID) && lmb->aa_index < aa.n_arrays) {
|
||||||
index = lmb->aa_index * aa.array_sz + min_common_depth - 1;
|
const __be32 *associativity;
|
||||||
nid = of_read_number(&aa.arrays[index], 1);
|
|
||||||
|
|
||||||
if (nid == 0xffff || nid >= nr_node_ids)
|
index = lmb->aa_index * aa.array_sz;
|
||||||
nid = default_nid;
|
associativity = &aa.arrays[index];
|
||||||
|
nid = __associativity_to_nid(associativity, aa.array_sz);
|
||||||
if (nid > 0) {
|
|
||||||
index = lmb->aa_index * aa.array_sz;
|
|
||||||
initialize_distance_lookup_table(nid,
|
|
||||||
&aa.arrays[index]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nid;
|
return nid;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PPC_SPLPAR
|
#ifdef CONFIG_PPC_SPLPAR
|
||||||
static int vphn_get_nid(long lcpu)
|
|
||||||
|
static int __vphn_get_associativity(long lcpu, __be32 *associativity)
|
||||||
{
|
{
|
||||||
__be32 associativity[VPHN_ASSOC_BUFSIZE] = {0};
|
|
||||||
long rc, hwid;
|
long rc, hwid;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -485,12 +676,30 @@ static int vphn_get_nid(long lcpu)
|
|||||||
|
|
||||||
rc = hcall_vphn(hwid, VPHN_FLAG_VCPU, associativity);
|
rc = hcall_vphn(hwid, VPHN_FLAG_VCPU, associativity);
|
||||||
if (rc == H_SUCCESS)
|
if (rc == H_SUCCESS)
|
||||||
return associativity_to_nid(associativity);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int vphn_get_nid(long lcpu)
|
||||||
|
{
|
||||||
|
__be32 associativity[VPHN_ASSOC_BUFSIZE] = {0};
|
||||||
|
|
||||||
|
|
||||||
|
if (!__vphn_get_associativity(lcpu, associativity))
|
||||||
|
return associativity_to_nid(associativity);
|
||||||
|
|
||||||
return NUMA_NO_NODE;
|
return NUMA_NO_NODE;
|
||||||
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
static int __vphn_get_associativity(long lcpu, __be32 *associativity)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
static int vphn_get_nid(long unused)
|
static int vphn_get_nid(long unused)
|
||||||
{
|
{
|
||||||
return NUMA_NO_NODE;
|
return NUMA_NO_NODE;
|
||||||
@@ -685,7 +894,7 @@ static int __init numa_setup_drmem_lmb(struct drmem_lmb *lmb,
|
|||||||
size = read_n_cells(n_mem_size_cells, usm);
|
size = read_n_cells(n_mem_size_cells, usm);
|
||||||
}
|
}
|
||||||
|
|
||||||
nid = of_drconf_to_nid_single(lmb);
|
nid = get_nid_and_numa_distance(lmb);
|
||||||
fake_numa_create_new_node(((base + size) >> PAGE_SHIFT),
|
fake_numa_create_new_node(((base + size) >> PAGE_SHIFT),
|
||||||
&nid);
|
&nid);
|
||||||
node_set_online(nid);
|
node_set_online(nid);
|
||||||
@@ -702,24 +911,31 @@ static int __init parse_numa_properties(void)
|
|||||||
struct device_node *memory;
|
struct device_node *memory;
|
||||||
int default_nid = 0;
|
int default_nid = 0;
|
||||||
unsigned long i;
|
unsigned long i;
|
||||||
|
const __be32 *associativity;
|
||||||
|
|
||||||
if (numa_enabled == 0) {
|
if (numa_enabled == 0) {
|
||||||
printk(KERN_WARNING "NUMA disabled by user\n");
|
printk(KERN_WARNING "NUMA disabled by user\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
min_common_depth = find_min_common_depth();
|
primary_domain_index = find_primary_domain_index();
|
||||||
|
|
||||||
if (min_common_depth < 0) {
|
if (primary_domain_index < 0) {
|
||||||
/*
|
/*
|
||||||
* if we fail to parse min_common_depth from device tree
|
* if we fail to parse primary_domain_index from device tree
|
||||||
* mark the numa disabled, boot with numa disabled.
|
* mark the numa disabled, boot with numa disabled.
|
||||||
*/
|
*/
|
||||||
numa_enabled = false;
|
numa_enabled = false;
|
||||||
return min_common_depth;
|
return primary_domain_index;
|
||||||
}
|
}
|
||||||
|
|
||||||
dbg("NUMA associativity depth for CPU/Memory: %d\n", min_common_depth);
|
dbg("NUMA associativity depth for CPU/Memory: %d\n", primary_domain_index);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If it is FORM2 initialize the distance table here.
|
||||||
|
*/
|
||||||
|
if (affinity_form == FORM2_AFFINITY)
|
||||||
|
initialize_form2_numa_distance_lookup_table();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Even though we connect cpus to numa domains later in SMP
|
* Even though we connect cpus to numa domains later in SMP
|
||||||
@@ -727,18 +943,30 @@ static int __init parse_numa_properties(void)
|
|||||||
* each node to be onlined must have NODE_DATA etc backing it.
|
* each node to be onlined must have NODE_DATA etc backing it.
|
||||||
*/
|
*/
|
||||||
for_each_present_cpu(i) {
|
for_each_present_cpu(i) {
|
||||||
|
__be32 vphn_assoc[VPHN_ASSOC_BUFSIZE];
|
||||||
struct device_node *cpu;
|
struct device_node *cpu;
|
||||||
int nid = vphn_get_nid(i);
|
int nid = NUMA_NO_NODE;
|
||||||
|
|
||||||
/*
|
memset(vphn_assoc, 0, VPHN_ASSOC_BUFSIZE * sizeof(__be32));
|
||||||
* Don't fall back to default_nid yet -- we will plug
|
|
||||||
* cpus into nodes once the memory scan has discovered
|
if (__vphn_get_associativity(i, vphn_assoc) == 0) {
|
||||||
* the topology.
|
nid = associativity_to_nid(vphn_assoc);
|
||||||
*/
|
initialize_form1_numa_distance(vphn_assoc);
|
||||||
if (nid == NUMA_NO_NODE) {
|
} else {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Don't fall back to default_nid yet -- we will plug
|
||||||
|
* cpus into nodes once the memory scan has discovered
|
||||||
|
* the topology.
|
||||||
|
*/
|
||||||
cpu = of_get_cpu_node(i, NULL);
|
cpu = of_get_cpu_node(i, NULL);
|
||||||
BUG_ON(!cpu);
|
BUG_ON(!cpu);
|
||||||
nid = of_node_to_nid_single(cpu);
|
|
||||||
|
associativity = of_get_associativity(cpu);
|
||||||
|
if (associativity) {
|
||||||
|
nid = associativity_to_nid(associativity);
|
||||||
|
initialize_form1_numa_distance(associativity);
|
||||||
|
}
|
||||||
of_node_put(cpu);
|
of_node_put(cpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -776,8 +1004,11 @@ new_range:
|
|||||||
* have associativity properties. If none, then
|
* have associativity properties. If none, then
|
||||||
* everything goes to default_nid.
|
* everything goes to default_nid.
|
||||||
*/
|
*/
|
||||||
nid = of_node_to_nid_single(memory);
|
associativity = of_get_associativity(memory);
|
||||||
if (nid < 0)
|
if (associativity) {
|
||||||
|
nid = associativity_to_nid(associativity);
|
||||||
|
initialize_form1_numa_distance(associativity);
|
||||||
|
} else
|
||||||
nid = default_nid;
|
nid = default_nid;
|
||||||
|
|
||||||
fake_numa_create_new_node(((start + size) >> PAGE_SHIFT), &nid);
|
fake_numa_create_new_node(((start + size) >> PAGE_SHIFT), &nid);
|
||||||
@@ -926,7 +1157,7 @@ static void __init find_possible_nodes(void)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
max_nodes = of_read_number(&domains[min_common_depth], 1);
|
max_nodes = of_read_number(&domains[primary_domain_index], 1);
|
||||||
pr_info("Partition configured for %d NUMA nodes.\n", max_nodes);
|
pr_info("Partition configured for %d NUMA nodes.\n", max_nodes);
|
||||||
|
|
||||||
for (i = 0; i < max_nodes; i++) {
|
for (i = 0; i < max_nodes; i++) {
|
||||||
@@ -935,7 +1166,7 @@ static void __init find_possible_nodes(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
prop_length /= sizeof(int);
|
prop_length /= sizeof(int);
|
||||||
if (prop_length > min_common_depth + 2)
|
if (prop_length > primary_domain_index + 2)
|
||||||
coregroup_enabled = 1;
|
coregroup_enabled = 1;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
@@ -1268,7 +1499,7 @@ int cpu_to_coregroup_id(int cpu)
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
index = of_read_number(associativity, 1);
|
index = of_read_number(associativity, 1);
|
||||||
if (index > min_common_depth + 1)
|
if (index > primary_domain_index + 1)
|
||||||
return of_read_number(&associativity[index - 1], 1);
|
return of_read_number(&associativity[index - 1], 1);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
|||||||
@@ -984,7 +984,7 @@ static void mpc5121_clk_provide_migration_support(void)
|
|||||||
|
|
||||||
#define NODE_PREP do { \
|
#define NODE_PREP do { \
|
||||||
of_address_to_resource(np, 0, &res); \
|
of_address_to_resource(np, 0, &res); \
|
||||||
snprintf(devname, sizeof(devname), "%08x.%s", res.start, np->name); \
|
snprintf(devname, sizeof(devname), "%pa.%s", &res.start, np->name); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define NODE_CHK(clkname, clkitem, regnode, regflag) do { \
|
#define NODE_CHK(clkname, clkitem, regnode, regflag) do { \
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ static struct irq_domain * __init flipper_pic_init(struct device_node *np)
|
|||||||
}
|
}
|
||||||
io_base = ioremap(res.start, resource_size(&res));
|
io_base = ioremap(res.start, resource_size(&res));
|
||||||
|
|
||||||
pr_info("controller at 0x%08x mapped to 0x%p\n", res.start, io_base);
|
pr_info("controller at 0x%pa mapped to 0x%p\n", &res.start, io_base);
|
||||||
|
|
||||||
__flipper_quiesce(io_base);
|
__flipper_quiesce(io_base);
|
||||||
|
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ static struct irq_domain *hlwd_pic_init(struct device_node *np)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_info("controller at 0x%08x mapped to 0x%p\n", res.start, io_base);
|
pr_info("controller at 0x%pa mapped to 0x%p\n", &res.start, io_base);
|
||||||
|
|
||||||
__hlwd_quiesce(io_base);
|
__hlwd_quiesce(io_base);
|
||||||
|
|
||||||
|
|||||||
@@ -89,8 +89,8 @@ static void __iomem *wii_ioremap_hw_regs(char *name, char *compatible)
|
|||||||
|
|
||||||
hw_regs = ioremap(res.start, resource_size(&res));
|
hw_regs = ioremap(res.start, resource_size(&res));
|
||||||
if (hw_regs) {
|
if (hw_regs) {
|
||||||
pr_info("%s at 0x%08x mapped to 0x%p\n", name,
|
pr_info("%s at 0x%pa mapped to 0x%p\n", name,
|
||||||
res.start, hw_regs);
|
&res.start, hw_regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
out_put:
|
out_put:
|
||||||
|
|||||||
@@ -119,10 +119,11 @@ struct vec5_fw_feature {
|
|||||||
|
|
||||||
static __initdata struct vec5_fw_feature
|
static __initdata struct vec5_fw_feature
|
||||||
vec5_fw_features_table[] = {
|
vec5_fw_features_table[] = {
|
||||||
{FW_FEATURE_TYPE1_AFFINITY, OV5_TYPE1_AFFINITY},
|
{FW_FEATURE_FORM1_AFFINITY, OV5_FORM1_AFFINITY},
|
||||||
{FW_FEATURE_PRRN, OV5_PRRN},
|
{FW_FEATURE_PRRN, OV5_PRRN},
|
||||||
{FW_FEATURE_DRMEM_V2, OV5_DRMEM_V2},
|
{FW_FEATURE_DRMEM_V2, OV5_DRMEM_V2},
|
||||||
{FW_FEATURE_DRC_INFO, OV5_DRC_INFO},
|
{FW_FEATURE_DRC_INFO, OV5_DRC_INFO},
|
||||||
|
{FW_FEATURE_FORM2_AFFINITY, OV5_FORM2_AFFINITY},
|
||||||
};
|
};
|
||||||
|
|
||||||
static void __init fw_vec5_feature_init(const char *vec5, unsigned long len)
|
static void __init fw_vec5_feature_init(const char *vec5, unsigned long len)
|
||||||
|
|||||||
@@ -484,6 +484,8 @@ static ssize_t dlpar_cpu_add(u32 drc_index)
|
|||||||
return saved_rc;
|
return saved_rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_numa_distance(dn);
|
||||||
|
|
||||||
rc = dlpar_online_cpu(dn);
|
rc = dlpar_online_cpu(dn);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
saved_rc = rc;
|
saved_rc = rc;
|
||||||
|
|||||||
@@ -180,6 +180,8 @@ static int update_lmb_associativity_index(struct drmem_lmb *lmb)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_numa_distance(lmb_node);
|
||||||
|
|
||||||
dr_node = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory");
|
dr_node = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory");
|
||||||
if (!dr_node) {
|
if (!dr_node) {
|
||||||
dlpar_free_cc_nodes(lmb_node);
|
dlpar_free_cc_nodes(lmb_node);
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ static int cpu_relative_dispatch_distance(int last_disp_cpu, int cur_disp_cpu)
|
|||||||
if (!last_disp_cpu_assoc || !cur_disp_cpu_assoc)
|
if (!last_disp_cpu_assoc || !cur_disp_cpu_assoc)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
return cpu_distance(last_disp_cpu_assoc, cur_disp_cpu_assoc);
|
return cpu_relative_distance(last_disp_cpu_assoc, cur_disp_cpu_assoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cpu_home_node_dispatch_distance(int disp_cpu)
|
static int cpu_home_node_dispatch_distance(int disp_cpu)
|
||||||
@@ -281,7 +281,7 @@ static int cpu_home_node_dispatch_distance(int disp_cpu)
|
|||||||
if (!disp_cpu_assoc || !vcpu_assoc)
|
if (!disp_cpu_assoc || !vcpu_assoc)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
return cpu_distance(disp_cpu_assoc, vcpu_assoc);
|
return cpu_relative_distance(disp_cpu_assoc, vcpu_assoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void update_vcpu_disp_stat(int disp_cpu)
|
static void update_vcpu_disp_stat(int disp_cpu)
|
||||||
|
|||||||
@@ -1079,6 +1079,13 @@ static int papr_scm_probe(struct platform_device *pdev)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* open firmware platform device create won't update the NUMA
|
||||||
|
* distance table. For PAPR SCM devices we use numa_map_to_online_node()
|
||||||
|
* to find the nearest online NUMA node and that requires correct
|
||||||
|
* distance table information.
|
||||||
|
*/
|
||||||
|
update_numa_distance(dn);
|
||||||
|
|
||||||
p = kzalloc(sizeof(*p), GFP_KERNEL);
|
p = kzalloc(sizeof(*p), GFP_KERNEL);
|
||||||
if (!p)
|
if (!p)
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ KASAN_SANITIZE := n
|
|||||||
|
|
||||||
targets += trampoline_$(BITS).o purgatory.ro kexec-purgatory.c
|
targets += trampoline_$(BITS).o purgatory.ro kexec-purgatory.c
|
||||||
|
|
||||||
|
# When profile-guided optimization is enabled, llvm emits two different
|
||||||
|
# overlapping text sections, which is not supported by kexec. Remove profile
|
||||||
|
# optimization flags.
|
||||||
|
KBUILD_CFLAGS := $(filter-out -fprofile-sample-use=% -fprofile-use=%,$(KBUILD_CFLAGS))
|
||||||
|
|
||||||
LDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined
|
LDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined
|
||||||
|
|
||||||
$(obj)/purgatory.ro: $(obj)/trampoline_$(BITS).o FORCE
|
$(obj)/purgatory.ro: $(obj)/trampoline_$(BITS).o FORCE
|
||||||
|
|||||||
@@ -216,9 +216,8 @@ int __init tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary)
|
|||||||
|
|
||||||
(hose)->ops = &tsi108_direct_pci_ops;
|
(hose)->ops = &tsi108_direct_pci_ops;
|
||||||
|
|
||||||
printk(KERN_INFO "Found tsi108 PCI host bridge at 0x%08x. "
|
pr_info("Found tsi108 PCI host bridge at 0x%pa. Firmware bus number: %d->%d\n",
|
||||||
"Firmware bus number: %d->%d\n",
|
&rsrc.start, hose->first_busno, hose->last_busno);
|
||||||
rsrc.start, hose->first_busno, hose->last_busno);
|
|
||||||
|
|
||||||
/* Interpret the "ranges" property */
|
/* Interpret the "ranges" property */
|
||||||
/* This also maps the I/O region and sets isa_io/mem_base */
|
/* This also maps the I/O region and sets isa_io/mem_base */
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ config RISCV
|
|||||||
select ARCH_HAS_GIGANTIC_PAGE
|
select ARCH_HAS_GIGANTIC_PAGE
|
||||||
select ARCH_HAS_KCOV
|
select ARCH_HAS_KCOV
|
||||||
select ARCH_HAS_MMIOWB
|
select ARCH_HAS_MMIOWB
|
||||||
|
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
|
||||||
select ARCH_HAS_PTE_SPECIAL
|
select ARCH_HAS_PTE_SPECIAL
|
||||||
select ARCH_HAS_SET_DIRECT_MAP
|
select ARCH_HAS_SET_DIRECT_MAP
|
||||||
select ARCH_HAS_SET_MEMORY
|
select ARCH_HAS_SET_MEMORY
|
||||||
@@ -331,6 +332,28 @@ config RISCV_BASE_PMU
|
|||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
config TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
|
||||||
|
def_bool y
|
||||||
|
# https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=aed44286efa8ae8717a77d94b51ac3614e2ca6dc
|
||||||
|
depends on AS_IS_GNU && AS_VERSION >= 23800
|
||||||
|
help
|
||||||
|
Newer binutils versions default to ISA spec version 20191213 which
|
||||||
|
moves some instructions from the I extension to the Zicsr and Zifencei
|
||||||
|
extensions.
|
||||||
|
|
||||||
|
config TOOLCHAIN_NEEDS_OLD_ISA_SPEC
|
||||||
|
def_bool y
|
||||||
|
depends on TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
|
||||||
|
# https://github.com/llvm/llvm-project/commit/22e199e6afb1263c943c0c0d4498694e15bf8a16
|
||||||
|
depends on CC_IS_CLANG && CLANG_VERSION < 170000
|
||||||
|
help
|
||||||
|
Certain versions of clang do not support zicsr and zifencei via -march
|
||||||
|
but newer versions of binutils require it for the reasons noted in the
|
||||||
|
help text of CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI. This
|
||||||
|
option causes an older ISA spec compatible with these older versions
|
||||||
|
of clang to be passed to GAS, which has the same result as passing zicsr
|
||||||
|
and zifencei to -march.
|
||||||
|
|
||||||
config FPU
|
config FPU
|
||||||
bool "FPU support"
|
bool "FPU support"
|
||||||
default y
|
default y
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ ifeq ($(CONFIG_LD_IS_LLD),y)
|
|||||||
ifeq ($(shell test $(CONFIG_LLD_VERSION) -lt 150000; echo $$?),0)
|
ifeq ($(shell test $(CONFIG_LLD_VERSION) -lt 150000; echo $$?),0)
|
||||||
KBUILD_CFLAGS += -mno-relax
|
KBUILD_CFLAGS += -mno-relax
|
||||||
KBUILD_AFLAGS += -mno-relax
|
KBUILD_AFLAGS += -mno-relax
|
||||||
ifneq ($(LLVM_IAS),1)
|
ifndef CONFIG_AS_IS_LLVM
|
||||||
KBUILD_CFLAGS += -Wa,-mno-relax
|
KBUILD_CFLAGS += -Wa,-mno-relax
|
||||||
KBUILD_AFLAGS += -Wa,-mno-relax
|
KBUILD_AFLAGS += -Wa,-mno-relax
|
||||||
endif
|
endif
|
||||||
@@ -53,10 +53,12 @@ riscv-march-$(CONFIG_ARCH_RV64I) := rv64ima
|
|||||||
riscv-march-$(CONFIG_FPU) := $(riscv-march-y)fd
|
riscv-march-$(CONFIG_FPU) := $(riscv-march-y)fd
|
||||||
riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c
|
riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c
|
||||||
|
|
||||||
# Newer binutils versions default to ISA spec version 20191213 which moves some
|
ifdef CONFIG_TOOLCHAIN_NEEDS_OLD_ISA_SPEC
|
||||||
# instructions from the I extension to the Zicsr and Zifencei extensions.
|
KBUILD_CFLAGS += -Wa,-misa-spec=2.2
|
||||||
toolchain-need-zicsr-zifencei := $(call cc-option-yn, -march=$(riscv-march-y)_zicsr_zifencei)
|
KBUILD_AFLAGS += -Wa,-misa-spec=2.2
|
||||||
riscv-march-$(toolchain-need-zicsr-zifencei) := $(riscv-march-y)_zicsr_zifencei
|
else
|
||||||
|
riscv-march-$(CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI) := $(riscv-march-y)_zicsr_zifencei
|
||||||
|
endif
|
||||||
|
|
||||||
KBUILD_CFLAGS += -march=$(subst fd,,$(riscv-march-y))
|
KBUILD_CFLAGS += -march=$(subst fd,,$(riscv-march-y))
|
||||||
KBUILD_AFLAGS += -march=$(riscv-march-y)
|
KBUILD_AFLAGS += -march=$(riscv-march-y)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
#include <asm/vdso.h>
|
#include <asm/vdso.h>
|
||||||
#include <asm/switch_to.h>
|
#include <asm/switch_to.h>
|
||||||
#include <asm/csr.h>
|
#include <asm/csr.h>
|
||||||
|
#include <asm/cacheflush.h>
|
||||||
|
|
||||||
extern u32 __user_rt_sigreturn[2];
|
extern u32 __user_rt_sigreturn[2];
|
||||||
|
|
||||||
@@ -178,6 +179,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
|
|||||||
{
|
{
|
||||||
struct rt_sigframe __user *frame;
|
struct rt_sigframe __user *frame;
|
||||||
long err = 0;
|
long err = 0;
|
||||||
|
unsigned long __maybe_unused addr;
|
||||||
|
|
||||||
frame = get_sigframe(ksig, regs, sizeof(*frame));
|
frame = get_sigframe(ksig, regs, sizeof(*frame));
|
||||||
if (!access_ok(frame, sizeof(*frame)))
|
if (!access_ok(frame, sizeof(*frame)))
|
||||||
@@ -206,7 +208,12 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
|
|||||||
if (copy_to_user(&frame->sigreturn_code, __user_rt_sigreturn,
|
if (copy_to_user(&frame->sigreturn_code, __user_rt_sigreturn,
|
||||||
sizeof(frame->sigreturn_code)))
|
sizeof(frame->sigreturn_code)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
regs->ra = (unsigned long)&frame->sigreturn_code;
|
|
||||||
|
addr = (unsigned long)&frame->sigreturn_code;
|
||||||
|
/* Make sure the two instructions are pushed to icache. */
|
||||||
|
flush_icache_range(addr, addr + sizeof(frame->sigreturn_code));
|
||||||
|
|
||||||
|
regs->ra = addr;
|
||||||
#endif /* CONFIG_MMU */
|
#endif /* CONFIG_MMU */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -500,9 +500,7 @@ long arch_ptrace(struct task_struct *child, long request,
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
case PTRACE_GET_LAST_BREAK:
|
case PTRACE_GET_LAST_BREAK:
|
||||||
put_user(child->thread.last_break,
|
return put_user(child->thread.last_break, (unsigned long __user *)data);
|
||||||
(unsigned long __user *) data);
|
|
||||||
return 0;
|
|
||||||
case PTRACE_ENABLE_TE:
|
case PTRACE_ENABLE_TE:
|
||||||
if (!MACHINE_HAS_TE)
|
if (!MACHINE_HAS_TE)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
@@ -854,9 +852,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
case PTRACE_GET_LAST_BREAK:
|
case PTRACE_GET_LAST_BREAK:
|
||||||
put_user(child->thread.last_break,
|
return put_user(child->thread.last_break, (unsigned int __user *)data);
|
||||||
(unsigned int __user *) data);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
return compat_ptrace_request(child, request, addr, data);
|
return compat_ptrace_request(child, request, addr, data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -270,10 +270,18 @@ static int handle_prog(struct kvm_vcpu *vcpu)
|
|||||||
/**
|
/**
|
||||||
* handle_external_interrupt - used for external interruption interceptions
|
* handle_external_interrupt - used for external interruption interceptions
|
||||||
*
|
*
|
||||||
* This interception only occurs if the CPUSTAT_EXT_INT bit was set, or if
|
* This interception occurs if:
|
||||||
* the new PSW does not have external interrupts disabled. In the first case,
|
* - the CPUSTAT_EXT_INT bit was already set when the external interrupt
|
||||||
* we've got to deliver the interrupt manually, and in the second case, we
|
* occurred. In this case, the interrupt needs to be injected manually to
|
||||||
* drop to userspace to handle the situation there.
|
* preserve interrupt priority.
|
||||||
|
* - the external new PSW has external interrupts enabled, which will cause an
|
||||||
|
* interruption loop. We drop to userspace in this case.
|
||||||
|
*
|
||||||
|
* The latter case can be detected by inspecting the external mask bit in the
|
||||||
|
* external new psw.
|
||||||
|
*
|
||||||
|
* Under PV, only the latter case can occur, since interrupt priorities are
|
||||||
|
* handled in the ultravisor.
|
||||||
*/
|
*/
|
||||||
static int handle_external_interrupt(struct kvm_vcpu *vcpu)
|
static int handle_external_interrupt(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
@@ -284,10 +292,18 @@ static int handle_external_interrupt(struct kvm_vcpu *vcpu)
|
|||||||
|
|
||||||
vcpu->stat.exit_external_interrupt++;
|
vcpu->stat.exit_external_interrupt++;
|
||||||
|
|
||||||
rc = read_guest_lc(vcpu, __LC_EXT_NEW_PSW, &newpsw, sizeof(psw_t));
|
if (kvm_s390_pv_cpu_is_protected(vcpu)) {
|
||||||
if (rc)
|
newpsw = vcpu->arch.sie_block->gpsw;
|
||||||
return rc;
|
} else {
|
||||||
/* We can not handle clock comparator or timer interrupt with bad PSW */
|
rc = read_guest_lc(vcpu, __LC_EXT_NEW_PSW, &newpsw, sizeof(psw_t));
|
||||||
|
if (rc)
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Clock comparator or timer interrupt with external interrupt enabled
|
||||||
|
* will cause interrupt loop. Drop to userspace.
|
||||||
|
*/
|
||||||
if ((eic == EXT_IRQ_CLK_COMP || eic == EXT_IRQ_CPU_TIMER) &&
|
if ((eic == EXT_IRQ_CLK_COMP || eic == EXT_IRQ_CPU_TIMER) &&
|
||||||
(newpsw.mask & PSW_MASK_EXT))
|
(newpsw.mask & PSW_MASK_EXT))
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ config SH_STANDARD_BIOS
|
|||||||
|
|
||||||
config STACK_DEBUG
|
config STACK_DEBUG
|
||||||
bool "Check for stack overflows"
|
bool "Check for stack overflows"
|
||||||
depends on DEBUG_KERNEL
|
depends on DEBUG_KERNEL && PRINTK
|
||||||
help
|
help
|
||||||
This option will cause messages to be printed if free stack space
|
This option will cause messages to be printed if free stack space
|
||||||
drops below a certain limit. Saying Y here will add overhead to
|
drops below a certain limit. Saying Y here will add overhead to
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ static int __init sq_api_init(void)
|
|||||||
if (unlikely(!sq_cache))
|
if (unlikely(!sq_cache))
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
sq_bitmap = kzalloc(size, GFP_KERNEL);
|
sq_bitmap = kcalloc(size, sizeof(long), GFP_KERNEL);
|
||||||
if (unlikely(!sq_bitmap))
|
if (unlikely(!sq_bitmap))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user