mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 05:55:44 +02:00
Merge 5b8b9d0c6d ("Merge branch 'akpm' (patches from Andrew)") into android-mainline
Steps along the way to the 5.7-rc1 merge. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Iaf237a174205979344cfa76274198e87e2ba7799
This commit is contained in:
commit
5631819eaf
1
.mailmap
1
.mailmap
|
|
@ -210,6 +210,7 @@ Oleksij Rempel <linux@rempel-privat.de> <external.Oleksij.Rempel@de.bosch.com>
|
|||
Oleksij Rempel <linux@rempel-privat.de> <fixed-term.Oleksij.Rempel@de.bosch.com>
|
||||
Oleksij Rempel <linux@rempel-privat.de> <o.rempel@pengutronix.de>
|
||||
Oleksij Rempel <linux@rempel-privat.de> <ore@pengutronix.de>
|
||||
Pali Rohár <pali@kernel.org> <pali.rohar@gmail.com>
|
||||
Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
|
||||
Patrick Mochel <mochel@digitalimplant.org>
|
||||
Paul Burton <paulburton@kernel.org> <paul.burton@imgtec.com>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ What: /sys/class/leds/dell::kbd_backlight/als_enabled
|
|||
Date: December 2014
|
||||
KernelVersion: 3.19
|
||||
Contact: Gabriele Mazzotta <gabriele.mzt@gmail.com>,
|
||||
Pali Rohár <pali.rohar@gmail.com>
|
||||
Pali Rohár <pali@kernel.org>
|
||||
Description:
|
||||
This file allows to control the automatic keyboard
|
||||
illumination mode on some systems that have an ambient
|
||||
|
|
@ -13,7 +13,7 @@ What: /sys/class/leds/dell::kbd_backlight/als_setting
|
|||
Date: December 2014
|
||||
KernelVersion: 3.19
|
||||
Contact: Gabriele Mazzotta <gabriele.mzt@gmail.com>,
|
||||
Pali Rohár <pali.rohar@gmail.com>
|
||||
Pali Rohár <pali@kernel.org>
|
||||
Description:
|
||||
This file allows to specifiy the on/off threshold value,
|
||||
as reported by the ambient light sensor.
|
||||
|
|
@ -22,7 +22,7 @@ What: /sys/class/leds/dell::kbd_backlight/start_triggers
|
|||
Date: December 2014
|
||||
KernelVersion: 3.19
|
||||
Contact: Gabriele Mazzotta <gabriele.mzt@gmail.com>,
|
||||
Pali Rohár <pali.rohar@gmail.com>
|
||||
Pali Rohár <pali@kernel.org>
|
||||
Description:
|
||||
This file allows to control the input triggers that
|
||||
turn on the keyboard backlight illumination that is
|
||||
|
|
@ -45,7 +45,7 @@ What: /sys/class/leds/dell::kbd_backlight/stop_timeout
|
|||
Date: December 2014
|
||||
KernelVersion: 3.19
|
||||
Contact: Gabriele Mazzotta <gabriele.mzt@gmail.com>,
|
||||
Pali Rohár <pali.rohar@gmail.com>
|
||||
Pali Rohár <pali@kernel.org>
|
||||
Description:
|
||||
This file allows to specify the interval after which the
|
||||
keyboard illumination is disabled because of inactivity.
|
||||
|
|
|
|||
|
|
@ -33,6 +33,12 @@ max
|
|||
a per-instance limit. If ``max=<count>`` is set then only ``<count>`` number
|
||||
of binder devices can be allocated in this binderfs instance.
|
||||
|
||||
stats
|
||||
Using ``stats=global`` enables global binder statistics.
|
||||
``stats=global`` is only available for a binderfs instance mounted in the
|
||||
initial user namespace. An attempt to use the option to mount a binderfs
|
||||
instance in another user namespace will return a permission error.
|
||||
|
||||
Allocating binder Devices
|
||||
-------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -685,7 +685,7 @@
|
|||
coredump_filter=
|
||||
[KNL] Change the default value for
|
||||
/proc/<pid>/coredump_filter.
|
||||
See also Documentation/filesystems/proc.txt.
|
||||
See also Documentation/filesystems/proc.rst.
|
||||
|
||||
coresight_cpu_debug.enable
|
||||
[ARM,ARM64]
|
||||
|
|
@ -962,7 +962,7 @@
|
|||
edid/1680x1050.bin, or edid/1920x1080.bin is given
|
||||
and no file with the same name exists. Details and
|
||||
instructions how to build your own EDID data are
|
||||
available in Documentation/driver-api/edid.rst. An EDID
|
||||
available in Documentation/admin-guide/edid.rst. An EDID
|
||||
data set will only be used for a particular connector,
|
||||
if its name and a colon are prepended to the EDID
|
||||
name. Each connector may use a unique EDID data
|
||||
|
|
@ -992,10 +992,6 @@
|
|||
Documentation/admin-guide/dynamic-debug-howto.rst
|
||||
for details.
|
||||
|
||||
nompx [X86] Disables Intel Memory Protection Extensions.
|
||||
See Documentation/x86/intel_mpx.rst for more
|
||||
information about the feature.
|
||||
|
||||
nopku [X86] Disable Memory Protection Keys CPU feature found
|
||||
in some Intel CPUs.
|
||||
|
||||
|
|
@ -1475,6 +1471,14 @@
|
|||
hpet_mmap= [X86, HPET_MMAP] Allow userspace to mmap HPET
|
||||
registers. Default set by CONFIG_HPET_MMAP_DEFAULT.
|
||||
|
||||
hugetlb_cma= [HW] The size of a cma area used for allocation
|
||||
of gigantic hugepages.
|
||||
Format: nn[KMGTPE]
|
||||
|
||||
Reserve a cma area of given size and allocate gigantic
|
||||
hugepages using the cma allocator. If enabled, the
|
||||
boot-time allocation of gigantic hugepages is skipped.
|
||||
|
||||
hugepages= [HW,X86-32,IA-64] HugeTLB pages to allocate at boot.
|
||||
hugepagesz= [HW,IA-64,PPC,X86-64] The size of the HugeTLB pages.
|
||||
On x86-64 and powerpc, this option can be specified
|
||||
|
|
|
|||
|
|
@ -446,6 +446,27 @@ Notes:
|
|||
successful IPC object allocation. If an IPC object allocation syscall
|
||||
fails, it is undefined if the value remains unmodified or is reset to -1.
|
||||
|
||||
modprobe:
|
||||
=========
|
||||
|
||||
The path to the usermode helper for autoloading kernel modules, by
|
||||
default "/sbin/modprobe". This binary is executed when the kernel
|
||||
requests a module. For example, if userspace passes an unknown
|
||||
filesystem type to mount(), then the kernel will automatically request
|
||||
the corresponding filesystem module by executing this usermode helper.
|
||||
This usermode helper should insert the needed module into the kernel.
|
||||
|
||||
This sysctl only affects module autoloading. It has no effect on the
|
||||
ability to explicitly insert modules.
|
||||
|
||||
If this sysctl is set to the empty string, then module autoloading is
|
||||
completely disabled. The kernel will not try to execute a usermode
|
||||
helper at all, nor will it call the kernel_module_request LSM hook.
|
||||
|
||||
If CONFIG_STATIC_USERMODEHELPER=y is set in the kernel configuration,
|
||||
then the configured static usermode helper overrides this sysctl,
|
||||
except that the empty string is still accepted to completely disable
|
||||
module autoloading as described above.
|
||||
|
||||
nmi_watchdog
|
||||
============
|
||||
|
|
|
|||
|
|
@ -48,9 +48,10 @@ always allowed (by a user with admin privileges).
|
|||
How do I use the magic SysRq key?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
On x86 - You press the key combo :kbd:`ALT-SysRq-<command key>`.
|
||||
On x86
|
||||
You press the key combo :kbd:`ALT-SysRq-<command key>`.
|
||||
|
||||
.. note::
|
||||
.. note::
|
||||
Some
|
||||
keyboards may not have a key labeled 'SysRq'. The 'SysRq' key is
|
||||
also known as the 'Print Screen' key. Also some keyboards cannot
|
||||
|
|
@ -58,14 +59,15 @@ On x86 - You press the key combo :kbd:`ALT-SysRq-<command key>`.
|
|||
have better luck with press :kbd:`Alt`, press :kbd:`SysRq`,
|
||||
release :kbd:`SysRq`, press :kbd:`<command key>`, release everything.
|
||||
|
||||
On SPARC - You press :kbd:`ALT-STOP-<command key>`, I believe.
|
||||
On SPARC
|
||||
You press :kbd:`ALT-STOP-<command key>`, I believe.
|
||||
|
||||
On the serial console (PC style standard serial ports only)
|
||||
You send a ``BREAK``, then within 5 seconds a command key. Sending
|
||||
``BREAK`` twice is interpreted as a normal BREAK.
|
||||
|
||||
On PowerPC
|
||||
Press :kbd:`ALT - Print Screen` (or :kbd:`F13`) - :kbd:`<command key>`,
|
||||
Press :kbd:`ALT - Print Screen` (or :kbd:`F13`) - :kbd:`<command key>`.
|
||||
:kbd:`Print Screen` (or :kbd:`F13`) - :kbd:`<command key>` may suffice.
|
||||
|
||||
On other
|
||||
|
|
@ -73,7 +75,7 @@ On other
|
|||
let me know so I can add them to this section.
|
||||
|
||||
On all
|
||||
write a character to /proc/sysrq-trigger. e.g.::
|
||||
Write a character to /proc/sysrq-trigger. e.g.::
|
||||
|
||||
echo t > /proc/sysrq-trigger
|
||||
|
||||
|
|
@ -282,7 +284,7 @@ Just ask them on the linux-kernel mailing list:
|
|||
Credits
|
||||
~~~~~~~
|
||||
|
||||
Written by Mydraal <vulpyne@vulpyne.net>
|
||||
Updated by Adam Sulmicki <adam@cfar.umd.edu>
|
||||
Updated by Jeremy M. Dolan <jmd@turbogeek.org> 2001/01/28 10:15:59
|
||||
Added to by Crutcher Dunnavant <crutcher+kernel@datastacks.com>
|
||||
- Written by Mydraal <vulpyne@vulpyne.net>
|
||||
- Updated by Adam Sulmicki <adam@cfar.umd.edu>
|
||||
- Updated by Jeremy M. Dolan <jmd@turbogeek.org> 2001/01/28 10:15:59
|
||||
- Added to by Crutcher Dunnavant <crutcher+kernel@datastacks.com>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
* Aspeed KCS (Keyboard Controller Style) IPMI interface
|
||||
# Aspeed KCS (Keyboard Controller Style) IPMI interface
|
||||
|
||||
The Aspeed SOCs (AST2400 and AST2500) are commonly used as BMCs
|
||||
(Baseboard Management Controllers) and the KCS interface can be
|
||||
used to perform in-band IPMI communication with their host.
|
||||
|
||||
## v1
|
||||
Required properties:
|
||||
- compatible : should be one of
|
||||
"aspeed,ast2400-kcs-bmc"
|
||||
|
|
@ -12,14 +13,21 @@ Required properties:
|
|||
- kcs_chan : The LPC channel number in the controller
|
||||
- kcs_addr : The host CPU IO map address
|
||||
|
||||
## v2
|
||||
Required properties:
|
||||
- compatible : should be one of
|
||||
"aspeed,ast2400-kcs-bmc-v2"
|
||||
"aspeed,ast2500-kcs-bmc-v2"
|
||||
- reg : The address and size of the IDR, ODR and STR registers
|
||||
- interrupts : interrupt generated by the controller
|
||||
- aspeed,lpc-io-reg : The host CPU LPC IO address for the device
|
||||
|
||||
Example:
|
||||
|
||||
kcs3: kcs3@0 {
|
||||
compatible = "aspeed,ast2500-kcs-bmc";
|
||||
reg = <0x0 0x80>;
|
||||
kcs3: kcs@24 {
|
||||
compatible = "aspeed,ast2500-kcs-bmc-v2";
|
||||
reg = <0x24 0x1>, <0x30 0x1>, <0x3c 0x1>;
|
||||
aspeed,lpc-reg = <0xca2>;
|
||||
interrupts = <8>;
|
||||
kcs_chan = <3>;
|
||||
kcs_addr = <0xCA2>;
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
* PWM controlled by ChromeOS EC
|
||||
|
||||
Google's ChromeOS EC PWM is a simple PWM attached to the Embedded Controller
|
||||
(EC) and controlled via a host-command interface.
|
||||
|
||||
An EC PWM node should be only found as a sub-node of the EC node (see
|
||||
Documentation/devicetree/bindings/mfd/cros-ec.txt).
|
||||
|
||||
Required properties:
|
||||
- compatible: Must contain "google,cros-ec-pwm"
|
||||
- #pwm-cells: Should be 1. The cell specifies the PWM index.
|
||||
|
||||
Example:
|
||||
cros-ec@0 {
|
||||
compatible = "google,cros-ec-spi";
|
||||
|
||||
...
|
||||
|
||||
cros_ec_pwm: ec-pwm {
|
||||
compatible = "google,cros-ec-pwm";
|
||||
#pwm-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/pwm/google,cros-ec-pwm.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: PWM controlled by ChromeOS EC
|
||||
|
||||
maintainers:
|
||||
- Thierry Reding <thierry.reding@gmail.com>
|
||||
- '"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>'
|
||||
|
||||
description: |
|
||||
Google's ChromeOS EC PWM is a simple PWM attached to the Embedded Controller
|
||||
(EC) and controlled via a host-command interface.
|
||||
An EC PWM node should be only found as a sub-node of the EC node (see
|
||||
Documentation/devicetree/bindings/mfd/cros-ec.txt).
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: google,cros-ec-pwm
|
||||
"#pwm-cells":
|
||||
description: The cell specifies the PWM index.
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- '#pwm-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
cros-ec@0 {
|
||||
compatible = "google,cros-ec-spi";
|
||||
cros_ec_pwm: ec-pwm {
|
||||
compatible = "google,cros-ec-pwm";
|
||||
#pwm-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
|
@ -9,6 +9,7 @@ Required properties:
|
|||
- "nvidia,tegra132-pwm", "nvidia,tegra20-pwm": for Tegra132
|
||||
- "nvidia,tegra210-pwm", "nvidia,tegra20-pwm": for Tegra210
|
||||
- "nvidia,tegra186-pwm": for Tegra186
|
||||
- "nvidia,tegra194-pwm": for Tegra194
|
||||
- reg: physical base address and length of the controller's registers
|
||||
- #pwm-cells: should be 2. See pwm.yaml in this directory for a description of
|
||||
the cells format.
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ required:
|
|||
examples:
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
i2c@0 {
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
|
|
|
|||
|
|
@ -314,11 +314,8 @@ http://www.linux-usb.org/
|
|||
Linux Hotplug Project:
|
||||
http://linux-hotplug.sourceforge.net/
|
||||
|
||||
Linux USB Working Devices List:
|
||||
http://www.qbik.ch/usb/devices/
|
||||
|
||||
linux-usb-devel Mailing List Archives:
|
||||
http://marc.theaimsgroup.com/?l=linux-usb-devel
|
||||
linux-usb Mailing List Archives:
|
||||
https://lore.kernel.org/linux-usb/
|
||||
|
||||
Programming Guide for Linux USB Device Drivers:
|
||||
http://lmu.web.psi.ch/docu/manuals/software_manuals/linux_sl/usb_linux_programming_guide.pdf
|
||||
|
|
|
|||
|
|
@ -7,9 +7,6 @@ W1: Dallas' 1-wire bus
|
|||
W1 API internal to the kernel
|
||||
=============================
|
||||
|
||||
W1 API internal to the kernel
|
||||
-----------------------------
|
||||
|
||||
include/linux/w1.h
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
|
|||
|
|
@ -41,16 +41,6 @@ Documentation
|
|||
|
||||
http://www.orangefs.org/documentation/
|
||||
|
||||
|
||||
Userspace Filesystem Source
|
||||
===========================
|
||||
|
||||
http://www.orangefs.org/download
|
||||
|
||||
Orangefs versions prior to 2.9.3 would not be compatible with the
|
||||
upstream version of the kernel client.
|
||||
|
||||
|
||||
Running ORANGEFS On a Single Server
|
||||
===================================
|
||||
|
||||
|
|
@ -94,6 +84,14 @@ Mount the filesystem::
|
|||
|
||||
mount -t pvfs2 tcp://localhost:3334/orangefs /pvfsmnt
|
||||
|
||||
Userspace Filesystem Source
|
||||
===========================
|
||||
|
||||
http://www.orangefs.org/download
|
||||
|
||||
Orangefs versions prior to 2.9.3 would not be compatible with the
|
||||
upstream version of the kernel client.
|
||||
|
||||
|
||||
Building ORANGEFS on a Single Server
|
||||
====================================
|
||||
|
|
@ -107,18 +105,24 @@ default, we will probably be changing the default to LMDB soon.
|
|||
|
||||
::
|
||||
|
||||
./configure --prefix=/opt/ofs --with-db-backend=lmdb
|
||||
./configure --prefix=/opt/ofs --with-db-backend=lmdb --disable-usrint
|
||||
|
||||
make
|
||||
|
||||
make install
|
||||
|
||||
Create an orangefs config file::
|
||||
Create an orangefs config file by running pvfs2-genconfig and
|
||||
specifying a target config file. Pvfs2-genconfig will prompt you
|
||||
through. Generally it works fine to take the defaults, but you
|
||||
should use your server's hostname, rather than "localhost" when
|
||||
it comes to that question::
|
||||
|
||||
/opt/ofs/bin/pvfs2-genconfig /etc/pvfs2.conf
|
||||
|
||||
Create an /etc/pvfs2tab file::
|
||||
|
||||
Localhost is fine for your pvfs2tab file:
|
||||
|
||||
echo tcp://localhost:3334/orangefs /pvfsmnt pvfs2 defaults,noauto 0 0 > \
|
||||
/etc/pvfs2tab
|
||||
|
||||
|
|
@ -132,7 +136,7 @@ Bootstrap the server::
|
|||
|
||||
Start the server::
|
||||
|
||||
/opt/osf/sbin/pvfs2-server /etc/pvfs2.conf
|
||||
/opt/ofs/sbin/pvfs2-server /etc/pvfs2.conf
|
||||
|
||||
Now the server should be running. Pvfs2-ls is a simple
|
||||
test to verify that the server is running::
|
||||
|
|
@ -142,11 +146,11 @@ test to verify that the server is running::
|
|||
If stuff seems to be working, load the kernel module and
|
||||
turn on the client core::
|
||||
|
||||
/opt/ofs/sbin/pvfs2-client -p /opt/osf/sbin/pvfs2-client-core
|
||||
/opt/ofs/sbin/pvfs2-client -p /opt/ofs/sbin/pvfs2-client-core
|
||||
|
||||
Mount your filesystem::
|
||||
|
||||
mount -t pvfs2 tcp://localhost:3334/orangefs /pvfsmnt
|
||||
mount -t pvfs2 tcp://`hostname`:3334/orangefs /pvfsmnt
|
||||
|
||||
|
||||
Running xfstests
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ tree structures are treated as system blocks.
|
|||
|
||||
The rational behind that is that a write request can work on a new snapshot
|
||||
(system area of the inactive - resp. lower serial numbered superblock) while
|
||||
at the same time there is still a complete stable filesystem structer in the
|
||||
at the same time there is still a complete stable filesystem structure in the
|
||||
other half of the system area.
|
||||
|
||||
When finished with writing (a sync write is completed, the maximum sync leap
|
||||
|
|
|
|||
|
|
@ -56,13 +56,13 @@ are illustrated in the following diagram::
|
|||
+- - - -+ | +-------------------| |
|
||||
| Entry | - - - - - - - -+ | | Definition Blocks | |
|
||||
+- - - -+ | | +-------------------+ |
|
||||
| | +- - - - - - - - - -+ |
|
||||
+-|->| SSDT | |
|
||||
| | +- - - - - - - - - -+ |
|
||||
+-|->| SSDT | |
|
||||
| +-------------------+ |
|
||||
| | Definition Blocks | |
|
||||
| +- - - - - - - - - -+ |
|
||||
+------------------------+
|
||||
|
|
||||
|
|
||||
OSPM Loading |
|
||||
\|/
|
||||
+----------------+
|
||||
|
|
|
|||
16
MAINTAINERS
16
MAINTAINERS
|
|
@ -727,7 +727,7 @@ L: linux-alpha@vger.kernel.org
|
|||
F: arch/alpha/
|
||||
|
||||
ALPS PS/2 TOUCHPAD DRIVER
|
||||
R: Pali Rohár <pali.rohar@gmail.com>
|
||||
R: Pali Rohár <pali@kernel.org>
|
||||
F: drivers/input/mouse/alps.*
|
||||
|
||||
ALTERA I2C CONTROLLER DRIVER
|
||||
|
|
@ -4774,23 +4774,23 @@ F: drivers/net/fddi/defza.*
|
|||
|
||||
DELL LAPTOP DRIVER
|
||||
M: Matthew Garrett <mjg59@srcf.ucam.org>
|
||||
M: Pali Rohár <pali.rohar@gmail.com>
|
||||
M: Pali Rohár <pali@kernel.org>
|
||||
L: platform-driver-x86@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/platform/x86/dell-laptop.c
|
||||
|
||||
DELL LAPTOP FREEFALL DRIVER
|
||||
M: Pali Rohár <pali.rohar@gmail.com>
|
||||
M: Pali Rohár <pali@kernel.org>
|
||||
S: Maintained
|
||||
F: drivers/platform/x86/dell-smo8800.c
|
||||
|
||||
DELL LAPTOP RBTN DRIVER
|
||||
M: Pali Rohár <pali.rohar@gmail.com>
|
||||
M: Pali Rohár <pali@kernel.org>
|
||||
S: Maintained
|
||||
F: drivers/platform/x86/dell-rbtn.*
|
||||
|
||||
DELL LAPTOP SMM DRIVER
|
||||
M: Pali Rohár <pali.rohar@gmail.com>
|
||||
M: Pali Rohár <pali@kernel.org>
|
||||
S: Maintained
|
||||
F: drivers/hwmon/dell-smm-hwmon.c
|
||||
F: include/uapi/linux/i8k.h
|
||||
|
|
@ -4802,7 +4802,7 @@ S: Maintained
|
|||
F: drivers/platform/x86/dell_rbu.c
|
||||
|
||||
DELL SMBIOS DRIVER
|
||||
M: Pali Rohár <pali.rohar@gmail.com>
|
||||
M: Pali Rohár <pali@kernel.org>
|
||||
M: Mario Limonciello <mario.limonciello@dell.com>
|
||||
L: platform-driver-x86@vger.kernel.org
|
||||
S: Maintained
|
||||
|
|
@ -4835,7 +4835,7 @@ F: drivers/platform/x86/dell-wmi-descriptor.c
|
|||
|
||||
DELL WMI NOTIFICATIONS DRIVER
|
||||
M: Matthew Garrett <mjg59@srcf.ucam.org>
|
||||
M: Pali Rohár <pali.rohar@gmail.com>
|
||||
M: Pali Rohár <pali@kernel.org>
|
||||
S: Maintained
|
||||
F: drivers/platform/x86/dell-wmi.c
|
||||
|
||||
|
|
@ -11956,7 +11956,7 @@ F: drivers/media/i2c/et8ek8
|
|||
F: drivers/media/i2c/ad5820.c
|
||||
|
||||
NOKIA N900 POWER SUPPLY DRIVERS
|
||||
R: Pali Rohár <pali.rohar@gmail.com>
|
||||
R: Pali Rohár <pali@kernel.org>
|
||||
F: include/linux/power/bq2415x_charger.h
|
||||
F: include/linux/power/bq27xxx_battery.h
|
||||
F: drivers/power/supply/bq2415x_charger.c
|
||||
|
|
|
|||
|
|
@ -90,9 +90,6 @@ typedef struct page *pgtable_t;
|
|||
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
|
||||
#endif /* CONFIG_DISCONTIGMEM */
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -268,7 +268,6 @@ extern inline void pud_clear(pud_t * pudp) { pud_val(*pudp) = 0; }
|
|||
extern inline int pte_write(pte_t pte) { return !(pte_val(pte) & _PAGE_FOW); }
|
||||
extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
|
||||
extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
|
||||
extern inline int pte_special(pte_t pte) { return 0; }
|
||||
|
||||
extern inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) |= _PAGE_FOW; return pte; }
|
||||
extern inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~(__DIRTY_BITS); return pte; }
|
||||
|
|
@ -276,7 +275,6 @@ extern inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~(__ACCESS_BITS); ret
|
|||
extern inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) &= ~_PAGE_FOW; return pte; }
|
||||
extern inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= __DIRTY_BITS; return pte; }
|
||||
extern inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= __ACCESS_BITS; return pte; }
|
||||
extern inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
#define PAGE_DIR_OFFSET(tsk,address) pgd_offset((tsk),(address))
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ typedef pte_t * pgtable_t;
|
|||
#define virt_addr_valid(kaddr) pfn_valid(virt_to_pfn(kaddr))
|
||||
|
||||
/* Default Permissions for stack/heaps pages (Non Executable) */
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_NON_EXEC
|
||||
|
||||
#define WANT_PAGE_VIRTUAL 1
|
||||
|
||||
|
|
|
|||
|
|
@ -161,9 +161,7 @@ extern int pfn_valid(unsigned long);
|
|||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS \
|
||||
(((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
|
||||
VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC
|
||||
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -211,8 +211,6 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr)
|
|||
#define pmd_addr_end(addr,end) (end)
|
||||
|
||||
#define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,pte,ext)
|
||||
#define pte_special(pte) (0)
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
/*
|
||||
* We don't have huge page support for short descriptors, for the moment
|
||||
|
|
|
|||
|
|
@ -243,19 +243,8 @@ static inline void __sync_icache_dcache(pte_t pteval)
|
|||
extern void __sync_icache_dcache(pte_t pteval);
|
||||
#endif
|
||||
|
||||
static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
|
||||
pte_t *ptep, pte_t pteval)
|
||||
{
|
||||
unsigned long ext = 0;
|
||||
|
||||
if (addr < TASK_SIZE && pte_valid_user(pteval)) {
|
||||
if (!pte_special(pteval))
|
||||
__sync_icache_dcache(pteval);
|
||||
ext |= PTE_EXT_NG;
|
||||
}
|
||||
|
||||
set_pte_ext(ptep, pteval, ext);
|
||||
}
|
||||
void set_pte_at(struct mm_struct *mm, unsigned long addr,
|
||||
pte_t *ptep, pte_t pteval);
|
||||
|
||||
static inline pte_t clear_pte_bit(pte_t pte, pgprot_t prot)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2011 Texas Instruments, Inc.
|
||||
* Santosh Shilimkar <santosh.shilimkar@ti.com>
|
||||
* Copyright (C) 2012 Ivaylo Dimitrov <freemangordon@abv.bg>
|
||||
* Copyright (C) 2013 Pali Rohár <pali.rohar@gmail.com>
|
||||
* Copyright (C) 2013 Pali Rohár <pali@kernel.org>
|
||||
*/
|
||||
|
||||
#include <linux/arm-smccc.h>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2011 Texas Instruments, Inc.
|
||||
* Santosh Shilimkar <santosh.shilimkar@ti.com>
|
||||
* Copyright (C) 2012 Ivaylo Dimitrov <freemangordon@abv.bg>
|
||||
* Copyright (C) 2013 Pali Rohár <pali.rohar@gmail.com>
|
||||
* Copyright (C) 2013 Pali Rohár <pali@kernel.org>
|
||||
*/
|
||||
#ifndef OMAP_ARCH_OMAP_SECURE_H
|
||||
#define OMAP_ARCH_OMAP_SECURE_H
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* Written by Santosh Shilimkar <santosh.shilimkar@ti.com>
|
||||
*
|
||||
* Copyright (C) 2012 Ivaylo Dimitrov <freemangordon@abv.bg>
|
||||
* Copyright (C) 2013 Pali Rohár <pali.rohar@gmail.com>
|
||||
* Copyright (C) 2013 Pali Rohár <pali@kernel.org>
|
||||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
|||
*/
|
||||
static inline bool access_error(unsigned int fsr, struct vm_area_struct *vma)
|
||||
{
|
||||
unsigned int mask = VM_READ | VM_WRITE | VM_EXEC;
|
||||
unsigned int mask = VM_ACCESS_FLAGS;
|
||||
|
||||
if ((fsr & FSR_WRITE) && !(fsr & FSR_CM))
|
||||
mask = VM_WRITE;
|
||||
|
|
|
|||
|
|
@ -1646,3 +1646,17 @@ void __init early_mm_init(const struct machine_desc *mdesc)
|
|||
build_mem_type_table();
|
||||
early_paging_init(mdesc);
|
||||
}
|
||||
|
||||
void set_pte_at(struct mm_struct *mm, unsigned long addr,
|
||||
pte_t *ptep, pte_t pteval)
|
||||
{
|
||||
unsigned long ext = 0;
|
||||
|
||||
if (addr < TASK_SIZE && pte_valid_user(pteval)) {
|
||||
if (!pte_special(pteval))
|
||||
__sync_icache_dcache(pteval);
|
||||
ext |= PTE_EXT_NG;
|
||||
}
|
||||
|
||||
set_pte_ext(ptep, pteval, ext);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,9 +36,7 @@ extern int pfn_valid(unsigned long);
|
|||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS \
|
||||
(((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
|
||||
VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC
|
||||
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -445,7 +445,7 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
|
|||
const struct fault_info *inf;
|
||||
struct mm_struct *mm = current->mm;
|
||||
vm_fault_t fault, major = 0;
|
||||
unsigned long vm_flags = VM_READ | VM_WRITE | VM_EXEC;
|
||||
unsigned long vm_flags = VM_ACCESS_FLAGS;
|
||||
unsigned int mm_flags = FAULT_FLAG_DEFAULT;
|
||||
|
||||
if (kprobe_page_fault(regs, esr))
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include <linux/mm.h>
|
||||
#include <linux/kexec.h>
|
||||
#include <linux/crash_dump.h>
|
||||
#include <linux/hugetlb.h>
|
||||
|
||||
#include <asm/boot.h>
|
||||
#include <asm/fixmap.h>
|
||||
|
|
@ -457,6 +458,11 @@ void __init arm64_memblock_init(void)
|
|||
high_memory = __va(memblock_end_of_DRAM() - 1) + 1;
|
||||
|
||||
dma_contiguous_reserve(arm64_dma32_phys_limit);
|
||||
|
||||
#ifdef CONFIG_ARM64_4K_PAGES
|
||||
hugetlb_cma_reserve(PUD_SHIFT - PAGE_SHIFT);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void __init bootmem_init(void)
|
||||
|
|
|
|||
|
|
@ -1374,7 +1374,7 @@ static void __remove_pgd_mapping(pgd_t *pgdir, unsigned long start, u64 size)
|
|||
}
|
||||
|
||||
int arch_add_memory(int nid, u64 start, u64 size,
|
||||
struct mhp_restrictions *restrictions)
|
||||
struct mhp_params *params)
|
||||
{
|
||||
int ret, flags = 0;
|
||||
|
||||
|
|
@ -1382,12 +1382,13 @@ int arch_add_memory(int nid, u64 start, u64 size,
|
|||
flags = NO_BLOCK_MAPPINGS | NO_CONT_MAPPINGS;
|
||||
|
||||
__create_pgd_mapping(swapper_pg_dir, start, __phys_to_virt(start),
|
||||
size, PAGE_KERNEL, __pgd_pgtable_alloc, flags);
|
||||
size, params->pgprot, __pgd_pgtable_alloc,
|
||||
flags);
|
||||
|
||||
memblock_clear_nomap(start, size);
|
||||
|
||||
ret = __add_pages(nid, start >> PAGE_SHIFT, size >> PAGE_SHIFT,
|
||||
restrictions);
|
||||
params);
|
||||
if (ret)
|
||||
__remove_pgd_mapping(swapper_pg_dir,
|
||||
__phys_to_virt(start), size);
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@
|
|||
#ifndef _ASM_C6X_PAGE_H
|
||||
#define _ASM_C6X_PAGE_H
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS \
|
||||
(VM_READ | VM_WRITE | \
|
||||
((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC
|
||||
|
||||
#include <asm-generic/page.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -85,9 +85,6 @@ extern unsigned long va_pa_offset;
|
|||
PHYS_OFFSET_OFFSET)
|
||||
#define virt_to_page(x) (mem_map + MAP_NR(x))
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#define pfn_to_kaddr(x) __va(PFN_PHYS(x))
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
|
|
|
|||
|
|
@ -110,9 +110,6 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
|
|||
extern void load_pgd(unsigned long pg_dir);
|
||||
extern pte_t invalid_pte_table[PTRS_PER_PTE];
|
||||
|
||||
static inline int pte_special(pte_t pte) { return 0; }
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
static inline void set_pte(pte_t *p, pte_t pte)
|
||||
{
|
||||
*p = pte;
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@
|
|||
#include <linux/types.h>
|
||||
|
||||
#define MAP_NR(addr) (((uintptr_t)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
extern unsigned long rom_length;
|
||||
|
|
|
|||
|
|
@ -93,8 +93,7 @@ struct page;
|
|||
#define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(__pa(kaddr)))
|
||||
|
||||
/* Default vm area behavior is non-executable. */
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_NON_EXEC
|
||||
|
||||
#define pfn_valid(pfn) ((pfn) < max_mapnr)
|
||||
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
|
||||
|
|
|
|||
|
|
@ -158,8 +158,6 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* located in head.S */
|
|||
|
||||
/* Seems to be zero even in architectures where the zero page is firewalled? */
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
#define pte_special(pte) 0
|
||||
#define pte_mkspecial(pte) (pte)
|
||||
|
||||
/* HUGETLB not working currently */
|
||||
#ifdef CONFIG_HUGETLB_PAGE
|
||||
|
|
|
|||
|
|
@ -218,10 +218,7 @@ get_order (unsigned long size)
|
|||
|
||||
#define PAGE_OFFSET RGN_BASE(RGN_KERNEL)
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC | \
|
||||
(((current->personality & READ_IMPLIES_EXEC) != 0) \
|
||||
? VM_EXEC : 0))
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC
|
||||
|
||||
#define GATE_ADDR RGN_BASE(RGN_GATE)
|
||||
|
||||
|
|
|
|||
|
|
@ -298,7 +298,6 @@ extern unsigned long VMALLOC_END;
|
|||
#define pte_exec(pte) ((pte_val(pte) & _PAGE_AR_RX) != 0)
|
||||
#define pte_dirty(pte) ((pte_val(pte) & _PAGE_D) != 0)
|
||||
#define pte_young(pte) ((pte_val(pte) & _PAGE_A) != 0)
|
||||
#define pte_special(pte) 0
|
||||
|
||||
/*
|
||||
* Note: we convert AR_RWX to AR_RX and AR_RW to AR_R by clearing the 2nd bit in the
|
||||
|
|
@ -311,7 +310,6 @@ extern unsigned long VMALLOC_END;
|
|||
#define pte_mkclean(pte) (__pte(pte_val(pte) & ~_PAGE_D))
|
||||
#define pte_mkdirty(pte) (__pte(pte_val(pte) | _PAGE_D))
|
||||
#define pte_mkhuge(pte) (__pte(pte_val(pte)))
|
||||
#define pte_mkspecial(pte) (pte)
|
||||
|
||||
/*
|
||||
* Because ia64's Icache and Dcache is not coherent (on a cpu), we need to
|
||||
|
|
|
|||
|
|
@ -670,13 +670,16 @@ mem_init (void)
|
|||
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
int arch_add_memory(int nid, u64 start, u64 size,
|
||||
struct mhp_restrictions *restrictions)
|
||||
struct mhp_params *params)
|
||||
{
|
||||
unsigned long start_pfn = start >> PAGE_SHIFT;
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
int ret;
|
||||
|
||||
ret = __add_pages(nid, start_pfn, nr_pages, restrictions);
|
||||
if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot))
|
||||
return -EINVAL;
|
||||
|
||||
ret = __add_pages(nid, start_pfn, nr_pages, params);
|
||||
if (ret)
|
||||
printk("%s: Problem encountered in __add_pages() as ret=%d\n",
|
||||
__func__, ret);
|
||||
|
|
|
|||
|
|
@ -235,11 +235,6 @@ static inline int pte_young(pte_t pte)
|
|||
return pte_val(pte) & CF_PAGE_ACCESSED;
|
||||
}
|
||||
|
||||
static inline int pte_special(pte_t pte)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline pte_t pte_wrprotect(pte_t pte)
|
||||
{
|
||||
pte_val(pte) &= ~CF_PAGE_WRITABLE;
|
||||
|
|
@ -312,11 +307,6 @@ static inline pte_t pte_mkcache(pte_t pte)
|
|||
return pte;
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte)
|
||||
{
|
||||
return pte;
|
||||
}
|
||||
|
||||
#define swapper_pg_dir kernel_pg_dir
|
||||
extern pgd_t kernel_pg_dir[PTRS_PER_PGD];
|
||||
|
||||
|
|
|
|||
|
|
@ -174,7 +174,6 @@ static inline void pud_set(pud_t *pudp, pmd_t *pmdp)
|
|||
static inline int pte_write(pte_t pte) { return !(pte_val(pte) & _PAGE_RONLY); }
|
||||
static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
|
||||
static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
|
||||
static inline int pte_special(pte_t pte) { return 0; }
|
||||
|
||||
static inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) |= _PAGE_RONLY; return pte; }
|
||||
static inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; }
|
||||
|
|
@ -192,7 +191,6 @@ static inline pte_t pte_mkcache(pte_t pte)
|
|||
pte_val(pte) = (pte_val(pte) & _CACHEMASK040) | m68k_supervisor_cachemode;
|
||||
return pte;
|
||||
}
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
#define PAGE_DIR_OFFSET(tsk,address) pgd_offset((tsk),(address))
|
||||
|
||||
|
|
|
|||
|
|
@ -65,9 +65,6 @@ extern unsigned long _ramend;
|
|||
#define __phys_to_pfn(paddr) ((unsigned long)((paddr) >> PAGE_SHIFT))
|
||||
#define __pfn_to_phys(pfn) PFN_PHYS(pfn)
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
#endif /* _M68K_PAGE_H */
|
||||
|
|
|
|||
|
|
@ -155,7 +155,6 @@ static inline void pmd_clear (pmd_t *pmdp) { pmd_val (*pmdp) = 0; }
|
|||
static inline int pte_write(pte_t pte) { return pte_val(pte) & SUN3_PAGE_WRITEABLE; }
|
||||
static inline int pte_dirty(pte_t pte) { return pte_val(pte) & SUN3_PAGE_MODIFIED; }
|
||||
static inline int pte_young(pte_t pte) { return pte_val(pte) & SUN3_PAGE_ACCESSED; }
|
||||
static inline int pte_special(pte_t pte) { return 0; }
|
||||
|
||||
static inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) &= ~SUN3_PAGE_WRITEABLE; return pte; }
|
||||
static inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~SUN3_PAGE_MODIFIED; return pte; }
|
||||
|
|
@ -168,7 +167,6 @@ static inline pte_t pte_mknocache(pte_t pte) { pte_val(pte) |= SUN3_PAGE_NOCACHE
|
|||
//static inline pte_t pte_mkcache(pte_t pte) { pte_val(pte) &= SUN3_PAGE_NOCACHE; return pte; }
|
||||
// until then, use:
|
||||
static inline pte_t pte_mkcache(pte_t pte) { return pte; }
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
|
||||
extern pgd_t kernel_pg_dir[PTRS_PER_PGD];
|
||||
|
|
|
|||
|
|
@ -194,8 +194,6 @@ extern int page_is_ram(unsigned long pfn);
|
|||
|
||||
#ifdef CONFIG_MMU
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
|
|
|||
|
|
@ -77,10 +77,6 @@ extern pte_t *va_to_pte(unsigned long address);
|
|||
* Undefined behaviour if not..
|
||||
*/
|
||||
|
||||
static inline int pte_special(pte_t pte) { return 0; }
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
/* Start and end of the vmalloc area. */
|
||||
/* Make sure to map the vmalloc area above the pinned kernel memory area
|
||||
of 32Mb. */
|
||||
|
|
|
|||
|
|
@ -253,10 +253,7 @@ extern bool __virt_addr_valid(const volatile void *kaddr);
|
|||
#define virt_addr_valid(kaddr) \
|
||||
__virt_addr_valid((const volatile void *) (kaddr))
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS \
|
||||
(VM_READ | VM_WRITE | \
|
||||
((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
|
|
|
|||
|
|
@ -269,6 +269,36 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
|
|||
*/
|
||||
extern pgd_t swapper_pg_dir[];
|
||||
|
||||
/*
|
||||
* Platform specific pte_special() and pte_mkspecial() definitions
|
||||
* are required only when ARCH_HAS_PTE_SPECIAL is enabled.
|
||||
*/
|
||||
#if defined(CONFIG_ARCH_HAS_PTE_SPECIAL)
|
||||
#if defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_CPU_MIPS32)
|
||||
static inline int pte_special(pte_t pte)
|
||||
{
|
||||
return pte.pte_low & _PAGE_SPECIAL;
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte)
|
||||
{
|
||||
pte.pte_low |= _PAGE_SPECIAL;
|
||||
return pte;
|
||||
}
|
||||
#else
|
||||
static inline int pte_special(pte_t pte)
|
||||
{
|
||||
return pte_val(pte) & _PAGE_SPECIAL;
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte)
|
||||
{
|
||||
pte_val(pte) |= _PAGE_SPECIAL;
|
||||
return pte;
|
||||
}
|
||||
#endif
|
||||
#endif /* CONFIG_ARCH_HAS_PTE_SPECIAL */
|
||||
|
||||
/*
|
||||
* The following only work if pte_present() is true.
|
||||
* Undefined behaviour if not..
|
||||
|
|
@ -277,7 +307,6 @@ extern pgd_t swapper_pg_dir[];
|
|||
static inline int pte_write(pte_t pte) { return pte.pte_low & _PAGE_WRITE; }
|
||||
static inline int pte_dirty(pte_t pte) { return pte.pte_low & _PAGE_MODIFIED; }
|
||||
static inline int pte_young(pte_t pte) { return pte.pte_low & _PAGE_ACCESSED; }
|
||||
static inline int pte_special(pte_t pte) { return pte.pte_low & _PAGE_SPECIAL; }
|
||||
|
||||
static inline pte_t pte_wrprotect(pte_t pte)
|
||||
{
|
||||
|
|
@ -338,17 +367,10 @@ static inline pte_t pte_mkyoung(pte_t pte)
|
|||
}
|
||||
return pte;
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte)
|
||||
{
|
||||
pte.pte_low |= _PAGE_SPECIAL;
|
||||
return pte;
|
||||
}
|
||||
#else
|
||||
static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; }
|
||||
static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_MODIFIED; }
|
||||
static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
|
||||
static inline int pte_special(pte_t pte) { return pte_val(pte) & _PAGE_SPECIAL; }
|
||||
|
||||
static inline pte_t pte_wrprotect(pte_t pte)
|
||||
{
|
||||
|
|
@ -392,12 +414,6 @@ static inline pte_t pte_mkyoung(pte_t pte)
|
|||
return pte;
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte)
|
||||
{
|
||||
pte_val(pte) |= _PAGE_SPECIAL;
|
||||
return pte;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
|
||||
static inline int pte_huge(pte_t pte) { return pte_val(pte) & _PAGE_HUGE; }
|
||||
|
||||
|
|
|
|||
|
|
@ -59,9 +59,6 @@ typedef struct page *pgtable_t;
|
|||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -286,15 +286,6 @@ PTE_BIT_FUNC(mkclean, &=~_PAGE_D);
|
|||
PTE_BIT_FUNC(mkdirty, |=_PAGE_D);
|
||||
PTE_BIT_FUNC(mkold, &=~_PAGE_YOUNG);
|
||||
PTE_BIT_FUNC(mkyoung, |=_PAGE_YOUNG);
|
||||
static inline int pte_special(pte_t pte)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte)
|
||||
{
|
||||
return pte;
|
||||
}
|
||||
|
||||
/*
|
||||
* Mark the prot value as uncacheable and unbufferable.
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ void do_page_fault(unsigned long entry, unsigned long addr,
|
|||
struct vm_area_struct *vma;
|
||||
int si_code;
|
||||
vm_fault_t fault;
|
||||
unsigned int mask = VM_READ | VM_WRITE | VM_EXEC;
|
||||
unsigned int mask = VM_ACCESS_FLAGS;
|
||||
unsigned int flags = FAULT_FLAG_DEFAULT;
|
||||
|
||||
error_code = error_code & (ITYPE_mskINST | ITYPE_mskETYPE);
|
||||
|
|
|
|||
|
|
@ -98,8 +98,7 @@ static inline bool pfn_valid(unsigned long pfn)
|
|||
# define virt_to_page(vaddr) pfn_to_page(PFN_DOWN(virt_to_phys(vaddr)))
|
||||
# define virt_addr_valid(vaddr) pfn_valid(PFN_DOWN(virt_to_phys(vaddr)))
|
||||
|
||||
# define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
# define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_NON_EXEC
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,6 @@ static inline int pte_dirty(pte_t pte) \
|
|||
{ return pte_val(pte) & _PAGE_DIRTY; }
|
||||
static inline int pte_young(pte_t pte) \
|
||||
{ return pte_val(pte) & _PAGE_ACCESSED; }
|
||||
static inline int pte_special(pte_t pte) { return 0; }
|
||||
|
||||
#define pgprot_noncached pgprot_noncached
|
||||
|
||||
|
|
@ -168,8 +167,6 @@ static inline pte_t pte_mkdirty(pte_t pte)
|
|||
return pte;
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
static inline pte_t pte_mkyoung(pte_t pte)
|
||||
{
|
||||
pte_val(pte) |= _PAGE_ACCESSED;
|
||||
|
|
|
|||
|
|
@ -86,11 +86,6 @@ typedef struct page *pgtable_t;
|
|||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -236,8 +236,6 @@ static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; }
|
|||
static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_EXEC; }
|
||||
static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
|
||||
static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
|
||||
static inline int pte_special(pte_t pte) { return 0; }
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
static inline pte_t pte_wrprotect(pte_t pte)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -180,9 +180,6 @@ extern int npmem_ranges;
|
|||
#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
|
||||
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
#include <asm/pdc.h>
|
||||
|
|
|
|||
|
|
@ -377,7 +377,6 @@ static inline void pud_clear(pud_t *pud) {
|
|||
static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
|
||||
static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
|
||||
static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; }
|
||||
static inline int pte_special(pte_t pte) { return 0; }
|
||||
|
||||
static inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; }
|
||||
static inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
|
||||
|
|
@ -385,7 +384,6 @@ static inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) &= ~_PAGE_WRITE; ret
|
|||
static inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= _PAGE_DIRTY; return pte; }
|
||||
static inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= _PAGE_ACCESSED; return pte; }
|
||||
static inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_WRITE; return pte; }
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
/*
|
||||
* Huge pte definitions.
|
||||
|
|
|
|||
|
|
@ -251,7 +251,8 @@ extern int __meminit hash__vmemmap_create_mapping(unsigned long start,
|
|||
extern void hash__vmemmap_remove_mapping(unsigned long start,
|
||||
unsigned long page_size);
|
||||
|
||||
int hash__create_section_mapping(unsigned long start, unsigned long end, int nid);
|
||||
int hash__create_section_mapping(unsigned long start, unsigned long end,
|
||||
int nid, pgprot_t prot);
|
||||
int hash__remove_section_mapping(unsigned long start, unsigned long end);
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
|
|
|||
|
|
@ -294,7 +294,8 @@ static inline unsigned long radix__get_tree_size(void)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
int radix__create_section_mapping(unsigned long start, unsigned long end, int nid);
|
||||
int radix__create_section_mapping(unsigned long start, unsigned long end,
|
||||
int nid, pgprot_t prot);
|
||||
int radix__remove_section_mapping(unsigned long start, unsigned long end);
|
||||
#endif /* CONFIG_MEMORY_HOTPLUG */
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
|
|
|||
|
|
@ -240,13 +240,8 @@ static inline bool pfn_valid(unsigned long pfn)
|
|||
* and needs to be executable. This means the whole heap ends
|
||||
* up being executable.
|
||||
*/
|
||||
#define VM_DATA_DEFAULT_FLAGS32 \
|
||||
(((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
|
||||
VM_READ | VM_WRITE | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS64 (VM_READ | VM_WRITE | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS32 VM_DATA_FLAGS_TSK_EXEC
|
||||
#define VM_DATA_DEFAULT_FLAGS64 VM_DATA_FLAGS_NON_EXEC
|
||||
|
||||
#ifdef __powerpc64__
|
||||
#include <asm/page_64.h>
|
||||
|
|
|
|||
|
|
@ -94,11 +94,8 @@ extern u64 ppc64_pft_size;
|
|||
* stack by default, so in the absence of a PT_GNU_STACK program header
|
||||
* we turn execute permission off.
|
||||
*/
|
||||
#define VM_STACK_DEFAULT_FLAGS32 (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#define VM_STACK_DEFAULT_FLAGS64 (VM_READ | VM_WRITE | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_STACK_DEFAULT_FLAGS32 VM_DATA_FLAGS_EXEC
|
||||
#define VM_STACK_DEFAULT_FLAGS64 VM_DATA_FLAGS_NON_EXEC
|
||||
|
||||
#define VM_STACK_DEFAULT_FLAGS \
|
||||
(is_32bit_task() ? \
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@
|
|||
#endif /* CONFIG_SPARSEMEM */
|
||||
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
extern int create_section_mapping(unsigned long start, unsigned long end, int nid);
|
||||
extern int create_section_mapping(unsigned long start, unsigned long end,
|
||||
int nid, pgprot_t prot);
|
||||
extern int remove_section_mapping(unsigned long start, unsigned long end);
|
||||
|
||||
#ifdef CONFIG_PPC_BOOK3S_64
|
||||
|
|
|
|||
|
|
@ -809,7 +809,8 @@ int resize_hpt_for_hotplug(unsigned long new_mem_size)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int hash__create_section_mapping(unsigned long start, unsigned long end, int nid)
|
||||
int hash__create_section_mapping(unsigned long start, unsigned long end,
|
||||
int nid, pgprot_t prot)
|
||||
{
|
||||
int rc;
|
||||
|
||||
|
|
@ -819,7 +820,7 @@ int hash__create_section_mapping(unsigned long start, unsigned long end, int nid
|
|||
}
|
||||
|
||||
rc = htab_bolt_mapping(start, end, __pa(start),
|
||||
pgprot_val(PAGE_KERNEL), mmu_linear_psize,
|
||||
pgprot_val(prot), mmu_linear_psize,
|
||||
mmu_kernel_ssize);
|
||||
|
||||
if (rc < 0) {
|
||||
|
|
|
|||
|
|
@ -171,12 +171,13 @@ void mmu_cleanup_all(void)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
int __meminit create_section_mapping(unsigned long start, unsigned long end, int nid)
|
||||
int __meminit create_section_mapping(unsigned long start, unsigned long end,
|
||||
int nid, pgprot_t prot)
|
||||
{
|
||||
if (radix_enabled())
|
||||
return radix__create_section_mapping(start, end, nid);
|
||||
return radix__create_section_mapping(start, end, nid, prot);
|
||||
|
||||
return hash__create_section_mapping(start, end, nid);
|
||||
return hash__create_section_mapping(start, end, nid, prot);
|
||||
}
|
||||
|
||||
int __meminit remove_section_mapping(unsigned long start, unsigned long end)
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ int __execute_only_pkey(struct mm_struct *mm)
|
|||
static inline bool vma_is_pkey_exec_only(struct vm_area_struct *vma)
|
||||
{
|
||||
/* Do this check first since the vm_flags should be hot */
|
||||
if ((vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC)) != VM_EXEC)
|
||||
if ((vma->vm_flags & VM_ACCESS_FLAGS) != VM_EXEC)
|
||||
return false;
|
||||
|
||||
return (vma_pkey(vma) == vma->vm_mm->context.execute_only_pkey);
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ static unsigned long next_boundary(unsigned long addr, unsigned long end)
|
|||
|
||||
static int __meminit create_physical_mapping(unsigned long start,
|
||||
unsigned long end,
|
||||
int nid)
|
||||
int nid, pgprot_t _prot)
|
||||
{
|
||||
unsigned long vaddr, addr, mapping_size = 0;
|
||||
bool prev_exec, exec = false;
|
||||
|
|
@ -290,7 +290,7 @@ static int __meminit create_physical_mapping(unsigned long start,
|
|||
prot = PAGE_KERNEL_X;
|
||||
exec = true;
|
||||
} else {
|
||||
prot = PAGE_KERNEL;
|
||||
prot = _prot;
|
||||
exec = false;
|
||||
}
|
||||
|
||||
|
|
@ -334,7 +334,7 @@ static void __init radix_init_pgtable(void)
|
|||
|
||||
WARN_ON(create_physical_mapping(reg->base,
|
||||
reg->base + reg->size,
|
||||
-1));
|
||||
-1, PAGE_KERNEL));
|
||||
}
|
||||
|
||||
/* Find out how many PID bits are supported */
|
||||
|
|
@ -713,8 +713,10 @@ static int __meminit stop_machine_change_mapping(void *data)
|
|||
|
||||
spin_unlock(&init_mm.page_table_lock);
|
||||
pte_clear(&init_mm, params->aligned_start, params->pte);
|
||||
create_physical_mapping(__pa(params->aligned_start), __pa(params->start), -1);
|
||||
create_physical_mapping(__pa(params->end), __pa(params->aligned_end), -1);
|
||||
create_physical_mapping(__pa(params->aligned_start),
|
||||
__pa(params->start), -1, PAGE_KERNEL);
|
||||
create_physical_mapping(__pa(params->end), __pa(params->aligned_end),
|
||||
-1, PAGE_KERNEL);
|
||||
spin_lock(&init_mm.page_table_lock);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -871,14 +873,16 @@ static void __meminit remove_pagetable(unsigned long start, unsigned long end)
|
|||
radix__flush_tlb_kernel_range(start, end);
|
||||
}
|
||||
|
||||
int __meminit radix__create_section_mapping(unsigned long start, unsigned long end, int nid)
|
||||
int __meminit radix__create_section_mapping(unsigned long start,
|
||||
unsigned long end, int nid,
|
||||
pgprot_t prot)
|
||||
{
|
||||
if (end >= RADIX_VMALLOC_START) {
|
||||
pr_warn("Outside the supported range\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return create_physical_mapping(__pa(start), __pa(end), nid);
|
||||
return create_physical_mapping(__pa(start), __pa(end), nid, prot);
|
||||
}
|
||||
|
||||
int __meminit radix__remove_section_mapping(unsigned long start, unsigned long end)
|
||||
|
|
|
|||
|
|
@ -90,7 +90,8 @@ int memory_add_physaddr_to_nid(u64 start)
|
|||
}
|
||||
#endif
|
||||
|
||||
int __weak create_section_mapping(unsigned long start, unsigned long end, int nid)
|
||||
int __weak create_section_mapping(unsigned long start, unsigned long end,
|
||||
int nid, pgprot_t prot)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
@ -122,7 +123,7 @@ static void flush_dcache_range_chunked(unsigned long start, unsigned long stop,
|
|||
}
|
||||
|
||||
int __ref arch_add_memory(int nid, u64 start, u64 size,
|
||||
struct mhp_restrictions *restrictions)
|
||||
struct mhp_params *params)
|
||||
{
|
||||
unsigned long start_pfn = start >> PAGE_SHIFT;
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
|
|
@ -131,14 +132,15 @@ int __ref arch_add_memory(int nid, u64 start, u64 size,
|
|||
resize_hpt_for_hotplug(memblock_phys_mem_size());
|
||||
|
||||
start = (unsigned long)__va(start);
|
||||
rc = create_section_mapping(start, start + size, nid);
|
||||
rc = create_section_mapping(start, start + size, nid,
|
||||
params->pgprot);
|
||||
if (rc) {
|
||||
pr_warn("Unable to create mapping for hot added memory 0x%llx..0x%llx: %d\n",
|
||||
start, start + size, rc);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
return __add_pages(nid, start_pfn, nr_pages, restrictions);
|
||||
return __add_pages(nid, start_pfn, nr_pages, params);
|
||||
}
|
||||
|
||||
void __ref arch_remove_memory(int nid, u64 start, u64 size,
|
||||
|
|
|
|||
|
|
@ -137,8 +137,7 @@ extern phys_addr_t __phys_addr_symbol(unsigned long x);
|
|||
|
||||
#define virt_addr_valid(vaddr) (pfn_valid(virt_to_pfn(vaddr)))
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_NON_EXEC
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
|
|
|
|||
|
|
@ -181,8 +181,7 @@ int arch_make_page_accessible(struct page *page);
|
|||
|
||||
#define virt_addr_valid(kaddr) pfn_valid(virt_to_pfn(kaddr))
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_NON_EXEC
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
|
|
|
|||
|
|
@ -325,7 +325,6 @@ typedef void qdio_handler_t(struct ccw_device *, unsigned int, int,
|
|||
|
||||
/**
|
||||
* struct qdio_initialize - qdio initialization data
|
||||
* @cdev: associated ccw device
|
||||
* @q_format: queue format
|
||||
* @qdr_ac: feature flags to set
|
||||
* @adapter_name: name for the adapter
|
||||
|
|
@ -341,12 +340,11 @@ typedef void qdio_handler_t(struct ccw_device *, unsigned int, int,
|
|||
* @irq_poll: Data IRQ polling handler (NULL when not supported)
|
||||
* @scan_threshold: # of in-use buffers that triggers scan on output queue
|
||||
* @int_parm: interruption parameter
|
||||
* @input_sbal_addr_array: address of no_input_qs * 128 pointers
|
||||
* @output_sbal_addr_array: address of no_output_qs * 128 pointers
|
||||
* @input_sbal_addr_array: per-queue array, each element points to 128 SBALs
|
||||
* @output_sbal_addr_array: per-queue array, each element points to 128 SBALs
|
||||
* @output_sbal_state_array: no_output_qs * 128 state info (for CQ or NULL)
|
||||
*/
|
||||
struct qdio_initialize {
|
||||
struct ccw_device *cdev;
|
||||
unsigned char q_format;
|
||||
unsigned char qdr_ac;
|
||||
unsigned char adapter_name[8];
|
||||
|
|
@ -362,8 +360,8 @@ struct qdio_initialize {
|
|||
void (*irq_poll)(struct ccw_device *cdev, unsigned long data);
|
||||
unsigned int scan_threshold;
|
||||
unsigned long int_parm;
|
||||
struct qdio_buffer **input_sbal_addr_array;
|
||||
struct qdio_buffer **output_sbal_addr_array;
|
||||
struct qdio_buffer ***input_sbal_addr_array;
|
||||
struct qdio_buffer ***output_sbal_addr_array;
|
||||
struct qdio_outbuf_state *output_sbal_state_array;
|
||||
};
|
||||
|
||||
|
|
@ -408,8 +406,10 @@ int qdio_alloc_buffers(struct qdio_buffer **buf, unsigned int count);
|
|||
void qdio_free_buffers(struct qdio_buffer **buf, unsigned int count);
|
||||
void qdio_reset_buffers(struct qdio_buffer **buf, unsigned int count);
|
||||
|
||||
extern int qdio_allocate(struct qdio_initialize *);
|
||||
extern int qdio_establish(struct qdio_initialize *);
|
||||
extern int qdio_allocate(struct ccw_device *cdev, unsigned int no_input_qs,
|
||||
unsigned int no_output_qs);
|
||||
extern int qdio_establish(struct ccw_device *cdev,
|
||||
struct qdio_initialize *init_data);
|
||||
extern int qdio_activate(struct ccw_device *);
|
||||
extern void qdio_release_aob(struct qaob *);
|
||||
extern int do_QDIO(struct ccw_device *, unsigned int, int, unsigned int,
|
||||
|
|
|
|||
|
|
@ -580,7 +580,7 @@ void do_dat_exception(struct pt_regs *regs)
|
|||
int access;
|
||||
vm_fault_t fault;
|
||||
|
||||
access = VM_READ | VM_EXEC | VM_WRITE;
|
||||
access = VM_ACCESS_FLAGS;
|
||||
fault = do_exception(regs, access);
|
||||
if (unlikely(fault))
|
||||
do_fault_error(regs, access, fault);
|
||||
|
|
@ -852,9 +852,7 @@ void do_secure_storage_access(struct pt_regs *regs)
|
|||
BUG();
|
||||
break;
|
||||
case VDSO_FAULT:
|
||||
/* fallthrough */
|
||||
case GMAP_FAULT:
|
||||
/* fallthrough */
|
||||
default:
|
||||
do_fault_error(regs, VM_READ | VM_WRITE, VM_FAULT_BADMAP);
|
||||
WARN_ON_ONCE(1);
|
||||
|
|
|
|||
|
|
@ -268,20 +268,23 @@ device_initcall(s390_cma_mem_init);
|
|||
#endif /* CONFIG_CMA */
|
||||
|
||||
int arch_add_memory(int nid, u64 start, u64 size,
|
||||
struct mhp_restrictions *restrictions)
|
||||
struct mhp_params *params)
|
||||
{
|
||||
unsigned long start_pfn = PFN_DOWN(start);
|
||||
unsigned long size_pages = PFN_DOWN(size);
|
||||
int rc;
|
||||
|
||||
if (WARN_ON_ONCE(restrictions->altmap))
|
||||
if (WARN_ON_ONCE(params->altmap))
|
||||
return -EINVAL;
|
||||
|
||||
if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot))
|
||||
return -EINVAL;
|
||||
|
||||
rc = vmem_add_mapping(start, size);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
rc = __add_pages(nid, start_pfn, size_pages, restrictions);
|
||||
rc = __add_pages(nid, start_pfn, size_pages, params);
|
||||
if (rc)
|
||||
vmem_remove_mapping(start, size);
|
||||
return rc;
|
||||
|
|
|
|||
|
|
@ -182,9 +182,6 @@ typedef struct page *pgtable_t;
|
|||
#endif
|
||||
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -406,14 +406,17 @@ void __init mem_init(void)
|
|||
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
int arch_add_memory(int nid, u64 start, u64 size,
|
||||
struct mhp_restrictions *restrictions)
|
||||
struct mhp_params *params)
|
||||
{
|
||||
unsigned long start_pfn = PFN_DOWN(start);
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
int ret;
|
||||
|
||||
if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot)
|
||||
return -EINVAL;
|
||||
|
||||
/* We only have ZONE_NORMAL, so this is easy.. */
|
||||
ret = __add_pages(nid, start_pfn, nr_pages, restrictions);
|
||||
ret = __add_pages(nid, start_pfn, nr_pages, params);
|
||||
if (unlikely(ret))
|
||||
printk("%s: Failed, __add_pages() == %d\n", __func__, ret);
|
||||
|
||||
|
|
|
|||
|
|
@ -133,9 +133,6 @@ extern unsigned long pfn_base;
|
|||
#define pfn_valid(pfn) (((pfn) >= (pfn_base)) && (((pfn)-(pfn_base)) < max_mapnr))
|
||||
#define virt_addr_valid(kaddr) ((((unsigned long)(kaddr)-PAGE_OFFSET)>>PAGE_SHIFT) < max_mapnr)
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#include <asm-generic/memory_model.h>
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -158,9 +158,6 @@ extern unsigned long PAGE_OFFSET;
|
|||
|
||||
#endif /* !(__ASSEMBLY__) */
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
#endif /* _SPARC64_PAGE_H */
|
||||
|
|
|
|||
|
|
@ -223,11 +223,6 @@ static inline int pte_young(pte_t pte)
|
|||
return pte_val(pte) & SRMMU_REF;
|
||||
}
|
||||
|
||||
static inline int pte_special(pte_t pte)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline pte_t pte_wrprotect(pte_t pte)
|
||||
{
|
||||
return __pte(pte_val(pte) & ~SRMMU_WRITE);
|
||||
|
|
@ -258,8 +253,6 @@ static inline pte_t pte_mkyoung(pte_t pte)
|
|||
return __pte(pte_val(pte) | SRMMU_REF);
|
||||
}
|
||||
|
||||
#define pte_mkspecial(pte) (pte)
|
||||
|
||||
#define pfn_pte(pfn, prot) mk_pte(pfn_to_page(pfn), prot)
|
||||
|
||||
static inline unsigned long pte_pfn(pte_t pte)
|
||||
|
|
|
|||
|
|
@ -907,11 +907,11 @@ static inline unsigned long pud_pfn(pud_t pud)
|
|||
(((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1)))
|
||||
|
||||
/* Find an entry in the third-level page table.. */
|
||||
#define pte_index(dir, address) \
|
||||
((pte_t *) __pmd_page(*(dir)) + \
|
||||
((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)))
|
||||
#define pte_offset_kernel pte_index
|
||||
#define pte_offset_map pte_index
|
||||
#define pte_index(address) \
|
||||
((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
|
||||
#define pte_offset_kernel(dir, address) \
|
||||
((pte_t *) __pmd_page(*(dir)) + pte_index(address))
|
||||
#define pte_offset_map(dir, address) pte_offset_kernel((dir), (address))
|
||||
#define pte_unmap(pte) do { } while (0)
|
||||
|
||||
/* We cannot include <linux/mm_types.h> at this point yet: */
|
||||
|
|
|
|||
|
|
@ -167,11 +167,6 @@ static inline int pte_newprot(pte_t pte)
|
|||
return(pte_present(pte) && (pte_get_bits(pte, _PAGE_NEWPROT)));
|
||||
}
|
||||
|
||||
static inline int pte_special(pte_t pte)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* =================================
|
||||
* Flags setting section.
|
||||
|
|
@ -247,11 +242,6 @@ static inline pte_t pte_mknewpage(pte_t pte)
|
|||
return(pte);
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte)
|
||||
{
|
||||
return(pte);
|
||||
}
|
||||
|
||||
static inline void set_pte(pte_t *pteptr, pte_t pteval)
|
||||
{
|
||||
pte_copy(*pteptr, pteval);
|
||||
|
|
|
|||
|
|
@ -69,9 +69,6 @@ extern int pfn_valid(unsigned long);
|
|||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS \
|
||||
(VM_READ | VM_WRITE | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -177,7 +177,6 @@ extern struct page *empty_zero_page;
|
|||
#define pte_dirty(pte) (pte_val(pte) & PTE_DIRTY)
|
||||
#define pte_young(pte) (pte_val(pte) & PTE_YOUNG)
|
||||
#define pte_exec(pte) (pte_val(pte) & PTE_EXEC)
|
||||
#define pte_special(pte) (0)
|
||||
|
||||
#define PTE_BIT_FUNC(fn, op) \
|
||||
static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; }
|
||||
|
|
@ -189,8 +188,6 @@ PTE_BIT_FUNC(mkdirty, |= PTE_DIRTY);
|
|||
PTE_BIT_FUNC(mkold, &= ~PTE_YOUNG);
|
||||
PTE_BIT_FUNC(mkyoung, |= PTE_YOUNG);
|
||||
|
||||
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
|
||||
|
||||
/*
|
||||
* Mark the prot value as uncacheable.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
|||
*/
|
||||
static inline bool access_error(unsigned int fsr, struct vm_area_struct *vma)
|
||||
{
|
||||
unsigned int mask = VM_READ | VM_WRITE | VM_EXEC;
|
||||
unsigned int mask = VM_ACCESS_FLAGS;
|
||||
|
||||
if (!(fsr ^ 0x12)) /* write? */
|
||||
mask = VM_WRITE;
|
||||
|
|
|
|||
|
|
@ -35,9 +35,7 @@
|
|||
|
||||
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS \
|
||||
(((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
|
||||
VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC
|
||||
|
||||
#define __PHYSICAL_START ALIGN(CONFIG_PHYSICAL_START, \
|
||||
CONFIG_PHYSICAL_ALIGN)
|
||||
|
|
@ -73,9 +71,6 @@ static inline phys_addr_t get_max_mapped(void)
|
|||
|
||||
bool pfn_range_is_mapped(unsigned long start_pfn, unsigned long end_pfn);
|
||||
|
||||
extern unsigned long init_memory_mapping(unsigned long start,
|
||||
unsigned long end);
|
||||
|
||||
extern void initmem_init(void);
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
|
|
|||
|
|
@ -860,7 +860,10 @@ static inline unsigned long pmd_index(unsigned long address)
|
|||
*
|
||||
* this function returns the index of the entry in the pte page which would
|
||||
* control the given virtual address
|
||||
*
|
||||
* Also define macro so we can test if pte_index is defined for arch.
|
||||
*/
|
||||
#define pte_index pte_index
|
||||
static inline unsigned long pte_index(unsigned long address)
|
||||
{
|
||||
return (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
|
||||
|
|
@ -1078,6 +1081,9 @@ static inline void __meminit init_trampoline_default(void)
|
|||
|
||||
void __init poking_init(void);
|
||||
|
||||
unsigned long init_memory_mapping(unsigned long start,
|
||||
unsigned long end, pgprot_t prot);
|
||||
|
||||
# ifdef CONFIG_RANDOMIZE_MEMORY
|
||||
void __meminit init_trampoline(void);
|
||||
# else
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
* The caller is required to take care of these.
|
||||
*/
|
||||
|
||||
int __set_memory_prot(unsigned long addr, int numpages, pgprot_t prot);
|
||||
int _set_memory_uc(unsigned long addr, int numpages);
|
||||
int _set_memory_wc(unsigned long addr, int numpages);
|
||||
int _set_memory_wt(unsigned long addr, int numpages);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ EXPORT_SYMBOL(acpi_disabled);
|
|||
#define PREFIX "ACPI: "
|
||||
|
||||
int acpi_noirq; /* skip ACPI IRQ initialization */
|
||||
int acpi_nobgrt; /* skip ACPI BGRT */
|
||||
static int acpi_nobgrt; /* skip ACPI BGRT */
|
||||
int acpi_pci_disabled; /* skip ACPI PCI scan and IRQ initialization */
|
||||
EXPORT_SYMBOL(acpi_pci_disabled);
|
||||
|
||||
|
|
|
|||
|
|
@ -744,7 +744,8 @@ int __init gart_iommu_init(void)
|
|||
|
||||
start_pfn = PFN_DOWN(aper_base);
|
||||
if (!pfn_range_is_mapped(start_pfn, end_pfn))
|
||||
init_memory_mapping(start_pfn<<PAGE_SHIFT, end_pfn<<PAGE_SHIFT);
|
||||
init_memory_mapping(start_pfn<<PAGE_SHIFT, end_pfn<<PAGE_SHIFT,
|
||||
PAGE_KERNEL);
|
||||
|
||||
pr_info("PCI-DMA: using GART IOMMU.\n");
|
||||
iommu_size = check_iommu_size(info.aper_base, aper_size);
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
#include <linux/pci.h>
|
||||
#include <linux/root_dev.h>
|
||||
#include <linux/sfi.h>
|
||||
#include <linux/hugetlb.h>
|
||||
#include <linux/tboot.h>
|
||||
#include <linux/usb/xhci-dbgp.h>
|
||||
|
||||
|
|
@ -1157,6 +1158,9 @@ void __init setup_arch(char **cmdline_p)
|
|||
initmem_init();
|
||||
dma_contiguous_reserve(max_pfn_mapped << PAGE_SHIFT);
|
||||
|
||||
if (boot_cpu_has(X86_FEATURE_GBPAGES))
|
||||
hugetlb_cma_reserve(PUD_SHIFT - PAGE_SHIFT);
|
||||
|
||||
/*
|
||||
* Reserve memory for crash kernel after SRAT is parsed so that it
|
||||
* won't consume hotpluggable memory.
|
||||
|
|
|
|||
|
|
@ -467,7 +467,7 @@ bool pfn_range_is_mapped(unsigned long start_pfn, unsigned long end_pfn)
|
|||
* the physical memory. To access them they are temporarily mapped.
|
||||
*/
|
||||
unsigned long __ref init_memory_mapping(unsigned long start,
|
||||
unsigned long end)
|
||||
unsigned long end, pgprot_t prot)
|
||||
{
|
||||
struct map_range mr[NR_RANGE_MR];
|
||||
unsigned long ret = 0;
|
||||
|
|
@ -481,7 +481,8 @@ unsigned long __ref init_memory_mapping(unsigned long start,
|
|||
|
||||
for (i = 0; i < nr_range; i++)
|
||||
ret = kernel_physical_mapping_init(mr[i].start, mr[i].end,
|
||||
mr[i].page_size_mask);
|
||||
mr[i].page_size_mask,
|
||||
prot);
|
||||
|
||||
add_pfn_range_mapped(start >> PAGE_SHIFT, ret >> PAGE_SHIFT);
|
||||
|
||||
|
|
@ -521,7 +522,7 @@ static unsigned long __init init_range_memory_mapping(
|
|||
*/
|
||||
can_use_brk_pgt = max(start, (u64)pgt_buf_end<<PAGE_SHIFT) >=
|
||||
min(end, (u64)pgt_buf_top<<PAGE_SHIFT);
|
||||
init_memory_mapping(start, end);
|
||||
init_memory_mapping(start, end, PAGE_KERNEL);
|
||||
mapped_ram_size += end - start;
|
||||
can_use_brk_pgt = true;
|
||||
}
|
||||
|
|
@ -661,7 +662,7 @@ void __init init_mem_mapping(void)
|
|||
#endif
|
||||
|
||||
/* the ISA range is always mapped regardless of memory holes */
|
||||
init_memory_mapping(0, ISA_END_ADDRESS);
|
||||
init_memory_mapping(0, ISA_END_ADDRESS, PAGE_KERNEL);
|
||||
|
||||
/* Init the trampoline, possibly with KASLR memory offset */
|
||||
init_trampoline();
|
||||
|
|
|
|||
|
|
@ -257,7 +257,8 @@ static inline int __is_kernel_text(unsigned long addr)
|
|||
unsigned long __init
|
||||
kernel_physical_mapping_init(unsigned long start,
|
||||
unsigned long end,
|
||||
unsigned long page_size_mask)
|
||||
unsigned long page_size_mask,
|
||||
pgprot_t prot)
|
||||
{
|
||||
int use_pse = page_size_mask == (1<<PG_LEVEL_2M);
|
||||
unsigned long last_map_addr = end;
|
||||
|
|
@ -819,12 +820,24 @@ void __init mem_init(void)
|
|||
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
int arch_add_memory(int nid, u64 start, u64 size,
|
||||
struct mhp_restrictions *restrictions)
|
||||
struct mhp_params *params)
|
||||
{
|
||||
unsigned long start_pfn = start >> PAGE_SHIFT;
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
int ret;
|
||||
|
||||
return __add_pages(nid, start_pfn, nr_pages, restrictions);
|
||||
/*
|
||||
* The page tables were already mapped at boot so if the caller
|
||||
* requests a different mapping type then we must change all the
|
||||
* pages with __set_memory_prot().
|
||||
*/
|
||||
if (params->pgprot.pgprot != PAGE_KERNEL.pgprot) {
|
||||
ret = __set_memory_prot(start, nr_pages, params->pgprot);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return __add_pages(nid, start_pfn, nr_pages, params);
|
||||
}
|
||||
|
||||
void arch_remove_memory(int nid, u64 start, u64 size,
|
||||
|
|
|
|||
|
|
@ -585,7 +585,7 @@ phys_pmd_init(pmd_t *pmd_page, unsigned long paddr, unsigned long paddr_end,
|
|||
*/
|
||||
static unsigned long __meminit
|
||||
phys_pud_init(pud_t *pud_page, unsigned long paddr, unsigned long paddr_end,
|
||||
unsigned long page_size_mask, bool init)
|
||||
unsigned long page_size_mask, pgprot_t _prot, bool init)
|
||||
{
|
||||
unsigned long pages = 0, paddr_next;
|
||||
unsigned long paddr_last = paddr_end;
|
||||
|
|
@ -595,7 +595,7 @@ phys_pud_init(pud_t *pud_page, unsigned long paddr, unsigned long paddr_end,
|
|||
for (; i < PTRS_PER_PUD; i++, paddr = paddr_next) {
|
||||
pud_t *pud;
|
||||
pmd_t *pmd;
|
||||
pgprot_t prot = PAGE_KERNEL;
|
||||
pgprot_t prot = _prot;
|
||||
|
||||
vaddr = (unsigned long)__va(paddr);
|
||||
pud = pud_page + pud_index(vaddr);
|
||||
|
|
@ -644,9 +644,12 @@ phys_pud_init(pud_t *pud_page, unsigned long paddr, unsigned long paddr_end,
|
|||
if (page_size_mask & (1<<PG_LEVEL_1G)) {
|
||||
pages++;
|
||||
spin_lock(&init_mm.page_table_lock);
|
||||
|
||||
prot = __pgprot(pgprot_val(prot) | __PAGE_KERNEL_LARGE);
|
||||
|
||||
set_pte_init((pte_t *)pud,
|
||||
pfn_pte((paddr & PUD_MASK) >> PAGE_SHIFT,
|
||||
PAGE_KERNEL_LARGE),
|
||||
prot),
|
||||
init);
|
||||
spin_unlock(&init_mm.page_table_lock);
|
||||
paddr_last = paddr_next;
|
||||
|
|
@ -669,7 +672,7 @@ phys_pud_init(pud_t *pud_page, unsigned long paddr, unsigned long paddr_end,
|
|||
|
||||
static unsigned long __meminit
|
||||
phys_p4d_init(p4d_t *p4d_page, unsigned long paddr, unsigned long paddr_end,
|
||||
unsigned long page_size_mask, bool init)
|
||||
unsigned long page_size_mask, pgprot_t prot, bool init)
|
||||
{
|
||||
unsigned long vaddr, vaddr_end, vaddr_next, paddr_next, paddr_last;
|
||||
|
||||
|
|
@ -679,7 +682,7 @@ phys_p4d_init(p4d_t *p4d_page, unsigned long paddr, unsigned long paddr_end,
|
|||
|
||||
if (!pgtable_l5_enabled())
|
||||
return phys_pud_init((pud_t *) p4d_page, paddr, paddr_end,
|
||||
page_size_mask, init);
|
||||
page_size_mask, prot, init);
|
||||
|
||||
for (; vaddr < vaddr_end; vaddr = vaddr_next) {
|
||||
p4d_t *p4d = p4d_page + p4d_index(vaddr);
|
||||
|
|
@ -702,13 +705,13 @@ phys_p4d_init(p4d_t *p4d_page, unsigned long paddr, unsigned long paddr_end,
|
|||
if (!p4d_none(*p4d)) {
|
||||
pud = pud_offset(p4d, 0);
|
||||
paddr_last = phys_pud_init(pud, paddr, __pa(vaddr_end),
|
||||
page_size_mask, init);
|
||||
page_size_mask, prot, init);
|
||||
continue;
|
||||
}
|
||||
|
||||
pud = alloc_low_page();
|
||||
paddr_last = phys_pud_init(pud, paddr, __pa(vaddr_end),
|
||||
page_size_mask, init);
|
||||
page_size_mask, prot, init);
|
||||
|
||||
spin_lock(&init_mm.page_table_lock);
|
||||
p4d_populate_init(&init_mm, p4d, pud, init);
|
||||
|
|
@ -722,7 +725,7 @@ static unsigned long __meminit
|
|||
__kernel_physical_mapping_init(unsigned long paddr_start,
|
||||
unsigned long paddr_end,
|
||||
unsigned long page_size_mask,
|
||||
bool init)
|
||||
pgprot_t prot, bool init)
|
||||
{
|
||||
bool pgd_changed = false;
|
||||
unsigned long vaddr, vaddr_start, vaddr_end, vaddr_next, paddr_last;
|
||||
|
|
@ -743,13 +746,13 @@ __kernel_physical_mapping_init(unsigned long paddr_start,
|
|||
paddr_last = phys_p4d_init(p4d, __pa(vaddr),
|
||||
__pa(vaddr_end),
|
||||
page_size_mask,
|
||||
init);
|
||||
prot, init);
|
||||
continue;
|
||||
}
|
||||
|
||||
p4d = alloc_low_page();
|
||||
paddr_last = phys_p4d_init(p4d, __pa(vaddr), __pa(vaddr_end),
|
||||
page_size_mask, init);
|
||||
page_size_mask, prot, init);
|
||||
|
||||
spin_lock(&init_mm.page_table_lock);
|
||||
if (pgtable_l5_enabled())
|
||||
|
|
@ -778,10 +781,10 @@ __kernel_physical_mapping_init(unsigned long paddr_start,
|
|||
unsigned long __meminit
|
||||
kernel_physical_mapping_init(unsigned long paddr_start,
|
||||
unsigned long paddr_end,
|
||||
unsigned long page_size_mask)
|
||||
unsigned long page_size_mask, pgprot_t prot)
|
||||
{
|
||||
return __kernel_physical_mapping_init(paddr_start, paddr_end,
|
||||
page_size_mask, true);
|
||||
page_size_mask, prot, true);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -796,7 +799,8 @@ kernel_physical_mapping_change(unsigned long paddr_start,
|
|||
unsigned long page_size_mask)
|
||||
{
|
||||
return __kernel_physical_mapping_init(paddr_start, paddr_end,
|
||||
page_size_mask, false);
|
||||
page_size_mask, PAGE_KERNEL,
|
||||
false);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_NUMA
|
||||
|
|
@ -843,11 +847,11 @@ static void update_end_of_memory_vars(u64 start, u64 size)
|
|||
}
|
||||
|
||||
int add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,
|
||||
struct mhp_restrictions *restrictions)
|
||||
struct mhp_params *params)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = __add_pages(nid, start_pfn, nr_pages, restrictions);
|
||||
ret = __add_pages(nid, start_pfn, nr_pages, params);
|
||||
WARN_ON_ONCE(ret);
|
||||
|
||||
/* update max_pfn, max_low_pfn and high_memory */
|
||||
|
|
@ -858,14 +862,14 @@ int add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,
|
|||
}
|
||||
|
||||
int arch_add_memory(int nid, u64 start, u64 size,
|
||||
struct mhp_restrictions *restrictions)
|
||||
struct mhp_params *params)
|
||||
{
|
||||
unsigned long start_pfn = start >> PAGE_SHIFT;
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
|
||||
init_memory_mapping(start, start + size);
|
||||
init_memory_mapping(start, start + size, params->pgprot);
|
||||
|
||||
return add_pages(nid, start_pfn, nr_pages, restrictions);
|
||||
return add_pages(nid, start_pfn, nr_pages, params);
|
||||
}
|
||||
|
||||
#define PAGE_INUSE 0xFD
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ void early_ioremap_page_table_range_init(void);
|
|||
|
||||
unsigned long kernel_physical_mapping_init(unsigned long start,
|
||||
unsigned long end,
|
||||
unsigned long page_size_mask);
|
||||
unsigned long page_size_mask,
|
||||
pgprot_t prot);
|
||||
unsigned long kernel_physical_mapping_change(unsigned long start,
|
||||
unsigned long end,
|
||||
unsigned long page_size_mask);
|
||||
|
|
|
|||
|
|
@ -1795,6 +1795,19 @@ static inline int cpa_clear_pages_array(struct page **pages, int numpages,
|
|||
CPA_PAGES_ARRAY, pages);
|
||||
}
|
||||
|
||||
/*
|
||||
* _set_memory_prot is an internal helper for callers that have been passed
|
||||
* a pgprot_t value from upper layers and a reservation has already been taken.
|
||||
* If you want to set the pgprot to a specific page protocol, use the
|
||||
* set_memory_xx() functions.
|
||||
*/
|
||||
int __set_memory_prot(unsigned long addr, int numpages, pgprot_t prot)
|
||||
{
|
||||
return change_page_attr_set_clr(&addr, numpages, prot,
|
||||
__pgprot(~pgprot_val(prot)), 0, 0,
|
||||
NULL);
|
||||
}
|
||||
|
||||
int _set_memory_uc(unsigned long addr, int numpages)
|
||||
{
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ int __execute_only_pkey(struct mm_struct *mm)
|
|||
static inline bool vma_is_pkey_exec_only(struct vm_area_struct *vma)
|
||||
{
|
||||
/* Do this check first since the vm_flags should be hot */
|
||||
if ((vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC)) != VM_EXEC)
|
||||
if ((vma->vm_flags & VM_ACCESS_FLAGS) != VM_EXEC)
|
||||
return false;
|
||||
if (vma_pkey(vma) != vma->vm_mm->context.execute_only_pkey)
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -352,7 +352,8 @@ void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size,
|
|||
if (type == EFI_MEMORY_MAPPED_IO)
|
||||
return ioremap(phys_addr, size);
|
||||
|
||||
last_map_pfn = init_memory_mapping(phys_addr, phys_addr + size);
|
||||
last_map_pfn = init_memory_mapping(phys_addr, phys_addr + size,
|
||||
PAGE_KERNEL);
|
||||
if ((last_map_pfn << PAGE_SHIFT) < phys_addr + size) {
|
||||
unsigned long top = last_map_pfn << PAGE_SHIFT;
|
||||
efi_ioremap(top, size - (top - phys_addr), type, attribute);
|
||||
|
|
|
|||
|
|
@ -9,17 +9,11 @@
|
|||
|
||||
#ifdef CONFIG_X86_32
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS \
|
||||
(VM_READ | VM_WRITE | \
|
||||
((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC
|
||||
|
||||
#else
|
||||
|
||||
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
||||
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_STACK_DEFAULT_FLAGS (VM_GROWSDOWN | VM_READ | VM_WRITE | \
|
||||
VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
||||
#define VM_STACK_DEFAULT_FLAGS (VM_GROWSDOWN | VM_DATA_FLAGS_EXEC)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -985,7 +985,7 @@ void xen_enable_syscall(void)
|
|||
#endif /* CONFIG_X86_64 */
|
||||
}
|
||||
|
||||
void __init xen_pvmmu_arch_setup(void)
|
||||
static void __init xen_pvmmu_arch_setup(void)
|
||||
{
|
||||
HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_4gb_segments);
|
||||
HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_writable_pagetables);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ SYM_CODE_START(startup_xen)
|
|||
#ifdef CONFIG_X86_64
|
||||
mov initial_stack(%rip), %rsp
|
||||
#else
|
||||
mov pa(initial_stack), %esp
|
||||
mov initial_stack, %esp
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ config XTENSA_VARIANT_CUSTOM_NAME
|
|||
help
|
||||
Provide the name of a custom Xtensa processor variant.
|
||||
This CORENAME selects arch/xtensa/variant/CORENAME.
|
||||
Dont forget you have to select MMU if you have one.
|
||||
Don't forget you have to select MMU if you have one.
|
||||
|
||||
config XTENSA_VARIANT_NAME
|
||||
string
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user