Merge branch x86/cc into x86/core

Pick up dependent cc_platform_has() changes.

Signed-off-by: Borislav Petkov <bp@suse.de>
This commit is contained in:
Borislav Petkov 2021-10-04 17:37:22 +02:00
commit c7419a6e1a
997 changed files with 10688 additions and 5804 deletions

View File

@ -259,7 +259,7 @@ Configuring the kernel
Compiling the kernel Compiling the kernel
-------------------- --------------------
- Make sure you have at least gcc 4.9 available. - Make sure you have at least gcc 5.1 available.
For more information, refer to :ref:`Documentation/process/changes.rst <changes>`. For more information, refer to :ref:`Documentation/process/changes.rst <changes>`.
Please note that you can still run a.out user programs with this kernel. Please note that you can still run a.out user programs with this kernel.

View File

@ -175,9 +175,10 @@ for IRQ numbers that are passed to struct device registrations. In that
case the Linux IRQ numbers cannot be dynamically assigned and the legacy case the Linux IRQ numbers cannot be dynamically assigned and the legacy
mapping should be used. mapping should be used.
As the name implies, the *_legacy() functions are deprecated and only As the name implies, the \*_legacy() functions are deprecated and only
exist to ease the support of ancient platforms. No new users should be exist to ease the support of ancient platforms. No new users should be
added. added. Same goes for the \*_simple() functions when their use results
in the legacy behaviour.
The legacy map assumes a contiguous range of IRQ numbers has already The legacy map assumes a contiguous range of IRQ numbers has already
been allocated for the controller and that the IRQ number can be been allocated for the controller and that the IRQ number can be

View File

@ -54,7 +54,7 @@ properties:
- const: toradex,apalis_t30 - const: toradex,apalis_t30
- const: nvidia,tegra30 - const: nvidia,tegra30
- items: - items:
- const: toradex,apalis_t30-eval-v1.1 - const: toradex,apalis_t30-v1.1-eval
- const: toradex,apalis_t30-eval - const: toradex,apalis_t30-eval
- const: toradex,apalis_t30-v1.1 - const: toradex,apalis_t30-v1.1
- const: toradex,apalis_t30 - const: toradex,apalis_t30

View File

@ -9,7 +9,7 @@ function block.
All DISP device tree nodes must be siblings to the central MMSYS_CONFIG node. All DISP device tree nodes must be siblings to the central MMSYS_CONFIG node.
For a description of the MMSYS_CONFIG binding, see For a description of the MMSYS_CONFIG binding, see
Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt. Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml.
DISP function blocks DISP function blocks
==================== ====================

View File

@ -31,11 +31,11 @@ properties:
clocks: clocks:
minItems: 1 minItems: 1
maxItems: 3 maxItems: 7
clock-names: clock-names:
minItems: 1 minItems: 1
maxItems: 3 maxItems: 7
required: required:
- compatible - compatible
@ -72,6 +72,32 @@ allOf:
contains: contains:
enum: enum:
- qcom,sdm660-a2noc - qcom,sdm660-a2noc
then:
properties:
clocks:
items:
- description: Bus Clock.
- description: Bus A Clock.
- description: IPA Clock.
- description: UFS AXI Clock.
- description: Aggregate2 UFS AXI Clock.
- description: Aggregate2 USB3 AXI Clock.
- description: Config NoC USB2 AXI Clock.
clock-names:
items:
- const: bus
- const: bus_a
- const: ipa
- const: ufs_axi
- const: aggre2_ufs_axi
- const: aggre2_usb3_axi
- const: cfg_noc_usb2_axi
- if:
properties:
compatible:
contains:
enum:
- qcom,sdm660-bimc - qcom,sdm660-bimc
- qcom,sdm660-cnoc - qcom,sdm660-cnoc
- qcom,sdm660-gnoc - qcom,sdm660-gnoc
@ -91,6 +117,7 @@ examples:
- | - |
#include <dt-bindings/clock/qcom,rpmcc.h> #include <dt-bindings/clock/qcom,rpmcc.h>
#include <dt-bindings/clock/qcom,mmcc-sdm660.h> #include <dt-bindings/clock/qcom,mmcc-sdm660.h>
#include <dt-bindings/clock/qcom,gcc-sdm660.h>
bimc: interconnect@1008000 { bimc: interconnect@1008000 {
compatible = "qcom,sdm660-bimc"; compatible = "qcom,sdm660-bimc";
@ -123,9 +150,20 @@ examples:
compatible = "qcom,sdm660-a2noc"; compatible = "qcom,sdm660-a2noc";
reg = <0x01704000 0xc100>; reg = <0x01704000 0xc100>;
#interconnect-cells = <1>; #interconnect-cells = <1>;
clock-names = "bus", "bus_a"; clock-names = "bus",
"bus_a",
"ipa",
"ufs_axi",
"aggre2_ufs_axi",
"aggre2_usb3_axi",
"cfg_noc_usb2_axi";
clocks = <&rpmcc RPM_SMD_AGGR2_NOC_CLK>, clocks = <&rpmcc RPM_SMD_AGGR2_NOC_CLK>,
<&rpmcc RPM_SMD_AGGR2_NOC_A_CLK>; <&rpmcc RPM_SMD_AGGR2_NOC_A_CLK>,
<&rpmcc RPM_SMD_IPA_CLK>,
<&gcc GCC_UFS_AXI_CLK>,
<&gcc GCC_AGGRE2_UFS_AXI_CLK>,
<&gcc GCC_AGGRE2_USB3_AXI_CLK>,
<&gcc GCC_CFG_NOC_USB2_AXI_CLK>;
}; };
mnoc: interconnect@1745000 { mnoc: interconnect@1745000 {

View File

@ -19,7 +19,9 @@ properties:
- const: allwinner,sun8i-v3s-emac - const: allwinner,sun8i-v3s-emac
- const: allwinner,sun50i-a64-emac - const: allwinner,sun50i-a64-emac
- items: - items:
- const: allwinner,sun50i-h6-emac - enum:
- allwinner,sun20i-d1-emac
- allwinner,sun50i-h6-emac
- const: allwinner,sun50i-a64-emac - const: allwinner,sun50i-a64-emac
reg: reg:

View File

@ -0,0 +1,89 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/ufs/samsung,exynos-ufs.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Samsung SoC series UFS host controller Device Tree Bindings
maintainers:
- Alim Akhtar <alim.akhtar@samsung.com>
description: |
Each Samsung UFS host controller instance should have its own node.
This binding define Samsung specific binding other then what is used
in the common ufshcd bindings
[1] Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
properties:
compatible:
enum:
- samsung,exynos7-ufs
reg:
items:
- description: HCI register
- description: vendor specific register
- description: unipro register
- description: UFS protector register
reg-names:
items:
- const: hci
- const: vs_hci
- const: unipro
- const: ufsp
clocks:
items:
- description: ufs link core clock
- description: unipro main clock
clock-names:
items:
- const: core_clk
- const: sclk_unipro_main
interrupts:
maxItems: 1
phys:
maxItems: 1
phy-names:
const: ufs-phy
required:
- compatible
- reg
- interrupts
- phys
- phy-names
- clocks
- clock-names
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/exynos7-clk.h>
ufs: ufs@15570000 {
compatible = "samsung,exynos7-ufs";
reg = <0x15570000 0x100>,
<0x15570100 0x100>,
<0x15571000 0x200>,
<0x15572000 0x300>;
reg-names = "hci", "vs_hci", "unipro", "ufsp";
interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clock_fsys1 ACLK_UFS20_LINK>,
<&clock_fsys1 SCLK_UFSUNIPRO20_USER>;
clock-names = "core_clk", "sclk_unipro_main";
pinctrl-names = "default";
pinctrl-0 = <&ufs_rst_n &ufs_refclk_out>;
phys = <&ufs_phy>;
phy-names = "ufs-phy";
};
...

View File

@ -132,20 +132,3 @@ On Family 17h and Family 18h CPUs, additional temperature sensors may report
Core Complex Die (CCD) temperatures. Up to 8 such temperatures are reported Core Complex Die (CCD) temperatures. Up to 8 such temperatures are reported
as temp{3..10}_input, labeled Tccd{1..8}. Actual support depends on the CPU as temp{3..10}_input, labeled Tccd{1..8}. Actual support depends on the CPU
variant. variant.
Various Family 17h and 18h CPUs report voltage and current telemetry
information. The following attributes may be reported.
Attribute Label Description
=============== ======= ================
in0_input Vcore Core voltage
in1_input Vsoc SoC voltage
curr1_input Icore Core current
curr2_input Isoc SoC current
=============== ======= ================
Current values are raw (unscaled) as reported by the CPU. Core current is
reported as multiples of 1A / LSB. SoC is reported as multiples of 0.25A
/ LSB. The real current is board specific. Reported currents should be seen
as rough guidance, and should be scaled using sensors3.conf as appropriate
for a given board.

View File

@ -851,7 +851,7 @@ NOTES:
- 0x88A8 traffic will not be received unless VLAN stripping is disabled with - 0x88A8 traffic will not be received unless VLAN stripping is disabled with
the following command:: the following command::
# ethool -K <ethX> rxvlan off # ethtool -K <ethX> rxvlan off
- 0x88A8/0x8100 double VLANs cannot be used with 0x8100 or 0x8100/0x8100 VLANS - 0x88A8/0x8100 double VLANs cannot be used with 0x8100 or 0x8100/0x8100 VLANS
configured on the same port. 0x88a8/0x8100 traffic will not be received if configured on the same port. 0x88a8/0x8100 traffic will not be received if

View File

@ -296,7 +296,7 @@ not available.
Device Tree bindings and board design Device Tree bindings and board design
===================================== =====================================
This section references ``Documentation/devicetree/bindings/net/dsa/sja1105.txt`` This section references ``Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml``
and aims to showcase some potential switch caveats. and aims to showcase some potential switch caveats.
RMII PHY role and out-of-band signaling RMII PHY role and out-of-band signaling

View File

@ -29,7 +29,7 @@ you probably needn't concern yourself with pcmciautils.
====================== =============== ======================================== ====================== =============== ========================================
Program Minimal version Command to check the version Program Minimal version Command to check the version
====================== =============== ======================================== ====================== =============== ========================================
GNU C 4.9 gcc --version GNU C 5.1 gcc --version
Clang/LLVM (optional) 10.0.1 clang --version Clang/LLVM (optional) 10.0.1 clang --version
GNU make 3.81 make --version GNU make 3.81 make --version
binutils 2.23 ld -v binutils 2.23 ld -v

View File

@ -223,7 +223,7 @@ Linux内核5.x版本 <http://kernel.org/>
编译内核 编译内核
--------- ---------
- 确保您至少有gcc 4.9可用。 - 确保您至少有gcc 5.1可用。
有关更多信息,请参阅 :ref:`Documentation/process/changes.rst <changes>` 有关更多信息,请参阅 :ref:`Documentation/process/changes.rst <changes>`
请注意您仍然可以使用此内核运行a.out用户程序。 请注意您仍然可以使用此内核运行a.out用户程序。

View File

@ -226,7 +226,7 @@ Linux內核5.x版本 <http://kernel.org/>
編譯內核 編譯內核
--------- ---------
- 確保您至少有gcc 4.9可用。 - 確保您至少有gcc 5.1可用。
有關更多信息,請參閱 :ref:`Documentation/process/changes.rst <changes>` 有關更多信息,請參閱 :ref:`Documentation/process/changes.rst <changes>`
請注意您仍然可以使用此內核運行a.out用戶程序。 請注意您仍然可以使用此內核運行a.out用戶程序。

View File

@ -414,7 +414,8 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
F: drivers/acpi/pmic/ F: drivers/acpi/pmic/
ACPI THERMAL DRIVER ACPI THERMAL DRIVER
M: Zhang Rui <rui.zhang@intel.com> M: Rafael J. Wysocki <rafael@kernel.org>
R: Zhang Rui <rui.zhang@intel.com>
L: linux-acpi@vger.kernel.org L: linux-acpi@vger.kernel.org
S: Supported S: Supported
W: https://01.org/linux-acpi W: https://01.org/linux-acpi
@ -810,7 +811,7 @@ F: Documentation/devicetree/bindings/dma/altr,msgdma.yaml
F: drivers/dma/altera-msgdma.c F: drivers/dma/altera-msgdma.c
ALTERA PIO DRIVER ALTERA PIO DRIVER
M: Joyce Ooi <joyce.ooi@intel.com> M: Mun Yew Tham <mun.yew.tham@intel.com>
L: linux-gpio@vger.kernel.org L: linux-gpio@vger.kernel.org
S: Maintained S: Maintained
F: drivers/gpio/gpio-altera.c F: drivers/gpio/gpio-altera.c
@ -977,12 +978,12 @@ L: platform-driver-x86@vger.kernel.org
S: Maintained S: Maintained
F: drivers/platform/x86/amd-pmc.* F: drivers/platform/x86/amd-pmc.*
AMD POWERPLAY AMD POWERPLAY AND SWSMU
M: Evan Quan <evan.quan@amd.com> M: Evan Quan <evan.quan@amd.com>
L: amd-gfx@lists.freedesktop.org L: amd-gfx@lists.freedesktop.org
S: Supported S: Supported
T: git https://gitlab.freedesktop.org/agd5f/linux.git T: git https://gitlab.freedesktop.org/agd5f/linux.git
F: drivers/gpu/drm/amd/pm/powerplay/ F: drivers/gpu/drm/amd/pm/
AMD PTDMA DRIVER AMD PTDMA DRIVER
M: Sanjay R Mehta <sanju.mehta@amd.com> M: Sanjay R Mehta <sanju.mehta@amd.com>
@ -2804,9 +2805,8 @@ F: arch/arm/mach-pxa/include/mach/vpac270.h
F: arch/arm/mach-pxa/vpac270.c F: arch/arm/mach-pxa/vpac270.c
ARM/VT8500 ARM ARCHITECTURE ARM/VT8500 ARM ARCHITECTURE
M: Tony Prisk <linux@prisktech.co.nz>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained S: Orphan
F: Documentation/devicetree/bindings/i2c/i2c-wmt.txt F: Documentation/devicetree/bindings/i2c/i2c-wmt.txt
F: arch/arm/mach-vt8500/ F: arch/arm/mach-vt8500/
F: drivers/clocksource/timer-vt8500.c F: drivers/clocksource/timer-vt8500.c
@ -2962,7 +2962,7 @@ F: crypto/async_tx/
F: include/linux/async_tx.h F: include/linux/async_tx.h
AT24 EEPROM DRIVER AT24 EEPROM DRIVER
M: Bartosz Golaszewski <bgolaszewski@baylibre.com> M: Bartosz Golaszewski <brgl@bgdev.pl>
L: linux-i2c@vger.kernel.org L: linux-i2c@vger.kernel.org
S: Maintained S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git
@ -3385,9 +3385,11 @@ F: Documentation/networking/filter.rst
F: Documentation/userspace-api/ebpf/ F: Documentation/userspace-api/ebpf/
F: arch/*/net/* F: arch/*/net/*
F: include/linux/bpf* F: include/linux/bpf*
F: include/linux/btf*
F: include/linux/filter.h F: include/linux/filter.h
F: include/trace/events/xdp.h F: include/trace/events/xdp.h
F: include/uapi/linux/bpf* F: include/uapi/linux/bpf*
F: include/uapi/linux/btf*
F: include/uapi/linux/filter.h F: include/uapi/linux/filter.h
F: kernel/bpf/ F: kernel/bpf/
F: kernel/trace/bpf_trace.c F: kernel/trace/bpf_trace.c
@ -3821,7 +3823,6 @@ F: drivers/scsi/mpi3mr/
BROADCOM NETXTREME-E ROCE DRIVER BROADCOM NETXTREME-E ROCE DRIVER
M: Selvin Xavier <selvin.xavier@broadcom.com> M: Selvin Xavier <selvin.xavier@broadcom.com>
M: Naresh Kumar PBS <nareshkumar.pbs@broadcom.com>
L: linux-rdma@vger.kernel.org L: linux-rdma@vger.kernel.org
S: Supported S: Supported
W: http://www.broadcom.com W: http://www.broadcom.com
@ -4656,7 +4657,7 @@ W: http://linux-cifs.samba.org/
T: git git://git.samba.org/sfrench/cifs-2.6.git T: git git://git.samba.org/sfrench/cifs-2.6.git
F: Documentation/admin-guide/cifs/ F: Documentation/admin-guide/cifs/
F: fs/cifs/ F: fs/cifs/
F: fs/cifs_common/ F: fs/smbfs_common/
COMPACTPCI HOTPLUG CORE COMPACTPCI HOTPLUG CORE
M: Scott Murray <scott@spiteful.org> M: Scott Murray <scott@spiteful.org>
@ -7986,7 +7987,7 @@ F: include/linux/gpio/regmap.h
GPIO SUBSYSTEM GPIO SUBSYSTEM
M: Linus Walleij <linus.walleij@linaro.org> M: Linus Walleij <linus.walleij@linaro.org>
M: Bartosz Golaszewski <bgolaszewski@baylibre.com> M: Bartosz Golaszewski <brgl@bgdev.pl>
L: linux-gpio@vger.kernel.org L: linux-gpio@vger.kernel.org
S: Maintained S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git
@ -10194,8 +10195,8 @@ M: Hyunchul Lee <hyc.lee@gmail.com>
L: linux-cifs@vger.kernel.org L: linux-cifs@vger.kernel.org
S: Maintained S: Maintained
T: git git://git.samba.org/ksmbd.git T: git git://git.samba.org/ksmbd.git
F: fs/cifs_common/
F: fs/ksmbd/ F: fs/ksmbd/
F: fs/smbfs_common/
KERNEL UNIT TESTING FRAMEWORK (KUnit) KERNEL UNIT TESTING FRAMEWORK (KUnit)
M: Brendan Higgins <brendanhiggins@google.com> M: Brendan Higgins <brendanhiggins@google.com>
@ -11367,7 +11368,7 @@ F: Documentation/devicetree/bindings/iio/proximity/maxbotix,mb1232.yaml
F: drivers/iio/proximity/mb1232.c F: drivers/iio/proximity/mb1232.c
MAXIM MAX77650 PMIC MFD DRIVER MAXIM MAX77650 PMIC MFD DRIVER
M: Bartosz Golaszewski <bgolaszewski@baylibre.com> M: Bartosz Golaszewski <brgl@bgdev.pl>
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/*/*max77650.yaml F: Documentation/devicetree/bindings/*/*max77650.yaml
@ -13255,9 +13256,9 @@ F: Documentation/scsi/NinjaSCSI.rst
F: drivers/scsi/nsp32* F: drivers/scsi/nsp32*
NIOS2 ARCHITECTURE NIOS2 ARCHITECTURE
M: Ley Foon Tan <ley.foon.tan@intel.com> M: Dinh Nguyen <dinguyen@kernel.org>
S: Maintained S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux.git
F: arch/nios2/ F: arch/nios2/
NITRO ENCLAVES (NE) NITRO ENCLAVES (NE)
@ -14342,7 +14343,8 @@ F: Documentation/devicetree/bindings/pci/intel,ixp4xx-pci.yaml
F: drivers/pci/controller/pci-ixp4xx.c F: drivers/pci/controller/pci-ixp4xx.c
PCI DRIVER FOR INTEL VOLUME MANAGEMENT DEVICE (VMD) PCI DRIVER FOR INTEL VOLUME MANAGEMENT DEVICE (VMD)
M: Jonathan Derrick <jonathan.derrick@intel.com> M: Nirmal Patel <nirmal.patel@linux.intel.com>
R: Jonathan Derrick <jonathan.derrick@linux.dev>
L: linux-pci@vger.kernel.org L: linux-pci@vger.kernel.org
S: Supported S: Supported
F: drivers/pci/controller/vmd.c F: drivers/pci/controller/vmd.c
@ -16650,13 +16652,6 @@ M: Lubomir Rintel <lkundrak@v3.sk>
S: Supported S: Supported
F: drivers/char/pcmcia/scr24x_cs.c F: drivers/char/pcmcia/scr24x_cs.c
SCSI CDROM DRIVER
M: Jens Axboe <axboe@kernel.dk>
L: linux-scsi@vger.kernel.org
S: Maintained
W: http://www.kernel.dk
F: drivers/scsi/sr*
SCSI RDMA PROTOCOL (SRP) INITIATOR SCSI RDMA PROTOCOL (SRP) INITIATOR
M: Bart Van Assche <bvanassche@acm.org> M: Bart Van Assche <bvanassche@acm.org>
L: linux-rdma@vger.kernel.org L: linux-rdma@vger.kernel.org
@ -16955,7 +16950,6 @@ F: drivers/misc/sgi-xp/
SHARED MEMORY COMMUNICATIONS (SMC) SOCKETS SHARED MEMORY COMMUNICATIONS (SMC) SOCKETS
M: Karsten Graul <kgraul@linux.ibm.com> M: Karsten Graul <kgraul@linux.ibm.com>
M: Guvenc Gulce <guvenc@linux.ibm.com>
L: linux-s390@vger.kernel.org L: linux-s390@vger.kernel.org
S: Supported S: Supported
W: http://www.ibm.com/developerworks/linux/linux390/ W: http://www.ibm.com/developerworks/linux/linux390/
@ -17891,7 +17885,8 @@ M: Olivier Moysan <olivier.moysan@foss.st.com>
M: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> M: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers) L: alsa-devel@alsa-project.org (moderated for non-subscribers)
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/iio/adc/st,stm32-*.yaml F: Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml
F: Documentation/devicetree/bindings/sound/st,stm32-*.yaml
F: sound/soc/stm/ F: sound/soc/stm/
STM32 TIMER/LPTIMER DRIVERS STM32 TIMER/LPTIMER DRIVERS
@ -17968,10 +17963,11 @@ F: Documentation/admin-guide/svga.rst
F: arch/x86/boot/video* F: arch/x86/boot/video*
SWIOTLB SUBSYSTEM SWIOTLB SUBSYSTEM
M: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> M: Christoph Hellwig <hch@infradead.org>
L: iommu@lists.linux-foundation.org L: iommu@lists.linux-foundation.org
S: Supported S: Supported
T: git git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb.git W: http://git.infradead.org/users/hch/dma-mapping.git
T: git git://git.infradead.org/users/hch/dma-mapping.git
F: arch/*/kernel/pci-swiotlb.c F: arch/*/kernel/pci-swiotlb.c
F: include/linux/swiotlb.h F: include/linux/swiotlb.h
F: kernel/dma/swiotlb.c F: kernel/dma/swiotlb.c
@ -18554,13 +18550,14 @@ T: git git://linuxtv.org/media_tree.git
F: drivers/media/radio/radio-raremono.c F: drivers/media/radio/radio-raremono.c
THERMAL THERMAL
M: Zhang Rui <rui.zhang@intel.com> M: Rafael J. Wysocki <rafael@kernel.org>
M: Daniel Lezcano <daniel.lezcano@linaro.org> M: Daniel Lezcano <daniel.lezcano@linaro.org>
R: Amit Kucheria <amitk@kernel.org> R: Amit Kucheria <amitk@kernel.org>
R: Zhang Rui <rui.zhang@intel.com>
L: linux-pm@vger.kernel.org L: linux-pm@vger.kernel.org
S: Supported S: Supported
Q: https://patchwork.kernel.org/project/linux-pm/list/ Q: https://patchwork.kernel.org/project/linux-pm/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git thermal
F: Documentation/devicetree/bindings/thermal/ F: Documentation/devicetree/bindings/thermal/
F: drivers/thermal/ F: drivers/thermal/
F: include/linux/cpu_cooling.h F: include/linux/cpu_cooling.h
@ -18689,7 +18686,7 @@ F: include/linux/clk/ti.h
TI DAVINCI MACHINE SUPPORT TI DAVINCI MACHINE SUPPORT
M: Sekhar Nori <nsekhar@ti.com> M: Sekhar Nori <nsekhar@ti.com>
R: Bartosz Golaszewski <bgolaszewski@baylibre.com> R: Bartosz Golaszewski <brgl@bgdev.pl>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Supported S: Supported
T: git git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci.git
@ -19288,13 +19285,12 @@ S: Maintained
F: drivers/usb/misc/chaoskey.c F: drivers/usb/misc/chaoskey.c
USB CYPRESS C67X00 DRIVER USB CYPRESS C67X00 DRIVER
M: Peter Korsgaard <jacmet@sunsite.dk>
L: linux-usb@vger.kernel.org L: linux-usb@vger.kernel.org
S: Maintained S: Orphan
F: drivers/usb/c67x00/ F: drivers/usb/c67x00/
USB DAVICOM DM9601 DRIVER USB DAVICOM DM9601 DRIVER
M: Peter Korsgaard <jacmet@sunsite.dk> M: Peter Korsgaard <peter@korsgaard.com>
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Maintained S: Maintained
W: http://www.linux-usb.org/usbnet W: http://www.linux-usb.org/usbnet
@ -20474,7 +20470,6 @@ F: samples/bpf/xdpsock*
F: tools/lib/bpf/xsk* F: tools/lib/bpf/xsk*
XEN BLOCK SUBSYSTEM XEN BLOCK SUBSYSTEM
M: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
M: Roger Pau Monné <roger.pau@citrix.com> M: Roger Pau Monné <roger.pau@citrix.com>
L: xen-devel@lists.xenproject.org (moderated for non-subscribers) L: xen-devel@lists.xenproject.org (moderated for non-subscribers)
S: Supported S: Supported
@ -20522,7 +20517,7 @@ S: Supported
F: drivers/net/xen-netback/* F: drivers/net/xen-netback/*
XEN PCI SUBSYSTEM XEN PCI SUBSYSTEM
M: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> M: Juergen Gross <jgross@suse.com>
L: xen-devel@lists.xenproject.org (moderated for non-subscribers) L: xen-devel@lists.xenproject.org (moderated for non-subscribers)
S: Supported S: Supported
F: arch/x86/pci/*xen* F: arch/x86/pci/*xen*
@ -20545,7 +20540,8 @@ S: Supported
F: sound/xen/* F: sound/xen/*
XEN SWIOTLB SUBSYSTEM XEN SWIOTLB SUBSYSTEM
M: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> M: Juergen Gross <jgross@suse.com>
M: Stefano Stabellini <sstabellini@kernel.org>
L: xen-devel@lists.xenproject.org (moderated for non-subscribers) L: xen-devel@lists.xenproject.org (moderated for non-subscribers)
L: iommu@lists.linux-foundation.org L: iommu@lists.linux-foundation.org
S: Supported S: Supported

View File

@ -2,7 +2,7 @@
VERSION = 5 VERSION = 5
PATCHLEVEL = 15 PATCHLEVEL = 15
SUBLEVEL = 0 SUBLEVEL = 0
EXTRAVERSION = -rc1 EXTRAVERSION = -rc4
NAME = Opossums on Parade NAME = Opossums on Parade
# *DOCUMENTATION* # *DOCUMENTATION*
@ -849,12 +849,6 @@ endif
DEBUG_CFLAGS := DEBUG_CFLAGS :=
# Workaround for GCC versions < 5.0
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801
ifdef CONFIG_CC_IS_GCC
DEBUG_CFLAGS += $(call cc-ifversion, -lt, 0500, $(call cc-option, -fno-var-tracking-assignments))
endif
ifdef CONFIG_DEBUG_INFO ifdef CONFIG_DEBUG_INFO
ifdef CONFIG_DEBUG_INFO_SPLIT ifdef CONFIG_DEBUG_INFO_SPLIT

View File

@ -1234,6 +1234,9 @@ config RELR
config ARCH_HAS_MEM_ENCRYPT config ARCH_HAS_MEM_ENCRYPT
bool bool
config ARCH_HAS_CC_PLATFORM
bool
config HAVE_SPARSE_SYSCALL_NR config HAVE_SPARSE_SYSCALL_NR
bool bool
help help

View File

@ -20,7 +20,7 @@ config ALPHA
select NEED_SG_DMA_LENGTH select NEED_SG_DMA_LENGTH
select VIRT_TO_BUS select VIRT_TO_BUS
select GENERIC_IRQ_PROBE select GENERIC_IRQ_PROBE
select GENERIC_PCI_IOMAP if PCI select GENERIC_PCI_IOMAP
select AUTO_IRQ_AFFINITY if SMP select AUTO_IRQ_AFFINITY if SMP
select GENERIC_IRQ_SHOW select GENERIC_IRQ_SHOW
select ARCH_WANT_IPC_PARSE_VERSION select ARCH_WANT_IPC_PARSE_VERSION
@ -199,7 +199,6 @@ config ALPHA_EIGER
config ALPHA_JENSEN config ALPHA_JENSEN
bool "Jensen" bool "Jensen"
depends on BROKEN
select HAVE_EISA select HAVE_EISA
help help
DEC PC 150 AXP (aka Jensen): This is a very old Digital system - one DEC PC 150 AXP (aka Jensen): This is a very old Digital system - one

View File

@ -16,3 +16,4 @@ extern void __divlu(void);
extern void __remlu(void); extern void __remlu(void);
extern void __divqu(void); extern void __divqu(void);
extern void __remqu(void); extern void __remqu(void);
extern unsigned long __udiv_qrnnd(unsigned long *, unsigned long, unsigned long , unsigned long);

View File

@ -60,7 +60,7 @@ extern inline void set_hae(unsigned long new_hae)
* Change virtual addresses to physical addresses and vv. * Change virtual addresses to physical addresses and vv.
*/ */
#ifdef USE_48_BIT_KSEG #ifdef USE_48_BIT_KSEG
static inline unsigned long virt_to_phys(void *address) static inline unsigned long virt_to_phys(volatile void *address)
{ {
return (unsigned long)address - IDENT_ADDR; return (unsigned long)address - IDENT_ADDR;
} }
@ -70,7 +70,7 @@ static inline void * phys_to_virt(unsigned long address)
return (void *) (address + IDENT_ADDR); return (void *) (address + IDENT_ADDR);
} }
#else #else
static inline unsigned long virt_to_phys(void *address) static inline unsigned long virt_to_phys(volatile void *address)
{ {
unsigned long phys = (unsigned long)address; unsigned long phys = (unsigned long)address;
@ -106,7 +106,7 @@ static inline void * phys_to_virt(unsigned long address)
extern unsigned long __direct_map_base; extern unsigned long __direct_map_base;
extern unsigned long __direct_map_size; extern unsigned long __direct_map_size;
static inline unsigned long __deprecated virt_to_bus(void *address) static inline unsigned long __deprecated virt_to_bus(volatile void *address)
{ {
unsigned long phys = virt_to_phys(address); unsigned long phys = virt_to_phys(address);
unsigned long bus = phys + __direct_map_base; unsigned long bus = phys + __direct_map_base;

View File

@ -111,18 +111,18 @@ __EXTERN_INLINE void jensen_set_hae(unsigned long addr)
* convinced that I need one of the newer machines. * convinced that I need one of the newer machines.
*/ */
static inline unsigned int jensen_local_inb(unsigned long addr) __EXTERN_INLINE unsigned int jensen_local_inb(unsigned long addr)
{ {
return 0xff & *(vuip)((addr << 9) + EISA_VL82C106); return 0xff & *(vuip)((addr << 9) + EISA_VL82C106);
} }
static inline void jensen_local_outb(u8 b, unsigned long addr) __EXTERN_INLINE void jensen_local_outb(u8 b, unsigned long addr)
{ {
*(vuip)((addr << 9) + EISA_VL82C106) = b; *(vuip)((addr << 9) + EISA_VL82C106) = b;
mb(); mb();
} }
static inline unsigned int jensen_bus_inb(unsigned long addr) __EXTERN_INLINE unsigned int jensen_bus_inb(unsigned long addr)
{ {
long result; long result;
@ -131,7 +131,7 @@ static inline unsigned int jensen_bus_inb(unsigned long addr)
return __kernel_extbl(result, addr & 3); return __kernel_extbl(result, addr & 3);
} }
static inline void jensen_bus_outb(u8 b, unsigned long addr) __EXTERN_INLINE void jensen_bus_outb(u8 b, unsigned long addr)
{ {
jensen_set_hae(0); jensen_set_hae(0);
*(vuip)((addr << 7) + EISA_IO + 0x00) = b * 0x01010101; *(vuip)((addr << 7) + EISA_IO + 0x00) = b * 0x01010101;

View File

@ -0,0 +1,43 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __ALPHA_SETUP_H
#define __ALPHA_SETUP_H
#include <uapi/asm/setup.h>
/*
* We leave one page for the initial stack page, and one page for
* the initial process structure. Also, the console eats 3 MB for
* the initial bootloader (one of which we can reclaim later).
*/
#define BOOT_PCB 0x20000000
#define BOOT_ADDR 0x20000000
/* Remove when official MILO sources have ELF support: */
#define BOOT_SIZE (16*1024)
#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS
#define KERNEL_START_PHYS 0x300000 /* Old bootloaders hardcoded this. */
#else
#define KERNEL_START_PHYS 0x1000000 /* required: Wildfire/Titan/Marvel */
#endif
#define KERNEL_START (PAGE_OFFSET+KERNEL_START_PHYS)
#define SWAPPER_PGD KERNEL_START
#define INIT_STACK (PAGE_OFFSET+KERNEL_START_PHYS+0x02000)
#define EMPTY_PGT (PAGE_OFFSET+KERNEL_START_PHYS+0x04000)
#define EMPTY_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x08000)
#define ZERO_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x0A000)
#define START_ADDR (PAGE_OFFSET+KERNEL_START_PHYS+0x10000)
/*
* This is setup by the secondary bootstrap loader. Because
* the zero page is zeroed out as soon as the vm system is
* initialized, we need to copy things out into a more permanent
* place.
*/
#define PARAM ZERO_PGE
#define COMMAND_LINE ((char *)(absolute_pointer(PARAM + 0x0000)))
#define INITRD_START (*(unsigned long *) (PARAM+0x100))
#define INITRD_SIZE (*(unsigned long *) (PARAM+0x108))
#endif

View File

@ -1,43 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef __ALPHA_SETUP_H #ifndef _UAPI__ALPHA_SETUP_H
#define __ALPHA_SETUP_H #define _UAPI__ALPHA_SETUP_H
#define COMMAND_LINE_SIZE 256 #define COMMAND_LINE_SIZE 256
/* #endif /* _UAPI__ALPHA_SETUP_H */
* We leave one page for the initial stack page, and one page for
* the initial process structure. Also, the console eats 3 MB for
* the initial bootloader (one of which we can reclaim later).
*/
#define BOOT_PCB 0x20000000
#define BOOT_ADDR 0x20000000
/* Remove when official MILO sources have ELF support: */
#define BOOT_SIZE (16*1024)
#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS
#define KERNEL_START_PHYS 0x300000 /* Old bootloaders hardcoded this. */
#else
#define KERNEL_START_PHYS 0x1000000 /* required: Wildfire/Titan/Marvel */
#endif
#define KERNEL_START (PAGE_OFFSET+KERNEL_START_PHYS)
#define SWAPPER_PGD KERNEL_START
#define INIT_STACK (PAGE_OFFSET+KERNEL_START_PHYS+0x02000)
#define EMPTY_PGT (PAGE_OFFSET+KERNEL_START_PHYS+0x04000)
#define EMPTY_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x08000)
#define ZERO_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x0A000)
#define START_ADDR (PAGE_OFFSET+KERNEL_START_PHYS+0x10000)
/*
* This is setup by the secondary bootstrap loader. Because
* the zero page is zeroed out as soon as the vm system is
* initialized, we need to copy things out into a more permanent
* place.
*/
#define PARAM ZERO_PGE
#define COMMAND_LINE ((char*)(PARAM + 0x0000))
#define INITRD_START (*(unsigned long *) (PARAM+0x100))
#define INITRD_SIZE (*(unsigned long *) (PARAM+0x108))
#endif

View File

@ -7,6 +7,11 @@
* *
* Code supporting the Jensen. * Code supporting the Jensen.
*/ */
#define __EXTERN_INLINE
#include <asm/io.h>
#include <asm/jensen.h>
#undef __EXTERN_INLINE
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/types.h> #include <linux/types.h>
@ -17,11 +22,6 @@
#include <asm/ptrace.h> #include <asm/ptrace.h>
#define __EXTERN_INLINE inline
#include <asm/io.h>
#include <asm/jensen.h>
#undef __EXTERN_INLINE
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>

View File

@ -14,6 +14,7 @@ ev6-$(CONFIG_ALPHA_EV6) := ev6-
ev67-$(CONFIG_ALPHA_EV67) := ev67- ev67-$(CONFIG_ALPHA_EV67) := ev67-
lib-y = __divqu.o __remqu.o __divlu.o __remlu.o \ lib-y = __divqu.o __remqu.o __divlu.o __remlu.o \
udiv-qrnnd.o \
udelay.o \ udelay.o \
$(ev6-y)memset.o \ $(ev6-y)memset.o \
$(ev6-y)memcpy.o \ $(ev6-y)memcpy.o \

View File

@ -25,6 +25,7 @@
# along with GCC; see the file COPYING. If not, write to the # along with GCC; see the file COPYING. If not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA. # MA 02111-1307, USA.
#include <asm/export.h>
.set noreorder .set noreorder
.set noat .set noat
@ -161,3 +162,4 @@ $Odd:
ret $31,($26),1 ret $31,($26),1
.end __udiv_qrnnd .end __udiv_qrnnd
EXPORT_SYMBOL(__udiv_qrnnd)

View File

@ -7,4 +7,4 @@ ccflags-y := -w
obj-$(CONFIG_MATHEMU) += math-emu.o obj-$(CONFIG_MATHEMU) += math-emu.o
math-emu-objs := math.o qrnnd.o math-emu-objs := math.o

View File

@ -403,5 +403,3 @@ alpha_fp_emul_imprecise (struct pt_regs *regs, unsigned long write_mask)
egress: egress:
return si_code; return si_code;
} }
EXPORT_SYMBOL(__udiv_qrnnd);

View File

@ -628,7 +628,6 @@ do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall)
uprobe_notify_resume(regs); uprobe_notify_resume(regs);
} else { } else {
tracehook_notify_resume(regs); tracehook_notify_resume(regs);
rseq_handle_notify_resume(NULL, regs);
} }
} }
local_irq_disable(); local_irq_disable();

View File

@ -86,7 +86,7 @@ config ARM64
select ARCH_SUPPORTS_LTO_CLANG_THIN select ARCH_SUPPORTS_LTO_CLANG_THIN
select ARCH_SUPPORTS_CFI_CLANG select ARCH_SUPPORTS_CFI_CLANG
select ARCH_SUPPORTS_ATOMIC_RMW select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && (GCC_VERSION >= 50000 || CC_IS_CLANG) select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
select ARCH_SUPPORTS_NUMA_BALANCING select ARCH_SUPPORTS_NUMA_BALANCING
select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT
select ARCH_WANT_DEFAULT_BPF_JIT select ARCH_WANT_DEFAULT_BPF_JIT

View File

@ -487,7 +487,6 @@ dwc_0: dwc3@8a00000 {
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_0>, <&usb0_ssphy>; phys = <&qusb_phy_0>, <&usb0_ssphy>;
phy-names = "usb2-phy", "usb3-phy"; phy-names = "usb2-phy", "usb3-phy";
tx-fifo-resize;
snps,is-utmi-l1-suspend; snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>; snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk; snps,dis_u2_susphy_quirk;
@ -528,7 +527,6 @@ dwc_1: dwc3@8c00000 {
interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_1>, <&usb1_ssphy>; phys = <&qusb_phy_1>, <&usb1_ssphy>;
phy-names = "usb2-phy", "usb3-phy"; phy-names = "usb2-phy", "usb3-phy";
tx-fifo-resize;
snps,is-utmi-l1-suspend; snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>; snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk; snps,dis_u2_susphy_quirk;

View File

@ -50,9 +50,6 @@ pgprot_t __acpi_get_mem_attribute(phys_addr_t addr);
void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size); void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size);
#define acpi_os_ioremap acpi_os_ioremap #define acpi_os_ioremap acpi_os_ioremap
void __iomem *acpi_os_memmap(acpi_physical_address phys, acpi_size size);
#define acpi_os_memmap acpi_os_memmap
typedef u64 phys_cpuid_t; typedef u64 phys_cpuid_t;
#define PHYS_CPUID_INVALID INVALID_HWID #define PHYS_CPUID_INVALID INVALID_HWID

View File

@ -525,6 +525,11 @@ alternative_endif
#define EXPORT_SYMBOL_NOKASAN(name) EXPORT_SYMBOL(name) #define EXPORT_SYMBOL_NOKASAN(name) EXPORT_SYMBOL(name)
#endif #endif
#ifdef CONFIG_KASAN_HW_TAGS
#define EXPORT_SYMBOL_NOHWKASAN(name)
#else
#define EXPORT_SYMBOL_NOHWKASAN(name) EXPORT_SYMBOL_NOKASAN(name)
#endif
/* /*
* Emit a 64-bit absolute little endian symbol reference in a way that * Emit a 64-bit absolute little endian symbol reference in a way that
* ensures that it will be resolved at build time, even when building a * ensures that it will be resolved at build time, even when building a

View File

@ -99,11 +99,17 @@ void mte_check_tfsr_el1(void);
static inline void mte_check_tfsr_entry(void) static inline void mte_check_tfsr_entry(void)
{ {
if (!system_supports_mte())
return;
mte_check_tfsr_el1(); mte_check_tfsr_el1();
} }
static inline void mte_check_tfsr_exit(void) static inline void mte_check_tfsr_exit(void)
{ {
if (!system_supports_mte())
return;
/* /*
* The asynchronous faults are sync'ed automatically with * The asynchronous faults are sync'ed automatically with
* TFSR_EL1 on kernel entry but for exit an explicit dsb() * TFSR_EL1 on kernel entry but for exit an explicit dsb()

View File

@ -12,11 +12,13 @@ extern char *strrchr(const char *, int c);
#define __HAVE_ARCH_STRCHR #define __HAVE_ARCH_STRCHR
extern char *strchr(const char *, int c); extern char *strchr(const char *, int c);
#ifndef CONFIG_KASAN_HW_TAGS
#define __HAVE_ARCH_STRCMP #define __HAVE_ARCH_STRCMP
extern int strcmp(const char *, const char *); extern int strcmp(const char *, const char *);
#define __HAVE_ARCH_STRNCMP #define __HAVE_ARCH_STRNCMP
extern int strncmp(const char *, const char *, __kernel_size_t); extern int strncmp(const char *, const char *, __kernel_size_t);
#endif
#define __HAVE_ARCH_STRLEN #define __HAVE_ARCH_STRLEN
extern __kernel_size_t strlen(const char *); extern __kernel_size_t strlen(const char *);

View File

@ -273,8 +273,7 @@ pgprot_t __acpi_get_mem_attribute(phys_addr_t addr)
return __pgprot(PROT_DEVICE_nGnRnE); return __pgprot(PROT_DEVICE_nGnRnE);
} }
static void __iomem *__acpi_os_ioremap(acpi_physical_address phys, void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
acpi_size size, bool memory)
{ {
efi_memory_desc_t *md, *region = NULL; efi_memory_desc_t *md, *region = NULL;
pgprot_t prot; pgprot_t prot;
@ -300,11 +299,9 @@ static void __iomem *__acpi_os_ioremap(acpi_physical_address phys,
* It is fine for AML to remap regions that are not represented in the * It is fine for AML to remap regions that are not represented in the
* EFI memory map at all, as it only describes normal memory, and MMIO * EFI memory map at all, as it only describes normal memory, and MMIO
* regions that require a virtual mapping to make them accessible to * regions that require a virtual mapping to make them accessible to
* the EFI runtime services. Determine the region default * the EFI runtime services.
* attributes by checking the requested memory semantics.
*/ */
prot = memory ? __pgprot(PROT_NORMAL_NC) : prot = __pgprot(PROT_DEVICE_nGnRnE);
__pgprot(PROT_DEVICE_nGnRnE);
if (region) { if (region) {
switch (region->type) { switch (region->type) {
case EFI_LOADER_CODE: case EFI_LOADER_CODE:
@ -364,16 +361,6 @@ static void __iomem *__acpi_os_ioremap(acpi_physical_address phys,
return __ioremap(phys, size, prot); return __ioremap(phys, size, prot);
} }
void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
{
return __acpi_os_ioremap(phys, size, false);
}
void __iomem *acpi_os_memmap(acpi_physical_address phys, acpi_size size)
{
return __acpi_os_ioremap(phys, size, true);
}
/* /*
* Claim Synchronous External Aborts as a firmware first notification. * Claim Synchronous External Aborts as a firmware first notification.
* *

View File

@ -1526,9 +1526,13 @@ static bool unmap_kernel_at_el0(const struct arm64_cpu_capabilities *entry,
/* /*
* For reasons that aren't entirely clear, enabling KPTI on Cavium * For reasons that aren't entirely clear, enabling KPTI on Cavium
* ThunderX leads to apparent I-cache corruption of kernel text, which * ThunderX leads to apparent I-cache corruption of kernel text, which
* ends as well as you might imagine. Don't even try. * ends as well as you might imagine. Don't even try. We cannot rely
* on the cpus_have_*cap() helpers here to detect the CPU erratum
* because cpucap detection order may change. However, since we know
* affected CPUs are always in a homogeneous configuration, it is
* safe to rely on this_cpu_has_cap() here.
*/ */
if (cpus_have_const_cap(ARM64_WORKAROUND_CAVIUM_27456)) { if (this_cpu_has_cap(ARM64_WORKAROUND_CAVIUM_27456)) {
str = "ARM64_WORKAROUND_CAVIUM_27456"; str = "ARM64_WORKAROUND_CAVIUM_27456";
__kpti_forced = -1; __kpti_forced = -1;
} }

View File

@ -513,7 +513,7 @@ size_t sve_state_size(struct task_struct const *task)
void sve_alloc(struct task_struct *task) void sve_alloc(struct task_struct *task)
{ {
if (task->thread.sve_state) { if (task->thread.sve_state) {
memset(task->thread.sve_state, 0, sve_state_size(current)); memset(task->thread.sve_state, 0, sve_state_size(task));
return; return;
} }

View File

@ -142,12 +142,7 @@ void mte_enable_kernel_async(void)
#ifdef CONFIG_KASAN_HW_TAGS #ifdef CONFIG_KASAN_HW_TAGS
void mte_check_tfsr_el1(void) void mte_check_tfsr_el1(void)
{ {
u64 tfsr_el1; u64 tfsr_el1 = read_sysreg_s(SYS_TFSR_EL1);
if (!system_supports_mte())
return;
tfsr_el1 = read_sysreg_s(SYS_TFSR_EL1);
if (unlikely(tfsr_el1 & SYS_TFSR_EL1_TF1)) { if (unlikely(tfsr_el1 & SYS_TFSR_EL1_TF1)) {
/* /*
@ -199,6 +194,9 @@ void mte_thread_init_user(void)
void mte_thread_switch(struct task_struct *next) void mte_thread_switch(struct task_struct *next)
{ {
if (!system_supports_mte())
return;
mte_update_sctlr_user(next); mte_update_sctlr_user(next);
/* /*

View File

@ -18,7 +18,6 @@
#include <linux/mman.h> #include <linux/mman.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/nospec.h> #include <linux/nospec.h>
#include <linux/sched.h>
#include <linux/stddef.h> #include <linux/stddef.h>
#include <linux/sysctl.h> #include <linux/sysctl.h>
#include <linux/unistd.h> #include <linux/unistd.h>
@ -58,7 +57,7 @@
#if defined(CONFIG_STACKPROTECTOR) && !defined(CONFIG_STACKPROTECTOR_PER_TASK) #if defined(CONFIG_STACKPROTECTOR) && !defined(CONFIG_STACKPROTECTOR_PER_TASK)
#include <linux/stackprotector.h> #include <linux/stackprotector.h>
unsigned long __stack_chk_guard __read_mostly; unsigned long __stack_chk_guard __ro_after_init;
EXPORT_SYMBOL(__stack_chk_guard); EXPORT_SYMBOL(__stack_chk_guard);
#endif #endif

View File

@ -940,10 +940,8 @@ void do_notify_resume(struct pt_regs *regs, unsigned long thread_flags)
if (thread_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)) if (thread_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
do_signal(regs); do_signal(regs);
if (thread_flags & _TIF_NOTIFY_RESUME) { if (thread_flags & _TIF_NOTIFY_RESUME)
tracehook_notify_resume(regs); tracehook_notify_resume(regs);
rseq_handle_notify_resume(NULL, regs);
}
if (thread_flags & _TIF_FOREIGN_FPSTATE) if (thread_flags & _TIF_FOREIGN_FPSTATE)
fpsimd_restore_current_state(); fpsimd_restore_current_state();

View File

@ -54,7 +54,7 @@ $(obj)/kvm_nvhe.tmp.o: $(obj)/hyp.lds $(addprefix $(obj)/,$(hyp-obj)) FORCE
# runtime. Because the hypervisor is part of the kernel binary, relocations # runtime. Because the hypervisor is part of the kernel binary, relocations
# produce a kernel VA. We enumerate relocations targeting hyp at build time # produce a kernel VA. We enumerate relocations targeting hyp at build time
# and convert the kernel VAs at those positions to hyp VAs. # and convert the kernel VAs at those positions to hyp VAs.
$(obj)/hyp-reloc.S: $(obj)/kvm_nvhe.tmp.o $(obj)/gen-hyprel $(obj)/hyp-reloc.S: $(obj)/kvm_nvhe.tmp.o $(obj)/gen-hyprel FORCE
$(call if_changed,hyprel) $(call if_changed,hyprel)
# 5) Compile hyp-reloc.S and link it into the existing partially linked object. # 5) Compile hyp-reloc.S and link it into the existing partially linked object.

View File

@ -50,9 +50,6 @@ static struct perf_guest_info_callbacks kvm_guest_cbs = {
int kvm_perf_init(void) int kvm_perf_init(void)
{ {
if (kvm_pmu_probe_pmuver() != ID_AA64DFR0_PMUVER_IMP_DEF && !is_protected_kvm_enabled())
static_branch_enable(&kvm_arm_pmu_available);
return perf_register_guest_info_callbacks(&kvm_guest_cbs); return perf_register_guest_info_callbacks(&kvm_guest_cbs);
} }

View File

@ -740,7 +740,14 @@ void kvm_pmu_set_counter_event_type(struct kvm_vcpu *vcpu, u64 data,
kvm_pmu_create_perf_event(vcpu, select_idx); kvm_pmu_create_perf_event(vcpu, select_idx);
} }
int kvm_pmu_probe_pmuver(void) void kvm_host_pmu_init(struct arm_pmu *pmu)
{
if (pmu->pmuver != 0 && pmu->pmuver != ID_AA64DFR0_PMUVER_IMP_DEF &&
!kvm_arm_support_pmu_v3() && !is_protected_kvm_enabled())
static_branch_enable(&kvm_arm_pmu_available);
}
static int kvm_pmu_probe_pmuver(void)
{ {
struct perf_event_attr attr = { }; struct perf_event_attr attr = { };
struct perf_event *event; struct perf_event *event;

View File

@ -173,4 +173,4 @@ L(done):
ret ret
SYM_FUNC_END_PI(strcmp) SYM_FUNC_END_PI(strcmp)
EXPORT_SYMBOL_NOKASAN(strcmp) EXPORT_SYMBOL_NOHWKASAN(strcmp)

View File

@ -258,4 +258,4 @@ L(ret0):
ret ret
SYM_FUNC_END_PI(strncmp) SYM_FUNC_END_PI(strncmp)
EXPORT_SYMBOL_NOKASAN(strncmp) EXPORT_SYMBOL_NOHWKASAN(strncmp)

View File

@ -260,8 +260,6 @@ asmlinkage void do_notify_resume(struct pt_regs *regs,
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)) if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
do_signal(regs); do_signal(regs);
if (thread_info_flags & _TIF_NOTIFY_RESUME) { if (thread_info_flags & _TIF_NOTIFY_RESUME)
tracehook_notify_resume(regs); tracehook_notify_resume(regs);
rseq_handle_notify_resume(NULL, regs);
}
} }

View File

@ -15,7 +15,6 @@
#include <asm/unistd.h> #include <asm/unistd.h>
#include <asm/errno.h> #include <asm/errno.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/segment.h>
#include <asm/traps.h> #include <asm/traps.h>
#include <asm/asm-offsets.h> #include <asm/asm-offsets.h>
#include <asm/entry.h> #include <asm/entry.h>
@ -25,7 +24,6 @@
.globl system_call .globl system_call
.globl resume .globl resume
.globl ret_from_exception .globl ret_from_exception
.globl ret_from_signal
.globl sys_call_table .globl sys_call_table
.globl bad_interrupt .globl bad_interrupt
.globl inthandler1 .globl inthandler1
@ -59,8 +57,6 @@ do_trace:
subql #4,%sp /* dummy return address */ subql #4,%sp /* dummy return address */
SAVE_SWITCH_STACK SAVE_SWITCH_STACK
jbsr syscall_trace_leave jbsr syscall_trace_leave
ret_from_signal:
RESTORE_SWITCH_STACK RESTORE_SWITCH_STACK
addql #4,%sp addql #4,%sp
jra ret_from_exception jra ret_from_exception

View File

@ -29,7 +29,6 @@ config M68K
select NO_DMA if !MMU && !COLDFIRE select NO_DMA if !MMU && !COLDFIRE
select OLD_SIGACTION select OLD_SIGACTION
select OLD_SIGSUSPEND3 select OLD_SIGSUSPEND3
select SET_FS
select UACCESS_MEMCPY if !MMU select UACCESS_MEMCPY if !MMU
select VIRT_TO_BUS select VIRT_TO_BUS
select ZONE_DMA select ZONE_DMA

View File

@ -31,7 +31,6 @@
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/errno.h> #include <asm/errno.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/segment.h>
#include <asm/asm-offsets.h> #include <asm/asm-offsets.h>
#include <asm/entry.h> #include <asm/entry.h>
@ -51,7 +50,6 @@ sw_usp:
.globl system_call .globl system_call
.globl resume .globl resume
.globl ret_from_exception .globl ret_from_exception
.globl ret_from_signal
.globl sys_call_table .globl sys_call_table
.globl inthandler .globl inthandler
@ -98,8 +96,6 @@ ENTRY(system_call)
subql #4,%sp /* dummy return address */ subql #4,%sp /* dummy return address */
SAVE_SWITCH_STACK SAVE_SWITCH_STACK
jbsr syscall_trace_leave jbsr syscall_trace_leave
ret_from_signal:
RESTORE_SWITCH_STACK RESTORE_SWITCH_STACK
addql #4,%sp addql #4,%sp

View File

@ -9,7 +9,6 @@
#define __ASM_M68K_PROCESSOR_H #define __ASM_M68K_PROCESSOR_H
#include <linux/thread_info.h> #include <linux/thread_info.h>
#include <asm/segment.h>
#include <asm/fpu.h> #include <asm/fpu.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
@ -75,11 +74,37 @@ static inline void wrusp(unsigned long usp)
#define TASK_UNMAPPED_BASE 0 #define TASK_UNMAPPED_BASE 0
#endif #endif
/* Address spaces (or Function Codes in Motorola lingo) */
#define USER_DATA 1
#define USER_PROGRAM 2
#define SUPER_DATA 5
#define SUPER_PROGRAM 6
#define CPU_SPACE 7
#ifdef CONFIG_CPU_HAS_ADDRESS_SPACES
/*
* Set the SFC/DFC registers for special MM operations. For most normal
* operation these remain set to USER_DATA for the uaccess routines.
*/
static inline void set_fc(unsigned long val)
{
WARN_ON_ONCE(in_interrupt());
__asm__ __volatile__ ("movec %0,%/sfc\n\t"
"movec %0,%/dfc\n\t"
: /* no outputs */ : "r" (val) : "memory");
}
#else
static inline void set_fc(unsigned long val)
{
}
#endif /* CONFIG_CPU_HAS_ADDRESS_SPACES */
struct thread_struct { struct thread_struct {
unsigned long ksp; /* kernel stack pointer */ unsigned long ksp; /* kernel stack pointer */
unsigned long usp; /* user stack pointer */ unsigned long usp; /* user stack pointer */
unsigned short sr; /* saved status register */ unsigned short sr; /* saved status register */
unsigned short fs; /* saved fs (sfc, dfc) */ unsigned short fc; /* saved fc (sfc, dfc) */
unsigned long crp[2]; /* cpu root pointer */ unsigned long crp[2]; /* cpu root pointer */
unsigned long esp0; /* points to SR of stack frame */ unsigned long esp0; /* points to SR of stack frame */
unsigned long faddr; /* info about last fault */ unsigned long faddr; /* info about last fault */
@ -92,7 +117,7 @@ struct thread_struct {
#define INIT_THREAD { \ #define INIT_THREAD { \
.ksp = sizeof(init_stack) + (unsigned long) init_stack, \ .ksp = sizeof(init_stack) + (unsigned long) init_stack, \
.sr = PS_S, \ .sr = PS_S, \
.fs = __KERNEL_DS, \ .fc = USER_DATA, \
} }
/* /*

View File

@ -17,21 +17,21 @@
* two accesses to memory, which may be undesirable for some devices. * two accesses to memory, which may be undesirable for some devices.
*/ */
#define in_8(addr) \ #define in_8(addr) \
({ u8 __v = (*(__force volatile u8 *) (addr)); __v; }) ({ u8 __v = (*(__force volatile u8 *) (unsigned long)(addr)); __v; })
#define in_be16(addr) \ #define in_be16(addr) \
({ u16 __v = (*(__force volatile u16 *) (addr)); __v; }) ({ u16 __v = (*(__force volatile u16 *) (unsigned long)(addr)); __v; })
#define in_be32(addr) \ #define in_be32(addr) \
({ u32 __v = (*(__force volatile u32 *) (addr)); __v; }) ({ u32 __v = (*(__force volatile u32 *) (unsigned long)(addr)); __v; })
#define in_le16(addr) \ #define in_le16(addr) \
({ u16 __v = le16_to_cpu(*(__force volatile __le16 *) (addr)); __v; }) ({ u16 __v = le16_to_cpu(*(__force volatile __le16 *) (unsigned long)(addr)); __v; })
#define in_le32(addr) \ #define in_le32(addr) \
({ u32 __v = le32_to_cpu(*(__force volatile __le32 *) (addr)); __v; }) ({ u32 __v = le32_to_cpu(*(__force volatile __le32 *) (unsigned long)(addr)); __v; })
#define out_8(addr,b) (void)((*(__force volatile u8 *) (addr)) = (b)) #define out_8(addr,b) (void)((*(__force volatile u8 *) (unsigned long)(addr)) = (b))
#define out_be16(addr,w) (void)((*(__force volatile u16 *) (addr)) = (w)) #define out_be16(addr,w) (void)((*(__force volatile u16 *) (unsigned long)(addr)) = (w))
#define out_be32(addr,l) (void)((*(__force volatile u32 *) (addr)) = (l)) #define out_be32(addr,l) (void)((*(__force volatile u32 *) (unsigned long)(addr)) = (l))
#define out_le16(addr,w) (void)((*(__force volatile __le16 *) (addr)) = cpu_to_le16(w)) #define out_le16(addr,w) (void)((*(__force volatile __le16 *) (unsigned long)(addr)) = cpu_to_le16(w))
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l)) #define out_le32(addr,l) (void)((*(__force volatile __le32 *) (unsigned long)(addr)) = cpu_to_le32(l))
#define raw_inb in_8 #define raw_inb in_8
#define raw_inw in_be16 #define raw_inw in_be16

View File

@ -1,59 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _M68K_SEGMENT_H
#define _M68K_SEGMENT_H
/* define constants */
/* Address spaces (FC0-FC2) */
#define USER_DATA (1)
#ifndef __USER_DS
#define __USER_DS (USER_DATA)
#endif
#define USER_PROGRAM (2)
#define SUPER_DATA (5)
#ifndef __KERNEL_DS
#define __KERNEL_DS (SUPER_DATA)
#endif
#define SUPER_PROGRAM (6)
#define CPU_SPACE (7)
#ifndef __ASSEMBLY__
typedef struct {
unsigned long seg;
} mm_segment_t;
#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
#ifdef CONFIG_CPU_HAS_ADDRESS_SPACES
/*
* Get/set the SFC/DFC registers for MOVES instructions
*/
#define USER_DS MAKE_MM_SEG(__USER_DS)
#define KERNEL_DS MAKE_MM_SEG(__KERNEL_DS)
static inline mm_segment_t get_fs(void)
{
mm_segment_t _v;
__asm__ ("movec %/dfc,%0":"=r" (_v.seg):);
return _v;
}
static inline void set_fs(mm_segment_t val)
{
__asm__ __volatile__ ("movec %0,%/sfc\n\t"
"movec %0,%/dfc\n\t"
: /* no outputs */ : "r" (val.seg) : "memory");
}
#else
#define USER_DS MAKE_MM_SEG(TASK_SIZE)
#define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF)
#define get_fs() (current_thread_info()->addr_limit)
#define set_fs(x) (current_thread_info()->addr_limit = (x))
#endif
#define uaccess_kernel() (get_fs().seg == KERNEL_DS.seg)
#endif /* __ASSEMBLY__ */
#endif /* _M68K_SEGMENT_H */

View File

@ -4,7 +4,6 @@
#include <asm/types.h> #include <asm/types.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/segment.h>
/* /*
* On machines with 4k pages we default to an 8k thread size, though we * On machines with 4k pages we default to an 8k thread size, though we
@ -27,7 +26,6 @@
struct thread_info { struct thread_info {
struct task_struct *task; /* main task structure */ struct task_struct *task; /* main task structure */
unsigned long flags; unsigned long flags;
mm_segment_t addr_limit; /* thread address space */
int preempt_count; /* 0 => preemptable, <0 => BUG */ int preempt_count; /* 0 => preemptable, <0 => BUG */
__u32 cpu; /* should always be 0 on m68k */ __u32 cpu; /* should always be 0 on m68k */
unsigned long tp_value; /* thread pointer */ unsigned long tp_value; /* thread pointer */
@ -37,7 +35,6 @@ struct thread_info {
#define INIT_THREAD_INFO(tsk) \ #define INIT_THREAD_INFO(tsk) \
{ \ { \
.task = &tsk, \ .task = &tsk, \
.addr_limit = KERNEL_DS, \
.preempt_count = INIT_PREEMPT_COUNT, \ .preempt_count = INIT_PREEMPT_COUNT, \
} }

View File

@ -13,13 +13,12 @@ static inline void flush_tlb_kernel_page(void *addr)
if (CPU_IS_COLDFIRE) { if (CPU_IS_COLDFIRE) {
mmu_write(MMUOR, MMUOR_CNL); mmu_write(MMUOR, MMUOR_CNL);
} else if (CPU_IS_040_OR_060) { } else if (CPU_IS_040_OR_060) {
mm_segment_t old_fs = get_fs(); set_fc(SUPER_DATA);
set_fs(KERNEL_DS);
__asm__ __volatile__(".chip 68040\n\t" __asm__ __volatile__(".chip 68040\n\t"
"pflush (%0)\n\t" "pflush (%0)\n\t"
".chip 68k" ".chip 68k"
: : "a" (addr)); : : "a" (addr));
set_fs(old_fs); set_fc(USER_DATA);
} else if (CPU_IS_020_OR_030) } else if (CPU_IS_020_OR_030)
__asm__ __volatile__("pflush #4,#4,(%0)" : : "a" (addr)); __asm__ __volatile__("pflush #4,#4,(%0)" : : "a" (addr));
} }
@ -84,12 +83,8 @@ static inline void flush_tlb_mm(struct mm_struct *mm)
static inline void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr) static inline void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr)
{ {
if (vma->vm_mm == current->active_mm) { if (vma->vm_mm == current->active_mm)
mm_segment_t old_fs = force_uaccess_begin();
__flush_tlb_one(addr); __flush_tlb_one(addr);
force_uaccess_end(old_fs);
}
} }
static inline void flush_tlb_range(struct vm_area_struct *vma, static inline void flush_tlb_range(struct vm_area_struct *vma,

View File

@ -267,6 +267,10 @@ struct frame {
} un; } un;
}; };
#ifdef CONFIG_M68040
asmlinkage void berr_040cleanup(struct frame *fp);
#endif
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* _M68K_TRAPS_H */ #endif /* _M68K_TRAPS_H */

View File

@ -9,13 +9,16 @@
*/ */
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/types.h> #include <linux/types.h>
#include <asm/segment.h>
#include <asm/extable.h> #include <asm/extable.h>
/* We let the MMU do all checking */ /* We let the MMU do all checking */
static inline int access_ok(const void __user *addr, static inline int access_ok(const void __user *addr,
unsigned long size) unsigned long size)
{ {
/*
* XXX: for !CONFIG_CPU_HAS_ADDRESS_SPACES this really needs to check
* for TASK_SIZE!
*/
return 1; return 1;
} }
@ -35,12 +38,9 @@ static inline int access_ok(const void __user *addr,
#define MOVES "move" #define MOVES "move"
#endif #endif
extern int __put_user_bad(void); #define __put_user_asm(inst, res, x, ptr, bwl, reg, err) \
extern int __get_user_bad(void);
#define __put_user_asm(res, x, ptr, bwl, reg, err) \
asm volatile ("\n" \ asm volatile ("\n" \
"1: "MOVES"."#bwl" %2,%1\n" \ "1: "inst"."#bwl" %2,%1\n" \
"2:\n" \ "2:\n" \
" .section .fixup,\"ax\"\n" \ " .section .fixup,\"ax\"\n" \
" .even\n" \ " .even\n" \
@ -56,6 +56,31 @@ asm volatile ("\n" \
: "+d" (res), "=m" (*(ptr)) \ : "+d" (res), "=m" (*(ptr)) \
: #reg (x), "i" (err)) : #reg (x), "i" (err))
#define __put_user_asm8(inst, res, x, ptr) \
do { \
const void *__pu_ptr = (const void __force *)(ptr); \
\
asm volatile ("\n" \
"1: "inst".l %2,(%1)+\n" \
"2: "inst".l %R2,(%1)\n" \
"3:\n" \
" .section .fixup,\"ax\"\n" \
" .even\n" \
"10: movel %3,%0\n" \
" jra 3b\n" \
" .previous\n" \
"\n" \
" .section __ex_table,\"a\"\n" \
" .align 4\n" \
" .long 1b,10b\n" \
" .long 2b,10b\n" \
" .long 3b,10b\n" \
" .previous" \
: "+d" (res), "+a" (__pu_ptr) \
: "r" (x), "i" (-EFAULT) \
: "memory"); \
} while (0)
/* /*
* These are the main single-value transfer routines. They automatically * These are the main single-value transfer routines. They automatically
* use the right size if we just have the right pointer type. * use the right size if we just have the right pointer type.
@ -68,51 +93,29 @@ asm volatile ("\n" \
__chk_user_ptr(ptr); \ __chk_user_ptr(ptr); \
switch (sizeof (*(ptr))) { \ switch (sizeof (*(ptr))) { \
case 1: \ case 1: \
__put_user_asm(__pu_err, __pu_val, ptr, b, d, -EFAULT); \ __put_user_asm(MOVES, __pu_err, __pu_val, ptr, b, d, -EFAULT); \
break; \ break; \
case 2: \ case 2: \
__put_user_asm(__pu_err, __pu_val, ptr, w, r, -EFAULT); \ __put_user_asm(MOVES, __pu_err, __pu_val, ptr, w, r, -EFAULT); \
break; \ break; \
case 4: \ case 4: \
__put_user_asm(__pu_err, __pu_val, ptr, l, r, -EFAULT); \ __put_user_asm(MOVES, __pu_err, __pu_val, ptr, l, r, -EFAULT); \
break; \ break; \
case 8: \ case 8: \
{ \ __put_user_asm8(MOVES, __pu_err, __pu_val, ptr); \
const void __user *__pu_ptr = (ptr); \
asm volatile ("\n" \
"1: "MOVES".l %2,(%1)+\n" \
"2: "MOVES".l %R2,(%1)\n" \
"3:\n" \
" .section .fixup,\"ax\"\n" \
" .even\n" \
"10: movel %3,%0\n" \
" jra 3b\n" \
" .previous\n" \
"\n" \
" .section __ex_table,\"a\"\n" \
" .align 4\n" \
" .long 1b,10b\n" \
" .long 2b,10b\n" \
" .long 3b,10b\n" \
" .previous" \
: "+d" (__pu_err), "+a" (__pu_ptr) \
: "r" (__pu_val), "i" (-EFAULT) \
: "memory"); \
break; \ break; \
} \
default: \ default: \
__pu_err = __put_user_bad(); \ BUILD_BUG(); \
break; \
} \ } \
__pu_err; \ __pu_err; \
}) })
#define put_user(x, ptr) __put_user(x, ptr) #define put_user(x, ptr) __put_user(x, ptr)
#define __get_user_asm(res, x, ptr, type, bwl, reg, err) ({ \ #define __get_user_asm(inst, res, x, ptr, type, bwl, reg, err) ({ \
type __gu_val; \ type __gu_val; \
asm volatile ("\n" \ asm volatile ("\n" \
"1: "MOVES"."#bwl" %2,%1\n" \ "1: "inst"."#bwl" %2,%1\n" \
"2:\n" \ "2:\n" \
" .section .fixup,\"ax\"\n" \ " .section .fixup,\"ax\"\n" \
" .even\n" \ " .even\n" \
@ -130,53 +133,57 @@ asm volatile ("\n" \
(x) = (__force typeof(*(ptr)))(__force unsigned long)__gu_val; \ (x) = (__force typeof(*(ptr)))(__force unsigned long)__gu_val; \
}) })
#define __get_user_asm8(inst, res, x, ptr) \
do { \
const void *__gu_ptr = (const void __force *)(ptr); \
union { \
u64 l; \
__typeof__(*(ptr)) t; \
} __gu_val; \
\
asm volatile ("\n" \
"1: "inst".l (%2)+,%1\n" \
"2: "inst".l (%2),%R1\n" \
"3:\n" \
" .section .fixup,\"ax\"\n" \
" .even\n" \
"10: move.l %3,%0\n" \
" sub.l %1,%1\n" \
" sub.l %R1,%R1\n" \
" jra 3b\n" \
" .previous\n" \
"\n" \
" .section __ex_table,\"a\"\n" \
" .align 4\n" \
" .long 1b,10b\n" \
" .long 2b,10b\n" \
" .previous" \
: "+d" (res), "=&r" (__gu_val.l), \
"+a" (__gu_ptr) \
: "i" (-EFAULT) \
: "memory"); \
(x) = __gu_val.t; \
} while (0)
#define __get_user(x, ptr) \ #define __get_user(x, ptr) \
({ \ ({ \
int __gu_err = 0; \ int __gu_err = 0; \
__chk_user_ptr(ptr); \ __chk_user_ptr(ptr); \
switch (sizeof(*(ptr))) { \ switch (sizeof(*(ptr))) { \
case 1: \ case 1: \
__get_user_asm(__gu_err, x, ptr, u8, b, d, -EFAULT); \ __get_user_asm(MOVES, __gu_err, x, ptr, u8, b, d, -EFAULT); \
break; \ break; \
case 2: \ case 2: \
__get_user_asm(__gu_err, x, ptr, u16, w, r, -EFAULT); \ __get_user_asm(MOVES, __gu_err, x, ptr, u16, w, r, -EFAULT); \
break; \ break; \
case 4: \ case 4: \
__get_user_asm(__gu_err, x, ptr, u32, l, r, -EFAULT); \ __get_user_asm(MOVES, __gu_err, x, ptr, u32, l, r, -EFAULT); \
break; \ break; \
case 8: { \ case 8: \
const void __user *__gu_ptr = (ptr); \ __get_user_asm8(MOVES, __gu_err, x, ptr); \
union { \
u64 l; \
__typeof__(*(ptr)) t; \
} __gu_val; \
asm volatile ("\n" \
"1: "MOVES".l (%2)+,%1\n" \
"2: "MOVES".l (%2),%R1\n" \
"3:\n" \
" .section .fixup,\"ax\"\n" \
" .even\n" \
"10: move.l %3,%0\n" \
" sub.l %1,%1\n" \
" sub.l %R1,%R1\n" \
" jra 3b\n" \
" .previous\n" \
"\n" \
" .section __ex_table,\"a\"\n" \
" .align 4\n" \
" .long 1b,10b\n" \
" .long 2b,10b\n" \
" .previous" \
: "+d" (__gu_err), "=&r" (__gu_val.l), \
"+a" (__gu_ptr) \
: "i" (-EFAULT) \
: "memory"); \
(x) = __gu_val.t; \
break; \ break; \
} \
default: \ default: \
__gu_err = __get_user_bad(); \ BUILD_BUG(); \
break; \
} \ } \
__gu_err; \ __gu_err; \
}) })
@ -322,16 +329,19 @@ __constant_copy_to_user(void __user *to, const void *from, unsigned long n)
switch (n) { switch (n) {
case 1: case 1:
__put_user_asm(res, *(u8 *)from, (u8 __user *)to, b, d, 1); __put_user_asm(MOVES, res, *(u8 *)from, (u8 __user *)to,
b, d, 1);
break; break;
case 2: case 2:
__put_user_asm(res, *(u16 *)from, (u16 __user *)to, w, r, 2); __put_user_asm(MOVES, res, *(u16 *)from, (u16 __user *)to,
w, r, 2);
break; break;
case 3: case 3:
__constant_copy_to_user_asm(res, to, from, tmp, 3, w, b,); __constant_copy_to_user_asm(res, to, from, tmp, 3, w, b,);
break; break;
case 4: case 4:
__put_user_asm(res, *(u32 *)from, (u32 __user *)to, l, r, 4); __put_user_asm(MOVES, res, *(u32 *)from, (u32 __user *)to,
l, r, 4);
break; break;
case 5: case 5:
__constant_copy_to_user_asm(res, to, from, tmp, 5, l, b,); __constant_copy_to_user_asm(res, to, from, tmp, 5, l, b,);
@ -380,8 +390,65 @@ raw_copy_to_user(void __user *to, const void *from, unsigned long n)
#define INLINE_COPY_FROM_USER #define INLINE_COPY_FROM_USER
#define INLINE_COPY_TO_USER #define INLINE_COPY_TO_USER
#define user_addr_max() \ #define HAVE_GET_KERNEL_NOFAULT
(uaccess_kernel() ? ~0UL : TASK_SIZE)
#define __get_kernel_nofault(dst, src, type, err_label) \
do { \
type *__gk_dst = (type *)(dst); \
type *__gk_src = (type *)(src); \
int __gk_err = 0; \
\
switch (sizeof(type)) { \
case 1: \
__get_user_asm("move", __gk_err, *__gk_dst, __gk_src, \
u8, b, d, -EFAULT); \
break; \
case 2: \
__get_user_asm("move", __gk_err, *__gk_dst, __gk_src, \
u16, w, r, -EFAULT); \
break; \
case 4: \
__get_user_asm("move", __gk_err, *__gk_dst, __gk_src, \
u32, l, r, -EFAULT); \
break; \
case 8: \
__get_user_asm8("move", __gk_err, *__gk_dst, __gk_src); \
break; \
default: \
BUILD_BUG(); \
} \
if (unlikely(__gk_err)) \
goto err_label; \
} while (0)
#define __put_kernel_nofault(dst, src, type, err_label) \
do { \
type __pk_src = *(type *)(src); \
type *__pk_dst = (type *)(dst); \
int __pk_err = 0; \
\
switch (sizeof(type)) { \
case 1: \
__put_user_asm("move", __pk_err, __pk_src, __pk_dst, \
b, d, -EFAULT); \
break; \
case 2: \
__put_user_asm("move", __pk_err, __pk_src, __pk_dst, \
w, r, -EFAULT); \
break; \
case 4: \
__put_user_asm("move", __pk_err, __pk_src, __pk_dst, \
l, r, -EFAULT); \
break; \
case 8: \
__put_user_asm8("move", __pk_err, __pk_src, __pk_dst); \
break; \
default: \
BUILD_BUG(); \
} \
if (unlikely(__pk_err)) \
goto err_label; \
} while (0)
extern long strncpy_from_user(char *dst, const char __user *src, long count); extern long strncpy_from_user(char *dst, const char __user *src, long count);
extern __must_check long strnlen_user(const char __user *str, long n); extern __must_check long strnlen_user(const char __user *str, long n);

View File

@ -31,7 +31,7 @@ int main(void)
DEFINE(THREAD_KSP, offsetof(struct thread_struct, ksp)); DEFINE(THREAD_KSP, offsetof(struct thread_struct, ksp));
DEFINE(THREAD_USP, offsetof(struct thread_struct, usp)); DEFINE(THREAD_USP, offsetof(struct thread_struct, usp));
DEFINE(THREAD_SR, offsetof(struct thread_struct, sr)); DEFINE(THREAD_SR, offsetof(struct thread_struct, sr));
DEFINE(THREAD_FS, offsetof(struct thread_struct, fs)); DEFINE(THREAD_FC, offsetof(struct thread_struct, fc));
DEFINE(THREAD_CRP, offsetof(struct thread_struct, crp)); DEFINE(THREAD_CRP, offsetof(struct thread_struct, crp));
DEFINE(THREAD_ESP0, offsetof(struct thread_struct, esp0)); DEFINE(THREAD_ESP0, offsetof(struct thread_struct, esp0));
DEFINE(THREAD_FPREG, offsetof(struct thread_struct, fp)); DEFINE(THREAD_FPREG, offsetof(struct thread_struct, fp));

View File

@ -36,7 +36,6 @@
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/errno.h> #include <asm/errno.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/segment.h>
#include <asm/traps.h> #include <asm/traps.h>
#include <asm/unistd.h> #include <asm/unistd.h>
#include <asm/asm-offsets.h> #include <asm/asm-offsets.h>
@ -78,20 +77,38 @@ ENTRY(__sys_clone3)
ENTRY(sys_sigreturn) ENTRY(sys_sigreturn)
SAVE_SWITCH_STACK SAVE_SWITCH_STACK
movel %sp,%sp@- | switch_stack pointer movel %sp,%a1 | switch_stack pointer
pea %sp@(SWITCH_STACK_SIZE+4) | pt_regs pointer lea %sp@(SWITCH_STACK_SIZE),%a0 | pt_regs pointer
lea %sp@(-84),%sp | leave a gap
movel %a1,%sp@-
movel %a0,%sp@-
jbsr do_sigreturn jbsr do_sigreturn
addql #8,%sp jra 1f | shared with rt_sigreturn()
RESTORE_SWITCH_STACK
rts
ENTRY(sys_rt_sigreturn) ENTRY(sys_rt_sigreturn)
SAVE_SWITCH_STACK SAVE_SWITCH_STACK
movel %sp,%sp@- | switch_stack pointer movel %sp,%a1 | switch_stack pointer
pea %sp@(SWITCH_STACK_SIZE+4) | pt_regs pointer lea %sp@(SWITCH_STACK_SIZE),%a0 | pt_regs pointer
lea %sp@(-84),%sp | leave a gap
movel %a1,%sp@-
movel %a0,%sp@-
| stack contents:
| [original pt_regs address] [original switch_stack address]
| [gap] [switch_stack] [pt_regs] [exception frame]
jbsr do_rt_sigreturn jbsr do_rt_sigreturn
addql #8,%sp
1:
| stack contents now:
| [original pt_regs address] [original switch_stack address]
| [unused part of the gap] [moved switch_stack] [moved pt_regs]
| [replacement exception frame]
| return value of do_{rt_,}sigreturn() points to moved switch_stack.
movel %d0,%sp | discard the leftover junk
RESTORE_SWITCH_STACK RESTORE_SWITCH_STACK
| stack contents now is just [syscall return address] [pt_regs] [frame]
| return pt_regs.d0
movel %sp@(PT_OFF_D0+4),%d0
rts rts
ENTRY(buserr) ENTRY(buserr)
@ -182,25 +199,6 @@ do_trace_exit:
addql #4,%sp addql #4,%sp
jra .Lret_from_exception jra .Lret_from_exception
ENTRY(ret_from_signal)
movel %curptr@(TASK_STACK),%a1
tstb %a1@(TINFO_FLAGS+2)
jge 1f
jbsr syscall_trace
1: RESTORE_SWITCH_STACK
addql #4,%sp
/* on 68040 complete pending writebacks if any */
#ifdef CONFIG_M68040
bfextu %sp@(PT_OFF_FORMATVEC){#0,#4},%d0
subql #7,%d0 | bus error frame ?
jbne 1f
movel %sp,%sp@-
jbsr berr_040cleanup
addql #4,%sp
1:
#endif
jra .Lret_from_exception
ENTRY(system_call) ENTRY(system_call)
SAVE_ALL_SYS SAVE_ALL_SYS
@ -338,7 +336,7 @@ resume:
/* save fs (sfc,%dfc) (may be pointing to kernel memory) */ /* save fs (sfc,%dfc) (may be pointing to kernel memory) */
movec %sfc,%d0 movec %sfc,%d0
movew %d0,%a0@(TASK_THREAD+THREAD_FS) movew %d0,%a0@(TASK_THREAD+THREAD_FC)
/* save usp */ /* save usp */
/* it is better to use a movel here instead of a movew 8*) */ /* it is better to use a movel here instead of a movew 8*) */
@ -424,7 +422,7 @@ resume:
movel %a0,%usp movel %a0,%usp
/* restore fs (sfc,%dfc) */ /* restore fs (sfc,%dfc) */
movew %a1@(TASK_THREAD+THREAD_FS),%a0 movew %a1@(TASK_THREAD+THREAD_FC),%a0
movec %a0,%sfc movec %a0,%sfc
movec %a0,%dfc movec %a0,%dfc

View File

@ -92,7 +92,7 @@ void show_regs(struct pt_regs * regs)
void flush_thread(void) void flush_thread(void)
{ {
current->thread.fs = __USER_DS; current->thread.fc = USER_DATA;
#ifdef CONFIG_FPU #ifdef CONFIG_FPU
if (!FPU_IS_EMU) { if (!FPU_IS_EMU) {
unsigned long zero = 0; unsigned long zero = 0;
@ -155,7 +155,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, unsigned long arg,
* Must save the current SFC/DFC value, NOT the value when * Must save the current SFC/DFC value, NOT the value when
* the parent was last descheduled - RGH 10-08-96 * the parent was last descheduled - RGH 10-08-96
*/ */
p->thread.fs = get_fs().seg; p->thread.fc = USER_DATA;
if (unlikely(p->flags & (PF_KTHREAD | PF_IO_WORKER))) { if (unlikely(p->flags & (PF_KTHREAD | PF_IO_WORKER))) {
/* kernel thread */ /* kernel thread */

View File

@ -447,7 +447,7 @@ static inline void save_fpu_state(struct sigcontext *sc, struct pt_regs *regs)
if (CPU_IS_060 ? sc->sc_fpstate[2] : sc->sc_fpstate[0]) { if (CPU_IS_060 ? sc->sc_fpstate[2] : sc->sc_fpstate[0]) {
fpu_version = sc->sc_fpstate[0]; fpu_version = sc->sc_fpstate[0];
if (CPU_IS_020_OR_030 && if (CPU_IS_020_OR_030 && !regs->stkadj &&
regs->vector >= (VEC_FPBRUC * 4) && regs->vector >= (VEC_FPBRUC * 4) &&
regs->vector <= (VEC_FPNAN * 4)) { regs->vector <= (VEC_FPNAN * 4)) {
/* Clear pending exception in 68882 idle frame */ /* Clear pending exception in 68882 idle frame */
@ -510,7 +510,7 @@ static inline int rt_save_fpu_state(struct ucontext __user *uc, struct pt_regs *
if (!(CPU_IS_060 || CPU_IS_COLDFIRE)) if (!(CPU_IS_060 || CPU_IS_COLDFIRE))
context_size = fpstate[1]; context_size = fpstate[1];
fpu_version = fpstate[0]; fpu_version = fpstate[0];
if (CPU_IS_020_OR_030 && if (CPU_IS_020_OR_030 && !regs->stkadj &&
regs->vector >= (VEC_FPBRUC * 4) && regs->vector >= (VEC_FPBRUC * 4) &&
regs->vector <= (VEC_FPNAN * 4)) { regs->vector <= (VEC_FPNAN * 4)) {
/* Clear pending exception in 68882 idle frame */ /* Clear pending exception in 68882 idle frame */
@ -641,56 +641,35 @@ static inline void siginfo_build_tests(void)
static int mangle_kernel_stack(struct pt_regs *regs, int formatvec, static int mangle_kernel_stack(struct pt_regs *regs, int formatvec,
void __user *fp) void __user *fp)
{ {
int fsize = frame_extra_sizes(formatvec >> 12); int extra = frame_extra_sizes(formatvec >> 12);
if (fsize < 0) { char buf[sizeof_field(struct frame, un)];
if (extra < 0) {
/* /*
* user process trying to return with weird frame format * user process trying to return with weird frame format
*/ */
pr_debug("user process returning with weird frame format\n"); pr_debug("user process returning with weird frame format\n");
return 1; return -1;
} }
if (!fsize) { if (extra && copy_from_user(buf, fp, extra))
regs->format = formatvec >> 12; return -1;
regs->vector = formatvec & 0xfff; regs->format = formatvec >> 12;
} else { regs->vector = formatvec & 0xfff;
struct switch_stack *sw = (struct switch_stack *)regs - 1; if (extra) {
/* yes, twice as much as max(sizeof(frame.un.fmt<x>)) */ void *p = (struct switch_stack *)regs - 1;
unsigned long buf[sizeof_field(struct frame, un) / 2]; struct frame *new = (void *)regs - extra;
int size = sizeof(struct pt_regs)+sizeof(struct switch_stack);
/* that'll make sure that expansion won't crap over data */ memmove(p - extra, p, size);
if (copy_from_user(buf + fsize / 4, fp, fsize)) memcpy(p - extra + size, buf, extra);
return 1; current->thread.esp0 = (unsigned long)&new->ptregs;
#ifdef CONFIG_M68040
/* point of no return */ /* on 68040 complete pending writebacks if any */
regs->format = formatvec >> 12; if (new->ptregs.format == 7) // bus error frame
regs->vector = formatvec & 0xfff; berr_040cleanup(new);
#define frame_offset (sizeof(struct pt_regs)+sizeof(struct switch_stack))
__asm__ __volatile__ (
#ifdef CONFIG_COLDFIRE
" movel %0,%/sp\n\t"
" bra ret_from_signal\n"
#else
" movel %0,%/a0\n\t"
" subl %1,%/a0\n\t" /* make room on stack */
" movel %/a0,%/sp\n\t" /* set stack pointer */
/* move switch_stack and pt_regs */
"1: movel %0@+,%/a0@+\n\t"
" dbra %2,1b\n\t"
" lea %/sp@(%c3),%/a0\n\t" /* add offset of fmt */
" lsrl #2,%1\n\t"
" subql #1,%1\n\t"
/* copy to the gap we'd made */
"2: movel %4@+,%/a0@+\n\t"
" dbra %1,2b\n\t"
" bral ret_from_signal\n"
#endif #endif
: /* no outputs, it doesn't ever return */
: "a" (sw), "d" (fsize), "d" (frame_offset/4-1),
"n" (frame_offset), "a" (buf + fsize/4)
: "a0");
#undef frame_offset
} }
return 0; return extra;
} }
static inline int static inline int
@ -698,7 +677,6 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *usc, void __u
{ {
int formatvec; int formatvec;
struct sigcontext context; struct sigcontext context;
int err = 0;
siginfo_build_tests(); siginfo_build_tests();
@ -707,7 +685,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *usc, void __u
/* get previous context */ /* get previous context */
if (copy_from_user(&context, usc, sizeof(context))) if (copy_from_user(&context, usc, sizeof(context)))
goto badframe; return -1;
/* restore passed registers */ /* restore passed registers */
regs->d0 = context.sc_d0; regs->d0 = context.sc_d0;
@ -720,15 +698,10 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *usc, void __u
wrusp(context.sc_usp); wrusp(context.sc_usp);
formatvec = context.sc_formatvec; formatvec = context.sc_formatvec;
err = restore_fpu_state(&context); if (restore_fpu_state(&context))
return -1;
if (err || mangle_kernel_stack(regs, formatvec, fp)) return mangle_kernel_stack(regs, formatvec, fp);
goto badframe;
return 0;
badframe:
return 1;
} }
static inline int static inline int
@ -745,7 +718,7 @@ rt_restore_ucontext(struct pt_regs *regs, struct switch_stack *sw,
err = __get_user(temp, &uc->uc_mcontext.version); err = __get_user(temp, &uc->uc_mcontext.version);
if (temp != MCONTEXT_VERSION) if (temp != MCONTEXT_VERSION)
goto badframe; return -1;
/* restore passed registers */ /* restore passed registers */
err |= __get_user(regs->d0, &gregs[0]); err |= __get_user(regs->d0, &gregs[0]);
err |= __get_user(regs->d1, &gregs[1]); err |= __get_user(regs->d1, &gregs[1]);
@ -774,22 +747,17 @@ rt_restore_ucontext(struct pt_regs *regs, struct switch_stack *sw,
err |= restore_altstack(&uc->uc_stack); err |= restore_altstack(&uc->uc_stack);
if (err) if (err)
goto badframe; return -1;
if (mangle_kernel_stack(regs, temp, &uc->uc_extra)) return mangle_kernel_stack(regs, temp, &uc->uc_extra);
goto badframe;
return 0;
badframe:
return 1;
} }
asmlinkage int do_sigreturn(struct pt_regs *regs, struct switch_stack *sw) asmlinkage void *do_sigreturn(struct pt_regs *regs, struct switch_stack *sw)
{ {
unsigned long usp = rdusp(); unsigned long usp = rdusp();
struct sigframe __user *frame = (struct sigframe __user *)(usp - 4); struct sigframe __user *frame = (struct sigframe __user *)(usp - 4);
sigset_t set; sigset_t set;
int size;
if (!access_ok(frame, sizeof(*frame))) if (!access_ok(frame, sizeof(*frame)))
goto badframe; goto badframe;
@ -801,20 +769,22 @@ asmlinkage int do_sigreturn(struct pt_regs *regs, struct switch_stack *sw)
set_current_blocked(&set); set_current_blocked(&set);
if (restore_sigcontext(regs, &frame->sc, frame + 1)) size = restore_sigcontext(regs, &frame->sc, frame + 1);
if (size < 0)
goto badframe; goto badframe;
return regs->d0; return (void *)sw - size;
badframe: badframe:
force_sig(SIGSEGV); force_sig(SIGSEGV);
return 0; return sw;
} }
asmlinkage int do_rt_sigreturn(struct pt_regs *regs, struct switch_stack *sw) asmlinkage void *do_rt_sigreturn(struct pt_regs *regs, struct switch_stack *sw)
{ {
unsigned long usp = rdusp(); unsigned long usp = rdusp();
struct rt_sigframe __user *frame = (struct rt_sigframe __user *)(usp - 4); struct rt_sigframe __user *frame = (struct rt_sigframe __user *)(usp - 4);
sigset_t set; sigset_t set;
int size;
if (!access_ok(frame, sizeof(*frame))) if (!access_ok(frame, sizeof(*frame)))
goto badframe; goto badframe;
@ -823,27 +793,34 @@ asmlinkage int do_rt_sigreturn(struct pt_regs *regs, struct switch_stack *sw)
set_current_blocked(&set); set_current_blocked(&set);
if (rt_restore_ucontext(regs, sw, &frame->uc)) size = rt_restore_ucontext(regs, sw, &frame->uc);
if (size < 0)
goto badframe; goto badframe;
return regs->d0; return (void *)sw - size;
badframe: badframe:
force_sig(SIGSEGV); force_sig(SIGSEGV);
return 0; return sw;
}
static inline struct pt_regs *rte_regs(struct pt_regs *regs)
{
return (void *)regs + regs->stkadj;
} }
static void setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs, static void setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
unsigned long mask) unsigned long mask)
{ {
struct pt_regs *tregs = rte_regs(regs);
sc->sc_mask = mask; sc->sc_mask = mask;
sc->sc_usp = rdusp(); sc->sc_usp = rdusp();
sc->sc_d0 = regs->d0; sc->sc_d0 = regs->d0;
sc->sc_d1 = regs->d1; sc->sc_d1 = regs->d1;
sc->sc_a0 = regs->a0; sc->sc_a0 = regs->a0;
sc->sc_a1 = regs->a1; sc->sc_a1 = regs->a1;
sc->sc_sr = regs->sr; sc->sc_sr = tregs->sr;
sc->sc_pc = regs->pc; sc->sc_pc = tregs->pc;
sc->sc_formatvec = regs->format << 12 | regs->vector; sc->sc_formatvec = tregs->format << 12 | tregs->vector;
save_a5_state(sc, regs); save_a5_state(sc, regs);
save_fpu_state(sc, regs); save_fpu_state(sc, regs);
} }
@ -851,6 +828,7 @@ static void setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
static inline int rt_setup_ucontext(struct ucontext __user *uc, struct pt_regs *regs) static inline int rt_setup_ucontext(struct ucontext __user *uc, struct pt_regs *regs)
{ {
struct switch_stack *sw = (struct switch_stack *)regs - 1; struct switch_stack *sw = (struct switch_stack *)regs - 1;
struct pt_regs *tregs = rte_regs(regs);
greg_t __user *gregs = uc->uc_mcontext.gregs; greg_t __user *gregs = uc->uc_mcontext.gregs;
int err = 0; int err = 0;
@ -871,9 +849,9 @@ static inline int rt_setup_ucontext(struct ucontext __user *uc, struct pt_regs *
err |= __put_user(sw->a5, &gregs[13]); err |= __put_user(sw->a5, &gregs[13]);
err |= __put_user(sw->a6, &gregs[14]); err |= __put_user(sw->a6, &gregs[14]);
err |= __put_user(rdusp(), &gregs[15]); err |= __put_user(rdusp(), &gregs[15]);
err |= __put_user(regs->pc, &gregs[16]); err |= __put_user(tregs->pc, &gregs[16]);
err |= __put_user(regs->sr, &gregs[17]); err |= __put_user(tregs->sr, &gregs[17]);
err |= __put_user((regs->format << 12) | regs->vector, &uc->uc_formatvec); err |= __put_user((tregs->format << 12) | tregs->vector, &uc->uc_formatvec);
err |= rt_save_fpu_state(uc, regs); err |= rt_save_fpu_state(uc, regs);
return err; return err;
} }
@ -890,13 +868,14 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
struct pt_regs *regs) struct pt_regs *regs)
{ {
struct sigframe __user *frame; struct sigframe __user *frame;
int fsize = frame_extra_sizes(regs->format); struct pt_regs *tregs = rte_regs(regs);
int fsize = frame_extra_sizes(tregs->format);
struct sigcontext context; struct sigcontext context;
int err = 0, sig = ksig->sig; int err = 0, sig = ksig->sig;
if (fsize < 0) { if (fsize < 0) {
pr_debug("setup_frame: Unknown frame format %#x\n", pr_debug("setup_frame: Unknown frame format %#x\n",
regs->format); tregs->format);
return -EFAULT; return -EFAULT;
} }
@ -907,7 +886,7 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
err |= __put_user(sig, &frame->sig); err |= __put_user(sig, &frame->sig);
err |= __put_user(regs->vector, &frame->code); err |= __put_user(tregs->vector, &frame->code);
err |= __put_user(&frame->sc, &frame->psc); err |= __put_user(&frame->sc, &frame->psc);
if (_NSIG_WORDS > 1) if (_NSIG_WORDS > 1)
@ -933,34 +912,28 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
push_cache ((unsigned long) &frame->retcode); push_cache ((unsigned long) &frame->retcode);
/*
* Set up registers for signal handler. All the state we are about
* to destroy is successfully copied to sigframe.
*/
wrusp ((unsigned long) frame);
regs->pc = (unsigned long) ksig->ka.sa.sa_handler;
adjustformat(regs);
/* /*
* This is subtle; if we build more than one sigframe, all but the * This is subtle; if we build more than one sigframe, all but the
* first one will see frame format 0 and have fsize == 0, so we won't * first one will see frame format 0 and have fsize == 0, so we won't
* screw stkadj. * screw stkadj.
*/ */
if (fsize) if (fsize) {
regs->stkadj = fsize; regs->stkadj = fsize;
tregs = rte_regs(regs);
/* Prepare to skip over the extra stuff in the exception frame. */
if (regs->stkadj) {
struct pt_regs *tregs =
(struct pt_regs *)((ulong)regs + regs->stkadj);
pr_debug("Performing stackadjust=%04lx\n", regs->stkadj); pr_debug("Performing stackadjust=%04lx\n", regs->stkadj);
/* This must be copied with decreasing addresses to
handle overlaps. */
tregs->vector = 0; tregs->vector = 0;
tregs->format = 0; tregs->format = 0;
tregs->pc = regs->pc;
tregs->sr = regs->sr; tregs->sr = regs->sr;
} }
/*
* Set up registers for signal handler. All the state we are about
* to destroy is successfully copied to sigframe.
*/
wrusp ((unsigned long) frame);
tregs->pc = (unsigned long) ksig->ka.sa.sa_handler;
adjustformat(regs);
return 0; return 0;
} }
@ -968,7 +941,8 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
struct pt_regs *regs) struct pt_regs *regs)
{ {
struct rt_sigframe __user *frame; struct rt_sigframe __user *frame;
int fsize = frame_extra_sizes(regs->format); struct pt_regs *tregs = rte_regs(regs);
int fsize = frame_extra_sizes(tregs->format);
int err = 0, sig = ksig->sig; int err = 0, sig = ksig->sig;
if (fsize < 0) { if (fsize < 0) {
@ -1018,34 +992,27 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
push_cache ((unsigned long) &frame->retcode); push_cache ((unsigned long) &frame->retcode);
/*
* Set up registers for signal handler. All the state we are about
* to destroy is successfully copied to sigframe.
*/
wrusp ((unsigned long) frame);
regs->pc = (unsigned long) ksig->ka.sa.sa_handler;
adjustformat(regs);
/* /*
* This is subtle; if we build more than one sigframe, all but the * This is subtle; if we build more than one sigframe, all but the
* first one will see frame format 0 and have fsize == 0, so we won't * first one will see frame format 0 and have fsize == 0, so we won't
* screw stkadj. * screw stkadj.
*/ */
if (fsize) if (fsize) {
regs->stkadj = fsize; regs->stkadj = fsize;
tregs = rte_regs(regs);
/* Prepare to skip over the extra stuff in the exception frame. */
if (regs->stkadj) {
struct pt_regs *tregs =
(struct pt_regs *)((ulong)regs + regs->stkadj);
pr_debug("Performing stackadjust=%04lx\n", regs->stkadj); pr_debug("Performing stackadjust=%04lx\n", regs->stkadj);
/* This must be copied with decreasing addresses to
handle overlaps. */
tregs->vector = 0; tregs->vector = 0;
tregs->format = 0; tregs->format = 0;
tregs->pc = regs->pc;
tregs->sr = regs->sr; tregs->sr = regs->sr;
} }
/*
* Set up registers for signal handler. All the state we are about
* to destroy is successfully copied to sigframe.
*/
wrusp ((unsigned long) frame);
tregs->pc = (unsigned long) ksig->ka.sa.sa_handler;
adjustformat(regs);
return 0; return 0;
} }

View File

@ -181,9 +181,8 @@ static inline void access_error060 (struct frame *fp)
static inline unsigned long probe040(int iswrite, unsigned long addr, int wbs) static inline unsigned long probe040(int iswrite, unsigned long addr, int wbs)
{ {
unsigned long mmusr; unsigned long mmusr;
mm_segment_t old_fs = get_fs();
set_fs(MAKE_MM_SEG(wbs)); set_fc(wbs);
if (iswrite) if (iswrite)
asm volatile (".chip 68040; ptestw (%0); .chip 68k" : : "a" (addr)); asm volatile (".chip 68040; ptestw (%0); .chip 68k" : : "a" (addr));
@ -192,7 +191,7 @@ static inline unsigned long probe040(int iswrite, unsigned long addr, int wbs)
asm volatile (".chip 68040; movec %%mmusr,%0; .chip 68k" : "=r" (mmusr)); asm volatile (".chip 68040; movec %%mmusr,%0; .chip 68k" : "=r" (mmusr));
set_fs(old_fs); set_fc(USER_DATA);
return mmusr; return mmusr;
} }
@ -201,10 +200,8 @@ static inline int do_040writeback1(unsigned short wbs, unsigned long wba,
unsigned long wbd) unsigned long wbd)
{ {
int res = 0; int res = 0;
mm_segment_t old_fs = get_fs();
/* set_fs can not be moved, otherwise put_user() may oops */ set_fc(wbs);
set_fs(MAKE_MM_SEG(wbs));
switch (wbs & WBSIZ_040) { switch (wbs & WBSIZ_040) {
case BA_SIZE_BYTE: case BA_SIZE_BYTE:
@ -218,9 +215,7 @@ static inline int do_040writeback1(unsigned short wbs, unsigned long wba,
break; break;
} }
/* set_fs can not be moved, otherwise put_user() may oops */ set_fc(USER_DATA);
set_fs(old_fs);
pr_debug("do_040writeback1, res=%d\n", res); pr_debug("do_040writeback1, res=%d\n", res);

View File

@ -18,7 +18,6 @@
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/segment.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/macintosh.h> #include <asm/macintosh.h>
#include <asm/mac_via.h> #include <asm/mac_via.h>

View File

@ -49,24 +49,7 @@ static unsigned long virt_to_phys_slow(unsigned long vaddr)
if (mmusr & MMU_R_040) if (mmusr & MMU_R_040)
return (mmusr & PAGE_MASK) | (vaddr & ~PAGE_MASK); return (mmusr & PAGE_MASK) | (vaddr & ~PAGE_MASK);
} else { } else {
unsigned short mmusr; WARN_ON_ONCE(!CPU_IS_040_OR_060);
unsigned long *descaddr;
asm volatile ("ptestr %3,%2@,#7,%0\n\t"
"pmove %%psr,%1"
: "=a&" (descaddr), "=m" (mmusr)
: "a" (vaddr), "d" (get_fs().seg));
if (mmusr & (MMU_I|MMU_B|MMU_L))
return 0;
descaddr = phys_to_virt((unsigned long)descaddr);
switch (mmusr & MMU_NUM) {
case 1:
return (*descaddr & 0xfe000000) | (vaddr & 0x01ffffff);
case 2:
return (*descaddr & 0xfffc0000) | (vaddr & 0x0003ffff);
case 3:
return (*descaddr & PAGE_MASK) | (vaddr & ~PAGE_MASK);
}
} }
return 0; return 0;
} }
@ -107,11 +90,9 @@ void flush_icache_user_range(unsigned long address, unsigned long endaddr)
void flush_icache_range(unsigned long address, unsigned long endaddr) void flush_icache_range(unsigned long address, unsigned long endaddr)
{ {
mm_segment_t old_fs = get_fs(); set_fc(SUPER_DATA);
set_fs(KERNEL_DS);
flush_icache_user_range(address, endaddr); flush_icache_user_range(address, endaddr);
set_fs(old_fs); set_fc(USER_DATA);
} }
EXPORT_SYMBOL(flush_icache_range); EXPORT_SYMBOL(flush_icache_range);

View File

@ -72,12 +72,6 @@ void __init paging_init(void)
if (!empty_zero_page) if (!empty_zero_page)
panic("%s: Failed to allocate %lu bytes align=0x%lx\n", panic("%s: Failed to allocate %lu bytes align=0x%lx\n",
__func__, PAGE_SIZE, PAGE_SIZE); __func__, PAGE_SIZE, PAGE_SIZE);
/*
* Set up SFC/DFC registers (user data space).
*/
set_fs (USER_DS);
max_zone_pfn[ZONE_DMA] = end_mem >> PAGE_SHIFT; max_zone_pfn[ZONE_DMA] = end_mem >> PAGE_SHIFT;
free_area_init(max_zone_pfn); free_area_init(max_zone_pfn);
} }

View File

@ -17,7 +17,6 @@
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/segment.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>

View File

@ -15,7 +15,6 @@
#include <linux/gfp.h> #include <linux/gfp.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/segment.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/traps.h> #include <asm/traps.h>
#include <asm/machdep.h> #include <asm/machdep.h>

View File

@ -467,7 +467,7 @@ void __init paging_init(void)
/* /*
* Set up SFC/DFC registers * Set up SFC/DFC registers
*/ */
set_fs(KERNEL_DS); set_fc(USER_DATA);
#ifdef DEBUG #ifdef DEBUG
printk ("before free_area_init\n"); printk ("before free_area_init\n");

View File

@ -171,7 +171,6 @@ static int bcd2int (unsigned char b)
int mvme147_hwclk(int op, struct rtc_time *t) int mvme147_hwclk(int op, struct rtc_time *t)
{ {
#warning check me!
if (!op) { if (!op) {
m147_rtc->ctrl = RTC_READ; m147_rtc->ctrl = RTC_READ;
t->tm_year = bcd2int (m147_rtc->bcd_year); t->tm_year = bcd2int (m147_rtc->bcd_year);
@ -183,6 +182,9 @@ int mvme147_hwclk(int op, struct rtc_time *t)
m147_rtc->ctrl = 0; m147_rtc->ctrl = 0;
if (t->tm_year < 70) if (t->tm_year < 70)
t->tm_year += 100; t->tm_year += 100;
} else {
/* FIXME Setting the time is not yet supported */
return -EOPNOTSUPP;
} }
return 0; return 0;
} }

View File

@ -436,7 +436,6 @@ int bcd2int (unsigned char b)
int mvme16x_hwclk(int op, struct rtc_time *t) int mvme16x_hwclk(int op, struct rtc_time *t)
{ {
#warning check me!
if (!op) { if (!op) {
rtc->ctrl = RTC_READ; rtc->ctrl = RTC_READ;
t->tm_year = bcd2int (rtc->bcd_year); t->tm_year = bcd2int (rtc->bcd_year);
@ -448,6 +447,9 @@ int mvme16x_hwclk(int op, struct rtc_time *t)
rtc->ctrl = 0; rtc->ctrl = 0;
if (t->tm_year < 70) if (t->tm_year < 70)
t->tm_year += 100; t->tm_year += 100;
} else {
/* FIXME Setting the time is not yet supported */
return -EOPNOTSUPP;
} }
return 0; return 0;
} }

View File

@ -31,7 +31,6 @@
#include <asm/intersil.h> #include <asm/intersil.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/segment.h>
#include <asm/sun3ints.h> #include <asm/sun3ints.h>
char sun3_reserved_pmeg[SUN3_PMEGS_NUM]; char sun3_reserved_pmeg[SUN3_PMEGS_NUM];
@ -89,7 +88,7 @@ void __init sun3_init(void)
sun3_reserved_pmeg[249] = 1; sun3_reserved_pmeg[249] = 1;
sun3_reserved_pmeg[252] = 1; sun3_reserved_pmeg[252] = 1;
sun3_reserved_pmeg[253] = 1; sun3_reserved_pmeg[253] = 1;
set_fs(KERNEL_DS); set_fc(USER_DATA);
} }
/* Without this, Bad Things happen when something calls arch_reset. */ /* Without this, Bad Things happen when something calls arch_reset. */

View File

@ -23,7 +23,6 @@
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/sun3mmu.h> #include <asm/sun3mmu.h>
#include <asm/segment.h>
#include <asm/oplib.h> #include <asm/oplib.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/dvma.h> #include <asm/dvma.h>
@ -191,14 +190,13 @@ void __init mmu_emu_init(unsigned long bootmem_end)
for(seg = 0; seg < PAGE_OFFSET; seg += SUN3_PMEG_SIZE) for(seg = 0; seg < PAGE_OFFSET; seg += SUN3_PMEG_SIZE)
sun3_put_segmap(seg, SUN3_INVALID_PMEG); sun3_put_segmap(seg, SUN3_INVALID_PMEG);
set_fs(MAKE_MM_SEG(3)); set_fc(3);
for(seg = 0; seg < 0x10000000; seg += SUN3_PMEG_SIZE) { for(seg = 0; seg < 0x10000000; seg += SUN3_PMEG_SIZE) {
i = sun3_get_segmap(seg); i = sun3_get_segmap(seg);
for(j = 1; j < CONTEXTS_NUM; j++) for(j = 1; j < CONTEXTS_NUM; j++)
(*(romvec->pv_setctxt))(j, (void *)seg, i); (*(romvec->pv_setctxt))(j, (void *)seg, i);
} }
set_fs(KERNEL_DS); set_fc(USER_DATA);
} }
/* erase the mappings for a dead context. Uses the pg_dir for hints /* erase the mappings for a dead context. Uses the pg_dir for hints

View File

@ -11,7 +11,6 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/kernel_stat.h> #include <linux/kernel_stat.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <asm/segment.h>
#include <asm/intersil.h> #include <asm/intersil.h>
#include <asm/oplib.h> #include <asm/oplib.h>
#include <asm/sun3ints.h> #include <asm/sun3ints.h>

View File

@ -14,7 +14,6 @@
#include <asm/traps.h> #include <asm/traps.h>
#include <asm/sun3xprom.h> #include <asm/sun3xprom.h>
#include <asm/idprom.h> #include <asm/idprom.h>
#include <asm/segment.h>
#include <asm/sun3ints.h> #include <asm/sun3ints.h>
#include <asm/openprom.h> #include <asm/openprom.h>
#include <asm/machines.h> #include <asm/machines.h>

View File

@ -906,10 +906,8 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused,
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)) if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
do_signal(regs); do_signal(regs);
if (thread_info_flags & _TIF_NOTIFY_RESUME) { if (thread_info_flags & _TIF_NOTIFY_RESUME)
tracehook_notify_resume(regs); tracehook_notify_resume(regs);
rseq_handle_notify_resume(NULL, regs);
}
user_enter(); user_enter();
} }

View File

@ -662,6 +662,11 @@ static void build_epilogue(struct jit_ctx *ctx)
((int)K < 0 ? ((int)K >= SKF_LL_OFF ? func##_negative : func) : \ ((int)K < 0 ? ((int)K >= SKF_LL_OFF ? func##_negative : func) : \
func##_positive) func##_positive)
static bool is_bad_offset(int b_off)
{
return b_off > 0x1ffff || b_off < -0x20000;
}
static int build_body(struct jit_ctx *ctx) static int build_body(struct jit_ctx *ctx)
{ {
const struct bpf_prog *prog = ctx->skf; const struct bpf_prog *prog = ctx->skf;
@ -728,7 +733,10 @@ static int build_body(struct jit_ctx *ctx)
/* Load return register on DS for failures */ /* Load return register on DS for failures */
emit_reg_move(r_ret, r_zero, ctx); emit_reg_move(r_ret, r_zero, ctx);
/* Return with error */ /* Return with error */
emit_b(b_imm(prog->len, ctx), ctx); b_off = b_imm(prog->len, ctx);
if (is_bad_offset(b_off))
return -E2BIG;
emit_b(b_off, ctx);
emit_nop(ctx); emit_nop(ctx);
break; break;
case BPF_LD | BPF_W | BPF_IND: case BPF_LD | BPF_W | BPF_IND:
@ -775,8 +783,10 @@ static int build_body(struct jit_ctx *ctx)
emit_jalr(MIPS_R_RA, r_s0, ctx); emit_jalr(MIPS_R_RA, r_s0, ctx);
emit_reg_move(MIPS_R_A0, r_skb, ctx); /* delay slot */ emit_reg_move(MIPS_R_A0, r_skb, ctx); /* delay slot */
/* Check the error value */ /* Check the error value */
emit_bcond(MIPS_COND_NE, r_ret, 0, b_off = b_imm(prog->len, ctx);
b_imm(prog->len, ctx), ctx); if (is_bad_offset(b_off))
return -E2BIG;
emit_bcond(MIPS_COND_NE, r_ret, 0, b_off, ctx);
emit_reg_move(r_ret, r_zero, ctx); emit_reg_move(r_ret, r_zero, ctx);
/* We are good */ /* We are good */
/* X <- P[1:K] & 0xf */ /* X <- P[1:K] & 0xf */
@ -855,8 +865,10 @@ static int build_body(struct jit_ctx *ctx)
/* A /= X */ /* A /= X */
ctx->flags |= SEEN_X | SEEN_A; ctx->flags |= SEEN_X | SEEN_A;
/* Check if r_X is zero */ /* Check if r_X is zero */
emit_bcond(MIPS_COND_EQ, r_X, r_zero, b_off = b_imm(prog->len, ctx);
b_imm(prog->len, ctx), ctx); if (is_bad_offset(b_off))
return -E2BIG;
emit_bcond(MIPS_COND_EQ, r_X, r_zero, b_off, ctx);
emit_load_imm(r_ret, 0, ctx); /* delay slot */ emit_load_imm(r_ret, 0, ctx); /* delay slot */
emit_div(r_A, r_X, ctx); emit_div(r_A, r_X, ctx);
break; break;
@ -864,8 +876,10 @@ static int build_body(struct jit_ctx *ctx)
/* A %= X */ /* A %= X */
ctx->flags |= SEEN_X | SEEN_A; ctx->flags |= SEEN_X | SEEN_A;
/* Check if r_X is zero */ /* Check if r_X is zero */
emit_bcond(MIPS_COND_EQ, r_X, r_zero, b_off = b_imm(prog->len, ctx);
b_imm(prog->len, ctx), ctx); if (is_bad_offset(b_off))
return -E2BIG;
emit_bcond(MIPS_COND_EQ, r_X, r_zero, b_off, ctx);
emit_load_imm(r_ret, 0, ctx); /* delay slot */ emit_load_imm(r_ret, 0, ctx); /* delay slot */
emit_mod(r_A, r_X, ctx); emit_mod(r_A, r_X, ctx);
break; break;
@ -926,7 +940,10 @@ static int build_body(struct jit_ctx *ctx)
break; break;
case BPF_JMP | BPF_JA: case BPF_JMP | BPF_JA:
/* pc += K */ /* pc += K */
emit_b(b_imm(i + k + 1, ctx), ctx); b_off = b_imm(i + k + 1, ctx);
if (is_bad_offset(b_off))
return -E2BIG;
emit_b(b_off, ctx);
emit_nop(ctx); emit_nop(ctx);
break; break;
case BPF_JMP | BPF_JEQ | BPF_K: case BPF_JMP | BPF_JEQ | BPF_K:
@ -1056,12 +1073,16 @@ static int build_body(struct jit_ctx *ctx)
break; break;
case BPF_RET | BPF_A: case BPF_RET | BPF_A:
ctx->flags |= SEEN_A; ctx->flags |= SEEN_A;
if (i != prog->len - 1) if (i != prog->len - 1) {
/* /*
* If this is not the last instruction * If this is not the last instruction
* then jump to the epilogue * then jump to the epilogue
*/ */
emit_b(b_imm(prog->len, ctx), ctx); b_off = b_imm(prog->len, ctx);
if (is_bad_offset(b_off))
return -E2BIG;
emit_b(b_off, ctx);
}
emit_reg_move(r_ret, r_A, ctx); /* delay slot */ emit_reg_move(r_ret, r_A, ctx); /* delay slot */
break; break;
case BPF_RET | BPF_K: case BPF_RET | BPF_K:
@ -1075,7 +1096,10 @@ static int build_body(struct jit_ctx *ctx)
* If this is not the last instruction * If this is not the last instruction
* then jump to the epilogue * then jump to the epilogue
*/ */
emit_b(b_imm(prog->len, ctx), ctx); b_off = b_imm(prog->len, ctx);
if (is_bad_offset(b_off))
return -E2BIG;
emit_b(b_off, ctx);
emit_nop(ctx); emit_nop(ctx);
} }
break; break;
@ -1133,8 +1157,10 @@ static int build_body(struct jit_ctx *ctx)
/* Load *dev pointer */ /* Load *dev pointer */
emit_load_ptr(r_s0, r_skb, off, ctx); emit_load_ptr(r_s0, r_skb, off, ctx);
/* error (0) in the delay slot */ /* error (0) in the delay slot */
emit_bcond(MIPS_COND_EQ, r_s0, r_zero, b_off = b_imm(prog->len, ctx);
b_imm(prog->len, ctx), ctx); if (is_bad_offset(b_off))
return -E2BIG;
emit_bcond(MIPS_COND_EQ, r_s0, r_zero, b_off, ctx);
emit_reg_move(r_ret, r_zero, ctx); emit_reg_move(r_ret, r_zero, ctx);
if (code == (BPF_ANC | SKF_AD_IFINDEX)) { if (code == (BPF_ANC | SKF_AD_IFINDEX)) {
BUILD_BUG_ON(sizeof_field(struct net_device, ifindex) != 4); BUILD_BUG_ON(sizeof_field(struct net_device, ifindex) != 4);
@ -1244,7 +1270,10 @@ void bpf_jit_compile(struct bpf_prog *fp)
/* Generate the actual JIT code */ /* Generate the actual JIT code */
build_prologue(&ctx); build_prologue(&ctx);
build_body(&ctx); if (build_body(&ctx)) {
module_memfree(ctx.target);
goto out;
}
build_epilogue(&ctx); build_epilogue(&ctx);
/* Update the icache */ /* Update the icache */

View File

@ -3,9 +3,10 @@
config EARLY_PRINTK config EARLY_PRINTK
bool "Activate early kernel debugging" bool "Activate early kernel debugging"
default y default y
depends on TTY
select SERIAL_CORE_CONSOLE select SERIAL_CORE_CONSOLE
help help
Enable early printk on console Enable early printk on console.
This is useful for kernel debugging when your machine crashes very This is useful for kernel debugging when your machine crashes very
early before the console code is initialized. early before the console code is initialized.
You should normally say N here, unless you want to debug such a crash. You should normally say N here, unless you want to debug such a crash.

View File

@ -149,8 +149,6 @@ static void __init find_limits(unsigned long *min, unsigned long *max_low,
void __init setup_arch(char **cmdline_p) void __init setup_arch(char **cmdline_p)
{ {
int dram_start;
console_verbose(); console_verbose();
memory_start = memblock_start_of_DRAM(); memory_start = memblock_start_of_DRAM();

View File

@ -184,7 +184,7 @@ extern int npmem_ranges;
#include <asm-generic/getorder.h> #include <asm-generic/getorder.h>
#include <asm/pdc.h> #include <asm/pdc.h>
#define PAGE0 ((struct zeropage *)__PAGE_OFFSET) #define PAGE0 ((struct zeropage *)absolute_pointer(__PAGE_OFFSET))
/* DEFINITION OF THE ZERO-PAGE (PAG0) */ /* DEFINITION OF THE ZERO-PAGE (PAG0) */
/* based on work by Jason Eckhardt (jason@equator.com) */ /* based on work by Jason Eckhardt (jason@equator.com) */

View File

@ -513,12 +513,15 @@ void ioport_unmap(void __iomem *addr)
} }
} }
#ifdef CONFIG_PCI
void pci_iounmap(struct pci_dev *dev, void __iomem * addr) void pci_iounmap(struct pci_dev *dev, void __iomem * addr)
{ {
if (!INDIRECT_ADDR(addr)) { if (!INDIRECT_ADDR(addr)) {
iounmap(addr); iounmap(addr);
} }
} }
EXPORT_SYMBOL(pci_iounmap);
#endif
EXPORT_SYMBOL(ioread8); EXPORT_SYMBOL(ioread8);
EXPORT_SYMBOL(ioread16); EXPORT_SYMBOL(ioread16);
@ -544,4 +547,3 @@ EXPORT_SYMBOL(iowrite16_rep);
EXPORT_SYMBOL(iowrite32_rep); EXPORT_SYMBOL(iowrite32_rep);
EXPORT_SYMBOL(ioport_map); EXPORT_SYMBOL(ioport_map);
EXPORT_SYMBOL(ioport_unmap); EXPORT_SYMBOL(ioport_unmap);
EXPORT_SYMBOL(pci_iounmap);

View File

@ -35,7 +35,6 @@ endif
BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -O2 -msoft-float -mno-altivec -mno-vsx \ -fno-strict-aliasing -O2 -msoft-float -mno-altivec -mno-vsx \
-pipe -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \ -pipe -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
-include $(srctree)/include/linux/compiler_attributes.h \
$(LINUXINCLUDE) $(LINUXINCLUDE)
ifdef CONFIG_PPC64_BOOT_WRAPPER ifdef CONFIG_PPC64_BOOT_WRAPPER
@ -70,6 +69,7 @@ ifeq ($(call cc-option-yn, -fstack-protector),y)
BOOTCFLAGS += -fno-stack-protector BOOTCFLAGS += -fno-stack-protector
endif endif
BOOTCFLAGS += -include $(srctree)/include/linux/compiler_attributes.h
BOOTCFLAGS += -I$(objtree)/$(obj) -I$(srctree)/$(obj) BOOTCFLAGS += -I$(objtree)/$(obj) -I$(srctree)/$(obj)
DTC_FLAGS ?= -p 1024 DTC_FLAGS ?= -p 1024

View File

@ -12,16 +12,6 @@
# define ASM_CONST(x) __ASM_CONST(x) # define ASM_CONST(x) __ASM_CONST(x)
#endif #endif
/*
* Inline assembly memory constraint
*
* GCC 4.9 doesn't properly handle pre update memory constraint "m<>"
*
*/
#if defined(GCC_VERSION) && GCC_VERSION < 50000
#define UPD_CONSTR ""
#else
#define UPD_CONSTR "<>" #define UPD_CONSTR "<>"
#endif
#endif /* _ASM_POWERPC_ASM_CONST_H */ #endif /* _ASM_POWERPC_ASM_CONST_H */

View File

@ -10,11 +10,6 @@
#include <asm/svm.h> #include <asm/svm.h>
static inline bool mem_encrypt_active(void)
{
return is_secure_guest();
}
static inline bool force_dma_unencrypted(struct device *dev) static inline bool force_dma_unencrypted(struct device *dev)
{ {
return is_secure_guest(); return is_secure_guest();

View File

@ -18,6 +18,7 @@
#include <asm/switch_to.h> #include <asm/switch_to.h>
#include <asm/syscall.h> #include <asm/syscall.h>
#include <asm/time.h> #include <asm/time.h>
#include <asm/tm.h>
#include <asm/unistd.h> #include <asm/unistd.h>
#if defined(CONFIG_PPC_ADV_DEBUG_REGS) && defined(CONFIG_PPC32) #if defined(CONFIG_PPC_ADV_DEBUG_REGS) && defined(CONFIG_PPC32)
@ -136,6 +137,48 @@ notrace long system_call_exception(long r3, long r4, long r5,
*/ */
irq_soft_mask_regs_set_state(regs, IRQS_ENABLED); irq_soft_mask_regs_set_state(regs, IRQS_ENABLED);
/*
* If system call is called with TM active, set _TIF_RESTOREALL to
* prevent RFSCV being used to return to userspace, because POWER9
* TM implementation has problems with this instruction returning to
* transactional state. Final register values are not relevant because
* the transaction will be aborted upon return anyway. Or in the case
* of unsupported_scv SIGILL fault, the return state does not much
* matter because it's an edge case.
*/
if (IS_ENABLED(CONFIG_PPC_TRANSACTIONAL_MEM) &&
unlikely(MSR_TM_TRANSACTIONAL(regs->msr)))
current_thread_info()->flags |= _TIF_RESTOREALL;
/*
* If the system call was made with a transaction active, doom it and
* return without performing the system call. Unless it was an
* unsupported scv vector, in which case it's treated like an illegal
* instruction.
*/
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
if (unlikely(MSR_TM_TRANSACTIONAL(regs->msr)) &&
!trap_is_unsupported_scv(regs)) {
/* Enable TM in the kernel, and disable EE (for scv) */
hard_irq_disable();
mtmsr(mfmsr() | MSR_TM);
/* tabort, this dooms the transaction, nothing else */
asm volatile(".long 0x7c00071d | ((%0) << 16)"
:: "r"(TM_CAUSE_SYSCALL|TM_CAUSE_PERSISTENT));
/*
* Userspace will never see the return value. Execution will
* resume after the tbegin. of the aborted transaction with the
* checkpointed register state. A context switch could occur
* or signal delivered to the process before resuming the
* doomed transaction context, but that should all be handled
* as expected.
*/
return -ENOSYS;
}
#endif // CONFIG_PPC_TRANSACTIONAL_MEM
local_irq_enable(); local_irq_enable();
if (unlikely(current_thread_info()->flags & _TIF_SYSCALL_DOTRACE)) { if (unlikely(current_thread_info()->flags & _TIF_SYSCALL_DOTRACE)) {

View File

@ -12,7 +12,6 @@
#include <asm/mmu.h> #include <asm/mmu.h>
#include <asm/ppc_asm.h> #include <asm/ppc_asm.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/tm.h>
.section ".toc","aw" .section ".toc","aw"
SYS_CALL_TABLE: SYS_CALL_TABLE:
@ -55,12 +54,6 @@ COMPAT_SYS_CALL_TABLE:
.globl system_call_vectored_\name .globl system_call_vectored_\name
system_call_vectored_\name: system_call_vectored_\name:
_ASM_NOKPROBE_SYMBOL(system_call_vectored_\name) _ASM_NOKPROBE_SYMBOL(system_call_vectored_\name)
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
BEGIN_FTR_SECTION
extrdi. r10, r12, 1, (63-MSR_TS_T_LG) /* transaction active? */
bne tabort_syscall
END_FTR_SECTION_IFSET(CPU_FTR_TM)
#endif
SCV_INTERRUPT_TO_KERNEL SCV_INTERRUPT_TO_KERNEL
mr r10,r1 mr r10,r1
ld r1,PACAKSAVE(r13) ld r1,PACAKSAVE(r13)
@ -247,12 +240,6 @@ _ASM_NOKPROBE_SYMBOL(system_call_common_real)
.globl system_call_common .globl system_call_common
system_call_common: system_call_common:
_ASM_NOKPROBE_SYMBOL(system_call_common) _ASM_NOKPROBE_SYMBOL(system_call_common)
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
BEGIN_FTR_SECTION
extrdi. r10, r12, 1, (63-MSR_TS_T_LG) /* transaction active? */
bne tabort_syscall
END_FTR_SECTION_IFSET(CPU_FTR_TM)
#endif
mr r10,r1 mr r10,r1
ld r1,PACAKSAVE(r13) ld r1,PACAKSAVE(r13)
std r10,0(r1) std r10,0(r1)
@ -425,34 +412,6 @@ SOFT_MASK_TABLE(.Lsyscall_rst_start, 1b)
RESTART_TABLE(.Lsyscall_rst_start, .Lsyscall_rst_end, syscall_restart) RESTART_TABLE(.Lsyscall_rst_start, .Lsyscall_rst_end, syscall_restart)
#endif #endif
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
tabort_syscall:
_ASM_NOKPROBE_SYMBOL(tabort_syscall)
/* Firstly we need to enable TM in the kernel */
mfmsr r10
li r9, 1
rldimi r10, r9, MSR_TM_LG, 63-MSR_TM_LG
mtmsrd r10, 0
/* tabort, this dooms the transaction, nothing else */
li r9, (TM_CAUSE_SYSCALL|TM_CAUSE_PERSISTENT)
TABORT(R9)
/*
* Return directly to userspace. We have corrupted user register state,
* but userspace will never see that register state. Execution will
* resume after the tbegin of the aborted transaction with the
* checkpointed register state.
*/
li r9, MSR_RI
andc r10, r10, r9
mtmsrd r10, 1
mtspr SPRN_SRR0, r11
mtspr SPRN_SRR1, r12
RFI_TO_USER
b . /* prevent speculative execution */
#endif
/* /*
* If MSR EE/RI was never enabled, IRQs not reconciled, NVGPRs not * If MSR EE/RI was never enabled, IRQs not reconciled, NVGPRs not
* touched, no exit work created, then this can be used. * touched, no exit work created, then this can be used.

View File

@ -249,6 +249,7 @@ void machine_check_queue_event(void)
{ {
int index; int index;
struct machine_check_event evt; struct machine_check_event evt;
unsigned long msr;
if (!get_mce_event(&evt, MCE_EVENT_RELEASE)) if (!get_mce_event(&evt, MCE_EVENT_RELEASE))
return; return;
@ -262,8 +263,20 @@ void machine_check_queue_event(void)
memcpy(&local_paca->mce_info->mce_event_queue[index], memcpy(&local_paca->mce_info->mce_event_queue[index],
&evt, sizeof(evt)); &evt, sizeof(evt));
/* Queue irq work to process this event later. */ /*
irq_work_queue(&mce_event_process_work); * Queue irq work to process this event later. Before
* queuing the work enable translation for non radix LPAR,
* as irq_work_queue may try to access memory outside RMO
* region.
*/
if (!radix_enabled() && firmware_has_feature(FW_FEATURE_LPAR)) {
msr = mfmsr();
mtmsr(msr | MSR_IR | MSR_DR);
irq_work_queue(&mce_event_process_work);
mtmsr(msr);
} else {
irq_work_queue(&mce_event_process_work);
}
} }
void mce_common_process_ue(struct pt_regs *regs, void mce_common_process_ue(struct pt_regs *regs,

View File

@ -293,10 +293,8 @@ void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags)
do_signal(current); do_signal(current);
} }
if (thread_info_flags & _TIF_NOTIFY_RESUME) { if (thread_info_flags & _TIF_NOTIFY_RESUME)
tracehook_notify_resume(regs); tracehook_notify_resume(regs);
rseq_handle_notify_resume(NULL, regs);
}
} }
static unsigned long get_tm_stackpointer(struct task_struct *tsk) static unsigned long get_tm_stackpointer(struct task_struct *tsk)

View File

@ -2536,7 +2536,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_P9_TM_HV_ASSIST)
/* The following code handles the fake_suspend = 1 case */ /* The following code handles the fake_suspend = 1 case */
mflr r0 mflr r0
std r0, PPC_LR_STKOFF(r1) std r0, PPC_LR_STKOFF(r1)
stdu r1, -PPC_MIN_STKFRM(r1) stdu r1, -TM_FRAME_SIZE(r1)
/* Turn on TM. */ /* Turn on TM. */
mfmsr r8 mfmsr r8
@ -2551,10 +2551,42 @@ BEGIN_FTR_SECTION
END_FTR_SECTION_IFSET(CPU_FTR_P9_TM_XER_SO_BUG) END_FTR_SECTION_IFSET(CPU_FTR_P9_TM_XER_SO_BUG)
nop nop
/*
* It's possible that treclaim. may modify registers, if we have lost
* track of fake-suspend state in the guest due to it using rfscv.
* Save and restore registers in case this occurs.
*/
mfspr r3, SPRN_DSCR
mfspr r4, SPRN_XER
mfspr r5, SPRN_AMR
/* SPRN_TAR would need to be saved here if the kernel ever used it */
mfcr r12
SAVE_NVGPRS(r1)
SAVE_GPR(2, r1)
SAVE_GPR(3, r1)
SAVE_GPR(4, r1)
SAVE_GPR(5, r1)
stw r12, 8(r1)
std r1, HSTATE_HOST_R1(r13)
/* We have to treclaim here because that's the only way to do S->N */ /* We have to treclaim here because that's the only way to do S->N */
li r3, TM_CAUSE_KVM_RESCHED li r3, TM_CAUSE_KVM_RESCHED
TRECLAIM(R3) TRECLAIM(R3)
GET_PACA(r13)
ld r1, HSTATE_HOST_R1(r13)
REST_GPR(2, r1)
REST_GPR(3, r1)
REST_GPR(4, r1)
REST_GPR(5, r1)
lwz r12, 8(r1)
REST_NVGPRS(r1)
mtspr SPRN_DSCR, r3
mtspr SPRN_XER, r4
mtspr SPRN_AMR, r5
mtcr r12
HMT_MEDIUM
/* /*
* We were in fake suspend, so we are not going to save the * We were in fake suspend, so we are not going to save the
* register state as the guest checkpointed state (since * register state as the guest checkpointed state (since
@ -2582,7 +2614,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_P9_TM_XER_SO_BUG)
std r5, VCPU_TFHAR(r9) std r5, VCPU_TFHAR(r9)
std r6, VCPU_TFIAR(r9) std r6, VCPU_TFIAR(r9)
addi r1, r1, PPC_MIN_STKFRM addi r1, r1, TM_FRAME_SIZE
ld r0, PPC_LR_STKOFF(r1) ld r0, PPC_LR_STKOFF(r1)
mtlr r0 mtlr r0
blr blr

View File

@ -159,6 +159,7 @@ config PPC_SVM
select SWIOTLB select SWIOTLB
select ARCH_HAS_MEM_ENCRYPT select ARCH_HAS_MEM_ENCRYPT
select ARCH_HAS_FORCE_DMA_UNENCRYPTED select ARCH_HAS_FORCE_DMA_UNENCRYPTED
select ARCH_HAS_CC_PLATFORM
help help
There are certain POWER platforms which support secure guests using There are certain POWER platforms which support secure guests using
the Protected Execution Facility, with the help of an Ultravisor the Protected Execution Facility, with the help of an Ultravisor

View File

@ -31,3 +31,5 @@ obj-$(CONFIG_FA_DUMP) += rtas-fadump.o
obj-$(CONFIG_SUSPEND) += suspend.o obj-$(CONFIG_SUSPEND) += suspend.o
obj-$(CONFIG_PPC_VAS) += vas.o obj-$(CONFIG_PPC_VAS) += vas.o
obj-$(CONFIG_ARCH_HAS_CC_PLATFORM) += cc_platform.o

View File

@ -0,0 +1,26 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Confidential Computing Platform Capability checks
*
* Copyright (C) 2021 Advanced Micro Devices, Inc.
*
* Author: Tom Lendacky <thomas.lendacky@amd.com>
*/
#include <linux/export.h>
#include <linux/cc_platform.h>
#include <asm/machdep.h>
#include <asm/svm.h>
bool cc_platform_has(enum cc_attr attr)
{
switch (attr) {
case CC_ATTR_MEM_ENCRYPT:
return is_secure_guest();
default:
return false;
}
}
EXPORT_SYMBOL_GPL(cc_platform_has);

View File

@ -8,6 +8,7 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/memblock.h> #include <linux/memblock.h>
#include <linux/cc_platform.h>
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/svm.h> #include <asm/svm.h>
#include <asm/swiotlb.h> #include <asm/swiotlb.h>
@ -63,7 +64,7 @@ void __init svm_swiotlb_init(void)
int set_memory_encrypted(unsigned long addr, int numpages) int set_memory_encrypted(unsigned long addr, int numpages)
{ {
if (!mem_encrypt_active()) if (!cc_platform_has(CC_ATTR_MEM_ENCRYPT))
return 0; return 0;
if (!PAGE_ALIGNED(addr)) if (!PAGE_ALIGNED(addr))
@ -76,7 +77,7 @@ int set_memory_encrypted(unsigned long addr, int numpages)
int set_memory_decrypted(unsigned long addr, int numpages) int set_memory_decrypted(unsigned long addr, int numpages)
{ {
if (!mem_encrypt_active()) if (!cc_platform_has(CC_ATTR_MEM_ENCRYPT))
return 0; return 0;
if (!PAGE_ALIGNED(addr)) if (!PAGE_ALIGNED(addr))

View File

@ -348,9 +348,9 @@ static int xics_host_map(struct irq_domain *domain, unsigned int virq,
if (xics_ics->check(xics_ics, hwirq)) if (xics_ics->check(xics_ics, hwirq))
return -EINVAL; return -EINVAL;
/* No chip data for the XICS domain */ /* Let the ICS be the chip data for the XICS domain. For ICS native */
irq_domain_set_info(domain, virq, hwirq, xics_ics->chip, irq_domain_set_info(domain, virq, hwirq, xics_ics->chip,
NULL, handle_fasteoi_irq, NULL, NULL); xics_ics, handle_fasteoi_irq, NULL, NULL);
return 0; return 0;
} }

View File

@ -236,7 +236,7 @@ config ARCH_RV32I
config ARCH_RV64I config ARCH_RV64I
bool "RV64I" bool "RV64I"
select 64BIT select 64BIT
select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && GCC_VERSION >= 50000 select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
select HAVE_DYNAMIC_FTRACE if !XIP_KERNEL && MMU && $(cc-option,-fpatchable-function-entry=8) select HAVE_DYNAMIC_FTRACE if !XIP_KERNEL && MMU && $(cc-option,-fpatchable-function-entry=8)
select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE
select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL

View File

@ -685,16 +685,6 @@ config STACK_GUARD
The minimum size for the stack guard should be 256 for 31 bit and The minimum size for the stack guard should be 256 for 31 bit and
512 for 64 bit. 512 for 64 bit.
config WARN_DYNAMIC_STACK
def_bool n
prompt "Emit compiler warnings for function with dynamic stack usage"
help
This option enables the compiler option -mwarn-dynamicstack. If the
compiler supports this options generates warnings for functions
that dynamically allocate stack space using alloca.
Say N if you are unsure.
endmenu endmenu
menu "I/O subsystem" menu "I/O subsystem"

View File

@ -85,13 +85,6 @@ cflags-$(CONFIG_CHECK_STACK) += -mstack-guard=$(CONFIG_STACK_GUARD)
endif endif
endif endif
ifdef CONFIG_WARN_DYNAMIC_STACK
ifneq ($(call cc-option,-mwarn-dynamicstack),)
KBUILD_CFLAGS += -mwarn-dynamicstack
KBUILD_CFLAGS_DECOMPRESSOR += -mwarn-dynamicstack
endif
endif
ifdef CONFIG_EXPOLINE ifdef CONFIG_EXPOLINE
ifneq ($(call cc-option,$(CC_FLAGS_MARCH) -mindirect-branch=thunk),) ifneq ($(call cc-option,$(CC_FLAGS_MARCH) -mindirect-branch=thunk),)
CC_FLAGS_EXPOLINE := -mindirect-branch=thunk CC_FLAGS_EXPOLINE := -mindirect-branch=thunk

View File

@ -10,6 +10,7 @@ CONFIG_BPF_JIT=y
CONFIG_BPF_JIT_ALWAYS_ON=y CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_BPF_LSM=y CONFIG_BPF_LSM=y
CONFIG_PREEMPT=y CONFIG_PREEMPT=y
CONFIG_SCHED_CORE=y
CONFIG_BSD_PROCESS_ACCT=y CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_TASKSTATS=y CONFIG_TASKSTATS=y
@ -503,6 +504,7 @@ CONFIG_NLMON=m
# CONFIG_NET_VENDOR_HUAWEI is not set # CONFIG_NET_VENDOR_HUAWEI is not set
# CONFIG_NET_VENDOR_INTEL is not set # CONFIG_NET_VENDOR_INTEL is not set
# CONFIG_NET_VENDOR_MICROSOFT is not set # CONFIG_NET_VENDOR_MICROSOFT is not set
# CONFIG_NET_VENDOR_LITEX is not set
# CONFIG_NET_VENDOR_MARVELL is not set # CONFIG_NET_VENDOR_MARVELL is not set
CONFIG_MLX4_EN=m CONFIG_MLX4_EN=m
CONFIG_MLX5_CORE=m CONFIG_MLX5_CORE=m
@ -661,7 +663,6 @@ CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y CONFIG_NFSD_V4=y
CONFIG_NFSD_V4_SECURITY_LABEL=y CONFIG_NFSD_V4_SECURITY_LABEL=y
CONFIG_CIFS=m CONFIG_CIFS=m
CONFIG_CIFS_WEAK_PW_HASH=y
CONFIG_CIFS_UPCALL=y CONFIG_CIFS_UPCALL=y
CONFIG_CIFS_XATTR=y CONFIG_CIFS_XATTR=y
CONFIG_CIFS_POSIX=y CONFIG_CIFS_POSIX=y
@ -720,6 +721,8 @@ CONFIG_CRYPTO_XCBC=m
CONFIG_CRYPTO_VMAC=m CONFIG_CRYPTO_VMAC=m
CONFIG_CRYPTO_CRC32=m CONFIG_CRYPTO_CRC32=m
CONFIG_CRYPTO_BLAKE2S=m CONFIG_CRYPTO_BLAKE2S=m
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_RMD160=m CONFIG_CRYPTO_RMD160=m
CONFIG_CRYPTO_SHA3=m CONFIG_CRYPTO_SHA3=m
@ -774,7 +777,6 @@ CONFIG_RANDOM32_SELFTEST=y
CONFIG_DMA_CMA=y CONFIG_DMA_CMA=y
CONFIG_CMA_SIZE_MBYTES=0 CONFIG_CMA_SIZE_MBYTES=0
CONFIG_DMA_API_DEBUG=y CONFIG_DMA_API_DEBUG=y
CONFIG_STRING_SELFTEST=y
CONFIG_PRINTK_TIME=y CONFIG_PRINTK_TIME=y
CONFIG_DYNAMIC_DEBUG=y CONFIG_DYNAMIC_DEBUG=y
CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO=y
@ -853,12 +855,12 @@ CONFIG_FAIL_FUNCTION=y
CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
CONFIG_LKDTM=m CONFIG_LKDTM=m
CONFIG_TEST_MIN_HEAP=y CONFIG_TEST_MIN_HEAP=y
CONFIG_TEST_SORT=y
CONFIG_KPROBES_SANITY_TEST=y CONFIG_KPROBES_SANITY_TEST=y
CONFIG_RBTREE_TEST=y CONFIG_RBTREE_TEST=y
CONFIG_INTERVAL_TREE_TEST=m CONFIG_INTERVAL_TREE_TEST=m
CONFIG_PERCPU_TEST=m CONFIG_PERCPU_TEST=m
CONFIG_ATOMIC64_SELFTEST=y CONFIG_ATOMIC64_SELFTEST=y
CONFIG_STRING_SELFTEST=y
CONFIG_TEST_BITOPS=m CONFIG_TEST_BITOPS=m
CONFIG_TEST_BPF=m CONFIG_TEST_BPF=m
CONFIG_TEST_LIVEPATCH=m CONFIG_TEST_LIVEPATCH=m

View File

@ -8,6 +8,7 @@ CONFIG_BPF_SYSCALL=y
CONFIG_BPF_JIT=y CONFIG_BPF_JIT=y
CONFIG_BPF_JIT_ALWAYS_ON=y CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_BPF_LSM=y CONFIG_BPF_LSM=y
CONFIG_SCHED_CORE=y
CONFIG_BSD_PROCESS_ACCT=y CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_TASKSTATS=y CONFIG_TASKSTATS=y
@ -494,6 +495,7 @@ CONFIG_NLMON=m
# CONFIG_NET_VENDOR_HUAWEI is not set # CONFIG_NET_VENDOR_HUAWEI is not set
# CONFIG_NET_VENDOR_INTEL is not set # CONFIG_NET_VENDOR_INTEL is not set
# CONFIG_NET_VENDOR_MICROSOFT is not set # CONFIG_NET_VENDOR_MICROSOFT is not set
# CONFIG_NET_VENDOR_LITEX is not set
# CONFIG_NET_VENDOR_MARVELL is not set # CONFIG_NET_VENDOR_MARVELL is not set
CONFIG_MLX4_EN=m CONFIG_MLX4_EN=m
CONFIG_MLX5_CORE=m CONFIG_MLX5_CORE=m
@ -648,7 +650,6 @@ CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y CONFIG_NFSD_V4=y
CONFIG_NFSD_V4_SECURITY_LABEL=y CONFIG_NFSD_V4_SECURITY_LABEL=y
CONFIG_CIFS=m CONFIG_CIFS=m
CONFIG_CIFS_WEAK_PW_HASH=y
CONFIG_CIFS_UPCALL=y CONFIG_CIFS_UPCALL=y
CONFIG_CIFS_XATTR=y CONFIG_CIFS_XATTR=y
CONFIG_CIFS_POSIX=y CONFIG_CIFS_POSIX=y
@ -708,6 +709,8 @@ CONFIG_CRYPTO_XCBC=m
CONFIG_CRYPTO_VMAC=m CONFIG_CRYPTO_VMAC=m
CONFIG_CRYPTO_CRC32=m CONFIG_CRYPTO_CRC32=m
CONFIG_CRYPTO_BLAKE2S=m CONFIG_CRYPTO_BLAKE2S=m
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_RMD160=m CONFIG_CRYPTO_RMD160=m
CONFIG_CRYPTO_SHA3=m CONFIG_CRYPTO_SHA3=m

View File

@ -55,7 +55,7 @@ int ccwgroup_create_dev(struct device *root, struct ccwgroup_driver *gdrv,
int num_devices, const char *buf); int num_devices, const char *buf);
extern int ccwgroup_set_online(struct ccwgroup_device *gdev); extern int ccwgroup_set_online(struct ccwgroup_device *gdev);
extern int ccwgroup_set_offline(struct ccwgroup_device *gdev); int ccwgroup_set_offline(struct ccwgroup_device *gdev, bool call_gdrv);
extern int ccwgroup_probe_ccwdev(struct ccw_device *cdev); extern int ccwgroup_probe_ccwdev(struct ccw_device *cdev);
extern void ccwgroup_remove_ccwdev(struct ccw_device *cdev); extern void ccwgroup_remove_ccwdev(struct ccw_device *cdev);

View File

@ -4,8 +4,6 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
static inline bool mem_encrypt_active(void) { return false; }
int set_memory_encrypted(unsigned long addr, int numpages); int set_memory_encrypted(unsigned long addr, int numpages);
int set_memory_decrypted(unsigned long addr, int numpages); int set_memory_decrypted(unsigned long addr, int numpages);

View File

@ -419,13 +419,13 @@ static unsigned long deliverable_irqs(struct kvm_vcpu *vcpu)
static void __set_cpu_idle(struct kvm_vcpu *vcpu) static void __set_cpu_idle(struct kvm_vcpu *vcpu)
{ {
kvm_s390_set_cpuflags(vcpu, CPUSTAT_WAIT); kvm_s390_set_cpuflags(vcpu, CPUSTAT_WAIT);
set_bit(kvm_vcpu_get_idx(vcpu), vcpu->kvm->arch.idle_mask); set_bit(vcpu->vcpu_idx, vcpu->kvm->arch.idle_mask);
} }
static void __unset_cpu_idle(struct kvm_vcpu *vcpu) static void __unset_cpu_idle(struct kvm_vcpu *vcpu)
{ {
kvm_s390_clear_cpuflags(vcpu, CPUSTAT_WAIT); kvm_s390_clear_cpuflags(vcpu, CPUSTAT_WAIT);
clear_bit(kvm_vcpu_get_idx(vcpu), vcpu->kvm->arch.idle_mask); clear_bit(vcpu->vcpu_idx, vcpu->kvm->arch.idle_mask);
} }
static void __reset_intercept_indicators(struct kvm_vcpu *vcpu) static void __reset_intercept_indicators(struct kvm_vcpu *vcpu)

Some files were not shown because too many files have changed in this diff Show More