Linux 5.0-rc6
-----BEGIN PGP SIGNATURE----- iQFRBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAlxgqNUeHHRvcnZhbGRz QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGwsoH+OVXu0NQofwTvVru 8lgF3BSDG2mhf7mxbBBlBizGVy9jnjRNGCFMC+Jq8IwiFLwprja/G27kaDTkpuF1 PHC3yfjKvjTeUP5aNdHlmxv6j1sSJfZl0y46DQal4UeTG/Giq8TFTi+Tbz7Wb/WV yCx4Lr8okAwTuNhnL8ojUCVIpd3c8QsyR9v6nEQ14Mj+MvEbokyTkMJV0bzOrM38 JOB+/X1XY4JPZ6o3MoXrBca3bxbAJzMneq+9CWw1U5eiIG3msg4a+Ua3++RQMDNr 8BP0yCZ6wo32S8uu0PI6HrZaBnLYi5g9Wh7Q7yc0mn1Uh1zWFykA6TtqK90agJeR A6Ktjw== =scY4 -----END PGP SIGNATURE----- Merge tag 'v5.0-rc6' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
c9ba7560c5
|
@ -24,7 +24,7 @@ What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/
|
|||
cpld3_version
|
||||
|
||||
Date: November 2018
|
||||
KernelVersion: 4.21
|
||||
KernelVersion: 5.0
|
||||
Contact: Vadim Pasternak <vadimpmellanox.com>
|
||||
Description: These files show with which CPLD versions have been burned
|
||||
on LED board.
|
||||
|
@ -35,7 +35,7 @@ What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/
|
|||
jtag_enable
|
||||
|
||||
Date: November 2018
|
||||
KernelVersion: 4.21
|
||||
KernelVersion: 5.0
|
||||
Contact: Vadim Pasternak <vadimpmellanox.com>
|
||||
Description: These files enable and disable the access to the JTAG domain.
|
||||
By default access to the JTAG domain is disabled.
|
||||
|
@ -105,7 +105,7 @@ What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/
|
|||
reset_voltmon_upgrade_fail
|
||||
|
||||
Date: November 2018
|
||||
KernelVersion: 4.21
|
||||
KernelVersion: 5.0
|
||||
Contact: Vadim Pasternak <vadimpmellanox.com>
|
||||
Description: These files show the system reset cause, as following: ComEx
|
||||
power fail, reset from ComEx, system platform reset, reset
|
||||
|
|
|
@ -1696,12 +1696,11 @@
|
|||
By default, super page will be supported if Intel IOMMU
|
||||
has the capability. With this option, super page will
|
||||
not be supported.
|
||||
sm_off [Default Off]
|
||||
By default, scalable mode will be supported if the
|
||||
sm_on [Default Off]
|
||||
By default, scalable mode will be disabled even if the
|
||||
hardware advertises that it has support for the scalable
|
||||
mode translation. With this option set, scalable mode
|
||||
will not be used even on hardware which claims to support
|
||||
it.
|
||||
will be used on hardware which claims to support it.
|
||||
tboot_noforce [Default Off]
|
||||
Do not force the Intel IOMMU enabled under tboot.
|
||||
By default, tboot will force Intel IOMMU on, which
|
||||
|
|
|
@ -108,12 +108,13 @@ some, but not all of the other indices changing.
|
|||
|
||||
Sometimes you need to ensure that a subsequent call to :c:func:`xa_store`
|
||||
will not need to allocate memory. The :c:func:`xa_reserve` function
|
||||
will store a reserved entry at the indicated index. Users of the normal
|
||||
API will see this entry as containing ``NULL``. If you do not need to
|
||||
use the reserved entry, you can call :c:func:`xa_release` to remove the
|
||||
unused entry. If another user has stored to the entry in the meantime,
|
||||
:c:func:`xa_release` will do nothing; if instead you want the entry to
|
||||
become ``NULL``, you should use :c:func:`xa_erase`.
|
||||
will store a reserved entry at the indicated index. Users of the
|
||||
normal API will see this entry as containing ``NULL``. If you do
|
||||
not need to use the reserved entry, you can call :c:func:`xa_release`
|
||||
to remove the unused entry. If another user has stored to the entry
|
||||
in the meantime, :c:func:`xa_release` will do nothing; if instead you
|
||||
want the entry to become ``NULL``, you should use :c:func:`xa_erase`.
|
||||
Using :c:func:`xa_insert` on a reserved entry will fail.
|
||||
|
||||
If all entries in the array are ``NULL``, the :c:func:`xa_empty` function
|
||||
will return ``true``.
|
||||
|
@ -183,6 +184,8 @@ Takes xa_lock internally:
|
|||
* :c:func:`xa_store_bh`
|
||||
* :c:func:`xa_store_irq`
|
||||
* :c:func:`xa_insert`
|
||||
* :c:func:`xa_insert_bh`
|
||||
* :c:func:`xa_insert_irq`
|
||||
* :c:func:`xa_erase`
|
||||
* :c:func:`xa_erase_bh`
|
||||
* :c:func:`xa_erase_irq`
|
||||
|
|
|
@ -17,7 +17,11 @@ extra-y += $(DT_TMP_SCHEMA)
|
|||
quiet_cmd_mk_schema = SCHEMA $@
|
||||
cmd_mk_schema = $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) -o $@ $(filter-out FORCE, $^)
|
||||
|
||||
DT_DOCS = $(shell cd $(srctree)/$(src) && find * -name '*.yaml')
|
||||
DT_DOCS = $(shell \
|
||||
cd $(srctree)/$(src) && \
|
||||
find * \( -name '*.yaml' ! -name $(DT_TMP_SCHEMA) \) \
|
||||
)
|
||||
|
||||
DT_SCHEMA_FILES ?= $(addprefix $(src)/,$(DT_DOCS))
|
||||
|
||||
extra-y += $(patsubst $(src)/%.yaml,%.example.dts, $(DT_SCHEMA_FILES))
|
||||
|
|
|
@ -27,7 +27,6 @@ Example:
|
|||
reg = <0x04300000 0x20000>;
|
||||
reg-names = "kgsl_3d0_reg_memory";
|
||||
interrupts = <GIC_SPI 80 0>;
|
||||
interrupt-names = "kgsl_3d0_irq";
|
||||
clock-names =
|
||||
"core",
|
||||
"iface",
|
||||
|
|
|
@ -4,14 +4,10 @@ Required properties:
|
|||
- compatible : "olpc,ap-sp"
|
||||
- reg : base address and length of SoC's WTM registers
|
||||
- interrupts : SP-AP interrupt
|
||||
- clocks : phandle + clock-specifier for the clock that drives the WTM
|
||||
- clock-names: should be "sp"
|
||||
|
||||
Example:
|
||||
ap-sp@d4290000 {
|
||||
compatible = "olpc,ap-sp";
|
||||
reg = <0xd4290000 0x1000>;
|
||||
interrupts = <40>;
|
||||
clocks = <&soc_clocks MMP2_CLK_SP>;
|
||||
clock-names = "sp";
|
||||
}
|
||||
|
|
|
@ -56,26 +56,32 @@ of any kernel data structures.
|
|||
|
||||
dentry-state:
|
||||
|
||||
From linux/fs/dentry.c:
|
||||
From linux/include/linux/dcache.h:
|
||||
--------------------------------------------------------------
|
||||
struct {
|
||||
struct dentry_stat_t dentry_stat {
|
||||
int nr_dentry;
|
||||
int nr_unused;
|
||||
int age_limit; /* age in seconds */
|
||||
int want_pages; /* pages requested by system */
|
||||
int dummy[2];
|
||||
} dentry_stat = {0, 0, 45, 0,};
|
||||
--------------------------------------------------------------
|
||||
int nr_negative; /* # of unused negative dentries */
|
||||
int dummy; /* Reserved for future use */
|
||||
};
|
||||
--------------------------------------------------------------
|
||||
|
||||
Dentries are dynamically allocated and deallocated.
|
||||
|
||||
nr_dentry shows the total number of dentries allocated (active
|
||||
+ unused). nr_unused shows the number of dentries that are not
|
||||
actively used, but are saved in the LRU list for future reuse.
|
||||
|
||||
Dentries are dynamically allocated and deallocated, and
|
||||
nr_dentry seems to be 0 all the time. Hence it's safe to
|
||||
assume that only nr_unused, age_limit and want_pages are
|
||||
used. Nr_unused seems to be exactly what its name says.
|
||||
Age_limit is the age in seconds after which dcache entries
|
||||
can be reclaimed when memory is short and want_pages is
|
||||
nonzero when shrink_dcache_pages() has been called and the
|
||||
dcache isn't pruned yet.
|
||||
|
||||
nr_negative shows the number of unused dentries that are also
|
||||
negative dentries which do not mapped to actual files.
|
||||
|
||||
==============================================================
|
||||
|
||||
dquot-max & dquot-nr:
|
||||
|
|
|
@ -9,7 +9,7 @@ Fenghua Yu <fenghua.yu@intel.com>
|
|||
Tony Luck <tony.luck@intel.com>
|
||||
Vikas Shivappa <vikas.shivappa@intel.com>
|
||||
|
||||
This feature is enabled by the CONFIG_X86_RESCTRL and the x86 /proc/cpuinfo
|
||||
This feature is enabled by the CONFIG_X86_CPU_RESCTRL and the x86 /proc/cpuinfo
|
||||
flag bits:
|
||||
RDT (Resource Director Technology) Allocation - "rdt_a"
|
||||
CAT (Cache Allocation Technology) - "cat_l3", "cat_l2"
|
||||
|
|
97
MAINTAINERS
97
MAINTAINERS
|
@ -2848,6 +2848,9 @@ F: include/uapi/linux/if_bonding.h
|
|||
BPF (Safe dynamic programs and tools)
|
||||
M: Alexei Starovoitov <ast@kernel.org>
|
||||
M: Daniel Borkmann <daniel@iogearbox.net>
|
||||
R: Martin KaFai Lau <kafai@fb.com>
|
||||
R: Song Liu <songliubraving@fb.com>
|
||||
R: Yonghong Song <yhs@fb.com>
|
||||
L: netdev@vger.kernel.org
|
||||
L: linux-kernel@vger.kernel.org
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git
|
||||
|
@ -2873,6 +2876,8 @@ F: samples/bpf/
|
|||
F: tools/bpf/
|
||||
F: tools/lib/bpf/
|
||||
F: tools/testing/selftests/bpf/
|
||||
K: bpf
|
||||
N: bpf
|
||||
|
||||
BPF JIT for ARM
|
||||
M: Shubham Bansal <illusionist.neo@gmail.com>
|
||||
|
@ -3052,8 +3057,8 @@ F: include/linux/bcm963xx_nvram.h
|
|||
F: include/linux/bcm963xx_tag.h
|
||||
|
||||
BROADCOM BNX2 GIGABIT ETHERNET DRIVER
|
||||
M: Rasesh Mody <rasesh.mody@cavium.com>
|
||||
M: Dept-GELinuxNICDev@cavium.com
|
||||
M: Rasesh Mody <rmody@marvell.com>
|
||||
M: GR-Linux-NIC-Dev@marvell.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/net/ethernet/broadcom/bnx2.*
|
||||
|
@ -3072,9 +3077,9 @@ S: Supported
|
|||
F: drivers/scsi/bnx2i/
|
||||
|
||||
BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER
|
||||
M: Ariel Elior <ariel.elior@cavium.com>
|
||||
M: Sudarsana Kalluru <sudarsana.kalluru@cavium.com>
|
||||
M: everest-linux-l2@cavium.com
|
||||
M: Ariel Elior <aelior@marvell.com>
|
||||
M: Sudarsana Kalluru <skalluru@marvell.com>
|
||||
M: GR-everest-linux-l2@marvell.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/net/ethernet/broadcom/bnx2x/
|
||||
|
@ -3249,9 +3254,9 @@ S: Supported
|
|||
F: drivers/scsi/bfa/
|
||||
|
||||
BROCADE BNA 10 GIGABIT ETHERNET DRIVER
|
||||
M: Rasesh Mody <rasesh.mody@cavium.com>
|
||||
M: Sudarsana Kalluru <sudarsana.kalluru@cavium.com>
|
||||
M: Dept-GELinuxNICDev@cavium.com
|
||||
M: Rasesh Mody <rmody@marvell.com>
|
||||
M: Sudarsana Kalluru <skalluru@marvell.com>
|
||||
M: GR-Linux-NIC-Dev@marvell.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/net/ethernet/brocade/bna/
|
||||
|
@ -3978,6 +3983,7 @@ F: drivers/cpufreq/arm_big_little.c
|
|||
CPU POWER MONITORING SUBSYSTEM
|
||||
M: Thomas Renninger <trenn@suse.com>
|
||||
M: Shuah Khan <shuah@kernel.org>
|
||||
M: Shuah Khan <skhan@linuxfoundation.org>
|
||||
L: linux-pm@vger.kernel.org
|
||||
S: Maintained
|
||||
F: tools/power/cpupower/
|
||||
|
@ -5180,7 +5186,7 @@ DRM DRIVERS FOR XEN
|
|||
M: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
|
||||
T: git git://anongit.freedesktop.org/drm/drm-misc
|
||||
L: dri-devel@lists.freedesktop.org
|
||||
L: xen-devel@lists.xen.org
|
||||
L: xen-devel@lists.xenproject.org (moderated for non-subscribers)
|
||||
S: Supported
|
||||
F: drivers/gpu/drm/xen/
|
||||
F: Documentation/gpu/xen-front.rst
|
||||
|
@ -8258,6 +8264,7 @@ F: include/uapi/linux/sunrpc/
|
|||
|
||||
KERNEL SELFTEST FRAMEWORK
|
||||
M: Shuah Khan <shuah@kernel.org>
|
||||
M: Shuah Khan <skhan@linuxfoundation.org>
|
||||
L: linux-kselftest@vger.kernel.org
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git
|
||||
Q: https://patchwork.kernel.org/project/linux-kselftest/list/
|
||||
|
@ -10688,9 +10695,9 @@ S: Maintained
|
|||
F: drivers/net/netdevsim/*
|
||||
|
||||
NETXEN (1/10) GbE SUPPORT
|
||||
M: Manish Chopra <manish.chopra@cavium.com>
|
||||
M: Rahul Verma <rahul.verma@cavium.com>
|
||||
M: Dept-GELinuxNICDev@cavium.com
|
||||
M: Manish Chopra <manishc@marvell.com>
|
||||
M: Rahul Verma <rahulv@marvell.com>
|
||||
M: GR-Linux-NIC-Dev@marvell.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/net/ethernet/qlogic/netxen/
|
||||
|
@ -11305,10 +11312,12 @@ F: include/dt-bindings/
|
|||
|
||||
OPENCORES I2C BUS DRIVER
|
||||
M: Peter Korsgaard <peter@korsgaard.com>
|
||||
M: Andrew Lunn <andrew@lunn.ch>
|
||||
L: linux-i2c@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/i2c/busses/i2c-ocores
|
||||
F: drivers/i2c/busses/i2c-ocores.c
|
||||
F: include/linux/platform_data/i2c-ocores.h
|
||||
|
||||
OPENRISC ARCHITECTURE
|
||||
M: Jonas Bonn <jonas@southpole.se>
|
||||
|
@ -12466,8 +12475,8 @@ S: Supported
|
|||
F: drivers/scsi/qedi/
|
||||
|
||||
QLOGIC QL4xxx ETHERNET DRIVER
|
||||
M: Ariel Elior <Ariel.Elior@cavium.com>
|
||||
M: everest-linux-l2@cavium.com
|
||||
M: Ariel Elior <aelior@marvell.com>
|
||||
M: GR-everest-linux-l2@marvell.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/net/ethernet/qlogic/qed/
|
||||
|
@ -12475,8 +12484,8 @@ F: include/linux/qed/
|
|||
F: drivers/net/ethernet/qlogic/qede/
|
||||
|
||||
QLOGIC QL4xxx RDMA DRIVER
|
||||
M: Michal Kalderon <Michal.Kalderon@cavium.com>
|
||||
M: Ariel Elior <Ariel.Elior@cavium.com>
|
||||
M: Michal Kalderon <mkalderon@marvell.com>
|
||||
M: Ariel Elior <aelior@marvell.com>
|
||||
L: linux-rdma@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/infiniband/hw/qedr/
|
||||
|
@ -12496,7 +12505,7 @@ F: Documentation/scsi/LICENSE.qla2xxx
|
|||
F: drivers/scsi/qla2xxx/
|
||||
|
||||
QLOGIC QLA3XXX NETWORK DRIVER
|
||||
M: Dept-GELinuxNICDev@cavium.com
|
||||
M: GR-Linux-NIC-Dev@marvell.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/networking/device_drivers/qlogic/LICENSE.qla3xxx
|
||||
|
@ -12510,16 +12519,16 @@ F: Documentation/scsi/LICENSE.qla4xxx
|
|||
F: drivers/scsi/qla4xxx/
|
||||
|
||||
QLOGIC QLCNIC (1/10)Gb ETHERNET DRIVER
|
||||
M: Shahed Shaikh <Shahed.Shaikh@cavium.com>
|
||||
M: Manish Chopra <manish.chopra@cavium.com>
|
||||
M: Dept-GELinuxNICDev@cavium.com
|
||||
M: Shahed Shaikh <shshaikh@marvell.com>
|
||||
M: Manish Chopra <manishc@marvell.com>
|
||||
M: GR-Linux-NIC-Dev@marvell.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/net/ethernet/qlogic/qlcnic/
|
||||
|
||||
QLOGIC QLGE 10Gb ETHERNET DRIVER
|
||||
M: Manish Chopra <manish.chopra@cavium.com>
|
||||
M: Dept-GELinuxNICDev@cavium.com
|
||||
M: Manish Chopra <manishc@marvell.com>
|
||||
M: GR-Linux-NIC-Dev@marvell.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/net/ethernet/qlogic/qlge/
|
||||
|
@ -12858,6 +12867,13 @@ F: Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
|
|||
F: drivers/net/dsa/realtek-smi*
|
||||
F: drivers/net/dsa/rtl83*
|
||||
|
||||
REDPINE WIRELESS DRIVER
|
||||
M: Amitkumar Karwar <amitkarwar@gmail.com>
|
||||
M: Siva Rebbagondla <siva8118@gmail.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/wireless/rsi/
|
||||
|
||||
REGISTER MAP ABSTRACTION
|
||||
M: Mark Brown <broonie@kernel.org>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
|
@ -13687,6 +13703,15 @@ L: netdev@vger.kernel.org
|
|||
S: Supported
|
||||
F: drivers/net/ethernet/sfc/
|
||||
|
||||
SFF/SFP/SFP+ MODULE SUPPORT
|
||||
M: Russell King <linux@armlinux.org.uk>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/phy/phylink.c
|
||||
F: drivers/net/phy/sfp*
|
||||
F: include/linux/phylink.h
|
||||
F: include/linux/sfp.h
|
||||
|
||||
SGI GRU DRIVER
|
||||
M: Dimitri Sivanich <sivanich@sgi.com>
|
||||
S: Maintained
|
||||
|
@ -15834,6 +15859,7 @@ F: drivers/usb/common/usb-otg-fsm.c
|
|||
USB OVER IP DRIVER
|
||||
M: Valentina Manea <valentina.manea.m@gmail.com>
|
||||
M: Shuah Khan <shuah@kernel.org>
|
||||
M: Shuah Khan <skhan@linuxfoundation.org>
|
||||
L: linux-usb@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/usb/usbip_protocol.txt
|
||||
|
@ -16631,6 +16657,15 @@ S: Maintained
|
|||
F: drivers/platform/x86/
|
||||
F: drivers/platform/olpc/
|
||||
|
||||
X86 PLATFORM DRIVERS - ARCH
|
||||
R: Darren Hart <dvhart@infradead.org>
|
||||
R: Andy Shevchenko <andy@infradead.org>
|
||||
L: platform-driver-x86@vger.kernel.org
|
||||
L: x86@kernel.org
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/core
|
||||
S: Maintained
|
||||
F: arch/x86/platform
|
||||
|
||||
X86 VDSO
|
||||
M: Andy Lutomirski <luto@kernel.org>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
|
@ -16663,6 +16698,24 @@ T: git git://linuxtv.org/media_tree.git
|
|||
S: Maintained
|
||||
F: drivers/media/tuners/tuner-xc2028.*
|
||||
|
||||
XDP (eXpress Data Path)
|
||||
M: Alexei Starovoitov <ast@kernel.org>
|
||||
M: Daniel Borkmann <daniel@iogearbox.net>
|
||||
M: David S. Miller <davem@davemloft.net>
|
||||
M: Jakub Kicinski <jakub.kicinski@netronome.com>
|
||||
M: Jesper Dangaard Brouer <hawk@kernel.org>
|
||||
M: John Fastabend <john.fastabend@gmail.com>
|
||||
L: netdev@vger.kernel.org
|
||||
L: xdp-newbies@vger.kernel.org
|
||||
S: Supported
|
||||
F: net/core/xdp.c
|
||||
F: include/net/xdp.h
|
||||
F: kernel/bpf/devmap.c
|
||||
F: kernel/bpf/cpumap.c
|
||||
F: include/trace/events/xdp.h
|
||||
K: xdp
|
||||
N: xdp
|
||||
|
||||
XDP SOCKETS (AF_XDP)
|
||||
M: Björn Töpel <bjorn.topel@intel.com>
|
||||
M: Magnus Karlsson <magnus.karlsson@intel.com>
|
||||
|
|
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@
|
|||
VERSION = 5
|
||||
PATCHLEVEL = 0
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc3
|
||||
EXTRAVERSION = -rc6
|
||||
NAME = Shy Crocodile
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
@ -3,23 +3,19 @@ generic-y += bugs.h
|
|||
generic-y += compat.h
|
||||
generic-y += device.h
|
||||
generic-y += div64.h
|
||||
generic-y += dma-mapping.h
|
||||
generic-y += emergency-restart.h
|
||||
generic-y += extable.h
|
||||
generic-y += fb.h
|
||||
generic-y += ftrace.h
|
||||
generic-y += hardirq.h
|
||||
generic-y += hw_irq.h
|
||||
generic-y += irq_regs.h
|
||||
generic-y += irq_work.h
|
||||
generic-y += kmap_types.h
|
||||
generic-y += local.h
|
||||
generic-y += local64.h
|
||||
generic-y += mcs_spinlock.h
|
||||
generic-y += mm-arch-hooks.h
|
||||
generic-y += msi.h
|
||||
generic-y += parport.h
|
||||
generic-y += pci.h
|
||||
generic-y += percpu.h
|
||||
generic-y += preempt.h
|
||||
generic-y += topology.h
|
||||
|
|
|
@ -216,6 +216,14 @@ struct bcr_fp_arcv2 {
|
|||
#endif
|
||||
};
|
||||
|
||||
struct bcr_actionpoint {
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
unsigned int pad:21, min:1, num:2, ver:8;
|
||||
#else
|
||||
unsigned int ver:8, num:2, min:1, pad:21;
|
||||
#endif
|
||||
};
|
||||
|
||||
#include <soc/arc/timers.h>
|
||||
|
||||
struct bcr_bpu_arcompact {
|
||||
|
@ -283,7 +291,7 @@ struct cpuinfo_arc_cache {
|
|||
};
|
||||
|
||||
struct cpuinfo_arc_bpu {
|
||||
unsigned int ver, full, num_cache, num_pred;
|
||||
unsigned int ver, full, num_cache, num_pred, ret_stk;
|
||||
};
|
||||
|
||||
struct cpuinfo_arc_ccm {
|
||||
|
@ -302,7 +310,7 @@ struct cpuinfo_arc {
|
|||
struct {
|
||||
unsigned int swap:1, norm:1, minmax:1, barrel:1, crc:1, swape:1, pad1:2,
|
||||
fpu_sp:1, fpu_dp:1, dual:1, dual_enb:1, pad2:4,
|
||||
debug:1, ap:1, smart:1, rtt:1, pad3:4,
|
||||
ap_num:4, ap_full:1, smart:1, rtt:1, pad3:1,
|
||||
timer0:1, timer1:1, rtc:1, gfrc:1, pad4:4;
|
||||
} extn;
|
||||
struct bcr_mpy extn_mpy;
|
||||
|
|
|
@ -340,7 +340,7 @@ static inline __attribute__ ((const)) int __fls(unsigned long x)
|
|||
/*
|
||||
* __ffs: Similar to ffs, but zero based (0-31)
|
||||
*/
|
||||
static inline __attribute__ ((const)) int __ffs(unsigned long word)
|
||||
static inline __attribute__ ((const)) unsigned long __ffs(unsigned long word)
|
||||
{
|
||||
if (!word)
|
||||
return word;
|
||||
|
@ -400,9 +400,9 @@ static inline __attribute__ ((const)) int ffs(unsigned long x)
|
|||
/*
|
||||
* __ffs: Similar to ffs, but zero based (0-31)
|
||||
*/
|
||||
static inline __attribute__ ((const)) int __ffs(unsigned long x)
|
||||
static inline __attribute__ ((const)) unsigned long __ffs(unsigned long x)
|
||||
{
|
||||
int n;
|
||||
unsigned long n;
|
||||
|
||||
asm volatile(
|
||||
" ffs.f %0, %1 \n" /* 0:31; 31(Z) if src 0 */
|
||||
|
|
|
@ -103,7 +103,8 @@ static const char * const arc_pmu_ev_hw_map[] = {
|
|||
|
||||
/* counts condition */
|
||||
[PERF_COUNT_HW_INSTRUCTIONS] = "iall",
|
||||
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = "ijmp", /* Excludes ZOL jumps */
|
||||
/* All jump instructions that are taken */
|
||||
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = "ijmptak",
|
||||
[PERF_COUNT_ARC_BPOK] = "bpok", /* NP-NT, PT-T, PNT-NT */
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
[PERF_COUNT_HW_BRANCH_MISSES] = "bpmp",
|
||||
|
|
|
@ -1,15 +1,10 @@
|
|||
/*
|
||||
* Linux performance counter support for ARC700 series
|
||||
*
|
||||
* Copyright (C) 2013-2015 Synopsys, Inc. (www.synopsys.com)
|
||||
*
|
||||
* This code is inspired by the perf support of various other architectures.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
*/
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
//
|
||||
// Linux performance counter support for ARC CPUs.
|
||||
// This code is inspired by the perf support of various other architectures.
|
||||
//
|
||||
// Copyright (C) 2013-2018 Synopsys, Inc. (www.synopsys.com)
|
||||
|
||||
#include <linux/errno.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/module.h>
|
||||
|
@ -19,12 +14,31 @@
|
|||
#include <asm/arcregs.h>
|
||||
#include <asm/stacktrace.h>
|
||||
|
||||
/* HW holds 8 symbols + one for null terminator */
|
||||
#define ARCPMU_EVENT_NAME_LEN 9
|
||||
|
||||
enum arc_pmu_attr_groups {
|
||||
ARCPMU_ATTR_GR_EVENTS,
|
||||
ARCPMU_ATTR_GR_FORMATS,
|
||||
ARCPMU_NR_ATTR_GR
|
||||
};
|
||||
|
||||
struct arc_pmu_raw_event_entry {
|
||||
char name[ARCPMU_EVENT_NAME_LEN];
|
||||
};
|
||||
|
||||
struct arc_pmu {
|
||||
struct pmu pmu;
|
||||
unsigned int irq;
|
||||
int n_counters;
|
||||
int n_events;
|
||||
u64 max_period;
|
||||
int ev_hw_idx[PERF_COUNT_ARC_HW_MAX];
|
||||
|
||||
struct arc_pmu_raw_event_entry *raw_entry;
|
||||
struct attribute **attrs;
|
||||
struct perf_pmu_events_attr *attr;
|
||||
const struct attribute_group *attr_groups[ARCPMU_NR_ATTR_GR + 1];
|
||||
};
|
||||
|
||||
struct arc_pmu_cpu {
|
||||
|
@ -49,6 +63,7 @@ static int callchain_trace(unsigned int addr, void *data)
|
|||
{
|
||||
struct arc_callchain_trace *ctrl = data;
|
||||
struct perf_callchain_entry_ctx *entry = ctrl->perf_stuff;
|
||||
|
||||
perf_callchain_store(entry, addr);
|
||||
|
||||
if (ctrl->depth++ < 3)
|
||||
|
@ -57,8 +72,8 @@ static int callchain_trace(unsigned int addr, void *data)
|
|||
return -1;
|
||||
}
|
||||
|
||||
void
|
||||
perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs)
|
||||
void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
struct arc_callchain_trace ctrl = {
|
||||
.depth = 0,
|
||||
|
@ -68,8 +83,8 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *re
|
|||
arc_unwind_core(NULL, regs, callchain_trace, &ctrl);
|
||||
}
|
||||
|
||||
void
|
||||
perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs)
|
||||
void perf_callchain_user(struct perf_callchain_entry_ctx *entry,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
/*
|
||||
* User stack can't be unwound trivially with kernel dwarf unwinder
|
||||
|
@ -82,10 +97,10 @@ static struct arc_pmu *arc_pmu;
|
|||
static DEFINE_PER_CPU(struct arc_pmu_cpu, arc_pmu_cpu);
|
||||
|
||||
/* read counter #idx; note that counter# != event# on ARC! */
|
||||
static uint64_t arc_pmu_read_counter(int idx)
|
||||
static u64 arc_pmu_read_counter(int idx)
|
||||
{
|
||||
uint32_t tmp;
|
||||
uint64_t result;
|
||||
u32 tmp;
|
||||
u64 result;
|
||||
|
||||
/*
|
||||
* ARC supports making 'snapshots' of the counters, so we don't
|
||||
|
@ -94,7 +109,7 @@ static uint64_t arc_pmu_read_counter(int idx)
|
|||
write_aux_reg(ARC_REG_PCT_INDEX, idx);
|
||||
tmp = read_aux_reg(ARC_REG_PCT_CONTROL);
|
||||
write_aux_reg(ARC_REG_PCT_CONTROL, tmp | ARC_REG_PCT_CONTROL_SN);
|
||||
result = (uint64_t) (read_aux_reg(ARC_REG_PCT_SNAPH)) << 32;
|
||||
result = (u64) (read_aux_reg(ARC_REG_PCT_SNAPH)) << 32;
|
||||
result |= read_aux_reg(ARC_REG_PCT_SNAPL);
|
||||
|
||||
return result;
|
||||
|
@ -103,9 +118,9 @@ static uint64_t arc_pmu_read_counter(int idx)
|
|||
static void arc_perf_event_update(struct perf_event *event,
|
||||
struct hw_perf_event *hwc, int idx)
|
||||
{
|
||||
uint64_t prev_raw_count = local64_read(&hwc->prev_count);
|
||||
uint64_t new_raw_count = arc_pmu_read_counter(idx);
|
||||
int64_t delta = new_raw_count - prev_raw_count;
|
||||
u64 prev_raw_count = local64_read(&hwc->prev_count);
|
||||
u64 new_raw_count = arc_pmu_read_counter(idx);
|
||||
s64 delta = new_raw_count - prev_raw_count;
|
||||
|
||||
/*
|
||||
* We aren't afraid of hwc->prev_count changing beneath our feet
|
||||
|
@ -155,7 +170,7 @@ static int arc_pmu_event_init(struct perf_event *event)
|
|||
int ret;
|
||||
|
||||
if (!is_sampling_event(event)) {
|
||||
hwc->sample_period = arc_pmu->max_period;
|
||||
hwc->sample_period = arc_pmu->max_period;
|
||||
hwc->last_period = hwc->sample_period;
|
||||
local64_set(&hwc->period_left, hwc->sample_period);
|
||||
}
|
||||
|
@ -192,6 +207,18 @@ static int arc_pmu_event_init(struct perf_event *event)
|
|||
pr_debug("init cache event with h/w %08x \'%s\'\n",
|
||||
(int)hwc->config, arc_pmu_ev_hw_map[ret]);
|
||||
return 0;
|
||||
|
||||
case PERF_TYPE_RAW:
|
||||
if (event->attr.config >= arc_pmu->n_events)
|
||||
return -ENOENT;
|
||||
|
||||
hwc->config |= event->attr.config;
|
||||
pr_debug("init raw event with idx %lld \'%s\'\n",
|
||||
event->attr.config,
|
||||
arc_pmu->raw_entry[event->attr.config].name);
|
||||
|
||||
return 0;
|
||||
|
||||
default:
|
||||
return -ENOENT;
|
||||
}
|
||||
|
@ -200,7 +227,7 @@ static int arc_pmu_event_init(struct perf_event *event)
|
|||
/* starts all counters */
|
||||
static void arc_pmu_enable(struct pmu *pmu)
|
||||
{
|
||||
uint32_t tmp;
|
||||
u32 tmp;
|
||||
tmp = read_aux_reg(ARC_REG_PCT_CONTROL);
|
||||
write_aux_reg(ARC_REG_PCT_CONTROL, (tmp & 0xffff0000) | 0x1);
|
||||
}
|
||||
|
@ -208,7 +235,7 @@ static void arc_pmu_enable(struct pmu *pmu)
|
|||
/* stops all counters */
|
||||
static void arc_pmu_disable(struct pmu *pmu)
|
||||
{
|
||||
uint32_t tmp;
|
||||
u32 tmp;
|
||||
tmp = read_aux_reg(ARC_REG_PCT_CONTROL);
|
||||
write_aux_reg(ARC_REG_PCT_CONTROL, (tmp & 0xffff0000) | 0x0);
|
||||
}
|
||||
|
@ -228,7 +255,7 @@ static int arc_pmu_event_set_period(struct perf_event *event)
|
|||
local64_set(&hwc->period_left, left);
|
||||
hwc->last_period = period;
|
||||
overflow = 1;
|
||||
} else if (unlikely(left <= 0)) {
|
||||
} else if (unlikely(left <= 0)) {
|
||||
/* left underflowed by less than period. */
|
||||
left += period;
|
||||
local64_set(&hwc->period_left, left);
|
||||
|
@ -246,8 +273,8 @@ static int arc_pmu_event_set_period(struct perf_event *event)
|
|||
write_aux_reg(ARC_REG_PCT_INDEX, idx);
|
||||
|
||||
/* Write value */
|
||||
write_aux_reg(ARC_REG_PCT_COUNTL, (u32)value);
|
||||
write_aux_reg(ARC_REG_PCT_COUNTH, (value >> 32));
|
||||
write_aux_reg(ARC_REG_PCT_COUNTL, lower_32_bits(value));
|
||||
write_aux_reg(ARC_REG_PCT_COUNTH, upper_32_bits(value));
|
||||
|
||||
perf_event_update_userpage(event);
|
||||
|
||||
|
@ -277,7 +304,7 @@ static void arc_pmu_start(struct perf_event *event, int flags)
|
|||
/* Enable interrupt for this counter */
|
||||
if (is_sampling_event(event))
|
||||
write_aux_reg(ARC_REG_PCT_INT_CTRL,
|
||||
read_aux_reg(ARC_REG_PCT_INT_CTRL) | (1 << idx));
|
||||
read_aux_reg(ARC_REG_PCT_INT_CTRL) | BIT(idx));
|
||||
|
||||
/* enable ARC pmu here */
|
||||
write_aux_reg(ARC_REG_PCT_INDEX, idx); /* counter # */
|
||||
|
@ -295,9 +322,9 @@ static void arc_pmu_stop(struct perf_event *event, int flags)
|
|||
* Reset interrupt flag by writing of 1. This is required
|
||||
* to make sure pending interrupt was not left.
|
||||
*/
|
||||
write_aux_reg(ARC_REG_PCT_INT_ACT, 1 << idx);
|
||||
write_aux_reg(ARC_REG_PCT_INT_ACT, BIT(idx));
|
||||
write_aux_reg(ARC_REG_PCT_INT_CTRL,
|
||||
read_aux_reg(ARC_REG_PCT_INT_CTRL) & ~(1 << idx));
|
||||
read_aux_reg(ARC_REG_PCT_INT_CTRL) & ~BIT(idx));
|
||||
}
|
||||
|
||||
if (!(event->hw.state & PERF_HES_STOPPED)) {
|
||||
|
@ -349,9 +376,10 @@ static int arc_pmu_add(struct perf_event *event, int flags)
|
|||
|
||||
if (is_sampling_event(event)) {
|
||||
/* Mimic full counter overflow as other arches do */
|
||||
write_aux_reg(ARC_REG_PCT_INT_CNTL, (u32)arc_pmu->max_period);
|
||||
write_aux_reg(ARC_REG_PCT_INT_CNTL,
|
||||
lower_32_bits(arc_pmu->max_period));
|
||||
write_aux_reg(ARC_REG_PCT_INT_CNTH,
|
||||
(arc_pmu->max_period >> 32));
|
||||
upper_32_bits(arc_pmu->max_period));
|
||||
}
|
||||
|
||||
write_aux_reg(ARC_REG_PCT_CONFIG, 0);
|
||||
|
@ -392,7 +420,7 @@ static irqreturn_t arc_pmu_intr(int irq, void *dev)
|
|||
idx = __ffs(active_ints);
|
||||
|
||||
/* Reset interrupt flag by writing of 1 */
|
||||
write_aux_reg(ARC_REG_PCT_INT_ACT, 1 << idx);
|
||||
write_aux_reg(ARC_REG_PCT_INT_ACT, BIT(idx));
|
||||
|
||||
/*
|
||||
* On reset of "interrupt active" bit corresponding
|
||||
|
@ -400,7 +428,7 @@ static irqreturn_t arc_pmu_intr(int irq, void *dev)
|
|||
* Now we need to re-enable interrupt for the counter.
|
||||
*/
|
||||
write_aux_reg(ARC_REG_PCT_INT_CTRL,
|
||||
read_aux_reg(ARC_REG_PCT_INT_CTRL) | (1 << idx));
|
||||
read_aux_reg(ARC_REG_PCT_INT_CTRL) | BIT(idx));
|
||||
|
||||
event = pmu_cpu->act_counter[idx];
|
||||
hwc = &event->hw;
|
||||
|
@ -414,7 +442,7 @@ static irqreturn_t arc_pmu_intr(int irq, void *dev)
|
|||
arc_pmu_stop(event, 0);
|
||||
}
|
||||
|
||||
active_ints &= ~(1U << idx);
|
||||
active_ints &= ~BIT(idx);
|
||||
} while (active_ints);
|
||||
|
||||
done:
|
||||
|
@ -441,19 +469,108 @@ static void arc_cpu_pmu_irq_init(void *data)
|
|||
write_aux_reg(ARC_REG_PCT_INT_ACT, 0xffffffff);
|
||||
}
|
||||
|
||||
/* Event field occupies the bottom 15 bits of our config field */
|
||||
PMU_FORMAT_ATTR(event, "config:0-14");
|
||||
static struct attribute *arc_pmu_format_attrs[] = {
|
||||
&format_attr_event.attr,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group arc_pmu_format_attr_gr = {
|
||||
.name = "format",
|
||||
.attrs = arc_pmu_format_attrs,
|
||||
};
|
||||
|
||||
static ssize_t arc_pmu_events_sysfs_show(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *page)
|
||||
{
|
||||
struct perf_pmu_events_attr *pmu_attr;
|
||||
|
||||
pmu_attr = container_of(attr, struct perf_pmu_events_attr, attr);
|
||||
return sprintf(page, "event=0x%04llx\n", pmu_attr->id);
|
||||
}
|
||||
|
||||
/*
|
||||
* We don't add attrs here as we don't have pre-defined list of perf events.
|
||||
* We will generate and add attrs dynamically in probe() after we read HW
|
||||
* configuration.
|
||||
*/
|
||||
static struct attribute_group arc_pmu_events_attr_gr = {
|
||||
.name = "events",
|
||||
};
|
||||
|
||||
static void arc_pmu_add_raw_event_attr(int j, char *str)
|
||||
{
|
||||
memmove(arc_pmu->raw_entry[j].name, str, ARCPMU_EVENT_NAME_LEN - 1);
|
||||
arc_pmu->attr[j].attr.attr.name = arc_pmu->raw_entry[j].name;
|
||||
arc_pmu->attr[j].attr.attr.mode = VERIFY_OCTAL_PERMISSIONS(0444);
|
||||
arc_pmu->attr[j].attr.show = arc_pmu_events_sysfs_show;
|
||||
arc_pmu->attr[j].id = j;
|
||||
arc_pmu->attrs[j] = &(arc_pmu->attr[j].attr.attr);
|
||||
}
|
||||
|
||||
static int arc_pmu_raw_alloc(struct device *dev)
|
||||
{
|
||||
arc_pmu->attr = devm_kmalloc_array(dev, arc_pmu->n_events + 1,
|
||||
sizeof(*arc_pmu->attr), GFP_KERNEL | __GFP_ZERO);
|
||||
if (!arc_pmu->attr)
|
||||
return -ENOMEM;
|
||||
|
||||
arc_pmu->attrs = devm_kmalloc_array(dev, arc_pmu->n_events + 1,
|
||||
sizeof(*arc_pmu->attrs), GFP_KERNEL | __GFP_ZERO);
|
||||
if (!arc_pmu->attrs)
|
||||
return -ENOMEM;
|
||||
|
||||
arc_pmu->raw_entry = devm_kmalloc_array(dev, arc_pmu->n_events,
|
||||
sizeof(*arc_pmu->raw_entry), GFP_KERNEL | __GFP_ZERO);
|
||||
if (!arc_pmu->raw_entry)
|
||||
return -ENOMEM;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline bool event_in_hw_event_map(int i, char *name)
|
||||
{
|
||||
if (!arc_pmu_ev_hw_map[i])
|
||||
return false;
|
||||
|
||||
if (!strlen(arc_pmu_ev_hw_map[i]))
|
||||
return false;
|
||||
|
||||
if (strcmp(arc_pmu_ev_hw_map[i], name))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void arc_pmu_map_hw_event(int j, char *str)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* See if HW condition has been mapped to a perf event_id */
|
||||
for (i = 0; i < ARRAY_SIZE(arc_pmu_ev_hw_map); i++) {
|
||||
if (event_in_hw_event_map(i, str)) {
|
||||
pr_debug("mapping perf event %2d to h/w event \'%8s\' (idx %d)\n",
|
||||
i, str, j);
|
||||
arc_pmu->ev_hw_idx[i] = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int arc_pmu_device_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct arc_reg_pct_build pct_bcr;
|
||||
struct arc_reg_cc_build cc_bcr;
|
||||
int i, j, has_interrupts;
|
||||
int i, has_interrupts;
|
||||
int counter_size; /* in bits */
|
||||
|
||||
union cc_name {
|
||||
struct {
|
||||
uint32_t word0, word1;
|
||||
u32 word0, word1;
|
||||
char sentinel;
|
||||
} indiv;
|
||||
char str[9];
|
||||
char str[ARCPMU_EVENT_NAME_LEN];
|
||||
} cc_name;
|
||||
|
||||
|
||||
|
@ -463,15 +580,22 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
|
|||
return -ENODEV;
|
||||
}
|
||||
BUILD_BUG_ON(ARC_PERF_MAX_COUNTERS > 32);
|
||||
BUG_ON(pct_bcr.c > ARC_PERF_MAX_COUNTERS);
|
||||
if (WARN_ON(pct_bcr.c > ARC_PERF_MAX_COUNTERS))
|
||||
return -EINVAL;
|
||||
|
||||
READ_BCR(ARC_REG_CC_BUILD, cc_bcr);
|
||||
BUG_ON(!cc_bcr.v); /* Counters exist but No countable conditions ? */
|
||||
if (WARN(!cc_bcr.v, "Counters exist but No countable conditions?"))
|
||||
return -EINVAL;
|
||||
|
||||
arc_pmu = devm_kzalloc(&pdev->dev, sizeof(struct arc_pmu), GFP_KERNEL);
|
||||
if (!arc_pmu)
|
||||
return -ENOMEM;
|
||||
|
||||
arc_pmu->n_events = cc_bcr.c;
|
||||
|
||||
if (arc_pmu_raw_alloc(&pdev->dev))
|
||||
return -ENOMEM;
|
||||
|
||||
has_interrupts = is_isa_arcv2() ? pct_bcr.i : 0;
|
||||
|
||||
arc_pmu->n_counters = pct_bcr.c;
|
||||
|
@ -481,30 +605,26 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
|
|||
|
||||
pr_info("ARC perf\t: %d counters (%d bits), %d conditions%s\n",
|
||||
arc_pmu->n_counters, counter_size, cc_bcr.c,
|
||||
has_interrupts ? ", [overflow IRQ support]":"");
|
||||
has_interrupts ? ", [overflow IRQ support]" : "");
|
||||
|
||||
cc_name.str[8] = 0;
|
||||
cc_name.str[ARCPMU_EVENT_NAME_LEN - 1] = 0;
|
||||
for (i = 0; i < PERF_COUNT_ARC_HW_MAX; i++)
|
||||
arc_pmu->ev_hw_idx[i] = -1;
|
||||
|
||||
/* loop thru all available h/w condition indexes */
|
||||
for (j = 0; j < cc_bcr.c; j++) {
|
||||
write_aux_reg(ARC_REG_CC_INDEX, j);
|
||||
for (i = 0; i < cc_bcr.c; i++) {
|
||||
write_aux_reg(ARC_REG_CC_INDEX, i);
|
||||
cc_name.indiv.word0 = read_aux_reg(ARC_REG_CC_NAME0);
|
||||
cc_name.indiv.word1 = read_aux_reg(ARC_REG_CC_NAME1);
|
||||
|
||||
/* See if it has been mapped to a perf event_id */
|
||||
for (i = 0; i < ARRAY_SIZE(arc_pmu_ev_hw_map); i++) {
|
||||
if (arc_pmu_ev_hw_map[i] &&
|
||||
!strcmp(arc_pmu_ev_hw_map[i], cc_name.str) &&
|
||||
strlen(arc_pmu_ev_hw_map[i])) {
|
||||
pr_debug("mapping perf event %2d to h/w event \'%8s\' (idx %d)\n",
|
||||
i, cc_name.str, j);
|
||||
arc_pmu->ev_hw_idx[i] = j;
|
||||
}
|
||||
}
|
||||
arc_pmu_map_hw_event(i, cc_name.str);
|
||||
arc_pmu_add_raw_event_attr(i, cc_name.str);
|
||||
}
|
||||
|
||||
arc_pmu_events_attr_gr.attrs = arc_pmu->attrs;
|
||||
arc_pmu->attr_groups[ARCPMU_ATTR_GR_EVENTS] = &arc_pmu_events_attr_gr;
|
||||
arc_pmu->attr_groups[ARCPMU_ATTR_GR_FORMATS] = &arc_pmu_format_attr_gr;
|
||||
|
||||
arc_pmu->pmu = (struct pmu) {
|
||||
.pmu_enable = arc_pmu_enable,
|
||||
.pmu_disable = arc_pmu_disable,
|
||||
|
@ -514,6 +634,7 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
|
|||
.start = arc_pmu_start,
|
||||
.stop = arc_pmu_stop,
|
||||
.read = arc_pmu_read,
|
||||
.attr_groups = arc_pmu->attr_groups,
|
||||
};
|
||||
|
||||
if (has_interrupts) {
|
||||
|
@ -535,17 +656,19 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
|
|||
} else
|
||||
arc_pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
|
||||
|
||||
return perf_pmu_register(&arc_pmu->pmu, pdev->name, PERF_TYPE_RAW);
|
||||
/*
|
||||
* perf parser doesn't really like '-' symbol in events name, so let's
|
||||
* use '_' in arc pct name as it goes to kernel PMU event prefix.
|
||||
*/
|
||||
return perf_pmu_register(&arc_pmu->pmu, "arc_pct", PERF_TYPE_RAW);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
static const struct of_device_id arc_pmu_match[] = {
|
||||
{ .compatible = "snps,arc700-pct" },
|
||||
{ .compatible = "snps,archs-pct" },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, arc_pmu_match);
|
||||
#endif
|
||||
|
||||
static struct platform_driver arc_pmu_driver = {
|
||||
.driver = {
|
||||
|
|
|
@ -123,6 +123,7 @@ static void read_arc_build_cfg_regs(void)
|
|||
struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()];
|
||||
const struct id_to_str *tbl;
|
||||
struct bcr_isa_arcv2 isa;
|
||||
struct bcr_actionpoint ap;
|
||||
|
||||
FIX_PTR(cpu);
|
||||
|
||||
|
@ -195,6 +196,7 @@ static void read_arc_build_cfg_regs(void)
|
|||
cpu->bpu.full = bpu.ft;
|
||||
cpu->bpu.num_cache = 256 << bpu.bce;
|
||||
cpu->bpu.num_pred = 2048 << bpu.pte;
|
||||
cpu->bpu.ret_stk = 4 << bpu.rse;
|
||||
|
||||
if (cpu->core.family >= 0x54) {
|
||||
unsigned int exec_ctrl;
|
||||
|
@ -207,8 +209,11 @@ static void read_arc_build_cfg_regs(void)
|
|||
}
|
||||
}
|
||||
|
||||
READ_BCR(ARC_REG_AP_BCR, bcr);
|
||||
cpu->extn.ap = bcr.ver ? 1 : 0;
|
||||
READ_BCR(ARC_REG_AP_BCR, ap);
|
||||
if (ap.ver) {
|
||||
cpu->extn.ap_num = 2 << ap.num;
|
||||
cpu->extn.ap_full = !!ap.min;
|
||||
}
|
||||
|
||||
READ_BCR(ARC_REG_SMART_BCR, bcr);
|
||||
cpu->extn.smart = bcr.ver ? 1 : 0;
|
||||
|
@ -216,8 +221,6 @@ static void read_arc_build_cfg_regs(void)
|
|||
READ_BCR(ARC_REG_RTT_BCR, bcr);
|
||||
cpu->extn.rtt = bcr.ver ? 1 : 0;
|
||||
|
||||
cpu->extn.debug = cpu->extn.ap | cpu->extn.smart | cpu->extn.rtt;
|
||||
|
||||
READ_BCR(ARC_REG_ISA_CFG_BCR, isa);
|
||||
|
||||
/* some hacks for lack of feature BCR info in old ARC700 cores */
|
||||
|
@ -299,10 +302,10 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len)
|
|||
|
||||
if (cpu->bpu.ver)
|
||||
n += scnprintf(buf + n, len - n,
|
||||
"BPU\t\t: %s%s match, cache:%d, Predict Table:%d",
|
||||
"BPU\t\t: %s%s match, cache:%d, Predict Table:%d Return stk: %d",
|
||||
IS_AVAIL1(cpu->bpu.full, "full"),
|
||||
IS_AVAIL1(!cpu->bpu.full, "partial"),
|
||||
cpu->bpu.num_cache, cpu->bpu.num_pred);
|
||||
cpu->bpu.num_cache, cpu->bpu.num_pred, cpu->bpu.ret_stk);
|
||||
|
||||
if (is_isa_arcv2()) {
|
||||
struct bcr_lpb lpb;
|
||||
|
@ -336,11 +339,17 @@ static char *arc_extn_mumbojumbo(int cpu_id, char *buf, int len)
|
|||
IS_AVAIL1(cpu->extn.fpu_sp, "SP "),
|
||||
IS_AVAIL1(cpu->extn.fpu_dp, "DP "));
|
||||
|
||||
if (cpu->extn.debug)
|
||||
n += scnprintf(buf + n, len - n, "DEBUG\t\t: %s%s%s\n",
|
||||
IS_AVAIL1(cpu->extn.ap, "ActionPoint "),
|
||||
if (cpu->extn.ap_num | cpu->extn.smart | cpu->extn.rtt) {
|
||||
n += scnprintf(buf + n, len - n, "DEBUG\t\t: %s%s",
|
||||
IS_AVAIL1(cpu->extn.smart, "smaRT "),
|
||||
IS_AVAIL1(cpu->extn.rtt, "RTT "));
|
||||
if (cpu->extn.ap_num) {
|
||||
n += scnprintf(buf + n, len - n, "ActionPoint %d/%s",
|
||||
cpu->extn.ap_num,
|
||||
cpu->extn.ap_full ? "full":"min");
|
||||
}
|
||||
n += scnprintf(buf + n, len - n, "\n");
|
||||
}
|
||||
|
||||
if (cpu->dccm.sz || cpu->iccm.sz)
|
||||
n += scnprintf(buf + n, len - n, "Extn [CCM]\t: DCCM @ %x, %d KB / ICCM: @ %x, %d KB\n",
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
#include <asm/arcregs.h>
|
||||
#include <asm/irqflags.h>
|
||||
|
||||
#define ARC_PATH_MAX 256
|
||||
|
||||
/*
|
||||
* Common routine to print scratch regs (r0-r12) or callee regs (r13-r25)
|
||||
* -Prints 3 regs per line and a CR.
|
||||
|
@ -58,11 +60,12 @@ static void show_callee_regs(struct callee_regs *cregs)
|
|||
print_reg_file(&(cregs->r13), 13);
|
||||
}
|
||||
|
||||
static void print_task_path_n_nm(struct task_struct *tsk, char *buf)
|
||||
static void print_task_path_n_nm(struct task_struct *tsk)
|
||||
{
|
||||
char *path_nm = NULL;
|
||||
struct mm_struct *mm;
|
||||
struct file *exe_file;
|
||||
char buf[ARC_PATH_MAX];
|
||||
|
||||
mm = get_task_mm(tsk);
|
||||
if (!mm)
|
||||
|
@ -72,7 +75,7 @@ static void print_task_path_n_nm(struct task_struct *tsk, char *buf)
|
|||
mmput(mm);
|
||||
|
||||
if (exe_file) {
|
||||
path_nm = file_path(exe_file, buf, 255);
|
||||
path_nm = file_path(exe_file, buf, ARC_PATH_MAX-1);
|
||||
fput(exe_file);
|
||||
}
|
||||
|
||||
|
@ -80,10 +83,9 @@ done:
|
|||
pr_info("Path: %s\n", !IS_ERR(path_nm) ? path_nm : "?");
|
||||
}
|
||||
|
||||
static void show_faulting_vma(unsigned long address, char *buf)
|
||||
static void show_faulting_vma(unsigned long address)
|
||||
{
|
||||
struct vm_area_struct *vma;
|
||||
char *nm = buf;
|
||||
struct mm_struct *active_mm = current->active_mm;
|
||||
|
||||
/* can't use print_vma_addr() yet as it doesn't check for
|
||||
|
@ -96,8 +98,11 @@ static void show_faulting_vma(unsigned long address, char *buf)
|
|||
* if the container VMA is not found
|
||||
*/
|
||||
if (vma && (vma->vm_start <= address)) {
|
||||
char buf[ARC_PATH_MAX];
|
||||
char *nm = "?";
|
||||
|
||||
if (vma->vm_file) {
|
||||
nm = file_path(vma->vm_file, buf, PAGE_SIZE - 1);
|
||||
nm = file_path(vma->vm_file, buf, ARC_PATH_MAX-1);
|
||||
if (IS_ERR(nm))
|
||||
nm = "?";
|
||||
}
|
||||
|
@ -173,13 +178,14 @@ void show_regs(struct pt_regs *regs)
|
|||
{
|
||||
struct task_struct *tsk = current;
|
||||
struct callee_regs *cregs;
|
||||
char *buf;
|
||||
|
||||
buf = (char *)__get_free_page(GFP_KERNEL);
|
||||
if (!buf)
|
||||
return;
|
||||
/*
|
||||
* generic code calls us with preemption disabled, but some calls
|
||||
* here could sleep, so re-enable to avoid lockdep splat
|
||||
*/
|
||||
preempt_enable();
|
||||
|
||||
print_task_path_n_nm(tsk, buf);
|
||||
print_task_path_n_nm(tsk);
|
||||
show_regs_print_info(KERN_INFO);
|
||||
|
||||
show_ecr_verbose(regs);
|
||||
|
@ -189,7 +195,7 @@ void show_regs(struct pt_regs *regs)
|
|||
(void *)regs->blink, (void *)regs->ret);
|
||||
|
||||
if (user_mode(regs))
|
||||
show_faulting_vma(regs->ret, buf); /* faulting code, not data */
|
||||
show_faulting_vma(regs->ret); /* faulting code, not data */
|
||||
|
||||
pr_info("[STAT32]: 0x%08lx", regs->status32);
|
||||
|
||||
|
@ -222,7 +228,7 @@ void show_regs(struct pt_regs *regs)
|
|||
if (cregs)
|
||||
show_callee_regs(cregs);
|
||||
|
||||
free_page((unsigned long)buf);
|
||||
preempt_disable();
|
||||
}
|
||||
|
||||
void show_kernel_fault_diag(const char *str, struct pt_regs *regs,
|
||||
|
|
|
@ -7,11 +7,39 @@
|
|||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/cache.h>
|
||||
|
||||
#undef PREALLOC_NOT_AVAIL
|
||||
/*
|
||||
* The memset implementation below is optimized to use prefetchw and prealloc
|
||||
* instruction in case of CPU with 64B L1 data cache line (L1_CACHE_SHIFT == 6)
|
||||
* If you want to implement optimized memset for other possible L1 data cache
|
||||
* line lengths (32B and 128B) you should rewrite code carefully checking
|
||||
* we don't call any prefetchw/prealloc instruction for L1 cache lines which
|
||||
* don't belongs to memset area.
|
||||
*/
|
||||
|
||||
#if L1_CACHE_SHIFT == 6
|
||||
|
||||
.macro PREALLOC_INSTR reg, off
|
||||
prealloc [\reg, \off]
|
||||
.endm
|
||||
|
||||
.macro PREFETCHW_INSTR reg, off
|
||||
prefetchw [\reg, \off]
|
||||
.endm
|
||||
|
||||
#else
|
||||
|
||||
.macro PREALLOC_INSTR
|
||||
.endm
|
||||
|
||||
.macro PREFETCHW_INSTR
|
||||
.endm
|
||||
|
||||
#endif
|
||||
|
||||
ENTRY_CFI(memset)
|
||||
prefetchw [r0] ; Prefetch the write location
|
||||
PREFETCHW_INSTR r0, 0 ; Prefetch the first write location
|
||||
mov.f 0, r2
|
||||
;;; if size is zero
|
||||
jz.d [blink]
|
||||
|
@ -48,11 +76,8 @@ ENTRY_CFI(memset)
|
|||
|
||||
lpnz @.Lset64bytes
|
||||
;; LOOP START
|
||||
#ifdef PREALLOC_NOT_AVAIL
|
||||
prefetchw [r3, 64] ;Prefetch the next write location
|
||||
#else
|
||||
prealloc [r3, 64]
|
||||
#endif
|
||||
PREALLOC_INSTR r3, 64 ; alloc next line w/o fetching
|
||||
|
||||
#ifdef CONFIG_ARC_HAS_LL64
|
||||
std.ab r4, [r3, 8]
|
||||
std.ab r4, [r3, 8]
|
||||
|
@ -85,7 +110,6 @@ ENTRY_CFI(memset)
|
|||
lsr.f lp_count, r2, 5 ;Last remaining max 124 bytes
|
||||
lpnz .Lset32bytes
|
||||
;; LOOP START
|
||||
prefetchw [r3, 32] ;Prefetch the next write location
|
||||
#ifdef CONFIG_ARC_HAS_LL64
|
||||
std.ab r4, [r3, 8]
|
||||
std.ab r4, [r3, 8]
|
||||
|
|
|
@ -141,12 +141,17 @@ good_area:
|
|||
*/
|
||||
fault = handle_mm_fault(vma, address, flags);
|
||||
|
||||
/* If Pagefault was interrupted by SIGKILL, exit page fault "early" */
|
||||
if (fatal_signal_pending(current)) {
|
||||
if ((fault & VM_FAULT_ERROR) && !(fault & VM_FAULT_RETRY))
|
||||
up_read(&mm->mmap_sem);
|
||||
if (user_mode(regs))
|
||||
|
||||
/*
|
||||
* if fault retry, mmap_sem already relinquished by core mm
|
||||
* so OK to return to user mode (with signal handled first)
|
||||
*/
|
||||
if (fault & VM_FAULT_RETRY) {
|
||||
if (!user_mode(regs))
|
||||
goto no_context;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
|
||||
|
|
|
@ -119,7 +119,8 @@ void __init setup_arch_memory(void)
|
|||
*/
|
||||
|
||||
memblock_add_node(low_mem_start, low_mem_sz, 0);
|
||||
memblock_reserve(low_mem_start, __pa(_end) - low_mem_start);
|
||||
memblock_reserve(CONFIG_LINUX_LINK_BASE,
|
||||
__pa(_end) - CONFIG_LINUX_LINK_BASE);
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_INITRD
|
||||
if (phys_initrd_size) {
|
||||
|
|
|
@ -215,7 +215,7 @@
|
|||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc1_pins>;
|
||||
bus-width = <0x4>;
|
||||
cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
|
||||
cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
|
||||
cd-inverted;
|
||||
max-frequency = <26000000>;
|
||||
vmmc-supply = <&vmmcsd_fixed>;
|
||||
|
|
|
@ -476,7 +476,7 @@
|
|||
clocksource: timer@20000 {
|
||||
compatible = "ti,da830-timer";
|
||||
reg = <0x20000 0x1000>;
|
||||
interrupts = <12>, <13>;
|
||||
interrupts = <21>, <22>;
|
||||
interrupt-names = "tint12", "tint34";
|
||||
clocks = <&pll0_auxclk>;
|
||||
};
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
power {
|
||||
label = "Power Button";
|
||||
gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
|
||||
gpio-key,wakeup;
|
||||
wakeup-source;
|
||||
linux,code = <KEY_POWER>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -309,7 +309,7 @@
|
|||
pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
|
||||
cd-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>;
|
||||
keep-power-in-suspend;
|
||||
enable-sdio-wakeup;
|
||||
wakeup-source;
|
||||
vmmc-supply = <®_sd3_vmmc>;
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -467,7 +467,7 @@
|
|||
};
|
||||
|
||||
gpt: gpt@2098000 {
|
||||
compatible = "fsl,imx6sx-gpt", "fsl,imx31-gpt";
|
||||
compatible = "fsl,imx6sx-gpt", "fsl,imx6dl-gpt";
|
||||
reg = <0x02098000 0x4000>;
|
||||
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks IMX6SX_CLK_GPT_BUS>,
|
||||
|
|
|
@ -274,7 +274,7 @@
|
|||
compatible = "amlogic,meson6-dwmac", "snps,dwmac";
|
||||
reg = <0xc9410000 0x10000
|
||||
0xc1108108 0x4>;
|
||||
interrupts = <GIC_SPI 8 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "macirq";
|
||||
status = "disabled";
|
||||
};
|
||||
|
|
|
@ -205,8 +205,7 @@
|
|||
cap-sd-highspeed;
|
||||
disable-wp;
|
||||
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
vmmc-supply = <&vcc_3v3>;
|
||||
};
|
||||
|
|
|
@ -221,7 +221,6 @@
|
|||
/* Realtek RTL8211F (0x001cc916) */
|
||||
eth_phy: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
eee-broken-1000t;
|
||||
interrupt-parent = <&gpio_intc>;
|
||||
/* GPIOH_3 */
|
||||
interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
|
||||
|
@ -273,8 +272,7 @@
|
|||
cap-sd-highspeed;
|
||||
disable-wp;
|
||||
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
vmmc-supply = <&tflash_vdd>;
|
||||
vqmmc-supply = <&tf_io>;
|
||||
|
|
|
@ -206,8 +206,7 @@
|
|||
cap-sd-highspeed;
|
||||
disable-wp;
|
||||
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
vmmc-supply = <&vcc_3v3>;
|
||||
};
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
interrupts-extended = <
|
||||
&cpcap 15 0 &cpcap 14 0 &cpcap 28 0 &cpcap 19 0
|
||||
&cpcap 18 0 &cpcap 17 0 &cpcap 16 0 &cpcap 49 0
|
||||
&cpcap 48 1
|
||||
&cpcap 48 0
|
||||
>;
|
||||
interrupt-names =
|
||||
"id_ground", "id_float", "se0conn", "vbusvld",
|
||||
|
|
|
@ -714,11 +714,7 @@
|
|||
|
||||
vdda-supply = <&vdac>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port {
|
||||
reg = <0>;
|
||||
venc_out: endpoint {
|
||||
remote-endpoint = <&opa_in>;
|
||||
ti,channels = <1>;
|
||||
|
|
|
@ -814,7 +814,7 @@
|
|||
/* For debugging, it is often good idea to remove this GPIO.
|
||||
It means you can remove back cover (to reboot by removing
|
||||
battery) and still use the MMC card. */
|
||||
cd-gpios = <&gpio6 0 GPIO_ACTIVE_HIGH>; /* 160 */
|
||||
cd-gpios = <&gpio6 0 GPIO_ACTIVE_LOW>; /* 160 */
|
||||
};
|
||||
|
||||
/* most boards use vaux3, only some old versions use vmmc2 instead */
|
||||
|
|
|
@ -370,6 +370,19 @@
|
|||
compatible = "ti,omap2-onenand";
|
||||
reg = <0 0 0x20000>; /* CS0, offset 0, IO size 128K */
|
||||
|
||||
/*
|
||||
* These timings are based on CONFIG_OMAP_GPMC_DEBUG=y reported
|
||||
* bootloader set values when booted with v4.19 using both N950
|
||||
* and N9 devices (OneNAND Manufacturer: Samsung):
|
||||
*
|
||||
* gpmc cs0 before gpmc_cs_program_settings:
|
||||
* cs0 GPMC_CS_CONFIG1: 0xfd001202
|
||||
* cs0 GPMC_CS_CONFIG2: 0x00181800
|
||||
* cs0 GPMC_CS_CONFIG3: 0x00030300
|
||||
* cs0 GPMC_CS_CONFIG4: 0x18001804
|
||||
* cs0 GPMC_CS_CONFIG5: 0x03171d1d
|
||||
* cs0 GPMC_CS_CONFIG6: 0x97080000
|
||||
*/
|
||||
gpmc,sync-read;
|
||||
gpmc,sync-write;
|
||||
gpmc,burst-length = <16>;
|
||||
|
@ -379,26 +392,27 @@
|
|||
gpmc,device-width = <2>;
|
||||
gpmc,mux-add-data = <2>;
|
||||
gpmc,cs-on-ns = <0>;
|
||||
gpmc,cs-rd-off-ns = <87>;
|
||||
gpmc,cs-wr-off-ns = <87>;
|
||||
gpmc,cs-rd-off-ns = <122>;
|
||||
gpmc,cs-wr-off-ns = <122>;
|
||||
gpmc,adv-on-ns = <0>;
|
||||
gpmc,adv-rd-off-ns = <10>;
|
||||
gpmc,adv-wr-off-ns = <10>;
|
||||
gpmc,oe-on-ns = <15>;
|
||||
gpmc,oe-off-ns = <87>;
|
||||
gpmc,adv-rd-off-ns = <15>;
|
||||
gpmc,adv-wr-off-ns = <15>;
|
||||
gpmc,oe-on-ns = <20>;
|
||||
gpmc,oe-off-ns = <122>;
|
||||
gpmc,we-on-ns = <0>;
|
||||
gpmc,we-off-ns = <87>;
|
||||
gpmc,rd-cycle-ns = <112>;
|
||||
gpmc,wr-cycle-ns = <112>;
|
||||
gpmc,access-ns = <81>;
|
||||
gpmc,we-off-ns = <122>;
|
||||
gpmc,rd-cycle-ns = <148>;
|
||||
gpmc,wr-cycle-ns = <148>;
|
||||
gpmc,access-ns = <117>;
|
||||
gpmc,page-burst-access-ns = <15>;
|
||||
gpmc,bus-turnaround-ns = <0>;
|
||||
gpmc,cycle2cycle-delay-ns = <0>;
|
||||
gpmc,wait-monitoring-ns = <0>;
|
||||
gpmc,clk-activation-ns = <5>;
|
||||
gpmc,wr-data-mux-bus-ns = <30>;
|
||||
gpmc,wr-access-ns = <81>;
|
||||
gpmc,sync-clk-ps = <15000>;
|
||||
gpmc,clk-activation-ns = <10>;
|
||||
gpmc,wr-data-mux-bus-ns = <40>;
|
||||
gpmc,wr-access-ns = <117>;
|
||||
|
||||
gpmc,sync-clk-ps = <15000>; /* TBC; Where this value came? */
|
||||
|
||||
/*
|
||||
* MTD partition table corresponding to Nokia's MeeGo 1.2
|
||||
|
|
|
@ -1046,8 +1046,6 @@
|
|||
<SYSC_IDLE_SMART>,
|
||||
<SYSC_IDLE_SMART_WKUP>;
|
||||
ti,syss-mask = <1>;
|
||||
ti,no-reset-on-init;
|
||||
ti,no-idle-on-init;
|
||||
/* Domains (V, P, C): core, core_pwrdm, l4per_clkdm */
|
||||
clocks = <&l4per_clkctrl OMAP5_UART3_CLKCTRL 0>;
|
||||
clock-names = "fck";
|
||||
|
|
|
@ -1681,15 +1681,12 @@
|
|||
|
||||
du: display@feb00000 {
|
||||
compatible = "renesas,du-r8a7743";
|
||||
reg = <0 0xfeb00000 0 0x40000>,
|
||||
<0 0xfeb90000 0 0x1c>;
|
||||
reg-names = "du", "lvds.0";
|
||||
reg = <0 0xfeb00000 0 0x40000>;
|
||||
interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cpg CPG_MOD 724>,
|
||||
<&cpg CPG_MOD 723>,
|
||||
<&cpg CPG_MOD 726>;
|
||||
clock-names = "du.0", "du.1", "lvds.0";
|
||||
<&cpg CPG_MOD 723>;
|
||||
clock-names = "du.0", "du.1";
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
||||
|
@ -1704,6 +1701,33 @@
|
|||
port@1 {
|
||||
reg = <1>;
|
||||
du_out_lvds0: endpoint {
|
||||
remote-endpoint = <&lvds0_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lvds0: lvds@feb90000 {
|
||||
compatible = "renesas,r8a7743-lvds";
|
||||
reg = <0 0xfeb90000 0 0x1c>;
|
||||
clocks = <&cpg CPG_MOD 726>;
|
||||
power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
|
||||
resets = <&cpg 726>;
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
lvds0_in: endpoint {
|
||||
remote-endpoint = <&du_out_lvds0>;
|
||||
};
|
||||
};
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
lvds0_out: endpoint {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -216,6 +216,7 @@
|
|||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <24000000>;
|
||||
clock-output-names = "osc24M";
|
||||
};
|
||||
|
||||
osc32k: clk-32k {
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
/* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
|
||||
ethernet0 = &emac;
|
||||
ethernet1 = &sdiowifi;
|
||||
};
|
||||
|
||||
|
|
|
@ -110,11 +110,11 @@
|
|||
bus-num = <3>;
|
||||
status = "okay";
|
||||
spi-slave;
|
||||
#address-cells = <0>;
|
||||
|
||||
slave@0 {
|
||||
slave {
|
||||
compatible = "lwn,bk4";
|
||||
spi-max-frequency = <30000000>;
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1 +1,95 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ASM_ARM_XEN_PAGE_COHERENT_H
|
||||
#define _ASM_ARM_XEN_PAGE_COHERENT_H
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <asm/page.h>
|
||||
#include <xen/arm/page-coherent.h>
|
||||
|
||||
static inline const struct dma_map_ops *xen_get_dma_ops(struct device *dev)
|
||||
{
|
||||
if (dev && dev->archdata.dev_dma_ops)
|
||||
return dev->archdata.dev_dma_ops;
|
||||
return get_arch_dma_ops(NULL);
|
||||
}
|
||||
|
||||
static inline void *xen_alloc_coherent_pages(struct device *hwdev, size_t size,
|
||||
dma_addr_t *dma_handle, gfp_t flags, unsigned long attrs)
|
||||
{
|
||||
return xen_get_dma_ops(hwdev)->alloc(hwdev, size, dma_handle, flags, attrs);
|
||||
}
|
||||
|
||||
static inline void xen_free_coherent_pages(struct device *hwdev, size_t size,
|
||||
void *cpu_addr, dma_addr_t dma_handle, unsigned long attrs)
|
||||
{
|
||||
xen_get_dma_ops(hwdev)->free(hwdev, size, cpu_addr, dma_handle, attrs);
|
||||
}
|
||||
|
||||
static inline void xen_dma_map_page(struct device *hwdev, struct page *page,
|
||||
dma_addr_t dev_addr, unsigned long offset, size_t size,
|
||||
enum dma_data_direction dir, unsigned long attrs)
|
||||
{
|
||||
unsigned long page_pfn = page_to_xen_pfn(page);
|
||||
unsigned long dev_pfn = XEN_PFN_DOWN(dev_addr);
|
||||
unsigned long compound_pages =
|
||||
(1<<compound_order(page)) * XEN_PFN_PER_PAGE;
|
||||
bool local = (page_pfn <= dev_pfn) &&
|
||||
(dev_pfn - page_pfn < compound_pages);
|
||||
|
||||
/*
|
||||
* Dom0 is mapped 1:1, while the Linux page can span across
|
||||
* multiple Xen pages, it's not possible for it to contain a
|
||||
* mix of local and foreign Xen pages. So if the first xen_pfn
|
||||
* == mfn the page is local otherwise it's a foreign page
|
||||
* grant-mapped in dom0. If the page is local we can safely
|
||||
* call the native dma_ops function, otherwise we call the xen
|
||||
* specific function.
|
||||
*/
|
||||
if (local)
|
||||
xen_get_dma_ops(hwdev)->map_page(hwdev, page, offset, size, dir, attrs);
|
||||
else
|
||||
__xen_dma_map_page(hwdev, page, dev_addr, offset, size, dir, attrs);
|
||||
}
|
||||
|
||||
static inline void xen_dma_unmap_page(struct device *hwdev, dma_addr_t handle,
|
||||
size_t size, enum dma_data_direction dir, unsigned long attrs)
|
||||
{
|
||||
unsigned long pfn = PFN_DOWN(handle);
|
||||
/*
|
||||
* Dom0 is mapped 1:1, while the Linux page can be spanned accross
|
||||
* multiple Xen page, it's not possible to have a mix of local and
|
||||
* foreign Xen page. Dom0 is mapped 1:1, so calling pfn_valid on a
|
||||
* foreign mfn will always return false. If the page is local we can
|
||||
* safely call the native dma_ops function, otherwise we call the xen
|
||||
* specific function.
|
||||
*/
|
||||
if (pfn_valid(pfn)) {
|
||||
if (xen_get_dma_ops(hwdev)->unmap_page)
|
||||
xen_get_dma_ops(hwdev)->unmap_page(hwdev, handle, size, dir, attrs);
|
||||
} else
|
||||
__xen_dma_unmap_page(hwdev, handle, size, dir, attrs);
|
||||
}
|
||||
|
||||
static inline void xen_dma_sync_single_for_cpu(struct device *hwdev,
|
||||
dma_addr_t handle, size_t size, enum dma_data_direction dir)
|
||||
{
|
||||
unsigned long pfn = PFN_DOWN(handle);
|
||||
if (pfn_valid(pfn)) {
|
||||
if (xen_get_dma_ops(hwdev)->sync_single_for_cpu)
|
||||
xen_get_dma_ops(hwdev)->sync_single_for_cpu(hwdev, handle, size, dir);
|
||||
} else
|
||||
__xen_dma_sync_single_for_cpu(hwdev, handle, size, dir);
|
||||
}
|
||||
|
||||
static inline void xen_dma_sync_single_for_device(struct device *hwdev,
|
||||
dma_addr_t handle, size_t size, enum dma_data_direction dir)
|
||||
{
|
||||
unsigned long pfn = PFN_DOWN(handle);
|
||||
if (pfn_valid(pfn)) {
|
||||
if (xen_get_dma_ops(hwdev)->sync_single_for_device)
|
||||
xen_get_dma_ops(hwdev)->sync_single_for_device(hwdev, handle, size, dir);
|
||||
} else
|
||||
__xen_dma_sync_single_for_device(hwdev, handle, size, dir);
|
||||
}
|
||||
|
||||
#endif /* _ASM_ARM_XEN_PAGE_COHERENT_H */
|
||||
|
|
|
@ -83,7 +83,7 @@ static void __iomem *cns3xxx_pci_map_bus(struct pci_bus *bus,
|
|||
} else /* remote PCI bus */
|
||||
base = cnspci->cfg1_regs + ((busno & 0xf) << 20);
|
||||
|
||||
return base + (where & 0xffc) + (devfn << 12);
|
||||
return base + where + (devfn << 12);
|
||||
}
|
||||
|
||||
static int cns3xxx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
|
||||
|
@ -93,7 +93,7 @@ static int cns3xxx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
|
|||
u32 mask = (0x1ull << (size * 8)) - 1;
|
||||
int shift = (where % 4) * 8;
|
||||
|
||||
ret = pci_generic_config_read32(bus, devfn, where, size, val);
|
||||
ret = pci_generic_config_read(bus, devfn, where, size, val);
|
||||
|
||||
if (ret == PCIBIOS_SUCCESSFUL && !bus->number && !devfn &&
|
||||
(where & 0xffc) == PCI_CLASS_REVISION)
|
||||
|
|
|
@ -75,8 +75,7 @@ void __init n2100_map_io(void)
|
|||
/*
|
||||
* N2100 PCI.
|
||||
*/
|
||||
static int __init
|
||||
n2100_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
||||
static int n2100_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
||||
{
|
||||
int irq;
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include <linux/suspend.h>
|
||||
#include <asm/suspend.h>
|
||||
#include "smc.h"
|
||||
#include "pm.h"
|
||||
|
||||
static int tango_pm_powerdown(unsigned long arg)
|
||||
{
|
||||
|
@ -24,10 +25,7 @@ static const struct platform_suspend_ops tango_pm_ops = {
|
|||
.valid = suspend_valid_only_mem,
|
||||
};
|
||||
|
||||
static int __init tango_pm_init(void)
|
||||
void __init tango_pm_init(void)
|
||||
{
|
||||
suspend_set_ops(&tango_pm_ops);
|
||||
return 0;
|
||||
}
|
||||
|
||||
late_initcall(tango_pm_init);
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
|
||||
#ifdef CONFIG_SUSPEND
|
||||
void __init tango_pm_init(void);
|
||||
#else
|
||||
#define tango_pm_init NULL
|
||||
#endif
|
|
@ -2,6 +2,7 @@
|
|||
#include <asm/mach/arch.h>
|
||||
#include <asm/hardware/cache-l2x0.h>
|
||||
#include "smc.h"
|
||||
#include "pm.h"
|
||||
|
||||
static void tango_l2c_write(unsigned long val, unsigned int reg)
|
||||
{
|
||||
|
@ -15,4 +16,5 @@ DT_MACHINE_START(TANGO_DT, "Sigma Tango DT")
|
|||
.dt_compat = tango_dt_compat,
|
||||
.l2c_aux_mask = ~0,
|
||||
.l2c_write_sec = tango_l2c_write,
|
||||
.init_late = tango_pm_init,
|
||||
MACHINE_END
|
||||
|
|
|
@ -190,8 +190,6 @@ static int pxa_ssp_remove(struct platform_device *pdev)
|
|||
if (ssp == NULL)
|
||||
return -ENODEV;
|
||||
|
||||
iounmap(ssp->mmio_base);
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
release_mem_region(res->start, resource_size(res));
|
||||
|
||||
|
@ -201,7 +199,6 @@ static int pxa_ssp_remove(struct platform_device *pdev)
|
|||
list_del(&ssp->node);
|
||||
mutex_unlock(&ssp_lock);
|
||||
|
||||
kfree(ssp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <linux/of_address.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/swiotlb.h>
|
||||
|
||||
|
|
|
@ -188,6 +188,7 @@
|
|||
reg = <0x3a3>;
|
||||
interrupt-parent = <&r_intc>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -390,7 +390,7 @@
|
|||
};
|
||||
|
||||
video-codec@1c0e000 {
|
||||
compatible = "allwinner,sun50i-h5-video-engine";
|
||||
compatible = "allwinner,sun50i-a64-video-engine";
|
||||
reg = <0x01c0e000 0x1000>;
|
||||
clocks = <&ccu CLK_BUS_VE>, <&ccu CLK_VE>,
|
||||
<&ccu CLK_DRAM_VE>;
|
||||
|
|
|
@ -187,8 +187,7 @@
|
|||
max-frequency = <100000000>;
|
||||
disable-wp;
|
||||
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
vmmc-supply = <&vddao_3v3>;
|
||||
vqmmc-supply = <&vddio_boot>;
|
||||
|
|
|
@ -305,8 +305,7 @@
|
|||
max-frequency = <200000000>;
|
||||
disable-wp;
|
||||
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
vmmc-supply = <&vddio_ao3v3>;
|
||||
vqmmc-supply = <&vddio_tf>;
|
||||
|
|
|
@ -238,8 +238,7 @@
|
|||
max-frequency = <100000000>;
|
||||
disable-wp;
|
||||
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
vmmc-supply = <&vddao_3v3>;
|
||||
vqmmc-supply = <&vddio_card>;
|
||||
|
|
|
@ -258,8 +258,7 @@
|
|||
max-frequency = <100000000>;
|
||||
disable-wp;
|
||||
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
vmmc-supply = <&tflash_vdd>;
|
||||
vqmmc-supply = <&tf_io>;
|
||||
|
|
|
@ -196,8 +196,7 @@
|
|||
max-frequency = <100000000>;
|
||||
disable-wp;
|
||||
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
vmmc-supply = <&vddao_3v3>;
|
||||
vqmmc-supply = <&vddio_card>;
|
||||
|
|
|
@ -154,8 +154,7 @@
|
|||
max-frequency = <100000000>;
|
||||
disable-wp;
|
||||
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
vmmc-supply = <&vcc_3v3>;
|
||||
};
|
||||
|
|
|
@ -211,8 +211,7 @@
|
|||
max-frequency = <100000000>;
|
||||
disable-wp;
|
||||
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
vmmc-supply = <&vddao_3v3>;
|
||||
vqmmc-supply = <&vcc_3v3>;
|
||||
|
|
|
@ -131,8 +131,7 @@
|
|||
max-frequency = <100000000>;
|
||||
disable-wp;
|
||||
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
vmmc-supply = <&vddao_3v3>;
|
||||
vqmmc-supply = <&vddio_card>;
|
||||
|
|
|
@ -238,8 +238,7 @@
|
|||
max-frequency = <100000000>;
|
||||
disable-wp;
|
||||
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
vmmc-supply = <&vcc_3v3>;
|
||||
vqmmc-supply = <&vcc_card>;
|
||||
|
|
|
@ -183,8 +183,7 @@
|
|||
max-frequency = <100000000>;
|
||||
disable-wp;
|
||||
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
vmmc-supply = <&vddao_3v3>;
|
||||
vqmmc-supply = <&vddio_card>;
|
||||
|
|
|
@ -137,8 +137,7 @@
|
|||
max-frequency = <100000000>;
|
||||
disable-wp;
|
||||
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
vmmc-supply = <&vddao_3v3>;
|
||||
vqmmc-supply = <&vddio_boot>;
|
||||
|
|
|
@ -356,8 +356,7 @@
|
|||
max-frequency = <100000000>;
|
||||
disable-wp;
|
||||
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
vmmc-supply = <&vddao_3v3>;
|
||||
vqmmc-supply = <&vddio_boot>;
|
||||
|
|
|
@ -147,8 +147,7 @@
|
|||
max-frequency = <100000000>;
|
||||
disable-wp;
|
||||
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
vmmc-supply = <&vddao_3v3>;
|
||||
vqmmc-supply = <&vddio_boot>;
|
||||
|
|
|
@ -170,8 +170,7 @@
|
|||
max-frequency = <100000000>;
|
||||
disable-wp;
|
||||
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
|
||||
vmmc-supply = <&vddao_3v3>;
|
||||
vqmmc-supply = <&vddio_boot>;
|
||||
|
|
|
@ -404,7 +404,7 @@
|
|||
};
|
||||
|
||||
intc: interrupt-controller@9bc0000 {
|
||||
compatible = "arm,gic-v3";
|
||||
compatible = "qcom,msm8996-gic-v3", "arm,gic-v3";
|
||||
#interrupt-cells = <3>;
|
||||
interrupt-controller;
|
||||
#redistributor-regions = <1>;
|
||||
|
|
|
@ -1011,6 +1011,9 @@
|
|||
<&cpg CPG_CORE R8A774A1_CLK_S3D1>,
|
||||
<&scif_clk>;
|
||||
clock-names = "fck", "brg_int", "scif_clk";
|
||||
dmas = <&dmac1 0x13>, <&dmac1 0x12>,
|
||||
<&dmac2 0x13>, <&dmac2 0x12>;
|
||||
dma-names = "tx", "rx", "tx", "rx";
|
||||
power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
|
||||
resets = <&cpg 310>;
|
||||
status = "disabled";
|
||||
|
|
|
@ -1262,6 +1262,9 @@
|
|||
<&cpg CPG_CORE R8A7796_CLK_S3D1>,
|
||||
<&scif_clk>;
|
||||
clock-names = "fck", "brg_int", "scif_clk";
|
||||
dmas = <&dmac1 0x13>, <&dmac1 0x12>,
|
||||
<&dmac2 0x13>, <&dmac2 0x12>;
|
||||
dma-names = "tx", "rx", "tx", "rx";
|
||||
power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
|
||||
resets = <&cpg 310>;
|
||||
status = "disabled";
|
||||
|
|
|
@ -1068,6 +1068,9 @@
|
|||
<&cpg CPG_CORE R8A77965_CLK_S3D1>,
|
||||
<&scif_clk>;
|
||||
clock-names = "fck", "brg_int", "scif_clk";
|
||||
dmas = <&dmac1 0x13>, <&dmac1 0x12>,
|
||||
<&dmac2 0x13>, <&dmac2 0x12>;
|
||||
dma-names = "tx", "rx", "tx", "rx";
|
||||
power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
|
||||
resets = <&cpg 310>;
|
||||
status = "disabled";
|
||||
|
|
|
@ -20,9 +20,6 @@ struct dev_archdata {
|
|||
#ifdef CONFIG_IOMMU_API
|
||||
void *iommu; /* private IOMMU data */
|
||||
#endif
|
||||
#ifdef CONFIG_XEN
|
||||
const struct dma_map_ops *dev_dma_ops;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct pdev_archdata {
|
||||
|
|
|
@ -1 +1,77 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ASM_ARM64_XEN_PAGE_COHERENT_H
|
||||
#define _ASM_ARM64_XEN_PAGE_COHERENT_H
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <asm/page.h>
|
||||
#include <xen/arm/page-coherent.h>
|
||||
|
||||
static inline void *xen_alloc_coherent_pages(struct device *hwdev, size_t size,
|
||||
dma_addr_t *dma_handle, gfp_t flags, unsigned long attrs)
|
||||
{
|
||||
return dma_direct_alloc(hwdev, size, dma_handle, flags, attrs);
|
||||
}
|
||||
|
||||
static inline void xen_free_coherent_pages(struct device *hwdev, size_t size,
|
||||
void *cpu_addr, dma_addr_t dma_handle, unsigned long attrs)
|
||||
{
|
||||
dma_direct_free(hwdev, size, cpu_addr, dma_handle, attrs);
|
||||
}
|
||||
|
||||
static inline void xen_dma_sync_single_for_cpu(struct device *hwdev,
|
||||
dma_addr_t handle, size_t size, enum dma_data_direction dir)
|
||||
{
|
||||
unsigned long pfn = PFN_DOWN(handle);
|
||||
|
||||
if (pfn_valid(pfn))
|
||||
dma_direct_sync_single_for_cpu(hwdev, handle, size, dir);
|
||||
else
|
||||
__xen_dma_sync_single_for_cpu(hwdev, handle, size, dir);
|
||||
}
|
||||
|
||||
static inline void xen_dma_sync_single_for_device(struct device *hwdev,
|
||||
dma_addr_t handle, size_t size, enum dma_data_direction dir)
|
||||
{
|
||||
unsigned long pfn = PFN_DOWN(handle);
|
||||
if (pfn_valid(pfn))
|
||||
dma_direct_sync_single_for_device(hwdev, handle, size, dir);
|
||||
else
|
||||
__xen_dma_sync_single_for_device(hwdev, handle, size, dir);
|
||||
}
|
||||
|
||||
static inline void xen_dma_map_page(struct device *hwdev, struct page *page,
|
||||
dma_addr_t dev_addr, unsigned long offset, size_t size,
|
||||
enum dma_data_direction dir, unsigned long attrs)
|
||||
{
|
||||
unsigned long page_pfn = page_to_xen_pfn(page);
|
||||
unsigned long dev_pfn = XEN_PFN_DOWN(dev_addr);
|
||||
unsigned long compound_pages =
|
||||
(1<<compound_order(page)) * XEN_PFN_PER_PAGE;
|
||||
bool local = (page_pfn <= dev_pfn) &&
|
||||
(dev_pfn - page_pfn < compound_pages);
|
||||
|
||||
if (local)
|
||||
dma_direct_map_page(hwdev, page, offset, size, dir, attrs);
|
||||
else
|
||||
__xen_dma_map_page(hwdev, page, dev_addr, offset, size, dir, attrs);
|
||||
}
|
||||
|
||||
static inline void xen_dma_unmap_page(struct device *hwdev, dma_addr_t handle,
|
||||
size_t size, enum dma_data_direction dir, unsigned long attrs)
|
||||
{
|
||||
unsigned long pfn = PFN_DOWN(handle);
|
||||
/*
|
||||
* Dom0 is mapped 1:1, while the Linux page can be spanned accross
|
||||
* multiple Xen page, it's not possible to have a mix of local and
|
||||
* foreign Xen page. Dom0 is mapped 1:1, so calling pfn_valid on a
|
||||
* foreign mfn will always return false. If the page is local we can
|
||||
* safely call the native dma_ops function, otherwise we call the xen
|
||||
* specific function.
|
||||
*/
|
||||
if (pfn_valid(pfn))
|
||||
dma_direct_unmap_page(hwdev, handle, size, dir, attrs);
|
||||
else
|
||||
__xen_dma_unmap_page(hwdev, handle, size, dir, attrs);
|
||||
}
|
||||
|
||||
#endif /* _ASM_ARM64_XEN_PAGE_COHERENT_H */
|
||||
|
|
|
@ -299,8 +299,10 @@ int swsusp_arch_suspend(void)
|
|||
dcache_clean_range(__idmap_text_start, __idmap_text_end);
|
||||
|
||||
/* Clean kvm setup code to PoC? */
|
||||
if (el2_reset_needed())
|
||||
if (el2_reset_needed()) {
|
||||
dcache_clean_range(__hyp_idmap_text_start, __hyp_idmap_text_end);
|
||||
dcache_clean_range(__hyp_text_start, __hyp_text_end);
|
||||
}
|
||||
|
||||
/* make the crash dump kernel image protected again */
|
||||
crash_post_resume();
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
#include <asm/virt.h>
|
||||
|
||||
.text
|
||||
.pushsection .hyp.text, "ax"
|
||||
|
||||
.align 11
|
||||
|
||||
ENTRY(__hyp_stub_vectors)
|
||||
|
|
|
@ -88,6 +88,7 @@ u64 __init kaslr_early_init(u64 dt_phys)
|
|||
* we end up running with module randomization disabled.
|
||||
*/
|
||||
module_alloc_base = (u64)_etext - MODULES_VSIZE;
|
||||
__flush_dcache_area(&module_alloc_base, sizeof(module_alloc_base));
|
||||
|
||||
/*
|
||||
* Try to map the FDT early. If this fails, we simply bail,
|
||||
|
|
|
@ -120,10 +120,12 @@ static int create_dtb(struct kimage *image,
|
|||
{
|
||||
void *buf;
|
||||
size_t buf_size;
|
||||
size_t cmdline_len;
|
||||
int ret;
|
||||
|
||||
cmdline_len = cmdline ? strlen(cmdline) : 0;
|
||||
buf_size = fdt_totalsize(initial_boot_params)
|
||||
+ strlen(cmdline) + DTB_EXTRA_SPACE;
|
||||
+ cmdline_len + DTB_EXTRA_SPACE;
|
||||
|
||||
for (;;) {
|
||||
buf = vmalloc(buf_size);
|
||||
|
|
|
@ -478,13 +478,13 @@ bool arch_within_kprobe_blacklist(unsigned long addr)
|
|||
addr < (unsigned long)__entry_text_end) ||
|
||||
(addr >= (unsigned long)__idmap_text_start &&
|
||||
addr < (unsigned long)__idmap_text_end) ||
|
||||
(addr >= (unsigned long)__hyp_text_start &&
|
||||
addr < (unsigned long)__hyp_text_end) ||
|
||||
!!search_exception_tables(addr))
|
||||
return true;
|
||||
|
||||
if (!is_kernel_in_hyp_mode()) {
|
||||
if ((addr >= (unsigned long)__hyp_text_start &&
|
||||
addr < (unsigned long)__hyp_text_end) ||
|
||||
(addr >= (unsigned long)__hyp_idmap_text_start &&
|
||||
if ((addr >= (unsigned long)__hyp_idmap_text_start &&
|
||||
addr < (unsigned long)__hyp_idmap_text_end))
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -466,9 +466,7 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
|
|||
__iommu_setup_dma_ops(dev, dma_base, size, iommu);
|
||||
|
||||
#ifdef CONFIG_XEN
|
||||
if (xen_initial_domain()) {
|
||||
dev->archdata.dev_dma_ops = dev->dma_ops;
|
||||
if (xen_initial_domain())
|
||||
dev->dma_ops = xen_dma_ops;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -286,74 +286,73 @@ static void note_page(struct pg_state *st, unsigned long addr, unsigned level,
|
|||
|
||||
}
|
||||
|
||||
static void walk_pte(struct pg_state *st, pmd_t *pmdp, unsigned long start)
|
||||
static void walk_pte(struct pg_state *st, pmd_t *pmdp, unsigned long start,
|
||||
unsigned long end)
|
||||
{
|
||||
pte_t *ptep = pte_offset_kernel(pmdp, 0UL);
|
||||
unsigned long addr;
|
||||
unsigned i;
|
||||
unsigned long addr = start;
|
||||
pte_t *ptep = pte_offset_kernel(pmdp, start);
|
||||
|
||||
for (i = 0; i < PTRS_PER_PTE; i++, ptep++) {
|
||||
addr = start + i * PAGE_SIZE;
|
||||
do {
|
||||
note_page(st, addr, 4, READ_ONCE(pte_val(*ptep)));
|
||||
}
|
||||
} while (ptep++, addr += PAGE_SIZE, addr != end);
|
||||
}
|
||||
|
||||
static void walk_pmd(struct pg_state *st, pud_t *pudp, unsigned long start)
|
||||
static void walk_pmd(struct pg_state *st, pud_t *pudp, unsigned long start,
|
||||
unsigned long end)
|
||||
{
|
||||
pmd_t *pmdp = pmd_offset(pudp, 0UL);
|
||||
unsigned long addr;
|
||||
unsigned i;
|
||||
unsigned long next, addr = start;
|
||||
pmd_t *pmdp = pmd_offset(pudp, start);
|
||||
|
||||
for (i = 0; i < PTRS_PER_PMD; i++, pmdp++) {
|
||||
do {
|
||||
pmd_t pmd = READ_ONCE(*pmdp);
|
||||
next = pmd_addr_end(addr, end);
|
||||
|
||||
addr = start + i * PMD_SIZE;
|
||||
if (pmd_none(pmd) || pmd_sect(pmd)) {
|
||||
note_page(st, addr, 3, pmd_val(pmd));
|
||||
} else {
|
||||
BUG_ON(pmd_bad(pmd));
|
||||
walk_pte(st, pmdp, addr);
|
||||
walk_pte(st, pmdp, addr, next);
|
||||
}
|
||||
}
|
||||
} while (pmdp++, addr = next, addr != end);
|
||||
}
|
||||
|
||||
static void walk_pud(struct pg_state *st, pgd_t *pgdp, unsigned long start)
|
||||
static void walk_pud(struct pg_state *st, pgd_t *pgdp, unsigned long start,
|
||||
unsigned long end)
|
||||
{
|
||||
pud_t *pudp = pud_offset(pgdp, 0UL);
|
||||
unsigned long addr;
|
||||
unsigned i;
|
||||
unsigned long next, addr = start;
|
||||
pud_t *pudp = pud_offset(pgdp, start);
|
||||
|
||||
for (i = 0; i < PTRS_PER_PUD; i++, pudp++) {
|
||||
do {
|
||||
pud_t pud = READ_ONCE(*pudp);
|
||||
next = pud_addr_end(addr, end);
|
||||
|
||||
addr = start + i * PUD_SIZE;
|
||||
if (pud_none(pud) || pud_sect(pud)) {
|
||||
note_page(st, addr, 2, pud_val(pud));
|
||||
} else {
|
||||
BUG_ON(pud_bad(pud));
|
||||
walk_pmd(st, pudp, addr);
|
||||
walk_pmd(st, pudp, addr, next);
|
||||
}
|
||||
}
|
||||
} while (pudp++, addr = next, addr != end);
|
||||
}
|
||||
|
||||
static void walk_pgd(struct pg_state *st, struct mm_struct *mm,
|
||||
unsigned long start)
|
||||
{
|
||||
pgd_t *pgdp = pgd_offset(mm, 0UL);
|
||||
unsigned i;
|
||||
unsigned long addr;
|
||||
unsigned long end = (start < TASK_SIZE_64) ? TASK_SIZE_64 : 0;
|
||||
unsigned long next, addr = start;
|
||||
pgd_t *pgdp = pgd_offset(mm, start);
|
||||
|
||||
for (i = 0; i < PTRS_PER_PGD; i++, pgdp++) {
|
||||
do {
|
||||
pgd_t pgd = READ_ONCE(*pgdp);
|
||||
next = pgd_addr_end(addr, end);
|
||||
|
||||
addr = start + i * PGDIR_SIZE;
|
||||
if (pgd_none(pgd)) {
|
||||
note_page(st, addr, 1, pgd_val(pgd));
|
||||
} else {
|
||||
BUG_ON(pgd_bad(pgd));
|
||||
walk_pud(st, pgdp, addr);
|
||||
walk_pud(st, pgdp, addr, next);
|
||||
}
|
||||
}
|
||||
} while (pgdp++, addr = next, addr != end);
|
||||
}
|
||||
|
||||
void ptdump_walk_pgd(struct seq_file *m, struct ptdump_info *info)
|
||||
|
|
|
@ -33,7 +33,11 @@ void sync_icache_aliases(void *kaddr, unsigned long len)
|
|||
__clean_dcache_area_pou(kaddr, len);
|
||||
__flush_icache_all();
|
||||
} else {
|
||||
flush_icache_range(addr, addr + len);
|
||||
/*
|
||||
* Don't issue kick_all_cpus_sync() after I-cache invalidation
|
||||
* for user mappings.
|
||||
*/
|
||||
__flush_icache_range(addr, addr + len);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ generic-y += pgalloc.h
|
|||
generic-y += preempt.h
|
||||
generic-y += segment.h
|
||||
generic-y += serial.h
|
||||
generic-y += shmparam.h
|
||||
generic-y += tlbflush.h
|
||||
generic-y += topology.h
|
||||
generic-y += trace_clock.h
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
include include/uapi/asm-generic/Kbuild.asm
|
||||
|
||||
generic-y += kvm_para.h
|
||||
generic-y += shmparam.h
|
||||
generic-y += ucontext.h
|
||||
|
|
|
@ -40,6 +40,7 @@ generic-y += preempt.h
|
|||
generic-y += scatterlist.h
|
||||
generic-y += sections.h
|
||||
generic-y += serial.h
|
||||
generic-y += shmparam.h
|
||||
generic-y += sizes.h
|
||||
generic-y += spinlock.h
|
||||
generic-y += timex.h
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
include include/uapi/asm-generic/Kbuild.asm
|
||||
|
||||
generic-y += kvm_para.h
|
||||
generic-y += shmparam.h
|
||||
generic-y += ucontext.h
|
||||
|
|
|
@ -30,6 +30,7 @@ generic-y += rwsem.h
|
|||
generic-y += sections.h
|
||||
generic-y += segment.h
|
||||
generic-y += serial.h
|
||||
generic-y += shmparam.h
|
||||
generic-y += sizes.h
|
||||
generic-y += topology.h
|
||||
generic-y += trace_clock.h
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
include include/uapi/asm-generic/Kbuild.asm
|
||||
|
||||
generic-y += shmparam.h
|
||||
generic-y += ucontext.h
|
||||
|
|
|
@ -155,18 +155,22 @@ out:
|
|||
static int __init nfhd_init(void)
|
||||
{
|
||||
u32 blocks, bsize;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
nfhd_id = nf_get_id("XHDI");
|
||||
if (!nfhd_id)
|
||||
return -ENODEV;
|
||||
|
||||
major_num = register_blkdev(major_num, "nfhd");
|
||||
if (major_num <= 0) {
|
||||
ret = register_blkdev(major_num, "nfhd");
|
||||
if (ret < 0) {
|
||||
pr_warn("nfhd: unable to get major number\n");
|
||||
return major_num;
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!major_num)
|
||||
major_num = ret;
|
||||
|
||||
for (i = NFHD_DEV_OFFSET; i < 24; i++) {
|
||||
if (nfhd_get_capacity(i, 0, &blocks, &bsize))
|
||||
continue;
|
||||
|
|
|
@ -20,6 +20,7 @@ generic-y += mm-arch-hooks.h
|
|||
generic-y += percpu.h
|
||||
generic-y += preempt.h
|
||||
generic-y += sections.h
|
||||
generic-y += shmparam.h
|
||||
generic-y += spinlock.h
|
||||
generic-y += topology.h
|
||||
generic-y += trace_clock.h
|
||||
|
|
|
@ -2,4 +2,3 @@ include include/uapi/asm-generic/Kbuild.asm
|
|||
|
||||
generated-y += unistd_32.h
|
||||
generic-y += kvm_para.h
|
||||
generic-y += shmparam.h
|
||||
|
|
|
@ -26,6 +26,7 @@ generic-y += parport.h
|
|||
generic-y += percpu.h
|
||||
generic-y += preempt.h
|
||||
generic-y += serial.h
|
||||
generic-y += shmparam.h
|
||||
generic-y += syscalls.h
|
||||
generic-y += topology.h
|
||||
generic-y += trace_clock.h
|
||||
|
|
|
@ -2,5 +2,4 @@ include include/uapi/asm-generic/Kbuild.asm
|
|||
|
||||
generated-y += unistd_32.h
|
||||
generic-y += kvm_para.h
|
||||
generic-y += shmparam.h
|
||||
generic-y += ucontext.h
|
||||
|
|
|
@ -1403,6 +1403,21 @@ config LOONGSON3_ENHANCEMENT
|
|||
please say 'N' here. If you want a high-performance kernel to run on
|
||||
new Loongson 3 machines only, please say 'Y' here.
|
||||
|
||||
config CPU_LOONGSON3_WORKAROUNDS
|
||||
bool "Old Loongson 3 LLSC Workarounds"
|
||||
default y if SMP
|
||||
depends on CPU_LOONGSON3
|
||||
help
|
||||
Loongson 3 processors have the llsc issues which require workarounds.
|
||||
Without workarounds the system may hang unexpectedly.
|
||||
|
||||
Newer Loongson 3 will fix these issues and no workarounds are needed.
|
||||
The workarounds have no significant side effect on them but may
|
||||
decrease the performance of the system so this option should be
|
||||
disabled unless the kernel is intended to be run on old systems.
|
||||
|
||||
If unsure, please say Y.
|
||||
|
||||
config CPU_LOONGSON2E
|
||||
bool "Loongson 2E"
|
||||
depends on SYS_HAS_CPU_LOONGSON2E
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
status = "okay";
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pins_uart2>;
|
||||
pinctrl-0 = <&pins_uart3>;
|
||||
};
|
||||
|
||||
&uart4 {
|
||||
|
@ -196,9 +196,9 @@
|
|||
bias-disable;
|
||||
};
|
||||
|
||||
pins_uart2: uart2 {
|
||||
function = "uart2";
|
||||
groups = "uart2-data", "uart2-hwflow";
|
||||
pins_uart3: uart3 {
|
||||
function = "uart3";
|
||||
groups = "uart3-data", "uart3-hwflow";
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@
|
|||
#dma-cells = <2>;
|
||||
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <29>;
|
||||
interrupts = <20>;
|
||||
|
||||
clocks = <&cgu JZ4740_CLK_DMA>;
|
||||
|
||||
|
|
|
@ -90,11 +90,11 @@
|
|||
interrupts = <0>;
|
||||
};
|
||||
|
||||
axi_i2c: i2c@10A00000 {
|
||||
axi_i2c: i2c@10a00000 {
|
||||
compatible = "xlnx,xps-iic-2.00.a";
|
||||
interrupt-parent = <&axi_intc>;
|
||||
interrupts = <4>;
|
||||
reg = < 0x10A00000 0x10000 >;
|
||||
reg = < 0x10a00000 0x10000 >;
|
||||
clocks = <&ext>;
|
||||
xlnx,clk-freq = <0x5f5e100>;
|
||||
xlnx,family = "Artix7";
|
||||
|
@ -106,9 +106,9 @@
|
|||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
ad7420@4B {
|
||||
ad7420@4b {
|
||||
compatible = "adi,adt7420";
|
||||
reg = <0x4B>;
|
||||
reg = <0x4b>;
|
||||
};
|
||||
} ;
|
||||
};
|
||||
|
|
|
@ -58,6 +58,7 @@ static __inline__ void atomic_##op(int i, atomic_t * v) \
|
|||
if (kernel_uses_llsc) { \
|
||||
int temp; \
|
||||
\
|
||||
loongson_llsc_mb(); \
|
||||
__asm__ __volatile__( \
|
||||
" .set push \n" \
|
||||
" .set "MIPS_ISA_LEVEL" \n" \
|
||||
|
@ -85,6 +86,7 @@ static __inline__ int atomic_##op##_return_relaxed(int i, atomic_t * v) \
|
|||
if (kernel_uses_llsc) { \
|
||||
int temp; \
|
||||
\
|
||||
loongson_llsc_mb(); \
|
||||
__asm__ __volatile__( \
|
||||
" .set push \n" \
|
||||
" .set "MIPS_ISA_LEVEL" \n" \
|
||||
|
@ -118,6 +120,7 @@ static __inline__ int atomic_fetch_##op##_relaxed(int i, atomic_t * v) \
|
|||
if (kernel_uses_llsc) { \
|
||||
int temp; \
|
||||
\
|
||||
loongson_llsc_mb(); \
|
||||
__asm__ __volatile__( \
|
||||
" .set push \n" \
|
||||
" .set "MIPS_ISA_LEVEL" \n" \
|
||||
|
@ -256,6 +259,7 @@ static __inline__ void atomic64_##op(long i, atomic64_t * v) \
|
|||
if (kernel_uses_llsc) { \
|
||||
long temp; \
|
||||
\
|
||||
loongson_llsc_mb(); \
|
||||
__asm__ __volatile__( \
|
||||
" .set push \n" \
|
||||
" .set "MIPS_ISA_LEVEL" \n" \
|
||||
|
@ -283,6 +287,7 @@ static __inline__ long atomic64_##op##_return_relaxed(long i, atomic64_t * v) \
|
|||
if (kernel_uses_llsc) { \
|
||||
long temp; \
|
||||
\
|
||||
loongson_llsc_mb(); \
|
||||
__asm__ __volatile__( \
|
||||
" .set push \n" \
|
||||
" .set "MIPS_ISA_LEVEL" \n" \
|
||||
|
@ -316,6 +321,7 @@ static __inline__ long atomic64_fetch_##op##_relaxed(long i, atomic64_t * v) \
|
|||
if (kernel_uses_llsc) { \
|
||||
long temp; \
|
||||
\
|
||||
loongson_llsc_mb(); \
|
||||
__asm__ __volatile__( \
|
||||
" .set push \n" \
|
||||
" .set "MIPS_ISA_LEVEL" \n" \
|
||||
|
|
|
@ -222,6 +222,42 @@
|
|||
#define __smp_mb__before_atomic() __smp_mb__before_llsc()
|
||||
#define __smp_mb__after_atomic() smp_llsc_mb()
|
||||
|
||||
/*
|
||||
* Some Loongson 3 CPUs have a bug wherein execution of a memory access (load,
|
||||
* store or pref) in between an ll & sc can cause the sc instruction to
|
||||
* erroneously succeed, breaking atomicity. Whilst it's unusual to write code
|
||||
* containing such sequences, this bug bites harder than we might otherwise
|
||||
* expect due to reordering & speculation:
|
||||
*
|
||||
* 1) A memory access appearing prior to the ll in program order may actually
|
||||
* be executed after the ll - this is the reordering case.
|
||||
*
|
||||
* In order to avoid this we need to place a memory barrier (ie. a sync
|
||||
* instruction) prior to every ll instruction, in between it & any earlier
|
||||
* memory access instructions. Many of these cases are already covered by
|
||||
* smp_mb__before_llsc() but for the remaining cases, typically ones in
|
||||
* which multiple CPUs may operate on a memory location but ordering is not
|
||||
* usually guaranteed, we use loongson_llsc_mb() below.
|
||||
*
|
||||
* This reordering case is fixed by 3A R2 CPUs, ie. 3A2000 models and later.
|
||||
*
|
||||
* 2) If a conditional branch exists between an ll & sc with a target outside
|
||||
* of the ll-sc loop, for example an exit upon value mismatch in cmpxchg()
|
||||
* or similar, then misprediction of the branch may allow speculative
|
||||
* execution of memory accesses from outside of the ll-sc loop.
|
||||
*
|
||||
* In order to avoid this we need a memory barrier (ie. a sync instruction)
|
||||
* at each affected branch target, for which we also use loongson_llsc_mb()
|
||||
* defined below.
|
||||
*
|
||||
* This case affects all current Loongson 3 CPUs.
|
||||
*/
|
||||
#ifdef CONFIG_CPU_LOONGSON3_WORKAROUNDS /* Loongson-3's LLSC workaround */
|
||||
#define loongson_llsc_mb() __asm__ __volatile__(__WEAK_LLSC_MB : : :"memory")
|
||||
#else
|
||||
#define loongson_llsc_mb() do { } while (0)
|
||||
#endif
|
||||
|
||||
#include <asm-generic/barrier.h>
|
||||
|
||||
#endif /* __ASM_BARRIER_H */
|
||||
|
|
|
@ -69,6 +69,7 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr)
|
|||
: "ir" (1UL << bit), GCC_OFF_SMALL_ASM() (*m));
|
||||
#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6)
|
||||
} else if (kernel_uses_llsc && __builtin_constant_p(bit)) {
|
||||
loongson_llsc_mb();
|
||||
do {
|
||||
__asm__ __volatile__(
|
||||
" " __LL "%0, %1 # set_bit \n"
|
||||
|
@ -79,6 +80,7 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr)
|
|||
} while (unlikely(!temp));
|
||||
#endif /* CONFIG_CPU_MIPSR2 || CONFIG_CPU_MIPSR6 */
|
||||
} else if (kernel_uses_llsc) {
|
||||
loongson_llsc_mb();
|
||||
do {
|
||||
__asm__ __volatile__(
|
||||
" .set push \n"
|
||||
|
@ -123,6 +125,7 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr)
|
|||
: "ir" (~(1UL << bit)));
|
||||
#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6)
|
||||
} else if (kernel_uses_llsc && __builtin_constant_p(bit)) {
|
||||
loongson_llsc_mb();
|
||||
do {
|
||||
__asm__ __volatile__(
|
||||
" " __LL "%0, %1 # clear_bit \n"
|
||||
|
@ -133,6 +136,7 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr)
|
|||
} while (unlikely(!temp));
|
||||
#endif /* CONFIG_CPU_MIPSR2 || CONFIG_CPU_MIPSR6 */
|
||||
} else if (kernel_uses_llsc) {
|
||||
loongson_llsc_mb();
|
||||
do {
|
||||
__asm__ __volatile__(
|
||||
" .set push \n"
|
||||
|
@ -193,6 +197,7 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr)
|
|||
unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG);
|
||||
unsigned long temp;
|
||||
|
||||
loongson_llsc_mb();
|
||||
do {
|
||||
__asm__ __volatile__(
|
||||
" .set push \n"
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
"i" (-EFAULT) \
|
||||
: "memory"); \
|
||||
} else if (cpu_has_llsc) { \
|
||||
loongson_llsc_mb(); \
|
||||
__asm__ __volatile__( \
|
||||
" .set push \n" \
|
||||
" .set noat \n" \
|
||||
|
@ -163,6 +164,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
|
|||
"i" (-EFAULT)
|
||||
: "memory");
|
||||
} else if (cpu_has_llsc) {
|
||||
loongson_llsc_mb();
|
||||
__asm__ __volatile__(
|
||||
"# futex_atomic_cmpxchg_inatomic \n"
|
||||
" .set push \n"
|
||||
|
@ -192,6 +194,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
|
|||
: GCC_OFF_SMALL_ASM() (*uaddr), "Jr" (oldval), "Jr" (newval),
|
||||
"i" (-EFAULT)
|
||||
: "memory");
|
||||
loongson_llsc_mb();
|
||||
} else
|
||||
return -ENOSYS;
|
||||
|
||||
|
|
|
@ -228,6 +228,7 @@ static inline void set_pte(pte_t *ptep, pte_t pteval)
|
|||
: [buddy] "+m" (buddy->pte), [tmp] "=&r" (tmp)
|
||||
: [global] "r" (page_global));
|
||||
} else if (kernel_uses_llsc) {
|
||||
loongson_llsc_mb();
|
||||
__asm__ __volatile__ (
|
||||
" .set push \n"
|
||||
" .set "MIPS_ISA_ARCH_LEVEL" \n"
|
||||
|
@ -242,6 +243,7 @@ static inline void set_pte(pte_t *ptep, pte_t pteval)
|
|||
" .set pop \n"
|
||||
: [buddy] "+m" (buddy->pte), [tmp] "=&r" (tmp)
|
||||
: [global] "r" (page_global));
|
||||
loongson_llsc_mb();
|
||||
}
|
||||
#else /* !CONFIG_SMP */
|
||||
if (pte_none(*buddy))
|
||||
|
|
|
@ -457,5 +457,5 @@ void mips_cm_error_report(void)
|
|||
}
|
||||
|
||||
/* reprime cause register */
|
||||
write_gcr_error_cause(0);
|
||||
write_gcr_error_cause(cm_error);
|
||||
}
|
||||
|
|
|
@ -371,7 +371,7 @@ static inline int is_sp_move_ins(union mips_instruction *ip, int *frame_size)
|
|||
static int get_frame_info(struct mips_frame_info *info)
|
||||
{
|
||||
bool is_mmips = IS_ENABLED(CONFIG_CPU_MICROMIPS);
|
||||
union mips_instruction insn, *ip, *ip_end;
|
||||
union mips_instruction insn, *ip;
|
||||
const unsigned int max_insns = 128;
|
||||
unsigned int last_insn_size = 0;
|
||||
unsigned int i;
|
||||
|
@ -384,10 +384,9 @@ static int get_frame_info(struct mips_frame_info *info)
|
|||
if (!ip)
|
||||
goto err;
|
||||
|
||||
ip_end = (void *)ip + info->func_size;
|
||||
|
||||
for (i = 0; i < max_insns && ip < ip_end; i++) {
|
||||
for (i = 0; i < max_insns; i++) {
|
||||
ip = (void *)ip + last_insn_size;
|
||||
|
||||
if (is_mmips && mm_insn_16bit(ip->halfword[0])) {
|
||||
insn.word = ip->halfword[0] << 16;
|
||||
last_insn_size = 2;
|
||||
|
|
|
@ -23,6 +23,29 @@ ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS
|
|||
endif
|
||||
|
||||
cflags-$(CONFIG_CPU_LOONGSON3) += -Wa,--trap
|
||||
|
||||
#
|
||||
# Some versions of binutils, not currently mainline as of 2019/02/04, support
|
||||
# an -mfix-loongson3-llsc flag which emits a sync prior to each ll instruction
|
||||
# to work around a CPU bug (see loongson_llsc_mb() in asm/barrier.h for a
|
||||
# description).
|
||||
#
|
||||
# We disable this in order to prevent the assembler meddling with the
|
||||
# instruction that labels refer to, ie. if we label an ll instruction:
|
||||
#
|
||||
# 1: ll v0, 0(a0)
|
||||
#
|
||||
# ...then with the assembler fix applied the label may actually point at a sync
|
||||
# instruction inserted by the assembler, and if we were using the label in an
|
||||
# exception table the table would no longer contain the address of the ll
|
||||
# instruction.
|
||||
#
|
||||
# Avoid this by explicitly disabling that assembler behaviour. If upstream
|
||||
# binutils does not merge support for the flag then we can revisit & remove
|
||||
# this later - for now it ensures vendor toolchains don't cause problems.
|
||||
#
|
||||
cflags-$(CONFIG_CPU_LOONGSON3) += $(call as-option,-Wa$(comma)-mno-fix-loongson3-llsc,)
|
||||
|
||||
#
|
||||
# binutils from v2.25 on and gcc starting from v4.9.0 treat -march=loongson3a
|
||||
# as MIPS64 R2; older versions as just R1. This leaves the possibility open
|
||||
|
|
|
@ -59,7 +59,12 @@ static void loongson_poweroff(void)
|
|||
{
|
||||
#ifndef CONFIG_LEFI_FIRMWARE_INTERFACE
|
||||
mach_prepare_shutdown();
|
||||
unreachable();
|
||||
|
||||
/*
|
||||
* It needs a wait loop here, but mips/kernel/reset.c already calls
|
||||
* a generic delay loop, machine_hang(), so simply return.
|
||||
*/
|
||||
return;
|
||||
#else
|
||||
void (*fw_poweroff)(void) = (void *)loongson_sysconf.poweroff_addr;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue