Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/mediatek/mtk_eth_soc.c drivers/net/ethernet/qlogic/qed/qed_dcbx.c drivers/net/phy/Kconfig All conflicts were cases of overlapping commits. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
b20b378d49
3
.mailmap
3
.mailmap
|
@ -88,6 +88,7 @@ Kay Sievers <kay.sievers@vrfy.org>
|
||||||
Kenneth W Chen <kenneth.w.chen@intel.com>
|
Kenneth W Chen <kenneth.w.chen@intel.com>
|
||||||
Konstantin Khlebnikov <koct9i@gmail.com> <k.khlebnikov@samsung.com>
|
Konstantin Khlebnikov <koct9i@gmail.com> <k.khlebnikov@samsung.com>
|
||||||
Koushik <raghavendra.koushik@neterion.com>
|
Koushik <raghavendra.koushik@neterion.com>
|
||||||
|
Krzysztof Kozlowski <krzk@kernel.org> <k.kozlowski@samsung.com>
|
||||||
Krzysztof Kozlowski <krzk@kernel.org> <k.kozlowski.k@gmail.com>
|
Krzysztof Kozlowski <krzk@kernel.org> <k.kozlowski.k@gmail.com>
|
||||||
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
|
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
|
||||||
Leonid I Ananiev <leonid.i.ananiev@intel.com>
|
Leonid I Ananiev <leonid.i.ananiev@intel.com>
|
||||||
|
@ -158,6 +159,8 @@ Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
|
||||||
Viresh Kumar <vireshk@kernel.org> <viresh.kumar@st.com>
|
Viresh Kumar <vireshk@kernel.org> <viresh.kumar@st.com>
|
||||||
Viresh Kumar <vireshk@kernel.org> <viresh.linux@gmail.com>
|
Viresh Kumar <vireshk@kernel.org> <viresh.linux@gmail.com>
|
||||||
Viresh Kumar <vireshk@kernel.org> <viresh.kumar2@arm.com>
|
Viresh Kumar <vireshk@kernel.org> <viresh.kumar2@arm.com>
|
||||||
|
Vladimir Davydov <vdavydov.dev@gmail.com> <vdavydov@virtuozzo.com>
|
||||||
|
Vladimir Davydov <vdavydov.dev@gmail.com> <vdavydov@parallels.com>
|
||||||
Takashi YOSHII <takashi.yoshii.zj@renesas.com>
|
Takashi YOSHII <takashi.yoshii.zj@renesas.com>
|
||||||
Yusuke Goda <goda.yusuke@renesas.com>
|
Yusuke Goda <goda.yusuke@renesas.com>
|
||||||
Gustavo Padovan <gustavo@las.ic.unicamp.br>
|
Gustavo Padovan <gustavo@las.ic.unicamp.br>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Note: This documents additional properties of any device beyond what
|
# Note: This documents additional properties of any device beyond what
|
||||||
# is documented in Documentation/sysfs-rules.txt
|
# is documented in Documentation/sysfs-rules.txt
|
||||||
|
|
||||||
What: /sys/devices/*/of_path
|
What: /sys/devices/*/of_node
|
||||||
Date: February 2015
|
Date: February 2015
|
||||||
Contact: Device Tree mailing list <devicetree@vger.kernel.org>
|
Contact: Device Tree mailing list <devicetree@vger.kernel.org>
|
||||||
Description:
|
Description:
|
||||||
|
|
|
@ -124,7 +124,6 @@ initialization with a pointer to a structure describing the driver
|
||||||
|
|
||||||
The ID table is an array of struct pci_device_id entries ending with an
|
The ID table is an array of struct pci_device_id entries ending with an
|
||||||
all-zero entry. Definitions with static const are generally preferred.
|
all-zero entry. Definitions with static const are generally preferred.
|
||||||
Use of the deprecated macro DEFINE_PCI_DEVICE_TABLE should be avoided.
|
|
||||||
|
|
||||||
Each entry consists of:
|
Each entry consists of:
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,17 @@ and config2 fields of the perf_event_attr structure. The "events"
|
||||||
directory provides configuration templates for all documented
|
directory provides configuration templates for all documented
|
||||||
events, that can be used with perf tool. For example "xp_valid_flit"
|
events, that can be used with perf tool. For example "xp_valid_flit"
|
||||||
is an equivalent of "type=0x8,event=0x4". Other parameters must be
|
is an equivalent of "type=0x8,event=0x4". Other parameters must be
|
||||||
explicitly specified. For events originating from device, "node"
|
explicitly specified.
|
||||||
defines its index. All crosspoint events require "xp" (index),
|
|
||||||
"port" (device port number) and "vc" (virtual channel ID) and
|
|
||||||
"dir" (direction). Watchpoints (special "event" value 0xfe) also
|
|
||||||
require comparator values ("cmp_l" and "cmp_h") and "mask", being
|
|
||||||
index of the comparator mask.
|
|
||||||
|
|
||||||
|
For events originating from device, "node" defines its index.
|
||||||
|
|
||||||
|
Crosspoint PMU events require "xp" (index), "bus" (bus number)
|
||||||
|
and "vc" (virtual channel ID).
|
||||||
|
|
||||||
|
Crosspoint watchpoint-based events (special "event" value 0xfe)
|
||||||
|
require "xp" and "vc" as as above plus "port" (device port index),
|
||||||
|
"dir" (transmit/receive direction), comparator values ("cmp_l"
|
||||||
|
and "cmp_h") and "mask", being index of the comparator mask.
|
||||||
Masks are defined separately from the event description
|
Masks are defined separately from the event description
|
||||||
(due to limited number of the config values) in the "cmp_mask"
|
(due to limited number of the config values) in the "cmp_mask"
|
||||||
directory, with first 8 configurable by user and additional
|
directory, with first 8 configurable by user and additional
|
||||||
|
|
|
@ -103,7 +103,7 @@ Config Main Menu
|
||||||
Power management options (ACPI, APM) --->
|
Power management options (ACPI, APM) --->
|
||||||
CPU Frequency scaling --->
|
CPU Frequency scaling --->
|
||||||
[*] CPU Frequency scaling
|
[*] CPU Frequency scaling
|
||||||
<*> CPU frequency translation statistics
|
[*] CPU frequency translation statistics
|
||||||
[*] CPU frequency translation statistics details
|
[*] CPU frequency translation statistics details
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,11 @@ Required properties:
|
||||||
- vref-supply: The regulator supply ADC reference voltage.
|
- vref-supply: The regulator supply ADC reference voltage.
|
||||||
- #io-channel-cells: Should be 1, see ../iio-bindings.txt
|
- #io-channel-cells: Should be 1, see ../iio-bindings.txt
|
||||||
|
|
||||||
|
Optional properties:
|
||||||
|
- resets: Must contain an entry for each entry in reset-names if need support
|
||||||
|
this option. See ../reset/reset.txt for details.
|
||||||
|
- reset-names: Must include the name "saradc-apb".
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
saradc: saradc@2006c000 {
|
saradc: saradc@2006c000 {
|
||||||
compatible = "rockchip,saradc";
|
compatible = "rockchip,saradc";
|
||||||
|
@ -23,6 +28,8 @@ Example:
|
||||||
interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
|
clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
|
||||||
clock-names = "saradc", "apb_pclk";
|
clock-names = "saradc", "apb_pclk";
|
||||||
|
resets = <&cru SRST_SARADC>;
|
||||||
|
reset-names = "saradc-apb";
|
||||||
#io-channel-cells = <1>;
|
#io-channel-cells = <1>;
|
||||||
vref-supply = <&vcc18>;
|
vref-supply = <&vcc18>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,9 +42,6 @@ Optional properties:
|
||||||
- auto-flow-control: one way to enable automatic flow control support. The
|
- auto-flow-control: one way to enable automatic flow control support. The
|
||||||
driver is allowed to detect support for the capability even without this
|
driver is allowed to detect support for the capability even without this
|
||||||
property.
|
property.
|
||||||
- {rts,cts,dtr,dsr,rng,dcd}-gpios: specify a GPIO for RTS/CTS/DTR/DSR/RI/DCD
|
|
||||||
line respectively. It will use specified GPIO instead of the peripheral
|
|
||||||
function pin for the UART feature. If unsure, don't specify this property.
|
|
||||||
|
|
||||||
Note:
|
Note:
|
||||||
* fsl,ns16550:
|
* fsl,ns16550:
|
||||||
|
@ -66,19 +63,3 @@ Example:
|
||||||
interrupts = <10>;
|
interrupts = <10>;
|
||||||
reg-shift = <2>;
|
reg-shift = <2>;
|
||||||
};
|
};
|
||||||
|
|
||||||
Example for OMAP UART using GPIO-based modem control signals:
|
|
||||||
|
|
||||||
uart4: serial@49042000 {
|
|
||||||
compatible = "ti,omap3-uart";
|
|
||||||
reg = <0x49042000 0x400>;
|
|
||||||
interrupts = <80>;
|
|
||||||
ti,hwmods = "uart4";
|
|
||||||
clock-frequency = <48000000>;
|
|
||||||
cts-gpios = <&gpio3 5 GPIO_ACTIVE_LOW>;
|
|
||||||
rts-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>;
|
|
||||||
dtr-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
|
|
||||||
dsr-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
|
|
||||||
dcd-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
|
|
||||||
rng-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -183,12 +183,10 @@ The copy_up operation essentially creates a new, identical file and
|
||||||
moves it over to the old name. The new file may be on a different
|
moves it over to the old name. The new file may be on a different
|
||||||
filesystem, so both st_dev and st_ino of the file may change.
|
filesystem, so both st_dev and st_ino of the file may change.
|
||||||
|
|
||||||
Any open files referring to this inode will access the old data and
|
Any open files referring to this inode will access the old data.
|
||||||
metadata. Similarly any file locks obtained before copy_up will not
|
|
||||||
apply to the copied up file.
|
|
||||||
|
|
||||||
On a file opened with O_RDONLY fchmod(2), fchown(2), futimesat(2) and
|
Any file locks (and leases) obtained before copy_up will not apply
|
||||||
fsetxattr(2) will fail with EROFS.
|
to the copied up file.
|
||||||
|
|
||||||
If a file with multiple hard links is copied up, then this will
|
If a file with multiple hard links is copied up, then this will
|
||||||
"break" the link. Changes will not be propagated to other names
|
"break" the link. Changes will not be propagated to other names
|
||||||
|
|
|
@ -145,6 +145,11 @@ If you want to add slave support to the bus driver:
|
||||||
|
|
||||||
* Catch the slave interrupts and send appropriate i2c_slave_events to the backend.
|
* Catch the slave interrupts and send appropriate i2c_slave_events to the backend.
|
||||||
|
|
||||||
|
Note that most hardware supports being master _and_ slave on the same bus. So,
|
||||||
|
if you extend a bus driver, please make sure that the driver supports that as
|
||||||
|
well. In almost all cases, slave support does not need to disable the master
|
||||||
|
functionality.
|
||||||
|
|
||||||
Check the i2c-rcar driver as an example.
|
Check the i2c-rcar driver as an example.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,10 @@ functionality of their platform when planning to use this driver:
|
||||||
|
|
||||||
III. Module parameters
|
III. Module parameters
|
||||||
|
|
||||||
|
- 'dma_timeout' - DMA transfer completion timeout (in msec, default value 3000).
|
||||||
|
This parameter set a maximum completion wait time for SYNC mode DMA
|
||||||
|
transfer requests and for RIO_WAIT_FOR_ASYNC ioctl requests.
|
||||||
|
|
||||||
- 'dbg_level' - This parameter allows to control amount of debug information
|
- 'dbg_level' - This parameter allows to control amount of debug information
|
||||||
generated by this device driver. This parameter is formed by set of
|
generated by this device driver. This parameter is formed by set of
|
||||||
bit masks that correspond to the specific functional blocks.
|
bit masks that correspond to the specific functional blocks.
|
||||||
|
|
43
MAINTAINERS
43
MAINTAINERS
|
@ -807,6 +807,7 @@ M: Laura Abbott <labbott@redhat.com>
|
||||||
M: Sumit Semwal <sumit.semwal@linaro.org>
|
M: Sumit Semwal <sumit.semwal@linaro.org>
|
||||||
L: devel@driverdev.osuosl.org
|
L: devel@driverdev.osuosl.org
|
||||||
S: Supported
|
S: Supported
|
||||||
|
F: Documentation/devicetree/bindings/staging/ion/
|
||||||
F: drivers/staging/android/ion
|
F: drivers/staging/android/ion
|
||||||
F: drivers/staging/android/uapi/ion.h
|
F: drivers/staging/android/uapi/ion.h
|
||||||
F: drivers/staging/android/uapi/ion_test.h
|
F: drivers/staging/android/uapi/ion_test.h
|
||||||
|
@ -1632,7 +1633,7 @@ N: rockchip
|
||||||
|
|
||||||
ARM/SAMSUNG EXYNOS ARM ARCHITECTURES
|
ARM/SAMSUNG EXYNOS ARM ARCHITECTURES
|
||||||
M: Kukjin Kim <kgene@kernel.org>
|
M: Kukjin Kim <kgene@kernel.org>
|
||||||
M: Krzysztof Kozlowski <k.kozlowski@samsung.com>
|
M: Krzysztof Kozlowski <krzk@kernel.org>
|
||||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||||
L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
|
L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
@ -1652,7 +1653,6 @@ F: drivers/*/*s3c64xx*
|
||||||
F: drivers/*/*s5pv210*
|
F: drivers/*/*s5pv210*
|
||||||
F: drivers/memory/samsung/*
|
F: drivers/memory/samsung/*
|
||||||
F: drivers/soc/samsung/*
|
F: drivers/soc/samsung/*
|
||||||
F: drivers/spi/spi-s3c*
|
|
||||||
F: Documentation/arm/Samsung/
|
F: Documentation/arm/Samsung/
|
||||||
F: Documentation/devicetree/bindings/arm/samsung/
|
F: Documentation/devicetree/bindings/arm/samsung/
|
||||||
F: Documentation/devicetree/bindings/sram/samsung-sram.txt
|
F: Documentation/devicetree/bindings/sram/samsung-sram.txt
|
||||||
|
@ -1840,6 +1840,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git
|
||||||
ARM/UNIPHIER ARCHITECTURE
|
ARM/UNIPHIER ARCHITECTURE
|
||||||
M: Masahiro Yamada <yamada.masahiro@socionext.com>
|
M: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||||
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier.git
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: arch/arm/boot/dts/uniphier*
|
F: arch/arm/boot/dts/uniphier*
|
||||||
F: arch/arm/include/asm/hardware/cache-uniphier.h
|
F: arch/arm/include/asm/hardware/cache-uniphier.h
|
||||||
|
@ -2493,7 +2494,7 @@ F: include/net/bluetooth/
|
||||||
BONDING DRIVER
|
BONDING DRIVER
|
||||||
M: Jay Vosburgh <j.vosburgh@gmail.com>
|
M: Jay Vosburgh <j.vosburgh@gmail.com>
|
||||||
M: Veaceslav Falico <vfalico@gmail.com>
|
M: Veaceslav Falico <vfalico@gmail.com>
|
||||||
M: Andy Gospodarek <gospo@cumulusnetworks.com>
|
M: Andy Gospodarek <andy@greyhouse.net>
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
W: http://sourceforge.net/projects/bonding/
|
W: http://sourceforge.net/projects/bonding/
|
||||||
S: Supported
|
S: Supported
|
||||||
|
@ -3256,7 +3257,7 @@ F: kernel/cpuset.c
|
||||||
CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)
|
CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)
|
||||||
M: Johannes Weiner <hannes@cmpxchg.org>
|
M: Johannes Weiner <hannes@cmpxchg.org>
|
||||||
M: Michal Hocko <mhocko@kernel.org>
|
M: Michal Hocko <mhocko@kernel.org>
|
||||||
M: Vladimir Davydov <vdavydov@virtuozzo.com>
|
M: Vladimir Davydov <vdavydov.dev@gmail.com>
|
||||||
L: cgroups@vger.kernel.org
|
L: cgroups@vger.kernel.org
|
||||||
L: linux-mm@kvack.org
|
L: linux-mm@kvack.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
@ -3277,7 +3278,7 @@ S: Maintained
|
||||||
F: drivers/net/wan/cosa*
|
F: drivers/net/wan/cosa*
|
||||||
|
|
||||||
CPMAC ETHERNET DRIVER
|
CPMAC ETHERNET DRIVER
|
||||||
M: Florian Fainelli <florian@openwrt.org>
|
M: Florian Fainelli <f.fainelli@gmail.com>
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/net/ethernet/ti/cpmac.c
|
F: drivers/net/ethernet/ti/cpmac.c
|
||||||
|
@ -7473,7 +7474,8 @@ F: Documentation/devicetree/bindings/sound/max9860.txt
|
||||||
F: sound/soc/codecs/max9860.*
|
F: sound/soc/codecs/max9860.*
|
||||||
|
|
||||||
MAXIM MUIC CHARGER DRIVERS FOR EXYNOS BASED BOARDS
|
MAXIM MUIC CHARGER DRIVERS FOR EXYNOS BASED BOARDS
|
||||||
M: Krzysztof Kozlowski <k.kozlowski@samsung.com>
|
M: Krzysztof Kozlowski <krzk@kernel.org>
|
||||||
|
M: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
|
||||||
L: linux-pm@vger.kernel.org
|
L: linux-pm@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/power/max14577_charger.c
|
F: drivers/power/max14577_charger.c
|
||||||
|
@ -7489,7 +7491,8 @@ F: include/dt-bindings/*/*max77802.h
|
||||||
|
|
||||||
MAXIM PMIC AND MUIC DRIVERS FOR EXYNOS BASED BOARDS
|
MAXIM PMIC AND MUIC DRIVERS FOR EXYNOS BASED BOARDS
|
||||||
M: Chanwoo Choi <cw00.choi@samsung.com>
|
M: Chanwoo Choi <cw00.choi@samsung.com>
|
||||||
M: Krzysztof Kozlowski <k.kozlowski@samsung.com>
|
M: Krzysztof Kozlowski <krzk@kernel.org>
|
||||||
|
M: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
|
||||||
L: linux-kernel@vger.kernel.org
|
L: linux-kernel@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/*/max14577*.c
|
F: drivers/*/max14577*.c
|
||||||
|
@ -9255,7 +9258,7 @@ F: drivers/pinctrl/sh-pfc/
|
||||||
|
|
||||||
PIN CONTROLLER - SAMSUNG
|
PIN CONTROLLER - SAMSUNG
|
||||||
M: Tomasz Figa <tomasz.figa@gmail.com>
|
M: Tomasz Figa <tomasz.figa@gmail.com>
|
||||||
M: Krzysztof Kozlowski <k.kozlowski@samsung.com>
|
M: Krzysztof Kozlowski <krzk@kernel.org>
|
||||||
M: Sylwester Nawrocki <s.nawrocki@samsung.com>
|
M: Sylwester Nawrocki <s.nawrocki@samsung.com>
|
||||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||||
L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
|
L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
|
||||||
|
@ -10195,7 +10198,7 @@ S: Maintained
|
||||||
F: drivers/platform/x86/samsung-laptop.c
|
F: drivers/platform/x86/samsung-laptop.c
|
||||||
|
|
||||||
SAMSUNG AUDIO (ASoC) DRIVERS
|
SAMSUNG AUDIO (ASoC) DRIVERS
|
||||||
M: Krzysztof Kozlowski <k.kozlowski@samsung.com>
|
M: Krzysztof Kozlowski <krzk@kernel.org>
|
||||||
M: Sangbeom Kim <sbkim73@samsung.com>
|
M: Sangbeom Kim <sbkim73@samsung.com>
|
||||||
M: Sylwester Nawrocki <s.nawrocki@samsung.com>
|
M: Sylwester Nawrocki <s.nawrocki@samsung.com>
|
||||||
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
||||||
|
@ -10210,7 +10213,8 @@ F: drivers/video/fbdev/s3c-fb.c
|
||||||
|
|
||||||
SAMSUNG MULTIFUNCTION PMIC DEVICE DRIVERS
|
SAMSUNG MULTIFUNCTION PMIC DEVICE DRIVERS
|
||||||
M: Sangbeom Kim <sbkim73@samsung.com>
|
M: Sangbeom Kim <sbkim73@samsung.com>
|
||||||
M: Krzysztof Kozlowski <k.kozlowski@samsung.com>
|
M: Krzysztof Kozlowski <krzk@kernel.org>
|
||||||
|
M: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
|
||||||
L: linux-kernel@vger.kernel.org
|
L: linux-kernel@vger.kernel.org
|
||||||
L: linux-samsung-soc@vger.kernel.org
|
L: linux-samsung-soc@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
|
@ -10269,6 +10273,17 @@ S: Supported
|
||||||
L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
|
L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
|
||||||
F: drivers/clk/samsung/
|
F: drivers/clk/samsung/
|
||||||
|
|
||||||
|
SAMSUNG SPI DRIVERS
|
||||||
|
M: Kukjin Kim <kgene@kernel.org>
|
||||||
|
M: Krzysztof Kozlowski <krzk@kernel.org>
|
||||||
|
M: Andi Shyti <andi.shyti@samsung.com>
|
||||||
|
L: linux-spi@vger.kernel.org
|
||||||
|
L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
|
||||||
|
S: Maintained
|
||||||
|
F: Documentation/devicetree/bindings/spi/spi-samsung.txt
|
||||||
|
F: drivers/spi/spi-s3c*
|
||||||
|
F: include/linux/platform_data/spi-s3c64xx.h
|
||||||
|
|
||||||
SAMSUNG SXGBE DRIVERS
|
SAMSUNG SXGBE DRIVERS
|
||||||
M: Byungho An <bh74.an@samsung.com>
|
M: Byungho An <bh74.an@samsung.com>
|
||||||
M: Girish K S <ks.giri@samsung.com>
|
M: Girish K S <ks.giri@samsung.com>
|
||||||
|
@ -11248,12 +11263,8 @@ S: Odd Fixes
|
||||||
F: drivers/staging/vt665?/
|
F: drivers/staging/vt665?/
|
||||||
|
|
||||||
STAGING - WILC1000 WIFI DRIVER
|
STAGING - WILC1000 WIFI DRIVER
|
||||||
M: Johnny Kim <johnny.kim@atmel.com>
|
M: Aditya Shankar <aditya.shankar@microchip.com>
|
||||||
M: Austin Shin <austin.shin@atmel.com>
|
M: Ganesh Krishna <ganesh.krishna@microchip.com>
|
||||||
M: Chris Park <chris.park@atmel.com>
|
|
||||||
M: Tony Cho <tony.cho@atmel.com>
|
|
||||||
M: Glen Lee <glen.lee@atmel.com>
|
|
||||||
M: Leo Kim <leo.kim@atmel.com>
|
|
||||||
L: linux-wireless@vger.kernel.org
|
L: linux-wireless@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/staging/wilc1000/
|
F: drivers/staging/wilc1000/
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 8
|
PATCHLEVEL = 8
|
||||||
SUBLEVEL = 0
|
SUBLEVEL = 0
|
||||||
EXTRAVERSION = -rc4
|
EXTRAVERSION = -rc6
|
||||||
NAME = Psychotic Stoned Sheep
|
NAME = Psychotic Stoned Sheep
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
|
|
11
arch/Kconfig
11
arch/Kconfig
|
@ -336,17 +336,6 @@ config HAVE_ARCH_SECCOMP_FILTER
|
||||||
results in the system call being skipped immediately.
|
results in the system call being skipped immediately.
|
||||||
- seccomp syscall wired up
|
- seccomp syscall wired up
|
||||||
|
|
||||||
For best performance, an arch should use seccomp_phase1 and
|
|
||||||
seccomp_phase2 directly. It should call seccomp_phase1 for all
|
|
||||||
syscalls if TIF_SECCOMP is set, but seccomp_phase1 does not
|
|
||||||
need to be called from a ptrace-safe context. It must then
|
|
||||||
call seccomp_phase2 if seccomp_phase1 returns anything other
|
|
||||||
than SECCOMP_PHASE1_OK or SECCOMP_PHASE1_SKIP.
|
|
||||||
|
|
||||||
As an additional optimization, an arch may provide seccomp_data
|
|
||||||
directly to seccomp_phase1; this avoids multiple calls
|
|
||||||
to the syscall_xyz helpers for every syscall.
|
|
||||||
|
|
||||||
config SECCOMP_FILTER
|
config SECCOMP_FILTER
|
||||||
def_bool y
|
def_bool y
|
||||||
depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET
|
depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET
|
||||||
|
|
|
@ -226,7 +226,7 @@
|
||||||
|
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
elm_id = <&elm>;
|
ti,elm-id = <&elm>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,7 @@
|
||||||
|
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
elm_id = <&elm>;
|
ti,elm-id = <&elm>;
|
||||||
|
|
||||||
/* MTD partition table */
|
/* MTD partition table */
|
||||||
partition@0 {
|
partition@0 {
|
||||||
|
|
|
@ -197,7 +197,7 @@
|
||||||
gpmc,wr-access-ns = <30>;
|
gpmc,wr-access-ns = <30>;
|
||||||
gpmc,wr-data-mux-bus-ns = <0>;
|
gpmc,wr-data-mux-bus-ns = <0>;
|
||||||
|
|
||||||
elm_id = <&elm>;
|
ti,elm-id = <&elm>;
|
||||||
|
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
|
|
|
@ -390,12 +390,12 @@
|
||||||
|
|
||||||
port@0 {
|
port@0 {
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
label = "lan1";
|
label = "lan5";
|
||||||
};
|
};
|
||||||
|
|
||||||
port@1 {
|
port@1 {
|
||||||
reg = <1>;
|
reg = <1>;
|
||||||
label = "lan2";
|
label = "lan4";
|
||||||
};
|
};
|
||||||
|
|
||||||
port@2 {
|
port@2 {
|
||||||
|
@ -405,12 +405,12 @@
|
||||||
|
|
||||||
port@3 {
|
port@3 {
|
||||||
reg = <3>;
|
reg = <3>;
|
||||||
label = "lan4";
|
label = "lan2";
|
||||||
};
|
};
|
||||||
|
|
||||||
port@4 {
|
port@4 {
|
||||||
reg = <4>;
|
reg = <4>;
|
||||||
label = "lan5";
|
label = "lan1";
|
||||||
};
|
};
|
||||||
|
|
||||||
port@5 {
|
port@5 {
|
||||||
|
|
|
@ -447,14 +447,11 @@
|
||||||
samsung,dw-mshc-ciu-div = <3>;
|
samsung,dw-mshc-ciu-div = <3>;
|
||||||
samsung,dw-mshc-sdr-timing = <0 4>;
|
samsung,dw-mshc-sdr-timing = <0 4>;
|
||||||
samsung,dw-mshc-ddr-timing = <0 2>;
|
samsung,dw-mshc-ddr-timing = <0 2>;
|
||||||
samsung,dw-mshc-hs400-timing = <0 2>;
|
|
||||||
samsung,read-strobe-delay = <90>;
|
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8 &sd0_cd>;
|
pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8 &sd0_cd>;
|
||||||
bus-width = <8>;
|
bus-width = <8>;
|
||||||
cap-mmc-highspeed;
|
cap-mmc-highspeed;
|
||||||
mmc-hs200-1_8v;
|
mmc-hs200-1_8v;
|
||||||
mmc-hs400-1_8v;
|
|
||||||
vmmc-supply = <&ldo20_reg>;
|
vmmc-supply = <&ldo20_reg>;
|
||||||
vqmmc-supply = <&ldo11_reg>;
|
vqmmc-supply = <&ldo11_reg>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -243,7 +243,7 @@
|
||||||
clocks = <&clks IMX6QDL_CLK_SPDIF_GCLK>, <&clks IMX6QDL_CLK_OSC>,
|
clocks = <&clks IMX6QDL_CLK_SPDIF_GCLK>, <&clks IMX6QDL_CLK_OSC>,
|
||||||
<&clks IMX6QDL_CLK_SPDIF>, <&clks IMX6QDL_CLK_ASRC>,
|
<&clks IMX6QDL_CLK_SPDIF>, <&clks IMX6QDL_CLK_ASRC>,
|
||||||
<&clks IMX6QDL_CLK_DUMMY>, <&clks IMX6QDL_CLK_ESAI_EXTAL>,
|
<&clks IMX6QDL_CLK_DUMMY>, <&clks IMX6QDL_CLK_ESAI_EXTAL>,
|
||||||
<&clks IMX6QDL_CLK_IPG>, <&clks IMX6QDL_CLK_MLB>,
|
<&clks IMX6QDL_CLK_IPG>, <&clks IMX6QDL_CLK_DUMMY>,
|
||||||
<&clks IMX6QDL_CLK_DUMMY>, <&clks IMX6QDL_CLK_SPBA>;
|
<&clks IMX6QDL_CLK_DUMMY>, <&clks IMX6QDL_CLK_SPBA>;
|
||||||
clock-names = "core", "rxtx0",
|
clock-names = "core", "rxtx0",
|
||||||
"rxtx1", "rxtx2",
|
"rxtx1", "rxtx2",
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
cd-gpios = <&gpio7 11 GPIO_ACTIVE_LOW>;
|
cd-gpios = <&gpio7 11 GPIO_ACTIVE_LOW>;
|
||||||
no-1-8-v;
|
no-1-8-v;
|
||||||
keep-power-in-suspend;
|
keep-power-in-suspend;
|
||||||
enable-sdio-wakup;
|
wakeup-source;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,7 @@
|
||||||
ti,y-min = /bits/ 16 <0>;
|
ti,y-min = /bits/ 16 <0>;
|
||||||
ti,y-max = /bits/ 16 <0>;
|
ti,y-max = /bits/ 16 <0>;
|
||||||
ti,pressure-max = /bits/ 16 <0>;
|
ti,pressure-max = /bits/ 16 <0>;
|
||||||
ti,x-plat-ohms = /bits/ 16 <400>;
|
ti,x-plate-ohms = /bits/ 16 <400>;
|
||||||
wakeup-source;
|
wakeup-source;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
|
|
||||||
partition@e0000 {
|
partition@e0000 {
|
||||||
label = "u-boot environment";
|
label = "u-boot environment";
|
||||||
reg = <0xe0000 0x100000>;
|
reg = <0xe0000 0x20000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
partition@100000 {
|
partition@100000 {
|
||||||
|
|
|
@ -116,6 +116,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&pciec {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&pcie0 {
|
&pcie0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -35,10 +35,15 @@
|
||||||
ranges = <0 0 0x00000000 0x1000000>; /* CS0: 16MB for NAND */
|
ranges = <0 0 0x00000000 0x1000000>; /* CS0: 16MB for NAND */
|
||||||
|
|
||||||
nand@0,0 {
|
nand@0,0 {
|
||||||
linux,mtd-name = "micron,mt29f4g16abbda3w";
|
compatible = "ti,omap2-nand";
|
||||||
reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
|
reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
|
||||||
|
interrupt-parent = <&gpmc>;
|
||||||
|
interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
|
||||||
|
<1 IRQ_TYPE_NONE>; /* termcount */
|
||||||
|
linux,mtd-name = "micron,mt29f4g16abbda3w";
|
||||||
nand-bus-width = <16>;
|
nand-bus-width = <16>;
|
||||||
ti,nand-ecc-opt = "bch8";
|
ti,nand-ecc-opt = "bch8";
|
||||||
|
rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
|
||||||
gpmc,sync-clk-ps = <0>;
|
gpmc,sync-clk-ps = <0>;
|
||||||
gpmc,cs-on-ns = <0>;
|
gpmc,cs-on-ns = <0>;
|
||||||
gpmc,cs-rd-off-ns = <44>;
|
gpmc,cs-rd-off-ns = <44>;
|
||||||
|
@ -54,10 +59,6 @@
|
||||||
gpmc,wr-access-ns = <40>;
|
gpmc,wr-access-ns = <40>;
|
||||||
gpmc,wr-data-mux-bus-ns = <0>;
|
gpmc,wr-data-mux-bus-ns = <0>;
|
||||||
gpmc,device-width = <2>;
|
gpmc,device-width = <2>;
|
||||||
|
|
||||||
gpmc,page-burst-access-ns = <5>;
|
|
||||||
gpmc,cycle2cycle-delay-ns = <50>;
|
|
||||||
|
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
linux,mtd-name = "micron,mt29f4g16abbda3w";
|
linux,mtd-name = "micron,mt29f4g16abbda3w";
|
||||||
nand-bus-width = <16>;
|
nand-bus-width = <16>;
|
||||||
ti,nand-ecc-opt = "bch8";
|
ti,nand-ecc-opt = "bch8";
|
||||||
|
rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
|
||||||
gpmc,sync-clk-ps = <0>;
|
gpmc,sync-clk-ps = <0>;
|
||||||
gpmc,cs-on-ns = <0>;
|
gpmc,cs-on-ns = <0>;
|
||||||
gpmc,cs-rd-off-ns = <44>;
|
gpmc,cs-rd-off-ns = <44>;
|
||||||
|
|
|
@ -223,7 +223,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
&gpmc {
|
&gpmc {
|
||||||
ranges = <0 0 0x00000000 0x20000000>;
|
ranges = <0 0 0x30000000 0x1000000>, /* CS0 */
|
||||||
|
<4 0 0x2b000000 0x1000000>, /* CS4 */
|
||||||
|
<5 0 0x2c000000 0x1000000>; /* CS5 */
|
||||||
|
|
||||||
nand@0,0 {
|
nand@0,0 {
|
||||||
compatible = "ti,omap2-nand";
|
compatible = "ti,omap2-nand";
|
||||||
|
|
|
@ -55,8 +55,6 @@
|
||||||
#include "omap-gpmc-smsc9221.dtsi"
|
#include "omap-gpmc-smsc9221.dtsi"
|
||||||
|
|
||||||
&gpmc {
|
&gpmc {
|
||||||
ranges = <5 0 0x2c000000 0x1000000>; /* CS5 */
|
|
||||||
|
|
||||||
ethernet@gpmc {
|
ethernet@gpmc {
|
||||||
reg = <5 0 0xff>;
|
reg = <5 0 0xff>;
|
||||||
interrupt-parent = <&gpio6>;
|
interrupt-parent = <&gpio6>;
|
||||||
|
|
|
@ -27,8 +27,6 @@
|
||||||
#include "omap-gpmc-smsc9221.dtsi"
|
#include "omap-gpmc-smsc9221.dtsi"
|
||||||
|
|
||||||
&gpmc {
|
&gpmc {
|
||||||
ranges = <5 0 0x2c000000 0x1000000>; /* CS5 */
|
|
||||||
|
|
||||||
ethernet@gpmc {
|
ethernet@gpmc {
|
||||||
reg = <5 0 0xff>;
|
reg = <5 0 0xff>;
|
||||||
interrupt-parent = <&gpio6>;
|
interrupt-parent = <&gpio6>;
|
||||||
|
|
|
@ -15,9 +15,6 @@
|
||||||
#include "omap-gpmc-smsc9221.dtsi"
|
#include "omap-gpmc-smsc9221.dtsi"
|
||||||
|
|
||||||
&gpmc {
|
&gpmc {
|
||||||
ranges = <4 0 0x2b000000 0x1000000>, /* CS4 */
|
|
||||||
<5 0 0x2c000000 0x1000000>; /* CS5 */
|
|
||||||
|
|
||||||
smsc1: ethernet@gpmc {
|
smsc1: ethernet@gpmc {
|
||||||
reg = <5 0 0xff>;
|
reg = <5 0 0xff>;
|
||||||
interrupt-parent = <&gpio6>;
|
interrupt-parent = <&gpio6>;
|
||||||
|
|
|
@ -197,6 +197,8 @@
|
||||||
clock-names = "saradc", "apb_pclk";
|
clock-names = "saradc", "apb_pclk";
|
||||||
interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
#io-channel-cells = <1>;
|
#io-channel-cells = <1>;
|
||||||
|
resets = <&cru SRST_SARADC>;
|
||||||
|
reset-names = "saradc-apb";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -279,6 +279,8 @@
|
||||||
#io-channel-cells = <1>;
|
#io-channel-cells = <1>;
|
||||||
clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
|
clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
|
||||||
clock-names = "saradc", "apb_pclk";
|
clock-names = "saradc", "apb_pclk";
|
||||||
|
resets = <&cru SRST_SARADC>;
|
||||||
|
reset-names = "saradc-apb";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -399,6 +399,8 @@
|
||||||
#io-channel-cells = <1>;
|
#io-channel-cells = <1>;
|
||||||
clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
|
clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
|
||||||
clock-names = "saradc", "apb_pclk";
|
clock-names = "saradc", "apb_pclk";
|
||||||
|
resets = <&cru SRST_SARADC>;
|
||||||
|
reset-names = "saradc-apb";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
trips {
|
trips {
|
||||||
cpu_alert0: cpu_alert0 {
|
cpu_alert0: cpu_alert0 {
|
||||||
/* milliCelsius */
|
/* milliCelsius */
|
||||||
temperature = <850000>;
|
temperature = <85000>;
|
||||||
hysteresis = <2000>;
|
hysteresis = <2000>;
|
||||||
type = "passive";
|
type = "passive";
|
||||||
};
|
};
|
||||||
|
|
|
@ -897,7 +897,7 @@
|
||||||
palmas: tps65913@58 {
|
palmas: tps65913@58 {
|
||||||
compatible = "ti,palmas";
|
compatible = "ti,palmas";
|
||||||
reg = <0x58>;
|
reg = <0x58>;
|
||||||
interrupts = <0 86 IRQ_TYPE_LEVEL_LOW>;
|
interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
|
||||||
#interrupt-cells = <2>;
|
#interrupt-cells = <2>;
|
||||||
interrupt-controller;
|
interrupt-controller;
|
||||||
|
|
|
@ -802,7 +802,7 @@
|
||||||
palmas: pmic@58 {
|
palmas: pmic@58 {
|
||||||
compatible = "ti,palmas";
|
compatible = "ti,palmas";
|
||||||
reg = <0x58>;
|
reg = <0x58>;
|
||||||
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_LOW>;
|
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
|
||||||
#interrupt-cells = <2>;
|
#interrupt-cells = <2>;
|
||||||
interrupt-controller;
|
interrupt-controller;
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
palmas: pmic@58 {
|
palmas: pmic@58 {
|
||||||
compatible = "ti,palmas";
|
compatible = "ti,palmas";
|
||||||
reg = <0x58>;
|
reg = <0x58>;
|
||||||
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_LOW>;
|
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
|
||||||
#interrupt-cells = <2>;
|
#interrupt-cells = <2>;
|
||||||
interrupt-controller;
|
interrupt-controller;
|
||||||
|
|
|
@ -1382,7 +1382,7 @@
|
||||||
* Pin 41: BR_UART1_TXD
|
* Pin 41: BR_UART1_TXD
|
||||||
* Pin 44: BR_UART1_RXD
|
* Pin 44: BR_UART1_RXD
|
||||||
*/
|
*/
|
||||||
serial@0,70006000 {
|
serial@70006000 {
|
||||||
compatible = "nvidia,tegra124-hsuart", "nvidia,tegra30-hsuart";
|
compatible = "nvidia,tegra124-hsuart", "nvidia,tegra30-hsuart";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
@ -1394,7 +1394,7 @@
|
||||||
* Pin 71: UART2_CTS_L
|
* Pin 71: UART2_CTS_L
|
||||||
* Pin 74: UART2_RTS_L
|
* Pin 74: UART2_RTS_L
|
||||||
*/
|
*/
|
||||||
serial@0,70006040 {
|
serial@70006040 {
|
||||||
compatible = "nvidia,tegra124-hsuart", "nvidia,tegra30-hsuart";
|
compatible = "nvidia,tegra124-hsuart", "nvidia,tegra30-hsuart";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -142,6 +142,19 @@ ARM_BE8(orr r7, r7, #(1 << 25)) @ HSCTLR.EE
|
||||||
and r7, #0x1f @ Preserve HPMN
|
and r7, #0x1f @ Preserve HPMN
|
||||||
mcr p15, 4, r7, c1, c1, 1 @ HDCR
|
mcr p15, 4, r7, c1, c1, 1 @ HDCR
|
||||||
|
|
||||||
|
@ Make sure NS-SVC is initialised appropriately
|
||||||
|
mrc p15, 0, r7, c1, c0, 0 @ SCTLR
|
||||||
|
orr r7, #(1 << 5) @ CP15 barriers enabled
|
||||||
|
bic r7, #(3 << 7) @ Clear SED/ITD for v8 (RES0 for v7)
|
||||||
|
bic r7, #(3 << 19) @ WXN and UWXN disabled
|
||||||
|
mcr p15, 0, r7, c1, c0, 0 @ SCTLR
|
||||||
|
|
||||||
|
mrc p15, 0, r7, c0, c0, 0 @ MIDR
|
||||||
|
mcr p15, 4, r7, c0, c0, 0 @ VPIDR
|
||||||
|
|
||||||
|
mrc p15, 0, r7, c0, c0, 5 @ MPIDR
|
||||||
|
mcr p15, 4, r7, c0, c0, 5 @ VMPIDR
|
||||||
|
|
||||||
#if !defined(ZIMAGE) && defined(CONFIG_ARM_ARCH_TIMER)
|
#if !defined(ZIMAGE) && defined(CONFIG_ARM_ARCH_TIMER)
|
||||||
@ make CNTP_* and CNTPCT accessible from PL1
|
@ make CNTP_* and CNTPCT accessible from PL1
|
||||||
mrc p15, 0, r7, c0, c1, 1 @ ID_PFR1
|
mrc p15, 0, r7, c0, c1, 1 @ ID_PFR1
|
||||||
|
|
|
@ -64,6 +64,7 @@ static void __init imx6ul_init_machine(void)
|
||||||
if (parent == NULL)
|
if (parent == NULL)
|
||||||
pr_warn("failed to initialize soc device\n");
|
pr_warn("failed to initialize soc device\n");
|
||||||
|
|
||||||
|
of_platform_default_populate(NULL, NULL, parent);
|
||||||
imx6ul_enet_init();
|
imx6ul_enet_init();
|
||||||
imx_anatop_init();
|
imx_anatop_init();
|
||||||
imx6ul_pm_init();
|
imx6ul_pm_init();
|
||||||
|
|
|
@ -295,7 +295,7 @@ int imx6_set_lpm(enum mxc_cpu_pwr_mode mode)
|
||||||
val &= ~BM_CLPCR_SBYOS;
|
val &= ~BM_CLPCR_SBYOS;
|
||||||
if (cpu_is_imx6sl())
|
if (cpu_is_imx6sl())
|
||||||
val |= BM_CLPCR_BYPASS_PMIC_READY;
|
val |= BM_CLPCR_BYPASS_PMIC_READY;
|
||||||
if (cpu_is_imx6sl() || cpu_is_imx6sx())
|
if (cpu_is_imx6sl() || cpu_is_imx6sx() || cpu_is_imx6ul())
|
||||||
val |= BM_CLPCR_BYP_MMDC_CH0_LPM_HS;
|
val |= BM_CLPCR_BYP_MMDC_CH0_LPM_HS;
|
||||||
else
|
else
|
||||||
val |= BM_CLPCR_BYP_MMDC_CH1_LPM_HS;
|
val |= BM_CLPCR_BYP_MMDC_CH1_LPM_HS;
|
||||||
|
@ -310,7 +310,7 @@ int imx6_set_lpm(enum mxc_cpu_pwr_mode mode)
|
||||||
val |= 0x3 << BP_CLPCR_STBY_COUNT;
|
val |= 0x3 << BP_CLPCR_STBY_COUNT;
|
||||||
val |= BM_CLPCR_VSTBY;
|
val |= BM_CLPCR_VSTBY;
|
||||||
val |= BM_CLPCR_SBYOS;
|
val |= BM_CLPCR_SBYOS;
|
||||||
if (cpu_is_imx6sl())
|
if (cpu_is_imx6sl() || cpu_is_imx6sx())
|
||||||
val |= BM_CLPCR_BYPASS_PMIC_READY;
|
val |= BM_CLPCR_BYPASS_PMIC_READY;
|
||||||
if (cpu_is_imx6sl() || cpu_is_imx6sx() || cpu_is_imx6ul())
|
if (cpu_is_imx6sl() || cpu_is_imx6sx() || cpu_is_imx6ul())
|
||||||
val |= BM_CLPCR_BYP_MMDC_CH0_LPM_HS;
|
val |= BM_CLPCR_BYP_MMDC_CH0_LPM_HS;
|
||||||
|
|
|
@ -220,9 +220,6 @@ static int am33xx_cm_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs,
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
if (!clkctrl_offs)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
omap_test_timeout(_is_module_ready(inst, clkctrl_offs),
|
omap_test_timeout(_is_module_ready(inst, clkctrl_offs),
|
||||||
MAX_MODULE_READY_TIME, i);
|
MAX_MODULE_READY_TIME, i);
|
||||||
|
|
||||||
|
@ -246,9 +243,6 @@ static int am33xx_cm_wait_module_idle(u8 part, s16 inst, u16 clkctrl_offs,
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
if (!clkctrl_offs)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
omap_test_timeout((_clkctrl_idlest(inst, clkctrl_offs) ==
|
omap_test_timeout((_clkctrl_idlest(inst, clkctrl_offs) ==
|
||||||
CLKCTRL_IDLEST_DISABLED),
|
CLKCTRL_IDLEST_DISABLED),
|
||||||
MAX_MODULE_READY_TIME, i);
|
MAX_MODULE_READY_TIME, i);
|
||||||
|
|
|
@ -278,9 +278,6 @@ static int omap4_cminst_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs,
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
if (!clkctrl_offs)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
omap_test_timeout(_is_module_ready(part, inst, clkctrl_offs),
|
omap_test_timeout(_is_module_ready(part, inst, clkctrl_offs),
|
||||||
MAX_MODULE_READY_TIME, i);
|
MAX_MODULE_READY_TIME, i);
|
||||||
|
|
||||||
|
@ -304,9 +301,6 @@ static int omap4_cminst_wait_module_idle(u8 part, s16 inst, u16 clkctrl_offs,
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
if (!clkctrl_offs)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
omap_test_timeout((_clkctrl_idlest(part, inst, clkctrl_offs) ==
|
omap_test_timeout((_clkctrl_idlest(part, inst, clkctrl_offs) ==
|
||||||
CLKCTRL_IDLEST_DISABLED),
|
CLKCTRL_IDLEST_DISABLED),
|
||||||
MAX_MODULE_DISABLE_TIME, i);
|
MAX_MODULE_DISABLE_TIME, i);
|
||||||
|
|
|
@ -1053,6 +1053,10 @@ static int _omap4_wait_target_disable(struct omap_hwmod *oh)
|
||||||
if (oh->flags & HWMOD_NO_IDLEST)
|
if (oh->flags & HWMOD_NO_IDLEST)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (!oh->prcm.omap4.clkctrl_offs &&
|
||||||
|
!(oh->prcm.omap4.flags & HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET))
|
||||||
|
return 0;
|
||||||
|
|
||||||
return omap_cm_wait_module_idle(oh->clkdm->prcm_partition,
|
return omap_cm_wait_module_idle(oh->clkdm->prcm_partition,
|
||||||
oh->clkdm->cm_inst,
|
oh->clkdm->cm_inst,
|
||||||
oh->prcm.omap4.clkctrl_offs, 0);
|
oh->prcm.omap4.clkctrl_offs, 0);
|
||||||
|
@ -2971,6 +2975,10 @@ static int _omap4_wait_target_ready(struct omap_hwmod *oh)
|
||||||
if (!_find_mpu_rt_port(oh))
|
if (!_find_mpu_rt_port(oh))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (!oh->prcm.omap4.clkctrl_offs &&
|
||||||
|
!(oh->prcm.omap4.flags & HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET))
|
||||||
|
return 0;
|
||||||
|
|
||||||
/* XXX check module SIDLEMODE, hardreset status */
|
/* XXX check module SIDLEMODE, hardreset status */
|
||||||
|
|
||||||
return omap_cm_wait_module_ready(oh->clkdm->prcm_partition,
|
return omap_cm_wait_module_ready(oh->clkdm->prcm_partition,
|
||||||
|
|
|
@ -443,8 +443,12 @@ struct omap_hwmod_omap2_prcm {
|
||||||
* HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT: Some IP blocks don't have a PRCM
|
* HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT: Some IP blocks don't have a PRCM
|
||||||
* module-level context loss register associated with them; this
|
* module-level context loss register associated with them; this
|
||||||
* flag bit should be set in those cases
|
* flag bit should be set in those cases
|
||||||
|
* HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET: Some IP blocks have a valid CLKCTRL
|
||||||
|
* offset of zero; this flag bit should be set in those cases to
|
||||||
|
* distinguish from hwmods that have no clkctrl offset.
|
||||||
*/
|
*/
|
||||||
#define HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT (1 << 0)
|
#define HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT (1 << 0)
|
||||||
|
#define HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET (1 << 1)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data
|
* struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#define CLKCTRL(oh, clkctrl) ((oh).prcm.omap4.clkctrl_offs = (clkctrl))
|
#define CLKCTRL(oh, clkctrl) ((oh).prcm.omap4.clkctrl_offs = (clkctrl))
|
||||||
#define RSTCTRL(oh, rstctrl) ((oh).prcm.omap4.rstctrl_offs = (rstctrl))
|
#define RSTCTRL(oh, rstctrl) ((oh).prcm.omap4.rstctrl_offs = (rstctrl))
|
||||||
#define RSTST(oh, rstst) ((oh).prcm.omap4.rstst_offs = (rstst))
|
#define RSTST(oh, rstst) ((oh).prcm.omap4.rstst_offs = (rstst))
|
||||||
|
#define PRCM_FLAGS(oh, flag) ((oh).prcm.omap4.flags = (flag))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 'l3' class
|
* 'l3' class
|
||||||
|
@ -1296,6 +1297,7 @@ static void omap_hwmod_am33xx_clkctrl(void)
|
||||||
CLKCTRL(am33xx_i2c1_hwmod, AM33XX_CM_WKUP_I2C0_CLKCTRL_OFFSET);
|
CLKCTRL(am33xx_i2c1_hwmod, AM33XX_CM_WKUP_I2C0_CLKCTRL_OFFSET);
|
||||||
CLKCTRL(am33xx_wd_timer1_hwmod, AM33XX_CM_WKUP_WDT1_CLKCTRL_OFFSET);
|
CLKCTRL(am33xx_wd_timer1_hwmod, AM33XX_CM_WKUP_WDT1_CLKCTRL_OFFSET);
|
||||||
CLKCTRL(am33xx_rtc_hwmod, AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET);
|
CLKCTRL(am33xx_rtc_hwmod, AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET);
|
||||||
|
PRCM_FLAGS(am33xx_rtc_hwmod, HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET);
|
||||||
CLKCTRL(am33xx_mmc2_hwmod, AM33XX_CM_PER_MMC2_CLKCTRL_OFFSET);
|
CLKCTRL(am33xx_mmc2_hwmod, AM33XX_CM_PER_MMC2_CLKCTRL_OFFSET);
|
||||||
CLKCTRL(am33xx_gpmc_hwmod, AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET);
|
CLKCTRL(am33xx_gpmc_hwmod, AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET);
|
||||||
CLKCTRL(am33xx_l4_ls_hwmod, AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET);
|
CLKCTRL(am33xx_l4_ls_hwmod, AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET);
|
||||||
|
|
|
@ -722,8 +722,20 @@ static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
|
||||||
* display serial interface controller
|
* display serial interface controller
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static struct omap_hwmod_class_sysconfig omap3xxx_dsi_sysc = {
|
||||||
|
.rev_offs = 0x0000,
|
||||||
|
.sysc_offs = 0x0010,
|
||||||
|
.syss_offs = 0x0014,
|
||||||
|
.sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
|
||||||
|
SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
|
||||||
|
SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
|
||||||
|
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
|
||||||
|
.sysc_fields = &omap_hwmod_sysc_type1,
|
||||||
|
};
|
||||||
|
|
||||||
static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
|
static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
|
||||||
.name = "dsi",
|
.name = "dsi",
|
||||||
|
.sysc = &omap3xxx_dsi_sysc,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
|
static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
|
||||||
|
|
|
@ -125,6 +125,8 @@ static unsigned long clk_36864_get_rate(struct clk *clk)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct clkops clk_36864_ops = {
|
static struct clkops clk_36864_ops = {
|
||||||
|
.enable = clk_cpu_enable,
|
||||||
|
.disable = clk_cpu_disable,
|
||||||
.get_rate = clk_36864_get_rate,
|
.get_rate = clk_36864_get_rate,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -140,9 +142,8 @@ static struct clk_lookup sa11xx_clkregs[] = {
|
||||||
CLKDEV_INIT(NULL, "OSTIMER0", &clk_36864),
|
CLKDEV_INIT(NULL, "OSTIMER0", &clk_36864),
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init sa11xx_clk_init(void)
|
int __init sa11xx_clk_init(void)
|
||||||
{
|
{
|
||||||
clkdev_add_table(sa11xx_clkregs, ARRAY_SIZE(sa11xx_clkregs));
|
clkdev_add_table(sa11xx_clkregs, ARRAY_SIZE(sa11xx_clkregs));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
core_initcall(sa11xx_clk_init);
|
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
|
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
#include <mach/irqs.h>
|
#include <mach/irqs.h>
|
||||||
|
#include <mach/reset.h>
|
||||||
|
|
||||||
#include "generic.h"
|
#include "generic.h"
|
||||||
#include <clocksource/pxa.h>
|
#include <clocksource/pxa.h>
|
||||||
|
@ -95,6 +96,8 @@ static void sa1100_power_off(void)
|
||||||
|
|
||||||
void sa11x0_restart(enum reboot_mode mode, const char *cmd)
|
void sa11x0_restart(enum reboot_mode mode, const char *cmd)
|
||||||
{
|
{
|
||||||
|
clear_reset_status(RESET_STATUS_ALL);
|
||||||
|
|
||||||
if (mode == REBOOT_SOFT) {
|
if (mode == REBOOT_SOFT) {
|
||||||
/* Jump into ROM at address 0 */
|
/* Jump into ROM at address 0 */
|
||||||
soft_restart(0);
|
soft_restart(0);
|
||||||
|
@ -388,6 +391,7 @@ void __init sa1100_init_irq(void)
|
||||||
sa11x0_init_irq_nodt(IRQ_GPIO0_SC, irq_resource.start);
|
sa11x0_init_irq_nodt(IRQ_GPIO0_SC, irq_resource.start);
|
||||||
|
|
||||||
sa1100_init_gpio();
|
sa1100_init_gpio();
|
||||||
|
sa11xx_clk_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -44,3 +44,5 @@ int sa11x0_pm_init(void);
|
||||||
#else
|
#else
|
||||||
static inline int sa11x0_pm_init(void) { return 0; }
|
static inline int sa11x0_pm_init(void) { return 0; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int sa11xx_clk_init(void);
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include <asm/hwcap.h>
|
#include <asm/hwcap.h>
|
||||||
#include <asm/pgtable-hwdef.h>
|
#include <asm/pgtable-hwdef.h>
|
||||||
#include <asm/pgtable.h>
|
#include <asm/pgtable.h>
|
||||||
|
#include <asm/memory.h>
|
||||||
|
|
||||||
#include "proc-macros.S"
|
#include "proc-macros.S"
|
||||||
|
|
||||||
|
|
|
@ -270,6 +270,8 @@
|
||||||
#io-channel-cells = <1>;
|
#io-channel-cells = <1>;
|
||||||
clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
|
clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
|
||||||
clock-names = "saradc", "apb_pclk";
|
clock-names = "saradc", "apb_pclk";
|
||||||
|
resets = <&cru SRST_SARADC>;
|
||||||
|
reset-names = "saradc-apb";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -199,19 +199,19 @@ static inline unsigned long __percpu_xchg(void *ptr, unsigned long val,
|
||||||
#define _percpu_read(pcp) \
|
#define _percpu_read(pcp) \
|
||||||
({ \
|
({ \
|
||||||
typeof(pcp) __retval; \
|
typeof(pcp) __retval; \
|
||||||
preempt_disable(); \
|
preempt_disable_notrace(); \
|
||||||
__retval = (typeof(pcp))__percpu_read(raw_cpu_ptr(&(pcp)), \
|
__retval = (typeof(pcp))__percpu_read(raw_cpu_ptr(&(pcp)), \
|
||||||
sizeof(pcp)); \
|
sizeof(pcp)); \
|
||||||
preempt_enable(); \
|
preempt_enable_notrace(); \
|
||||||
__retval; \
|
__retval; \
|
||||||
})
|
})
|
||||||
|
|
||||||
#define _percpu_write(pcp, val) \
|
#define _percpu_write(pcp, val) \
|
||||||
do { \
|
do { \
|
||||||
preempt_disable(); \
|
preempt_disable_notrace(); \
|
||||||
__percpu_write(raw_cpu_ptr(&(pcp)), (unsigned long)(val), \
|
__percpu_write(raw_cpu_ptr(&(pcp)), (unsigned long)(val), \
|
||||||
sizeof(pcp)); \
|
sizeof(pcp)); \
|
||||||
preempt_enable(); \
|
preempt_enable_notrace(); \
|
||||||
} while(0) \
|
} while(0) \
|
||||||
|
|
||||||
#define _pcp_protect(operation, pcp, val) \
|
#define _pcp_protect(operation, pcp, val) \
|
||||||
|
|
|
@ -363,4 +363,14 @@ static inline int arch_read_trylock(arch_rwlock_t *rw)
|
||||||
#define arch_read_relax(lock) cpu_relax()
|
#define arch_read_relax(lock) cpu_relax()
|
||||||
#define arch_write_relax(lock) cpu_relax()
|
#define arch_write_relax(lock) cpu_relax()
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accesses appearing in program order before a spin_lock() operation
|
||||||
|
* can be reordered with accesses inside the critical section, by virtue
|
||||||
|
* of arch_spin_lock being constructed using acquire semantics.
|
||||||
|
*
|
||||||
|
* In cases where this is problematic (e.g. try_to_wake_up), an
|
||||||
|
* smp_mb__before_spinlock() can restore the required ordering.
|
||||||
|
*/
|
||||||
|
#define smp_mb__before_spinlock() smp_mb()
|
||||||
|
|
||||||
#endif /* __ASM_SPINLOCK_H */
|
#endif /* __ASM_SPINLOCK_H */
|
||||||
|
|
|
@ -100,7 +100,16 @@ ENTRY(cpu_do_resume)
|
||||||
|
|
||||||
msr tcr_el1, x8
|
msr tcr_el1, x8
|
||||||
msr vbar_el1, x9
|
msr vbar_el1, x9
|
||||||
|
|
||||||
|
/*
|
||||||
|
* __cpu_setup() cleared MDSCR_EL1.MDE and friends, before unmasking
|
||||||
|
* debug exceptions. By restoring MDSCR_EL1 here, we may take a debug
|
||||||
|
* exception. Mask them until local_dbg_restore() in cpu_suspend()
|
||||||
|
* resets them.
|
||||||
|
*/
|
||||||
|
disable_dbg
|
||||||
msr mdscr_el1, x10
|
msr mdscr_el1, x10
|
||||||
|
|
||||||
msr sctlr_el1, x12
|
msr sctlr_el1, x12
|
||||||
/*
|
/*
|
||||||
* Restore oslsr_el1 by writing oslar_el1
|
* Restore oslsr_el1 by writing oslar_el1
|
||||||
|
|
|
@ -241,8 +241,7 @@ extern unsigned long __must_check __copy_user (void __user *to, const void __use
|
||||||
static inline unsigned long
|
static inline unsigned long
|
||||||
__copy_to_user (void __user *to, const void *from, unsigned long count)
|
__copy_to_user (void __user *to, const void *from, unsigned long count)
|
||||||
{
|
{
|
||||||
if (!__builtin_constant_p(count))
|
check_object_size(from, count, true);
|
||||||
check_object_size(from, count, true);
|
|
||||||
|
|
||||||
return __copy_user(to, (__force void __user *) from, count);
|
return __copy_user(to, (__force void __user *) from, count);
|
||||||
}
|
}
|
||||||
|
@ -250,8 +249,7 @@ __copy_to_user (void __user *to, const void *from, unsigned long count)
|
||||||
static inline unsigned long
|
static inline unsigned long
|
||||||
__copy_from_user (void *to, const void __user *from, unsigned long count)
|
__copy_from_user (void *to, const void __user *from, unsigned long count)
|
||||||
{
|
{
|
||||||
if (!__builtin_constant_p(count))
|
check_object_size(to, count, false);
|
||||||
check_object_size(to, count, false);
|
|
||||||
|
|
||||||
return __copy_user((__force void __user *) to, from, count);
|
return __copy_user((__force void __user *) to, from, count);
|
||||||
}
|
}
|
||||||
|
@ -265,8 +263,7 @@ __copy_from_user (void *to, const void __user *from, unsigned long count)
|
||||||
long __cu_len = (n); \
|
long __cu_len = (n); \
|
||||||
\
|
\
|
||||||
if (__access_ok(__cu_to, __cu_len, get_fs())) { \
|
if (__access_ok(__cu_to, __cu_len, get_fs())) { \
|
||||||
if (!__builtin_constant_p(n)) \
|
check_object_size(__cu_from, __cu_len, true); \
|
||||||
check_object_size(__cu_from, __cu_len, true); \
|
|
||||||
__cu_len = __copy_user(__cu_to, (__force void __user *) __cu_from, __cu_len); \
|
__cu_len = __copy_user(__cu_to, (__force void __user *) __cu_from, __cu_len); \
|
||||||
} \
|
} \
|
||||||
__cu_len; \
|
__cu_len; \
|
||||||
|
@ -280,8 +277,7 @@ __copy_from_user (void *to, const void __user *from, unsigned long count)
|
||||||
\
|
\
|
||||||
__chk_user_ptr(__cu_from); \
|
__chk_user_ptr(__cu_from); \
|
||||||
if (__access_ok(__cu_from, __cu_len, get_fs())) { \
|
if (__access_ok(__cu_from, __cu_len, get_fs())) { \
|
||||||
if (!__builtin_constant_p(n)) \
|
check_object_size(__cu_to, __cu_len, false); \
|
||||||
check_object_size(__cu_to, __cu_len, false); \
|
|
||||||
__cu_len = __copy_user((__force void __user *) __cu_to, __cu_from, __cu_len); \
|
__cu_len = __copy_user((__force void __user *) __cu_to, __cu_from, __cu_len); \
|
||||||
} \
|
} \
|
||||||
__cu_len; \
|
__cu_len; \
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
config PARISC
|
config PARISC
|
||||||
def_bool y
|
def_bool y
|
||||||
select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
|
|
||||||
select ARCH_MIGHT_HAVE_PC_PARPORT
|
select ARCH_MIGHT_HAVE_PC_PARPORT
|
||||||
select HAVE_IDE
|
select HAVE_IDE
|
||||||
select HAVE_OPROFILE
|
select HAVE_OPROFILE
|
||||||
|
|
|
@ -245,7 +245,6 @@ CONFIG_DEBUG_RT_MUTEXES=y
|
||||||
CONFIG_PROVE_RCU_DELAY=y
|
CONFIG_PROVE_RCU_DELAY=y
|
||||||
CONFIG_DEBUG_BLOCK_EXT_DEVT=y
|
CONFIG_DEBUG_BLOCK_EXT_DEVT=y
|
||||||
CONFIG_LATENCYTOP=y
|
CONFIG_LATENCYTOP=y
|
||||||
CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y
|
|
||||||
CONFIG_KEYS=y
|
CONFIG_KEYS=y
|
||||||
# CONFIG_CRYPTO_HW is not set
|
# CONFIG_CRYPTO_HW is not set
|
||||||
CONFIG_FONTS=y
|
CONFIG_FONTS=y
|
||||||
|
|
|
@ -291,7 +291,6 @@ CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
|
||||||
CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
|
CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
|
||||||
# CONFIG_SCHED_DEBUG is not set
|
# CONFIG_SCHED_DEBUG is not set
|
||||||
CONFIG_TIMER_STATS=y
|
CONFIG_TIMER_STATS=y
|
||||||
CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y
|
|
||||||
CONFIG_CRYPTO_MANAGER=y
|
CONFIG_CRYPTO_MANAGER=y
|
||||||
CONFIG_CRYPTO_ECB=m
|
CONFIG_CRYPTO_ECB=m
|
||||||
CONFIG_CRYPTO_PCBC=m
|
CONFIG_CRYPTO_PCBC=m
|
||||||
|
|
|
@ -208,13 +208,13 @@ unsigned long copy_in_user(void __user *dst, const void __user *src, unsigned lo
|
||||||
#define __copy_to_user_inatomic __copy_to_user
|
#define __copy_to_user_inatomic __copy_to_user
|
||||||
#define __copy_from_user_inatomic __copy_from_user
|
#define __copy_from_user_inatomic __copy_from_user
|
||||||
|
|
||||||
extern void copy_from_user_overflow(void)
|
extern void __compiletime_error("usercopy buffer size is too small")
|
||||||
#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
|
__bad_copy_user(void);
|
||||||
__compiletime_error("copy_from_user() buffer size is not provably correct")
|
|
||||||
#else
|
static inline void copy_user_overflow(int size, unsigned long count)
|
||||||
__compiletime_warning("copy_from_user() buffer size is not provably correct")
|
{
|
||||||
#endif
|
WARN(1, "Buffer overflow detected (%d < %lu)!\n", size, count);
|
||||||
;
|
}
|
||||||
|
|
||||||
static inline unsigned long __must_check copy_from_user(void *to,
|
static inline unsigned long __must_check copy_from_user(void *to,
|
||||||
const void __user *from,
|
const void __user *from,
|
||||||
|
@ -223,10 +223,12 @@ static inline unsigned long __must_check copy_from_user(void *to,
|
||||||
int sz = __compiletime_object_size(to);
|
int sz = __compiletime_object_size(to);
|
||||||
int ret = -EFAULT;
|
int ret = -EFAULT;
|
||||||
|
|
||||||
if (likely(sz == -1 || !__builtin_constant_p(n) || sz >= n))
|
if (likely(sz == -1 || sz >= n))
|
||||||
ret = __copy_from_user(to, from, n);
|
ret = __copy_from_user(to, from, n);
|
||||||
else
|
else if (!__builtin_constant_p(n))
|
||||||
copy_from_user_overflow();
|
copy_user_overflow(sz, n);
|
||||||
|
else
|
||||||
|
__bad_copy_user();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -311,14 +311,12 @@ static inline unsigned long copy_from_user(void *to,
|
||||||
unsigned long over;
|
unsigned long over;
|
||||||
|
|
||||||
if (access_ok(VERIFY_READ, from, n)) {
|
if (access_ok(VERIFY_READ, from, n)) {
|
||||||
if (!__builtin_constant_p(n))
|
check_object_size(to, n, false);
|
||||||
check_object_size(to, n, false);
|
|
||||||
return __copy_tofrom_user((__force void __user *)to, from, n);
|
return __copy_tofrom_user((__force void __user *)to, from, n);
|
||||||
}
|
}
|
||||||
if ((unsigned long)from < TASK_SIZE) {
|
if ((unsigned long)from < TASK_SIZE) {
|
||||||
over = (unsigned long)from + n - TASK_SIZE;
|
over = (unsigned long)from + n - TASK_SIZE;
|
||||||
if (!__builtin_constant_p(n - over))
|
check_object_size(to, n - over, false);
|
||||||
check_object_size(to, n - over, false);
|
|
||||||
return __copy_tofrom_user((__force void __user *)to, from,
|
return __copy_tofrom_user((__force void __user *)to, from,
|
||||||
n - over) + over;
|
n - over) + over;
|
||||||
}
|
}
|
||||||
|
@ -331,14 +329,12 @@ static inline unsigned long copy_to_user(void __user *to,
|
||||||
unsigned long over;
|
unsigned long over;
|
||||||
|
|
||||||
if (access_ok(VERIFY_WRITE, to, n)) {
|
if (access_ok(VERIFY_WRITE, to, n)) {
|
||||||
if (!__builtin_constant_p(n))
|
check_object_size(from, n, true);
|
||||||
check_object_size(from, n, true);
|
|
||||||
return __copy_tofrom_user(to, (__force void __user *)from, n);
|
return __copy_tofrom_user(to, (__force void __user *)from, n);
|
||||||
}
|
}
|
||||||
if ((unsigned long)to < TASK_SIZE) {
|
if ((unsigned long)to < TASK_SIZE) {
|
||||||
over = (unsigned long)to + n - TASK_SIZE;
|
over = (unsigned long)to + n - TASK_SIZE;
|
||||||
if (!__builtin_constant_p(n))
|
check_object_size(from, n - over, true);
|
||||||
check_object_size(from, n - over, true);
|
|
||||||
return __copy_tofrom_user(to, (__force void __user *)from,
|
return __copy_tofrom_user(to, (__force void __user *)from,
|
||||||
n - over) + over;
|
n - over) + over;
|
||||||
}
|
}
|
||||||
|
@ -383,8 +379,7 @@ static inline unsigned long __copy_from_user_inatomic(void *to,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!__builtin_constant_p(n))
|
check_object_size(to, n, false);
|
||||||
check_object_size(to, n, false);
|
|
||||||
|
|
||||||
return __copy_tofrom_user((__force void __user *)to, from, n);
|
return __copy_tofrom_user((__force void __user *)to, from, n);
|
||||||
}
|
}
|
||||||
|
@ -412,8 +407,8 @@ static inline unsigned long __copy_to_user_inatomic(void __user *to,
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (!__builtin_constant_p(n))
|
|
||||||
check_object_size(from, n, true);
|
check_object_size(from, n, true);
|
||||||
|
|
||||||
return __copy_tofrom_user(to, (__force const void __user *)from, n);
|
return __copy_tofrom_user(to, (__force const void __user *)from, n);
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,18 +127,19 @@ _GLOBAL(csum_partial_copy_generic)
|
||||||
stw r7,12(r1)
|
stw r7,12(r1)
|
||||||
stw r8,8(r1)
|
stw r8,8(r1)
|
||||||
|
|
||||||
rlwinm r0,r4,3,0x8
|
|
||||||
rlwnm r6,r6,r0,0,31 /* odd destination address: rotate one byte */
|
|
||||||
cmplwi cr7,r0,0 /* is destination address even ? */
|
|
||||||
addic r12,r6,0
|
addic r12,r6,0
|
||||||
addi r6,r4,-4
|
addi r6,r4,-4
|
||||||
neg r0,r4
|
neg r0,r4
|
||||||
addi r4,r3,-4
|
addi r4,r3,-4
|
||||||
andi. r0,r0,CACHELINE_MASK /* # bytes to start of cache line */
|
andi. r0,r0,CACHELINE_MASK /* # bytes to start of cache line */
|
||||||
|
crset 4*cr7+eq
|
||||||
beq 58f
|
beq 58f
|
||||||
|
|
||||||
cmplw 0,r5,r0 /* is this more than total to do? */
|
cmplw 0,r5,r0 /* is this more than total to do? */
|
||||||
blt 63f /* if not much to do */
|
blt 63f /* if not much to do */
|
||||||
|
rlwinm r7,r6,3,0x8
|
||||||
|
rlwnm r12,r12,r7,0,31 /* odd destination address: rotate one byte */
|
||||||
|
cmplwi cr7,r7,0 /* is destination address even ? */
|
||||||
andi. r8,r0,3 /* get it word-aligned first */
|
andi. r8,r0,3 /* get it word-aligned first */
|
||||||
mtctr r8
|
mtctr r8
|
||||||
beq+ 61f
|
beq+ 61f
|
||||||
|
|
|
@ -113,7 +113,12 @@ BEGIN_FTR_SECTION
|
||||||
END_MMU_FTR_SECTION_IFCLR(MMU_FTR_1T_SEGMENT)
|
END_MMU_FTR_SECTION_IFCLR(MMU_FTR_1T_SEGMENT)
|
||||||
b slb_finish_load_1T
|
b slb_finish_load_1T
|
||||||
|
|
||||||
0:
|
0: /*
|
||||||
|
* For userspace addresses, make sure this is region 0.
|
||||||
|
*/
|
||||||
|
cmpdi r9, 0
|
||||||
|
bne 8f
|
||||||
|
|
||||||
/* when using slices, we extract the psize off the slice bitmaps
|
/* when using slices, we extract the psize off the slice bitmaps
|
||||||
* and then we need to get the sllp encoding off the mmu_psize_defs
|
* and then we need to get the sllp encoding off the mmu_psize_defs
|
||||||
* array.
|
* array.
|
||||||
|
|
|
@ -162,11 +162,12 @@ static struct pnv_ioda_pe *pnv_ioda_alloc_pe(struct pnv_phb *phb)
|
||||||
static void pnv_ioda_free_pe(struct pnv_ioda_pe *pe)
|
static void pnv_ioda_free_pe(struct pnv_ioda_pe *pe)
|
||||||
{
|
{
|
||||||
struct pnv_phb *phb = pe->phb;
|
struct pnv_phb *phb = pe->phb;
|
||||||
|
unsigned int pe_num = pe->pe_number;
|
||||||
|
|
||||||
WARN_ON(pe->pdev);
|
WARN_ON(pe->pdev);
|
||||||
|
|
||||||
memset(pe, 0, sizeof(struct pnv_ioda_pe));
|
memset(pe, 0, sizeof(struct pnv_ioda_pe));
|
||||||
clear_bit(pe->pe_number, phb->ioda.pe_alloc);
|
clear_bit(pe_num, phb->ioda.pe_alloc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The default M64 BAR is shared by all PEs */
|
/* The default M64 BAR is shared by all PEs */
|
||||||
|
@ -3402,12 +3403,6 @@ static void pnv_ioda_release_pe(struct pnv_ioda_pe *pe)
|
||||||
struct pnv_phb *phb = pe->phb;
|
struct pnv_phb *phb = pe->phb;
|
||||||
struct pnv_ioda_pe *slave, *tmp;
|
struct pnv_ioda_pe *slave, *tmp;
|
||||||
|
|
||||||
/* Release slave PEs in compound PE */
|
|
||||||
if (pe->flags & PNV_IODA_PE_MASTER) {
|
|
||||||
list_for_each_entry_safe(slave, tmp, &pe->slaves, list)
|
|
||||||
pnv_ioda_release_pe(slave);
|
|
||||||
}
|
|
||||||
|
|
||||||
list_del(&pe->list);
|
list_del(&pe->list);
|
||||||
switch (phb->type) {
|
switch (phb->type) {
|
||||||
case PNV_PHB_IODA1:
|
case PNV_PHB_IODA1:
|
||||||
|
@ -3422,6 +3417,15 @@ static void pnv_ioda_release_pe(struct pnv_ioda_pe *pe)
|
||||||
|
|
||||||
pnv_ioda_release_pe_seg(pe);
|
pnv_ioda_release_pe_seg(pe);
|
||||||
pnv_ioda_deconfigure_pe(pe->phb, pe);
|
pnv_ioda_deconfigure_pe(pe->phb, pe);
|
||||||
|
|
||||||
|
/* Release slave PEs in the compound PE */
|
||||||
|
if (pe->flags & PNV_IODA_PE_MASTER) {
|
||||||
|
list_for_each_entry_safe(slave, tmp, &pe->slaves, list) {
|
||||||
|
list_del(&slave->list);
|
||||||
|
pnv_ioda_free_pe(slave);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pnv_ioda_free_pe(pe);
|
pnv_ioda_free_pe(pe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
#include <linux/root_dev.h>
|
#include <linux/root_dev.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/of_pci.h>
|
#include <linux/of_pci.h>
|
||||||
#include <linux/kexec.h>
|
|
||||||
|
|
||||||
#include <asm/mmu.h>
|
#include <asm/mmu.h>
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
|
@ -66,6 +65,7 @@
|
||||||
#include <asm/eeh.h>
|
#include <asm/eeh.h>
|
||||||
#include <asm/reg.h>
|
#include <asm/reg.h>
|
||||||
#include <asm/plpar_wrappers.h>
|
#include <asm/plpar_wrappers.h>
|
||||||
|
#include <asm/kexec.h>
|
||||||
|
|
||||||
#include "pseries.h"
|
#include "pseries.h"
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
|
|
||||||
static void icp_opal_teardown_cpu(void)
|
static void icp_opal_teardown_cpu(void)
|
||||||
{
|
{
|
||||||
int cpu = smp_processor_id();
|
int hw_cpu = hard_smp_processor_id();
|
||||||
|
|
||||||
/* Clear any pending IPI */
|
/* Clear any pending IPI */
|
||||||
opal_int_set_mfrr(cpu, 0xff);
|
opal_int_set_mfrr(hw_cpu, 0xff);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void icp_opal_flush_ipi(void)
|
static void icp_opal_flush_ipi(void)
|
||||||
|
@ -101,14 +101,16 @@ static void icp_opal_eoi(struct irq_data *d)
|
||||||
|
|
||||||
static void icp_opal_cause_ipi(int cpu, unsigned long data)
|
static void icp_opal_cause_ipi(int cpu, unsigned long data)
|
||||||
{
|
{
|
||||||
opal_int_set_mfrr(cpu, IPI_PRIORITY);
|
int hw_cpu = get_hard_smp_processor_id(cpu);
|
||||||
|
|
||||||
|
opal_int_set_mfrr(hw_cpu, IPI_PRIORITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
static irqreturn_t icp_opal_ipi_action(int irq, void *dev_id)
|
static irqreturn_t icp_opal_ipi_action(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
int cpu = smp_processor_id();
|
int hw_cpu = hard_smp_processor_id();
|
||||||
|
|
||||||
opal_int_set_mfrr(cpu, 0xff);
|
opal_int_set_mfrr(hw_cpu, 0xff);
|
||||||
|
|
||||||
return smp_ipi_demux();
|
return smp_ipi_demux();
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,6 @@ config DEBUG_RODATA
|
||||||
config S390
|
config S390
|
||||||
def_bool y
|
def_bool y
|
||||||
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
|
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
|
||||||
select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
|
|
||||||
select ARCH_HAS_DEVMEM_IS_ALLOWED
|
select ARCH_HAS_DEVMEM_IS_ALLOWED
|
||||||
select ARCH_HAS_ELF_RANDOMIZE
|
select ARCH_HAS_ELF_RANDOMIZE
|
||||||
select ARCH_HAS_GCOV_PROFILE_ALL
|
select ARCH_HAS_GCOV_PROFILE_ALL
|
||||||
|
|
|
@ -602,7 +602,6 @@ CONFIG_FAIL_FUTEX=y
|
||||||
CONFIG_FAULT_INJECTION_DEBUG_FS=y
|
CONFIG_FAULT_INJECTION_DEBUG_FS=y
|
||||||
CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
|
CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
|
||||||
CONFIG_LATENCYTOP=y
|
CONFIG_LATENCYTOP=y
|
||||||
CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y
|
|
||||||
CONFIG_IRQSOFF_TRACER=y
|
CONFIG_IRQSOFF_TRACER=y
|
||||||
CONFIG_PREEMPT_TRACER=y
|
CONFIG_PREEMPT_TRACER=y
|
||||||
CONFIG_SCHED_TRACER=y
|
CONFIG_SCHED_TRACER=y
|
||||||
|
|
|
@ -552,7 +552,6 @@ CONFIG_NOTIFIER_ERROR_INJECTION=m
|
||||||
CONFIG_CPU_NOTIFIER_ERROR_INJECT=m
|
CONFIG_CPU_NOTIFIER_ERROR_INJECT=m
|
||||||
CONFIG_PM_NOTIFIER_ERROR_INJECT=m
|
CONFIG_PM_NOTIFIER_ERROR_INJECT=m
|
||||||
CONFIG_LATENCYTOP=y
|
CONFIG_LATENCYTOP=y
|
||||||
CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y
|
|
||||||
CONFIG_BLK_DEV_IO_TRACE=y
|
CONFIG_BLK_DEV_IO_TRACE=y
|
||||||
# CONFIG_KPROBE_EVENT is not set
|
# CONFIG_KPROBE_EVENT is not set
|
||||||
CONFIG_TRACE_ENUM_MAP_FILE=y
|
CONFIG_TRACE_ENUM_MAP_FILE=y
|
||||||
|
|
|
@ -549,7 +549,6 @@ CONFIG_TIMER_STATS=y
|
||||||
CONFIG_RCU_TORTURE_TEST=m
|
CONFIG_RCU_TORTURE_TEST=m
|
||||||
CONFIG_RCU_CPU_STALL_TIMEOUT=60
|
CONFIG_RCU_CPU_STALL_TIMEOUT=60
|
||||||
CONFIG_LATENCYTOP=y
|
CONFIG_LATENCYTOP=y
|
||||||
CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y
|
|
||||||
CONFIG_SCHED_TRACER=y
|
CONFIG_SCHED_TRACER=y
|
||||||
CONFIG_FTRACE_SYSCALLS=y
|
CONFIG_FTRACE_SYSCALLS=y
|
||||||
CONFIG_STACK_TRACER=y
|
CONFIG_STACK_TRACER=y
|
||||||
|
|
|
@ -172,7 +172,6 @@ CONFIG_DEBUG_NOTIFIERS=y
|
||||||
CONFIG_RCU_CPU_STALL_TIMEOUT=60
|
CONFIG_RCU_CPU_STALL_TIMEOUT=60
|
||||||
CONFIG_RCU_TRACE=y
|
CONFIG_RCU_TRACE=y
|
||||||
CONFIG_LATENCYTOP=y
|
CONFIG_LATENCYTOP=y
|
||||||
CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y
|
|
||||||
CONFIG_SCHED_TRACER=y
|
CONFIG_SCHED_TRACER=y
|
||||||
CONFIG_FTRACE_SYSCALLS=y
|
CONFIG_FTRACE_SYSCALLS=y
|
||||||
CONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP=y
|
CONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP=y
|
||||||
|
|
|
@ -311,6 +311,14 @@ int __get_user_bad(void) __attribute__((noreturn));
|
||||||
#define __put_user_unaligned __put_user
|
#define __put_user_unaligned __put_user
|
||||||
#define __get_user_unaligned __get_user
|
#define __get_user_unaligned __get_user
|
||||||
|
|
||||||
|
extern void __compiletime_error("usercopy buffer size is too small")
|
||||||
|
__bad_copy_user(void);
|
||||||
|
|
||||||
|
static inline void copy_user_overflow(int size, unsigned long count)
|
||||||
|
{
|
||||||
|
WARN(1, "Buffer overflow detected (%d < %lu)!\n", size, count);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* copy_to_user: - Copy a block of data into user space.
|
* copy_to_user: - Copy a block of data into user space.
|
||||||
* @to: Destination address, in user space.
|
* @to: Destination address, in user space.
|
||||||
|
@ -332,12 +340,6 @@ copy_to_user(void __user *to, const void *from, unsigned long n)
|
||||||
return __copy_to_user(to, from, n);
|
return __copy_to_user(to, from, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
void copy_from_user_overflow(void)
|
|
||||||
#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
|
|
||||||
__compiletime_warning("copy_from_user() buffer size is not provably correct")
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* copy_from_user: - Copy a block of data from user space.
|
* copy_from_user: - Copy a block of data from user space.
|
||||||
* @to: Destination address, in kernel space.
|
* @to: Destination address, in kernel space.
|
||||||
|
@ -362,7 +364,10 @@ copy_from_user(void *to, const void __user *from, unsigned long n)
|
||||||
|
|
||||||
might_fault();
|
might_fault();
|
||||||
if (unlikely(sz != -1 && sz < n)) {
|
if (unlikely(sz != -1 && sz < n)) {
|
||||||
copy_from_user_overflow();
|
if (!__builtin_constant_p(n))
|
||||||
|
copy_user_overflow(sz, n);
|
||||||
|
else
|
||||||
|
__bad_copy_user();
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
return __copy_from_user(to, from, n);
|
return __copy_from_user(to, from, n);
|
||||||
|
|
|
@ -249,8 +249,7 @@ unsigned long __copy_user(void __user *to, const void __user *from, unsigned lon
|
||||||
static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n)
|
static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n)
|
||||||
{
|
{
|
||||||
if (n && __access_ok((unsigned long) to, n)) {
|
if (n && __access_ok((unsigned long) to, n)) {
|
||||||
if (!__builtin_constant_p(n))
|
check_object_size(from, n, true);
|
||||||
check_object_size(from, n, true);
|
|
||||||
return __copy_user(to, (__force void __user *) from, n);
|
return __copy_user(to, (__force void __user *) from, n);
|
||||||
} else
|
} else
|
||||||
return n;
|
return n;
|
||||||
|
@ -258,16 +257,14 @@ static inline unsigned long copy_to_user(void __user *to, const void *from, unsi
|
||||||
|
|
||||||
static inline unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n)
|
static inline unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n)
|
||||||
{
|
{
|
||||||
if (!__builtin_constant_p(n))
|
check_object_size(from, n, true);
|
||||||
check_object_size(from, n, true);
|
|
||||||
return __copy_user(to, (__force void __user *) from, n);
|
return __copy_user(to, (__force void __user *) from, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n)
|
static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n)
|
||||||
{
|
{
|
||||||
if (n && __access_ok((unsigned long) from, n)) {
|
if (n && __access_ok((unsigned long) from, n)) {
|
||||||
if (!__builtin_constant_p(n))
|
check_object_size(to, n, false);
|
||||||
check_object_size(to, n, false);
|
|
||||||
return __copy_user((__force void __user *) to, from, n);
|
return __copy_user((__force void __user *) to, from, n);
|
||||||
} else
|
} else
|
||||||
return n;
|
return n;
|
||||||
|
|
|
@ -212,8 +212,7 @@ copy_from_user(void *to, const void __user *from, unsigned long size)
|
||||||
{
|
{
|
||||||
unsigned long ret;
|
unsigned long ret;
|
||||||
|
|
||||||
if (!__builtin_constant_p(size))
|
check_object_size(to, size, false);
|
||||||
check_object_size(to, size, false);
|
|
||||||
|
|
||||||
ret = ___copy_from_user(to, from, size);
|
ret = ___copy_from_user(to, from, size);
|
||||||
if (unlikely(ret))
|
if (unlikely(ret))
|
||||||
|
@ -233,8 +232,8 @@ copy_to_user(void __user *to, const void *from, unsigned long size)
|
||||||
{
|
{
|
||||||
unsigned long ret;
|
unsigned long ret;
|
||||||
|
|
||||||
if (!__builtin_constant_p(size))
|
check_object_size(from, size, true);
|
||||||
check_object_size(from, size, true);
|
|
||||||
ret = ___copy_to_user(to, from, size);
|
ret = ___copy_to_user(to, from, size);
|
||||||
if (unlikely(ret))
|
if (unlikely(ret))
|
||||||
ret = copy_to_user_fixup(to, from, size);
|
ret = copy_to_user_fixup(to, from, size);
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
config TILE
|
config TILE
|
||||||
def_bool y
|
def_bool y
|
||||||
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
|
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
|
||||||
select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
|
|
||||||
select ARCH_HAS_DEVMEM_IS_ALLOWED
|
select ARCH_HAS_DEVMEM_IS_ALLOWED
|
||||||
select ARCH_HAVE_NMI_SAFE_CMPXCHG
|
select ARCH_HAVE_NMI_SAFE_CMPXCHG
|
||||||
select ARCH_WANT_FRAME_POINTERS
|
select ARCH_WANT_FRAME_POINTERS
|
||||||
|
|
|
@ -416,14 +416,13 @@ _copy_from_user(void *to, const void __user *from, unsigned long n)
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
|
extern void __compiletime_error("usercopy buffer size is too small")
|
||||||
/*
|
__bad_copy_user(void);
|
||||||
* There are still unprovable places in the generic code as of 2.6.34, so this
|
|
||||||
* option is not really compatible with -Werror, which is more useful in
|
static inline void copy_user_overflow(int size, unsigned long count)
|
||||||
* general.
|
{
|
||||||
*/
|
WARN(1, "Buffer overflow detected (%d < %lu)!\n", size, count);
|
||||||
extern void copy_from_user_overflow(void)
|
}
|
||||||
__compiletime_warning("copy_from_user() size is not provably correct");
|
|
||||||
|
|
||||||
static inline unsigned long __must_check copy_from_user(void *to,
|
static inline unsigned long __must_check copy_from_user(void *to,
|
||||||
const void __user *from,
|
const void __user *from,
|
||||||
|
@ -433,14 +432,13 @@ static inline unsigned long __must_check copy_from_user(void *to,
|
||||||
|
|
||||||
if (likely(sz == -1 || sz >= n))
|
if (likely(sz == -1 || sz >= n))
|
||||||
n = _copy_from_user(to, from, n);
|
n = _copy_from_user(to, from, n);
|
||||||
|
else if (!__builtin_constant_p(n))
|
||||||
|
copy_user_overflow(sz, n);
|
||||||
else
|
else
|
||||||
copy_from_user_overflow();
|
__bad_copy_user();
|
||||||
|
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
#define copy_from_user _copy_from_user
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __tilegx__
|
#ifdef __tilegx__
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -21,21 +21,17 @@ void handle_syscall(struct uml_pt_regs *r)
|
||||||
PT_REGS_SET_SYSCALL_RETURN(regs, -ENOSYS);
|
PT_REGS_SET_SYSCALL_RETURN(regs, -ENOSYS);
|
||||||
|
|
||||||
if (syscall_trace_enter(regs))
|
if (syscall_trace_enter(regs))
|
||||||
return;
|
goto out;
|
||||||
|
|
||||||
/* Do the seccomp check after ptrace; failures should be fast. */
|
/* Do the seccomp check after ptrace; failures should be fast. */
|
||||||
if (secure_computing(NULL) == -1)
|
if (secure_computing(NULL) == -1)
|
||||||
return;
|
goto out;
|
||||||
|
|
||||||
/* Update the syscall number after orig_ax has potentially been updated
|
|
||||||
* with ptrace.
|
|
||||||
*/
|
|
||||||
UPT_SYSCALL_NR(r) = PT_SYSCALL_NR(r->gp);
|
|
||||||
syscall = UPT_SYSCALL_NR(r);
|
syscall = UPT_SYSCALL_NR(r);
|
||||||
|
|
||||||
if (syscall >= 0 && syscall <= __NR_syscall_max)
|
if (syscall >= 0 && syscall <= __NR_syscall_max)
|
||||||
PT_REGS_SET_SYSCALL_RETURN(regs,
|
PT_REGS_SET_SYSCALL_RETURN(regs,
|
||||||
EXECUTE_SYSCALL(syscall, regs));
|
EXECUTE_SYSCALL(syscall, regs));
|
||||||
|
|
||||||
|
out:
|
||||||
syscall_trace_leave(regs);
|
syscall_trace_leave(regs);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,6 @@ config X86
|
||||||
select ARCH_DISCARD_MEMBLOCK
|
select ARCH_DISCARD_MEMBLOCK
|
||||||
select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
|
select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
|
||||||
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
|
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
|
||||||
select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
|
|
||||||
select ARCH_HAS_DEVMEM_IS_ALLOWED
|
select ARCH_HAS_DEVMEM_IS_ALLOWED
|
||||||
select ARCH_HAS_ELF_RANDOMIZE
|
select ARCH_HAS_ELF_RANDOMIZE
|
||||||
select ARCH_HAS_FAST_MULTIPLIER
|
select ARCH_HAS_FAST_MULTIPLIER
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
CONFIG_NOHIGHMEM=y
|
CONFIG_NOHIGHMEM=y
|
||||||
|
# CONFIG_HIGHMEM4G is not set
|
||||||
|
# CONFIG_HIGHMEM64G is not set
|
||||||
|
|
|
@ -697,44 +697,15 @@ unsigned long __must_check _copy_from_user(void *to, const void __user *from,
|
||||||
unsigned long __must_check _copy_to_user(void __user *to, const void *from,
|
unsigned long __must_check _copy_to_user(void __user *to, const void *from,
|
||||||
unsigned n);
|
unsigned n);
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
|
extern void __compiletime_error("usercopy buffer size is too small")
|
||||||
# define copy_user_diag __compiletime_error
|
__bad_copy_user(void);
|
||||||
#else
|
|
||||||
# define copy_user_diag __compiletime_warning
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void copy_user_diag("copy_from_user() buffer size is too small")
|
static inline void copy_user_overflow(int size, unsigned long count)
|
||||||
copy_from_user_overflow(void);
|
|
||||||
extern void copy_user_diag("copy_to_user() buffer size is too small")
|
|
||||||
copy_to_user_overflow(void) __asm__("copy_from_user_overflow");
|
|
||||||
|
|
||||||
#undef copy_user_diag
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
|
|
||||||
|
|
||||||
extern void
|
|
||||||
__compiletime_warning("copy_from_user() buffer size is not provably correct")
|
|
||||||
__copy_from_user_overflow(void) __asm__("copy_from_user_overflow");
|
|
||||||
#define __copy_from_user_overflow(size, count) __copy_from_user_overflow()
|
|
||||||
|
|
||||||
extern void
|
|
||||||
__compiletime_warning("copy_to_user() buffer size is not provably correct")
|
|
||||||
__copy_to_user_overflow(void) __asm__("copy_from_user_overflow");
|
|
||||||
#define __copy_to_user_overflow(size, count) __copy_to_user_overflow()
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
static inline void
|
|
||||||
__copy_from_user_overflow(int size, unsigned long count)
|
|
||||||
{
|
{
|
||||||
WARN(1, "Buffer overflow detected (%d < %lu)!\n", size, count);
|
WARN(1, "Buffer overflow detected (%d < %lu)!\n", size, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __copy_to_user_overflow __copy_from_user_overflow
|
static __always_inline unsigned long __must_check
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static inline unsigned long __must_check
|
|
||||||
copy_from_user(void *to, const void __user *from, unsigned long n)
|
copy_from_user(void *to, const void __user *from, unsigned long n)
|
||||||
{
|
{
|
||||||
int sz = __compiletime_object_size(to);
|
int sz = __compiletime_object_size(to);
|
||||||
|
@ -743,36 +714,18 @@ copy_from_user(void *to, const void __user *from, unsigned long n)
|
||||||
|
|
||||||
kasan_check_write(to, n);
|
kasan_check_write(to, n);
|
||||||
|
|
||||||
/*
|
|
||||||
* While we would like to have the compiler do the checking for us
|
|
||||||
* even in the non-constant size case, any false positives there are
|
|
||||||
* a problem (especially when DEBUG_STRICT_USER_COPY_CHECKS, but even
|
|
||||||
* without - the [hopefully] dangerous looking nature of the warning
|
|
||||||
* would make people go look at the respecitive call sites over and
|
|
||||||
* over again just to find that there's no problem).
|
|
||||||
*
|
|
||||||
* And there are cases where it's just not realistic for the compiler
|
|
||||||
* to prove the count to be in range. For example when multiple call
|
|
||||||
* sites of a helper function - perhaps in different source files -
|
|
||||||
* all doing proper range checking, yet the helper function not doing
|
|
||||||
* so again.
|
|
||||||
*
|
|
||||||
* Therefore limit the compile time checking to the constant size
|
|
||||||
* case, and do only runtime checking for non-constant sizes.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (likely(sz < 0 || sz >= n)) {
|
if (likely(sz < 0 || sz >= n)) {
|
||||||
check_object_size(to, n, false);
|
check_object_size(to, n, false);
|
||||||
n = _copy_from_user(to, from, n);
|
n = _copy_from_user(to, from, n);
|
||||||
} else if (__builtin_constant_p(n))
|
} else if (!__builtin_constant_p(n))
|
||||||
copy_from_user_overflow();
|
copy_user_overflow(sz, n);
|
||||||
else
|
else
|
||||||
__copy_from_user_overflow(sz, n);
|
__bad_copy_user();
|
||||||
|
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned long __must_check
|
static __always_inline unsigned long __must_check
|
||||||
copy_to_user(void __user *to, const void *from, unsigned long n)
|
copy_to_user(void __user *to, const void *from, unsigned long n)
|
||||||
{
|
{
|
||||||
int sz = __compiletime_object_size(from);
|
int sz = __compiletime_object_size(from);
|
||||||
|
@ -781,21 +734,17 @@ copy_to_user(void __user *to, const void *from, unsigned long n)
|
||||||
|
|
||||||
might_fault();
|
might_fault();
|
||||||
|
|
||||||
/* See the comment in copy_from_user() above. */
|
|
||||||
if (likely(sz < 0 || sz >= n)) {
|
if (likely(sz < 0 || sz >= n)) {
|
||||||
check_object_size(from, n, true);
|
check_object_size(from, n, true);
|
||||||
n = _copy_to_user(to, from, n);
|
n = _copy_to_user(to, from, n);
|
||||||
} else if (__builtin_constant_p(n))
|
} else if (!__builtin_constant_p(n))
|
||||||
copy_to_user_overflow();
|
copy_user_overflow(sz, n);
|
||||||
else
|
else
|
||||||
__copy_to_user_overflow(sz, n);
|
__bad_copy_user();
|
||||||
|
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef __copy_from_user_overflow
|
|
||||||
#undef __copy_to_user_overflow
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We rely on the nested NMI work to allow atomic faults from the NMI path; the
|
* We rely on the nested NMI work to allow atomic faults from the NMI path; the
|
||||||
* nested NMI paths are careful to preserve CR2.
|
* nested NMI paths are careful to preserve CR2.
|
||||||
|
|
|
@ -669,6 +669,17 @@ static void init_amd_gh(struct cpuinfo_x86 *c)
|
||||||
set_cpu_bug(c, X86_BUG_AMD_TLB_MMATCH);
|
set_cpu_bug(c, X86_BUG_AMD_TLB_MMATCH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define MSR_AMD64_DE_CFG 0xC0011029
|
||||||
|
|
||||||
|
static void init_amd_ln(struct cpuinfo_x86 *c)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Apply erratum 665 fix unconditionally so machines without a BIOS
|
||||||
|
* fix work.
|
||||||
|
*/
|
||||||
|
msr_set_bit(MSR_AMD64_DE_CFG, 31);
|
||||||
|
}
|
||||||
|
|
||||||
static void init_amd_bd(struct cpuinfo_x86 *c)
|
static void init_amd_bd(struct cpuinfo_x86 *c)
|
||||||
{
|
{
|
||||||
u64 value;
|
u64 value;
|
||||||
|
@ -726,6 +737,7 @@ static void init_amd(struct cpuinfo_x86 *c)
|
||||||
case 6: init_amd_k7(c); break;
|
case 6: init_amd_k7(c); break;
|
||||||
case 0xf: init_amd_k8(c); break;
|
case 0xf: init_amd_k8(c); break;
|
||||||
case 0x10: init_amd_gh(c); break;
|
case 0x10: init_amd_gh(c); break;
|
||||||
|
case 0x12: init_amd_ln(c); break;
|
||||||
case 0x15: init_amd_bd(c); break;
|
case 0x15: init_amd_bd(c); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,12 +56,12 @@ asm (".pushsection .entry.text, \"ax\"\n"
|
||||||
".popsection");
|
".popsection");
|
||||||
|
|
||||||
/* identity function, which can be inlined */
|
/* identity function, which can be inlined */
|
||||||
u32 _paravirt_ident_32(u32 x)
|
u32 notrace _paravirt_ident_32(u32 x)
|
||||||
{
|
{
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 _paravirt_ident_64(u64 x)
|
u64 notrace _paravirt_ident_64(u64 x)
|
||||||
{
|
{
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
|
@ -927,9 +927,10 @@ int track_pfn_copy(struct vm_area_struct *vma)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* prot is passed in as a parameter for the new mapping. If the vma has a
|
* prot is passed in as a parameter for the new mapping. If the vma has
|
||||||
* linear pfn mapping for the entire range reserve the entire vma range with
|
* a linear pfn mapping for the entire range, or no vma is provided,
|
||||||
* single reserve_pfn_range call.
|
* reserve the entire pfn + size range with single reserve_pfn_range
|
||||||
|
* call.
|
||||||
*/
|
*/
|
||||||
int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot,
|
int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot,
|
||||||
unsigned long pfn, unsigned long addr, unsigned long size)
|
unsigned long pfn, unsigned long addr, unsigned long size)
|
||||||
|
@ -938,11 +939,12 @@ int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot,
|
||||||
enum page_cache_mode pcm;
|
enum page_cache_mode pcm;
|
||||||
|
|
||||||
/* reserve the whole chunk starting from paddr */
|
/* reserve the whole chunk starting from paddr */
|
||||||
if (addr == vma->vm_start && size == (vma->vm_end - vma->vm_start)) {
|
if (!vma || (addr == vma->vm_start
|
||||||
|
&& size == (vma->vm_end - vma->vm_start))) {
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = reserve_pfn_range(paddr, size, prot, 0);
|
ret = reserve_pfn_range(paddr, size, prot, 0);
|
||||||
if (!ret)
|
if (ret == 0 && vma)
|
||||||
vma->vm_flags |= VM_PAT;
|
vma->vm_flags |= VM_PAT;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -997,7 +999,7 @@ void untrack_pfn(struct vm_area_struct *vma, unsigned long pfn,
|
||||||
resource_size_t paddr;
|
resource_size_t paddr;
|
||||||
unsigned long prot;
|
unsigned long prot;
|
||||||
|
|
||||||
if (!(vma->vm_flags & VM_PAT))
|
if (vma && !(vma->vm_flags & VM_PAT))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* free the chunk starting from pfn or the whole chunk */
|
/* free the chunk starting from pfn or the whole chunk */
|
||||||
|
@ -1011,7 +1013,8 @@ void untrack_pfn(struct vm_area_struct *vma, unsigned long pfn,
|
||||||
size = vma->vm_end - vma->vm_start;
|
size = vma->vm_end - vma->vm_start;
|
||||||
}
|
}
|
||||||
free_pfn_range(paddr, size);
|
free_pfn_range(paddr, size);
|
||||||
vma->vm_flags &= ~VM_PAT;
|
if (vma)
|
||||||
|
vma->vm_flags &= ~VM_PAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -84,7 +84,10 @@ int putreg(struct task_struct *child, int regno, unsigned long value)
|
||||||
case EAX:
|
case EAX:
|
||||||
case EIP:
|
case EIP:
|
||||||
case UESP:
|
case UESP:
|
||||||
|
break;
|
||||||
case ORIG_EAX:
|
case ORIG_EAX:
|
||||||
|
/* Update the syscall number. */
|
||||||
|
UPT_SYSCALL_NR(&child->thread.regs.regs) = value;
|
||||||
break;
|
break;
|
||||||
case FS:
|
case FS:
|
||||||
if (value && (value & 3) != 3)
|
if (value && (value & 3) != 3)
|
||||||
|
|
|
@ -78,7 +78,11 @@ int putreg(struct task_struct *child, int regno, unsigned long value)
|
||||||
case RSI:
|
case RSI:
|
||||||
case RDI:
|
case RDI:
|
||||||
case RBP:
|
case RBP:
|
||||||
|
break;
|
||||||
|
|
||||||
case ORIG_RAX:
|
case ORIG_RAX:
|
||||||
|
/* Update the syscall number. */
|
||||||
|
UPT_SYSCALL_NR(&child->thread.regs.regs) = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FS:
|
case FS:
|
||||||
|
|
|
@ -733,13 +733,14 @@ static void cryptd_aead_crypt(struct aead_request *req,
|
||||||
rctx = aead_request_ctx(req);
|
rctx = aead_request_ctx(req);
|
||||||
compl = rctx->complete;
|
compl = rctx->complete;
|
||||||
|
|
||||||
|
tfm = crypto_aead_reqtfm(req);
|
||||||
|
|
||||||
if (unlikely(err == -EINPROGRESS))
|
if (unlikely(err == -EINPROGRESS))
|
||||||
goto out;
|
goto out;
|
||||||
aead_request_set_tfm(req, child);
|
aead_request_set_tfm(req, child);
|
||||||
err = crypt( req );
|
err = crypt( req );
|
||||||
|
|
||||||
out:
|
out:
|
||||||
tfm = crypto_aead_reqtfm(req);
|
|
||||||
ctx = crypto_aead_ctx(tfm);
|
ctx = crypto_aead_ctx(tfm);
|
||||||
refcnt = atomic_read(&ctx->refcnt);
|
refcnt = atomic_read(&ctx->refcnt);
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ static int nfit_handle_mce(struct notifier_block *nb, unsigned long val,
|
||||||
list_for_each_entry(nfit_spa, &acpi_desc->spas, list) {
|
list_for_each_entry(nfit_spa, &acpi_desc->spas, list) {
|
||||||
struct acpi_nfit_system_address *spa = nfit_spa->spa;
|
struct acpi_nfit_system_address *spa = nfit_spa->spa;
|
||||||
|
|
||||||
if (nfit_spa_type(spa) == NFIT_SPA_PM)
|
if (nfit_spa_type(spa) != NFIT_SPA_PM)
|
||||||
continue;
|
continue;
|
||||||
/* find the spa that covers the mce addr */
|
/* find the spa that covers the mce addr */
|
||||||
if (spa->address > mce->addr)
|
if (spa->address > mce->addr)
|
||||||
|
|
|
@ -2054,7 +2054,7 @@ int __init acpi_scan_init(void)
|
||||||
|
|
||||||
static struct acpi_probe_entry *ape;
|
static struct acpi_probe_entry *ape;
|
||||||
static int acpi_probe_count;
|
static int acpi_probe_count;
|
||||||
static DEFINE_SPINLOCK(acpi_probe_lock);
|
static DEFINE_MUTEX(acpi_probe_mutex);
|
||||||
|
|
||||||
static int __init acpi_match_madt(struct acpi_subtable_header *header,
|
static int __init acpi_match_madt(struct acpi_subtable_header *header,
|
||||||
const unsigned long end)
|
const unsigned long end)
|
||||||
|
@ -2073,7 +2073,7 @@ int __init __acpi_probe_device_table(struct acpi_probe_entry *ap_head, int nr)
|
||||||
if (acpi_disabled)
|
if (acpi_disabled)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
spin_lock(&acpi_probe_lock);
|
mutex_lock(&acpi_probe_mutex);
|
||||||
for (ape = ap_head; nr; ape++, nr--) {
|
for (ape = ap_head; nr; ape++, nr--) {
|
||||||
if (ACPI_COMPARE_NAME(ACPI_SIG_MADT, ape->id)) {
|
if (ACPI_COMPARE_NAME(ACPI_SIG_MADT, ape->id)) {
|
||||||
acpi_probe_count = 0;
|
acpi_probe_count = 0;
|
||||||
|
@ -2086,7 +2086,7 @@ int __init __acpi_probe_device_table(struct acpi_probe_entry *ap_head, int nr)
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
spin_unlock(&acpi_probe_lock);
|
mutex_unlock(&acpi_probe_mutex);
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2524,7 +2524,7 @@ static int ahci_host_activate_multi_irqs(struct ata_host *host,
|
||||||
|
|
||||||
/* Do not receive interrupts sent by dummy ports */
|
/* Do not receive interrupts sent by dummy ports */
|
||||||
if (!pp) {
|
if (!pp) {
|
||||||
disable_irq(irq + i);
|
disable_irq(irq);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id)
|
||||||
ap->ioaddr.altstatus_addr = base + 0x1E;
|
ap->ioaddr.altstatus_addr = base + 0x1E;
|
||||||
ap->ioaddr.bmdma_addr = base;
|
ap->ioaddr.bmdma_addr = base;
|
||||||
ata_sff_std_ports(&ap->ioaddr);
|
ata_sff_std_ports(&ap->ioaddr);
|
||||||
ap->pflags = ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32CHANGE;
|
ap->pflags |= ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32CHANGE;
|
||||||
|
|
||||||
ninja32_program(base);
|
ninja32_program(base);
|
||||||
/* FIXME: Should we disable them at remove ? */
|
/* FIXME: Should we disable them at remove ? */
|
||||||
|
|
|
@ -301,7 +301,7 @@ static int rpm_idle(struct device *dev, int rpmflags)
|
||||||
int (*callback)(struct device *);
|
int (*callback)(struct device *);
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
trace_rpm_idle(dev, rpmflags);
|
trace_rpm_idle_rcuidle(dev, rpmflags);
|
||||||
retval = rpm_check_suspend_allowed(dev);
|
retval = rpm_check_suspend_allowed(dev);
|
||||||
if (retval < 0)
|
if (retval < 0)
|
||||||
; /* Conditions are wrong. */
|
; /* Conditions are wrong. */
|
||||||
|
@ -337,7 +337,7 @@ static int rpm_idle(struct device *dev, int rpmflags)
|
||||||
dev->power.request_pending = true;
|
dev->power.request_pending = true;
|
||||||
queue_work(pm_wq, &dev->power.work);
|
queue_work(pm_wq, &dev->power.work);
|
||||||
}
|
}
|
||||||
trace_rpm_return_int(dev, _THIS_IP_, 0);
|
trace_rpm_return_int_rcuidle(dev, _THIS_IP_, 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,7 +352,7 @@ static int rpm_idle(struct device *dev, int rpmflags)
|
||||||
wake_up_all(&dev->power.wait_queue);
|
wake_up_all(&dev->power.wait_queue);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
trace_rpm_return_int(dev, _THIS_IP_, retval);
|
trace_rpm_return_int_rcuidle(dev, _THIS_IP_, retval);
|
||||||
return retval ? retval : rpm_suspend(dev, rpmflags | RPM_AUTO);
|
return retval ? retval : rpm_suspend(dev, rpmflags | RPM_AUTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -601,7 +601,7 @@ static int rpm_resume(struct device *dev, int rpmflags)
|
||||||
struct device *parent = NULL;
|
struct device *parent = NULL;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
trace_rpm_resume(dev, rpmflags);
|
trace_rpm_resume_rcuidle(dev, rpmflags);
|
||||||
|
|
||||||
repeat:
|
repeat:
|
||||||
if (dev->power.runtime_error)
|
if (dev->power.runtime_error)
|
||||||
|
@ -764,7 +764,7 @@ static int rpm_resume(struct device *dev, int rpmflags)
|
||||||
spin_lock_irq(&dev->power.lock);
|
spin_lock_irq(&dev->power.lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
trace_rpm_return_int(dev, _THIS_IP_, retval);
|
trace_rpm_return_int_rcuidle(dev, _THIS_IP_, retval);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
|
@ -404,6 +404,7 @@ static int regcache_rbtree_write(struct regmap *map, unsigned int reg,
|
||||||
unsigned int new_base_reg, new_top_reg;
|
unsigned int new_base_reg, new_top_reg;
|
||||||
unsigned int min, max;
|
unsigned int min, max;
|
||||||
unsigned int max_dist;
|
unsigned int max_dist;
|
||||||
|
unsigned int dist, best_dist = UINT_MAX;
|
||||||
|
|
||||||
max_dist = map->reg_stride * sizeof(*rbnode_tmp) /
|
max_dist = map->reg_stride * sizeof(*rbnode_tmp) /
|
||||||
map->cache_word_size;
|
map->cache_word_size;
|
||||||
|
@ -423,24 +424,41 @@ static int regcache_rbtree_write(struct regmap *map, unsigned int reg,
|
||||||
&base_reg, &top_reg);
|
&base_reg, &top_reg);
|
||||||
|
|
||||||
if (base_reg <= max && top_reg >= min) {
|
if (base_reg <= max && top_reg >= min) {
|
||||||
new_base_reg = min(reg, base_reg);
|
if (reg < base_reg)
|
||||||
new_top_reg = max(reg, top_reg);
|
dist = base_reg - reg;
|
||||||
} else {
|
else if (reg > top_reg)
|
||||||
if (max < base_reg)
|
dist = reg - top_reg;
|
||||||
node = node->rb_left;
|
|
||||||
else
|
else
|
||||||
node = node->rb_right;
|
dist = 0;
|
||||||
|
if (dist < best_dist) {
|
||||||
continue;
|
rbnode = rbnode_tmp;
|
||||||
|
best_dist = dist;
|
||||||
|
new_base_reg = min(reg, base_reg);
|
||||||
|
new_top_reg = max(reg, top_reg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = regcache_rbtree_insert_to_block(map, rbnode_tmp,
|
/*
|
||||||
|
* Keep looking, we want to choose the closest block,
|
||||||
|
* otherwise we might end up creating overlapping
|
||||||
|
* blocks, which breaks the rbtree.
|
||||||
|
*/
|
||||||
|
if (reg < base_reg)
|
||||||
|
node = node->rb_left;
|
||||||
|
else if (reg > top_reg)
|
||||||
|
node = node->rb_right;
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rbnode) {
|
||||||
|
ret = regcache_rbtree_insert_to_block(map, rbnode,
|
||||||
new_base_reg,
|
new_base_reg,
|
||||||
new_top_reg, reg,
|
new_top_reg, reg,
|
||||||
value);
|
value);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
rbtree_ctx->cached_rbnode = rbnode_tmp;
|
rbtree_ctx->cached_rbnode = rbnode;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,10 +38,11 @@ static int regcache_hw_init(struct regmap *map)
|
||||||
|
|
||||||
/* calculate the size of reg_defaults */
|
/* calculate the size of reg_defaults */
|
||||||
for (count = 0, i = 0; i < map->num_reg_defaults_raw; i++)
|
for (count = 0, i = 0; i < map->num_reg_defaults_raw; i++)
|
||||||
if (!regmap_volatile(map, i * map->reg_stride))
|
if (regmap_readable(map, i * map->reg_stride) &&
|
||||||
|
!regmap_volatile(map, i * map->reg_stride))
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
/* all registers are volatile, so just bypass */
|
/* all registers are unreadable or volatile, so just bypass */
|
||||||
if (!count) {
|
if (!count) {
|
||||||
map->cache_bypass = true;
|
map->cache_bypass = true;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1474,6 +1474,8 @@ int _regmap_raw_write(struct regmap *map, unsigned int reg,
|
||||||
ret = map->bus->write(map->bus_context, buf, len);
|
ret = map->bus->write(map->bus_context, buf, len);
|
||||||
|
|
||||||
kfree(buf);
|
kfree(buf);
|
||||||
|
} else if (ret != 0 && !map->cache_bypass && map->format.parse_val) {
|
||||||
|
regcache_drop_region(map, reg, reg + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
trace_regmap_hw_write_done(map, reg, val_len / map->format.val_bytes);
|
trace_regmap_hw_write_done(map, reg, val_len / map->format.val_bytes);
|
||||||
|
|
|
@ -551,7 +551,7 @@ static struct attribute *cci5xx_pmu_event_attrs[] = {
|
||||||
CCI5xx_GLOBAL_EVENT_EXT_ATTR_ENTRY(cci_wrq, 0xB),
|
CCI5xx_GLOBAL_EVENT_EXT_ATTR_ENTRY(cci_wrq, 0xB),
|
||||||
CCI5xx_GLOBAL_EVENT_EXT_ATTR_ENTRY(cci_snoop_cd_hs, 0xC),
|
CCI5xx_GLOBAL_EVENT_EXT_ATTR_ENTRY(cci_snoop_cd_hs, 0xC),
|
||||||
CCI5xx_GLOBAL_EVENT_EXT_ATTR_ENTRY(cci_rq_stall_addr_hazard, 0xD),
|
CCI5xx_GLOBAL_EVENT_EXT_ATTR_ENTRY(cci_rq_stall_addr_hazard, 0xD),
|
||||||
CCI5xx_GLOBAL_EVENT_EXT_ATTR_ENTRY(cci_snopp_rq_stall_tt_full, 0xE),
|
CCI5xx_GLOBAL_EVENT_EXT_ATTR_ENTRY(cci_snoop_rq_stall_tt_full, 0xE),
|
||||||
CCI5xx_GLOBAL_EVENT_EXT_ATTR_ENTRY(cci_snoop_rq_tzmp1_prot, 0xF),
|
CCI5xx_GLOBAL_EVENT_EXT_ATTR_ENTRY(cci_snoop_rq_tzmp1_prot, 0xF),
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
|
@ -187,6 +187,7 @@ struct arm_ccn {
|
||||||
struct arm_ccn_component *xp;
|
struct arm_ccn_component *xp;
|
||||||
|
|
||||||
struct arm_ccn_dt dt;
|
struct arm_ccn_dt dt;
|
||||||
|
int mn_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
static DEFINE_MUTEX(arm_ccn_mutex);
|
static DEFINE_MUTEX(arm_ccn_mutex);
|
||||||
|
@ -212,6 +213,7 @@ static int arm_ccn_node_to_xp_port(int node)
|
||||||
#define CCN_CONFIG_TYPE(_config) (((_config) >> 8) & 0xff)
|
#define CCN_CONFIG_TYPE(_config) (((_config) >> 8) & 0xff)
|
||||||
#define CCN_CONFIG_EVENT(_config) (((_config) >> 16) & 0xff)
|
#define CCN_CONFIG_EVENT(_config) (((_config) >> 16) & 0xff)
|
||||||
#define CCN_CONFIG_PORT(_config) (((_config) >> 24) & 0x3)
|
#define CCN_CONFIG_PORT(_config) (((_config) >> 24) & 0x3)
|
||||||
|
#define CCN_CONFIG_BUS(_config) (((_config) >> 24) & 0x3)
|
||||||
#define CCN_CONFIG_VC(_config) (((_config) >> 26) & 0x7)
|
#define CCN_CONFIG_VC(_config) (((_config) >> 26) & 0x7)
|
||||||
#define CCN_CONFIG_DIR(_config) (((_config) >> 29) & 0x1)
|
#define CCN_CONFIG_DIR(_config) (((_config) >> 29) & 0x1)
|
||||||
#define CCN_CONFIG_MASK(_config) (((_config) >> 30) & 0xf)
|
#define CCN_CONFIG_MASK(_config) (((_config) >> 30) & 0xf)
|
||||||
|
@ -241,6 +243,7 @@ static CCN_FORMAT_ATTR(xp, "config:0-7");
|
||||||
static CCN_FORMAT_ATTR(type, "config:8-15");
|
static CCN_FORMAT_ATTR(type, "config:8-15");
|
||||||
static CCN_FORMAT_ATTR(event, "config:16-23");
|
static CCN_FORMAT_ATTR(event, "config:16-23");
|
||||||
static CCN_FORMAT_ATTR(port, "config:24-25");
|
static CCN_FORMAT_ATTR(port, "config:24-25");
|
||||||
|
static CCN_FORMAT_ATTR(bus, "config:24-25");
|
||||||
static CCN_FORMAT_ATTR(vc, "config:26-28");
|
static CCN_FORMAT_ATTR(vc, "config:26-28");
|
||||||
static CCN_FORMAT_ATTR(dir, "config:29-29");
|
static CCN_FORMAT_ATTR(dir, "config:29-29");
|
||||||
static CCN_FORMAT_ATTR(mask, "config:30-33");
|
static CCN_FORMAT_ATTR(mask, "config:30-33");
|
||||||
|
@ -253,6 +256,7 @@ static struct attribute *arm_ccn_pmu_format_attrs[] = {
|
||||||
&arm_ccn_pmu_format_attr_type.attr.attr,
|
&arm_ccn_pmu_format_attr_type.attr.attr,
|
||||||
&arm_ccn_pmu_format_attr_event.attr.attr,
|
&arm_ccn_pmu_format_attr_event.attr.attr,
|
||||||
&arm_ccn_pmu_format_attr_port.attr.attr,
|
&arm_ccn_pmu_format_attr_port.attr.attr,
|
||||||
|
&arm_ccn_pmu_format_attr_bus.attr.attr,
|
||||||
&arm_ccn_pmu_format_attr_vc.attr.attr,
|
&arm_ccn_pmu_format_attr_vc.attr.attr,
|
||||||
&arm_ccn_pmu_format_attr_dir.attr.attr,
|
&arm_ccn_pmu_format_attr_dir.attr.attr,
|
||||||
&arm_ccn_pmu_format_attr_mask.attr.attr,
|
&arm_ccn_pmu_format_attr_mask.attr.attr,
|
||||||
|
@ -328,6 +332,7 @@ struct arm_ccn_pmu_event {
|
||||||
static ssize_t arm_ccn_pmu_event_show(struct device *dev,
|
static ssize_t arm_ccn_pmu_event_show(struct device *dev,
|
||||||
struct device_attribute *attr, char *buf)
|
struct device_attribute *attr, char *buf)
|
||||||
{
|
{
|
||||||
|
struct arm_ccn *ccn = pmu_to_arm_ccn(dev_get_drvdata(dev));
|
||||||
struct arm_ccn_pmu_event *event = container_of(attr,
|
struct arm_ccn_pmu_event *event = container_of(attr,
|
||||||
struct arm_ccn_pmu_event, attr);
|
struct arm_ccn_pmu_event, attr);
|
||||||
ssize_t res;
|
ssize_t res;
|
||||||
|
@ -349,10 +354,17 @@ static ssize_t arm_ccn_pmu_event_show(struct device *dev,
|
||||||
break;
|
break;
|
||||||
case CCN_TYPE_XP:
|
case CCN_TYPE_XP:
|
||||||
res += snprintf(buf + res, PAGE_SIZE - res,
|
res += snprintf(buf + res, PAGE_SIZE - res,
|
||||||
",xp=?,port=?,vc=?,dir=?");
|
",xp=?,vc=?");
|
||||||
if (event->event == CCN_EVENT_WATCHPOINT)
|
if (event->event == CCN_EVENT_WATCHPOINT)
|
||||||
res += snprintf(buf + res, PAGE_SIZE - res,
|
res += snprintf(buf + res, PAGE_SIZE - res,
|
||||||
",cmp_l=?,cmp_h=?,mask=?");
|
",port=?,dir=?,cmp_l=?,cmp_h=?,mask=?");
|
||||||
|
else
|
||||||
|
res += snprintf(buf + res, PAGE_SIZE - res,
|
||||||
|
",bus=?");
|
||||||
|
|
||||||
|
break;
|
||||||
|
case CCN_TYPE_MN:
|
||||||
|
res += snprintf(buf + res, PAGE_SIZE - res, ",node=%d", ccn->mn_id);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
res += snprintf(buf + res, PAGE_SIZE - res, ",node=?");
|
res += snprintf(buf + res, PAGE_SIZE - res, ",node=?");
|
||||||
|
@ -383,9 +395,9 @@ static umode_t arm_ccn_pmu_events_is_visible(struct kobject *kobj,
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct arm_ccn_pmu_event arm_ccn_pmu_events[] = {
|
static struct arm_ccn_pmu_event arm_ccn_pmu_events[] = {
|
||||||
CCN_EVENT_MN(eobarrier, "dir=0,vc=0,cmp_h=0x1c00", CCN_IDX_MASK_OPCODE),
|
CCN_EVENT_MN(eobarrier, "dir=1,vc=0,cmp_h=0x1c00", CCN_IDX_MASK_OPCODE),
|
||||||
CCN_EVENT_MN(ecbarrier, "dir=0,vc=0,cmp_h=0x1e00", CCN_IDX_MASK_OPCODE),
|
CCN_EVENT_MN(ecbarrier, "dir=1,vc=0,cmp_h=0x1e00", CCN_IDX_MASK_OPCODE),
|
||||||
CCN_EVENT_MN(dvmop, "dir=0,vc=0,cmp_h=0x2800", CCN_IDX_MASK_OPCODE),
|
CCN_EVENT_MN(dvmop, "dir=1,vc=0,cmp_h=0x2800", CCN_IDX_MASK_OPCODE),
|
||||||
CCN_EVENT_HNI(txdatflits, "dir=1,vc=3", CCN_IDX_MASK_ANY),
|
CCN_EVENT_HNI(txdatflits, "dir=1,vc=3", CCN_IDX_MASK_ANY),
|
||||||
CCN_EVENT_HNI(rxdatflits, "dir=0,vc=3", CCN_IDX_MASK_ANY),
|
CCN_EVENT_HNI(rxdatflits, "dir=0,vc=3", CCN_IDX_MASK_ANY),
|
||||||
CCN_EVENT_HNI(txreqflits, "dir=1,vc=0", CCN_IDX_MASK_ANY),
|
CCN_EVENT_HNI(txreqflits, "dir=1,vc=0", CCN_IDX_MASK_ANY),
|
||||||
|
@ -733,9 +745,10 @@ static int arm_ccn_pmu_event_init(struct perf_event *event)
|
||||||
|
|
||||||
if (has_branch_stack(event) || event->attr.exclude_user ||
|
if (has_branch_stack(event) || event->attr.exclude_user ||
|
||||||
event->attr.exclude_kernel || event->attr.exclude_hv ||
|
event->attr.exclude_kernel || event->attr.exclude_hv ||
|
||||||
event->attr.exclude_idle) {
|
event->attr.exclude_idle || event->attr.exclude_host ||
|
||||||
|
event->attr.exclude_guest) {
|
||||||
dev_warn(ccn->dev, "Can't exclude execution levels!\n");
|
dev_warn(ccn->dev, "Can't exclude execution levels!\n");
|
||||||
return -EOPNOTSUPP;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event->cpu < 0) {
|
if (event->cpu < 0) {
|
||||||
|
@ -759,6 +772,12 @@ static int arm_ccn_pmu_event_init(struct perf_event *event)
|
||||||
|
|
||||||
/* Validate node/xp vs topology */
|
/* Validate node/xp vs topology */
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
case CCN_TYPE_MN:
|
||||||
|
if (node_xp != ccn->mn_id) {
|
||||||
|
dev_warn(ccn->dev, "Invalid MN ID %d!\n", node_xp);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case CCN_TYPE_XP:
|
case CCN_TYPE_XP:
|
||||||
if (node_xp >= ccn->num_xps) {
|
if (node_xp >= ccn->num_xps) {
|
||||||
dev_warn(ccn->dev, "Invalid XP ID %d!\n", node_xp);
|
dev_warn(ccn->dev, "Invalid XP ID %d!\n", node_xp);
|
||||||
|
@ -886,6 +905,10 @@ static void arm_ccn_pmu_xp_dt_config(struct perf_event *event, int enable)
|
||||||
struct arm_ccn_component *xp;
|
struct arm_ccn_component *xp;
|
||||||
u32 val, dt_cfg;
|
u32 val, dt_cfg;
|
||||||
|
|
||||||
|
/* Nothing to do for cycle counter */
|
||||||
|
if (hw->idx == CCN_IDX_PMU_CYCLE_COUNTER)
|
||||||
|
return;
|
||||||
|
|
||||||
if (CCN_CONFIG_TYPE(event->attr.config) == CCN_TYPE_XP)
|
if (CCN_CONFIG_TYPE(event->attr.config) == CCN_TYPE_XP)
|
||||||
xp = &ccn->xp[CCN_CONFIG_XP(event->attr.config)];
|
xp = &ccn->xp[CCN_CONFIG_XP(event->attr.config)];
|
||||||
else
|
else
|
||||||
|
@ -917,38 +940,17 @@ static void arm_ccn_pmu_event_start(struct perf_event *event, int flags)
|
||||||
arm_ccn_pmu_read_counter(ccn, hw->idx));
|
arm_ccn_pmu_read_counter(ccn, hw->idx));
|
||||||
hw->state = 0;
|
hw->state = 0;
|
||||||
|
|
||||||
/*
|
|
||||||
* Pin the timer, so that the overflows are handled by the chosen
|
|
||||||
* event->cpu (this is the same one as presented in "cpumask"
|
|
||||||
* attribute).
|
|
||||||
*/
|
|
||||||
if (!ccn->irq)
|
|
||||||
hrtimer_start(&ccn->dt.hrtimer, arm_ccn_pmu_timer_period(),
|
|
||||||
HRTIMER_MODE_REL_PINNED);
|
|
||||||
|
|
||||||
/* Set the DT bus input, engaging the counter */
|
/* Set the DT bus input, engaging the counter */
|
||||||
arm_ccn_pmu_xp_dt_config(event, 1);
|
arm_ccn_pmu_xp_dt_config(event, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void arm_ccn_pmu_event_stop(struct perf_event *event, int flags)
|
static void arm_ccn_pmu_event_stop(struct perf_event *event, int flags)
|
||||||
{
|
{
|
||||||
struct arm_ccn *ccn = pmu_to_arm_ccn(event->pmu);
|
|
||||||
struct hw_perf_event *hw = &event->hw;
|
struct hw_perf_event *hw = &event->hw;
|
||||||
u64 timeout;
|
|
||||||
|
|
||||||
/* Disable counting, setting the DT bus to pass-through mode */
|
/* Disable counting, setting the DT bus to pass-through mode */
|
||||||
arm_ccn_pmu_xp_dt_config(event, 0);
|
arm_ccn_pmu_xp_dt_config(event, 0);
|
||||||
|
|
||||||
if (!ccn->irq)
|
|
||||||
hrtimer_cancel(&ccn->dt.hrtimer);
|
|
||||||
|
|
||||||
/* Let the DT bus drain */
|
|
||||||
timeout = arm_ccn_pmu_read_counter(ccn, CCN_IDX_PMU_CYCLE_COUNTER) +
|
|
||||||
ccn->num_xps;
|
|
||||||
while (arm_ccn_pmu_read_counter(ccn, CCN_IDX_PMU_CYCLE_COUNTER) <
|
|
||||||
timeout)
|
|
||||||
cpu_relax();
|
|
||||||
|
|
||||||
if (flags & PERF_EF_UPDATE)
|
if (flags & PERF_EF_UPDATE)
|
||||||
arm_ccn_pmu_event_update(event);
|
arm_ccn_pmu_event_update(event);
|
||||||
|
|
||||||
|
@ -988,7 +990,7 @@ static void arm_ccn_pmu_xp_watchpoint_config(struct perf_event *event)
|
||||||
|
|
||||||
/* Comparison values */
|
/* Comparison values */
|
||||||
writel(cmp_l & 0xffffffff, source->base + CCN_XP_DT_CMP_VAL_L(wp));
|
writel(cmp_l & 0xffffffff, source->base + CCN_XP_DT_CMP_VAL_L(wp));
|
||||||
writel((cmp_l >> 32) & 0xefffffff,
|
writel((cmp_l >> 32) & 0x7fffffff,
|
||||||
source->base + CCN_XP_DT_CMP_VAL_L(wp) + 4);
|
source->base + CCN_XP_DT_CMP_VAL_L(wp) + 4);
|
||||||
writel(cmp_h & 0xffffffff, source->base + CCN_XP_DT_CMP_VAL_H(wp));
|
writel(cmp_h & 0xffffffff, source->base + CCN_XP_DT_CMP_VAL_H(wp));
|
||||||
writel((cmp_h >> 32) & 0x0fffffff,
|
writel((cmp_h >> 32) & 0x0fffffff,
|
||||||
|
@ -996,7 +998,7 @@ static void arm_ccn_pmu_xp_watchpoint_config(struct perf_event *event)
|
||||||
|
|
||||||
/* Mask */
|
/* Mask */
|
||||||
writel(mask_l & 0xffffffff, source->base + CCN_XP_DT_CMP_MASK_L(wp));
|
writel(mask_l & 0xffffffff, source->base + CCN_XP_DT_CMP_MASK_L(wp));
|
||||||
writel((mask_l >> 32) & 0xefffffff,
|
writel((mask_l >> 32) & 0x7fffffff,
|
||||||
source->base + CCN_XP_DT_CMP_MASK_L(wp) + 4);
|
source->base + CCN_XP_DT_CMP_MASK_L(wp) + 4);
|
||||||
writel(mask_h & 0xffffffff, source->base + CCN_XP_DT_CMP_MASK_H(wp));
|
writel(mask_h & 0xffffffff, source->base + CCN_XP_DT_CMP_MASK_H(wp));
|
||||||
writel((mask_h >> 32) & 0x0fffffff,
|
writel((mask_h >> 32) & 0x0fffffff,
|
||||||
|
@ -1014,7 +1016,7 @@ static void arm_ccn_pmu_xp_event_config(struct perf_event *event)
|
||||||
hw->event_base = CCN_XP_DT_CONFIG__DT_CFG__XP_PMU_EVENT(hw->config_base);
|
hw->event_base = CCN_XP_DT_CONFIG__DT_CFG__XP_PMU_EVENT(hw->config_base);
|
||||||
|
|
||||||
id = (CCN_CONFIG_VC(event->attr.config) << 4) |
|
id = (CCN_CONFIG_VC(event->attr.config) << 4) |
|
||||||
(CCN_CONFIG_PORT(event->attr.config) << 3) |
|
(CCN_CONFIG_BUS(event->attr.config) << 3) |
|
||||||
(CCN_CONFIG_EVENT(event->attr.config) << 0);
|
(CCN_CONFIG_EVENT(event->attr.config) << 0);
|
||||||
|
|
||||||
val = readl(source->base + CCN_XP_PMU_EVENT_SEL);
|
val = readl(source->base + CCN_XP_PMU_EVENT_SEL);
|
||||||
|
@ -1099,15 +1101,31 @@ static void arm_ccn_pmu_event_config(struct perf_event *event)
|
||||||
spin_unlock(&ccn->dt.config_lock);
|
spin_unlock(&ccn->dt.config_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int arm_ccn_pmu_active_counters(struct arm_ccn *ccn)
|
||||||
|
{
|
||||||
|
return bitmap_weight(ccn->dt.pmu_counters_mask,
|
||||||
|
CCN_NUM_PMU_EVENT_COUNTERS + 1);
|
||||||
|
}
|
||||||
|
|
||||||
static int arm_ccn_pmu_event_add(struct perf_event *event, int flags)
|
static int arm_ccn_pmu_event_add(struct perf_event *event, int flags)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
struct hw_perf_event *hw = &event->hw;
|
struct hw_perf_event *hw = &event->hw;
|
||||||
|
struct arm_ccn *ccn = pmu_to_arm_ccn(event->pmu);
|
||||||
|
|
||||||
err = arm_ccn_pmu_event_alloc(event);
|
err = arm_ccn_pmu_event_alloc(event);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Pin the timer, so that the overflows are handled by the chosen
|
||||||
|
* event->cpu (this is the same one as presented in "cpumask"
|
||||||
|
* attribute).
|
||||||
|
*/
|
||||||
|
if (!ccn->irq && arm_ccn_pmu_active_counters(ccn) == 1)
|
||||||
|
hrtimer_start(&ccn->dt.hrtimer, arm_ccn_pmu_timer_period(),
|
||||||
|
HRTIMER_MODE_REL_PINNED);
|
||||||
|
|
||||||
arm_ccn_pmu_event_config(event);
|
arm_ccn_pmu_event_config(event);
|
||||||
|
|
||||||
hw->state = PERF_HES_STOPPED;
|
hw->state = PERF_HES_STOPPED;
|
||||||
|
@ -1120,9 +1138,14 @@ static int arm_ccn_pmu_event_add(struct perf_event *event, int flags)
|
||||||
|
|
||||||
static void arm_ccn_pmu_event_del(struct perf_event *event, int flags)
|
static void arm_ccn_pmu_event_del(struct perf_event *event, int flags)
|
||||||
{
|
{
|
||||||
|
struct arm_ccn *ccn = pmu_to_arm_ccn(event->pmu);
|
||||||
|
|
||||||
arm_ccn_pmu_event_stop(event, PERF_EF_UPDATE);
|
arm_ccn_pmu_event_stop(event, PERF_EF_UPDATE);
|
||||||
|
|
||||||
arm_ccn_pmu_event_release(event);
|
arm_ccn_pmu_event_release(event);
|
||||||
|
|
||||||
|
if (!ccn->irq && arm_ccn_pmu_active_counters(ccn) == 0)
|
||||||
|
hrtimer_cancel(&ccn->dt.hrtimer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void arm_ccn_pmu_event_read(struct perf_event *event)
|
static void arm_ccn_pmu_event_read(struct perf_event *event)
|
||||||
|
@ -1130,6 +1153,24 @@ static void arm_ccn_pmu_event_read(struct perf_event *event)
|
||||||
arm_ccn_pmu_event_update(event);
|
arm_ccn_pmu_event_update(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void arm_ccn_pmu_enable(struct pmu *pmu)
|
||||||
|
{
|
||||||
|
struct arm_ccn *ccn = pmu_to_arm_ccn(pmu);
|
||||||
|
|
||||||
|
u32 val = readl(ccn->dt.base + CCN_DT_PMCR);
|
||||||
|
val |= CCN_DT_PMCR__PMU_EN;
|
||||||
|
writel(val, ccn->dt.base + CCN_DT_PMCR);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void arm_ccn_pmu_disable(struct pmu *pmu)
|
||||||
|
{
|
||||||
|
struct arm_ccn *ccn = pmu_to_arm_ccn(pmu);
|
||||||
|
|
||||||
|
u32 val = readl(ccn->dt.base + CCN_DT_PMCR);
|
||||||
|
val &= ~CCN_DT_PMCR__PMU_EN;
|
||||||
|
writel(val, ccn->dt.base + CCN_DT_PMCR);
|
||||||
|
}
|
||||||
|
|
||||||
static irqreturn_t arm_ccn_pmu_overflow_handler(struct arm_ccn_dt *dt)
|
static irqreturn_t arm_ccn_pmu_overflow_handler(struct arm_ccn_dt *dt)
|
||||||
{
|
{
|
||||||
u32 pmovsr = readl(dt->base + CCN_DT_PMOVSR);
|
u32 pmovsr = readl(dt->base + CCN_DT_PMOVSR);
|
||||||
|
@ -1252,6 +1293,8 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn)
|
||||||
.start = arm_ccn_pmu_event_start,
|
.start = arm_ccn_pmu_event_start,
|
||||||
.stop = arm_ccn_pmu_event_stop,
|
.stop = arm_ccn_pmu_event_stop,
|
||||||
.read = arm_ccn_pmu_event_read,
|
.read = arm_ccn_pmu_event_read,
|
||||||
|
.pmu_enable = arm_ccn_pmu_enable,
|
||||||
|
.pmu_disable = arm_ccn_pmu_disable,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* No overflow interrupt? Have to use a timer instead. */
|
/* No overflow interrupt? Have to use a timer instead. */
|
||||||
|
@ -1361,6 +1404,8 @@ static int arm_ccn_init_nodes(struct arm_ccn *ccn, int region,
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case CCN_TYPE_MN:
|
case CCN_TYPE_MN:
|
||||||
|
ccn->mn_id = id;
|
||||||
|
return 0;
|
||||||
case CCN_TYPE_DT:
|
case CCN_TYPE_DT:
|
||||||
return 0;
|
return 0;
|
||||||
case CCN_TYPE_XP:
|
case CCN_TYPE_XP:
|
||||||
|
@ -1471,8 +1516,9 @@ static int arm_ccn_probe(struct platform_device *pdev)
|
||||||
/* Can set 'disable' bits, so can acknowledge interrupts */
|
/* Can set 'disable' bits, so can acknowledge interrupts */
|
||||||
writel(CCN_MN_ERRINT_STATUS__PMU_EVENTS__ENABLE,
|
writel(CCN_MN_ERRINT_STATUS__PMU_EVENTS__ENABLE,
|
||||||
ccn->base + CCN_MN_ERRINT_STATUS);
|
ccn->base + CCN_MN_ERRINT_STATUS);
|
||||||
err = devm_request_irq(ccn->dev, irq, arm_ccn_irq_handler, 0,
|
err = devm_request_irq(ccn->dev, irq, arm_ccn_irq_handler,
|
||||||
dev_name(ccn->dev), ccn);
|
IRQF_NOBALANCING | IRQF_NO_THREAD,
|
||||||
|
dev_name(ccn->dev), ccn);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
|
|
@ -178,6 +178,7 @@ static int vexpress_config_populate(struct device_node *node)
|
||||||
|
|
||||||
parent = class_find_device(vexpress_config_class, NULL, bridge,
|
parent = class_find_device(vexpress_config_class, NULL, bridge,
|
||||||
vexpress_config_node_match);
|
vexpress_config_node_match);
|
||||||
|
of_node_put(bridge);
|
||||||
if (WARN_ON(!parent))
|
if (WARN_ON(!parent))
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
|
|
@ -244,7 +244,7 @@ config HW_RANDOM_TX4939
|
||||||
|
|
||||||
config HW_RANDOM_MXC_RNGA
|
config HW_RANDOM_MXC_RNGA
|
||||||
tristate "Freescale i.MX RNGA Random Number Generator"
|
tristate "Freescale i.MX RNGA Random Number Generator"
|
||||||
depends on ARCH_HAS_RNGA
|
depends on SOC_IMX31
|
||||||
default HW_RANDOM
|
default HW_RANDOM
|
||||||
---help---
|
---help---
|
||||||
This driver provides kernel-side support for the Random Number
|
This driver provides kernel-side support for the Random Number
|
||||||
|
|
|
@ -957,7 +957,7 @@ int tpm2_auto_startup(struct tpm_chip *chip)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
rc = tpm2_do_selftest(chip);
|
rc = tpm2_do_selftest(chip);
|
||||||
if (rc != TPM2_RC_INITIALIZE) {
|
if (rc != 0 && rc != TPM2_RC_INITIALIZE) {
|
||||||
dev_err(&chip->dev, "TPM self test failed\n");
|
dev_err(&chip->dev, "TPM self test failed\n");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -974,7 +974,6 @@ int tpm2_auto_startup(struct tpm_chip *chip)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
|
||||||
out:
|
out:
|
||||||
if (rc > 0)
|
if (rc > 0)
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
|
|
|
@ -165,6 +165,12 @@ struct ports_device {
|
||||||
*/
|
*/
|
||||||
struct virtqueue *c_ivq, *c_ovq;
|
struct virtqueue *c_ivq, *c_ovq;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* A control packet buffer for guest->host requests, protected
|
||||||
|
* by c_ovq_lock.
|
||||||
|
*/
|
||||||
|
struct virtio_console_control cpkt;
|
||||||
|
|
||||||
/* Array of per-port IO virtqueues */
|
/* Array of per-port IO virtqueues */
|
||||||
struct virtqueue **in_vqs, **out_vqs;
|
struct virtqueue **in_vqs, **out_vqs;
|
||||||
|
|
||||||
|
@ -560,28 +566,29 @@ static ssize_t __send_control_msg(struct ports_device *portdev, u32 port_id,
|
||||||
unsigned int event, unsigned int value)
|
unsigned int event, unsigned int value)
|
||||||
{
|
{
|
||||||
struct scatterlist sg[1];
|
struct scatterlist sg[1];
|
||||||
struct virtio_console_control cpkt;
|
|
||||||
struct virtqueue *vq;
|
struct virtqueue *vq;
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
|
|
||||||
if (!use_multiport(portdev))
|
if (!use_multiport(portdev))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
cpkt.id = cpu_to_virtio32(portdev->vdev, port_id);
|
|
||||||
cpkt.event = cpu_to_virtio16(portdev->vdev, event);
|
|
||||||
cpkt.value = cpu_to_virtio16(portdev->vdev, value);
|
|
||||||
|
|
||||||
vq = portdev->c_ovq;
|
vq = portdev->c_ovq;
|
||||||
|
|
||||||
sg_init_one(sg, &cpkt, sizeof(cpkt));
|
|
||||||
|
|
||||||
spin_lock(&portdev->c_ovq_lock);
|
spin_lock(&portdev->c_ovq_lock);
|
||||||
if (virtqueue_add_outbuf(vq, sg, 1, &cpkt, GFP_ATOMIC) == 0) {
|
|
||||||
|
portdev->cpkt.id = cpu_to_virtio32(portdev->vdev, port_id);
|
||||||
|
portdev->cpkt.event = cpu_to_virtio16(portdev->vdev, event);
|
||||||
|
portdev->cpkt.value = cpu_to_virtio16(portdev->vdev, value);
|
||||||
|
|
||||||
|
sg_init_one(sg, &portdev->cpkt, sizeof(struct virtio_console_control));
|
||||||
|
|
||||||
|
if (virtqueue_add_outbuf(vq, sg, 1, &portdev->cpkt, GFP_ATOMIC) == 0) {
|
||||||
virtqueue_kick(vq);
|
virtqueue_kick(vq);
|
||||||
while (!virtqueue_get_buf(vq, &len)
|
while (!virtqueue_get_buf(vq, &len)
|
||||||
&& !virtqueue_is_broken(vq))
|
&& !virtqueue_is_broken(vq))
|
||||||
cpu_relax();
|
cpu_relax();
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_unlock(&portdev->c_ovq_lock);
|
spin_unlock(&portdev->c_ovq_lock);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,7 @@ static const struct cpg_core_clk r8a7795_core_clks[] __initconst = {
|
||||||
DEF_FIXED(".s1", CLK_S1, CLK_PLL1_DIV2, 3, 1),
|
DEF_FIXED(".s1", CLK_S1, CLK_PLL1_DIV2, 3, 1),
|
||||||
DEF_FIXED(".s2", CLK_S2, CLK_PLL1_DIV2, 4, 1),
|
DEF_FIXED(".s2", CLK_S2, CLK_PLL1_DIV2, 4, 1),
|
||||||
DEF_FIXED(".s3", CLK_S3, CLK_PLL1_DIV2, 6, 1),
|
DEF_FIXED(".s3", CLK_S3, CLK_PLL1_DIV2, 6, 1),
|
||||||
|
DEF_FIXED(".sdsrc", CLK_SDSRC, CLK_PLL1_DIV2, 2, 1),
|
||||||
|
|
||||||
/* Core Clock Outputs */
|
/* Core Clock Outputs */
|
||||||
DEF_FIXED("ztr", R8A7795_CLK_ZTR, CLK_PLL1_DIV2, 6, 1),
|
DEF_FIXED("ztr", R8A7795_CLK_ZTR, CLK_PLL1_DIV2, 6, 1),
|
||||||
|
@ -87,10 +88,10 @@ static const struct cpg_core_clk r8a7795_core_clks[] __initconst = {
|
||||||
DEF_FIXED("s3d2", R8A7795_CLK_S3D2, CLK_S3, 2, 1),
|
DEF_FIXED("s3d2", R8A7795_CLK_S3D2, CLK_S3, 2, 1),
|
||||||
DEF_FIXED("s3d4", R8A7795_CLK_S3D4, CLK_S3, 4, 1),
|
DEF_FIXED("s3d4", R8A7795_CLK_S3D4, CLK_S3, 4, 1),
|
||||||
|
|
||||||
DEF_GEN3_SD("sd0", R8A7795_CLK_SD0, CLK_PLL1_DIV2, 0x0074),
|
DEF_GEN3_SD("sd0", R8A7795_CLK_SD0, CLK_SDSRC, 0x0074),
|
||||||
DEF_GEN3_SD("sd1", R8A7795_CLK_SD1, CLK_PLL1_DIV2, 0x0078),
|
DEF_GEN3_SD("sd1", R8A7795_CLK_SD1, CLK_SDSRC, 0x0078),
|
||||||
DEF_GEN3_SD("sd2", R8A7795_CLK_SD2, CLK_PLL1_DIV2, 0x0268),
|
DEF_GEN3_SD("sd2", R8A7795_CLK_SD2, CLK_SDSRC, 0x0268),
|
||||||
DEF_GEN3_SD("sd3", R8A7795_CLK_SD3, CLK_PLL1_DIV2, 0x026c),
|
DEF_GEN3_SD("sd3", R8A7795_CLK_SD3, CLK_SDSRC, 0x026c),
|
||||||
|
|
||||||
DEF_FIXED("cl", R8A7795_CLK_CL, CLK_PLL1_DIV2, 48, 1),
|
DEF_FIXED("cl", R8A7795_CLK_CL, CLK_PLL1_DIV2, 48, 1),
|
||||||
DEF_FIXED("cp", R8A7795_CLK_CP, CLK_EXTAL, 2, 1),
|
DEF_FIXED("cp", R8A7795_CLK_CP, CLK_EXTAL, 2, 1),
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue