Merge 5.4-rc1-prelrease into android-mainline
To make the 5.4-rc1 merge easier, merge at a prerelease point in time before the final release happens. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: If613d657fd0abf9910c5bf3435a745f01b89765e
This commit is contained in:
commit
94139142d9
26
Documentation/ABI/testing/sysfs-class-backlight
Normal file
26
Documentation/ABI/testing/sysfs-class-backlight
Normal file
@ -0,0 +1,26 @@
|
||||
What: /sys/class/backlight/<backlight>/scale
|
||||
Date: July 2019
|
||||
KernelVersion: 5.4
|
||||
Contact: Daniel Thompson <daniel.thompson@linaro.org>
|
||||
Description:
|
||||
Description of the scale of the brightness curve.
|
||||
|
||||
The human eye senses brightness approximately logarithmically,
|
||||
hence linear changes in brightness are perceived as being
|
||||
non-linear. To achieve a linear perception of brightness changes
|
||||
controls like sliders need to apply a logarithmic mapping for
|
||||
backlights with a linear brightness curve.
|
||||
|
||||
Possible values of the attribute are:
|
||||
|
||||
unknown
|
||||
The scale of the brightness curve is unknown.
|
||||
|
||||
linear
|
||||
The brightness changes linearly with each step. Brightness
|
||||
controls should apply a logarithmic mapping for a linear
|
||||
perception.
|
||||
|
||||
non-linear
|
||||
The brightness changes non-linearly with each step. Brightness
|
||||
controls should use a linear mapping for a linear perception.
|
@ -429,10 +429,15 @@ KernelVersion: 2.6.22
|
||||
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
|
||||
Christoph Lameter <cl@linux-foundation.org>
|
||||
Description:
|
||||
The shrink file is written when memory should be reclaimed from
|
||||
a cache. Empty partial slabs are freed and the partial list is
|
||||
sorted so the slabs with the fewest available objects are used
|
||||
first.
|
||||
The shrink file is used to reclaim unused slab cache
|
||||
memory from a cache. Empty per-cpu or partial slabs
|
||||
are freed and the partial list is sorted so the slabs
|
||||
with the fewest available objects are used first.
|
||||
It only accepts a value of "1" on write for shrinking
|
||||
the cache. Other input values are considered invalid.
|
||||
Shrinking slab caches might be expensive and can
|
||||
adversely impact other running applications. So it
|
||||
should be used with care.
|
||||
|
||||
What: /sys/kernel/slab/cache/slab_size
|
||||
Date: May 2007
|
||||
|
@ -85,8 +85,10 @@ Brief summary of control files.
|
||||
memory.oom_control set/show oom controls.
|
||||
memory.numa_stat show the number of memory usage per numa
|
||||
node
|
||||
|
||||
memory.kmem.limit_in_bytes set/show hard limit for kernel memory
|
||||
This knob is deprecated and shouldn't be
|
||||
used. It is planned that this be removed in
|
||||
the foreseeable future.
|
||||
memory.kmem.usage_in_bytes show current kernel memory allocation
|
||||
memory.kmem.failcnt show the number of kernel memory usage
|
||||
hits limits
|
||||
|
@ -809,6 +809,8 @@
|
||||
enables the feature at boot time. By default, it is
|
||||
disabled and the system will work mostly the same as a
|
||||
kernel built without CONFIG_DEBUG_PAGEALLOC.
|
||||
Note: to get most of debug_pagealloc error reports, it's
|
||||
useful to also enable the page_owner functionality.
|
||||
on: enable the feature
|
||||
|
||||
debugpat [X86] Enable PAT debugging
|
||||
@ -3465,12 +3467,13 @@
|
||||
specify the device is described above.
|
||||
If <order of align> is not specified,
|
||||
PAGE_SIZE is used as alignment.
|
||||
PCI-PCI bridge can be specified, if resource
|
||||
A PCI-PCI bridge can be specified if resource
|
||||
windows need to be expanded.
|
||||
To specify the alignment for several
|
||||
instances of a device, the PCI vendor,
|
||||
device, subvendor, and subdevice may be
|
||||
specified, e.g., 4096@pci:8086:9c22:103c:198f
|
||||
specified, e.g., 12@pci:8086:9c22:103c:198f
|
||||
for 4096-byte alignment.
|
||||
ecrc= Enable/disable PCIe ECRC (transaction layer
|
||||
end-to-end CRC checking).
|
||||
bios: Use BIOS/firmware settings. This is the
|
||||
|
@ -42,6 +42,9 @@ String Manipulation
|
||||
.. kernel-doc:: lib/string.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: include/linux/string.h
|
||||
:internal:
|
||||
|
||||
.. kernel-doc:: mm/util.c
|
||||
:functions: kstrdup kstrdup_const kstrndup kmemdup kmemdup_nul memdup_user
|
||||
vmemdup_user strndup_user memdup_user_nul
|
||||
|
@ -1,7 +1,9 @@
|
||||
Broadcom BCM2835 I2C controller
|
||||
|
||||
Required properties:
|
||||
- compatible : Should be "brcm,bcm2835-i2c".
|
||||
- compatible : Should be one of:
|
||||
"brcm,bcm2711-i2c"
|
||||
"brcm,bcm2835-i2c"
|
||||
- reg: Should contain register location and length.
|
||||
- interrupts: Should contain interrupt.
|
||||
- clocks : The clock feeding the I2C controller.
|
||||
|
@ -8,11 +8,12 @@ MT6397/MT6323 is a multifunction device with the following sub modules:
|
||||
- Clock
|
||||
- LED
|
||||
- Keys
|
||||
- Power controller
|
||||
|
||||
It is interfaced to host controller using SPI interface by a proprietary hardware
|
||||
called PMIC wrapper or pwrap. MT6397/MT6323 MFD is a child device of pwrap.
|
||||
See the following for pwarp node definitions:
|
||||
Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
|
||||
../soc/mediatek/pwrap.txt
|
||||
|
||||
This document describes the binding for MFD device and its sub module.
|
||||
|
||||
@ -22,14 +23,16 @@ compatible: "mediatek,mt6397" or "mediatek,mt6323"
|
||||
Optional subnodes:
|
||||
|
||||
- rtc
|
||||
Required properties:
|
||||
Required properties: Should be one of follows
|
||||
- compatible: "mediatek,mt6323-rtc"
|
||||
- compatible: "mediatek,mt6397-rtc"
|
||||
For details, see ../rtc/rtc-mt6397.txt
|
||||
- regulators
|
||||
Required properties:
|
||||
- compatible: "mediatek,mt6397-regulator"
|
||||
see Documentation/devicetree/bindings/regulator/mt6397-regulator.txt
|
||||
see ../regulator/mt6397-regulator.txt
|
||||
- compatible: "mediatek,mt6323-regulator"
|
||||
see Documentation/devicetree/bindings/regulator/mt6323-regulator.txt
|
||||
see ../regulator/mt6323-regulator.txt
|
||||
- codec
|
||||
Required properties:
|
||||
- compatible: "mediatek,mt6397-codec"
|
||||
@ -39,12 +42,17 @@ Optional subnodes:
|
||||
- led
|
||||
Required properties:
|
||||
- compatible: "mediatek,mt6323-led"
|
||||
see Documentation/devicetree/bindings/leds/leds-mt6323.txt
|
||||
see ../leds/leds-mt6323.txt
|
||||
|
||||
- keys
|
||||
Required properties:
|
||||
- compatible: "mediatek,mt6397-keys" or "mediatek,mt6323-keys"
|
||||
see Documentation/devicetree/bindings/input/mtk-pmic-keys.txt
|
||||
see ../input/mtk-pmic-keys.txt
|
||||
|
||||
- power-controller
|
||||
Required properties:
|
||||
- compatible: "mediatek,mt6323-pwrc"
|
||||
For details, see ../power/reset/mt6323-poweroff.txt
|
||||
|
||||
Example:
|
||||
pwrap: pwrap@1000f000 {
|
||||
|
@ -14,6 +14,10 @@ Required properties:
|
||||
"ricoh,rc5t619"
|
||||
- reg: the I2C slave address of the device
|
||||
|
||||
Optional properties:
|
||||
- system-power-controller:
|
||||
See Documentation/devicetree/bindings/power/power-controller.txt
|
||||
|
||||
Sub-nodes:
|
||||
- regulators: the node is required if the regulator functionality is
|
||||
needed. The valid regulator names are: DCDC1, DCDC2, DCDC3, DCDC4
|
||||
@ -28,6 +32,7 @@ Example:
|
||||
pmic@32 {
|
||||
compatible = "ricoh,rn5t618";
|
||||
reg = <0x32>;
|
||||
system-power-controller;
|
||||
|
||||
regulators {
|
||||
DCDC1 {
|
||||
|
@ -11,7 +11,6 @@ Required properties:
|
||||
the ATU address space.
|
||||
(The old way of getting the configuration address space from "ranges"
|
||||
is deprecated and should be avoided.)
|
||||
- num-lanes: number of lanes to use
|
||||
RC mode:
|
||||
- #address-cells: set to <3>
|
||||
- #size-cells: set to <2>
|
||||
@ -34,6 +33,11 @@ Optional properties:
|
||||
- clock-names: Must include the following entries:
|
||||
- "pcie"
|
||||
- "pcie_bus"
|
||||
- snps,enable-cdm-check: This is a boolean property and if present enables
|
||||
automatic checking of CDM (Configuration Dependent Module) registers
|
||||
for data corruption. CDM registers include standard PCIe configuration
|
||||
space registers, Port Logic registers, DMA and iATU (internal Address
|
||||
Translation Unit) registers.
|
||||
RC mode:
|
||||
- num-viewport: number of view ports configured in hardware. If a platform
|
||||
does not specify it, the driver assumes 2.
|
||||
|
@ -50,7 +50,7 @@ Additional required properties for imx7d-pcie and imx8mq-pcie:
|
||||
- power-domains: Must be set to a phandle pointing to PCIE_PHY power domain
|
||||
- resets: Must contain phandles to PCIe-related reset lines exposed by SRC
|
||||
IP block
|
||||
- reset-names: Must contain the following entires:
|
||||
- reset-names: Must contain the following entries:
|
||||
- "pciephy"
|
||||
- "apps"
|
||||
- "turnoff"
|
||||
|
@ -6,6 +6,7 @@ Required properties:
|
||||
"mediatek,mt2712-pcie"
|
||||
"mediatek,mt7622-pcie"
|
||||
"mediatek,mt7623-pcie"
|
||||
"mediatek,mt7629-pcie"
|
||||
- device_type: Must be "pci"
|
||||
- reg: Base addresses and lengths of the PCIe subsys and root ports.
|
||||
- reg-names: Names of the above areas to use during resource lookup.
|
||||
|
171
Documentation/devicetree/bindings/pci/nvidia,tegra194-pcie.txt
Normal file
171
Documentation/devicetree/bindings/pci/nvidia,tegra194-pcie.txt
Normal file
@ -0,0 +1,171 @@
|
||||
NVIDIA Tegra PCIe controller (Synopsys DesignWare Core based)
|
||||
|
||||
This PCIe host controller is based on the Synopsis Designware PCIe IP
|
||||
and thus inherits all the common properties defined in designware-pcie.txt.
|
||||
|
||||
Required properties:
|
||||
- compatible: For Tegra19x, must contain "nvidia,tegra194-pcie".
|
||||
- device_type: Must be "pci"
|
||||
- power-domains: A phandle to the node that controls power to the respective
|
||||
PCIe controller and a specifier name for the PCIe controller. Following are
|
||||
the specifiers for the different PCIe controllers
|
||||
TEGRA194_POWER_DOMAIN_PCIEX8B: C0
|
||||
TEGRA194_POWER_DOMAIN_PCIEX1A: C1
|
||||
TEGRA194_POWER_DOMAIN_PCIEX1A: C2
|
||||
TEGRA194_POWER_DOMAIN_PCIEX1A: C3
|
||||
TEGRA194_POWER_DOMAIN_PCIEX4A: C4
|
||||
TEGRA194_POWER_DOMAIN_PCIEX8A: C5
|
||||
these specifiers are defined in
|
||||
"include/dt-bindings/power/tegra194-powergate.h" file.
|
||||
- reg: A list of physical base address and length pairs for each set of
|
||||
controller registers. Must contain an entry for each entry in the reg-names
|
||||
property.
|
||||
- reg-names: Must include the following entries:
|
||||
"appl": Controller's application logic registers
|
||||
"config": As per the definition in designware-pcie.txt
|
||||
"atu_dma": iATU and DMA registers. This is where the iATU (internal Address
|
||||
Translation Unit) registers of the PCIe core are made available
|
||||
for SW access.
|
||||
"dbi": The aperture where root port's own configuration registers are
|
||||
available
|
||||
- interrupts: A list of interrupt outputs of the controller. Must contain an
|
||||
entry for each entry in the interrupt-names property.
|
||||
- interrupt-names: Must include the following entries:
|
||||
"intr": The Tegra interrupt that is asserted for controller interrupts
|
||||
"msi": The Tegra interrupt that is asserted when an MSI is received
|
||||
- bus-range: Range of bus numbers associated with this controller
|
||||
- #address-cells: Address representation for root ports (must be 3)
|
||||
- cell 0 specifies the bus and device numbers of the root port:
|
||||
[23:16]: bus number
|
||||
[15:11]: device number
|
||||
- cell 1 denotes the upper 32 address bits and should be 0
|
||||
- cell 2 contains the lower 32 address bits and is used to translate to the
|
||||
CPU address space
|
||||
- #size-cells: Size representation for root ports (must be 2)
|
||||
- ranges: Describes the translation of addresses for root ports and standard
|
||||
PCI regions. The entries must be 7 cells each, where the first three cells
|
||||
correspond to the address as described for the #address-cells property
|
||||
above, the fourth and fifth cells are for the physical CPU address to
|
||||
translate to and the sixth and seventh cells are as described for the
|
||||
#size-cells property above.
|
||||
- Entries setup the mapping for the standard I/O, memory and
|
||||
prefetchable PCI regions. The first cell determines the type of region
|
||||
that is setup:
|
||||
- 0x81000000: I/O memory region
|
||||
- 0x82000000: non-prefetchable memory region
|
||||
- 0xc2000000: prefetchable memory region
|
||||
Please refer to the standard PCI bus binding document for a more detailed
|
||||
explanation.
|
||||
- #interrupt-cells: Size representation for interrupts (must be 1)
|
||||
- interrupt-map-mask and interrupt-map: Standard PCI IRQ mapping properties
|
||||
Please refer to the standard PCI bus binding document for a more detailed
|
||||
explanation.
|
||||
- clocks: Must contain an entry for each entry in clock-names.
|
||||
See ../clocks/clock-bindings.txt for details.
|
||||
- clock-names: Must include the following entries:
|
||||
- core
|
||||
- resets: Must contain an entry for each entry in reset-names.
|
||||
See ../reset/reset.txt for details.
|
||||
- reset-names: Must include the following entries:
|
||||
- apb
|
||||
- core
|
||||
- phys: Must contain a phandle to P2U PHY for each entry in phy-names.
|
||||
- phy-names: Must include an entry for each active lane.
|
||||
"p2u-N": where N ranges from 0 to one less than the total number of lanes
|
||||
- nvidia,bpmp: Must contain a pair of phandle to BPMP controller node followed
|
||||
by controller-id. Following are the controller ids for each controller.
|
||||
0: C0
|
||||
1: C1
|
||||
2: C2
|
||||
3: C3
|
||||
4: C4
|
||||
5: C5
|
||||
- vddio-pex-ctl-supply: Regulator supply for PCIe side band signals
|
||||
|
||||
Optional properties:
|
||||
- pinctrl-names: A list of pinctrl state names.
|
||||
It is mandatory for C5 controller and optional for other controllers.
|
||||
- "default": Configures PCIe I/O for proper operation.
|
||||
- pinctrl-0: phandle for the 'default' state of pin configuration.
|
||||
It is mandatory for C5 controller and optional for other controllers.
|
||||
- supports-clkreq: Refer to Documentation/devicetree/bindings/pci/pci.txt
|
||||
- nvidia,update-fc-fixup: This is a boolean property and needs to be present to
|
||||
improve performance when a platform is designed in such a way that it
|
||||
satisfies at least one of the following conditions thereby enabling root
|
||||
port to exchange optimum number of FC (Flow Control) credits with
|
||||
downstream devices
|
||||
1. If C0/C4/C5 run at x1/x2 link widths (irrespective of speed and MPS)
|
||||
2. If C0/C1/C2/C3/C4/C5 operate at their respective max link widths and
|
||||
a) speed is Gen-2 and MPS is 256B
|
||||
b) speed is >= Gen-3 with any MPS
|
||||
- nvidia,aspm-cmrt-us: Common Mode Restore Time for proper operation of ASPM
|
||||
to be specified in microseconds
|
||||
- nvidia,aspm-pwr-on-t-us: Power On time for proper operation of ASPM to be
|
||||
specified in microseconds
|
||||
- nvidia,aspm-l0s-entrance-latency-us: ASPM L0s entrance latency to be
|
||||
specified in microseconds
|
||||
- vpcie3v3-supply: A phandle to the regulator node that supplies 3.3V to the slot
|
||||
if the platform has one such slot. (Ex:- x16 slot owned by C5 controller
|
||||
in p2972-0000 platform).
|
||||
- vpcie12v-supply: A phandle to the regulator node that supplies 12V to the slot
|
||||
if the platform has one such slot. (Ex:- x16 slot owned by C5 controller
|
||||
in p2972-0000 platform).
|
||||
|
||||
Examples:
|
||||
=========
|
||||
|
||||
Tegra194:
|
||||
--------
|
||||
|
||||
pcie@14180000 {
|
||||
compatible = "nvidia,tegra194-pcie", "snps,dw-pcie";
|
||||
power-domains = <&bpmp TEGRA194_POWER_DOMAIN_PCIEX8B>;
|
||||
reg = <0x00 0x14180000 0x0 0x00020000 /* appl registers (128K) */
|
||||
0x00 0x38000000 0x0 0x00040000 /* configuration space (256K) */
|
||||
0x00 0x38040000 0x0 0x00040000>; /* iATU_DMA reg space (256K) */
|
||||
reg-names = "appl", "config", "atu_dma";
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
num-lanes = <8>;
|
||||
linux,pci-domain = <0>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pex_rst_c5_out_state>, <&clkreq_c5_bi_dir_state>;
|
||||
|
||||
clocks = <&bpmp TEGRA194_CLK_PEX0_CORE_0>;
|
||||
clock-names = "core";
|
||||
|
||||
resets = <&bpmp TEGRA194_RESET_PEX0_CORE_0_APB>,
|
||||
<&bpmp TEGRA194_RESET_PEX0_CORE_0>;
|
||||
reset-names = "apb", "core";
|
||||
|
||||
interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>, /* controller interrupt */
|
||||
<GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */
|
||||
interrupt-names = "intr", "msi";
|
||||
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
nvidia,bpmp = <&bpmp 0>;
|
||||
|
||||
supports-clkreq;
|
||||
nvidia,aspm-cmrt-us = <60>;
|
||||
nvidia,aspm-pwr-on-t-us = <20>;
|
||||
nvidia,aspm-l0s-entrance-latency-us = <3>;
|
||||
|
||||
bus-range = <0x0 0xff>;
|
||||
ranges = <0x81000000 0x0 0x38100000 0x0 0x38100000 0x0 0x00100000 /* downstream I/O (1MB) */
|
||||
0x82000000 0x0 0x38200000 0x0 0x38200000 0x0 0x01E00000 /* non-prefetchable memory (30MB) */
|
||||
0xc2000000 0x18 0x00000000 0x18 0x00000000 0x4 0x00000000>; /* prefetchable memory (16GB) */
|
||||
|
||||
vddio-pex-ctl-supply = <&vdd_1v8ao>;
|
||||
vpcie3v3-supply = <&vdd_3v3_pcie>;
|
||||
vpcie12v-supply = <&vdd_12v_pcie>;
|
||||
|
||||
phys = <&p2u_hsio_2>, <&p2u_hsio_3>, <&p2u_hsio_4>,
|
||||
<&p2u_hsio_5>;
|
||||
phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3";
|
||||
};
|
@ -11,7 +11,7 @@ Required properties:
|
||||
- reg-names:
|
||||
- "ctrl" for the control register region
|
||||
- "config" for the config space region
|
||||
- interrupts: Interrupt specifier for the PCIe controler
|
||||
- interrupts: Interrupt specifier for the PCIe controller
|
||||
- clocks: reference to the PCIe controller clocks
|
||||
- clock-names: mandatory if there is a second clock, in this case the
|
||||
name must be "core" for the first clock and "reg" for the second
|
||||
|
@ -27,6 +27,11 @@ driver implementation may support the following properties:
|
||||
- reset-gpios:
|
||||
If present this property specifies PERST# GPIO. Host drivers can parse the
|
||||
GPIO and apply fundamental reset to endpoints.
|
||||
- supports-clkreq:
|
||||
If present this property specifies that CLKREQ signal routing exists from
|
||||
root port to downstream device and host bridge drivers can do programming
|
||||
which depends on CLKREQ signal existence. For example, programming root port
|
||||
not to advertise ASPM L1 Sub-States support if there is no CLKREQ signal.
|
||||
|
||||
PCI-PCI Bridge properties
|
||||
-------------------------
|
||||
|
46
Documentation/devicetree/bindings/pci/pcie-al.txt
Normal file
46
Documentation/devicetree/bindings/pci/pcie-al.txt
Normal file
@ -0,0 +1,46 @@
|
||||
* Amazon Annapurna Labs PCIe host bridge
|
||||
|
||||
Amazon's Annapurna Labs PCIe Host Controller is based on the Synopsys DesignWare
|
||||
PCI core. It inherits common properties defined in
|
||||
Documentation/devicetree/bindings/pci/designware-pcie.txt.
|
||||
|
||||
Properties of the host controller node that differ from it are:
|
||||
|
||||
- compatible:
|
||||
Usage: required
|
||||
Value type: <stringlist>
|
||||
Definition: Value should contain
|
||||
- "amazon,al-alpine-v2-pcie" for alpine_v2
|
||||
- "amazon,al-alpine-v3-pcie" for alpine_v3
|
||||
|
||||
- reg:
|
||||
Usage: required
|
||||
Value type: <prop-encoded-array>
|
||||
Definition: Register ranges as listed in the reg-names property
|
||||
|
||||
- reg-names:
|
||||
Usage: required
|
||||
Value type: <stringlist>
|
||||
Definition: Must include the following entries
|
||||
- "config" PCIe ECAM space
|
||||
- "controller" AL proprietary registers
|
||||
- "dbi" Designware PCIe registers
|
||||
|
||||
Example:
|
||||
|
||||
pcie-external0: pcie@fb600000 {
|
||||
compatible = "amazon,al-alpine-v3-pcie";
|
||||
reg = <0x0 0xfb600000 0x0 0x00100000
|
||||
0x0 0xfd800000 0x0 0x00010000
|
||||
0x0 0xfd810000 0x0 0x00001000>;
|
||||
reg-names = "config", "controller", "dbi";
|
||||
bus-range = <0 255>;
|
||||
device_type = "pci";
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
#interrupt-cells = <1>;
|
||||
interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-map-mask = <0x00 0 0 7>;
|
||||
interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>; /* INTa */
|
||||
ranges = <0x02000000 0x0 0xc0010000 0x0 0xc0010000 0x0 0x07ff0000>;
|
||||
};
|
28
Documentation/devicetree/bindings/phy/phy-tegra194-p2u.txt
Normal file
28
Documentation/devicetree/bindings/phy/phy-tegra194-p2u.txt
Normal file
@ -0,0 +1,28 @@
|
||||
NVIDIA Tegra194 P2U binding
|
||||
|
||||
Tegra194 has two PHY bricks namely HSIO (High Speed IO) and NVHS (NVIDIA High
|
||||
Speed) each interfacing with 12 and 8 P2U instances respectively.
|
||||
A P2U instance is a glue logic between Synopsys DesignWare Core PCIe IP's PIPE
|
||||
interface and PHY of HSIO/NVHS bricks. Each P2U instance represents one PCIe
|
||||
lane.
|
||||
|
||||
Required properties:
|
||||
- compatible: For Tegra19x, must contain "nvidia,tegra194-p2u".
|
||||
- reg: Should be the physical address space and length of respective each P2U
|
||||
instance.
|
||||
- reg-names: Must include the entry "ctl".
|
||||
|
||||
Required properties for PHY port node:
|
||||
- #phy-cells: Defined by generic PHY bindings. Must be 0.
|
||||
|
||||
Refer to phy/phy-bindings.txt for the generic PHY binding properties.
|
||||
|
||||
Example:
|
||||
|
||||
p2u_hsio_0: phy@3e10000 {
|
||||
compatible = "nvidia,tegra194-p2u";
|
||||
reg = <0x03e10000 0x10000>;
|
||||
reg-names = "ctl";
|
||||
|
||||
#phy-cells = <0>;
|
||||
};
|
@ -0,0 +1,20 @@
|
||||
Device Tree Bindings for Power Controller on MediaTek PMIC
|
||||
|
||||
The power controller which could be found on PMIC is responsible for externally
|
||||
powering off or on the remote MediaTek SoC through the circuit BBPU.
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be one of follows
|
||||
"mediatek,mt6323-pwrc": for MT6323 PMIC
|
||||
|
||||
Example:
|
||||
|
||||
pmic {
|
||||
compatible = "mediatek,mt6323";
|
||||
|
||||
...
|
||||
|
||||
power-controller {
|
||||
compatible = "mediatek,mt6323-pwrc";
|
||||
};
|
||||
}
|
@ -158,6 +158,20 @@ Mount Options
|
||||
copies. Currently, it's only used in copy_file_range, which will revert
|
||||
to the default VFS implementation if this option is used.
|
||||
|
||||
recover_session=<no|clean>
|
||||
Set auto reconnect mode in the case where the client is blacklisted. The
|
||||
available modes are "no" and "clean". The default is "no".
|
||||
|
||||
* no: never attempt to reconnect when client detects that it has been
|
||||
blacklisted. Operations will generally fail after being blacklisted.
|
||||
|
||||
* clean: client reconnects to the ceph cluster automatically when it
|
||||
detects that it has been blacklisted. During reconnect, client drops
|
||||
dirty data/metadata, invalidates page caches and writable file handles.
|
||||
After reconnect, file locks become stale because the MDS loses track
|
||||
of them. If an inode contains any stale file locks, read/write on the
|
||||
inode is not allowed until applications release all stale file locks.
|
||||
|
||||
More Information
|
||||
================
|
||||
|
||||
|
@ -54,9 +54,9 @@ Hugetlb-specific helpers:
|
||||
Support of split page table lock by an architecture
|
||||
===================================================
|
||||
|
||||
There's no need in special enabling of PTE split page table lock:
|
||||
everything required is done by pgtable_page_ctor() and pgtable_page_dtor(),
|
||||
which must be called on PTE table allocation / freeing.
|
||||
There's no need in special enabling of PTE split page table lock: everything
|
||||
required is done by pgtable_pte_page_ctor() and pgtable_pte_page_dtor(), which
|
||||
must be called on PTE table allocation / freeing.
|
||||
|
||||
Make sure the architecture doesn't use slab allocator for page table
|
||||
allocation: slab uses page->slab_cache for its pages.
|
||||
@ -74,7 +74,7 @@ paths: i.e X86_PAE preallocate few PMDs on pgd_alloc().
|
||||
|
||||
With everything in place you can set CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK.
|
||||
|
||||
NOTE: pgtable_page_ctor() and pgtable_pmd_page_ctor() can fail -- it must
|
||||
NOTE: pgtable_pte_page_ctor() and pgtable_pmd_page_ctor() can fail -- it must
|
||||
be handled properly.
|
||||
|
||||
page->ptl
|
||||
@ -94,7 +94,7 @@ trick:
|
||||
split lock with enabled DEBUG_SPINLOCK or DEBUG_LOCK_ALLOC, but costs
|
||||
one more cache line for indirect access;
|
||||
|
||||
The spinlock_t allocated in pgtable_page_ctor() for PTE table and in
|
||||
The spinlock_t allocated in pgtable_pte_page_ctor() for PTE table and in
|
||||
pgtable_pmd_page_ctor() for PMD table.
|
||||
|
||||
Please, never access page->ptl directly -- use appropriate helper.
|
||||
|
30
MAINTAINERS
30
MAINTAINERS
@ -728,7 +728,7 @@ ALTERA SYSTEM MANAGER DRIVER
|
||||
M: Thor Thayer <thor.thayer@linux.intel.com>
|
||||
S: Maintained
|
||||
F: drivers/mfd/altera-sysmgr.c
|
||||
F: include/linux/mfd/altera-sysgmr.h
|
||||
F: include/linux/mfd/altera-sysmgr.h
|
||||
|
||||
ALTERA SYSTEM RESOURCE DRIVER FOR ARRIA10 DEVKIT
|
||||
M: Thor Thayer <thor.thayer@linux.intel.com>
|
||||
@ -2921,6 +2921,8 @@ F: drivers/video/backlight/
|
||||
F: include/linux/backlight.h
|
||||
F: include/linux/pwm_backlight.h
|
||||
F: Documentation/devicetree/bindings/leds/backlight
|
||||
F: Documentation/ABI/stable/sysfs-class-backlight
|
||||
F: Documentation/ABI/testing/sysfs-class-backlight
|
||||
|
||||
BATMAN ADVANCED
|
||||
M: Marek Lindner <mareklindner@neomailbox.ch>
|
||||
@ -4338,6 +4340,12 @@ S: Maintained
|
||||
F: Documentation/filesystems/cramfs.txt
|
||||
F: fs/cramfs/
|
||||
|
||||
CREATIVE SB0540
|
||||
M: Bastien Nocera <hadess@hadess.net>
|
||||
L: linux-input@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/hid/hid-creative-sb0540.c
|
||||
|
||||
CRYPTO API
|
||||
M: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
M: "David S. Miller" <davem@davemloft.net>
|
||||
@ -7857,6 +7865,12 @@ S: Maintained
|
||||
F: drivers/mfd/lpc_ich.c
|
||||
F: drivers/gpio/gpio-ich.c
|
||||
|
||||
ICY I2C DRIVER
|
||||
M: Max Staudt <max@enpas.org>
|
||||
L: linux-i2c@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/i2c/busses/i2c-icy.c
|
||||
|
||||
IDE SUBSYSTEM
|
||||
M: "David S. Miller" <davem@davemloft.net>
|
||||
L: linux-ide@vger.kernel.org
|
||||
@ -9042,7 +9056,7 @@ S: Supported
|
||||
F: Documentation/security/keys/trusted-encrypted.rst
|
||||
F: include/keys/trusted-type.h
|
||||
F: security/keys/trusted.c
|
||||
F: security/keys/trusted.h
|
||||
F: include/keys/trusted.h
|
||||
|
||||
KEYS/KEYRINGS:
|
||||
M: David Howells <dhowells@redhat.com>
|
||||
@ -12574,16 +12588,18 @@ F: arch/x86/kernel/early-quirks.c
|
||||
|
||||
PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS
|
||||
M: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
|
||||
R: Andrew Murray <andrew.murray@arm.com>
|
||||
L: linux-pci@vger.kernel.org
|
||||
Q: http://patchwork.ozlabs.org/project/linux-pci/list/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git/
|
||||
S: Supported
|
||||
F: drivers/pci/controller/
|
||||
|
||||
PCIE DRIVER FOR ANNAPURNA LABS
|
||||
PCIE DRIVER FOR AMAZON ANNAPURNA LABS
|
||||
M: Jonathan Chocron <jonnyc@amazon.com>
|
||||
L: linux-pci@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/pci/pcie-al.txt
|
||||
F: drivers/pci/controller/dwc/pcie-al.c
|
||||
|
||||
PCIE DRIVER FOR AMLOGIC MESON
|
||||
@ -13781,7 +13797,7 @@ F: drivers/clk/renesas/
|
||||
RENESAS EMEV2 I2C DRIVER
|
||||
M: Wolfram Sang <wsa+renesas@sang-engineering.com>
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/i2c/i2c-emev2.txt
|
||||
F: Documentation/devicetree/bindings/i2c/renesas,iic-emev2.txt
|
||||
F: drivers/i2c/busses/i2c-emev2.c
|
||||
|
||||
RENESAS ETHERNET DRIVERS
|
||||
@ -13803,15 +13819,15 @@ F: drivers/iio/adc/rcar-gyroadc.c
|
||||
RENESAS R-CAR I2C DRIVERS
|
||||
M: Wolfram Sang <wsa+renesas@sang-engineering.com>
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/i2c/i2c-rcar.txt
|
||||
F: Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
|
||||
F: Documentation/devicetree/bindings/i2c/renesas,i2c.txt
|
||||
F: Documentation/devicetree/bindings/i2c/renesas,iic.txt
|
||||
F: drivers/i2c/busses/i2c-rcar.c
|
||||
F: drivers/i2c/busses/i2c-sh_mobile.c
|
||||
|
||||
RENESAS RIIC DRIVER
|
||||
M: Chris Brandt <chris.brandt@renesas.com>
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/i2c/i2c-riic.txt
|
||||
F: Documentation/devicetree/bindings/i2c/renesas,riic.txt
|
||||
F: drivers/i2c/busses/i2c-riic.c
|
||||
|
||||
RENESAS USB PHY DRIVER
|
||||
|
11
arch/Kconfig
11
arch/Kconfig
@ -706,6 +706,17 @@ config HAVE_ARCH_COMPAT_MMAP_BASES
|
||||
and vice-versa 32-bit applications to call 64-bit mmap().
|
||||
Required for applications doing different bitness syscalls.
|
||||
|
||||
# This allows to use a set of generic functions to determine mmap base
|
||||
# address by giving priority to top-down scheme only if the process
|
||||
# is not in legacy mode (compat task, unlimited stack size or
|
||||
# sysctl_legacy_va_layout).
|
||||
# Architecture that selects this option can provide its own version of:
|
||||
# - STACK_RND_MASK
|
||||
config ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
|
||||
bool
|
||||
depends on MMU
|
||||
select ARCH_HAS_ELF_RANDOMIZE
|
||||
|
||||
config HAVE_COPY_THREAD_TLS
|
||||
bool
|
||||
help
|
||||
|
@ -53,6 +53,4 @@ pmd_free(struct mm_struct *mm, pmd_t *pmd)
|
||||
free_page((unsigned long)pmd);
|
||||
}
|
||||
|
||||
#define check_pgt_cache() do { } while (0)
|
||||
|
||||
#endif /* _ALPHA_PGALLOC_H */
|
||||
|
@ -359,11 +359,6 @@ extern void paging_init(void);
|
||||
|
||||
#include <asm-generic/pgtable.h>
|
||||
|
||||
/*
|
||||
* No page table caches to initialise
|
||||
*/
|
||||
#define pgtable_cache_init() do { } while (0)
|
||||
|
||||
/* We have our own get_unmapped_area to cope with ADDR_LIMIT_32BIT. */
|
||||
#define HAVE_ARCH_UNMAPPED_AREA
|
||||
|
||||
|
@ -68,6 +68,9 @@
|
||||
#define MADV_WIPEONFORK 18 /* Zero memory on fork, child only */
|
||||
#define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK */
|
||||
|
||||
#define MADV_COLD 20 /* deactivate these pages */
|
||||
#define MADV_PAGEOUT 21 /* reclaim these pages */
|
||||
|
||||
/* compatibility flags */
|
||||
#define MAP_FILE 0
|
||||
|
||||
|
@ -108,7 +108,7 @@ pte_alloc_one(struct mm_struct *mm)
|
||||
return 0;
|
||||
memzero((void *)pte_pg, PTRS_PER_PTE * sizeof(pte_t));
|
||||
page = virt_to_page(pte_pg);
|
||||
if (!pgtable_page_ctor(page)) {
|
||||
if (!pgtable_pte_page_ctor(page)) {
|
||||
__free_page(page);
|
||||
return 0;
|
||||
}
|
||||
@ -123,13 +123,12 @@ static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
|
||||
|
||||
static inline void pte_free(struct mm_struct *mm, pgtable_t ptep)
|
||||
{
|
||||
pgtable_page_dtor(virt_to_page(ptep));
|
||||
pgtable_pte_page_dtor(virt_to_page(ptep));
|
||||
free_pages((unsigned long)ptep, __get_order_pte());
|
||||
}
|
||||
|
||||
#define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, pte)
|
||||
|
||||
#define check_pgt_cache() do { } while (0)
|
||||
#define pmd_pgtable(pmd) ((pgtable_t) pmd_page_vaddr(pmd))
|
||||
|
||||
#endif /* _ASM_ARC_PGALLOC_H */
|
||||
|
@ -395,11 +395,6 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
|
||||
/* to cope with aliasing VIPT cache */
|
||||
#define HAVE_ARCH_UNMAPPED_AREA
|
||||
|
||||
/*
|
||||
* No page table caches to initialise
|
||||
*/
|
||||
#define pgtable_cache_init() do { } while (0)
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif
|
||||
|
@ -34,6 +34,7 @@ config ARM
|
||||
select ARCH_SUPPORTS_ATOMIC_RMW
|
||||
select ARCH_USE_BUILTIN_BSWAP
|
||||
select ARCH_USE_CMPXCHG_LOCKREF
|
||||
select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
|
||||
select ARCH_WANT_IPC_PARSE_VERSION
|
||||
select BINFMT_FLAT_ARGVP_ENVP_ON_STACK
|
||||
select BUILDTIME_EXTABLE_SORT if MMU
|
||||
|
@ -874,7 +874,6 @@
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
num-lanes = <4>;
|
||||
num-viewport = <6>;
|
||||
bus-range = <0x0 0xff>;
|
||||
ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000 /* downstream I/O */
|
||||
@ -899,7 +898,6 @@
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
num-lanes = <4>;
|
||||
num-viewport = <6>;
|
||||
bus-range = <0x0 0xff>;
|
||||
ranges = <0x81000000 0x0 0x00000000 0x48 0x00010000 0x0 0x00010000 /* downstream I/O */
|
||||
|
@ -15,8 +15,6 @@
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/tlbflush.h>
|
||||
|
||||
#define check_pgt_cache() do { } while (0)
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
|
||||
#define _PAGE_USER_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_USER))
|
||||
|
@ -70,11 +70,6 @@ typedef pte_t *pte_addr_t;
|
||||
*/
|
||||
extern unsigned int kobjsize(const void *objp);
|
||||
|
||||
/*
|
||||
* No page table caches to initialise.
|
||||
*/
|
||||
#define pgtable_cache_init() do { } while (0)
|
||||
|
||||
/*
|
||||
* All 32bit addresses are effectively valid for vmalloc...
|
||||
* Sort of meaningless for non-VM targets.
|
||||
|
@ -368,8 +368,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
|
||||
#define HAVE_ARCH_UNMAPPED_AREA
|
||||
#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
|
||||
|
||||
#define pgtable_cache_init() do { } while (0)
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#endif /* CONFIG_MMU */
|
||||
|
@ -140,8 +140,6 @@ static inline void prefetchw(const void *ptr)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define HAVE_ARCH_PICK_MMAP_LAYOUT
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_ARM_PROCESSOR_H */
|
||||
|
@ -44,7 +44,7 @@ static inline void __tlb_remove_table(void *_table)
|
||||
static inline void
|
||||
__pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, unsigned long addr)
|
||||
{
|
||||
pgtable_page_dtor(pte);
|
||||
pgtable_pte_page_dtor(pte);
|
||||
|
||||
#ifndef CONFIG_ARM_LPAE
|
||||
/*
|
||||
|
@ -319,11 +319,6 @@ unsigned long get_wchan(struct task_struct *p)
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned long arch_randomize_brk(struct mm_struct *mm)
|
||||
{
|
||||
return randomize_page(mm->brk, 0x02000000);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
#ifdef CONFIG_KUSER_HELPERS
|
||||
/*
|
||||
|
@ -204,18 +204,17 @@ void __flush_dcache_page(struct address_space *mapping, struct page *page)
|
||||
* coherent with the kernels mapping.
|
||||
*/
|
||||
if (!PageHighMem(page)) {
|
||||
size_t page_size = PAGE_SIZE << compound_order(page);
|
||||
__cpuc_flush_dcache_area(page_address(page), page_size);
|
||||
__cpuc_flush_dcache_area(page_address(page), page_size(page));
|
||||
} else {
|
||||
unsigned long i;
|
||||
if (cache_is_vipt_nonaliasing()) {
|
||||
for (i = 0; i < (1 << compound_order(page)); i++) {
|
||||
for (i = 0; i < compound_nr(page); i++) {
|
||||
void *addr = kmap_atomic(page + i);
|
||||
__cpuc_flush_dcache_area(addr, PAGE_SIZE);
|
||||
kunmap_atomic(addr);
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < (1 << compound_order(page)); i++) {
|
||||
for (i = 0; i < compound_nr(page); i++) {
|
||||
void *addr = kmap_high_get(page + i);
|
||||
if (addr) {
|
||||
__cpuc_flush_dcache_area(addr, PAGE_SIZE);
|
||||
|
@ -17,33 +17,6 @@
|
||||
((((addr)+SHMLBA-1)&~(SHMLBA-1)) + \
|
||||
(((pgoff)<<PAGE_SHIFT) & (SHMLBA-1)))
|
||||
|
||||
/* gap between mmap and stack */
|
||||
#define MIN_GAP (128*1024*1024UL)
|
||||
#define MAX_GAP ((TASK_SIZE)/6*5)
|
||||
|
||||
static int mmap_is_legacy(struct rlimit *rlim_stack)
|
||||
{
|
||||
if (current->personality & ADDR_COMPAT_LAYOUT)
|
||||
return 1;
|
||||
|
||||
if (rlim_stack->rlim_cur == RLIM_INFINITY)
|
||||
return 1;
|
||||
|
||||
return sysctl_legacy_va_layout;
|
||||
}
|
||||
|
||||
static unsigned long mmap_base(unsigned long rnd, struct rlimit *rlim_stack)
|
||||
{
|
||||
unsigned long gap = rlim_stack->rlim_cur;
|
||||
|
||||
if (gap < MIN_GAP)
|
||||
gap = MIN_GAP;
|
||||
else if (gap > MAX_GAP)
|
||||
gap = MAX_GAP;
|
||||
|
||||
return PAGE_ALIGN(TASK_SIZE - gap - rnd);
|
||||
}
|
||||
|
||||
/*
|
||||
* We need to ensure that shared mappings are correctly aligned to
|
||||
* avoid aliasing issues with VIPT caches. We need to ensure that
|
||||
@ -171,31 +144,6 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
|
||||
return addr;
|
||||
}
|
||||
|
||||
unsigned long arch_mmap_rnd(void)
|
||||
{
|
||||
unsigned long rnd;
|
||||
|
||||
rnd = get_random_long() & ((1UL << mmap_rnd_bits) - 1);
|
||||
|
||||
return rnd << PAGE_SHIFT;
|
||||
}
|
||||
|
||||
void arch_pick_mmap_layout(struct mm_struct *mm, struct rlimit *rlim_stack)
|
||||
{
|
||||
unsigned long random_factor = 0UL;
|
||||
|
||||
if (current->flags & PF_RANDOMIZE)
|
||||
random_factor = arch_mmap_rnd();
|
||||
|
||||
if (mmap_is_legacy(rlim_stack)) {
|
||||
mm->mmap_base = TASK_UNMAPPED_BASE + random_factor;
|
||||
mm->get_unmapped_area = arch_get_unmapped_area;
|
||||
} else {
|
||||
mm->mmap_base = mmap_base(random_factor, rlim_stack);
|
||||
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* You really shouldn't be using read() or write() on /dev/mem. This
|
||||
* might go away in the future.
|
||||
|
@ -731,7 +731,7 @@ static void *__init late_alloc(unsigned long sz)
|
||||
{
|
||||
void *ptr = (void *)__get_free_pages(GFP_PGTABLE_KERNEL, get_order(sz));
|
||||
|
||||
if (!ptr || !pgtable_page_ctor(virt_to_page(ptr)))
|
||||
if (!ptr || !pgtable_pte_page_ctor(virt_to_page(ptr)))
|
||||
BUG();
|
||||
return ptr;
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ config ARM64
|
||||
select ARCH_HAS_DMA_COHERENT_TO_PFN
|
||||
select ARCH_HAS_DMA_PREP_COHERENT
|
||||
select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
|
||||
select ARCH_HAS_ELF_RANDOMIZE
|
||||
select ARCH_HAS_FAST_MULTIPLIER
|
||||
select ARCH_HAS_FORTIFY_SOURCE
|
||||
select ARCH_HAS_GCOV_PROFILE_ALL
|
||||
@ -71,6 +70,7 @@ config ARM64
|
||||
select ARCH_SUPPORTS_INT128 if GCC_VERSION >= 50000 || CC_IS_CLANG
|
||||
select ARCH_SUPPORTS_NUMA_BALANCING
|
||||
select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT
|
||||
select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
|
||||
select ARCH_WANT_FRAME_POINTERS
|
||||
select ARCH_WANT_HUGE_PMD_SHARE if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36)
|
||||
select ARCH_HAS_UBSAN_SANITIZE_ALL
|
||||
|
@ -486,7 +486,6 @@
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
num-lanes = <4>;
|
||||
num-viewport = <2>;
|
||||
bus-range = <0x0 0xff>;
|
||||
ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000 /* downstream I/O */
|
||||
|
@ -677,7 +677,6 @@
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
dma-coherent;
|
||||
num-lanes = <4>;
|
||||
num-viewport = <6>;
|
||||
bus-range = <0x0 0xff>;
|
||||
ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000 /* downstream I/O */
|
||||
@ -704,7 +703,6 @@
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
dma-coherent;
|
||||
num-lanes = <2>;
|
||||
num-viewport = <6>;
|
||||
bus-range = <0x0 0xff>;
|
||||
ranges = <0x81000000 0x0 0x00000000 0x48 0x00010000 0x0 0x00010000 /* downstream I/O */
|
||||
@ -731,7 +729,6 @@
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
dma-coherent;
|
||||
num-lanes = <2>;
|
||||
num-viewport = <6>;
|
||||
bus-range = <0x0 0xff>;
|
||||
ranges = <0x81000000 0x0 0x00000000 0x50 0x00010000 0x0 0x00010000 /* downstream I/O */
|
||||
|
@ -649,7 +649,6 @@
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
dma-coherent;
|
||||
num-lanes = <4>;
|
||||
num-viewport = <8>;
|
||||
bus-range = <0x0 0xff>;
|
||||
ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000 /* downstream I/O */
|
||||
@ -671,7 +670,6 @@
|
||||
reg-names = "regs", "addr_space";
|
||||
num-ib-windows = <6>;
|
||||
num-ob-windows = <8>;
|
||||
num-lanes = <2>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -687,7 +685,6 @@
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
dma-coherent;
|
||||
num-lanes = <2>;
|
||||
num-viewport = <8>;
|
||||
bus-range = <0x0 0xff>;
|
||||
ranges = <0x81000000 0x0 0x00000000 0x48 0x00010000 0x0 0x00010000 /* downstream I/O */
|
||||
@ -709,7 +706,6 @@
|
||||
reg-names = "regs", "addr_space";
|
||||
num-ib-windows = <6>;
|
||||
num-ob-windows = <8>;
|
||||
num-lanes = <2>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -725,7 +721,6 @@
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
dma-coherent;
|
||||
num-lanes = <2>;
|
||||
num-viewport = <8>;
|
||||
bus-range = <0x0 0xff>;
|
||||
ranges = <0x81000000 0x0 0x00000000 0x50 0x00010000 0x0 0x00010000 /* downstream I/O */
|
||||
@ -747,7 +742,6 @@
|
||||
reg-names = "regs", "addr_space";
|
||||
num-ib-windows = <6>;
|
||||
num-ob-windows = <8>;
|
||||
num-lanes = <2>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -469,7 +469,6 @@
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
dma-coherent;
|
||||
num-lanes = <4>;
|
||||
num-viewport = <256>;
|
||||
bus-range = <0x0 0xff>;
|
||||
ranges = <0x81000000 0x0 0x00000000 0x20 0x00010000 0x0 0x00010000 /* downstream I/O */
|
||||
@ -495,7 +494,6 @@
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
dma-coherent;
|
||||
num-lanes = <4>;
|
||||
num-viewport = <6>;
|
||||
bus-range = <0x0 0xff>;
|
||||
ranges = <0x81000000 0x0 0x00000000 0x28 0x00010000 0x0 0x00010000 /* downstream I/O */
|
||||
@ -521,7 +519,6 @@
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
dma-coherent;
|
||||
num-lanes = <8>;
|
||||
num-viewport = <6>;
|
||||
bus-range = <0x0 0xff>;
|
||||
ranges = <0x81000000 0x0 0x00000000 0x30 0x00010000 0x0 0x00010000 /* downstream I/O */
|
||||
|
@ -639,7 +639,6 @@
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
dma-coherent;
|
||||
num-lanes = <4>;
|
||||
num-viewport = <6>;
|
||||
bus-range = <0x0 0xff>;
|
||||
msi-parent = <&its>;
|
||||
@ -661,7 +660,6 @@
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
dma-coherent;
|
||||
num-lanes = <4>;
|
||||
num-viewport = <6>;
|
||||
bus-range = <0x0 0xff>;
|
||||
msi-parent = <&its>;
|
||||
@ -683,7 +681,6 @@
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
dma-coherent;
|
||||
num-lanes = <8>;
|
||||
num-viewport = <256>;
|
||||
bus-range = <0x0 0xff>;
|
||||
msi-parent = <&its>;
|
||||
@ -705,7 +702,6 @@
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
dma-coherent;
|
||||
num-lanes = <4>;
|
||||
num-viewport = <6>;
|
||||
bus-range = <0x0 0xff>;
|
||||
msi-parent = <&its>;
|
||||
|
@ -289,5 +289,29 @@
|
||||
gpio = <&gpio TEGRA194_MAIN_GPIO(A, 3) GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
vdd_3v3_pcie: regulator@2 {
|
||||
compatible = "regulator-fixed";
|
||||
reg = <2>;
|
||||
|
||||
regulator-name = "PEX_3V3";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
gpio = <&gpio TEGRA194_MAIN_GPIO(Z, 2) GPIO_ACTIVE_HIGH>;
|
||||
regulator-boot-on;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
vdd_12v_pcie: regulator@3 {
|
||||
compatible = "regulator-fixed";
|
||||
reg = <3>;
|
||||
|
||||
regulator-name = "VDD_12V";
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
gpio = <&gpio TEGRA194_MAIN_GPIO(A, 1) GPIO_ACTIVE_LOW>;
|
||||
regulator-boot-on;
|
||||
enable-active-low;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -93,9 +93,11 @@
|
||||
};
|
||||
|
||||
pcie@141a0000 {
|
||||
status = "disabled";
|
||||
status = "okay";
|
||||
|
||||
vddio-pex-ctl-supply = <&vdd_1v8ao>;
|
||||
vpcie3v3-supply = <&vdd_3v3_pcie>;
|
||||
vpcie12v-supply = <&vdd_12v_pcie>;
|
||||
|
||||
phys = <&p2u_nvhs_0>, <&p2u_nvhs_1>, <&p2u_nvhs_2>,
|
||||
<&p2u_nvhs_3>, <&p2u_nvhs_4>, <&p2u_nvhs_5>,
|
||||
|
@ -3,8 +3,9 @@
|
||||
#include <dt-bindings/gpio/tegra194-gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/mailbox/tegra186-hsp.h>
|
||||
#include <dt-bindings/reset/tegra194-reset.h>
|
||||
#include <dt-bindings/pinctrl/pinctrl-tegra.h>
|
||||
#include <dt-bindings/power/tegra194-powergate.h>
|
||||
#include <dt-bindings/reset/tegra194-reset.h>
|
||||
#include <dt-bindings/thermal/tegra194-bpmp-thermal.h>
|
||||
|
||||
/ {
|
||||
@ -130,6 +131,38 @@
|
||||
};
|
||||
};
|
||||
|
||||
pinmux: pinmux@2430000 {
|
||||
compatible = "nvidia,tegra194-pinmux";
|
||||
reg = <0x2430000 0x17000
|
||||
0xc300000 0x4000>;
|
||||
|
||||
status = "okay";
|
||||
|
||||
pex_rst_c5_out_state: pex_rst_c5_out {
|
||||
pex_rst {
|
||||
nvidia,pins = "pex_l5_rst_n_pgg1";
|
||||
nvidia,schmitt = <TEGRA_PIN_DISABLE>;
|
||||
nvidia,lpdr = <TEGRA_PIN_ENABLE>;
|
||||
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
|
||||
nvidia,io-high-voltage = <TEGRA_PIN_ENABLE>;
|
||||
nvidia,tristate = <TEGRA_PIN_DISABLE>;
|
||||
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
|
||||
};
|
||||
};
|
||||
|
||||
clkreq_c5_bi_dir_state: clkreq_c5_bi_dir {
|
||||
clkreq {
|
||||
nvidia,pins = "pex_l5_clkreq_n_pgg0";
|
||||
nvidia,schmitt = <TEGRA_PIN_DISABLE>;
|
||||
nvidia,lpdr = <TEGRA_PIN_ENABLE>;
|
||||
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
|
||||
nvidia,io-high-voltage = <TEGRA_PIN_ENABLE>;
|
||||
nvidia,tristate = <TEGRA_PIN_DISABLE>;
|
||||
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
uarta: serial@3100000 {
|
||||
compatible = "nvidia,tegra194-uart", "nvidia,tegra20-uart";
|
||||
reg = <0x03100000 0x40>;
|
||||
@ -1365,6 +1398,9 @@
|
||||
num-viewport = <8>;
|
||||
linux,pci-domain = <5>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pex_rst_c5_out_state>, <&clkreq_c5_bi_dir_state>;
|
||||
|
||||
clocks = <&bpmp TEGRA194_CLK_PEX1_CORE_5>,
|
||||
<&bpmp TEGRA194_CLK_PEX1_CORE_5M>;
|
||||
clock-names = "core", "core_m";
|
||||
|
@ -15,8 +15,6 @@
|
||||
|
||||
#include <asm-generic/pgalloc.h> /* for pte_{alloc,free}_one */
|
||||
|
||||
#define check_pgt_cache() do { } while (0)
|
||||
|
||||
#define PGD_SIZE (PTRS_PER_PGD * sizeof(pgd_t))
|
||||
|
||||
#if CONFIG_PGTABLE_LEVELS > 2
|
||||
|
@ -861,8 +861,6 @@ extern int kern_addr_valid(unsigned long addr);
|
||||
|
||||
#include <asm-generic/pgtable.h>
|
||||
|
||||
static inline void pgtable_cache_init(void) { }
|
||||
|
||||
/*
|
||||
* On AArch64, the cache coherency is handled via the set_pte_at() function.
|
||||
*/
|
||||
|
@ -280,8 +280,6 @@ static inline void spin_lock_prefetch(const void *ptr)
|
||||
"nop") : : "p" (ptr));
|
||||
}
|
||||
|
||||
#define HAVE_ARCH_PICK_MMAP_LAYOUT
|
||||
|
||||
extern unsigned long __ro_after_init signal_minsigstksz; /* sigframe size */
|
||||
extern void __init minsigstksz_setup(void);
|
||||
|
||||
|
@ -44,7 +44,7 @@ static inline void tlb_flush(struct mmu_gather *tlb)
|
||||
static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte,
|
||||
unsigned long addr)
|
||||
{
|
||||
pgtable_page_dtor(pte);
|
||||
pgtable_pte_page_dtor(pte);
|
||||
tlb_remove_table(tlb, pte);
|
||||
}
|
||||
|
||||
|
@ -557,14 +557,6 @@ unsigned long arch_align_stack(unsigned long sp)
|
||||
return sp & ~0xf;
|
||||
}
|
||||
|
||||
unsigned long arch_randomize_brk(struct mm_struct *mm)
|
||||
{
|
||||
if (is_compat_task())
|
||||
return randomize_page(mm->brk, SZ_32M);
|
||||
else
|
||||
return randomize_page(mm->brk, SZ_1G);
|
||||
}
|
||||
|
||||
/*
|
||||
* Called from setup_new_exec() after (COMPAT_)SET_PERSONALITY.
|
||||
*/
|
||||
|
@ -56,8 +56,7 @@ void __sync_icache_dcache(pte_t pte)
|
||||
struct page *page = pte_page(pte);
|
||||
|
||||
if (!test_and_set_bit(PG_dcache_clean, &page->flags))
|
||||
sync_icache_aliases(page_address(page),
|
||||
PAGE_SIZE << compound_order(page));
|
||||
sync_icache_aliases(page_address(page), page_size(page));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__sync_icache_dcache);
|
||||
|
||||
|
@ -20,78 +20,6 @@
|
||||
|
||||
#include <asm/cputype.h>
|
||||
|
||||
/*
|
||||
* Leave enough space between the mmap area and the stack to honour ulimit in
|
||||
* the face of randomisation.
|
||||
*/
|
||||
#define MIN_GAP (SZ_128M)
|
||||
#define MAX_GAP (STACK_TOP/6*5)
|
||||
|
||||
static int mmap_is_legacy(struct rlimit *rlim_stack)
|
||||
{
|
||||
if (current->personality & ADDR_COMPAT_LAYOUT)
|
||||
return 1;
|
||||
|
||||
if (rlim_stack->rlim_cur == RLIM_INFINITY)
|
||||
return 1;
|
||||
|
||||
return sysctl_legacy_va_layout;
|
||||
}
|
||||
|
||||
unsigned long arch_mmap_rnd(void)
|
||||
{
|
||||
unsigned long rnd;
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
if (test_thread_flag(TIF_32BIT))
|
||||
rnd = get_random_long() & ((1UL << mmap_rnd_compat_bits) - 1);
|
||||
else
|
||||
#endif
|
||||
rnd = get_random_long() & ((1UL << mmap_rnd_bits) - 1);
|
||||
return rnd << PAGE_SHIFT;
|
||||
}
|
||||
|
||||
static unsigned long mmap_base(unsigned long rnd, struct rlimit *rlim_stack)
|
||||
{
|
||||
unsigned long gap = rlim_stack->rlim_cur;
|
||||
unsigned long pad = (STACK_RND_MASK << PAGE_SHIFT) + stack_guard_gap;
|
||||
|
||||
/* Values close to RLIM_INFINITY can overflow. */
|
||||
if (gap + pad > gap)
|
||||
gap += pad;
|
||||
|
||||
if (gap < MIN_GAP)
|
||||
gap = MIN_GAP;
|
||||
else if (gap > MAX_GAP)
|
||||
gap = MAX_GAP;
|
||||
|
||||
return PAGE_ALIGN(STACK_TOP - gap - rnd);
|
||||
}
|
||||
|
||||
/*
|
||||
* This function, called very early during the creation of a new process VM
|
||||
* image, sets up which VM layout function to use:
|
||||
*/
|
||||
void arch_pick_mmap_layout(struct mm_struct *mm, struct rlimit *rlim_stack)
|
||||
{
|
||||
unsigned long random_factor = 0UL;
|
||||
|
||||
if (current->flags & PF_RANDOMIZE)
|
||||
random_factor = arch_mmap_rnd();
|
||||
|
||||
/*
|
||||
* Fall back to the standard layout if the personality bit is set, or
|
||||
* if the expected stack growth is unlimited:
|
||||
*/
|
||||
if (mmap_is_legacy(rlim_stack)) {
|
||||
mm->mmap_base = TASK_UNMAPPED_BASE + random_factor;
|
||||
mm->get_unmapped_area = arch_get_unmapped_area;
|
||||
} else {
|
||||
mm->mmap_base = mmap_base(random_factor, rlim_stack);
|
||||
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* You really shouldn't be using read() or write() on /dev/mem. This might go
|
||||
* away in the future.
|
||||
|
@ -384,7 +384,7 @@ static phys_addr_t pgd_pgtable_alloc(int shift)
|
||||
* folded, and if so pgtable_pmd_page_ctor() becomes nop.
|
||||
*/
|
||||
if (shift == PAGE_SHIFT)
|
||||
BUG_ON(!pgtable_page_ctor(phys_to_page(pa)));
|
||||
BUG_ON(!pgtable_pte_page_ctor(phys_to_page(pa)));
|
||||
else if (shift == PMD_SHIFT)
|
||||
BUG_ON(!pgtable_pmd_page_ctor(phys_to_page(pa)));
|
||||
|
||||
|
@ -35,7 +35,7 @@ void pgd_free(struct mm_struct *mm, pgd_t *pgd)
|
||||
kmem_cache_free(pgd_cache, pgd);
|
||||
}
|
||||
|
||||
void __init pgd_cache_init(void)
|
||||
void __init pgtable_cache_init(void)
|
||||
{
|
||||
if (PGD_SIZE == PAGE_SIZE)
|
||||
return;
|
||||
|
@ -59,11 +59,6 @@ extern unsigned long empty_zero_page;
|
||||
|
||||
#define swapper_pg_dir ((pgd_t *) 0)
|
||||
|
||||
/*
|
||||
* No page table caches to initialise
|
||||
*/
|
||||
#define pgtable_cache_init() do { } while (0)
|
||||
|
||||
/*
|
||||
* c6x is !MMU, so define the simpliest implementation
|
||||
*/
|
||||
|
@ -71,12 +71,10 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
|
||||
|
||||
#define __pte_free_tlb(tlb, pte, address) \
|
||||
do { \
|
||||
pgtable_page_dtor(pte); \
|
||||
pgtable_pte_page_dtor(pte); \
|
||||
tlb_remove_page(tlb, pte); \
|
||||
} while (0)
|
||||
|
||||
#define check_pgt_cache() do {} while (0)
|
||||
|
||||
extern void pagetable_init(void);
|
||||
extern void pre_mmu_init(void);
|
||||
extern void pre_trap_init(void);
|
||||
|
@ -296,11 +296,6 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
|
||||
/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
|
||||
#define kern_addr_valid(addr) (1)
|
||||
|
||||
/*
|
||||
* No page table caches to initialise
|
||||
*/
|
||||
#define pgtable_cache_init() do {} while (0)
|
||||
|
||||
#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
|
||||
remap_pfn_range(vma, vaddr, pfn, size, prot)
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
#define __ARCH_USE_5LEVEL_HACK
|
||||
#include <asm-generic/pgtable-nopud.h>
|
||||
#include <asm-generic/pgtable.h>
|
||||
#define pgtable_cache_init() do { } while (0)
|
||||
extern void paging_init(void);
|
||||
#define PAGE_NONE __pgprot(0) /* these mean nothing to NO_MM */
|
||||
#define PAGE_SHARED __pgprot(0) /* these mean nothing to NO_MM */
|
||||
@ -34,11 +33,6 @@ static inline int pte_file(pte_t pte) { return 0; }
|
||||
extern unsigned int kobjsize(const void *objp);
|
||||
extern int is_in_rom(unsigned long);
|
||||
|
||||
/*
|
||||
* No page table caches to initialise
|
||||
*/
|
||||
#define pgtable_cache_init() do { } while (0)
|
||||
|
||||
/*
|
||||
* All 32bit addresses are effectively valid for vmalloc...
|
||||
* Sort of meaningless for non-VM targets.
|
||||
|
@ -13,8 +13,6 @@
|
||||
|
||||
#include <asm-generic/pgalloc.h> /* for pte_{alloc,free}_one */
|
||||
|
||||
#define check_pgt_cache() do {} while (0)
|
||||
|
||||
extern unsigned long long kmap_generation;
|
||||
|
||||
/*
|
||||
@ -96,7 +94,7 @@ static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
|
||||
|
||||
#define __pte_free_tlb(tlb, pte, addr) \
|
||||
do { \
|
||||
pgtable_page_dtor((pte)); \
|
||||
pgtable_pte_page_dtor((pte)); \
|
||||
tlb_remove_page((tlb), (pte)); \
|
||||
} while (0)
|
||||
|
||||
|
@ -431,9 +431,6 @@ static inline int pte_exec(pte_t pte)
|
||||
|
||||
#define __pte_offset(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
|
||||
|
||||
/* I think this is in case we have page table caches; needed by init/main.c */
|
||||
#define pgtable_cache_init() do { } while (0)
|
||||
|
||||
/*
|
||||
* Swap/file PTE definitions. If _PAGE_PRESENT is zero, the rest of the PTE is
|
||||
* interpreted as swap information. The remaining free bits are interpreted as
|
||||
|
@ -3,5 +3,5 @@
|
||||
# Makefile for Hexagon memory management subsystem
|
||||
#
|
||||
|
||||
obj-y := init.o pgalloc.o ioremap.o uaccess.o vm_fault.o cache.o
|
||||
obj-y := init.o ioremap.o uaccess.o vm_fault.o cache.o
|
||||
obj-y += copy_to_user.o copy_from_user.o strnlen_user.o vm_tlb.o
|
||||
|
@ -71,19 +71,6 @@ void __init mem_init(void)
|
||||
init_mm.context.ptbase = __pa(init_mm.pgd);
|
||||
}
|
||||
|
||||
/*
|
||||
* free_initrd_mem - frees... initrd memory.
|
||||
* @start - start of init memory
|
||||
* @end - end of init memory
|
||||
*
|
||||
* Apparently has to be passed the address of the initrd memory.
|
||||
*
|
||||
* Wrapped by #ifdef CONFIG_BLKDEV_INITRD
|
||||
*/
|
||||
void free_initrd_mem(unsigned long start, unsigned long end)
|
||||
{
|
||||
}
|
||||
|
||||
void sync_icache_dcache(pte_t pte)
|
||||
{
|
||||
unsigned long addr;
|
||||
|
@ -1,10 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
|
||||
void __init pgtable_cache_init(void)
|
||||
{
|
||||
}
|
@ -72,10 +72,6 @@ config 64BIT
|
||||
config ZONE_DMA32
|
||||
def_bool y
|
||||
|
||||
config QUICKLIST
|
||||
bool
|
||||
default y
|
||||
|
||||
config MMU
|
||||
bool
|
||||
default y
|
||||
|
@ -19,18 +19,19 @@
|
||||
#include <linux/mm.h>
|
||||
#include <linux/page-flags.h>
|
||||
#include <linux/threads.h>
|
||||
#include <linux/quicklist.h>
|
||||
|
||||
#include <asm-generic/pgalloc.h>
|
||||
|
||||
#include <asm/mmu_context.h>
|
||||
|
||||
static inline pgd_t *pgd_alloc(struct mm_struct *mm)
|
||||
{
|
||||
return quicklist_alloc(0, GFP_KERNEL, NULL);
|
||||
return (pgd_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
|
||||
}
|
||||
|
||||
static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
|
||||
{
|
||||
quicklist_free(0, NULL, pgd);
|
||||
free_page((unsigned long)pgd);
|
||||
}
|
||||
|
||||
#if CONFIG_PGTABLE_LEVELS == 4
|
||||
@ -42,12 +43,12 @@ pgd_populate(struct mm_struct *mm, pgd_t * pgd_entry, pud_t * pud)
|
||||
|
||||
static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
|
||||
{
|
||||
return quicklist_alloc(0, GFP_KERNEL, NULL);
|
||||
return (pud_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
|
||||
}
|
||||
|
||||
static inline void pud_free(struct mm_struct *mm, pud_t *pud)
|
||||
{
|
||||
quicklist_free(0, NULL, pud);
|
||||
free_page((unsigned long)pud);
|
||||
}
|
||||
#define __pud_free_tlb(tlb, pud, address) pud_free((tlb)->mm, pud)
|
||||
#endif /* CONFIG_PGTABLE_LEVELS == 4 */
|
||||
@ -60,12 +61,12 @@ pud_populate(struct mm_struct *mm, pud_t * pud_entry, pmd_t * pmd)
|
||||
|
||||
static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
|
||||
{
|
||||
return quicklist_alloc(0, GFP_KERNEL, NULL);
|
||||
return (pmd_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
|
||||
}
|
||||
|
||||
static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
|
||||
{
|
||||
quicklist_free(0, NULL, pmd);
|
||||
free_page((unsigned long)pmd);
|
||||
}
|
||||
|
||||
#define __pmd_free_tlb(tlb, pmd, address) pmd_free((tlb)->mm, pmd)
|
||||
@ -83,43 +84,6 @@ pmd_populate_kernel(struct mm_struct *mm, pmd_t * pmd_entry, pte_t * pte)
|
||||
pmd_val(*pmd_entry) = __pa(pte);
|
||||
}
|
||||
|
||||
static inline pgtable_t pte_alloc_one(struct mm_struct *mm)
|
||||
{
|
||||
struct page *page;
|
||||
void *pg;
|
||||
|
||||
pg = quicklist_alloc(0, GFP_KERNEL, NULL);
|
||||
if (!pg)
|
||||
return NULL;
|
||||
page = virt_to_page(pg);
|
||||
if (!pgtable_page_ctor(page)) {
|
||||
quicklist_free(0, NULL, pg);
|
||||
return NULL;
|
||||
}
|
||||
return page;
|
||||
}
|
||||
|
||||
static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm)
|
||||
{
|
||||
return quicklist_alloc(0, GFP_KERNEL, NULL);
|
||||
}
|
||||
|
||||
static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
|
||||
{
|
||||
pgtable_page_dtor(pte);
|
||||
quicklist_free_page(0, NULL, pte);
|
||||
}
|
||||
|
||||
static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
|
||||
{
|
||||
quicklist_free(0, NULL, pte);
|
||||
}
|
||||
|
||||
static inline void check_pgt_cache(void)
|
||||
{
|
||||
quicklist_trim(0, NULL, 25, 16);
|
||||
}
|
||||
|
||||
#define __pte_free_tlb(tlb, pte, address) pte_free((tlb)->mm, pte)
|
||||
|
||||
#endif /* _ASM_IA64_PGALLOC_H */
|
||||
|
@ -566,11 +566,6 @@ extern struct page *zero_page_memmap_ptr;
|
||||
#define KERNEL_TR_PAGE_SHIFT _PAGE_SIZE_64M
|
||||
#define KERNEL_TR_PAGE_SIZE (1 << KERNEL_TR_PAGE_SHIFT)
|
||||
|
||||
/*
|
||||
* No page table caches to initialise
|
||||
*/
|
||||
#define pgtable_cache_init() do { } while (0)
|
||||
|
||||
/* These tell get_user_pages() that the first gate page is accessible from user-level. */
|
||||
#define FIXADDR_USER_START GATE_ADDR
|
||||
#ifdef HAVE_BUGGY_SEGREL
|
||||
|
@ -583,6 +583,7 @@ void ia64_process_pending_intr(void)
|
||||
static irqreturn_t dummy_handler (int irq, void *dev_id)
|
||||
{
|
||||
BUG();
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
static struct irqaction ipi_irqaction = {
|
||||
|
@ -108,7 +108,6 @@ setup_per_cpu_areas(void)
|
||||
struct pcpu_group_info *gi;
|
||||
unsigned int cpu;
|
||||
ssize_t static_size, reserved_size, dyn_size;
|
||||
int rc;
|
||||
|
||||
ai = pcpu_alloc_alloc_info(1, num_possible_cpus());
|
||||
if (!ai)
|
||||
|
@ -186,7 +186,7 @@ void __init setup_per_cpu_areas(void)
|
||||
unsigned long base_offset;
|
||||
unsigned int cpu;
|
||||
ssize_t static_size, reserved_size, dyn_size;
|
||||
int node, prev_node, unit, nr_units, rc;
|
||||
int node, prev_node, unit, nr_units;
|
||||
|
||||
ai = pcpu_alloc_alloc_info(MAX_NUMNODES, nr_cpu_ids);
|
||||
if (!ai)
|
||||
|
@ -64,7 +64,7 @@ __ia64_sync_icache_dcache (pte_t pte)
|
||||
if (test_bit(PG_arch_1, &page->flags))
|
||||
return; /* i-cache is already coherent with d-cache */
|
||||
|
||||
flush_icache_range(addr, addr + (PAGE_SIZE << compound_order(page)));
|
||||
flush_icache_range(addr, addr + page_size(page));
|
||||
set_bit(PG_arch_1, &page->flags); /* mark page as clean */
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ extern inline pmd_t *pmd_alloc_kernel(pgd_t *pgd, unsigned long address)
|
||||
static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t page,
|
||||
unsigned long address)
|
||||
{
|
||||
pgtable_page_dtor(page);
|
||||
pgtable_pte_page_dtor(page);
|
||||
__free_page(page);
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm)
|
||||
|
||||
if (!page)
|
||||
return NULL;
|
||||
if (!pgtable_page_ctor(page)) {
|
||||
if (!pgtable_pte_page_ctor(page)) {
|
||||
__free_page(page);
|
||||
return NULL;
|
||||
}
|
||||
@ -73,7 +73,7 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm)
|
||||
|
||||
static inline void pte_free(struct mm_struct *mm, struct page *page)
|
||||
{
|
||||
pgtable_page_dtor(page);
|
||||
pgtable_pte_page_dtor(page);
|
||||
__free_page(page);
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm)
|
||||
page = alloc_pages(GFP_KERNEL|__GFP_ZERO, 0);
|
||||
if(!page)
|
||||
return NULL;
|
||||
if (!pgtable_page_ctor(page)) {
|
||||
if (!pgtable_pte_page_ctor(page)) {
|
||||
__free_page(page);
|
||||
return NULL;
|
||||
}
|
||||
@ -51,7 +51,7 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm)
|
||||
|
||||
static inline void pte_free(struct mm_struct *mm, pgtable_t page)
|
||||
{
|
||||
pgtable_page_dtor(page);
|
||||
pgtable_pte_page_dtor(page);
|
||||
cache_page(kmap(page));
|
||||
kunmap(page);
|
||||
__free_page(page);
|
||||
@ -60,7 +60,7 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t page)
|
||||
static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t page,
|
||||
unsigned long address)
|
||||
{
|
||||
pgtable_page_dtor(page);
|
||||
pgtable_pte_page_dtor(page);
|
||||
cache_page(kmap(page));
|
||||
kunmap(page);
|
||||
__free_page(page);
|
||||
|
@ -176,11 +176,4 @@ pgprot_t pgprot_dmacoherent(pgprot_t prot);
|
||||
#include <asm-generic/pgtable.h>
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
/*
|
||||
* No page table caches to initialise
|
||||
*/
|
||||
#define pgtable_cache_init() do { } while (0)
|
||||
|
||||
#define check_pgt_cache() do { } while (0)
|
||||
|
||||
#endif /* _M68K_PGTABLE_H */
|
||||
|
@ -44,11 +44,6 @@ extern void paging_init(void);
|
||||
*/
|
||||
#define ZERO_PAGE(vaddr) (virt_to_page(0))
|
||||
|
||||
/*
|
||||
* No page table caches to initialise.
|
||||
*/
|
||||
#define pgtable_cache_init() do { } while (0)
|
||||
|
||||
/*
|
||||
* All 32bit addresses are effectively valid for vmalloc...
|
||||
* Sort of meaningless for non-VM targets.
|
||||
@ -60,6 +55,4 @@ extern void paging_init(void);
|
||||
|
||||
#include <asm-generic/pgtable.h>
|
||||
|
||||
#define check_pgt_cache() do { } while (0)
|
||||
|
||||
#endif /* _M68KNOMMU_PGTABLE_H */
|
||||
|
@ -21,7 +21,7 @@ extern const char bad_pmd_string[];
|
||||
|
||||
#define __pte_free_tlb(tlb,pte,addr) \
|
||||
do { \
|
||||
pgtable_page_dtor(pte); \
|
||||
pgtable_pte_page_dtor(pte); \
|
||||
tlb_remove_page((tlb), pte); \
|
||||
} while (0)
|
||||
|
||||
|
@ -5,15 +5,18 @@ config MICROBLAZE
|
||||
select ARCH_NO_SWAP
|
||||
select ARCH_HAS_BINFMT_FLAT if !MMU
|
||||
select ARCH_HAS_DMA_COHERENT_TO_PFN if MMU
|
||||
select ARCH_HAS_DMA_PREP_COHERENT
|
||||
select ARCH_HAS_GCOV_PROFILE_ALL
|
||||
select ARCH_HAS_SYNC_DMA_FOR_CPU
|
||||
select ARCH_HAS_SYNC_DMA_FOR_DEVICE
|
||||
select ARCH_HAS_UNCACHED_SEGMENT if !MMU
|
||||
select ARCH_MIGHT_HAVE_PC_PARPORT
|
||||
select ARCH_WANT_IPC_PARSE_VERSION
|
||||
select BUILDTIME_EXTABLE_SORT
|
||||
select TIMER_OF
|
||||
select CLONE_BACKWARDS3
|
||||
select COMMON_CLK
|
||||
select DMA_DIRECT_REMAP if MMU
|
||||
select GENERIC_ATOMIC64
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select GENERIC_CPU_DEVICES
|
||||
|
@ -18,7 +18,6 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "xlnx,microblaze";
|
||||
hard-reset-gpios = <&LEDs_8Bit 2 1>;
|
||||
model = "testing";
|
||||
DDR2_SDRAM: memory@90000000 {
|
||||
device_type = "memory";
|
||||
@ -281,6 +280,21 @@
|
||||
gpios = <&LEDs_8Bit 7 1>;
|
||||
};
|
||||
} ;
|
||||
|
||||
gpio-restart {
|
||||
compatible = "gpio-restart";
|
||||
/*
|
||||
* FIXME: is this active low or active high?
|
||||
* the current flag (1) indicates active low.
|
||||
* delay measures are templates, should be adjusted
|
||||
* to datasheet or trial-and-error with real hardware.
|
||||
*/
|
||||
gpios = <&LEDs_8Bit 2 1>;
|
||||
active-delay = <100>;
|
||||
inactive-delay = <10>;
|
||||
wait-delay = <100>;
|
||||
};
|
||||
|
||||
RS232_Uart_1: serial@84000000 {
|
||||
clock-frequency = <125000000>;
|
||||
compatible = "xlnx,xps-uartlite-1.00.a";
|
||||
|
@ -5,15 +5,10 @@ CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_SYSFS_DEPRECATED=y
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
# CONFIG_BASE_FULL is not set
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1
|
||||
CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1
|
||||
CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1
|
||||
@ -25,14 +20,19 @@ CONFIG_MMU=y
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
CONFIG_CMDLINE_FORCE=y
|
||||
CONFIG_HIGHMEM=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_XILINX=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_INET=y
|
||||
# CONFIG_IPV6 is not set
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_PCI=y
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_CFI=y
|
||||
CONFIG_MTD_CFI_INTELEXT=y
|
||||
@ -41,6 +41,7 @@ CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_SIZE=8192
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_XILINX_EMACLITE=y
|
||||
CONFIG_XILINX_AXI_EMAC=y
|
||||
CONFIG_XILINX_LL_TEMAC=y
|
||||
# CONFIG_INPUT is not set
|
||||
# CONFIG_SERIO is not set
|
||||
@ -59,6 +60,8 @@ CONFIG_SPI_XILINX=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_GPIO_XILINX=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_GPIO_RESTART=y
|
||||
# CONFIG_HWMON is not set
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_XILINX_WATCHDOG=y
|
||||
@ -74,8 +77,8 @@ CONFIG_CRAMFS=y
|
||||
CONFIG_ROMFS_FS=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_CIFS=y
|
||||
CONFIG_CIFS_STATS=y
|
||||
CONFIG_CIFS_STATS2=y
|
||||
CONFIG_ENCRYPTED_KEYS=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_SLAB=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
@ -83,6 +86,3 @@ CONFIG_DEBUG_SPINLOCK=y
|
||||
CONFIG_KGDB=y
|
||||
CONFIG_KGDB_TESTS=y
|
||||
CONFIG_KGDB_KDB=y
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_KEYS=y
|
||||
CONFIG_ENCRYPTED_KEYS=y
|
||||
|
@ -7,15 +7,10 @@ CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_SYSFS_DEPRECATED=y
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
# CONFIG_BASE_FULL is not set
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1
|
||||
CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1
|
||||
CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1
|
||||
@ -25,13 +20,18 @@ CONFIG_XILINX_MICROBLAZE0_USE_FPU=2
|
||||
CONFIG_HZ_100=y
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
CONFIG_CMDLINE_FORCE=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_XILINX=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_INET=y
|
||||
# CONFIG_IPV6 is not set
|
||||
CONFIG_PCI=y
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
@ -62,6 +62,8 @@ CONFIG_SPI_XILINX=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_GPIO_XILINX=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_GPIO_RESTART=y
|
||||
# CONFIG_HWMON is not set
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_XILINX_WATCHDOG=y
|
||||
@ -75,11 +77,6 @@ CONFIG_ROMFS_FS=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V3_ACL=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_SLAB=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
CONFIG_DEBUG_SPINLOCK=y
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_KEYS=y
|
||||
CONFIG_ENCRYPTED_KEYS=y
|
||||
CONFIG_CRYPTO_ECB=y
|
||||
@ -87,3 +84,7 @@ CONFIG_CRYPTO_MD4=y
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
CONFIG_CRYPTO_ARC4=y
|
||||
CONFIG_CRYPTO_DES=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_SLAB=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
CONFIG_DEBUG_SPINLOCK=y
|
||||
|
@ -40,7 +40,6 @@ extern void iounmap(volatile void __iomem *addr);
|
||||
|
||||
extern void __iomem *ioremap(phys_addr_t address, unsigned long size);
|
||||
#define ioremap_nocache(addr, size) ioremap((addr), (size))
|
||||
#define ioremap_fullcache(addr, size) ioremap((addr), (size))
|
||||
#define ioremap_wc(addr, size) ioremap((addr), (size))
|
||||
#define ioremap_wt(addr, size) ioremap((addr), (size))
|
||||
|
||||
|
@ -66,8 +66,6 @@ extern pgprot_t pci_phys_mem_access_prot(struct file *file,
|
||||
unsigned long size,
|
||||
pgprot_t prot);
|
||||
|
||||
#define HAVE_ARCH_PCI_RESOURCE_TO_USER
|
||||
|
||||
/* This part of code was originally in xilinx-pci.h */
|
||||
#ifdef CONFIG_PCI_XILINX
|
||||
extern void __init xilinx_pci_init(void);
|
||||
|
@ -21,83 +21,23 @@
|
||||
#include <asm/cache.h>
|
||||
#include <asm/pgtable.h>
|
||||
|
||||
#define PGDIR_ORDER 0
|
||||
|
||||
/*
|
||||
* This is handled very differently on MicroBlaze since out page tables
|
||||
* are all 0's and I want to be able to use these zero'd pages elsewhere
|
||||
* as well - it gives us quite a speedup.
|
||||
* -- Cort
|
||||
*/
|
||||
extern struct pgtable_cache_struct {
|
||||
unsigned long *pgd_cache;
|
||||
unsigned long *pte_cache;
|
||||
unsigned long pgtable_cache_sz;
|
||||
} quicklists;
|
||||
|
||||
#define pgd_quicklist (quicklists.pgd_cache)
|
||||
#define pmd_quicklist ((unsigned long *)0)
|
||||
#define pte_quicklist (quicklists.pte_cache)
|
||||
#define pgtable_cache_size (quicklists.pgtable_cache_sz)
|
||||
|
||||
extern unsigned long *zero_cache; /* head linked list of pre-zero'd pages */
|
||||
extern atomic_t zero_sz; /* # currently pre-zero'd pages */
|
||||
extern atomic_t zeropage_hits; /* # zero'd pages request that we've done */
|
||||
extern atomic_t zeropage_calls; /* # zero'd pages request that've been made */
|
||||
extern atomic_t zerototal; /* # pages zero'd over time */
|
||||
|
||||
#define zero_quicklist (zero_cache)
|
||||
#define zero_cache_sz (zero_sz)
|
||||
#define zero_cache_calls (zeropage_calls)
|
||||
#define zero_cache_hits (zeropage_hits)
|
||||
#define zero_cache_total (zerototal)
|
||||
|
||||
/*
|
||||
* return a pre-zero'd page from the list,
|
||||
* return NULL if none available -- Cort
|
||||
*/
|
||||
extern unsigned long get_zero_page_fast(void);
|
||||
#define __HAVE_ARCH_PTE_ALLOC_ONE_KERNEL
|
||||
#include <asm-generic/pgalloc.h>
|
||||
|
||||
extern void __bad_pte(pmd_t *pmd);
|
||||
|
||||
static inline pgd_t *get_pgd_slow(void)
|
||||
static inline pgd_t *get_pgd(void)
|
||||
{
|
||||
pgd_t *ret;
|
||||
|
||||
ret = (pgd_t *)__get_free_pages(GFP_KERNEL, PGDIR_ORDER);
|
||||
if (ret != NULL)
|
||||
clear_page(ret);
|
||||
return ret;
|
||||
return (pgd_t *)__get_free_pages(GFP_KERNEL|__GFP_ZERO, 0);
|
||||
}
|
||||
|
||||
static inline pgd_t *get_pgd_fast(void)
|
||||
{
|
||||
unsigned long *ret;
|
||||
|
||||
ret = pgd_quicklist;
|
||||
if (ret != NULL) {
|
||||
pgd_quicklist = (unsigned long *)(*ret);
|
||||
ret[0] = 0;
|
||||
pgtable_cache_size--;
|
||||
} else
|
||||
ret = (unsigned long *)get_pgd_slow();
|
||||
return (pgd_t *)ret;
|
||||
}
|
||||
|
||||
static inline void free_pgd_fast(pgd_t *pgd)
|
||||
{
|
||||
*(unsigned long **)pgd = pgd_quicklist;
|
||||
pgd_quicklist = (unsigned long *) pgd;
|
||||
pgtable_cache_size++;
|
||||
}
|
||||
|
||||
static inline void free_pgd_slow(pgd_t *pgd)
|
||||
static inline void free_pgd(pgd_t *pgd)
|
||||
{
|
||||
free_page((unsigned long)pgd);
|
||||
}
|
||||
|
||||
#define pgd_free(mm, pgd) free_pgd_fast(pgd)
|
||||
#define pgd_alloc(mm) get_pgd_fast()
|
||||
#define pgd_free(mm, pgd) free_pgd(pgd)
|
||||
#define pgd_alloc(mm) get_pgd()
|
||||
|
||||
#define pmd_pgtable(pmd) pmd_page(pmd)
|
||||
|
||||
@ -110,50 +50,6 @@ static inline void free_pgd_slow(pgd_t *pgd)
|
||||
|
||||
extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm);
|
||||
|
||||
static inline struct page *pte_alloc_one(struct mm_struct *mm)
|
||||
{
|
||||
struct page *ptepage;
|
||||
|
||||
#ifdef CONFIG_HIGHPTE
|
||||
int flags = GFP_KERNEL | __GFP_HIGHMEM;
|
||||
#else
|
||||
int flags = GFP_KERNEL;
|
||||
#endif
|
||||
|
||||
ptepage = alloc_pages(flags, 0);
|
||||
if (!ptepage)
|
||||
return NULL;
|
||||
clear_highpage(ptepage);
|
||||
if (!pgtable_page_ctor(ptepage)) {
|
||||
__free_page(ptepage);
|
||||
return NULL;
|
||||
}
|
||||
return ptepage;
|
||||
}
|
||||
|
||||
static inline void pte_free_fast(pte_t *pte)
|
||||
{
|
||||
*(unsigned long **)pte = pte_quicklist;
|
||||
pte_quicklist = (unsigned long *) pte;
|
||||
pgtable_cache_size++;
|
||||
}
|
||||
|
||||
static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
|
||||
{
|
||||
free_page((unsigned long)pte);
|
||||
}
|
||||
|
||||
static inline void pte_free_slow(struct page *ptepage)
|
||||
{
|
||||
__free_page(ptepage);
|
||||
}
|
||||
|
||||
static inline void pte_free(struct mm_struct *mm, struct page *ptepage)
|
||||
{
|
||||
pgtable_page_dtor(ptepage);
|
||||
__free_page(ptepage);
|
||||
}
|
||||
|
||||
#define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, (pte))
|
||||
|
||||
#define pmd_populate(mm, pmd, pte) \
|
||||
@ -171,10 +67,6 @@ static inline void pte_free(struct mm_struct *mm, struct page *ptepage)
|
||||
#define __pmd_free_tlb(tlb, x, addr) pmd_free((tlb)->mm, x)
|
||||
#define pgd_populate(mm, pmd, pte) BUG()
|
||||
|
||||
extern int do_check_pgt_cache(int, int);
|
||||
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
#define check_pgt_cache() do { } while (0)
|
||||
|
||||
#endif /* _ASM_MICROBLAZE_PGALLOC_H */
|
||||
|
@ -46,8 +46,6 @@ extern int mem_init_done;
|
||||
|
||||
#define swapper_pg_dir ((pgd_t *) NULL)
|
||||
|
||||
#define pgtable_cache_init() do {} while (0)
|
||||
|
||||
#define arch_enter_lazy_cpu_mode() do {} while (0)
|
||||
|
||||
#define pgprot_noncached_wc(prot) prot
|
||||
@ -526,11 +524,6 @@ extern unsigned long iopa(unsigned long addr);
|
||||
/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
|
||||
#define kern_addr_valid(addr) (1)
|
||||
|
||||
/*
|
||||
* No page table caches to initialise
|
||||
*/
|
||||
#define pgtable_cache_init() do { } while (0)
|
||||
|
||||
void do_page_fault(struct pt_regs *regs, unsigned long address,
|
||||
unsigned long error_code);
|
||||
|
||||
|
@ -163,44 +163,15 @@ extern long __user_bad(void);
|
||||
* Returns zero on success, or -EFAULT on error.
|
||||
* On error, the variable @x is set to zero.
|
||||
*/
|
||||
#define get_user(x, ptr) \
|
||||
__get_user_check((x), (ptr), sizeof(*(ptr)))
|
||||
|
||||
#define __get_user_check(x, ptr, size) \
|
||||
({ \
|
||||
unsigned long __gu_val = 0; \
|
||||
const typeof(*(ptr)) __user *__gu_addr = (ptr); \
|
||||
int __gu_err = 0; \
|
||||
\
|
||||
if (access_ok(__gu_addr, size)) { \
|
||||
switch (size) { \
|
||||
case 1: \
|
||||
__get_user_asm("lbu", __gu_addr, __gu_val, \
|
||||
__gu_err); \
|
||||
break; \
|
||||
case 2: \
|
||||
__get_user_asm("lhu", __gu_addr, __gu_val, \
|
||||
__gu_err); \
|
||||
break; \
|
||||
case 4: \
|
||||
__get_user_asm("lw", __gu_addr, __gu_val, \
|
||||
__gu_err); \
|
||||
break; \
|
||||
default: \
|
||||
__gu_err = __user_bad(); \
|
||||
break; \
|
||||
} \
|
||||
} else { \
|
||||
__gu_err = -EFAULT; \
|
||||
} \
|
||||
x = (__force typeof(*(ptr)))__gu_val; \
|
||||
__gu_err; \
|
||||
#define get_user(x, ptr) ({ \
|
||||
const typeof(*(ptr)) __user *__gu_ptr = (ptr); \
|
||||
access_ok(__gu_ptr, sizeof(*__gu_ptr)) ? \
|
||||
__get_user(x, __gu_ptr) : -EFAULT; \
|
||||
})
|
||||
|
||||
#define __get_user(x, ptr) \
|
||||
({ \
|
||||
unsigned long __gu_val = 0; \
|
||||
/*unsigned long __gu_ptr = (unsigned long)(ptr);*/ \
|
||||
long __gu_err; \
|
||||
switch (sizeof(*(ptr))) { \
|
||||
case 1: \
|
||||
@ -212,6 +183,11 @@ extern long __user_bad(void);
|
||||
case 4: \
|
||||
__get_user_asm("lw", (ptr), __gu_val, __gu_err); \
|
||||
break; \
|
||||
case 8: \
|
||||
__gu_err = __copy_from_user(&__gu_val, ptr, 8); \
|
||||
if (__gu_err) \
|
||||
__gu_err = -EFAULT; \
|
||||
break; \
|
||||
default: \
|
||||
/* __gu_val = 0; __gu_err = -EINVAL;*/ __gu_err = __user_bad();\
|
||||
} \
|
||||
|
@ -8,83 +8,9 @@
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/of_platform.h>
|
||||
|
||||
/* Trigger specific functions */
|
||||
#ifdef CONFIG_GPIOLIB
|
||||
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
static int handle; /* reset pin handle */
|
||||
static unsigned int reset_val;
|
||||
|
||||
static int of_platform_reset_gpio_probe(void)
|
||||
{
|
||||
int ret;
|
||||
handle = of_get_named_gpio(of_find_node_by_path("/"),
|
||||
"hard-reset-gpios", 0);
|
||||
|
||||
if (!gpio_is_valid(handle)) {
|
||||
pr_info("Skipping unavailable RESET gpio %d (%s)\n",
|
||||
handle, "reset");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
ret = gpio_request(handle, "reset");
|
||||
if (ret < 0) {
|
||||
pr_info("GPIO pin is already allocated\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* get current setup value */
|
||||
reset_val = gpio_get_value(handle);
|
||||
/* FIXME maybe worth to perform any action */
|
||||
pr_debug("Reset: Gpio output state: 0x%x\n", reset_val);
|
||||
|
||||
/* Setup GPIO as output */
|
||||
ret = gpio_direction_output(handle, 0);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
/* Setup output direction */
|
||||
gpio_set_value(handle, 0);
|
||||
|
||||
pr_info("RESET: Registered gpio device: %d, current val: %d\n",
|
||||
handle, reset_val);
|
||||
return 0;
|
||||
err:
|
||||
gpio_free(handle);
|
||||
return ret;
|
||||
}
|
||||
device_initcall(of_platform_reset_gpio_probe);
|
||||
|
||||
|
||||
static void gpio_system_reset(void)
|
||||
{
|
||||
if (gpio_is_valid(handle))
|
||||
gpio_set_value(handle, 1 - reset_val);
|
||||
else
|
||||
pr_notice("Reset GPIO unavailable - halting!\n");
|
||||
}
|
||||
#else
|
||||
static void gpio_system_reset(void)
|
||||
{
|
||||
pr_notice("No reset GPIO present - halting!\n");
|
||||
}
|
||||
|
||||
void of_platform_reset_gpio_probe(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
void machine_restart(char *cmd)
|
||||
{
|
||||
pr_notice("Machine restart...\n");
|
||||
gpio_system_reset();
|
||||
while (1)
|
||||
;
|
||||
}
|
||||
#include <linux/reboot.h>
|
||||
|
||||
void machine_shutdown(void)
|
||||
{
|
||||
@ -106,3 +32,12 @@ void machine_power_off(void)
|
||||
while (1)
|
||||
;
|
||||
}
|
||||
|
||||
void machine_restart(char *cmd)
|
||||
{
|
||||
do_kernel_restart(cmd);
|
||||
/* Give the restart hook 1 s to take us down */
|
||||
mdelay(1000);
|
||||
pr_emerg("Reboot failed -- System halted\n");
|
||||
while (1);
|
||||
}
|
||||
|
@ -4,217 +4,56 @@
|
||||
* Copyright (C) 2010 Michal Simek <monstr@monstr.eu>
|
||||
* Copyright (C) 2010 PetaLogix
|
||||
* Copyright (C) 2005 John Williams <jwilliams@itee.uq.edu.au>
|
||||
*
|
||||
* Based on PowerPC version derived from arch/arm/mm/consistent.c
|
||||
* Copyright (C) 2001 Dan Malek (dmalek@jlc.net)
|
||||
* Copyright (C) 2000 Russell King
|
||||
*/
|
||||
|
||||
#include <linux/export.h>
|
||||
#include <linux/signal.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/mman.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/swap.h>
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/gfp.h>
|
||||
#include <linux/dma-noncoherent.h>
|
||||
|
||||
#include <asm/pgalloc.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/hardirq.h>
|
||||
#include <linux/mmu_context.h>
|
||||
#include <asm/mmu.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/cpuinfo.h>
|
||||
#include <asm/tlbflush.h>
|
||||
#include <asm/cacheflush.h>
|
||||
|
||||
void arch_dma_prep_coherent(struct page *page, size_t size)
|
||||
{
|
||||
phys_addr_t paddr = page_to_phys(page);
|
||||
|
||||
flush_dcache_range(paddr, paddr + size);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
/* I have to use dcache values because I can't relate on ram size */
|
||||
/*
|
||||
* Consistent memory allocators. Used for DMA devices that want to share
|
||||
* uncached memory with the processor core. My crufty no-MMU approach is
|
||||
* simple. In the HW platform we can optionally mirror the DDR up above the
|
||||
* processor cacheable region. So, memory accessed in this mirror region will
|
||||
* not be cached. It's alloced from the same pool as normal memory, but the
|
||||
* handle we return is shifted up into the uncached region. This will no doubt
|
||||
* cause big problems if memory allocated here is not also freed properly. -- JW
|
||||
*
|
||||
* I have to use dcache values because I can't relate on ram size:
|
||||
*/
|
||||
#ifdef CONFIG_XILINX_UNCACHED_SHADOW
|
||||
#define UNCACHED_SHADOW_MASK (cpuinfo.dcache_high - cpuinfo.dcache_base + 1)
|
||||
#endif
|
||||
#else
|
||||
#define UNCACHED_SHADOW_MASK 0
|
||||
#endif /* CONFIG_XILINX_UNCACHED_SHADOW */
|
||||
|
||||
/*
|
||||
* Consistent memory allocators. Used for DMA devices that want to
|
||||
* share uncached memory with the processor core.
|
||||
* My crufty no-MMU approach is simple. In the HW platform we can optionally
|
||||
* mirror the DDR up above the processor cacheable region. So, memory accessed
|
||||
* in this mirror region will not be cached. It's alloced from the same
|
||||
* pool as normal memory, but the handle we return is shifted up into the
|
||||
* uncached region. This will no doubt cause big problems if memory allocated
|
||||
* here is not also freed properly. -- JW
|
||||
*/
|
||||
void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle,
|
||||
gfp_t gfp, unsigned long attrs)
|
||||
void *uncached_kernel_address(void *ptr)
|
||||
{
|
||||
unsigned long order, vaddr;
|
||||
void *ret;
|
||||
unsigned int i, err = 0;
|
||||
struct page *page, *end;
|
||||
unsigned long addr = (unsigned long)ptr;
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
phys_addr_t pa;
|
||||
struct vm_struct *area;
|
||||
unsigned long va;
|
||||
#endif
|
||||
|
||||
if (in_interrupt())
|
||||
BUG();
|
||||
|
||||
/* Only allocate page size areas. */
|
||||
size = PAGE_ALIGN(size);
|
||||
order = get_order(size);
|
||||
|
||||
vaddr = __get_free_pages(gfp | __GFP_ZERO, order);
|
||||
if (!vaddr)
|
||||
return NULL;
|
||||
|
||||
/*
|
||||
* we need to ensure that there are no cachelines in use,
|
||||
* or worse dirty in this area.
|
||||
*/
|
||||
flush_dcache_range(virt_to_phys((void *)vaddr),
|
||||
virt_to_phys((void *)vaddr) + size);
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
ret = (void *)vaddr;
|
||||
/*
|
||||
* Here's the magic! Note if the uncached shadow is not implemented,
|
||||
* it's up to the calling code to also test that condition and make
|
||||
* other arranegments, such as manually flushing the cache and so on.
|
||||
*/
|
||||
# ifdef CONFIG_XILINX_UNCACHED_SHADOW
|
||||
ret = (void *)((unsigned) ret | UNCACHED_SHADOW_MASK);
|
||||
# endif
|
||||
if ((unsigned int)ret > cpuinfo.dcache_base &&
|
||||
(unsigned int)ret < cpuinfo.dcache_high)
|
||||
addr |= UNCACHED_SHADOW_MASK;
|
||||
if (addr > cpuinfo.dcache_base && addr < cpuinfo.dcache_high)
|
||||
pr_warn("ERROR: Your cache coherent area is CACHED!!!\n");
|
||||
|
||||
/* dma_handle is same as physical (shadowed) address */
|
||||
*dma_handle = (dma_addr_t)ret;
|
||||
#else
|
||||
/* Allocate some common virtual space to map the new pages. */
|
||||
area = get_vm_area(size, VM_ALLOC);
|
||||
if (!area) {
|
||||
free_pages(vaddr, order);
|
||||
return NULL;
|
||||
}
|
||||
va = (unsigned long) area->addr;
|
||||
ret = (void *)va;
|
||||
|
||||
/* This gives us the real physical address of the first page. */
|
||||
*dma_handle = pa = __virt_to_phys(vaddr);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* free wasted pages. We skip the first page since we know
|
||||
* that it will have count = 1 and won't require freeing.
|
||||
* We also mark the pages in use as reserved so that
|
||||
* remap_page_range works.
|
||||
*/
|
||||
page = virt_to_page(vaddr);
|
||||
end = page + (1 << order);
|
||||
|
||||
split_page(page, order);
|
||||
|
||||
for (i = 0; i < size && err == 0; i += PAGE_SIZE) {
|
||||
#ifdef CONFIG_MMU
|
||||
/* MS: This is the whole magic - use cache inhibit pages */
|
||||
err = map_page(va + i, pa + i, _PAGE_KERNEL | _PAGE_NO_CACHE);
|
||||
#endif
|
||||
|
||||
SetPageReserved(page);
|
||||
page++;
|
||||
return (void *)addr;
|
||||
}
|
||||
|
||||
/* Free the otherwise unused pages. */
|
||||
while (page < end) {
|
||||
__free_page(page);
|
||||
page++;
|
||||
}
|
||||
|
||||
if (err) {
|
||||
free_pages(vaddr, order);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
static pte_t *consistent_virt_to_pte(void *vaddr)
|
||||
void *cached_kernel_address(void *ptr)
|
||||
{
|
||||
unsigned long addr = (unsigned long)vaddr;
|
||||
unsigned long addr = (unsigned long)ptr;
|
||||
|
||||
return pte_offset_kernel(pmd_offset(pgd_offset_k(addr), addr), addr);
|
||||
}
|
||||
|
||||
long arch_dma_coherent_to_pfn(struct device *dev, void *vaddr,
|
||||
dma_addr_t dma_addr)
|
||||
{
|
||||
pte_t *ptep = consistent_virt_to_pte(vaddr);
|
||||
|
||||
if (pte_none(*ptep) || !pte_present(*ptep))
|
||||
return 0;
|
||||
|
||||
return pte_pfn(*ptep);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* free page(s) as defined by the above mapping.
|
||||
*/
|
||||
void arch_dma_free(struct device *dev, size_t size, void *vaddr,
|
||||
dma_addr_t dma_addr, unsigned long attrs)
|
||||
{
|
||||
struct page *page;
|
||||
|
||||
if (in_interrupt())
|
||||
BUG();
|
||||
|
||||
size = PAGE_ALIGN(size);
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
/* Clear SHADOW_MASK bit in address, and free as per usual */
|
||||
# ifdef CONFIG_XILINX_UNCACHED_SHADOW
|
||||
vaddr = (void *)((unsigned)vaddr & ~UNCACHED_SHADOW_MASK);
|
||||
# endif
|
||||
page = virt_to_page(vaddr);
|
||||
|
||||
do {
|
||||
__free_reserved_page(page);
|
||||
page++;
|
||||
} while (size -= PAGE_SIZE);
|
||||
#else
|
||||
do {
|
||||
pte_t *ptep = consistent_virt_to_pte(vaddr);
|
||||
unsigned long pfn;
|
||||
|
||||
if (!pte_none(*ptep) && pte_present(*ptep)) {
|
||||
pfn = pte_pfn(*ptep);
|
||||
pte_clear(&init_mm, (unsigned int)vaddr, ptep);
|
||||
if (pfn_valid(pfn)) {
|
||||
page = pfn_to_page(pfn);
|
||||
__free_reserved_page(page);
|
||||
}
|
||||
}
|
||||
vaddr += PAGE_SIZE;
|
||||
} while (size -= PAGE_SIZE);
|
||||
|
||||
/* flush tlb */
|
||||
flush_tlb_all();
|
||||
#endif
|
||||
return (void *)(addr & ~UNCACHED_SHADOW_MASK);
|
||||
}
|
||||
#endif /* CONFIG_MMU */
|
||||
|
@ -44,10 +44,6 @@ unsigned long ioremap_base;
|
||||
unsigned long ioremap_bot;
|
||||
EXPORT_SYMBOL(ioremap_bot);
|
||||
|
||||
#ifndef CONFIG_SMP
|
||||
struct pgtable_cache_struct quicklists;
|
||||
#endif
|
||||
|
||||
static void __iomem *__ioremap(phys_addr_t addr, unsigned long size,
|
||||
unsigned long flags)
|
||||
{
|
||||
|
@ -5,7 +5,6 @@ config MIPS
|
||||
select ARCH_32BIT_OFF_T if !64BIT
|
||||
select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT
|
||||
select ARCH_CLOCKSOURCE_DATA
|
||||
select ARCH_HAS_ELF_RANDOMIZE
|
||||
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
|
||||
select ARCH_HAS_UBSAN_SANITIZE_ALL
|
||||
select ARCH_SUPPORTS_UPROBES
|
||||
@ -13,6 +12,7 @@ config MIPS
|
||||
select ARCH_USE_CMPXCHG_LOCKREF if 64BIT
|
||||
select ARCH_USE_QUEUED_RWLOCKS
|
||||
select ARCH_USE_QUEUED_SPINLOCKS
|
||||
select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
|
||||
select ARCH_WANT_IPC_PARSE_VERSION
|
||||
select BUILDTIME_EXTABLE_SORT
|
||||
select CLONE_BACKWARDS
|
||||
|
@ -108,7 +108,6 @@ extern unsigned long PCIBIOS_MIN_MEM;
|
||||
|
||||
#define HAVE_PCI_MMAP
|
||||
#define ARCH_GENERIC_PCI_MMAP_RESOURCE
|
||||
#define HAVE_ARCH_PCI_RESOURCE_TO_USER
|
||||
|
||||
/*
|
||||
* Dynamic DMA mapping stuff.
|
||||
|
@ -54,7 +54,7 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
|
||||
|
||||
#define __pte_free_tlb(tlb,pte,address) \
|
||||
do { \
|
||||
pgtable_page_dtor(pte); \
|
||||
pgtable_pte_page_dtor(pte); \
|
||||
tlb_remove_page((tlb), pte); \
|
||||
} while (0)
|
||||
|
||||
@ -105,8 +105,6 @@ static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud)
|
||||
|
||||
#endif /* __PAGETABLE_PUD_FOLDED */
|
||||
|
||||
#define check_pgt_cache() do { } while (0)
|
||||
|
||||
extern void pagetable_init(void);
|
||||
|
||||
#endif /* _ASM_PGALLOC_H */
|
||||
|
@ -661,9 +661,4 @@ pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
|
||||
#define HAVE_ARCH_UNMAPPED_AREA
|
||||
#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
|
||||
|
||||
/*
|
||||
* No page table caches to initialise
|
||||
*/
|
||||
#define pgtable_cache_init() do { } while (0)
|
||||
|
||||
#endif /* _ASM_PGTABLE_H */
|
||||
|
@ -29,11 +29,6 @@
|
||||
|
||||
extern unsigned int vced_count, vcei_count;
|
||||
|
||||
/*
|
||||
* MIPS does have an arch_pick_mmap_layout()
|
||||
*/
|
||||
#define HAVE_ARCH_PICK_MMAP_LAYOUT 1
|
||||
|
||||
#ifdef CONFIG_32BIT
|
||||
#ifdef CONFIG_KVM_GUEST
|
||||
/* User space process size is limited to 1GB in KVM Guest Mode */
|
||||
|
@ -95,6 +95,9 @@
|
||||
#define MADV_WIPEONFORK 18 /* Zero memory on fork, child only */
|
||||
#define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK */
|
||||
|
||||
#define MADV_COLD 20 /* deactivate these pages */
|
||||
#define MADV_PAGEOUT 21 /* reclaim these pages */
|
||||
|
||||
/* compatibility flags */
|
||||
#define MAP_FILE 0
|
||||
|
||||
|
@ -20,33 +20,6 @@
|
||||
unsigned long shm_align_mask = PAGE_SIZE - 1; /* Sane caches */
|
||||
EXPORT_SYMBOL(shm_align_mask);
|
||||
|
||||
/* gap between mmap and stack */
|
||||
#define MIN_GAP (128*1024*1024UL)
|
||||
#define MAX_GAP ((TASK_SIZE)/6*5)
|
||||
|
||||
static int mmap_is_legacy(struct rlimit *rlim_stack)
|
||||
{
|
||||
if (current->personality & ADDR_COMPAT_LAYOUT)
|
||||
return 1;
|
||||
|
||||
if (rlim_stack->rlim_cur == RLIM_INFINITY)
|
||||
return 1;
|
||||
|
||||
return sysctl_legacy_va_layout;
|
||||
}
|
||||
|
||||
static unsigned long mmap_base(unsigned long rnd, struct rlimit *rlim_stack)
|
||||
{
|
||||
unsigned long gap = rlim_stack->rlim_cur;
|
||||
|
||||
if (gap < MIN_GAP)
|
||||
gap = MIN_GAP;
|
||||
else if (gap > MAX_GAP)
|
||||
gap = MAX_GAP;
|
||||
|
||||
return PAGE_ALIGN(TASK_SIZE - gap - rnd);
|
||||
}
|
||||
|
||||
#define COLOUR_ALIGN(addr, pgoff) \
|
||||
((((addr) + shm_align_mask) & ~shm_align_mask) + \
|
||||
(((pgoff) << PAGE_SHIFT) & shm_align_mask))
|
||||
@ -144,63 +117,6 @@ unsigned long arch_get_unmapped_area_topdown(struct file *filp,
|
||||
addr0, len, pgoff, flags, DOWN);
|
||||
}
|
||||
|
||||
unsigned long arch_mmap_rnd(void)
|
||||
{
|
||||
unsigned long rnd;
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
if (TASK_IS_32BIT_ADDR)
|
||||
rnd = get_random_long() & ((1UL << mmap_rnd_compat_bits) - 1);
|
||||
else
|
||||
#endif /* CONFIG_COMPAT */
|
||||
rnd = get_random_long() & ((1UL << mmap_rnd_bits) - 1);
|
||||
|
||||
return rnd << PAGE_SHIFT;
|
||||
}
|
||||
|
||||
void arch_pick_mmap_layout(struct mm_struct *mm, struct rlimit *rlim_stack)
|
||||
{
|
||||
unsigned long random_factor = 0UL;
|
||||
|
||||
if (current->flags & PF_RANDOMIZE)
|
||||
random_factor = arch_mmap_rnd();
|
||||
|
||||
if (mmap_is_legacy(rlim_stack)) {
|
||||
mm->mmap_base = TASK_UNMAPPED_BASE + random_factor;
|
||||
mm->get_unmapped_area = arch_get_unmapped_area;
|
||||
} else {
|
||||
mm->mmap_base = mmap_base(random_factor, rlim_stack);
|
||||
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
|
||||
}
|
||||
}
|
||||
|
||||
static inline unsigned long brk_rnd(void)
|
||||
{
|
||||
unsigned long rnd = get_random_long();
|
||||
|
||||
rnd = rnd << PAGE_SHIFT;
|
||||
/* 8MB for 32bit, 256MB for 64bit */
|
||||
if (TASK_IS_32BIT_ADDR)
|
||||
rnd = rnd & 0x7ffffful;
|
||||
else
|
||||
rnd = rnd & 0xffffffful;
|
||||
|
||||
return rnd;
|
||||
}
|
||||
|
||||
unsigned long arch_randomize_brk(struct mm_struct *mm)
|
||||
{
|
||||
unsigned long base = mm->brk;
|
||||
unsigned long ret;
|
||||
|
||||
ret = PAGE_ALIGN(base + brk_rnd());
|
||||
|
||||
if (ret < mm->brk)
|
||||
return mm->brk;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool __virt_addr_valid(const volatile void *kaddr)
|
||||
{
|
||||
unsigned long vaddr = (unsigned long)kaddr;
|
||||
|
@ -23,8 +23,6 @@
|
||||
extern pgd_t *pgd_alloc(struct mm_struct *mm);
|
||||
extern void pgd_free(struct mm_struct *mm, pgd_t * pgd);
|
||||
|
||||
#define check_pgt_cache() do { } while (0)
|
||||
|
||||
static inline pgtable_t pte_alloc_one(struct mm_struct *mm)
|
||||
{
|
||||
pgtable_t pte;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user