This is the 4.19.121 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl6yVZMACgkQONu9yGCS aT7+oBAApTDE7RPVMZ3k1p3fg01Fpa26WUQmmG8QtRYtH9CTjux0BfbA7zFuWOSO qIm/oCvrfdPmO3CcAwYdwU/fiBiUR/jXFM1VolUvKAtP+jaTKZ48TI4Bz9TjMtZE 2h3XPiMrbtOzKwqWJCcksQPbtGZBxg1PFc2lm4bFatnI+HsZmJMkib2/3g64Jcdy aZ9hcPvH2WW9+nxig8FtDCAhZ/019P+74ji5E/FzhmUONkMzXg5iRcJLhBjzYMiv 5Y7J+ONPAkxkmm+Zze32lue1FP2iZwruNrlk5BJaCof2zJfmbcW06r65X5OX5bAi XMkxgEmrnQxxMyEz7TMw8McFQG1vpA728glTWzsW3Y/kNeTy+dt6DfTa+cjGn2Ky k2EOSZqf+G9bd/LjUldfkkGJa+Tv7a+J7A+IVnrOeg1VvI/6/JgI5pyyQVLlH6t3 DfcyMG32Y85QB0Am08lSobV0CxZ6plNLsIuIN1b1iCbq64y7BHf4oeo48VnaFGFR F83HeSxOo8fXoxaMZyJ/bVdC8vrn9QNWWEfmdqXnFhLXqdllSIDG8KRPxbgciZWS ShabaEsXZxtyf+8e0VxpXx0A7THsPWbJ/4REpS6mPpfIWpi0gcHnpsT+k6sbtJ68 8uJrouDLXDei7ll1E5FZWhKbEfwUpBRmFKW+YDjZKeg5R/FuQug= =giKj -----END PGP SIGNATURE----- Merge tag 'v4.19.121' into 4.19.x+fslc This is the 4.19.121 stable release * tag 'v4.19.121': (1018 commits) Linux 4.19.121 mmc: meson-mx-sdio: remove the broken ->card_busy() op mmc: meson-mx-sdio: Set MMC_CAP_WAIT_WHILE_BUSY mmc: sdhci-msm: Enable host capabilities pertains to R1b response mmc: sdhci-pci: Fix eMMC driver strength for BYT-based controllers mmc: sdhci-xenon: fix annoying 1.8V regulator warning mmc: cqhci: Avoid false "cqhci: CQE stuck on" by not open-coding timeout loop btrfs: transaction: Avoid deadlock due to bad initialization timing of fs_info::journal_info btrfs: fix partial loss of prealloc extent past i_size after fsync selinux: properly handle multiple messages in selinux_netlink_send() dmaengine: dmatest: Fix iteration non-stop logic nfs: Fix potential posix_acl refcnt leak in nfs3_set_acl ALSA: opti9xx: shut up gcc-10 range warning iommu/amd: Fix legacy interrupt remapping for x2APIC-enabled system scsi: target/iblock: fix WRITE SAME zeroing iommu/qcom: Fix local_base status check vfio/type1: Fix VA->PA translation for PFNMAP VMAs in vaddr_get_pfn() vfio: avoid possible overflow in vfio_iommu_type1_pin_pages RDMA/core: Fix race between destroy and release FD object RDMA/core: Prevent mixed use of FDs between shared ufiles ...
This commit is contained in:
commit
78ef96ba62
|
@ -136,6 +136,10 @@
|
|||
dynamic table installation which will install SSDT
|
||||
tables to /sys/firmware/acpi/tables/dynamic.
|
||||
|
||||
acpi_no_watchdog [HW,ACPI,WDT]
|
||||
Ignore the ACPI-based watchdog interface (WDAT) and let
|
||||
a native driver control the watchdog device instead.
|
||||
|
||||
acpi_rsdp= [ACPI,EFI,KEXEC]
|
||||
Pass the RSDP address to the kernel, mostly used
|
||||
on machines running EFI runtime service to boot the
|
||||
|
|
|
@ -59,6 +59,7 @@ stable kernels.
|
|||
| ARM | Cortex-A73 | #858921 | ARM64_ERRATUM_858921 |
|
||||
| ARM | Cortex-A55 | #1024718 | ARM64_ERRATUM_1024718 |
|
||||
| ARM | Cortex-A76 | #1463225 | ARM64_ERRATUM_1463225 |
|
||||
| ARM | Neoverse-N1 | #1542419 | ARM64_ERRATUM_1542419 |
|
||||
| ARM | MMU-500 | #841119,#826419 | N/A |
|
||||
| | | | |
|
||||
| Cavium | ThunderX ITS | #22375, #24313 | CAVIUM_ERRATUM_22375 |
|
||||
|
|
|
@ -110,6 +110,13 @@ PROPERTIES
|
|||
Usage: required
|
||||
Definition: See soc/fsl/qman.txt and soc/fsl/bman.txt
|
||||
|
||||
- fsl,erratum-a050385
|
||||
Usage: optional
|
||||
Value type: boolean
|
||||
Definition: A boolean property. Indicates the presence of the
|
||||
erratum A050385 which indicates that DMA transactions that are
|
||||
split can result in a FMan lock.
|
||||
|
||||
=============================================================================
|
||||
FMan MURAM Node
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ suspend/resume and shutdown ordering.
|
|||
|
||||
Device links allow representation of such dependencies in the driver core.
|
||||
|
||||
In its standard form, a device link combines *both* dependency types:
|
||||
It guarantees correct suspend/resume and shutdown ordering between a
|
||||
In its standard or *managed* form, a device link combines *both* dependency
|
||||
types: It guarantees correct suspend/resume and shutdown ordering between a
|
||||
"supplier" device and its "consumer" devices, and it guarantees driver
|
||||
presence on the supplier. The consumer devices are not probed before the
|
||||
supplier is bound to a driver, and they're unbound before the supplier
|
||||
|
@ -59,18 +59,24 @@ device ``->probe`` callback or a boot-time PCI quirk.
|
|||
|
||||
Another example for an inconsistent state would be a device link that
|
||||
represents a driver presence dependency, yet is added from the consumer's
|
||||
``->probe`` callback while the supplier hasn't probed yet: Had the driver
|
||||
core known about the device link earlier, it wouldn't have probed the
|
||||
``->probe`` callback while the supplier hasn't started to probe yet: Had the
|
||||
driver core known about the device link earlier, it wouldn't have probed the
|
||||
consumer in the first place. The onus is thus on the consumer to check
|
||||
presence of the supplier after adding the link, and defer probing on
|
||||
non-presence.
|
||||
non-presence. [Note that it is valid to create a link from the consumer's
|
||||
``->probe`` callback while the supplier is still probing, but the consumer must
|
||||
know that the supplier is functional already at the link creation time (that is
|
||||
the case, for instance, if the consumer has just acquired some resources that
|
||||
would not have been available had the supplier not been functional then).]
|
||||
|
||||
If a device link is added in the ``->probe`` callback of the supplier or
|
||||
consumer driver, it is typically deleted in its ``->remove`` callback for
|
||||
symmetry. That way, if the driver is compiled as a module, the device
|
||||
link is added on module load and orderly deleted on unload. The same
|
||||
restrictions that apply to device link addition (e.g. exclusion of a
|
||||
parallel suspend/resume transition) apply equally to deletion.
|
||||
If a device link with ``DL_FLAG_STATELESS`` set (i.e. a stateless device link)
|
||||
is added in the ``->probe`` callback of the supplier or consumer driver, it is
|
||||
typically deleted in its ``->remove`` callback for symmetry. That way, if the
|
||||
driver is compiled as a module, the device link is added on module load and
|
||||
orderly deleted on unload. The same restrictions that apply to device link
|
||||
addition (e.g. exclusion of a parallel suspend/resume transition) apply equally
|
||||
to deletion. Device links managed by the driver core are deleted automatically
|
||||
by it.
|
||||
|
||||
Several flags may be specified on device link addition, two of which
|
||||
have already been mentioned above: ``DL_FLAG_STATELESS`` to express that no
|
||||
|
@ -83,22 +89,37 @@ link is added from the consumer's ``->probe`` callback: ``DL_FLAG_RPM_ACTIVE``
|
|||
can be specified to runtime resume the supplier upon addition of the
|
||||
device link. ``DL_FLAG_AUTOREMOVE_CONSUMER`` causes the device link to be
|
||||
automatically purged when the consumer fails to probe or later unbinds.
|
||||
This obviates the need to explicitly delete the link in the ``->remove``
|
||||
callback or in the error path of the ``->probe`` callback.
|
||||
|
||||
Similarly, when the device link is added from supplier's ``->probe`` callback,
|
||||
``DL_FLAG_AUTOREMOVE_SUPPLIER`` causes the device link to be automatically
|
||||
purged when the supplier fails to probe or later unbinds.
|
||||
|
||||
If neither ``DL_FLAG_AUTOREMOVE_CONSUMER`` nor ``DL_FLAG_AUTOREMOVE_SUPPLIER``
|
||||
is set, ``DL_FLAG_AUTOPROBE_CONSUMER`` can be used to request the driver core
|
||||
to probe for a driver for the consumer driver on the link automatically after
|
||||
a driver has been bound to the supplier device.
|
||||
|
||||
Note, however, that any combinations of ``DL_FLAG_AUTOREMOVE_CONSUMER``,
|
||||
``DL_FLAG_AUTOREMOVE_SUPPLIER`` or ``DL_FLAG_AUTOPROBE_CONSUMER`` with
|
||||
``DL_FLAG_STATELESS`` are invalid and cannot be used.
|
||||
|
||||
Limitations
|
||||
===========
|
||||
|
||||
Driver authors should be aware that a driver presence dependency (i.e. when
|
||||
``DL_FLAG_STATELESS`` is not specified on link addition) may cause probing of
|
||||
the consumer to be deferred indefinitely. This can become a problem if the
|
||||
consumer is required to probe before a certain initcall level is reached.
|
||||
Worse, if the supplier driver is blacklisted or missing, the consumer will
|
||||
never be probed.
|
||||
Driver authors should be aware that a driver presence dependency for managed
|
||||
device links (i.e. when ``DL_FLAG_STATELESS`` is not specified on link addition)
|
||||
may cause probing of the consumer to be deferred indefinitely. This can become
|
||||
a problem if the consumer is required to probe before a certain initcall level
|
||||
is reached. Worse, if the supplier driver is blacklisted or missing, the
|
||||
consumer will never be probed.
|
||||
|
||||
Moreover, managed device links cannot be deleted directly. They are deleted
|
||||
by the driver core when they are not necessary any more in accordance with the
|
||||
``DL_FLAG_AUTOREMOVE_CONSUMER`` and ``DL_FLAG_AUTOREMOVE_SUPPLIER`` flags.
|
||||
However, stateless device links (i.e. device links with ``DL_FLAG_STATELESS``
|
||||
set) are expected to be removed by whoever called :c:func:`device_link_add()`
|
||||
to add them with the help of either :c:func:`device_link_del()` or
|
||||
:c:func:`device_link_remove()`.
|
||||
|
||||
Sometimes drivers depend on optional resources. They are able to operate
|
||||
in a degraded mode (reduced feature set or performance) when those resources
|
||||
|
@ -282,4 +303,4 @@ API
|
|||
===
|
||||
|
||||
.. kernel-doc:: drivers/base/core.c
|
||||
:functions: device_link_add device_link_del
|
||||
:functions: device_link_add device_link_del device_link_remove
|
||||
|
|
|
@ -627,3 +627,10 @@ in your dentry operations instead.
|
|||
DCACHE_RCUACCESS is gone; having an RCU delay on dentry freeing is the
|
||||
default. DCACHE_NORCU opts out, and only d_alloc_pseudo() has any
|
||||
business doing so.
|
||||
--
|
||||
[mandatory]
|
||||
|
||||
[should've been added in 2016] stale comment in finish_open()
|
||||
nonwithstanding, failure exits in ->atomic_open() instances should
|
||||
*NOT* fput() the file, no matter what. Everything is handled by the
|
||||
caller.
|
||||
|
|
|
@ -76,7 +76,7 @@ flowtable and add one rule to your forward chain.
|
|||
|
||||
table inet x {
|
||||
flowtable f {
|
||||
hook ingress priority 0 devices = { eth0, eth1 };
|
||||
hook ingress priority 0; devices = { eth0, eth1 };
|
||||
}
|
||||
chain y {
|
||||
type filter hook forward priority 0; policy accept;
|
||||
|
|
|
@ -8,3 +8,4 @@ HD-Audio
|
|||
models
|
||||
controls
|
||||
dp-mst
|
||||
realtek-pc-beep
|
||||
|
|
|
@ -216,8 +216,6 @@ alc298-dell-aio
|
|||
ALC298 fixups on Dell AIO machines
|
||||
alc275-dell-xps
|
||||
ALC275 fixups on Dell XPS models
|
||||
alc256-dell-xps13
|
||||
ALC256 fixups on Dell XPS13
|
||||
lenovo-spk-noise
|
||||
Workaround for speaker noise on Lenovo machines
|
||||
lenovo-hotkey
|
||||
|
|
|
@ -0,0 +1,129 @@
|
|||
===============================
|
||||
Realtek PC Beep Hidden Register
|
||||
===============================
|
||||
|
||||
This file documents the "PC Beep Hidden Register", which is present in certain
|
||||
Realtek HDA codecs and controls a muxer and pair of passthrough mixers that can
|
||||
route audio between pins but aren't themselves exposed as HDA widgets. As far
|
||||
as I can tell, these hidden routes are designed to allow flexible PC Beep output
|
||||
for codecs that don't have mixer widgets in their output paths. Why it's easier
|
||||
to hide a mixer behind an undocumented vendor register than to just expose it
|
||||
as a widget, I have no idea.
|
||||
|
||||
Register Description
|
||||
====================
|
||||
|
||||
The register is accessed via processing coefficient 0x36 on NID 20h. Bits not
|
||||
identified below have no discernible effect on my machine, a Dell XPS 13 9350::
|
||||
|
||||
MSB LSB
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| |h|S|L| | B |R| | Known bits
|
||||
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
|
||||
|0|0|1|1| 0x7 |0|0x0|1| 0x7 | Reset value
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|
||||
1Ah input select (B): 2 bits
|
||||
When zero, expose the PC Beep line (from the internal beep generator, when
|
||||
enabled with the Set Beep Generation verb on NID 01h, or else from the
|
||||
external PCBEEP pin) on the 1Ah pin node. When nonzero, expose the headphone
|
||||
jack (or possibly Line In on some machines) input instead. If PC Beep is
|
||||
selected, the 1Ah boost control has no effect.
|
||||
|
||||
Amplify 1Ah loopback, left (L): 1 bit
|
||||
Amplify the left channel of 1Ah before mixing it into outputs as specified
|
||||
by h and S bits. Does not affect the level of 1Ah exposed to other widgets.
|
||||
|
||||
Amplify 1Ah loopback, right (R): 1 bit
|
||||
Amplify the right channel of 1Ah before mixing it into outputs as specified
|
||||
by h and S bits. Does not affect the level of 1Ah exposed to other widgets.
|
||||
|
||||
Loopback 1Ah to 21h [active low] (h): 1 bit
|
||||
When zero, mix 1Ah (possibly with amplification, depending on L and R bits)
|
||||
into 21h (headphone jack on my machine). Mixed signal respects the mute
|
||||
setting on 21h.
|
||||
|
||||
Loopback 1Ah to 14h (S): 1 bit
|
||||
When one, mix 1Ah (possibly with amplification, depending on L and R bits)
|
||||
into 14h (internal speaker on my machine). Mixed signal **ignores** the mute
|
||||
setting on 14h and is present whenever 14h is configured as an output.
|
||||
|
||||
Path diagrams
|
||||
=============
|
||||
|
||||
1Ah input selection (DIV is the PC Beep divider set on NID 01h)::
|
||||
|
||||
<Beep generator> <PCBEEP pin> <Headphone jack>
|
||||
| | |
|
||||
+--DIV--+--!DIV--+ {1Ah boost control}
|
||||
| |
|
||||
+--(b == 0)--+--(b != 0)--+
|
||||
|
|
||||
>1Ah (Beep/Headphone Mic/Line In)<
|
||||
|
||||
Loopback of 1Ah to 21h/14h::
|
||||
|
||||
<1Ah (Beep/Headphone Mic/Line In)>
|
||||
|
|
||||
{amplify if L/R}
|
||||
|
|
||||
+-----!h-----+-----S-----+
|
||||
| |
|
||||
{21h mute control} |
|
||||
| |
|
||||
>21h (Headphone)< >14h (Internal Speaker)<
|
||||
|
||||
Background
|
||||
==========
|
||||
|
||||
All Realtek HDA codecs have a vendor-defined widget with node ID 20h which
|
||||
provides access to a bank of registers that control various codec functions.
|
||||
Registers are read and written via the standard HDA processing coefficient
|
||||
verbs (Set/Get Coefficient Index, Set/Get Processing Coefficient). The node is
|
||||
named "Realtek Vendor Registers" in public datasheets' verb listings and,
|
||||
apart from that, is entirely undocumented.
|
||||
|
||||
This particular register, exposed at coefficient 0x36 and named in commits from
|
||||
Realtek, is of note: unlike most registers, which seem to control detailed
|
||||
amplifier parameters not in scope of the HDA specification, it controls audio
|
||||
routing which could just as easily have been defined using standard HDA mixer
|
||||
and selector widgets.
|
||||
|
||||
Specifically, it selects between two sources for the input pin widget with Node
|
||||
ID (NID) 1Ah: the widget's signal can come either from an audio jack (on my
|
||||
laptop, a Dell XPS 13 9350, it's the headphone jack, but comments in Realtek
|
||||
commits indicate that it might be a Line In on some machines) or from the PC
|
||||
Beep line (which is itself multiplexed between the codec's internal beep
|
||||
generator and external PCBEEP pin, depending on if the beep generator is
|
||||
enabled via verbs on NID 01h). Additionally, it can mix (with optional
|
||||
amplification) that signal onto the 21h and/or 14h output pins.
|
||||
|
||||
The register's reset value is 0x3717, corresponding to PC Beep on 1Ah that is
|
||||
then amplified and mixed into both the headphones and the speakers. Not only
|
||||
does this violate the HDA specification, which says that "[a vendor defined
|
||||
beep input pin] connection may be maintained *only* while the Link reset
|
||||
(**RST#**) is asserted", it means that we cannot ignore the register if we care
|
||||
about the input that 1Ah would otherwise expose or if the PCBEEP trace is
|
||||
poorly shielded and picks up chassis noise (both of which are the case on my
|
||||
machine).
|
||||
|
||||
Unfortunately, there are lots of ways to get this register configuration wrong.
|
||||
Linux, it seems, has gone through most of them. For one, the register resets
|
||||
after S3 suspend: judging by existing code, this isn't the case for all vendor
|
||||
registers, and it's led to some fixes that improve behavior on cold boot but
|
||||
don't last after suspend. Other fixes have successfully switched the 1Ah input
|
||||
away from PC Beep but have failed to disable both loopback paths. On my
|
||||
machine, this means that the headphone input is amplified and looped back to
|
||||
the headphone output, which uses the exact same pins! As you might expect, this
|
||||
causes terrible headphone noise, the character of which is controlled by the
|
||||
1Ah boost control. (If you've seen instructions online to fix XPS 13 headphone
|
||||
noise by changing "Headphone Mic Boost" in ALSA, now you know why.)
|
||||
|
||||
The information here has been obtained through black-box reverse engineering of
|
||||
the ALC256 codec's behavior and is not guaranteed to be correct. It likely
|
||||
also applies for the ALC255, ALC257, ALC235, and ALC236, since those codecs
|
||||
seem to be close relatives of the ALC256. (They all share one initialization
|
||||
function.) Additionally, other codecs like the ALC225 and ALC285 also have this
|
||||
register, judging by existing fixups in ``patch_realtek.c``, but specific
|
||||
data (e.g. node IDs, bit positions, pin mappings) for those codecs may differ
|
||||
from what I've described here.
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 19
|
||||
SUBLEVEL = 107
|
||||
SUBLEVEL = 121
|
||||
EXTRAVERSION =
|
||||
NAME = "People's Front"
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
#ifdef __ASSEMBLY__
|
||||
|
||||
#define ASM_NL ` /* use '`' to mark new line in macro */
|
||||
#define __ALIGN .align 4
|
||||
#define __ALIGN_STR __stringify(__ALIGN)
|
||||
|
||||
/* annotation for data we want in DCCM - if enabled in .config */
|
||||
.macro ARCFP_DATA nm
|
||||
|
|
|
@ -525,11 +525,11 @@
|
|||
* Supply voltage supervisor on board will not allow opp50 so
|
||||
* disable it and set opp100 as suspend OPP.
|
||||
*/
|
||||
opp50@300000000 {
|
||||
opp50-300000000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
opp100@600000000 {
|
||||
opp100-600000000 {
|
||||
opp-suspend;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -118,6 +118,7 @@
|
|||
&sdhci {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&emmc_gpio34 &gpclk2_gpio43>;
|
||||
mmc-pwrseq = <&wifi_pwrseq>;
|
||||
non-removable;
|
||||
|
|
|
@ -476,6 +476,7 @@
|
|||
"dsi0_ddr2",
|
||||
"dsi0_ddr";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
thermal: thermal@7e212000 {
|
||||
|
|
|
@ -150,6 +150,7 @@
|
|||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x0 0x0 0xc0000000>;
|
||||
dma-ranges = <0x80000000 0x0 0x80000000 0x80000000>;
|
||||
ti,hwmods = "l3_main_1", "l3_main_2";
|
||||
reg = <0x0 0x44000000 0x0 0x1000000>,
|
||||
<0x0 0x45000000 0x0 0x1000>;
|
||||
|
@ -324,6 +325,7 @@
|
|||
device_type = "pci";
|
||||
ranges = <0x81000000 0 0 0x03000 0 0x00010000
|
||||
0x82000000 0 0x20013000 0x13000 0 0xffed000>;
|
||||
dma-ranges = <0x02000000 0x0 0x00000000 0x00000000 0x1 0x00000000>;
|
||||
bus-range = <0x00 0xff>;
|
||||
#interrupt-cells = <1>;
|
||||
num-lanes = <1>;
|
||||
|
@ -376,6 +378,7 @@
|
|||
device_type = "pci";
|
||||
ranges = <0x81000000 0 0 0x03000 0 0x00010000
|
||||
0x82000000 0 0x30013000 0x13000 0 0xffed000>;
|
||||
dma-ranges = <0x02000000 0x0 0x00000000 0x00000000 0x1 0x00000000>;
|
||||
bus-range = <0x00 0xff>;
|
||||
#interrupt-cells = <1>;
|
||||
num-lanes = <1>;
|
||||
|
|
|
@ -81,3 +81,8 @@
|
|||
reg = <0x3fc>;
|
||||
};
|
||||
};
|
||||
|
||||
&mmc3 {
|
||||
/* dra76x is not affected by i887 */
|
||||
max-frequency = <96000000>;
|
||||
};
|
||||
|
|
|
@ -107,14 +107,14 @@
|
|||
regulators {
|
||||
vdd_arm: buck1 {
|
||||
regulator-name = "vdd_arm";
|
||||
regulator-min-microvolt = <730000>;
|
||||
regulator-min-microvolt = <925000>;
|
||||
regulator-max-microvolt = <1380000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd_soc: buck2 {
|
||||
regulator-name = "vdd_soc";
|
||||
regulator-min-microvolt = <730000>;
|
||||
regulator-min-microvolt = <1150000>;
|
||||
regulator-max-microvolt = <1380000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
@ -183,7 +183,6 @@
|
|||
pinctrl-0 = <&pinctrl_usdhc4>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
vmmc-supply = <&vdd_emmc_1p8>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
|
|
@ -1013,9 +1013,8 @@
|
|||
compatible = "fsl,imx6q-fec";
|
||||
reg = <0x02188000 0x4000>;
|
||||
interrupt-names = "int0", "pps";
|
||||
interrupts-extended =
|
||||
<&intc 0 118 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <0 118 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<0 119 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks IMX6QDL_CLK_ENET>,
|
||||
<&clks IMX6QDL_CLK_ENET>,
|
||||
<&clks IMX6QDL_CLK_ENET_REF>;
|
||||
|
|
|
@ -77,7 +77,6 @@
|
|||
};
|
||||
|
||||
&fec {
|
||||
/delete-property/interrupts-extended;
|
||||
interrupts = <0 118 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<0 119 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
|
|
@ -319,7 +319,6 @@
|
|||
assigned-clock-rates = <400000000>;
|
||||
bus-width = <8>;
|
||||
fsl,tuning-step = <2>;
|
||||
max-frequency = <100000000>;
|
||||
vmmc-supply = <®_module_3v3>;
|
||||
vqmmc-supply = <®_DCDC3>;
|
||||
non-removable;
|
||||
|
|
|
@ -584,7 +584,7 @@
|
|||
};
|
||||
|
||||
mdio0: mdio@2d24000 {
|
||||
compatible = "fsl,etsec2-mdio";
|
||||
compatible = "gianfar";
|
||||
device_type = "mdio";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
@ -593,7 +593,7 @@
|
|||
};
|
||||
|
||||
mdio1: mdio@2d64000 {
|
||||
compatible = "fsl,etsec2-mdio";
|
||||
compatible = "gianfar";
|
||||
device_type = "mdio";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
|
|
@ -852,34 +852,46 @@
|
|||
compatible = "ti,omap2-onenand";
|
||||
reg = <0 0 0x20000>; /* CS0, offset 0, IO size 128K */
|
||||
|
||||
/*
|
||||
* These timings are based on CONFIG_OMAP_GPMC_DEBUG=y reported
|
||||
* bootloader set values when booted with v5.1
|
||||
* (OneNAND Manufacturer: Samsung):
|
||||
*
|
||||
* cs0 GPMC_CS_CONFIG1: 0xfb001202
|
||||
* cs0 GPMC_CS_CONFIG2: 0x00111100
|
||||
* cs0 GPMC_CS_CONFIG3: 0x00020200
|
||||
* cs0 GPMC_CS_CONFIG4: 0x11001102
|
||||
* cs0 GPMC_CS_CONFIG5: 0x03101616
|
||||
* cs0 GPMC_CS_CONFIG6: 0x90060000
|
||||
*/
|
||||
gpmc,sync-read;
|
||||
gpmc,sync-write;
|
||||
gpmc,burst-length = <16>;
|
||||
gpmc,burst-read;
|
||||
gpmc,burst-wrap;
|
||||
gpmc,burst-write;
|
||||
gpmc,device-width = <2>; /* GPMC_DEVWIDTH_16BIT */
|
||||
gpmc,mux-add-data = <2>; /* GPMC_MUX_AD */
|
||||
gpmc,device-width = <2>;
|
||||
gpmc,mux-add-data = <2>;
|
||||
gpmc,cs-on-ns = <0>;
|
||||
gpmc,cs-rd-off-ns = <87>;
|
||||
gpmc,cs-wr-off-ns = <87>;
|
||||
gpmc,cs-rd-off-ns = <102>;
|
||||
gpmc,cs-wr-off-ns = <102>;
|
||||
gpmc,adv-on-ns = <0>;
|
||||
gpmc,adv-rd-off-ns = <10>;
|
||||
gpmc,adv-wr-off-ns = <10>;
|
||||
gpmc,oe-on-ns = <15>;
|
||||
gpmc,oe-off-ns = <87>;
|
||||
gpmc,adv-rd-off-ns = <12>;
|
||||
gpmc,adv-wr-off-ns = <12>;
|
||||
gpmc,oe-on-ns = <12>;
|
||||
gpmc,oe-off-ns = <102>;
|
||||
gpmc,we-on-ns = <0>;
|
||||
gpmc,we-off-ns = <87>;
|
||||
gpmc,rd-cycle-ns = <112>;
|
||||
gpmc,wr-cycle-ns = <112>;
|
||||
gpmc,access-ns = <81>;
|
||||
gpmc,page-burst-access-ns = <15>;
|
||||
gpmc,we-off-ns = <102>;
|
||||
gpmc,rd-cycle-ns = <132>;
|
||||
gpmc,wr-cycle-ns = <132>;
|
||||
gpmc,access-ns = <96>;
|
||||
gpmc,page-burst-access-ns = <18>;
|
||||
gpmc,bus-turnaround-ns = <0>;
|
||||
gpmc,cycle2cycle-delay-ns = <0>;
|
||||
gpmc,wait-monitoring-ns = <0>;
|
||||
gpmc,clk-activation-ns = <5>;
|
||||
gpmc,wr-data-mux-bus-ns = <30>;
|
||||
gpmc,wr-access-ns = <81>;
|
||||
gpmc,clk-activation-ns = <6>;
|
||||
gpmc,wr-data-mux-bus-ns = <36>;
|
||||
gpmc,wr-access-ns = <96>;
|
||||
gpmc,sync-clk-ps = <15000>;
|
||||
|
||||
/*
|
||||
|
|
|
@ -144,6 +144,7 @@
|
|||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0 0 0 0xc0000000>;
|
||||
dma-ranges = <0x80000000 0x0 0x80000000 0x80000000>;
|
||||
ti,hwmods = "l3_main_1", "l3_main_2", "l3_main_3";
|
||||
reg = <0 0x44000000 0 0x2000>,
|
||||
<0 0x44800000 0 0x3000>,
|
||||
|
|
|
@ -322,8 +322,8 @@
|
|||
interrupt-controller;
|
||||
reg = <0 0x200>;
|
||||
#interrupt-cells = <1>;
|
||||
valid-mask = <0xFFFFFFFF>;
|
||||
clear-mask = <0>;
|
||||
valid-mask = <0xffffffff>;
|
||||
clear-mask = <0xffffffff>;
|
||||
};
|
||||
|
||||
timer0: timer@200 {
|
||||
|
|
|
@ -239,8 +239,8 @@
|
|||
reg = <0 0x200>;
|
||||
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#interrupt-cells = <1>;
|
||||
valid-mask = <0xFFFFFFFF>;
|
||||
clear-mask = <0>;
|
||||
valid-mask = <0xffffffff>;
|
||||
clear-mask = <0xffffffff>;
|
||||
};
|
||||
|
||||
timer0: timer@200 {
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
/* DAC */
|
||||
format = "i2s";
|
||||
mclk-fs = <256>;
|
||||
frame-inversion = <1>;
|
||||
frame-inversion;
|
||||
cpu {
|
||||
sound-dai = <&sti_uni_player2>;
|
||||
};
|
||||
|
|
|
@ -318,8 +318,8 @@
|
|||
};
|
||||
|
||||
®_dldo3 {
|
||||
regulator-min-microvolt = <2800000>;
|
||||
regulator-max-microvolt = <2800000>;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vdd-csi";
|
||||
};
|
||||
|
||||
|
|
|
@ -103,6 +103,8 @@ static bool __init cntvct_functional(void)
|
|||
* this.
|
||||
*/
|
||||
np = of_find_compatible_node(NULL, NULL, "arm,armv7-timer");
|
||||
if (!np)
|
||||
np = of_find_compatible_node(NULL, NULL, "arm,armv8-timer");
|
||||
if (!np)
|
||||
goto out_put;
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ ENTRY(arm_copy_from_user)
|
|||
|
||||
ENDPROC(arm_copy_from_user)
|
||||
|
||||
.pushsection .fixup,"ax"
|
||||
.pushsection .text.fixup,"ax"
|
||||
.align 0
|
||||
copy_abort_preamble
|
||||
ldmfd sp!, {r1, r2, r3}
|
||||
|
|
|
@ -91,6 +91,10 @@ AFLAGS_suspend-imx6.o :=-Wa,-march=armv7-a
|
|||
obj-$(CONFIG_SOC_IMX6) += suspend-imx6.o
|
||||
obj-$(CONFIG_SOC_IMX53) += suspend-imx53.o
|
||||
endif
|
||||
ifeq ($(CONFIG_ARM_CPU_SUSPEND),y)
|
||||
AFLAGS_resume-imx6.o :=-Wa,-march=armv7-a
|
||||
obj-$(CONFIG_SOC_IMX6) += resume-imx6.o
|
||||
endif
|
||||
obj-$(CONFIG_SOC_IMX6) += pm-imx6.o
|
||||
|
||||
obj-$(CONFIG_SOC_IMX1) += mach-imx1.o
|
||||
|
|
|
@ -103,17 +103,17 @@ void imx_cpu_die(unsigned int cpu);
|
|||
int imx_cpu_kill(unsigned int cpu);
|
||||
|
||||
#ifdef CONFIG_SUSPEND
|
||||
void v7_cpu_resume(void);
|
||||
void imx53_suspend(void __iomem *ocram_vbase);
|
||||
extern const u32 imx53_suspend_sz;
|
||||
void imx6_suspend(void __iomem *ocram_vbase);
|
||||
#else
|
||||
static inline void v7_cpu_resume(void) {}
|
||||
static inline void imx53_suspend(void __iomem *ocram_vbase) {}
|
||||
static const u32 imx53_suspend_sz;
|
||||
static inline void imx6_suspend(void __iomem *ocram_vbase) {}
|
||||
#endif
|
||||
|
||||
void v7_cpu_resume(void);
|
||||
|
||||
void imx6_pm_ccm_init(const char *ccm_compat);
|
||||
void imx6q_pm_init(void);
|
||||
void imx6dl_pm_init(void);
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/*
|
||||
* Copyright 2014 Freescale Semiconductor, Inc.
|
||||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/assembler.h>
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/hardware/cache-l2x0.h>
|
||||
#include "hardware.h"
|
||||
|
||||
/*
|
||||
* The following code must assume it is running from physical address
|
||||
* where absolute virtual addresses to the data section have to be
|
||||
* turned into relative ones.
|
||||
*/
|
||||
|
||||
ENTRY(v7_cpu_resume)
|
||||
bl v7_invalidate_l1
|
||||
#ifdef CONFIG_CACHE_L2X0
|
||||
bl l2c310_early_resume
|
||||
#endif
|
||||
b cpu_resume
|
||||
ENDPROC(v7_cpu_resume)
|
|
@ -333,17 +333,3 @@ resume:
|
|||
|
||||
ret lr
|
||||
ENDPROC(imx6_suspend)
|
||||
|
||||
/*
|
||||
* The following code must assume it is running from physical address
|
||||
* where absolute virtual addresses to the data section have to be
|
||||
* turned into relative ones.
|
||||
*/
|
||||
|
||||
ENTRY(v7_cpu_resume)
|
||||
bl v7_invalidate_l1
|
||||
#ifdef CONFIG_CACHE_L2X0
|
||||
bl l2c310_early_resume
|
||||
#endif
|
||||
b cpu_resume
|
||||
ENDPROC(v7_cpu_resume)
|
||||
|
|
|
@ -930,7 +930,11 @@ static inline void emit_a32_rsh_i64(const s8 dst[],
|
|||
rd = arm_bpf_get_reg64(dst, tmp, ctx);
|
||||
|
||||
/* Do LSR operation */
|
||||
if (val < 32) {
|
||||
if (val == 0) {
|
||||
/* An immediate value of 0 encodes a shift amount of 32
|
||||
* for LSR. To shift by 0, don't do anything.
|
||||
*/
|
||||
} else if (val < 32) {
|
||||
emit(ARM_MOV_SI(tmp2[1], rd[1], SRTYPE_LSR, val), ctx);
|
||||
emit(ARM_ORR_SI(rd[1], tmp2[1], rd[0], SRTYPE_ASL, 32 - val), ctx);
|
||||
emit(ARM_MOV_SI(rd[0], rd[0], SRTYPE_LSR, val), ctx);
|
||||
|
@ -956,7 +960,11 @@ static inline void emit_a32_arsh_i64(const s8 dst[],
|
|||
rd = arm_bpf_get_reg64(dst, tmp, ctx);
|
||||
|
||||
/* Do ARSH operation */
|
||||
if (val < 32) {
|
||||
if (val == 0) {
|
||||
/* An immediate value of 0 encodes a shift amount of 32
|
||||
* for ASR. To shift by 0, don't do anything.
|
||||
*/
|
||||
} else if (val < 32) {
|
||||
emit(ARM_MOV_SI(tmp2[1], rd[1], SRTYPE_LSR, val), ctx);
|
||||
emit(ARM_ORR_SI(rd[1], tmp2[1], rd[0], SRTYPE_ASL, 32 - val), ctx);
|
||||
emit(ARM_MOV_SI(rd[0], rd[0], SRTYPE_ASR, val), ctx);
|
||||
|
@ -993,21 +1001,35 @@ static inline void emit_a32_mul_r64(const s8 dst[], const s8 src[],
|
|||
arm_bpf_put_reg32(dst_hi, rd[0], ctx);
|
||||
}
|
||||
|
||||
static bool is_ldst_imm(s16 off, const u8 size)
|
||||
{
|
||||
s16 off_max = 0;
|
||||
|
||||
switch (size) {
|
||||
case BPF_B:
|
||||
case BPF_W:
|
||||
off_max = 0xfff;
|
||||
break;
|
||||
case BPF_H:
|
||||
off_max = 0xff;
|
||||
break;
|
||||
case BPF_DW:
|
||||
/* Need to make sure off+4 does not overflow. */
|
||||
off_max = 0xfff - 4;
|
||||
break;
|
||||
}
|
||||
return -off_max <= off && off <= off_max;
|
||||
}
|
||||
|
||||
/* *(size *)(dst + off) = src */
|
||||
static inline void emit_str_r(const s8 dst, const s8 src[],
|
||||
s32 off, struct jit_ctx *ctx, const u8 sz){
|
||||
s16 off, struct jit_ctx *ctx, const u8 sz){
|
||||
const s8 *tmp = bpf2a32[TMP_REG_1];
|
||||
s32 off_max;
|
||||
s8 rd;
|
||||
|
||||
rd = arm_bpf_get_reg32(dst, tmp[1], ctx);
|
||||
|
||||
if (sz == BPF_H)
|
||||
off_max = 0xff;
|
||||
else
|
||||
off_max = 0xfff;
|
||||
|
||||
if (off < 0 || off > off_max) {
|
||||
if (!is_ldst_imm(off, sz)) {
|
||||
emit_a32_mov_i(tmp[0], off, ctx);
|
||||
emit(ARM_ADD_R(tmp[0], tmp[0], rd), ctx);
|
||||
rd = tmp[0];
|
||||
|
@ -1036,18 +1058,12 @@ static inline void emit_str_r(const s8 dst, const s8 src[],
|
|||
|
||||
/* dst = *(size*)(src + off) */
|
||||
static inline void emit_ldx_r(const s8 dst[], const s8 src,
|
||||
s32 off, struct jit_ctx *ctx, const u8 sz){
|
||||
s16 off, struct jit_ctx *ctx, const u8 sz){
|
||||
const s8 *tmp = bpf2a32[TMP_REG_1];
|
||||
const s8 *rd = is_stacked(dst_lo) ? tmp : dst;
|
||||
s8 rm = src;
|
||||
s32 off_max;
|
||||
|
||||
if (sz == BPF_H)
|
||||
off_max = 0xff;
|
||||
else
|
||||
off_max = 0xfff;
|
||||
|
||||
if (off < 0 || off > off_max) {
|
||||
if (!is_ldst_imm(off, sz)) {
|
||||
emit_a32_mov_i(tmp[0], off, ctx);
|
||||
emit(ARM_ADD_R(tmp[0], tmp[0], src), ctx);
|
||||
rm = tmp[0];
|
||||
|
|
|
@ -499,6 +499,22 @@ config ARM64_ERRATUM_1463225
|
|||
|
||||
If unsure, say Y.
|
||||
|
||||
config ARM64_ERRATUM_1542419
|
||||
bool "Neoverse-N1: workaround mis-ordering of instruction fetches"
|
||||
default y
|
||||
help
|
||||
This option adds a workaround for ARM Neoverse-N1 erratum
|
||||
1542419.
|
||||
|
||||
Affected Neoverse-N1 cores could execute a stale instruction when
|
||||
modified by another CPU. The workaround depends on a firmware
|
||||
counterpart.
|
||||
|
||||
Workaround the issue by hiding the DIC feature from EL0. This
|
||||
forces user-space to perform cache maintenance.
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
config CAVIUM_ERRATUM_22375
|
||||
bool "Cavium erratum 22375, 24313"
|
||||
default y
|
||||
|
|
|
@ -70,8 +70,7 @@
|
|||
};
|
||||
|
||||
pmu {
|
||||
compatible = "arm,cortex-a53-pmu",
|
||||
"arm,armv8-pmuv3";
|
||||
compatible = "arm,cortex-a53-pmu";
|
||||
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
};
|
||||
|
||||
&fman0 {
|
||||
fsl,erratum-a050385;
|
||||
|
||||
/* these aliases provide the FMan ports mapping */
|
||||
enet0: ethernet@e0000 {
|
||||
};
|
||||
|
|
|
@ -118,12 +118,12 @@
|
|||
|
||||
ethernet@e4000 {
|
||||
phy-handle = <&rgmii_phy1>;
|
||||
phy-connection-type = "rgmii-txid";
|
||||
phy-connection-type = "rgmii-id";
|
||||
};
|
||||
|
||||
ethernet@e6000 {
|
||||
phy-handle = <&rgmii_phy2>;
|
||||
phy-connection-type = "rgmii-txid";
|
||||
phy-connection-type = "rgmii-id";
|
||||
};
|
||||
|
||||
ethernet@e8000 {
|
||||
|
|
|
@ -125,12 +125,12 @@
|
|||
&fman0 {
|
||||
ethernet@e4000 {
|
||||
phy-handle = <&rgmii_phy1>;
|
||||
phy-connection-type = "rgmii";
|
||||
phy-connection-type = "rgmii-id";
|
||||
};
|
||||
|
||||
ethernet@e6000 {
|
||||
phy-handle = <&rgmii_phy2>;
|
||||
phy-connection-type = "rgmii";
|
||||
phy-connection-type = "rgmii-id";
|
||||
};
|
||||
|
||||
ethernet@e8000 {
|
||||
|
|
|
@ -221,7 +221,7 @@ alternative_endif
|
|||
|
||||
.macro user_alt, label, oldinstr, newinstr, cond
|
||||
9999: alternative_insn "\oldinstr", "\newinstr", \cond
|
||||
_ASM_EXTABLE 9999b, \label
|
||||
_asm_extable 9999b, \label
|
||||
.endm
|
||||
|
||||
/*
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#define CTR_L1IP_MASK 3
|
||||
#define CTR_DMINLINE_SHIFT 16
|
||||
#define CTR_IMINLINE_SHIFT 0
|
||||
#define CTR_IMINLINE_MASK 0xf
|
||||
#define CTR_ERG_SHIFT 20
|
||||
#define CTR_CWG_SHIFT 24
|
||||
#define CTR_CWG_MASK 15
|
||||
|
@ -29,7 +30,7 @@
|
|||
#define CTR_DIC_SHIFT 29
|
||||
|
||||
#define CTR_CACHE_MINLINE_MASK \
|
||||
(0xf << CTR_DMINLINE_SHIFT | 0xf << CTR_IMINLINE_SHIFT)
|
||||
(0xf << CTR_DMINLINE_SHIFT | CTR_IMINLINE_MASK << CTR_IMINLINE_SHIFT)
|
||||
|
||||
#define CTR_L1IP(ctr) (((ctr) >> CTR_L1IP_SHIFT) & CTR_L1IP_MASK)
|
||||
|
||||
|
|
|
@ -53,7 +53,8 @@
|
|||
#define ARM64_HAS_STAGE2_FWB 32
|
||||
#define ARM64_WORKAROUND_1463225 33
|
||||
#define ARM64_SSBS 34
|
||||
#define ARM64_WORKAROUND_1542419 35
|
||||
|
||||
#define ARM64_NCAPS 35
|
||||
#define ARM64_NCAPS 36
|
||||
|
||||
#endif /* __ASM_CPUCAPS_H */
|
||||
|
|
|
@ -80,6 +80,7 @@
|
|||
#define ARM_CPU_PART_CORTEX_A35 0xD04
|
||||
#define ARM_CPU_PART_CORTEX_A55 0xD05
|
||||
#define ARM_CPU_PART_CORTEX_A76 0xD0B
|
||||
#define ARM_CPU_PART_NEOVERSE_N1 0xD0C
|
||||
|
||||
#define APM_CPU_PART_POTENZA 0x000
|
||||
|
||||
|
@ -107,6 +108,7 @@
|
|||
#define MIDR_CORTEX_A35 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A35)
|
||||
#define MIDR_CORTEX_A55 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A55)
|
||||
#define MIDR_CORTEX_A76 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A76)
|
||||
#define MIDR_NEOVERSE_N1 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_N1)
|
||||
#define MIDR_THUNDERX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX)
|
||||
#define MIDR_THUNDERX_81XX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX_81XX)
|
||||
#define MIDR_THUNDERX_83XX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX_83XX)
|
||||
|
|
|
@ -60,7 +60,9 @@
|
|||
#ifndef CONFIG_BROKEN_GAS_INST
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
#define __emit_inst(x) .inst (x)
|
||||
// The space separator is omitted so that __emit_inst(x) can be parsed as
|
||||
// either an assembler directive or an assembler macro argument.
|
||||
#define __emit_inst(x) .inst(x)
|
||||
#else
|
||||
#define __emit_inst(x) ".inst " __stringify((x)) "\n\t"
|
||||
#endif
|
||||
|
|
|
@ -604,7 +604,7 @@ static struct undef_hook setend_hooks[] = {
|
|||
},
|
||||
{
|
||||
/* Thumb mode */
|
||||
.instr_mask = 0x0000fff7,
|
||||
.instr_mask = 0xfffffff7,
|
||||
.instr_val = 0x0000b650,
|
||||
.pstate_mask = (PSR_AA32_T_BIT | PSR_AA32_MODE_MASK),
|
||||
.pstate_val = (PSR_AA32_T_BIT | PSR_AA32_MODE_USR),
|
||||
|
|
|
@ -643,6 +643,18 @@ needs_tx2_tvm_workaround(const struct arm64_cpu_capabilities *entry,
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool __maybe_unused
|
||||
has_neoverse_n1_erratum_1542419(const struct arm64_cpu_capabilities *entry,
|
||||
int scope)
|
||||
{
|
||||
u32 midr = read_cpuid_id();
|
||||
bool has_dic = read_cpuid_cachetype() & BIT(CTR_DIC_SHIFT);
|
||||
const struct midr_range range = MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1);
|
||||
|
||||
WARN_ON(scope != SCOPE_LOCAL_CPU || preemptible());
|
||||
return is_midr_in_range(midr, &range) && has_dic;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HARDEN_EL2_VECTORS
|
||||
|
||||
static const struct midr_range arm64_harden_el2_vectors[] = {
|
||||
|
@ -834,6 +846,16 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
|
|||
ERRATA_MIDR_RANGE_LIST(tx2_family_cpus),
|
||||
.matches = needs_tx2_tvm_workaround,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_ARM64_ERRATUM_1542419
|
||||
{
|
||||
/* we depend on the firmware portion for correctness */
|
||||
.desc = "ARM erratum 1542419 (kernel portion)",
|
||||
.capability = ARM64_WORKAROUND_1542419,
|
||||
.type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM,
|
||||
.matches = has_neoverse_n1_erratum_1542419,
|
||||
.cpu_enable = cpu_enable_trap_ctr_access,
|
||||
},
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
|
|
@ -667,7 +667,7 @@ ENTRY(__boot_cpu_mode)
|
|||
* with MMU turned off.
|
||||
*/
|
||||
ENTRY(__early_cpu_boot_status)
|
||||
.long 0
|
||||
.quad 0
|
||||
|
||||
.popsection
|
||||
|
||||
|
|
|
@ -936,11 +936,22 @@ void tick_broadcast(const struct cpumask *mask)
|
|||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The number of CPUs online, not counting this CPU (which may not be
|
||||
* fully online and so not counted in num_online_cpus()).
|
||||
*/
|
||||
static inline unsigned int num_other_online_cpus(void)
|
||||
{
|
||||
unsigned int this_cpu_online = cpu_online(smp_processor_id());
|
||||
|
||||
return num_online_cpus() - this_cpu_online;
|
||||
}
|
||||
|
||||
void smp_send_stop(void)
|
||||
{
|
||||
unsigned long timeout;
|
||||
|
||||
if (num_online_cpus() > 1) {
|
||||
if (num_other_online_cpus()) {
|
||||
cpumask_t mask;
|
||||
|
||||
cpumask_copy(&mask, cpu_online_mask);
|
||||
|
@ -953,10 +964,10 @@ void smp_send_stop(void)
|
|||
|
||||
/* Wait up to one second for other CPUs to stop */
|
||||
timeout = USEC_PER_SEC;
|
||||
while (num_online_cpus() > 1 && timeout--)
|
||||
while (num_other_online_cpus() && timeout--)
|
||||
udelay(1);
|
||||
|
||||
if (num_online_cpus() > 1)
|
||||
if (num_other_online_cpus())
|
||||
pr_warning("SMP: failed to stop secondary CPUs %*pbl\n",
|
||||
cpumask_pr_args(cpu_online_mask));
|
||||
|
||||
|
@ -979,7 +990,11 @@ void crash_smp_send_stop(void)
|
|||
|
||||
cpus_stopped = 1;
|
||||
|
||||
if (num_online_cpus() == 1) {
|
||||
/*
|
||||
* If this cpu is the only one alive at this point in time, online or
|
||||
* not, there are no stop messages to be sent around, so just back out.
|
||||
*/
|
||||
if (num_other_online_cpus() == 0) {
|
||||
sdei_mask_local_cpu();
|
||||
return;
|
||||
}
|
||||
|
@ -987,7 +1002,7 @@ void crash_smp_send_stop(void)
|
|||
cpumask_copy(&mask, cpu_online_mask);
|
||||
cpumask_clear_cpu(smp_processor_id(), &mask);
|
||||
|
||||
atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
|
||||
atomic_set(&waiting_for_crash_ipi, num_other_online_cpus());
|
||||
|
||||
pr_crit("SMP: stopping secondary CPUs\n");
|
||||
smp_cross_call(&mask, IPI_CPU_CRASH_STOP);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/compat.h>
|
||||
#include <linux/cpufeature.h>
|
||||
#include <linux/personality.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/sched/signal.h>
|
||||
|
@ -28,6 +29,7 @@
|
|||
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/system_misc.h>
|
||||
#include <asm/tlbflush.h>
|
||||
#include <asm/unistd.h>
|
||||
|
||||
static long
|
||||
|
@ -41,6 +43,15 @@ __do_compat_cache_op(unsigned long start, unsigned long end)
|
|||
if (fatal_signal_pending(current))
|
||||
return 0;
|
||||
|
||||
if (cpus_have_const_cap(ARM64_WORKAROUND_1542419)) {
|
||||
/*
|
||||
* The workaround requires an inner-shareable tlbi.
|
||||
* We pick the reserved-ASID to minimise the impact.
|
||||
*/
|
||||
__tlbi(aside1is, __TLBI_VADDR(0, 0));
|
||||
dsb(ish);
|
||||
}
|
||||
|
||||
ret = __flush_cache_user_range(start, start + chunk);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
|
@ -481,6 +481,15 @@ static void ctr_read_handler(unsigned int esr, struct pt_regs *regs)
|
|||
int rt = (esr & ESR_ELx_SYS64_ISS_RT_MASK) >> ESR_ELx_SYS64_ISS_RT_SHIFT;
|
||||
unsigned long val = arm64_ftr_reg_user_value(&arm64_ftr_reg_ctrel0);
|
||||
|
||||
if (cpus_have_const_cap(ARM64_WORKAROUND_1542419)) {
|
||||
/* Hide DIC so that we can trap the unnecessary maintenance...*/
|
||||
val &= ~BIT(CTR_DIC_SHIFT);
|
||||
|
||||
/* ... and fake IminLine to reduce the number of traps. */
|
||||
val &= ~CTR_IMINLINE_MASK;
|
||||
val |= (PAGE_SHIFT - 2) & CTR_IMINLINE_MASK;
|
||||
}
|
||||
|
||||
pt_regs_write_reg(regs, rt, val);
|
||||
|
||||
arm64_skip_faulting_instruction(regs, AARCH64_INSN_SIZE);
|
||||
|
|
|
@ -2199,6 +2199,9 @@ static int octeon_irq_cib_map(struct irq_domain *d,
|
|||
}
|
||||
|
||||
cd = kzalloc(sizeof(*cd), GFP_KERNEL);
|
||||
if (!cd)
|
||||
return -ENOMEM;
|
||||
|
||||
cd->host_data = host_data;
|
||||
cd->bit = hw;
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ void release_vpe(struct vpe *v)
|
|||
{
|
||||
list_del(&v->list);
|
||||
if (v->load_addr)
|
||||
release_progmem(v);
|
||||
release_progmem(v->load_addr);
|
||||
kfree(v);
|
||||
}
|
||||
|
||||
|
|
|
@ -1479,6 +1479,7 @@ static void build_r4000_tlb_refill_handler(void)
|
|||
|
||||
static void setup_pw(void)
|
||||
{
|
||||
unsigned int pwctl;
|
||||
unsigned long pgd_i, pgd_w;
|
||||
#ifndef __PAGETABLE_PMD_FOLDED
|
||||
unsigned long pmd_i, pmd_w;
|
||||
|
@ -1505,6 +1506,7 @@ static void setup_pw(void)
|
|||
|
||||
pte_i = ilog2(_PAGE_GLOBAL);
|
||||
pte_w = 0;
|
||||
pwctl = 1 << 30; /* Set PWDirExt */
|
||||
|
||||
#ifndef __PAGETABLE_PMD_FOLDED
|
||||
write_c0_pwfield(pgd_i << 24 | pmd_i << 12 | pt_i << 6 | pte_i);
|
||||
|
@ -1515,8 +1517,9 @@ static void setup_pw(void)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
|
||||
write_c0_pwctl(1 << 6 | psn);
|
||||
pwctl |= (1 << 6 | psn);
|
||||
#endif
|
||||
write_c0_pwctl(pwctl);
|
||||
write_c0_kpgd((long)swapper_pg_dir);
|
||||
kscratch_used_mask |= (1 << 7); /* KScratch6 is used for KPGD */
|
||||
}
|
||||
|
|
|
@ -145,6 +145,12 @@ extern pmd_t hash__pmdp_huge_get_and_clear(struct mm_struct *mm,
|
|||
extern int hash__has_transparent_hugepage(void);
|
||||
#endif
|
||||
|
||||
static inline pmd_t hash__pmd_mkdevmap(pmd_t pmd)
|
||||
{
|
||||
BUG();
|
||||
return pmd;
|
||||
}
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#endif /* _ASM_POWERPC_BOOK3S_64_HASH_4K_H */
|
||||
|
|
|
@ -233,7 +233,7 @@ static inline void mark_hpte_slot_valid(unsigned char *hpte_slot_array,
|
|||
*/
|
||||
static inline int hash__pmd_trans_huge(pmd_t pmd)
|
||||
{
|
||||
return !!((pmd_val(pmd) & (_PAGE_PTE | H_PAGE_THP_HUGE)) ==
|
||||
return !!((pmd_val(pmd) & (_PAGE_PTE | H_PAGE_THP_HUGE | _PAGE_DEVMAP)) ==
|
||||
(_PAGE_PTE | H_PAGE_THP_HUGE));
|
||||
}
|
||||
|
||||
|
@ -259,6 +259,12 @@ extern pmd_t hash__pmdp_huge_get_and_clear(struct mm_struct *mm,
|
|||
unsigned long addr, pmd_t *pmdp);
|
||||
extern int hash__has_transparent_hugepage(void);
|
||||
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
|
||||
|
||||
static inline pmd_t hash__pmd_mkdevmap(pmd_t pmd)
|
||||
{
|
||||
return __pmd(pmd_val(pmd) | (_PAGE_PTE | H_PAGE_THP_HUGE | _PAGE_DEVMAP));
|
||||
}
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* _ASM_POWERPC_BOOK3S_64_HASH_64K_H */
|
||||
|
|
|
@ -1253,7 +1253,9 @@ extern void serialize_against_pte_lookup(struct mm_struct *mm);
|
|||
|
||||
static inline pmd_t pmd_mkdevmap(pmd_t pmd)
|
||||
{
|
||||
return __pmd(pmd_val(pmd) | (_PAGE_PTE | _PAGE_DEVMAP));
|
||||
if (radix_enabled())
|
||||
return radix__pmd_mkdevmap(pmd);
|
||||
return hash__pmd_mkdevmap(pmd);
|
||||
}
|
||||
|
||||
static inline int pmd_devmap(pmd_t pmd)
|
||||
|
|
|
@ -255,6 +255,11 @@ extern pmd_t radix__pmdp_huge_get_and_clear(struct mm_struct *mm,
|
|||
extern int radix__has_transparent_hugepage(void);
|
||||
#endif
|
||||
|
||||
static inline pmd_t radix__pmd_mkdevmap(pmd_t pmd)
|
||||
{
|
||||
return __pmd(pmd_val(pmd) | (_PAGE_PTE | _PAGE_DEVMAP));
|
||||
}
|
||||
|
||||
extern int __meminit radix__vmemmap_create_mapping(unsigned long start,
|
||||
unsigned long page_size,
|
||||
unsigned long phys);
|
||||
|
|
|
@ -28,12 +28,12 @@ struct drmem_lmb_info {
|
|||
extern struct drmem_lmb_info *drmem_info;
|
||||
|
||||
#define for_each_drmem_lmb_in_range(lmb, start, end) \
|
||||
for ((lmb) = (start); (lmb) <= (end); (lmb)++)
|
||||
for ((lmb) = (start); (lmb) < (end); (lmb)++)
|
||||
|
||||
#define for_each_drmem_lmb(lmb) \
|
||||
for_each_drmem_lmb_in_range((lmb), \
|
||||
&drmem_info->lmbs[0], \
|
||||
&drmem_info->lmbs[drmem_info->n_lmbs - 1])
|
||||
&drmem_info->lmbs[drmem_info->n_lmbs])
|
||||
|
||||
/*
|
||||
* The of_drconf_cell_v1 struct defines the layout of the LMB data
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
|
||||
#define JMP_BUF_LEN 23
|
||||
|
||||
extern long setjmp(long *);
|
||||
extern void longjmp(long *, long);
|
||||
typedef long jmp_buf[JMP_BUF_LEN];
|
||||
|
||||
extern int setjmp(jmp_buf env) __attribute__((returns_twice));
|
||||
extern void longjmp(jmp_buf env, int val) __attribute__((noreturn));
|
||||
|
||||
#endif /* _ASM_POWERPC_SETJMP_H */
|
||||
|
|
|
@ -5,9 +5,6 @@
|
|||
|
||||
CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
|
||||
|
||||
# Avoid clang warnings around longjmp/setjmp declarations
|
||||
CFLAGS_crash.o += -ffreestanding
|
||||
|
||||
subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
|
||||
|
||||
ifdef CONFIG_PPC64
|
||||
|
|
|
@ -2188,11 +2188,13 @@ static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
|
|||
* oprofile_cpu_type already has a value, then we are
|
||||
* possibly overriding a real PVR with a logical one,
|
||||
* and, in that case, keep the current value for
|
||||
* oprofile_cpu_type.
|
||||
* oprofile_cpu_type. Futhermore, let's ensure that the
|
||||
* fix for the PMAO bug is enabled on compatibility mode.
|
||||
*/
|
||||
if (old.oprofile_cpu_type != NULL) {
|
||||
t->oprofile_cpu_type = old.oprofile_cpu_type;
|
||||
t->oprofile_type = old.oprofile_type;
|
||||
t->cpu_features |= old.cpu_features & CPU_FTR_PMAO_BUG;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -170,8 +170,11 @@ core_idle_lock_held:
|
|||
bne- core_idle_lock_held
|
||||
blr
|
||||
|
||||
/* Reuse an unused pt_regs slot for IAMR */
|
||||
/* Reuse some unused pt_regs slots for AMR/IAMR/UAMOR/UAMOR */
|
||||
#define PNV_POWERSAVE_AMR _TRAP
|
||||
#define PNV_POWERSAVE_IAMR _DAR
|
||||
#define PNV_POWERSAVE_UAMOR _DSISR
|
||||
#define PNV_POWERSAVE_AMOR RESULT
|
||||
|
||||
/*
|
||||
* Pass requested state in r3:
|
||||
|
@ -205,8 +208,16 @@ pnv_powersave_common:
|
|||
SAVE_NVGPRS(r1)
|
||||
|
||||
BEGIN_FTR_SECTION
|
||||
mfspr r4, SPRN_AMR
|
||||
mfspr r5, SPRN_IAMR
|
||||
mfspr r6, SPRN_UAMOR
|
||||
std r4, PNV_POWERSAVE_AMR(r1)
|
||||
std r5, PNV_POWERSAVE_IAMR(r1)
|
||||
std r6, PNV_POWERSAVE_UAMOR(r1)
|
||||
BEGIN_FTR_SECTION_NESTED(42)
|
||||
mfspr r7, SPRN_AMOR
|
||||
std r7, PNV_POWERSAVE_AMOR(r1)
|
||||
END_FTR_SECTION_NESTED_IFSET(CPU_FTR_HVMODE, 42)
|
||||
END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
|
||||
|
||||
mfcr r5
|
||||
|
@ -935,12 +946,20 @@ END_FTR_SECTION_IFSET(CPU_FTR_HVMODE)
|
|||
REST_GPR(2, r1)
|
||||
|
||||
BEGIN_FTR_SECTION
|
||||
/* IAMR was saved in pnv_powersave_common() */
|
||||
/* These regs were saved in pnv_powersave_common() */
|
||||
ld r4, PNV_POWERSAVE_AMR(r1)
|
||||
ld r5, PNV_POWERSAVE_IAMR(r1)
|
||||
ld r6, PNV_POWERSAVE_UAMOR(r1)
|
||||
mtspr SPRN_AMR, r4
|
||||
mtspr SPRN_IAMR, r5
|
||||
mtspr SPRN_UAMOR, r6
|
||||
BEGIN_FTR_SECTION_NESTED(42)
|
||||
ld r7, PNV_POWERSAVE_AMOR(r1)
|
||||
mtspr SPRN_AMOR, r7
|
||||
END_FTR_SECTION_NESTED_IFSET(CPU_FTR_HVMODE, 42)
|
||||
/*
|
||||
* We don't need an isync here because the upcoming mtmsrd is
|
||||
* execution synchronizing.
|
||||
* We don't need an isync here after restoring IAMR because the upcoming
|
||||
* mtmsrd is execution synchronizing.
|
||||
*/
|
||||
END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
|
||||
|
||||
|
|
|
@ -277,6 +277,9 @@ int kprobe_handler(struct pt_regs *regs)
|
|||
if (user_mode(regs))
|
||||
return 0;
|
||||
|
||||
if (!(regs->msr & MSR_IR) || !(regs->msr & MSR_DR))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* We don't want to be preempted for the entire
|
||||
* duration of kprobe processing
|
||||
|
|
|
@ -518,6 +518,8 @@ static bool __init parse_cache_info(struct device_node *np,
|
|||
lsizep = of_get_property(np, propnames[3], NULL);
|
||||
if (bsizep == NULL)
|
||||
bsizep = lsizep;
|
||||
if (lsizep == NULL)
|
||||
lsizep = bsizep;
|
||||
if (lsizep != NULL)
|
||||
lsize = be32_to_cpu(*lsizep);
|
||||
if (bsizep != NULL)
|
||||
|
|
|
@ -477,8 +477,10 @@ static long restore_tm_sigcontexts(struct task_struct *tsk,
|
|||
err |= __get_user(tsk->thread.ckpt_regs.ccr,
|
||||
&sc->gp_regs[PT_CCR]);
|
||||
|
||||
/* Don't allow userspace to set the trap value */
|
||||
regs->trap = 0;
|
||||
|
||||
/* These regs are not checkpointed; they can go in 'regs'. */
|
||||
err |= __get_user(regs->trap, &sc->gp_regs[PT_TRAP]);
|
||||
err |= __get_user(regs->dar, &sc->gp_regs[PT_DAR]);
|
||||
err |= __get_user(regs->dsisr, &sc->gp_regs[PT_DSISR]);
|
||||
err |= __get_user(regs->result, &sc->gp_regs[PT_RESULT]);
|
||||
|
|
|
@ -492,35 +492,6 @@ static inline void clear_irq_work_pending(void)
|
|||
"i" (offsetof(struct paca_struct, irq_work_pending)));
|
||||
}
|
||||
|
||||
void arch_irq_work_raise(void)
|
||||
{
|
||||
preempt_disable();
|
||||
set_irq_work_pending_flag();
|
||||
/*
|
||||
* Non-nmi code running with interrupts disabled will replay
|
||||
* irq_happened before it re-enables interrupts, so setthe
|
||||
* decrementer there instead of causing a hardware exception
|
||||
* which would immediately hit the masked interrupt handler
|
||||
* and have the net effect of setting the decrementer in
|
||||
* irq_happened.
|
||||
*
|
||||
* NMI interrupts can not check this when they return, so the
|
||||
* decrementer hardware exception is raised, which will fire
|
||||
* when interrupts are next enabled.
|
||||
*
|
||||
* BookE does not support this yet, it must audit all NMI
|
||||
* interrupt handlers to ensure they call nmi_enter() so this
|
||||
* check would be correct.
|
||||
*/
|
||||
if (IS_ENABLED(CONFIG_BOOKE) || !irqs_disabled() || in_nmi()) {
|
||||
set_dec(1);
|
||||
} else {
|
||||
hard_irq_disable();
|
||||
local_paca->irq_happened |= PACA_IRQ_DEC;
|
||||
}
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
#else /* 32-bit */
|
||||
|
||||
DEFINE_PER_CPU(u8, irq_work_pending);
|
||||
|
@ -529,16 +500,27 @@ DEFINE_PER_CPU(u8, irq_work_pending);
|
|||
#define test_irq_work_pending() __this_cpu_read(irq_work_pending)
|
||||
#define clear_irq_work_pending() __this_cpu_write(irq_work_pending, 0)
|
||||
|
||||
#endif /* 32 vs 64 bit */
|
||||
|
||||
void arch_irq_work_raise(void)
|
||||
{
|
||||
/*
|
||||
* 64-bit code that uses irq soft-mask can just cause an immediate
|
||||
* interrupt here that gets soft masked, if this is called under
|
||||
* local_irq_disable(). It might be possible to prevent that happening
|
||||
* by noticing interrupts are disabled and setting decrementer pending
|
||||
* to be replayed when irqs are enabled. The problem there is that
|
||||
* tracing can call irq_work_raise, including in code that does low
|
||||
* level manipulations of irq soft-mask state (e.g., trace_hardirqs_on)
|
||||
* which could get tangled up if we're messing with the same state
|
||||
* here.
|
||||
*/
|
||||
preempt_disable();
|
||||
set_irq_work_pending_flag();
|
||||
set_dec(1);
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
#endif /* 32 vs 64 bit */
|
||||
|
||||
#else /* CONFIG_IRQ_WORK */
|
||||
|
||||
#define test_irq_work_pending() 0
|
||||
|
|
|
@ -322,6 +322,12 @@ SECTIONS
|
|||
*(.branch_lt)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_INFO_BTF
|
||||
.BTF : AT(ADDR(.BTF) - LOAD_OFFSET) {
|
||||
*(.BTF)
|
||||
}
|
||||
#endif
|
||||
|
||||
.opd : AT(ADDR(.opd) - LOAD_OFFSET) {
|
||||
__start_opd = .;
|
||||
KEEP(*(.opd))
|
||||
|
|
|
@ -402,7 +402,7 @@ _GLOBAL(set_context)
|
|||
* extern void loadcam_entry(unsigned int index)
|
||||
*
|
||||
* Load TLBCAM[index] entry in to the L2 CAM MMU
|
||||
* Must preserve r7, r8, r9, and r10
|
||||
* Must preserve r7, r8, r9, r10 and r11
|
||||
*/
|
||||
_GLOBAL(loadcam_entry)
|
||||
mflr r5
|
||||
|
@ -438,6 +438,10 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_BIG_PHYS)
|
|||
*/
|
||||
_GLOBAL(loadcam_multi)
|
||||
mflr r8
|
||||
/* Don't switch to AS=1 if already there */
|
||||
mfmsr r11
|
||||
andi. r11,r11,MSR_IS
|
||||
bne 10f
|
||||
|
||||
/*
|
||||
* Set up temporary TLB entry that is the same as what we're
|
||||
|
@ -463,6 +467,7 @@ _GLOBAL(loadcam_multi)
|
|||
mtmsr r6
|
||||
isync
|
||||
|
||||
10:
|
||||
mr r9,r3
|
||||
add r10,r3,r4
|
||||
2: bl loadcam_entry
|
||||
|
@ -471,6 +476,10 @@ _GLOBAL(loadcam_multi)
|
|||
mr r3,r9
|
||||
blt 2b
|
||||
|
||||
/* Don't return to AS=0 if we were in AS=1 at function start */
|
||||
andi. r11,r11,MSR_IS
|
||||
bne 3f
|
||||
|
||||
/* Return to AS=0 and clear the temporary entry */
|
||||
mfmsr r6
|
||||
rlwinm. r6,r6,0,~(MSR_IS|MSR_DS)
|
||||
|
@ -486,6 +495,7 @@ _GLOBAL(loadcam_multi)
|
|||
tlbwe
|
||||
isync
|
||||
|
||||
3:
|
||||
mtlr r8
|
||||
blr
|
||||
#endif
|
||||
|
|
|
@ -299,23 +299,6 @@ static int __init maple_probe(void)
|
|||
return 1;
|
||||
}
|
||||
|
||||
define_machine(maple) {
|
||||
.name = "Maple",
|
||||
.probe = maple_probe,
|
||||
.setup_arch = maple_setup_arch,
|
||||
.init_IRQ = maple_init_IRQ,
|
||||
.pci_irq_fixup = maple_pci_irq_fixup,
|
||||
.pci_get_legacy_ide_irq = maple_pci_get_legacy_ide_irq,
|
||||
.restart = maple_restart,
|
||||
.halt = maple_halt,
|
||||
.get_boot_time = maple_get_boot_time,
|
||||
.set_rtc_time = maple_set_rtc_time,
|
||||
.get_rtc_time = maple_get_rtc_time,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = maple_progress,
|
||||
.power_save = power4_idle,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_EDAC
|
||||
/*
|
||||
* Register a platform device for CPC925 memory controller on
|
||||
|
@ -372,3 +355,20 @@ static int __init maple_cpc925_edac_setup(void)
|
|||
}
|
||||
machine_device_initcall(maple, maple_cpc925_edac_setup);
|
||||
#endif
|
||||
|
||||
define_machine(maple) {
|
||||
.name = "Maple",
|
||||
.probe = maple_probe,
|
||||
.setup_arch = maple_setup_arch,
|
||||
.init_IRQ = maple_init_IRQ,
|
||||
.pci_irq_fixup = maple_pci_irq_fixup,
|
||||
.pci_get_legacy_ide_irq = maple_pci_get_legacy_ide_irq,
|
||||
.restart = maple_restart,
|
||||
.halt = maple_halt,
|
||||
.get_boot_time = maple_get_boot_time,
|
||||
.set_rtc_time = maple_set_rtc_time,
|
||||
.get_rtc_time = maple_get_rtc_time,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = maple_progress,
|
||||
.power_save = power4_idle,
|
||||
};
|
||||
|
|
|
@ -227,7 +227,7 @@ static int get_lmb_range(u32 drc_index, int n_lmbs,
|
|||
struct drmem_lmb **end_lmb)
|
||||
{
|
||||
struct drmem_lmb *lmb, *start, *end;
|
||||
struct drmem_lmb *last_lmb;
|
||||
struct drmem_lmb *limit;
|
||||
|
||||
start = NULL;
|
||||
for_each_drmem_lmb(lmb) {
|
||||
|
@ -240,10 +240,10 @@ static int get_lmb_range(u32 drc_index, int n_lmbs,
|
|||
if (!start)
|
||||
return -EINVAL;
|
||||
|
||||
end = &start[n_lmbs - 1];
|
||||
end = &start[n_lmbs];
|
||||
|
||||
last_lmb = &drmem_info->lmbs[drmem_info->n_lmbs - 1];
|
||||
if (end > last_lmb)
|
||||
limit = &drmem_info->lmbs[drmem_info->n_lmbs];
|
||||
if (end > limit)
|
||||
return -EINVAL;
|
||||
|
||||
*start_lmb = start;
|
||||
|
|
|
@ -1056,7 +1056,7 @@ static int __init vpa_debugfs_init(void)
|
|||
{
|
||||
char name[16];
|
||||
long i;
|
||||
static struct dentry *vpa_dir;
|
||||
struct dentry *vpa_dir;
|
||||
|
||||
if (!firmware_has_feature(FW_FEATURE_SPLPAR))
|
||||
return 0;
|
||||
|
|
|
@ -72,13 +72,6 @@ static u32 xive_ipi_irq;
|
|||
/* Xive state for each CPU */
|
||||
static DEFINE_PER_CPU(struct xive_cpu *, xive_cpu);
|
||||
|
||||
/*
|
||||
* A "disabled" interrupt should never fire, to catch problems
|
||||
* we set its logical number to this
|
||||
*/
|
||||
#define XIVE_BAD_IRQ 0x7fffffff
|
||||
#define XIVE_MAX_IRQ (XIVE_BAD_IRQ - 1)
|
||||
|
||||
/* An invalid CPU target */
|
||||
#define XIVE_INVALID_TARGET (-1)
|
||||
|
||||
|
@ -1074,7 +1067,7 @@ static int xive_setup_cpu_ipi(unsigned int cpu)
|
|||
xc = per_cpu(xive_cpu, cpu);
|
||||
|
||||
/* Check if we are already setup */
|
||||
if (xc->hw_ipi != 0)
|
||||
if (xc->hw_ipi != XIVE_BAD_IRQ)
|
||||
return 0;
|
||||
|
||||
/* Grab an IPI from the backend, this will populate xc->hw_ipi */
|
||||
|
@ -1111,7 +1104,7 @@ static void xive_cleanup_cpu_ipi(unsigned int cpu, struct xive_cpu *xc)
|
|||
/* Disable the IPI and free the IRQ data */
|
||||
|
||||
/* Already cleaned up ? */
|
||||
if (xc->hw_ipi == 0)
|
||||
if (xc->hw_ipi == XIVE_BAD_IRQ)
|
||||
return;
|
||||
|
||||
/* Mask the IPI */
|
||||
|
@ -1267,6 +1260,7 @@ static int xive_prepare_cpu(unsigned int cpu)
|
|||
if (np)
|
||||
xc->chip_id = of_get_ibm_chip_id(np);
|
||||
of_node_put(np);
|
||||
xc->hw_ipi = XIVE_BAD_IRQ;
|
||||
|
||||
per_cpu(xive_cpu, cpu) = xc;
|
||||
}
|
||||
|
|
|
@ -311,7 +311,7 @@ static void xive_native_put_ipi(unsigned int cpu, struct xive_cpu *xc)
|
|||
s64 rc;
|
||||
|
||||
/* Free the IPI */
|
||||
if (!xc->hw_ipi)
|
||||
if (xc->hw_ipi == XIVE_BAD_IRQ)
|
||||
return;
|
||||
for (;;) {
|
||||
rc = opal_xive_free_irq(xc->hw_ipi);
|
||||
|
@ -319,7 +319,7 @@ static void xive_native_put_ipi(unsigned int cpu, struct xive_cpu *xc)
|
|||
msleep(OPAL_BUSY_DELAY_MS);
|
||||
continue;
|
||||
}
|
||||
xc->hw_ipi = 0;
|
||||
xc->hw_ipi = XIVE_BAD_IRQ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -509,11 +509,11 @@ static int xive_spapr_get_ipi(unsigned int cpu, struct xive_cpu *xc)
|
|||
|
||||
static void xive_spapr_put_ipi(unsigned int cpu, struct xive_cpu *xc)
|
||||
{
|
||||
if (!xc->hw_ipi)
|
||||
if (xc->hw_ipi == XIVE_BAD_IRQ)
|
||||
return;
|
||||
|
||||
xive_irq_bitmap_free(xc->hw_ipi);
|
||||
xc->hw_ipi = 0;
|
||||
xc->hw_ipi = XIVE_BAD_IRQ;
|
||||
}
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
|
|
|
@ -9,6 +9,13 @@
|
|||
#ifndef __XIVE_INTERNAL_H
|
||||
#define __XIVE_INTERNAL_H
|
||||
|
||||
/*
|
||||
* A "disabled" interrupt should never fire, to catch problems
|
||||
* we set its logical number to this
|
||||
*/
|
||||
#define XIVE_BAD_IRQ 0x7fffffff
|
||||
#define XIVE_MAX_IRQ (XIVE_BAD_IRQ - 1)
|
||||
|
||||
/* Each CPU carry one of these with various per-CPU state */
|
||||
struct xive_cpu {
|
||||
#ifdef CONFIG_SMP
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Makefile for xmon
|
||||
|
||||
# Avoid clang warnings around longjmp/setjmp declarations
|
||||
subdir-ccflags-y := -ffreestanding
|
||||
|
||||
subdir-ccflags-$(CONFIG_PPC_WERROR) += -Werror
|
||||
|
||||
GCOV_PROFILE := n
|
||||
|
|
|
@ -16,6 +16,10 @@
|
|||
#include <linux/err.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/moduleloader.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/sizes.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/sections.h>
|
||||
|
||||
static int apply_r_riscv_32_rela(struct module *me, u32 *location, Elf_Addr v)
|
||||
{
|
||||
|
@ -394,3 +398,15 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_MMU) && defined(CONFIG_64BIT)
|
||||
#define VMALLOC_MODULE_START \
|
||||
max(PFN_ALIGN((unsigned long)&_end - SZ_2G), VMALLOC_START)
|
||||
void *module_alloc(unsigned long size)
|
||||
{
|
||||
return __vmalloc_node_range(size, 1, VMALLOC_MODULE_START,
|
||||
VMALLOC_END, GFP_KERNEL,
|
||||
PAGE_KERNEL_EXEC, 0, NUMA_NO_NODE,
|
||||
__builtin_return_address(0));
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -140,7 +140,7 @@ all: bzImage
|
|||
#KBUILD_IMAGE is necessary for packaging targets like rpm-pkg, deb-pkg...
|
||||
KBUILD_IMAGE := $(boot)/bzImage
|
||||
|
||||
install: vmlinux
|
||||
install:
|
||||
$(Q)$(MAKE) $(build)=$(boot) $@
|
||||
|
||||
bzImage: vmlinux
|
||||
|
|
|
@ -46,7 +46,7 @@ quiet_cmd_ar = AR $@
|
|||
$(obj)/startup.a: $(OBJECTS) FORCE
|
||||
$(call if_changed,ar)
|
||||
|
||||
install: $(CONFIGURE) $(obj)/bzImage
|
||||
install:
|
||||
sh -x $(srctree)/$(obj)/install.sh $(KERNELRELEASE) $(obj)/bzImage \
|
||||
System.map "$(INSTALL_PATH)"
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@ struct qdio_buffer {
|
|||
* @sbal: absolute SBAL address
|
||||
*/
|
||||
struct sl_element {
|
||||
unsigned long sbal;
|
||||
u64 sbal;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/**
|
||||
|
|
|
@ -79,7 +79,7 @@ static int show_diag_stat(struct seq_file *m, void *v)
|
|||
|
||||
static void *show_diag_stat_start(struct seq_file *m, loff_t *pos)
|
||||
{
|
||||
return *pos <= nr_cpu_ids ? (void *)((unsigned long) *pos + 1) : NULL;
|
||||
return *pos <= NR_DIAG_STAT ? (void *)((unsigned long) *pos + 1) : NULL;
|
||||
}
|
||||
|
||||
static void *show_diag_stat_next(struct seq_file *m, void *v, loff_t *pos)
|
||||
|
|
|
@ -1537,6 +1537,7 @@ static void hw_collect_aux(struct cpu_hw_sf *cpuhw)
|
|||
perf_aux_output_end(handle, size);
|
||||
num_sdb = aux->sfb.num_sdb;
|
||||
|
||||
num_sdb = aux->sfb.num_sdb;
|
||||
while (!done) {
|
||||
/* Get an output handle */
|
||||
aux = perf_aux_output_begin(handle, cpuhw->event);
|
||||
|
|
|
@ -157,8 +157,9 @@ static void show_cpu_mhz(struct seq_file *m, unsigned long n)
|
|||
static int show_cpuinfo(struct seq_file *m, void *v)
|
||||
{
|
||||
unsigned long n = (unsigned long) v - 1;
|
||||
unsigned long first = cpumask_first(cpu_online_mask);
|
||||
|
||||
if (!n)
|
||||
if (n == first)
|
||||
show_cpu_summary(m, v);
|
||||
if (!machine_has_cpu_mhz)
|
||||
return 0;
|
||||
|
@ -171,6 +172,8 @@ static inline void *c_update(loff_t *pos)
|
|||
{
|
||||
if (*pos)
|
||||
*pos = cpumask_next(*pos - 1, cpu_online_mask);
|
||||
else
|
||||
*pos = cpumask_first(cpu_online_mask);
|
||||
return *pos < nr_cpu_ids ? (void *)*pos + 1 : NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -1666,6 +1666,9 @@ static int gfn_to_memslot_approx(struct kvm_memslots *slots, gfn_t gfn)
|
|||
start = slot + 1;
|
||||
}
|
||||
|
||||
if (start >= slots->used_slots)
|
||||
return slots->used_slots - 1;
|
||||
|
||||
if (gfn >= memslots[start].base_gfn &&
|
||||
gfn < memslots[start].base_gfn + memslots[start].npages) {
|
||||
atomic_set(&slots->lru_slot, start);
|
||||
|
|
|
@ -1024,6 +1024,7 @@ static int vsie_run(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
|
|||
scb_s->iprcc = PGM_ADDRESSING;
|
||||
scb_s->pgmilc = 4;
|
||||
scb_s->gpsw.addr = __rewind_psw(scb_s->gpsw, 4);
|
||||
rc = 1;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -64,10 +64,13 @@ mm_segment_t enable_sacf_uaccess(void)
|
|||
{
|
||||
mm_segment_t old_fs;
|
||||
unsigned long asce, cr;
|
||||
unsigned long flags;
|
||||
|
||||
old_fs = current->thread.mm_segment;
|
||||
if (old_fs & 1)
|
||||
return old_fs;
|
||||
/* protect against a concurrent page table upgrade */
|
||||
local_irq_save(flags);
|
||||
current->thread.mm_segment |= 1;
|
||||
asce = S390_lowcore.kernel_asce;
|
||||
if (likely(old_fs == USER_DS)) {
|
||||
|
@ -83,6 +86,7 @@ mm_segment_t enable_sacf_uaccess(void)
|
|||
__ctl_load(asce, 7, 7);
|
||||
set_cpu_flag(CIF_ASCE_SECONDARY);
|
||||
}
|
||||
local_irq_restore(flags);
|
||||
return old_fs;
|
||||
}
|
||||
EXPORT_SYMBOL(enable_sacf_uaccess);
|
||||
|
|
|
@ -787,14 +787,18 @@ static void gmap_call_notifier(struct gmap *gmap, unsigned long start,
|
|||
static inline unsigned long *gmap_table_walk(struct gmap *gmap,
|
||||
unsigned long gaddr, int level)
|
||||
{
|
||||
const int asce_type = gmap->asce & _ASCE_TYPE_MASK;
|
||||
unsigned long *table;
|
||||
|
||||
if ((gmap->asce & _ASCE_TYPE_MASK) + 4 < (level * 4))
|
||||
return NULL;
|
||||
if (gmap_is_shadow(gmap) && gmap->removed)
|
||||
return NULL;
|
||||
if (gaddr & (-1UL << (31 + ((gmap->asce & _ASCE_TYPE_MASK) >> 2)*11)))
|
||||
|
||||
if (asce_type != _ASCE_TYPE_REGION1 &&
|
||||
gaddr & (-1UL << (31 + (asce_type >> 2) * 11)))
|
||||
return NULL;
|
||||
|
||||
table = gmap->table;
|
||||
switch (gmap->asce & _ASCE_TYPE_MASK) {
|
||||
case _ASCE_TYPE_REGION1:
|
||||
|
@ -1834,6 +1838,7 @@ int gmap_shadow_r3t(struct gmap *sg, unsigned long saddr, unsigned long r3t,
|
|||
goto out_free;
|
||||
} else if (*table & _REGION_ENTRY_ORIGIN) {
|
||||
rc = -EAGAIN; /* Race with shadow */
|
||||
goto out_free;
|
||||
}
|
||||
crst_table_init(s_r3t, _REGION3_ENTRY_EMPTY);
|
||||
/* mark as invalid as long as the parent table is not protected */
|
||||
|
|
|
@ -72,8 +72,20 @@ static void __crst_table_upgrade(void *arg)
|
|||
{
|
||||
struct mm_struct *mm = arg;
|
||||
|
||||
if (current->active_mm == mm)
|
||||
set_user_asce(mm);
|
||||
/* we must change all active ASCEs to avoid the creation of new TLBs */
|
||||
if (current->active_mm == mm) {
|
||||
S390_lowcore.user_asce = mm->context.asce;
|
||||
if (current->thread.mm_segment == USER_DS) {
|
||||
__ctl_load(S390_lowcore.user_asce, 1, 1);
|
||||
/* Mark user-ASCE present in CR1 */
|
||||
clear_cpu_flag(CIF_ASCE_PRIMARY);
|
||||
}
|
||||
if (current->thread.mm_segment == USER_DS_SACF) {
|
||||
__ctl_load(S390_lowcore.user_asce, 7, 7);
|
||||
/* enable_sacf_uaccess does all or nothing */
|
||||
WARN_ON(!test_cpu_flag(CIF_ASCE_SECONDARY));
|
||||
}
|
||||
}
|
||||
__tlb_flush_local();
|
||||
}
|
||||
|
||||
|
|
|
@ -1574,7 +1574,9 @@ int io_thread(void *arg)
|
|||
written = 0;
|
||||
|
||||
do {
|
||||
res = os_write_file(kernel_fd, ((char *) io_req_buffer) + written, n);
|
||||
res = os_write_file(kernel_fd,
|
||||
((char *) io_req_buffer) + written,
|
||||
n - written);
|
||||
if (res >= 0) {
|
||||
written += res;
|
||||
} else {
|
||||
|
|
|
@ -106,7 +106,7 @@ ENTRY(startup_32)
|
|||
notl %eax
|
||||
andl %eax, %ebx
|
||||
cmpl $LOAD_PHYSICAL_ADDR, %ebx
|
||||
jge 1f
|
||||
jae 1f
|
||||
#endif
|
||||
movl $LOAD_PHYSICAL_ADDR, %ebx
|
||||
1:
|
||||
|
|
|
@ -106,7 +106,7 @@ ENTRY(startup_32)
|
|||
notl %eax
|
||||
andl %eax, %ebx
|
||||
cmpl $LOAD_PHYSICAL_ADDR, %ebx
|
||||
jge 1f
|
||||
jae 1f
|
||||
#endif
|
||||
movl $LOAD_PHYSICAL_ADDR, %ebx
|
||||
1:
|
||||
|
@ -297,7 +297,7 @@ ENTRY(startup_64)
|
|||
notq %rax
|
||||
andq %rax, %rbp
|
||||
cmpq $LOAD_PHYSICAL_ADDR, %rbp
|
||||
jge 1f
|
||||
jae 1f
|
||||
#endif
|
||||
movq $LOAD_PHYSICAL_ADDR, %rbp
|
||||
1:
|
||||
|
|
|
@ -29,9 +29,6 @@
|
|||
#define __PAGE_OFFSET __PAGE_OFFSET_BASE
|
||||
#include "../../mm/ident_map.c"
|
||||
|
||||
/* Used by pgtable.h asm code to force instruction serialization. */
|
||||
unsigned long __force_order;
|
||||
|
||||
/* Used to track our page table allocation area. */
|
||||
struct alloc_pgt_data {
|
||||
unsigned char *pgt_buf;
|
||||
|
|
|
@ -1489,6 +1489,7 @@ ENTRY(int3)
|
|||
END(int3)
|
||||
|
||||
ENTRY(general_protection)
|
||||
ASM_CLAC
|
||||
pushl $do_general_protection
|
||||
jmp common_exception
|
||||
END(general_protection)
|
||||
|
|
|
@ -193,20 +193,18 @@ static int amd_uncore_event_init(struct perf_event *event)
|
|||
|
||||
/*
|
||||
* NB and Last level cache counters (MSRs) are shared across all cores
|
||||
* that share the same NB / Last level cache. Interrupts can be directed
|
||||
* to a single target core, however, event counts generated by processes
|
||||
* running on other cores cannot be masked out. So we do not support
|
||||
* sampling and per-thread events.
|
||||
* that share the same NB / Last level cache. On family 16h and below,
|
||||
* Interrupts can be directed to a single target core, however, event
|
||||
* counts generated by processes running on other cores cannot be masked
|
||||
* out. So we do not support sampling and per-thread events via
|
||||
* CAP_NO_INTERRUPT, and we do not enable counter overflow interrupts:
|
||||
*/
|
||||
if (is_sampling_event(event) || event->attach_state & PERF_ATTACH_TASK)
|
||||
return -EINVAL;
|
||||
|
||||
/* NB and Last level cache counters do not have usr/os/guest/host bits */
|
||||
if (event->attr.exclude_user || event->attr.exclude_kernel ||
|
||||
event->attr.exclude_host || event->attr.exclude_guest)
|
||||
return -EINVAL;
|
||||
|
||||
/* and we do not enable counter overflow interrupts */
|
||||
hwc->config = event->attr.config & AMD64_RAW_EVENT_MASK_NB;
|
||||
hwc->idx = -1;
|
||||
|
||||
|
@ -314,6 +312,7 @@ static struct pmu amd_nb_pmu = {
|
|||
.start = amd_uncore_start,
|
||||
.stop = amd_uncore_stop,
|
||||
.read = amd_uncore_read,
|
||||
.capabilities = PERF_PMU_CAP_NO_INTERRUPT,
|
||||
};
|
||||
|
||||
static struct pmu amd_llc_pmu = {
|
||||
|
@ -324,6 +323,7 @@ static struct pmu amd_llc_pmu = {
|
|||
.start = amd_uncore_start,
|
||||
.stop = amd_uncore_stop,
|
||||
.read = amd_uncore_read,
|
||||
.capabilities = PERF_PMU_CAP_NO_INTERRUPT,
|
||||
};
|
||||
|
||||
static struct amd_uncore *amd_uncore_alloc(unsigned int cpu)
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <linux/clockchips.h>
|
||||
#include <linux/hyperv.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/cpuhotplug.h>
|
||||
|
||||
#ifdef CONFIG_HYPERV_TSCPAGE
|
||||
|
@ -427,11 +428,14 @@ void hyperv_cleanup(void)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(hyperv_cleanup);
|
||||
|
||||
void hyperv_report_panic(struct pt_regs *regs, long err)
|
||||
void hyperv_report_panic(struct pt_regs *regs, long err, bool in_die)
|
||||
{
|
||||
static bool panic_reported;
|
||||
u64 guest_id;
|
||||
|
||||
if (in_die && !panic_on_oops)
|
||||
return;
|
||||
|
||||
/*
|
||||
* We prefer to report panic on 'die' chain as we have proper
|
||||
* registers to report, but if we miss it (e.g. on BUG()) we need
|
||||
|
|
|
@ -622,10 +622,10 @@ struct kvm_vcpu_arch {
|
|||
bool pvclock_set_guest_stopped_request;
|
||||
|
||||
struct {
|
||||
u8 preempted;
|
||||
u64 msr_val;
|
||||
u64 last_steal;
|
||||
struct gfn_to_hva_cache stime;
|
||||
struct kvm_steal_time steal;
|
||||
struct gfn_to_pfn_cache cache;
|
||||
} st;
|
||||
|
||||
u64 tsc_offset;
|
||||
|
@ -1070,7 +1070,7 @@ struct kvm_x86_ops {
|
|||
bool (*xsaves_supported)(void);
|
||||
bool (*umip_emulated)(void);
|
||||
|
||||
int (*check_nested_events)(struct kvm_vcpu *vcpu, bool external_intr);
|
||||
int (*check_nested_events)(struct kvm_vcpu *vcpu);
|
||||
void (*request_immediate_exit)(struct kvm_vcpu *vcpu);
|
||||
|
||||
void (*sched_in)(struct kvm_vcpu *kvm, int cpu);
|
||||
|
|
|
@ -41,7 +41,7 @@ struct microcode_amd {
|
|||
unsigned int mpb[0];
|
||||
};
|
||||
|
||||
#define PATCH_MAX_SIZE PAGE_SIZE
|
||||
#define PATCH_MAX_SIZE (3 * PAGE_SIZE)
|
||||
|
||||
#ifdef CONFIG_MICROCODE_AMD
|
||||
extern void __init load_ucode_amd_bsp(unsigned int family);
|
||||
|
|
|
@ -338,7 +338,7 @@ static inline int cpumask_to_vpset(struct hv_vpset *vpset,
|
|||
|
||||
void __init hyperv_init(void);
|
||||
void hyperv_setup_mmu_ops(void);
|
||||
void hyperv_report_panic(struct pt_regs *regs, long err);
|
||||
void hyperv_report_panic(struct pt_regs *regs, long err, bool in_die);
|
||||
void hyperv_report_panic_msg(phys_addr_t pa, size_t size);
|
||||
bool hv_is_hyperv_initialized(void);
|
||||
void hyperv_cleanup(void);
|
||||
|
|
|
@ -608,12 +608,15 @@ static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot)
|
|||
return __pmd(val);
|
||||
}
|
||||
|
||||
/* mprotect needs to preserve PAT bits when updating vm_page_prot */
|
||||
/*
|
||||
* mprotect needs to preserve PAT and encryption bits when updating
|
||||
* vm_page_prot
|
||||
*/
|
||||
#define pgprot_modify pgprot_modify
|
||||
static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
|
||||
{
|
||||
pgprotval_t preservebits = pgprot_val(oldprot) & _PAGE_CHG_MASK;
|
||||
pgprotval_t addbits = pgprot_val(newprot);
|
||||
pgprotval_t addbits = pgprot_val(newprot) & ~_PAGE_CHG_MASK;
|
||||
return __pgprot(preservebits | addbits);
|
||||
}
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
*/
|
||||
#define _PAGE_CHG_MASK (PTE_PFN_MASK | _PAGE_PCD | _PAGE_PWT | \
|
||||
_PAGE_SPECIAL | _PAGE_ACCESSED | _PAGE_DIRTY | \
|
||||
_PAGE_SOFT_DIRTY | _PAGE_DEVMAP)
|
||||
_PAGE_SOFT_DIRTY | _PAGE_DEVMAP | _PAGE_ENC)
|
||||
#define _HPAGE_CHG_MASK (_PAGE_CHG_MASK | _PAGE_PSE)
|
||||
|
||||
/*
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue