Merge 6.11-rc6 into usb-next
We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -354,6 +354,8 @@ Kenneth Westfield <quic_kwestfie@quicinc.com> <kwestfie@codeaurora.org>
|
||||
Kiran Gunda <quic_kgunda@quicinc.com> <kgunda@codeaurora.org>
|
||||
Kirill Tkhai <tkhai@ya.ru> <ktkhai@virtuozzo.com>
|
||||
Kishon Vijay Abraham I <kishon@kernel.org> <kishon@ti.com>
|
||||
Konrad Dybcio <konradybcio@kernel.org> <konrad.dybcio@linaro.org>
|
||||
Konrad Dybcio <konradybcio@kernel.org> <konrad.dybcio@somainline.org>
|
||||
Konstantin Khlebnikov <koct9i@gmail.com> <khlebnikov@yandex-team.ru>
|
||||
Konstantin Khlebnikov <koct9i@gmail.com> <k.khlebnikov@samsung.com>
|
||||
Koushik <raghavendra.koushik@neterion.com>
|
||||
@@ -614,6 +616,7 @@ Simon Kelley <simon@thekelleys.org.uk>
|
||||
Sricharan Ramabadhran <quic_srichara@quicinc.com> <sricharan@codeaurora.org>
|
||||
Srinivas Ramana <quic_sramana@quicinc.com> <sramana@codeaurora.org>
|
||||
Sriram R <quic_srirrama@quicinc.com> <srirrama@codeaurora.org>
|
||||
Sriram Yagnaraman <sriram.yagnaraman@ericsson.com> <sriram.yagnaraman@est.tech>
|
||||
Stanislav Fomichev <sdf@fomichev.me> <sdf@google.com>
|
||||
Stefan Wahren <wahrenst@gmx.net> <stefan.wahren@i2se.com>
|
||||
Stéphane Witzmann <stephane.witzmann@ubpmes.univ-bpclermont.fr>
|
||||
|
||||
@@ -260,7 +260,7 @@ Some users depend on strict execution ordering where only one work item
|
||||
is in flight at any given time and the work items are processed in
|
||||
queueing order. While the combination of ``@max_active`` of 1 and
|
||||
``WQ_UNBOUND`` used to achieve this behavior, this is no longer the
|
||||
case. Use ``alloc_ordered_queue()`` instead.
|
||||
case. Use alloc_ordered_workqueue() instead.
|
||||
|
||||
|
||||
Example Execution Scenarios
|
||||
|
||||
@@ -42,6 +42,7 @@ properties:
|
||||
- focaltech,ft5426
|
||||
- focaltech,ft5452
|
||||
- focaltech,ft6236
|
||||
- focaltech,ft8201
|
||||
- focaltech,ft8719
|
||||
|
||||
reg:
|
||||
|
||||
@@ -10,7 +10,7 @@ maintainers:
|
||||
- Fabio Estevam <festevam@gmail.com>
|
||||
|
||||
allOf:
|
||||
- $ref: usb-hcd.yaml#
|
||||
- $ref: usb-device.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
@@ -36,6 +36,13 @@ required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
patternProperties:
|
||||
"^.*@[0-9a-f]{1,2}$":
|
||||
description: The hard wired USB devices
|
||||
type: object
|
||||
$ref: /schemas/usb/usb-device.yaml
|
||||
additionalProperties: true
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
|
||||
@@ -75,7 +75,7 @@ Here are the main features of EROFS:
|
||||
|
||||
- Support merging tail-end data into a special inode as fragments.
|
||||
|
||||
- Support large folios for uncompressed files.
|
||||
- Support large folios to make use of THPs (Transparent Hugepages);
|
||||
|
||||
- Support direct I/O on uncompressed files to avoid double caching for loop
|
||||
devices;
|
||||
|
||||
@@ -13,7 +13,7 @@ KSMBD architecture
|
||||
The subset of performance related operations belong in kernelspace and
|
||||
the other subset which belong to operations which are not really related with
|
||||
performance in userspace. So, DCE/RPC management that has historically resulted
|
||||
into number of buffer overflow issues and dangerous security bugs and user
|
||||
into a number of buffer overflow issues and dangerous security bugs and user
|
||||
account management are implemented in user space as ksmbd.mountd.
|
||||
File operations that are related with performance (open/read/write/close etc.)
|
||||
in kernel space (ksmbd). This also allows for easier integration with VFS
|
||||
@@ -24,8 +24,8 @@ ksmbd (kernel daemon)
|
||||
|
||||
When the server daemon is started, It starts up a forker thread
|
||||
(ksmbd/interface name) at initialization time and open a dedicated port 445
|
||||
for listening to SMB requests. Whenever new clients make request, Forker
|
||||
thread will accept the client connection and fork a new thread for dedicated
|
||||
for listening to SMB requests. Whenever new clients make a request, the Forker
|
||||
thread will accept the client connection and fork a new thread for a dedicated
|
||||
communication channel between the client and the server. It allows for parallel
|
||||
processing of SMB requests(commands) from clients as well as allowing for new
|
||||
clients to make new connections. Each instance is named ksmbd/1~n(port number)
|
||||
@@ -34,12 +34,12 @@ thread can decide to pass through the commands to the user space (ksmbd.mountd),
|
||||
currently DCE/RPC commands are identified to be handled through the user space.
|
||||
To further utilize the linux kernel, it has been chosen to process the commands
|
||||
as workitems and to be executed in the handlers of the ksmbd-io kworker threads.
|
||||
It allows for multiplexing of the handlers as the kernel take care of initiating
|
||||
It allows for multiplexing of the handlers as the kernel takes care of initiating
|
||||
extra worker threads if the load is increased and vice versa, if the load is
|
||||
decreased it destroys the extra worker threads. So, after connection is
|
||||
established with client. Dedicated ksmbd/1..n(port number) takes complete
|
||||
decreased it destroys the extra worker threads. So, after the connection is
|
||||
established with the client. Dedicated ksmbd/1..n(port number) takes complete
|
||||
ownership of receiving/parsing of SMB commands. Each received command is worked
|
||||
in parallel i.e., There can be multiple clients commands which are worked in
|
||||
in parallel i.e., there can be multiple client commands which are worked in
|
||||
parallel. After receiving each command a separated kernel workitem is prepared
|
||||
for each command which is further queued to be handled by ksmbd-io kworkers.
|
||||
So, each SMB workitem is queued to the kworkers. This allows the benefit of load
|
||||
@@ -49,9 +49,9 @@ performance by handling client commands in parallel.
|
||||
ksmbd.mountd (user space daemon)
|
||||
--------------------------------
|
||||
|
||||
ksmbd.mountd is userspace process to, transfer user account and password that
|
||||
ksmbd.mountd is a userspace process to, transfer the user account and password that
|
||||
are registered using ksmbd.adduser (part of utils for user space). Further it
|
||||
allows sharing information parameters that parsed from smb.conf to ksmbd in
|
||||
allows sharing information parameters that are parsed from smb.conf to ksmbd in
|
||||
kernel. For the execution part it has a daemon which is continuously running
|
||||
and connected to the kernel interface using netlink socket, it waits for the
|
||||
requests (dcerpc and share/user info). It handles RPC calls (at a minimum few
|
||||
@@ -124,7 +124,7 @@ How to run
|
||||
1. Download ksmbd-tools(https://github.com/cifsd-team/ksmbd-tools/releases) and
|
||||
compile them.
|
||||
|
||||
- Refer README(https://github.com/cifsd-team/ksmbd-tools/blob/master/README.md)
|
||||
- Refer to README(https://github.com/cifsd-team/ksmbd-tools/blob/master/README.md)
|
||||
to know how to use ksmbd.mountd/adduser/addshare/control utils
|
||||
|
||||
$ ./autogen.sh
|
||||
@@ -133,7 +133,7 @@ How to run
|
||||
|
||||
2. Create /usr/local/etc/ksmbd/ksmbd.conf file, add SMB share in ksmbd.conf file.
|
||||
|
||||
- Refer ksmbd.conf.example in ksmbd-utils, See ksmbd.conf manpage
|
||||
- Refer to ksmbd.conf.example in ksmbd-utils, See ksmbd.conf manpage
|
||||
for details to configure shares.
|
||||
|
||||
$ man ksmbd.conf
|
||||
@@ -145,7 +145,7 @@ How to run
|
||||
$ man ksmbd.adduser
|
||||
$ sudo ksmbd.adduser -a <Enter USERNAME for SMB share access>
|
||||
|
||||
4. Insert ksmbd.ko module after build your kernel. No need to load module
|
||||
4. Insert the ksmbd.ko module after you build your kernel. No need to load the module
|
||||
if ksmbd is built into the kernel.
|
||||
|
||||
- Set ksmbd in menuconfig(e.g. $ make menuconfig)
|
||||
@@ -175,7 +175,7 @@ Each layer
|
||||
1. Enable all component prints
|
||||
# sudo ksmbd.control -d "all"
|
||||
|
||||
2. Enable one of components (smb, auth, vfs, oplock, ipc, conn, rdma)
|
||||
2. Enable one of the components (smb, auth, vfs, oplock, ipc, conn, rdma)
|
||||
# sudo ksmbd.control -d "smb"
|
||||
|
||||
3. Show what prints are enabled.
|
||||
|
||||
@@ -126,7 +126,7 @@ Ccache
|
||||
|
||||
``ccache`` can be used with ``clang`` to improve subsequent builds, (though
|
||||
KBUILD_BUILD_TIMESTAMP_ should be set to a deterministic value between builds
|
||||
in order to avoid 100% cache misses, see Reproducible_builds_ for more info):
|
||||
in order to avoid 100% cache misses, see Reproducible_builds_ for more info)::
|
||||
|
||||
KBUILD_BUILD_TIMESTAMP='' make LLVM=1 CC="ccache clang"
|
||||
|
||||
|
||||
@@ -629,18 +629,6 @@ The preferred style for long (multi-line) comments is:
|
||||
* with beginning and ending almost-blank lines.
|
||||
*/
|
||||
|
||||
For files in net/ and drivers/net/ the preferred style for long (multi-line)
|
||||
comments is a little different.
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
/* The preferred comment style for files in net/ and drivers/net
|
||||
* looks like this.
|
||||
*
|
||||
* It is nearly the same as the generally preferred comment style,
|
||||
* but there is no initial almost-blank line.
|
||||
*/
|
||||
|
||||
It's also important to comment data, whether they are basic types or derived
|
||||
types. To this end, use just one data declaration per line (no commas for
|
||||
multiple data declarations). This leaves you room for a small comment on each
|
||||
|
||||
@@ -355,23 +355,6 @@ just do it. As a result, a sequence of smaller series gets merged quicker and
|
||||
with better review coverage. Re-posting large series also increases the mailing
|
||||
list traffic.
|
||||
|
||||
Multi-line comments
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Comment style convention is slightly different for networking and most of
|
||||
the tree. Instead of this::
|
||||
|
||||
/*
|
||||
* foobar blah blah blah
|
||||
* another line of text
|
||||
*/
|
||||
|
||||
it is requested that you make it look like this::
|
||||
|
||||
/* foobar blah blah blah
|
||||
* another line of text
|
||||
*/
|
||||
|
||||
Local variable ordering ("reverse xmas tree", "RCS")
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
+42
-17
@@ -1880,6 +1880,10 @@ F: Documentation/devicetree/bindings/iommu/arm,smmu*
|
||||
F: drivers/iommu/arm/
|
||||
F: drivers/iommu/io-pgtable-arm*
|
||||
|
||||
ARM SMMU SVA SUPPORT
|
||||
R: Jean-Philippe Brucker <jean-philippe@linaro.org>
|
||||
F: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c
|
||||
|
||||
ARM SUB-ARCHITECTURES
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
@@ -2535,8 +2539,7 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Supported
|
||||
W: http://www.linux4sam.org
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux.git
|
||||
F: arch/arm/boot/dts/microchip/at91*
|
||||
F: arch/arm/boot/dts/microchip/sama*
|
||||
F: arch/arm/boot/dts/microchip/
|
||||
F: arch/arm/include/debug/at91.S
|
||||
F: arch/arm/mach-at91/
|
||||
F: drivers/memory/atmel*
|
||||
@@ -2745,7 +2748,7 @@ F: include/linux/soc/qcom/
|
||||
|
||||
ARM/QUALCOMM SUPPORT
|
||||
M: Bjorn Andersson <andersson@kernel.org>
|
||||
M: Konrad Dybcio <konrad.dybcio@linaro.org>
|
||||
M: Konrad Dybcio <konradybcio@kernel.org>
|
||||
L: linux-arm-msm@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git
|
||||
@@ -3504,7 +3507,9 @@ S: Maintained
|
||||
W: http://linux-atm.sourceforge.net
|
||||
F: drivers/atm/
|
||||
F: include/linux/atm*
|
||||
F: include/linux/sonet.h
|
||||
F: include/uapi/linux/atm*
|
||||
F: include/uapi/linux/sonet.h
|
||||
|
||||
ATMEL MACB ETHERNET DRIVER
|
||||
M: Nicolas Ferre <nicolas.ferre@microchip.com>
|
||||
@@ -7106,7 +7111,7 @@ F: drivers/gpu/drm/tiny/panel-mipi-dbi.c
|
||||
DRM DRIVER for Qualcomm Adreno GPUs
|
||||
M: Rob Clark <robdclark@gmail.com>
|
||||
R: Sean Paul <sean@poorly.run>
|
||||
R: Konrad Dybcio <konrad.dybcio@linaro.org>
|
||||
R: Konrad Dybcio <konradybcio@kernel.org>
|
||||
L: linux-arm-msm@vger.kernel.org
|
||||
L: dri-devel@lists.freedesktop.org
|
||||
L: freedreno@lists.freedesktop.org
|
||||
@@ -10173,7 +10178,7 @@ F: Documentation/devicetree/bindings/infiniband/hisilicon-hns-roce.txt
|
||||
F: drivers/infiniband/hw/hns/
|
||||
|
||||
HISILICON SAS Controller
|
||||
M: Xiang Chen <chenxiang66@hisilicon.com>
|
||||
M: Yihang Li <liyihang9@huawei.com>
|
||||
S: Supported
|
||||
W: http://www.hisilicon.com
|
||||
F: Documentation/devicetree/bindings/scsi/hisilicon-sas.txt
|
||||
@@ -11993,7 +11998,7 @@ F: fs/jfs/
|
||||
JME NETWORK DRIVER
|
||||
M: Guo-Fu Tseng <cooldavid@cooldavid.org>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
S: Odd Fixes
|
||||
F: drivers/net/ethernet/jme.*
|
||||
|
||||
JOURNALLING FLASH FILE SYSTEM V2 (JFFS2)
|
||||
@@ -12165,7 +12170,7 @@ KERNEL NFSD, SUNRPC, AND LOCKD SERVERS
|
||||
M: Chuck Lever <chuck.lever@oracle.com>
|
||||
M: Jeff Layton <jlayton@kernel.org>
|
||||
R: Neil Brown <neilb@suse.de>
|
||||
R: Olga Kornievskaia <kolga@netapp.com>
|
||||
R: Olga Kornievskaia <okorniev@redhat.com>
|
||||
R: Dai Ngo <Dai.Ngo@oracle.com>
|
||||
R: Tom Talpey <tom@talpey.com>
|
||||
L: linux-nfs@vger.kernel.org
|
||||
@@ -15877,15 +15882,19 @@ F: drivers/net/
|
||||
F: include/dt-bindings/net/
|
||||
F: include/linux/cn_proc.h
|
||||
F: include/linux/etherdevice.h
|
||||
F: include/linux/ethtool_netlink.h
|
||||
F: include/linux/fcdevice.h
|
||||
F: include/linux/fddidevice.h
|
||||
F: include/linux/hippidevice.h
|
||||
F: include/linux/if_*
|
||||
F: include/linux/inetdevice.h
|
||||
F: include/linux/netdevice.h
|
||||
F: include/linux/netdev*
|
||||
F: include/linux/platform_data/wiznet.h
|
||||
F: include/uapi/linux/cn_proc.h
|
||||
F: include/uapi/linux/ethtool_netlink.h
|
||||
F: include/uapi/linux/if_*
|
||||
F: include/uapi/linux/netdevice.h
|
||||
F: include/uapi/linux/netdev*
|
||||
F: tools/testing/selftests/drivers/net/
|
||||
X: drivers/net/wireless/
|
||||
|
||||
NETWORKING DRIVERS (WIRELESS)
|
||||
@@ -15936,14 +15945,28 @@ F: include/linux/framer/framer-provider.h
|
||||
F: include/linux/framer/framer.h
|
||||
F: include/linux/in.h
|
||||
F: include/linux/indirect_call_wrapper.h
|
||||
F: include/linux/inet.h
|
||||
F: include/linux/inet_diag.h
|
||||
F: include/linux/net.h
|
||||
F: include/linux/netdevice.h
|
||||
F: include/linux/skbuff.h
|
||||
F: include/linux/netdev*
|
||||
F: include/linux/netlink.h
|
||||
F: include/linux/netpoll.h
|
||||
F: include/linux/rtnetlink.h
|
||||
F: include/linux/seq_file_net.h
|
||||
F: include/linux/skbuff*
|
||||
F: include/net/
|
||||
F: include/uapi/linux/genetlink.h
|
||||
F: include/uapi/linux/hsr_netlink.h
|
||||
F: include/uapi/linux/in.h
|
||||
F: include/uapi/linux/inet_diag.h
|
||||
F: include/uapi/linux/nbd-netlink.h
|
||||
F: include/uapi/linux/net.h
|
||||
F: include/uapi/linux/net_namespace.h
|
||||
F: include/uapi/linux/netdevice.h
|
||||
F: include/uapi/linux/netconf.h
|
||||
F: include/uapi/linux/netdev*
|
||||
F: include/uapi/linux/netlink.h
|
||||
F: include/uapi/linux/netlink_diag.h
|
||||
F: include/uapi/linux/rtnetlink.h
|
||||
F: lib/net_utils.c
|
||||
F: lib/random32.c
|
||||
F: net/
|
||||
@@ -17415,6 +17438,7 @@ M: Roy Zang <roy.zang@nxp.com>
|
||||
L: linuxppc-dev@lists.ozlabs.org
|
||||
L: linux-pci@vger.kernel.org
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
L: imx@lists.linux.dev
|
||||
S: Maintained
|
||||
F: drivers/pci/controller/dwc/*layerscape*
|
||||
|
||||
@@ -17441,6 +17465,7 @@ M: Richard Zhu <hongxing.zhu@nxp.com>
|
||||
M: Lucas Stach <l.stach@pengutronix.de>
|
||||
L: linux-pci@vger.kernel.org
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
L: imx@lists.linux.dev
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml
|
||||
F: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml
|
||||
@@ -17619,6 +17644,7 @@ F: drivers/pci/controller/pci-xgene-msi.c
|
||||
PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS
|
||||
M: Lorenzo Pieralisi <lpieralisi@kernel.org>
|
||||
M: Krzysztof Wilczyński <kw@linux.com>
|
||||
R: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
|
||||
R: Rob Herring <robh@kernel.org>
|
||||
L: linux-pci@vger.kernel.org
|
||||
S: Supported
|
||||
@@ -18525,7 +18551,6 @@ F: drivers/crypto/intel/qat/
|
||||
|
||||
QCOM AUDIO (ASoC) DRIVERS
|
||||
M: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
|
||||
M: Banajit Goswami <bgoswami@quicinc.com>
|
||||
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
||||
L: linux-arm-msm@vger.kernel.org
|
||||
S: Supported
|
||||
@@ -18774,7 +18799,7 @@ F: include/uapi/drm/qaic_accel.h
|
||||
|
||||
QUALCOMM CORE POWER REDUCTION (CPR) AVS DRIVER
|
||||
M: Bjorn Andersson <andersson@kernel.org>
|
||||
M: Konrad Dybcio <konrad.dybcio@linaro.org>
|
||||
M: Konrad Dybcio <konradybcio@kernel.org>
|
||||
L: linux-pm@vger.kernel.org
|
||||
L: linux-arm-msm@vger.kernel.org
|
||||
S: Maintained
|
||||
@@ -20354,6 +20379,7 @@ F: Documentation/devicetree/bindings/scsi/
|
||||
F: drivers/scsi/
|
||||
F: drivers/ufs/
|
||||
F: include/scsi/
|
||||
F: include/uapi/scsi/
|
||||
|
||||
SCSI TAPE DRIVER
|
||||
M: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
|
||||
@@ -21054,6 +21080,7 @@ SOCKET TIMESTAMPING
|
||||
M: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
|
||||
S: Maintained
|
||||
F: Documentation/networking/timestamping.rst
|
||||
F: include/linux/net_tstamp.h
|
||||
F: include/uapi/linux/net_tstamp.h
|
||||
F: tools/testing/selftests/net/so_txtime.c
|
||||
|
||||
@@ -23821,10 +23848,8 @@ F: drivers/media/usb/uvc/
|
||||
F: include/uapi/linux/uvcvideo.h
|
||||
|
||||
USB WEBCAM GADGET
|
||||
M: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
M: Daniel Scally <dan.scally@ideasonboard.com>
|
||||
L: linux-usb@vger.kernel.org
|
||||
S: Maintained
|
||||
S: Orphan
|
||||
F: drivers/usb/gadget/function/*uvc*
|
||||
F: drivers/usb/gadget/legacy/webcam.c
|
||||
F: include/uapi/linux/usb/g_uvc.h
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 11
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc4
|
||||
EXTRAVERSION = -rc6
|
||||
NAME = Baby Opossum Posse
|
||||
|
||||
# *DOCUMENTATION*
|
||||
@@ -1980,7 +1980,7 @@ nsdeps: modules
|
||||
quiet_cmd_gen_compile_commands = GEN $@
|
||||
cmd_gen_compile_commands = $(PYTHON3) $< -a $(AR) -o $@ $(filter-out $<, $(real-prereqs))
|
||||
|
||||
$(extmod_prefix)compile_commands.json: scripts/clang-tools/gen_compile_commands.py \
|
||||
$(extmod_prefix)compile_commands.json: $(srctree)/scripts/clang-tools/gen_compile_commands.py \
|
||||
$(if $(KBUILD_EXTMOD),, vmlinux.a $(KBUILD_VMLINUX_LIBS)) \
|
||||
$(if $(CONFIG_MODULES), $(MODORDER)) FORCE
|
||||
$(call if_changed,gen_compile_commands)
|
||||
|
||||
@@ -274,24 +274,24 @@
|
||||
|
||||
led@0 {
|
||||
chan-name = "R";
|
||||
led-cur = /bits/ 8 <0x20>;
|
||||
max-cur = /bits/ 8 <0x60>;
|
||||
led-cur = /bits/ 8 <0x6e>;
|
||||
max-cur = /bits/ 8 <0xc8>;
|
||||
reg = <0>;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
};
|
||||
|
||||
led@1 {
|
||||
chan-name = "G";
|
||||
led-cur = /bits/ 8 <0x20>;
|
||||
max-cur = /bits/ 8 <0x60>;
|
||||
led-cur = /bits/ 8 <0xbe>;
|
||||
max-cur = /bits/ 8 <0xc8>;
|
||||
reg = <1>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
};
|
||||
|
||||
led@2 {
|
||||
chan-name = "B";
|
||||
led-cur = /bits/ 8 <0x20>;
|
||||
max-cur = /bits/ 8 <0x60>;
|
||||
led-cur = /bits/ 8 <0xbe>;
|
||||
max-cur = /bits/ 8 <0xc8>;
|
||||
reg = <2>;
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
};
|
||||
|
||||
@@ -781,7 +781,7 @@
|
||||
|
||||
mount-matrix = "-1", "0", "0",
|
||||
"0", "1", "0",
|
||||
"0", "0", "1";
|
||||
"0", "0", "-1";
|
||||
};
|
||||
|
||||
cam1: camera@3e {
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
core-cluster-thermal {
|
||||
cluster-thermal {
|
||||
polling-delay-passive = <1000>;
|
||||
polling-delay = <5000>;
|
||||
thermal-sensors = <&tmu 1>;
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
core-cluster-thermal {
|
||||
cluster-thermal {
|
||||
polling-delay-passive = <1000>;
|
||||
polling-delay = <5000>;
|
||||
thermal-sensors = <&tmu 3>;
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
core-cluster-thermal {
|
||||
cluster-thermal {
|
||||
polling-delay-passive = <1000>;
|
||||
polling-delay = <5000>;
|
||||
thermal-sensors = <&tmu 3>;
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
};
|
||||
|
||||
thermal-zones {
|
||||
core-cluster-thermal {
|
||||
cluster-thermal {
|
||||
polling-delay-passive = <1000>;
|
||||
polling-delay = <5000>;
|
||||
thermal-sensors = <&tmu 0>;
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
core-cluster1-thermal {
|
||||
cluster1-thermal {
|
||||
polling-delay-passive = <1000>;
|
||||
polling-delay = <5000>;
|
||||
thermal-sensors = <&tmu 4>;
|
||||
@@ -151,7 +151,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
core-cluster2-thermal {
|
||||
cluster2-thermal {
|
||||
polling-delay-passive = <1000>;
|
||||
polling-delay = <5000>;
|
||||
thermal-sensors = <&tmu 5>;
|
||||
@@ -180,7 +180,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
core-cluster3-thermal {
|
||||
cluster3-thermal {
|
||||
polling-delay-passive = <1000>;
|
||||
polling-delay = <5000>;
|
||||
thermal-sensors = <&tmu 6>;
|
||||
@@ -209,7 +209,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
core-cluster4-thermal {
|
||||
cluster4-thermal {
|
||||
polling-delay-passive = <1000>;
|
||||
polling-delay = <5000>;
|
||||
thermal-sensors = <&tmu 7>;
|
||||
|
||||
@@ -492,7 +492,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
ddr-cluster5-thermal {
|
||||
ddr-ctrl5-thermal {
|
||||
polling-delay-passive = <1000>;
|
||||
polling-delay = <5000>;
|
||||
thermal-sensors = <&tmu 1>;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
&gpio3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrcl-0 = <&pinctrl_gpio3_hog>;
|
||||
pinctrl-0 = <&pinctrl_gpio3_hog>;
|
||||
|
||||
uart4_rs485_en {
|
||||
gpio-hog;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
&gpio3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrcl-0 = <&pinctrl_gpio3_hog>;
|
||||
pinctrl-0 = <&pinctrl_gpio3_hog>;
|
||||
|
||||
uart4_rs485_en {
|
||||
gpio-hog;
|
||||
|
||||
@@ -211,13 +211,12 @@
|
||||
|
||||
simple-audio-card,cpu {
|
||||
sound-dai = <&sai3>;
|
||||
frame-master;
|
||||
bitclock-master;
|
||||
};
|
||||
|
||||
simple-audio-card,codec {
|
||||
sound-dai = <&wm8962>;
|
||||
clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO1>;
|
||||
frame-master;
|
||||
bitclock-master;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -507,10 +506,9 @@
|
||||
&sai3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_sai3>;
|
||||
assigned-clocks = <&clk IMX8MP_CLK_SAI3>,
|
||||
<&clk IMX8MP_AUDIO_PLL2> ;
|
||||
assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL2_OUT>;
|
||||
assigned-clock-rates = <12288000>, <361267200>;
|
||||
assigned-clocks = <&clk IMX8MP_CLK_SAI3>;
|
||||
assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
|
||||
assigned-clock-rates = <12288000>;
|
||||
fsl,sai-mclk-direction-output;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -499,7 +499,7 @@
|
||||
pinctrl-0 = <&pinctrl_usdhc2_hs>, <&pinctrl_usdhc2_gpio>;
|
||||
pinctrl-1 = <&pinctrl_usdhc2_uhs>, <&pinctrl_usdhc2_gpio>;
|
||||
pinctrl-2 = <&pinctrl_usdhc2_uhs>, <&pinctrl_usdhc2_gpio>;
|
||||
cd-gpios = <&gpio3 00 GPIO_ACTIVE_LOW>;
|
||||
cd-gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
|
||||
vmmc-supply = <®_usdhc2_vmmc>;
|
||||
bus-width = <4>;
|
||||
no-sdio;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
linux,cma {
|
||||
compatible = "shared-dma-pool";
|
||||
reusable;
|
||||
alloc-ranges = <0 0x60000000 0 0x40000000>;
|
||||
alloc-ranges = <0 0x80000000 0 0x40000000>;
|
||||
size = <0 0x10000000>;
|
||||
linux,cma-default;
|
||||
};
|
||||
@@ -156,6 +156,7 @@
|
||||
&wdog3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_wdog>;
|
||||
fsl,ext-reset-output;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
@@ -1105,7 +1105,7 @@
|
||||
<&clk IMX93_CLK_SYS_PLL_PFD0_DIV2>;
|
||||
assigned-clock-rates = <100000000>, <250000000>;
|
||||
intf_mode = <&wakeupmix_gpr 0x28>;
|
||||
snps,clk-csr = <0>;
|
||||
snps,clk-csr = <6>;
|
||||
nvmem-cells = <ð_mac2>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
status = "disabled";
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
reg = <0x0>;
|
||||
enable-method = "psci";
|
||||
#cooling-cells = <2>;
|
||||
power-domains = <&scmi_devpd IMX95_PERF_A55>;
|
||||
power-domains = <&scmi_perf IMX95_PERF_A55>;
|
||||
power-domain-names = "perf";
|
||||
i-cache-size = <32768>;
|
||||
i-cache-line-size = <64>;
|
||||
@@ -44,7 +44,7 @@
|
||||
reg = <0x100>;
|
||||
enable-method = "psci";
|
||||
#cooling-cells = <2>;
|
||||
power-domains = <&scmi_devpd IMX95_PERF_A55>;
|
||||
power-domains = <&scmi_perf IMX95_PERF_A55>;
|
||||
power-domain-names = "perf";
|
||||
i-cache-size = <32768>;
|
||||
i-cache-line-size = <64>;
|
||||
@@ -61,7 +61,7 @@
|
||||
reg = <0x200>;
|
||||
enable-method = "psci";
|
||||
#cooling-cells = <2>;
|
||||
power-domains = <&scmi_devpd IMX95_PERF_A55>;
|
||||
power-domains = <&scmi_perf IMX95_PERF_A55>;
|
||||
power-domain-names = "perf";
|
||||
i-cache-size = <32768>;
|
||||
i-cache-line-size = <64>;
|
||||
@@ -78,7 +78,7 @@
|
||||
reg = <0x300>;
|
||||
enable-method = "psci";
|
||||
#cooling-cells = <2>;
|
||||
power-domains = <&scmi_devpd IMX95_PERF_A55>;
|
||||
power-domains = <&scmi_perf IMX95_PERF_A55>;
|
||||
power-domain-names = "perf";
|
||||
i-cache-size = <32768>;
|
||||
i-cache-line-size = <64>;
|
||||
@@ -93,7 +93,7 @@
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a55";
|
||||
reg = <0x400>;
|
||||
power-domains = <&scmi_devpd IMX95_PERF_A55>;
|
||||
power-domains = <&scmi_perf IMX95_PERF_A55>;
|
||||
power-domain-names = "perf";
|
||||
enable-method = "psci";
|
||||
#cooling-cells = <2>;
|
||||
@@ -110,7 +110,7 @@
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a55";
|
||||
reg = <0x500>;
|
||||
power-domains = <&scmi_devpd IMX95_PERF_A55>;
|
||||
power-domains = <&scmi_perf IMX95_PERF_A55>;
|
||||
power-domain-names = "perf";
|
||||
enable-method = "psci";
|
||||
#cooling-cells = <2>;
|
||||
@@ -187,7 +187,7 @@
|
||||
compatible = "cache";
|
||||
cache-size = <524288>;
|
||||
cache-line-size = <64>;
|
||||
cache-sets = <1024>;
|
||||
cache-sets = <512>;
|
||||
cache-level = <3>;
|
||||
cache-unified;
|
||||
};
|
||||
|
||||
@@ -320,8 +320,8 @@
|
||||
reg = <0x08af8800 0x400>;
|
||||
|
||||
interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 53 IRQ_TYPE_EDGE_BOTH>,
|
||||
<GIC_SPI 52 IRQ_TYPE_EDGE_BOTH>;
|
||||
<GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "pwr_event",
|
||||
"dp_hs_phy_irq",
|
||||
"dm_hs_phy_irq";
|
||||
|
||||
@@ -278,6 +278,13 @@
|
||||
vdd-l3-supply = <&vreg_s1f_0p7>;
|
||||
vdd-s1-supply = <&vph_pwr>;
|
||||
vdd-s2-supply = <&vph_pwr>;
|
||||
|
||||
vreg_l3i_0p8: ldo3 {
|
||||
regulator-name = "vreg_l3i_0p8";
|
||||
regulator-min-microvolt = <880000>;
|
||||
regulator-max-microvolt = <920000>;
|
||||
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||||
};
|
||||
};
|
||||
|
||||
regulators-7 {
|
||||
@@ -423,11 +430,17 @@
|
||||
};
|
||||
|
||||
&pcie4 {
|
||||
perst-gpios = <&tlmm 146 GPIO_ACTIVE_LOW>;
|
||||
wake-gpios = <&tlmm 148 GPIO_ACTIVE_LOW>;
|
||||
|
||||
pinctrl-0 = <&pcie4_default>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie4_phy {
|
||||
vdda-phy-supply = <&vreg_l3j_0p8>;
|
||||
vdda-phy-supply = <&vreg_l3i_0p8>;
|
||||
vdda-pll-supply = <&vreg_l3e_1p2>;
|
||||
|
||||
status = "okay";
|
||||
@@ -517,7 +530,30 @@
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
pcie6a_default: pcie2a-default-state {
|
||||
pcie4_default: pcie4-default-state {
|
||||
clkreq-n-pins {
|
||||
pins = "gpio147";
|
||||
function = "pcie4_clk";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
perst-n-pins {
|
||||
pins = "gpio146";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
wake-n-pins {
|
||||
pins = "gpio148";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
pcie6a_default: pcie6a-default-state {
|
||||
clkreq-n-pins {
|
||||
pins = "gpio153";
|
||||
function = "pcie6a_clk";
|
||||
@@ -529,7 +565,7 @@
|
||||
pins = "gpio152";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-down;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
wake-n-pins {
|
||||
|
||||
@@ -268,7 +268,6 @@
|
||||
pinctrl-0 = <&edp_reg_en>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
@@ -637,6 +636,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
&gpu {
|
||||
status = "okay";
|
||||
|
||||
zap-shader {
|
||||
firmware-name = "qcom/x1e80100/gen70500_zap.mbn";
|
||||
};
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
clock-frequency = <400000>;
|
||||
|
||||
@@ -724,9 +731,13 @@
|
||||
|
||||
aux-bus {
|
||||
panel {
|
||||
compatible = "edp-panel";
|
||||
compatible = "samsung,atna45af01", "samsung,atna33xc20";
|
||||
enable-gpios = <&pmc8380_3_gpios 4 GPIO_ACTIVE_HIGH>;
|
||||
power-supply = <&vreg_edp_3p3>;
|
||||
|
||||
pinctrl-0 = <&edp_bl_en>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
port {
|
||||
edp_panel_in: endpoint {
|
||||
remote-endpoint = <&mdss_dp3_out>;
|
||||
@@ -756,11 +767,17 @@
|
||||
};
|
||||
|
||||
&pcie4 {
|
||||
perst-gpios = <&tlmm 146 GPIO_ACTIVE_LOW>;
|
||||
wake-gpios = <&tlmm 148 GPIO_ACTIVE_LOW>;
|
||||
|
||||
pinctrl-0 = <&pcie4_default>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie4_phy {
|
||||
vdda-phy-supply = <&vreg_l3j_0p8>;
|
||||
vdda-phy-supply = <&vreg_l3i_0p8>;
|
||||
vdda-pll-supply = <&vreg_l3e_1p2>;
|
||||
|
||||
status = "okay";
|
||||
@@ -785,6 +802,16 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pmc8380_3_gpios {
|
||||
edp_bl_en: edp-bl-en-state {
|
||||
pins = "gpio4";
|
||||
function = "normal";
|
||||
power-source = <1>; /* 1.8V */
|
||||
input-disable;
|
||||
output-enable;
|
||||
};
|
||||
};
|
||||
|
||||
&qupv3_0 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -931,7 +958,30 @@
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
pcie6a_default: pcie2a-default-state {
|
||||
pcie4_default: pcie4-default-state {
|
||||
clkreq-n-pins {
|
||||
pins = "gpio147";
|
||||
function = "pcie4_clk";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
perst-n-pins {
|
||||
pins = "gpio146";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
wake-n-pins {
|
||||
pins = "gpio148";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
pcie6a_default: pcie6a-default-state {
|
||||
clkreq-n-pins {
|
||||
pins = "gpio153";
|
||||
function = "pcie6a_clk";
|
||||
@@ -943,15 +993,15 @@
|
||||
pins = "gpio152";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-down;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
wake-n-pins {
|
||||
pins = "gpio154";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
pins = "gpio154";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
tpad_default: tpad-default-state {
|
||||
|
||||
@@ -625,16 +625,31 @@
|
||||
};
|
||||
|
||||
&pcie4 {
|
||||
perst-gpios = <&tlmm 146 GPIO_ACTIVE_LOW>;
|
||||
wake-gpios = <&tlmm 148 GPIO_ACTIVE_LOW>;
|
||||
|
||||
pinctrl-0 = <&pcie4_default>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie4_phy {
|
||||
vdda-phy-supply = <&vreg_l3j_0p8>;
|
||||
vdda-phy-supply = <&vreg_l3i_0p8>;
|
||||
vdda-pll-supply = <&vreg_l3e_1p2>;
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie4_port0 {
|
||||
wifi@0 {
|
||||
compatible = "pci17cb,1107";
|
||||
reg = <0x10000 0x0 0x0 0x0 0x0>;
|
||||
|
||||
qcom,ath12k-calibration-variant = "LES790";
|
||||
};
|
||||
};
|
||||
|
||||
&pcie6a {
|
||||
perst-gpios = <&tlmm 152 GPIO_ACTIVE_LOW>;
|
||||
wake-gpios = <&tlmm 154 GPIO_ACTIVE_LOW>;
|
||||
@@ -782,7 +797,30 @@
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
pcie6a_default: pcie2a-default-state {
|
||||
pcie4_default: pcie4-default-state {
|
||||
clkreq-n-pins {
|
||||
pins = "gpio147";
|
||||
function = "pcie4_clk";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
perst-n-pins {
|
||||
pins = "gpio146";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
wake-n-pins {
|
||||
pins = "gpio148";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
pcie6a_default: pcie6a-default-state {
|
||||
clkreq-n-pins {
|
||||
pins = "gpio153";
|
||||
function = "pcie6a_clk";
|
||||
@@ -794,15 +832,15 @@
|
||||
pins = "gpio152";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-down;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
wake-n-pins {
|
||||
pins = "gpio154";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
pins = "gpio154";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
tpad_default: tpad-default-state {
|
||||
|
||||
@@ -606,6 +606,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
&gpu {
|
||||
status = "okay";
|
||||
|
||||
zap-shader {
|
||||
firmware-name = "qcom/x1e80100/gen70500_zap.mbn";
|
||||
};
|
||||
};
|
||||
|
||||
&lpass_tlmm {
|
||||
spkr_01_sd_n_active: spkr-01-sd-n-active-state {
|
||||
pins = "gpio12";
|
||||
@@ -660,11 +668,17 @@
|
||||
};
|
||||
|
||||
&pcie4 {
|
||||
perst-gpios = <&tlmm 146 GPIO_ACTIVE_LOW>;
|
||||
wake-gpios = <&tlmm 148 GPIO_ACTIVE_LOW>;
|
||||
|
||||
pinctrl-0 = <&pcie4_default>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie4_phy {
|
||||
vdda-phy-supply = <&vreg_l3j_0p8>;
|
||||
vdda-phy-supply = <&vreg_l3i_0p8>;
|
||||
vdda-pll-supply = <&vreg_l3e_1p2>;
|
||||
|
||||
status = "okay";
|
||||
@@ -804,7 +818,30 @@
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
pcie6a_default: pcie2a-default-state {
|
||||
pcie4_default: pcie4-default-state {
|
||||
clkreq-n-pins {
|
||||
pins = "gpio147";
|
||||
function = "pcie4_clk";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
perst-n-pins {
|
||||
pins = "gpio146";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
wake-n-pins {
|
||||
pins = "gpio148";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
pcie6a_default: pcie6a-default-state {
|
||||
clkreq-n-pins {
|
||||
pins = "gpio153";
|
||||
function = "pcie6a_clk";
|
||||
@@ -816,15 +853,15 @@
|
||||
pins = "gpio152";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-down;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
wake-n-pins {
|
||||
pins = "gpio154";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
pins = "gpio154";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
wcd_default: wcd-reset-n-active-state {
|
||||
|
||||
@@ -2901,7 +2901,7 @@
|
||||
|
||||
dma-coherent;
|
||||
|
||||
linux,pci-domain = <7>;
|
||||
linux,pci-domain = <6>;
|
||||
num-lanes = <2>;
|
||||
|
||||
interrupts = <GIC_SPI 773 IRQ_TYPE_LEVEL_HIGH>,
|
||||
@@ -2959,6 +2959,7 @@
|
||||
"link_down";
|
||||
|
||||
power-domains = <&gcc GCC_PCIE_6A_GDSC>;
|
||||
required-opps = <&rpmhpd_opp_nom>;
|
||||
|
||||
phys = <&pcie6a_phy>;
|
||||
phy-names = "pciephy";
|
||||
@@ -3022,7 +3023,7 @@
|
||||
|
||||
dma-coherent;
|
||||
|
||||
linux,pci-domain = <5>;
|
||||
linux,pci-domain = <4>;
|
||||
num-lanes = <2>;
|
||||
|
||||
interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
|
||||
@@ -3080,11 +3081,22 @@
|
||||
"link_down";
|
||||
|
||||
power-domains = <&gcc GCC_PCIE_4_GDSC>;
|
||||
required-opps = <&rpmhpd_opp_nom>;
|
||||
|
||||
phys = <&pcie4_phy>;
|
||||
phy-names = "pciephy";
|
||||
|
||||
status = "disabled";
|
||||
|
||||
pcie4_port0: pcie@0 {
|
||||
device_type = "pci";
|
||||
reg = <0x0 0x0 0x0 0x0 0x0>;
|
||||
bus-range = <0x01 0xff>;
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
};
|
||||
};
|
||||
|
||||
pcie4_phy: phy@1c0e000 {
|
||||
@@ -3155,9 +3167,10 @@
|
||||
interconnects = <&gem_noc MASTER_GFX3D 0 &mc_virt SLAVE_EBI1 0>;
|
||||
interconnect-names = "gfx-mem";
|
||||
|
||||
status = "disabled";
|
||||
|
||||
zap-shader {
|
||||
memory-region = <&gpu_microcode_mem>;
|
||||
firmware-name = "qcom/gen70500_zap.mbn";
|
||||
};
|
||||
|
||||
gpu_opp_table: opp-table {
|
||||
@@ -3288,7 +3301,7 @@
|
||||
reg = <0x0 0x03da0000 0x0 0x40000>;
|
||||
#iommu-cells = <2>;
|
||||
#global-interrupts = <1>;
|
||||
interrupts = <GIC_SPI 673 IRQ_TYPE_LEVEL_HIGH>,
|
||||
interrupts = <GIC_SPI 674 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 678 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 679 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 680 IRQ_TYPE_LEVEL_HIGH>,
|
||||
|
||||
@@ -887,6 +887,7 @@ CONFIG_DRM_PANEL_KHADAS_TS050=m
|
||||
CONFIG_DRM_PANEL_MANTIX_MLAF057WE51=m
|
||||
CONFIG_DRM_PANEL_NOVATEK_NT36672E=m
|
||||
CONFIG_DRM_PANEL_RAYDIUM_RM67191=m
|
||||
CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=m
|
||||
CONFIG_DRM_PANEL_SITRONIX_ST7703=m
|
||||
CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA=m
|
||||
CONFIG_DRM_PANEL_VISIONOX_VTDR6130=m
|
||||
|
||||
@@ -1540,8 +1540,15 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
|
||||
vma_pagesize = min(vma_pagesize, (long)max_map_size);
|
||||
}
|
||||
|
||||
if (vma_pagesize == PMD_SIZE || vma_pagesize == PUD_SIZE)
|
||||
/*
|
||||
* Both the canonical IPA and fault IPA must be hugepage-aligned to
|
||||
* ensure we find the right PFN and lay down the mapping in the right
|
||||
* place.
|
||||
*/
|
||||
if (vma_pagesize == PMD_SIZE || vma_pagesize == PUD_SIZE) {
|
||||
fault_ipa &= ~(vma_pagesize - 1);
|
||||
ipa &= ~(vma_pagesize - 1);
|
||||
}
|
||||
|
||||
gfn = ipa >> PAGE_SHIFT;
|
||||
mte_allowed = kvm_vma_mte_allowed(vma);
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <trace/events/kvm.h>
|
||||
|
||||
#include "sys_regs.h"
|
||||
#include "vgic/vgic.h"
|
||||
|
||||
#include "trace.h"
|
||||
|
||||
@@ -435,6 +436,11 @@ static bool access_gic_sgi(struct kvm_vcpu *vcpu,
|
||||
{
|
||||
bool g1;
|
||||
|
||||
if (!kvm_has_gicv3(vcpu->kvm)) {
|
||||
kvm_inject_undefined(vcpu);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!p->is_write)
|
||||
return read_from_write_only(vcpu, p, r);
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ static void iter_unmark_lpis(struct kvm *kvm)
|
||||
struct vgic_irq *irq;
|
||||
unsigned long intid;
|
||||
|
||||
xa_for_each(&dist->lpi_xa, intid, irq) {
|
||||
xa_for_each_marked(&dist->lpi_xa, intid, irq, LPI_XA_MARK_DEBUG_ITER) {
|
||||
xa_clear_mark(&dist->lpi_xa, intid, LPI_XA_MARK_DEBUG_ITER);
|
||||
vgic_put_irq(kvm, irq);
|
||||
}
|
||||
|
||||
@@ -417,10 +417,8 @@ static void __kvm_vgic_vcpu_destroy(struct kvm_vcpu *vcpu)
|
||||
kfree(vgic_cpu->private_irqs);
|
||||
vgic_cpu->private_irqs = NULL;
|
||||
|
||||
if (vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3) {
|
||||
vgic_unregister_redist_iodev(vcpu);
|
||||
if (vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3)
|
||||
vgic_cpu->rd_iodev.base_addr = VGIC_ADDR_UNDEF;
|
||||
}
|
||||
}
|
||||
|
||||
void kvm_vgic_vcpu_destroy(struct kvm_vcpu *vcpu)
|
||||
@@ -448,6 +446,11 @@ void kvm_vgic_destroy(struct kvm *kvm)
|
||||
kvm_vgic_dist_destroy(kvm);
|
||||
|
||||
mutex_unlock(&kvm->arch.config_lock);
|
||||
|
||||
if (kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3)
|
||||
kvm_for_each_vcpu(i, vcpu, kvm)
|
||||
vgic_unregister_redist_iodev(vcpu);
|
||||
|
||||
mutex_unlock(&kvm->slots_lock);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,11 @@ struct vgic_global kvm_vgic_global_state __ro_after_init = {
|
||||
* we have to disable IRQs before taking this lock and everything lower
|
||||
* than it.
|
||||
*
|
||||
* The config_lock has additional ordering requirements:
|
||||
* kvm->slots_lock
|
||||
* kvm->srcu
|
||||
* kvm->arch.config_lock
|
||||
*
|
||||
* If you need to take multiple locks, always take the upper lock first,
|
||||
* then the lower ones, e.g. first take the its_lock, then the irq_lock.
|
||||
* If you are already holding a lock and need to take a higher one, you
|
||||
|
||||
@@ -346,4 +346,11 @@ void vgic_v4_configure_vsgis(struct kvm *kvm);
|
||||
void vgic_v4_get_vlpi_state(struct vgic_irq *irq, bool *val);
|
||||
int vgic_v4_request_vpe_irq(struct kvm_vcpu *vcpu, int irq);
|
||||
|
||||
static inline bool kvm_has_gicv3(struct kvm *kvm)
|
||||
{
|
||||
return (static_branch_unlikely(&kvm_vgic_global_state.gicv3_cpuif) &&
|
||||
irqchip_in_kernel(kvm) &&
|
||||
kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Loongson Technology Corporation Limited
|
||||
*/
|
||||
#ifndef _LOONGARCH_DMA_DIRECT_H
|
||||
#define _LOONGARCH_DMA_DIRECT_H
|
||||
|
||||
dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr);
|
||||
phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr);
|
||||
|
||||
#endif /* _LOONGARCH_DMA_DIRECT_H */
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
extern atomic_t irq_err_count;
|
||||
|
||||
#define ARCH_IRQ_INIT_FLAGS IRQ_NOPROBE
|
||||
|
||||
/*
|
||||
* interrupt-retrigger: NOP for now. This may not be appropriate for all
|
||||
* machines, we'll see ...
|
||||
|
||||
@@ -76,7 +76,6 @@ static inline void kvm_restore_lasx(struct loongarch_fpu *fpu) { }
|
||||
#endif
|
||||
|
||||
void kvm_init_timer(struct kvm_vcpu *vcpu, unsigned long hz);
|
||||
void kvm_reset_timer(struct kvm_vcpu *vcpu);
|
||||
void kvm_save_timer(struct kvm_vcpu *vcpu);
|
||||
void kvm_restore_timer(struct kvm_vcpu *vcpu);
|
||||
|
||||
|
||||
@@ -530,6 +530,10 @@ SYM_FUNC_END(_restore_lasx_context)
|
||||
|
||||
#ifdef CONFIG_CPU_HAS_LBT
|
||||
STACK_FRAME_NON_STANDARD _restore_fp
|
||||
#ifdef CONFIG_CPU_HAS_LSX
|
||||
STACK_FRAME_NON_STANDARD _restore_lsx
|
||||
#endif
|
||||
#ifdef CONFIG_CPU_HAS_LASX
|
||||
STACK_FRAME_NON_STANDARD _restore_lasx
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -102,9 +102,6 @@ void __init init_IRQ(void)
|
||||
mp_ops.init_ipi();
|
||||
#endif
|
||||
|
||||
for (i = 0; i < NR_IRQS; i++)
|
||||
irq_set_noprobe(i);
|
||||
|
||||
for_each_possible_cpu(i) {
|
||||
page = alloc_pages_node(cpu_to_node(i), GFP_KERNEL, order);
|
||||
|
||||
|
||||
@@ -277,6 +277,10 @@ SYM_DATA(kvm_enter_guest_size, .quad kvm_enter_guest_end - kvm_enter_guest)
|
||||
|
||||
#ifdef CONFIG_CPU_HAS_LBT
|
||||
STACK_FRAME_NON_STANDARD kvm_restore_fpu
|
||||
#ifdef CONFIG_CPU_HAS_LSX
|
||||
STACK_FRAME_NON_STANDARD kvm_restore_lsx
|
||||
#endif
|
||||
#ifdef CONFIG_CPU_HAS_LASX
|
||||
STACK_FRAME_NON_STANDARD kvm_restore_lasx
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -188,10 +188,3 @@ void kvm_save_timer(struct kvm_vcpu *vcpu)
|
||||
kvm_save_hw_gcsr(csr, LOONGARCH_CSR_ESTAT);
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
void kvm_reset_timer(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
write_gcsr_timercfg(0);
|
||||
kvm_write_sw_gcsr(vcpu->arch.csr, LOONGARCH_CSR_TCFG, 0);
|
||||
hrtimer_cancel(&vcpu->arch.swtimer);
|
||||
}
|
||||
|
||||
@@ -647,7 +647,7 @@ static int kvm_set_one_reg(struct kvm_vcpu *vcpu,
|
||||
vcpu->kvm->arch.time_offset = (signed long)(v - drdtime());
|
||||
break;
|
||||
case KVM_REG_LOONGARCH_VCPU_RESET:
|
||||
kvm_reset_timer(vcpu);
|
||||
vcpu->arch.st.guest_addr = 0;
|
||||
memset(&vcpu->arch.irq_pending, 0, sizeof(vcpu->arch.irq_pending));
|
||||
memset(&vcpu->arch.irq_clear, 0, sizeof(vcpu->arch.irq_clear));
|
||||
break;
|
||||
|
||||
@@ -193,11 +193,6 @@ asmlinkage void __init mmu_init(void)
|
||||
{
|
||||
unsigned int kstart, ksize;
|
||||
|
||||
if (!memblock.reserved.cnt) {
|
||||
pr_emerg("Error memory count\n");
|
||||
machine_restart(NULL);
|
||||
}
|
||||
|
||||
if ((u32) memblock.memory.regions[0].size < 0x400000) {
|
||||
pr_emerg("Memory must be greater than 4MB\n");
|
||||
machine_restart(NULL);
|
||||
|
||||
@@ -303,13 +303,6 @@ int r4k_clockevent_init(void)
|
||||
if (!c0_compare_int_usable())
|
||||
return -ENXIO;
|
||||
|
||||
/*
|
||||
* With vectored interrupts things are getting platform specific.
|
||||
* get_c0_compare_int is a hook to allow a platform to return the
|
||||
* interrupt number of its liking.
|
||||
*/
|
||||
irq = get_c0_compare_int();
|
||||
|
||||
cd = &per_cpu(mips_clockevent_device, cpu);
|
||||
|
||||
cd->name = "MIPS";
|
||||
@@ -320,7 +313,6 @@ int r4k_clockevent_init(void)
|
||||
min_delta = calculate_min_delta();
|
||||
|
||||
cd->rating = 300;
|
||||
cd->irq = irq;
|
||||
cd->cpumask = cpumask_of(cpu);
|
||||
cd->set_next_event = mips_next_event;
|
||||
cd->event_handler = mips_event_handler;
|
||||
@@ -332,6 +324,13 @@ int r4k_clockevent_init(void)
|
||||
|
||||
cp0_timer_irq_installed = 1;
|
||||
|
||||
/*
|
||||
* With vectored interrupts things are getting platform specific.
|
||||
* get_c0_compare_int is a hook to allow a platform to return the
|
||||
* interrupt number of its liking.
|
||||
*/
|
||||
irq = get_c0_compare_int();
|
||||
|
||||
if (request_irq(irq, c0_compare_interrupt, flags, "timer",
|
||||
c0_compare_interrupt))
|
||||
pr_err("Failed to request irq %d (timer)\n", irq);
|
||||
|
||||
@@ -1724,12 +1724,16 @@ static inline void cpu_probe_loongson(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
c->ases |= (MIPS_ASE_LOONGSON_MMI | MIPS_ASE_LOONGSON_CAM |
|
||||
MIPS_ASE_LOONGSON_EXT | MIPS_ASE_LOONGSON_EXT2);
|
||||
c->ases &= ~MIPS_ASE_VZ; /* VZ of Loongson-3A2000/3000 is incomplete */
|
||||
change_c0_config6(LOONGSON_CONF6_EXTIMER | LOONGSON_CONF6_INTIMER,
|
||||
LOONGSON_CONF6_INTIMER);
|
||||
break;
|
||||
case PRID_IMP_LOONGSON_64G:
|
||||
__cpu_name[cpu] = "ICT Loongson-3";
|
||||
set_elf_platform(cpu, "loongson3a");
|
||||
set_isa(c, MIPS_CPU_ISA_M64R2);
|
||||
decode_cpucfg(c);
|
||||
change_c0_config6(LOONGSON_CONF6_EXTIMER | LOONGSON_CONF6_INTIMER,
|
||||
LOONGSON_CONF6_INTIMER);
|
||||
break;
|
||||
default:
|
||||
panic("Unknown Loongson Processor ID!");
|
||||
|
||||
@@ -21,9 +21,7 @@ static struct clocksource clocksource_mips = {
|
||||
.name = "MIPS",
|
||||
.read = c0_hpt_read,
|
||||
.mask = CLOCKSOURCE_MASK(32),
|
||||
.flags = CLOCK_SOURCE_IS_CONTINUOUS |
|
||||
CLOCK_SOURCE_MUST_VERIFY |
|
||||
CLOCK_SOURCE_VERIFY_PERCPU,
|
||||
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
||||
};
|
||||
|
||||
static u64 __maybe_unused notrace r4k_read_sched_clock(void)
|
||||
|
||||
@@ -604,6 +604,19 @@ config RANDOMIZE_BASE
|
||||
as a security feature that deters exploit attempts relying on
|
||||
knowledge of the location of kernel internals.
|
||||
|
||||
config RANDOMIZE_IDENTITY_BASE
|
||||
bool "Randomize the address of the identity mapping base"
|
||||
depends on RANDOMIZE_BASE
|
||||
default DEBUG_VM
|
||||
help
|
||||
The identity mapping base address is pinned to zero by default.
|
||||
Allow randomization of that base to expose otherwise missed
|
||||
notion of physical and virtual addresses of data structures.
|
||||
That does not have any impact on the base address at which the
|
||||
kernel image is loaded.
|
||||
|
||||
If unsure, say N
|
||||
|
||||
config KERNEL_IMAGE_BASE
|
||||
hex "Kernel image base address"
|
||||
range 0x100000 0x1FFFFFE0000000 if !KASAN
|
||||
|
||||
+32
-26
@@ -162,7 +162,7 @@ static void kaslr_adjust_relocs(unsigned long min_addr, unsigned long max_addr,
|
||||
loc = (long)*reloc + phys_offset;
|
||||
if (loc < min_addr || loc > max_addr)
|
||||
error("64-bit relocation outside of kernel!\n");
|
||||
*(u64 *)loc += offset - __START_KERNEL;
|
||||
*(u64 *)loc += offset;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ static void kaslr_adjust_got(unsigned long offset)
|
||||
*/
|
||||
for (entry = (u64 *)vmlinux.got_start; entry < (u64 *)vmlinux.got_end; entry++) {
|
||||
if (*entry)
|
||||
*entry += offset - __START_KERNEL;
|
||||
*entry += offset;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ static unsigned long setup_kernel_memory_layout(unsigned long kernel_size)
|
||||
vmemmap_size = SECTION_ALIGN_UP(pages) * sizeof(struct page);
|
||||
|
||||
/* choose kernel address space layout: 4 or 3 levels. */
|
||||
BUILD_BUG_ON(!IS_ALIGNED(__START_KERNEL, THREAD_SIZE));
|
||||
BUILD_BUG_ON(!IS_ALIGNED(TEXT_OFFSET, THREAD_SIZE));
|
||||
BUILD_BUG_ON(!IS_ALIGNED(__NO_KASLR_START_KERNEL, THREAD_SIZE));
|
||||
BUILD_BUG_ON(__NO_KASLR_END_KERNEL > _REGION1_SIZE);
|
||||
vsize = get_vmem_size(ident_map_size, vmemmap_size, vmalloc_size, _REGION3_SIZE);
|
||||
@@ -341,7 +341,8 @@ static unsigned long setup_kernel_memory_layout(unsigned long kernel_size)
|
||||
BUILD_BUG_ON(MAX_DCSS_ADDR > (1UL << MAX_PHYSMEM_BITS));
|
||||
max_mappable = max(ident_map_size, MAX_DCSS_ADDR);
|
||||
max_mappable = min(max_mappable, vmemmap_start);
|
||||
__identity_base = round_down(vmemmap_start - max_mappable, rte_size);
|
||||
if (IS_ENABLED(CONFIG_RANDOMIZE_IDENTITY_BASE))
|
||||
__identity_base = round_down(vmemmap_start - max_mappable, rte_size);
|
||||
|
||||
return asce_limit;
|
||||
}
|
||||
@@ -388,31 +389,25 @@ static void kaslr_adjust_vmlinux_info(long offset)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void fixup_vmlinux_info(void)
|
||||
{
|
||||
vmlinux.entry -= __START_KERNEL;
|
||||
kaslr_adjust_vmlinux_info(-__START_KERNEL);
|
||||
}
|
||||
|
||||
void startup_kernel(void)
|
||||
{
|
||||
unsigned long kernel_size = vmlinux.image_size + vmlinux.bss_size;
|
||||
unsigned long nokaslr_offset_phys, kaslr_large_page_offset;
|
||||
unsigned long amode31_lma = 0;
|
||||
unsigned long vmlinux_size = vmlinux.image_size + vmlinux.bss_size;
|
||||
unsigned long nokaslr_text_lma, text_lma = 0, amode31_lma = 0;
|
||||
unsigned long kernel_size = TEXT_OFFSET + vmlinux_size;
|
||||
unsigned long kaslr_large_page_offset;
|
||||
unsigned long max_physmem_end;
|
||||
unsigned long asce_limit;
|
||||
unsigned long safe_addr;
|
||||
psw_t psw;
|
||||
|
||||
fixup_vmlinux_info();
|
||||
setup_lpp();
|
||||
|
||||
/*
|
||||
* Non-randomized kernel physical start address must be _SEGMENT_SIZE
|
||||
* aligned (see blow).
|
||||
*/
|
||||
nokaslr_offset_phys = ALIGN(mem_safe_offset(), _SEGMENT_SIZE);
|
||||
safe_addr = PAGE_ALIGN(nokaslr_offset_phys + kernel_size);
|
||||
nokaslr_text_lma = ALIGN(mem_safe_offset(), _SEGMENT_SIZE);
|
||||
safe_addr = PAGE_ALIGN(nokaslr_text_lma + vmlinux_size);
|
||||
|
||||
/*
|
||||
* Reserve decompressor memory together with decompression heap,
|
||||
@@ -456,16 +451,27 @@ void startup_kernel(void)
|
||||
*/
|
||||
kaslr_large_page_offset = __kaslr_offset & ~_SEGMENT_MASK;
|
||||
if (kaslr_enabled()) {
|
||||
unsigned long end = ident_map_size - kaslr_large_page_offset;
|
||||
unsigned long size = vmlinux_size + kaslr_large_page_offset;
|
||||
|
||||
__kaslr_offset_phys = randomize_within_range(kernel_size, _SEGMENT_SIZE, 0, end);
|
||||
text_lma = randomize_within_range(size, _SEGMENT_SIZE, TEXT_OFFSET, ident_map_size);
|
||||
}
|
||||
if (!__kaslr_offset_phys)
|
||||
__kaslr_offset_phys = nokaslr_offset_phys;
|
||||
__kaslr_offset_phys |= kaslr_large_page_offset;
|
||||
if (!text_lma)
|
||||
text_lma = nokaslr_text_lma;
|
||||
text_lma |= kaslr_large_page_offset;
|
||||
|
||||
/*
|
||||
* [__kaslr_offset_phys..__kaslr_offset_phys + TEXT_OFFSET] region is
|
||||
* never accessed via the kernel image mapping as per the linker script:
|
||||
*
|
||||
* . = TEXT_OFFSET;
|
||||
*
|
||||
* Therefore, this region could be used for something else and does
|
||||
* not need to be reserved. See how it is skipped in setup_vmem().
|
||||
*/
|
||||
__kaslr_offset_phys = text_lma - TEXT_OFFSET;
|
||||
kaslr_adjust_vmlinux_info(__kaslr_offset_phys);
|
||||
physmem_reserve(RR_VMLINUX, __kaslr_offset_phys, kernel_size);
|
||||
deploy_kernel((void *)__kaslr_offset_phys);
|
||||
physmem_reserve(RR_VMLINUX, text_lma, vmlinux_size);
|
||||
deploy_kernel((void *)text_lma);
|
||||
|
||||
/* vmlinux decompression is done, shrink reserved low memory */
|
||||
physmem_reserve(RR_DECOMPRESSOR, 0, (unsigned long)_decompressor_end);
|
||||
@@ -488,7 +494,7 @@ void startup_kernel(void)
|
||||
amode31_lma = randomize_within_range(vmlinux.amode31_size, PAGE_SIZE, amode31_min, SZ_2G);
|
||||
}
|
||||
if (!amode31_lma)
|
||||
amode31_lma = __kaslr_offset_phys - vmlinux.amode31_size;
|
||||
amode31_lma = text_lma - vmlinux.amode31_size;
|
||||
physmem_reserve(RR_AMODE31, amode31_lma, vmlinux.amode31_size);
|
||||
|
||||
/*
|
||||
@@ -504,8 +510,8 @@ void startup_kernel(void)
|
||||
* - copy_bootdata() must follow setup_vmem() to propagate changes
|
||||
* to bootdata made by setup_vmem()
|
||||
*/
|
||||
clear_bss_section(__kaslr_offset_phys);
|
||||
kaslr_adjust_relocs(__kaslr_offset_phys, __kaslr_offset_phys + vmlinux.image_size,
|
||||
clear_bss_section(text_lma);
|
||||
kaslr_adjust_relocs(text_lma, text_lma + vmlinux.image_size,
|
||||
__kaslr_offset, __kaslr_offset_phys);
|
||||
kaslr_adjust_got(__kaslr_offset);
|
||||
setup_vmem(__kaslr_offset, __kaslr_offset + kernel_size, asce_limit);
|
||||
|
||||
+12
-2
@@ -90,7 +90,7 @@ static void kasan_populate_shadow(unsigned long kernel_start, unsigned long kern
|
||||
}
|
||||
memgap_start = end;
|
||||
}
|
||||
kasan_populate(kernel_start, kernel_end, POPULATE_KASAN_MAP_SHADOW);
|
||||
kasan_populate(kernel_start + TEXT_OFFSET, kernel_end, POPULATE_KASAN_MAP_SHADOW);
|
||||
kasan_populate(0, (unsigned long)__identity_va(0), POPULATE_KASAN_ZERO_SHADOW);
|
||||
kasan_populate(AMODE31_START, AMODE31_END, POPULATE_KASAN_ZERO_SHADOW);
|
||||
if (IS_ENABLED(CONFIG_KASAN_VMALLOC)) {
|
||||
@@ -475,7 +475,17 @@ void setup_vmem(unsigned long kernel_start, unsigned long kernel_end, unsigned l
|
||||
(unsigned long)__identity_va(end),
|
||||
POPULATE_IDENTITY);
|
||||
}
|
||||
pgtable_populate(kernel_start, kernel_end, POPULATE_KERNEL);
|
||||
|
||||
/*
|
||||
* [kernel_start..kernel_start + TEXT_OFFSET] region is never
|
||||
* accessed as per the linker script:
|
||||
*
|
||||
* . = TEXT_OFFSET;
|
||||
*
|
||||
* Therefore, skip mapping TEXT_OFFSET bytes to prevent access to
|
||||
* [__kaslr_offset_phys..__kaslr_offset_phys + TEXT_OFFSET] region.
|
||||
*/
|
||||
pgtable_populate(kernel_start + TEXT_OFFSET, kernel_end, POPULATE_KERNEL);
|
||||
pgtable_populate(AMODE31_START, AMODE31_END, POPULATE_DIRECT);
|
||||
pgtable_populate(__abs_lowcore, __abs_lowcore + sizeof(struct lowcore),
|
||||
POPULATE_ABS_LOWCORE);
|
||||
|
||||
@@ -109,7 +109,12 @@ SECTIONS
|
||||
#ifdef CONFIG_KERNEL_UNCOMPRESSED
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
. += AMODE31_SIZE; /* .amode31 section */
|
||||
. = ALIGN(1 << 20); /* _SEGMENT_SIZE */
|
||||
|
||||
/*
|
||||
* Make sure the location counter is not less than TEXT_OFFSET.
|
||||
* _SEGMENT_SIZE is not available, use ALIGN(1 << 20) instead.
|
||||
*/
|
||||
. = MAX(TEXT_OFFSET, ALIGN(1 << 20));
|
||||
#else
|
||||
. = ALIGN(8);
|
||||
#endif
|
||||
|
||||
@@ -279,8 +279,9 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
|
||||
#define AMODE31_SIZE (3 * PAGE_SIZE)
|
||||
|
||||
#define KERNEL_IMAGE_SIZE (512 * 1024 * 1024)
|
||||
#define __START_KERNEL 0x100000
|
||||
#define __NO_KASLR_START_KERNEL CONFIG_KERNEL_IMAGE_BASE
|
||||
#define __NO_KASLR_END_KERNEL (__NO_KASLR_START_KERNEL + KERNEL_IMAGE_SIZE)
|
||||
|
||||
#define TEXT_OFFSET 0x100000
|
||||
|
||||
#endif /* _S390_PAGE_H */
|
||||
|
||||
@@ -734,7 +734,23 @@ static void __init memblock_add_physmem_info(void)
|
||||
}
|
||||
|
||||
/*
|
||||
* Reserve memory used for lowcore/command line/kernel image.
|
||||
* Reserve memory used for lowcore.
|
||||
*/
|
||||
static void __init reserve_lowcore(void)
|
||||
{
|
||||
void *lowcore_start = get_lowcore();
|
||||
void *lowcore_end = lowcore_start + sizeof(struct lowcore);
|
||||
void *start, *end;
|
||||
|
||||
if ((void *)__identity_base < lowcore_end) {
|
||||
start = max(lowcore_start, (void *)__identity_base);
|
||||
end = min(lowcore_end, (void *)(__identity_base + ident_map_size));
|
||||
memblock_reserve(__pa(start), __pa(end));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Reserve memory used for absolute lowcore/command line/kernel image.
|
||||
*/
|
||||
static void __init reserve_kernel(void)
|
||||
{
|
||||
@@ -918,6 +934,7 @@ void __init setup_arch(char **cmdline_p)
|
||||
|
||||
/* Do some memory reservations *before* memory is added to memblock */
|
||||
reserve_pgtables();
|
||||
reserve_lowcore();
|
||||
reserve_kernel();
|
||||
reserve_initrd();
|
||||
reserve_certificate_list();
|
||||
|
||||
@@ -39,7 +39,7 @@ PHDRS {
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = __START_KERNEL;
|
||||
. = TEXT_OFFSET;
|
||||
.text : {
|
||||
_stext = .; /* Start of text section */
|
||||
_text = .; /* Text and read-only data */
|
||||
|
||||
@@ -280,7 +280,7 @@ static int do_reloc(struct section *sec, Elf_Rel *rel)
|
||||
case R_390_GOTOFF64:
|
||||
break;
|
||||
case R_390_64:
|
||||
add_reloc(&relocs64, offset - ehdr.e_entry);
|
||||
add_reloc(&relocs64, offset);
|
||||
break;
|
||||
default:
|
||||
die("Unsupported relocation type: %d\n", r_type);
|
||||
|
||||
+17
-6
@@ -111,13 +111,20 @@ static sector_t bio_write_zeroes_limit(struct block_device *bdev)
|
||||
(UINT_MAX >> SECTOR_SHIFT) & ~bs_mask);
|
||||
}
|
||||
|
||||
/*
|
||||
* There is no reliable way for the SCSI subsystem to determine whether a
|
||||
* device supports a WRITE SAME operation without actually performing a write
|
||||
* to media. As a result, write_zeroes is enabled by default and will be
|
||||
* disabled if a zeroing operation subsequently fails. This means that this
|
||||
* queue limit is likely to change at runtime.
|
||||
*/
|
||||
static void __blkdev_issue_write_zeroes(struct block_device *bdev,
|
||||
sector_t sector, sector_t nr_sects, gfp_t gfp_mask,
|
||||
struct bio **biop, unsigned flags)
|
||||
struct bio **biop, unsigned flags, sector_t limit)
|
||||
{
|
||||
|
||||
while (nr_sects) {
|
||||
unsigned int len = min_t(sector_t, nr_sects,
|
||||
bio_write_zeroes_limit(bdev));
|
||||
unsigned int len = min(nr_sects, limit);
|
||||
struct bio *bio;
|
||||
|
||||
if ((flags & BLKDEV_ZERO_KILLABLE) &&
|
||||
@@ -141,12 +148,14 @@ static void __blkdev_issue_write_zeroes(struct block_device *bdev,
|
||||
static int blkdev_issue_write_zeroes(struct block_device *bdev, sector_t sector,
|
||||
sector_t nr_sects, gfp_t gfp, unsigned flags)
|
||||
{
|
||||
sector_t limit = bio_write_zeroes_limit(bdev);
|
||||
struct bio *bio = NULL;
|
||||
struct blk_plug plug;
|
||||
int ret = 0;
|
||||
|
||||
blk_start_plug(&plug);
|
||||
__blkdev_issue_write_zeroes(bdev, sector, nr_sects, gfp, &bio, flags);
|
||||
__blkdev_issue_write_zeroes(bdev, sector, nr_sects, gfp, &bio,
|
||||
flags, limit);
|
||||
if (bio) {
|
||||
if ((flags & BLKDEV_ZERO_KILLABLE) &&
|
||||
fatal_signal_pending(current)) {
|
||||
@@ -265,12 +274,14 @@ int __blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
|
||||
sector_t nr_sects, gfp_t gfp_mask, struct bio **biop,
|
||||
unsigned flags)
|
||||
{
|
||||
sector_t limit = bio_write_zeroes_limit(bdev);
|
||||
|
||||
if (bdev_read_only(bdev))
|
||||
return -EPERM;
|
||||
|
||||
if (bdev_write_zeroes_sectors(bdev)) {
|
||||
if (limit) {
|
||||
__blkdev_issue_write_zeroes(bdev, sector, nr_sects,
|
||||
gfp_mask, biop, flags);
|
||||
gfp_mask, biop, flags, limit);
|
||||
} else {
|
||||
if (flags & BLKDEV_ZERO_NOFALLBACK)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include <stdio.h>
|
||||
#include <libgen.h>
|
||||
#include <string.h>
|
||||
#include <linux/version.h>
|
||||
#include <ctype.h>
|
||||
#include "utils.h"
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include <stdio.h>
|
||||
#include <libgen.h>
|
||||
#include <string.h>
|
||||
#include <linux/version.h>
|
||||
#include <ctype.h>
|
||||
#include "utils.h"
|
||||
|
||||
|
||||
@@ -54,6 +54,8 @@ static void acpi_video_parse_cmdline(void)
|
||||
acpi_backlight_cmdline = acpi_backlight_nvidia_wmi_ec;
|
||||
if (!strcmp("apple_gmux", acpi_video_backlight_string))
|
||||
acpi_backlight_cmdline = acpi_backlight_apple_gmux;
|
||||
if (!strcmp("dell_uart", acpi_video_backlight_string))
|
||||
acpi_backlight_cmdline = acpi_backlight_dell_uart;
|
||||
if (!strcmp("none", acpi_video_backlight_string))
|
||||
acpi_backlight_cmdline = acpi_backlight_none;
|
||||
}
|
||||
@@ -821,6 +823,21 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
|
||||
},
|
||||
},
|
||||
|
||||
/*
|
||||
* Dell AIO (All in Ones) which advertise an UART attached backlight
|
||||
* controller board in their ACPI tables (and may even have one), but
|
||||
* which need native backlight control nevertheless.
|
||||
*/
|
||||
{
|
||||
/* https://bugzilla.redhat.com/show_bug.cgi?id=2303936 */
|
||||
.callback = video_detect_force_native,
|
||||
/* Dell OptiPlex 7760 AIO */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 7760 AIO"),
|
||||
},
|
||||
},
|
||||
|
||||
/*
|
||||
* Models which have nvidia-ec-wmi support, but should not use it.
|
||||
* Note this indicates a likely firmware bug on these models and should
|
||||
@@ -918,6 +935,7 @@ enum acpi_backlight_type __acpi_video_get_backlight_type(bool native, bool *auto
|
||||
static DEFINE_MUTEX(init_mutex);
|
||||
static bool nvidia_wmi_ec_present;
|
||||
static bool apple_gmux_present;
|
||||
static bool dell_uart_present;
|
||||
static bool native_available;
|
||||
static bool init_done;
|
||||
static long video_caps;
|
||||
@@ -932,6 +950,7 @@ enum acpi_backlight_type __acpi_video_get_backlight_type(bool native, bool *auto
|
||||
&video_caps, NULL);
|
||||
nvidia_wmi_ec_present = nvidia_wmi_ec_supported();
|
||||
apple_gmux_present = apple_gmux_detect(NULL, NULL);
|
||||
dell_uart_present = acpi_dev_present("DELL0501", NULL, -1);
|
||||
init_done = true;
|
||||
}
|
||||
if (native)
|
||||
@@ -962,6 +981,9 @@ enum acpi_backlight_type __acpi_video_get_backlight_type(bool native, bool *auto
|
||||
if (apple_gmux_present)
|
||||
return acpi_backlight_apple_gmux;
|
||||
|
||||
if (dell_uart_present)
|
||||
return acpi_backlight_dell_uart;
|
||||
|
||||
/* Use ACPI video if available, except when native should be preferred. */
|
||||
if ((video_caps & ACPI_VIDEO_BACKLIGHT) &&
|
||||
!(native_available && prefer_native_over_acpi_video()))
|
||||
|
||||
+20
-10
@@ -208,6 +208,19 @@ static const char* macio_ata_names[] = {
|
||||
/* Don't let a DMA segment go all the way to 64K */
|
||||
#define MAX_DBDMA_SEG 0xff00
|
||||
|
||||
#ifdef CONFIG_PAGE_SIZE_64KB
|
||||
/*
|
||||
* The SCSI core requires the segment size to cover at least a page, so
|
||||
* for 64K page size kernels it must be at least 64K. However the
|
||||
* hardware can't handle 64K, so pata_macio_qc_prep() will split large
|
||||
* requests. To handle the split requests the tablesize must be halved.
|
||||
*/
|
||||
#define PATA_MACIO_MAX_SEGMENT_SIZE SZ_64K
|
||||
#define PATA_MACIO_SG_TABLESIZE (MAX_DCMDS / 2)
|
||||
#else
|
||||
#define PATA_MACIO_MAX_SEGMENT_SIZE MAX_DBDMA_SEG
|
||||
#define PATA_MACIO_SG_TABLESIZE MAX_DCMDS
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Wait 1s for disk to answer on IDE bus after a hard reset
|
||||
@@ -541,7 +554,8 @@ static enum ata_completion_errors pata_macio_qc_prep(struct ata_queued_cmd *qc)
|
||||
|
||||
while (sg_len) {
|
||||
/* table overflow should never happen */
|
||||
BUG_ON (pi++ >= MAX_DCMDS);
|
||||
if (WARN_ON_ONCE(pi >= MAX_DCMDS))
|
||||
return AC_ERR_SYSTEM;
|
||||
|
||||
len = (sg_len < MAX_DBDMA_SEG) ? sg_len : MAX_DBDMA_SEG;
|
||||
table->command = cpu_to_le16(write ? OUTPUT_MORE: INPUT_MORE);
|
||||
@@ -553,11 +567,13 @@ static enum ata_completion_errors pata_macio_qc_prep(struct ata_queued_cmd *qc)
|
||||
addr += len;
|
||||
sg_len -= len;
|
||||
++table;
|
||||
++pi;
|
||||
}
|
||||
}
|
||||
|
||||
/* Should never happen according to Tejun */
|
||||
BUG_ON(!pi);
|
||||
if (WARN_ON_ONCE(!pi))
|
||||
return AC_ERR_SYSTEM;
|
||||
|
||||
/* Convert the last command to an input/output */
|
||||
table--;
|
||||
@@ -912,16 +928,10 @@ static int pata_macio_do_resume(struct pata_macio_priv *priv)
|
||||
|
||||
static const struct scsi_host_template pata_macio_sht = {
|
||||
__ATA_BASE_SHT(DRV_NAME),
|
||||
.sg_tablesize = MAX_DCMDS,
|
||||
.sg_tablesize = PATA_MACIO_SG_TABLESIZE,
|
||||
/* We may not need that strict one */
|
||||
.dma_boundary = ATA_DMA_BOUNDARY,
|
||||
/*
|
||||
* The SCSI core requires the segment size to cover at least a page, so
|
||||
* for 64K page size kernels this must be at least 64K. However the
|
||||
* hardware can't handle 64K, so pata_macio_qc_prep() will split large
|
||||
* requests.
|
||||
*/
|
||||
.max_segment_size = SZ_64K,
|
||||
.max_segment_size = PATA_MACIO_MAX_SEGMENT_SIZE,
|
||||
.device_configure = pata_macio_device_configure,
|
||||
.sdev_groups = ata_common_sdev_groups,
|
||||
.can_queue = ATA_DEF_QUEUE,
|
||||
|
||||
+124
-10
@@ -12,6 +12,7 @@
|
||||
#include <linux/acpi.h>
|
||||
#include <acpi/acpi_bus.h>
|
||||
#include <asm/unaligned.h>
|
||||
#include <linux/efi.h>
|
||||
|
||||
#include <net/bluetooth/bluetooth.h>
|
||||
#include <net/bluetooth/hci_core.h>
|
||||
@@ -26,6 +27,8 @@
|
||||
#define ECDSA_OFFSET 644
|
||||
#define ECDSA_HEADER_LEN 320
|
||||
|
||||
#define BTINTEL_EFI_DSBR L"UefiCnvCommonDSBR"
|
||||
|
||||
enum {
|
||||
DSM_SET_WDISABLE2_DELAY = 1,
|
||||
DSM_SET_RESET_METHOD = 3,
|
||||
@@ -2616,6 +2619,120 @@ static u8 btintel_classify_pkt_type(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
return hci_skb_pkt_type(skb);
|
||||
}
|
||||
|
||||
/*
|
||||
* UefiCnvCommonDSBR UEFI variable provides information from the OEM platforms
|
||||
* if they have replaced the BRI (Bluetooth Radio Interface) resistor to
|
||||
* overcome the potential STEP errors on their designs. Based on the
|
||||
* configauration, bluetooth firmware shall adjust the BRI response line drive
|
||||
* strength. The below structure represents DSBR data.
|
||||
* struct {
|
||||
* u8 header;
|
||||
* u32 dsbr;
|
||||
* } __packed;
|
||||
*
|
||||
* header - defines revision number of the structure
|
||||
* dsbr - defines drive strength BRI response
|
||||
* bit0
|
||||
* 0 - instructs bluetooth firmware to use default values
|
||||
* 1 - instructs bluetooth firmware to override default values
|
||||
* bit3:1
|
||||
* Reserved
|
||||
* bit7:4
|
||||
* DSBR override values (only if bit0 is set. Default value is 0xF
|
||||
* bit31:7
|
||||
* Reserved
|
||||
* Expected values for dsbr field:
|
||||
* 1. 0xF1 - indicates that the resistor on board is 33 Ohm
|
||||
* 2. 0x00 or 0xB1 - indicates that the resistor on board is 10 Ohm
|
||||
* 3. Non existing UEFI variable or invalid (none of the above) - indicates
|
||||
* that the resistor on board is 10 Ohm
|
||||
* Even if uefi variable is not present, driver shall send 0xfc0a command to
|
||||
* firmware to use default values.
|
||||
*
|
||||
*/
|
||||
static int btintel_uefi_get_dsbr(u32 *dsbr_var)
|
||||
{
|
||||
struct btintel_dsbr {
|
||||
u8 header;
|
||||
u32 dsbr;
|
||||
} __packed data;
|
||||
|
||||
efi_status_t status;
|
||||
unsigned long data_size = 0;
|
||||
efi_guid_t guid = EFI_GUID(0xe65d8884, 0xd4af, 0x4b20, 0x8d, 0x03,
|
||||
0x77, 0x2e, 0xcc, 0x3d, 0xa5, 0x31);
|
||||
|
||||
if (!IS_ENABLED(CONFIG_EFI))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (!efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
status = efi.get_variable(BTINTEL_EFI_DSBR, &guid, NULL, &data_size,
|
||||
NULL);
|
||||
|
||||
if (status != EFI_BUFFER_TOO_SMALL || !data_size)
|
||||
return -EIO;
|
||||
|
||||
status = efi.get_variable(BTINTEL_EFI_DSBR, &guid, NULL, &data_size,
|
||||
&data);
|
||||
|
||||
if (status != EFI_SUCCESS)
|
||||
return -ENXIO;
|
||||
|
||||
*dsbr_var = data.dsbr;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int btintel_set_dsbr(struct hci_dev *hdev, struct intel_version_tlv *ver)
|
||||
{
|
||||
struct btintel_dsbr_cmd {
|
||||
u8 enable;
|
||||
u8 dsbr;
|
||||
} __packed;
|
||||
|
||||
struct btintel_dsbr_cmd cmd;
|
||||
struct sk_buff *skb;
|
||||
u8 status;
|
||||
u32 dsbr;
|
||||
bool apply_dsbr;
|
||||
int err;
|
||||
|
||||
/* DSBR command needs to be sent for BlazarI + B0 step product after
|
||||
* downloading IML image.
|
||||
*/
|
||||
apply_dsbr = (ver->img_type == BTINTEL_IMG_IML &&
|
||||
((ver->cnvi_top & 0xfff) == BTINTEL_CNVI_BLAZARI) &&
|
||||
INTEL_CNVX_TOP_STEP(ver->cnvi_top) == 0x01);
|
||||
|
||||
if (!apply_dsbr)
|
||||
return 0;
|
||||
|
||||
dsbr = 0;
|
||||
err = btintel_uefi_get_dsbr(&dsbr);
|
||||
if (err < 0)
|
||||
bt_dev_dbg(hdev, "Error reading efi: %ls (%d)",
|
||||
BTINTEL_EFI_DSBR, err);
|
||||
|
||||
cmd.enable = dsbr & BIT(0);
|
||||
cmd.dsbr = dsbr >> 4 & 0xF;
|
||||
|
||||
bt_dev_info(hdev, "dsbr: enable: 0x%2.2x value: 0x%2.2x", cmd.enable,
|
||||
cmd.dsbr);
|
||||
|
||||
skb = __hci_cmd_sync(hdev, 0xfc0a, sizeof(cmd), &cmd, HCI_CMD_TIMEOUT);
|
||||
if (IS_ERR(skb))
|
||||
return -bt_to_errno(PTR_ERR(skb));
|
||||
|
||||
status = skb->data[0];
|
||||
kfree_skb(skb);
|
||||
|
||||
if (status)
|
||||
return -bt_to_errno(status);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int btintel_bootloader_setup_tlv(struct hci_dev *hdev,
|
||||
struct intel_version_tlv *ver)
|
||||
{
|
||||
@@ -2650,6 +2767,13 @@ int btintel_bootloader_setup_tlv(struct hci_dev *hdev,
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* set drive strength of BRI response */
|
||||
err = btintel_set_dsbr(hdev, ver);
|
||||
if (err) {
|
||||
bt_dev_err(hdev, "Failed to send dsbr command (%d)", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
/* If image type returned is BTINTEL_IMG_IML, then controller supports
|
||||
* intermediate loader image
|
||||
*/
|
||||
@@ -2945,9 +3069,6 @@ static int btintel_setup_combined(struct hci_dev *hdev)
|
||||
INTEL_ROM_LEGACY_NO_WBS_SUPPORT))
|
||||
set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED,
|
||||
&hdev->quirks);
|
||||
if (ver.hw_variant == 0x08 && ver.fw_variant == 0x22)
|
||||
set_bit(HCI_QUIRK_VALID_LE_STATES,
|
||||
&hdev->quirks);
|
||||
|
||||
err = btintel_legacy_rom_setup(hdev, &ver);
|
||||
break;
|
||||
@@ -2956,7 +3077,6 @@ static int btintel_setup_combined(struct hci_dev *hdev)
|
||||
case 0x12: /* ThP */
|
||||
case 0x13: /* HrP */
|
||||
case 0x14: /* CcP */
|
||||
set_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks);
|
||||
fallthrough;
|
||||
case 0x0c: /* WsP */
|
||||
/* Apply the device specific HCI quirks
|
||||
@@ -3048,9 +3168,6 @@ static int btintel_setup_combined(struct hci_dev *hdev)
|
||||
/* These variants don't seem to support LE Coded PHY */
|
||||
set_bit(HCI_QUIRK_BROKEN_LE_CODED, &hdev->quirks);
|
||||
|
||||
/* Set Valid LE States quirk */
|
||||
set_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks);
|
||||
|
||||
/* Setup MSFT Extension support */
|
||||
btintel_set_msft_opcode(hdev, ver.hw_variant);
|
||||
|
||||
@@ -3076,9 +3193,6 @@ static int btintel_setup_combined(struct hci_dev *hdev)
|
||||
*/
|
||||
set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, &hdev->quirks);
|
||||
|
||||
/* Apply LE States quirk from solar onwards */
|
||||
set_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks);
|
||||
|
||||
/* Setup MSFT Extension support */
|
||||
btintel_set_msft_opcode(hdev,
|
||||
INTEL_HW_VARIANT(ver_tlv.cnvi_bt));
|
||||
|
||||
@@ -1180,9 +1180,6 @@ static int btintel_pcie_setup(struct hci_dev *hdev)
|
||||
*/
|
||||
set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, &hdev->quirks);
|
||||
|
||||
/* Apply LE States quirk from solar onwards */
|
||||
set_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks);
|
||||
|
||||
/* Setup MSFT Extension support */
|
||||
btintel_set_msft_opcode(hdev,
|
||||
INTEL_HW_VARIANT(ver_tlv.cnvi_bt));
|
||||
|
||||
@@ -1148,9 +1148,6 @@ static int btmtksdio_setup(struct hci_dev *hdev)
|
||||
}
|
||||
}
|
||||
|
||||
/* Valid LE States quirk for MediaTek 7921 */
|
||||
set_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks);
|
||||
|
||||
break;
|
||||
case 0x7663:
|
||||
case 0x7668:
|
||||
|
||||
@@ -449,6 +449,23 @@ static bool ps_wakeup(struct btnxpuart_dev *nxpdev)
|
||||
return false;
|
||||
}
|
||||
|
||||
static void ps_cleanup(struct btnxpuart_dev *nxpdev)
|
||||
{
|
||||
struct ps_data *psdata = &nxpdev->psdata;
|
||||
u8 ps_state;
|
||||
|
||||
mutex_lock(&psdata->ps_lock);
|
||||
ps_state = psdata->ps_state;
|
||||
mutex_unlock(&psdata->ps_lock);
|
||||
|
||||
if (ps_state != PS_STATE_AWAKE)
|
||||
ps_control(psdata->hdev, PS_STATE_AWAKE);
|
||||
|
||||
ps_cancel_timer(nxpdev);
|
||||
cancel_work_sync(&psdata->work);
|
||||
mutex_destroy(&psdata->ps_lock);
|
||||
}
|
||||
|
||||
static int send_ps_cmd(struct hci_dev *hdev, void *data)
|
||||
{
|
||||
struct btnxpuart_dev *nxpdev = hci_get_drvdata(hdev);
|
||||
@@ -1363,7 +1380,6 @@ static int btnxpuart_close(struct hci_dev *hdev)
|
||||
{
|
||||
struct btnxpuart_dev *nxpdev = hci_get_drvdata(hdev);
|
||||
|
||||
ps_wakeup(nxpdev);
|
||||
serdev_device_close(nxpdev->serdev);
|
||||
skb_queue_purge(&nxpdev->txq);
|
||||
if (!IS_ERR_OR_NULL(nxpdev->rx_skb)) {
|
||||
@@ -1516,8 +1532,8 @@ static void nxp_serdev_remove(struct serdev_device *serdev)
|
||||
nxpdev->new_baudrate = nxpdev->fw_init_baudrate;
|
||||
nxp_set_baudrate_cmd(hdev, NULL);
|
||||
}
|
||||
ps_cancel_timer(nxpdev);
|
||||
}
|
||||
ps_cleanup(nxpdev);
|
||||
hci_unregister_dev(hdev);
|
||||
hci_free_dev(hdev);
|
||||
}
|
||||
|
||||
@@ -1287,7 +1287,6 @@ void btrtl_set_quirks(struct hci_dev *hdev, struct btrtl_device_info *btrtl_dev)
|
||||
case CHIP_ID_8852C:
|
||||
case CHIP_ID_8851B:
|
||||
case CHIP_ID_8852BT:
|
||||
set_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks);
|
||||
set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, &hdev->quirks);
|
||||
|
||||
/* RTL8852C needs to transmit mSBC data continuously without
|
||||
|
||||
@@ -3956,8 +3956,8 @@ static int btusb_probe(struct usb_interface *intf,
|
||||
if (id->driver_info & BTUSB_WIDEBAND_SPEECH)
|
||||
set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, &hdev->quirks);
|
||||
|
||||
if (id->driver_info & BTUSB_VALID_LE_STATES)
|
||||
set_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks);
|
||||
if (!(id->driver_info & BTUSB_VALID_LE_STATES))
|
||||
set_bit(HCI_QUIRK_BROKEN_LE_STATES, &hdev->quirks);
|
||||
|
||||
if (id->driver_info & BTUSB_DIGIANSWER) {
|
||||
data->cmdreq_type = USB_TYPE_VENDOR;
|
||||
|
||||
@@ -2474,8 +2474,8 @@ static int qca_serdev_probe(struct serdev_device *serdev)
|
||||
set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED,
|
||||
&hdev->quirks);
|
||||
|
||||
if (data->capabilities & QCA_CAP_VALID_LE_STATES)
|
||||
set_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks);
|
||||
if (!(data->capabilities & QCA_CAP_VALID_LE_STATES))
|
||||
set_bit(HCI_QUIRK_BROKEN_LE_STATES, &hdev->quirks);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -425,8 +425,6 @@ static int __vhci_create_device(struct vhci_data *data, __u8 opcode)
|
||||
if (opcode & 0x80)
|
||||
set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks);
|
||||
|
||||
set_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks);
|
||||
|
||||
if (hci_register_dev(hdev) < 0) {
|
||||
BT_ERR("Can't register HCI device");
|
||||
hci_free_dev(hdev);
|
||||
|
||||
@@ -698,6 +698,10 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev,
|
||||
rc = tpm2_get_cc_attrs_tbl(chip);
|
||||
if (rc)
|
||||
goto init_irq_cleanup;
|
||||
|
||||
rc = tpm2_sessions_init(chip);
|
||||
if (rc)
|
||||
goto init_irq_cleanup;
|
||||
}
|
||||
|
||||
return tpm_chip_register(chip);
|
||||
|
||||
@@ -160,14 +160,17 @@ static void amd_pstate_ut_check_perf(u32 index)
|
||||
lowest_perf = AMD_CPPC_LOWEST_PERF(cap1);
|
||||
}
|
||||
|
||||
if ((highest_perf != READ_ONCE(cpudata->highest_perf)) ||
|
||||
(nominal_perf != READ_ONCE(cpudata->nominal_perf)) ||
|
||||
if (highest_perf != READ_ONCE(cpudata->highest_perf) && !cpudata->hw_prefcore) {
|
||||
pr_err("%s cpu%d highest=%d %d highest perf doesn't match\n",
|
||||
__func__, cpu, highest_perf, cpudata->highest_perf);
|
||||
goto skip_test;
|
||||
}
|
||||
if ((nominal_perf != READ_ONCE(cpudata->nominal_perf)) ||
|
||||
(lowest_nonlinear_perf != READ_ONCE(cpudata->lowest_nonlinear_perf)) ||
|
||||
(lowest_perf != READ_ONCE(cpudata->lowest_perf))) {
|
||||
amd_pstate_ut_cases[index].result = AMD_PSTATE_UT_RESULT_FAIL;
|
||||
pr_err("%s cpu%d highest=%d %d nominal=%d %d lowest_nonlinear=%d %d lowest=%d %d, they should be equal!\n",
|
||||
__func__, cpu, highest_perf, cpudata->highest_perf,
|
||||
nominal_perf, cpudata->nominal_perf,
|
||||
pr_err("%s cpu%d nominal=%d %d lowest_nonlinear=%d %d lowest=%d %d, they should be equal!\n",
|
||||
__func__, cpu, nominal_perf, cpudata->nominal_perf,
|
||||
lowest_nonlinear_perf, cpudata->lowest_nonlinear_perf,
|
||||
lowest_perf, cpudata->lowest_perf);
|
||||
goto skip_test;
|
||||
|
||||
@@ -321,7 +321,7 @@ static inline int pstate_enable(bool enable)
|
||||
return 0;
|
||||
|
||||
for_each_present_cpu(cpu) {
|
||||
unsigned long logical_id = topology_logical_die_id(cpu);
|
||||
unsigned long logical_id = topology_logical_package_id(cpu);
|
||||
|
||||
if (test_bit(logical_id, &logical_proc_id_mask))
|
||||
continue;
|
||||
@@ -692,7 +692,7 @@ static int amd_pstate_cpu_boost_update(struct cpufreq_policy *policy, bool on)
|
||||
struct amd_cpudata *cpudata = policy->driver_data;
|
||||
struct cppc_perf_ctrls perf_ctrls;
|
||||
u32 highest_perf, nominal_perf, nominal_freq, max_freq;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
highest_perf = READ_ONCE(cpudata->highest_perf);
|
||||
nominal_perf = READ_ONCE(cpudata->nominal_perf);
|
||||
|
||||
@@ -834,11 +834,13 @@ static void cxl_disable_rch_root_ints(struct cxl_dport *dport)
|
||||
void cxl_setup_parent_dport(struct device *host, struct cxl_dport *dport)
|
||||
{
|
||||
struct device *dport_dev = dport->dport_dev;
|
||||
struct pci_host_bridge *host_bridge;
|
||||
|
||||
host_bridge = to_pci_host_bridge(dport_dev);
|
||||
if (host_bridge->native_aer)
|
||||
dport->rcrb.aer_cap = cxl_rcrb_to_aer(dport_dev, dport->rcrb.base);
|
||||
if (dport->rch) {
|
||||
struct pci_host_bridge *host_bridge = to_pci_host_bridge(dport_dev);
|
||||
|
||||
if (host_bridge->native_aer)
|
||||
dport->rcrb.aer_cap = cxl_rcrb_to_aer(dport_dev, dport->rcrb.base);
|
||||
}
|
||||
|
||||
dport->reg_map.host = host;
|
||||
cxl_dport_map_regs(dport);
|
||||
|
||||
@@ -17,8 +17,8 @@ enum dw_hdma_control {
|
||||
DW_HDMA_V0_CB = BIT(0),
|
||||
DW_HDMA_V0_TCB = BIT(1),
|
||||
DW_HDMA_V0_LLP = BIT(2),
|
||||
DW_HDMA_V0_LIE = BIT(3),
|
||||
DW_HDMA_V0_RIE = BIT(4),
|
||||
DW_HDMA_V0_LWIE = BIT(3),
|
||||
DW_HDMA_V0_RWIE = BIT(4),
|
||||
DW_HDMA_V0_CCS = BIT(8),
|
||||
DW_HDMA_V0_LLE = BIT(9),
|
||||
};
|
||||
@@ -195,25 +195,14 @@ static void dw_hdma_v0_write_ll_link(struct dw_edma_chunk *chunk,
|
||||
static void dw_hdma_v0_core_write_chunk(struct dw_edma_chunk *chunk)
|
||||
{
|
||||
struct dw_edma_burst *child;
|
||||
struct dw_edma_chan *chan = chunk->chan;
|
||||
u32 control = 0, i = 0;
|
||||
int j;
|
||||
|
||||
if (chunk->cb)
|
||||
control = DW_HDMA_V0_CB;
|
||||
|
||||
j = chunk->bursts_alloc;
|
||||
list_for_each_entry(child, &chunk->burst->list, list) {
|
||||
j--;
|
||||
if (!j) {
|
||||
control |= DW_HDMA_V0_LIE;
|
||||
if (!(chan->dw->chip->flags & DW_EDMA_CHIP_LOCAL))
|
||||
control |= DW_HDMA_V0_RIE;
|
||||
}
|
||||
|
||||
list_for_each_entry(child, &chunk->burst->list, list)
|
||||
dw_hdma_v0_write_ll_data(chunk, i++, control, child->sz,
|
||||
child->sar, child->dar);
|
||||
}
|
||||
|
||||
control = DW_HDMA_V0_LLP | DW_HDMA_V0_TCB;
|
||||
if (!chunk->cb)
|
||||
@@ -247,10 +236,11 @@ static void dw_hdma_v0_core_start(struct dw_edma_chunk *chunk, bool first)
|
||||
if (first) {
|
||||
/* Enable engine */
|
||||
SET_CH_32(dw, chan->dir, chan->id, ch_en, BIT(0));
|
||||
/* Interrupt enable&unmask - done, abort */
|
||||
tmp = GET_CH_32(dw, chan->dir, chan->id, int_setup) |
|
||||
HDMA_V0_STOP_INT_MASK | HDMA_V0_ABORT_INT_MASK |
|
||||
HDMA_V0_LOCAL_STOP_INT_EN | HDMA_V0_LOCAL_ABORT_INT_EN;
|
||||
/* Interrupt unmask - stop, abort */
|
||||
tmp = GET_CH_32(dw, chan->dir, chan->id, int_setup);
|
||||
tmp &= ~(HDMA_V0_STOP_INT_MASK | HDMA_V0_ABORT_INT_MASK);
|
||||
/* Interrupt enable - stop, abort */
|
||||
tmp |= HDMA_V0_LOCAL_STOP_INT_EN | HDMA_V0_LOCAL_ABORT_INT_EN;
|
||||
if (!(dw->chip->flags & DW_EDMA_CHIP_LOCAL))
|
||||
tmp |= HDMA_V0_REMOTE_STOP_INT_EN | HDMA_V0_REMOTE_ABORT_INT_EN;
|
||||
SET_CH_32(dw, chan->dir, chan->id, int_setup, tmp);
|
||||
|
||||
+109
-22
@@ -16,6 +16,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/log2.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
@@ -621,12 +622,10 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
|
||||
struct dw_desc *prev;
|
||||
struct dw_desc *first;
|
||||
u32 ctllo, ctlhi;
|
||||
u8 m_master = dwc->dws.m_master;
|
||||
u8 lms = DWC_LLP_LMS(m_master);
|
||||
u8 lms = DWC_LLP_LMS(dwc->dws.m_master);
|
||||
dma_addr_t reg;
|
||||
unsigned int reg_width;
|
||||
unsigned int mem_width;
|
||||
unsigned int data_width = dw->pdata->data_width[m_master];
|
||||
unsigned int i;
|
||||
struct scatterlist *sg;
|
||||
size_t total_len = 0;
|
||||
@@ -660,7 +659,7 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
|
||||
mem = sg_dma_address(sg);
|
||||
len = sg_dma_len(sg);
|
||||
|
||||
mem_width = __ffs(data_width | mem | len);
|
||||
mem_width = __ffs(sconfig->src_addr_width | mem | len);
|
||||
|
||||
slave_sg_todev_fill_desc:
|
||||
desc = dwc_desc_get(dwc);
|
||||
@@ -720,7 +719,7 @@ slave_sg_fromdev_fill_desc:
|
||||
lli_write(desc, sar, reg);
|
||||
lli_write(desc, dar, mem);
|
||||
lli_write(desc, ctlhi, ctlhi);
|
||||
mem_width = __ffs(data_width | mem);
|
||||
mem_width = __ffs(sconfig->dst_addr_width | mem);
|
||||
lli_write(desc, ctllo, ctllo | DWC_CTLL_DST_WIDTH(mem_width));
|
||||
desc->len = dlen;
|
||||
|
||||
@@ -780,20 +779,108 @@ bool dw_dma_filter(struct dma_chan *chan, void *param)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dw_dma_filter);
|
||||
|
||||
static int dwc_config(struct dma_chan *chan, struct dma_slave_config *sconfig)
|
||||
static int dwc_verify_maxburst(struct dma_chan *chan)
|
||||
{
|
||||
struct dw_dma_chan *dwc = to_dw_dma_chan(chan);
|
||||
|
||||
dwc->dma_sconfig.src_maxburst =
|
||||
clamp(dwc->dma_sconfig.src_maxburst, 1U, dwc->max_burst);
|
||||
dwc->dma_sconfig.dst_maxburst =
|
||||
clamp(dwc->dma_sconfig.dst_maxburst, 1U, dwc->max_burst);
|
||||
|
||||
dwc->dma_sconfig.src_maxburst =
|
||||
rounddown_pow_of_two(dwc->dma_sconfig.src_maxburst);
|
||||
dwc->dma_sconfig.dst_maxburst =
|
||||
rounddown_pow_of_two(dwc->dma_sconfig.dst_maxburst);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dwc_verify_p_buswidth(struct dma_chan *chan)
|
||||
{
|
||||
struct dw_dma_chan *dwc = to_dw_dma_chan(chan);
|
||||
struct dw_dma *dw = to_dw_dma(chan->device);
|
||||
u32 reg_width, max_width;
|
||||
|
||||
if (dwc->dma_sconfig.direction == DMA_MEM_TO_DEV)
|
||||
reg_width = dwc->dma_sconfig.dst_addr_width;
|
||||
else if (dwc->dma_sconfig.direction == DMA_DEV_TO_MEM)
|
||||
reg_width = dwc->dma_sconfig.src_addr_width;
|
||||
else /* DMA_MEM_TO_MEM */
|
||||
return 0;
|
||||
|
||||
max_width = dw->pdata->data_width[dwc->dws.p_master];
|
||||
|
||||
/* Fall-back to 1-byte transfer width if undefined */
|
||||
if (reg_width == DMA_SLAVE_BUSWIDTH_UNDEFINED)
|
||||
reg_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
|
||||
else if (!is_power_of_2(reg_width) || reg_width > max_width)
|
||||
return -EINVAL;
|
||||
else /* bus width is valid */
|
||||
return 0;
|
||||
|
||||
/* Update undefined addr width value */
|
||||
if (dwc->dma_sconfig.direction == DMA_MEM_TO_DEV)
|
||||
dwc->dma_sconfig.dst_addr_width = reg_width;
|
||||
else /* DMA_DEV_TO_MEM */
|
||||
dwc->dma_sconfig.src_addr_width = reg_width;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dwc_verify_m_buswidth(struct dma_chan *chan)
|
||||
{
|
||||
struct dw_dma_chan *dwc = to_dw_dma_chan(chan);
|
||||
struct dw_dma *dw = to_dw_dma(chan->device);
|
||||
u32 reg_width, reg_burst, mem_width;
|
||||
|
||||
mem_width = dw->pdata->data_width[dwc->dws.m_master];
|
||||
|
||||
/*
|
||||
* It's possible to have a data portion locked in the DMA FIFO in case
|
||||
* of the channel suspension. Subsequent channel disabling will cause
|
||||
* that data silent loss. In order to prevent that maintain the src and
|
||||
* dst transfer widths coherency by means of the relation:
|
||||
* (CTLx.SRC_TR_WIDTH * CTLx.SRC_MSIZE >= CTLx.DST_TR_WIDTH)
|
||||
* Look for the details in the commit message that brings this change.
|
||||
*
|
||||
* Note the DMA configs utilized in the calculations below must have
|
||||
* been verified to have correct values by this method call.
|
||||
*/
|
||||
if (dwc->dma_sconfig.direction == DMA_MEM_TO_DEV) {
|
||||
reg_width = dwc->dma_sconfig.dst_addr_width;
|
||||
if (mem_width < reg_width)
|
||||
return -EINVAL;
|
||||
|
||||
dwc->dma_sconfig.src_addr_width = mem_width;
|
||||
} else if (dwc->dma_sconfig.direction == DMA_DEV_TO_MEM) {
|
||||
reg_width = dwc->dma_sconfig.src_addr_width;
|
||||
reg_burst = dwc->dma_sconfig.src_maxburst;
|
||||
|
||||
dwc->dma_sconfig.dst_addr_width = min(mem_width, reg_width * reg_burst);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dwc_config(struct dma_chan *chan, struct dma_slave_config *sconfig)
|
||||
{
|
||||
struct dw_dma_chan *dwc = to_dw_dma_chan(chan);
|
||||
int ret;
|
||||
|
||||
memcpy(&dwc->dma_sconfig, sconfig, sizeof(*sconfig));
|
||||
|
||||
dwc->dma_sconfig.src_maxburst =
|
||||
clamp(dwc->dma_sconfig.src_maxburst, 0U, dwc->max_burst);
|
||||
dwc->dma_sconfig.dst_maxburst =
|
||||
clamp(dwc->dma_sconfig.dst_maxburst, 0U, dwc->max_burst);
|
||||
ret = dwc_verify_maxburst(chan);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
dw->encode_maxburst(dwc, &dwc->dma_sconfig.src_maxburst);
|
||||
dw->encode_maxburst(dwc, &dwc->dma_sconfig.dst_maxburst);
|
||||
ret = dwc_verify_p_buswidth(chan);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = dwc_verify_m_buswidth(chan);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1068,7 +1155,7 @@ int do_dma_probe(struct dw_dma_chip *chip)
|
||||
bool autocfg = false;
|
||||
unsigned int dw_params;
|
||||
unsigned int i;
|
||||
int err;
|
||||
int ret;
|
||||
|
||||
dw->pdata = devm_kzalloc(chip->dev, sizeof(*dw->pdata), GFP_KERNEL);
|
||||
if (!dw->pdata)
|
||||
@@ -1084,7 +1171,7 @@ int do_dma_probe(struct dw_dma_chip *chip)
|
||||
|
||||
autocfg = dw_params >> DW_PARAMS_EN & 1;
|
||||
if (!autocfg) {
|
||||
err = -EINVAL;
|
||||
ret = -EINVAL;
|
||||
goto err_pdata;
|
||||
}
|
||||
|
||||
@@ -1104,7 +1191,7 @@ int do_dma_probe(struct dw_dma_chip *chip)
|
||||
pdata->chan_allocation_order = CHAN_ALLOCATION_ASCENDING;
|
||||
pdata->chan_priority = CHAN_PRIORITY_ASCENDING;
|
||||
} else if (chip->pdata->nr_channels > DW_DMA_MAX_NR_CHANNELS) {
|
||||
err = -EINVAL;
|
||||
ret = -EINVAL;
|
||||
goto err_pdata;
|
||||
} else {
|
||||
memcpy(dw->pdata, chip->pdata, sizeof(*dw->pdata));
|
||||
@@ -1116,7 +1203,7 @@ int do_dma_probe(struct dw_dma_chip *chip)
|
||||
dw->chan = devm_kcalloc(chip->dev, pdata->nr_channels, sizeof(*dw->chan),
|
||||
GFP_KERNEL);
|
||||
if (!dw->chan) {
|
||||
err = -ENOMEM;
|
||||
ret = -ENOMEM;
|
||||
goto err_pdata;
|
||||
}
|
||||
|
||||
@@ -1134,15 +1221,15 @@ int do_dma_probe(struct dw_dma_chip *chip)
|
||||
sizeof(struct dw_desc), 4, 0);
|
||||
if (!dw->desc_pool) {
|
||||
dev_err(chip->dev, "No memory for descriptors dma pool\n");
|
||||
err = -ENOMEM;
|
||||
ret = -ENOMEM;
|
||||
goto err_pdata;
|
||||
}
|
||||
|
||||
tasklet_setup(&dw->tasklet, dw_dma_tasklet);
|
||||
|
||||
err = request_irq(chip->irq, dw_dma_interrupt, IRQF_SHARED,
|
||||
ret = request_irq(chip->irq, dw_dma_interrupt, IRQF_SHARED,
|
||||
dw->name, dw);
|
||||
if (err)
|
||||
if (ret)
|
||||
goto err_pdata;
|
||||
|
||||
INIT_LIST_HEAD(&dw->dma.channels);
|
||||
@@ -1254,8 +1341,8 @@ int do_dma_probe(struct dw_dma_chip *chip)
|
||||
*/
|
||||
dma_set_max_seg_size(dw->dma.dev, dw->chan[0].block_size);
|
||||
|
||||
err = dma_async_device_register(&dw->dma);
|
||||
if (err)
|
||||
ret = dma_async_device_register(&dw->dma);
|
||||
if (ret)
|
||||
goto err_dma_register;
|
||||
|
||||
dev_info(chip->dev, "DesignWare DMA Controller, %d channels\n",
|
||||
@@ -1269,7 +1356,7 @@ err_dma_register:
|
||||
free_irq(chip->irq, dw);
|
||||
err_pdata:
|
||||
pm_runtime_put_sync_suspend(chip->dev);
|
||||
return err;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int do_dma_remove(struct dw_dma_chip *chip)
|
||||
|
||||
+26
-18
@@ -64,28 +64,37 @@ static size_t dw_dma_block2bytes(struct dw_dma_chan *dwc, u32 block, u32 width)
|
||||
return DWC_CTLH_BLOCK_TS(block) << width;
|
||||
}
|
||||
|
||||
static u32 dw_dma_prepare_ctllo(struct dw_dma_chan *dwc)
|
||||
{
|
||||
struct dma_slave_config *sconfig = &dwc->dma_sconfig;
|
||||
u8 smsize = (dwc->direction == DMA_DEV_TO_MEM) ? sconfig->src_maxburst : 0;
|
||||
u8 dmsize = (dwc->direction == DMA_MEM_TO_DEV) ? sconfig->dst_maxburst : 0;
|
||||
u8 p_master = dwc->dws.p_master;
|
||||
u8 m_master = dwc->dws.m_master;
|
||||
u8 dms = (dwc->direction == DMA_MEM_TO_DEV) ? p_master : m_master;
|
||||
u8 sms = (dwc->direction == DMA_DEV_TO_MEM) ? p_master : m_master;
|
||||
|
||||
return DWC_CTLL_LLP_D_EN | DWC_CTLL_LLP_S_EN |
|
||||
DWC_CTLL_DST_MSIZE(dmsize) | DWC_CTLL_SRC_MSIZE(smsize) |
|
||||
DWC_CTLL_DMS(dms) | DWC_CTLL_SMS(sms);
|
||||
}
|
||||
|
||||
static void dw_dma_encode_maxburst(struct dw_dma_chan *dwc, u32 *maxburst)
|
||||
static inline u8 dw_dma_encode_maxburst(u32 maxburst)
|
||||
{
|
||||
/*
|
||||
* Fix burst size according to dw_dmac. We need to convert them as:
|
||||
* 1 -> 0, 4 -> 1, 8 -> 2, 16 -> 3.
|
||||
*/
|
||||
*maxburst = *maxburst > 1 ? fls(*maxburst) - 2 : 0;
|
||||
return maxburst > 1 ? fls(maxburst) - 2 : 0;
|
||||
}
|
||||
|
||||
static u32 dw_dma_prepare_ctllo(struct dw_dma_chan *dwc)
|
||||
{
|
||||
struct dma_slave_config *sconfig = &dwc->dma_sconfig;
|
||||
u8 smsize = 0, dmsize = 0;
|
||||
u8 sms, dms;
|
||||
|
||||
if (dwc->direction == DMA_MEM_TO_DEV) {
|
||||
sms = dwc->dws.m_master;
|
||||
dms = dwc->dws.p_master;
|
||||
dmsize = dw_dma_encode_maxburst(sconfig->dst_maxburst);
|
||||
} else if (dwc->direction == DMA_DEV_TO_MEM) {
|
||||
sms = dwc->dws.p_master;
|
||||
dms = dwc->dws.m_master;
|
||||
smsize = dw_dma_encode_maxburst(sconfig->src_maxburst);
|
||||
} else /* DMA_MEM_TO_MEM */ {
|
||||
sms = dwc->dws.m_master;
|
||||
dms = dwc->dws.m_master;
|
||||
}
|
||||
|
||||
return DWC_CTLL_LLP_D_EN | DWC_CTLL_LLP_S_EN |
|
||||
DWC_CTLL_DST_MSIZE(dmsize) | DWC_CTLL_SRC_MSIZE(smsize) |
|
||||
DWC_CTLL_DMS(dms) | DWC_CTLL_SMS(sms);
|
||||
}
|
||||
|
||||
static void dw_dma_set_device_name(struct dw_dma *dw, int id)
|
||||
@@ -116,7 +125,6 @@ int dw_dma_probe(struct dw_dma_chip *chip)
|
||||
dw->suspend_chan = dw_dma_suspend_chan;
|
||||
dw->resume_chan = dw_dma_resume_chan;
|
||||
dw->prepare_ctllo = dw_dma_prepare_ctllo;
|
||||
dw->encode_maxburst = dw_dma_encode_maxburst;
|
||||
dw->bytes2block = dw_dma_bytes2block;
|
||||
dw->block2bytes = dw_dma_block2bytes;
|
||||
|
||||
|
||||
+11
-8
@@ -199,21 +199,25 @@ static size_t idma32_block2bytes(struct dw_dma_chan *dwc, u32 block, u32 width)
|
||||
return IDMA32C_CTLH_BLOCK_TS(block);
|
||||
}
|
||||
|
||||
static inline u8 idma32_encode_maxburst(u32 maxburst)
|
||||
{
|
||||
return maxburst > 1 ? fls(maxburst) - 1 : 0;
|
||||
}
|
||||
|
||||
static u32 idma32_prepare_ctllo(struct dw_dma_chan *dwc)
|
||||
{
|
||||
struct dma_slave_config *sconfig = &dwc->dma_sconfig;
|
||||
u8 smsize = (dwc->direction == DMA_DEV_TO_MEM) ? sconfig->src_maxburst : 0;
|
||||
u8 dmsize = (dwc->direction == DMA_MEM_TO_DEV) ? sconfig->dst_maxburst : 0;
|
||||
u8 smsize = 0, dmsize = 0;
|
||||
|
||||
if (dwc->direction == DMA_MEM_TO_DEV)
|
||||
dmsize = idma32_encode_maxburst(sconfig->dst_maxburst);
|
||||
else if (dwc->direction == DMA_DEV_TO_MEM)
|
||||
smsize = idma32_encode_maxburst(sconfig->src_maxburst);
|
||||
|
||||
return DWC_CTLL_LLP_D_EN | DWC_CTLL_LLP_S_EN |
|
||||
DWC_CTLL_DST_MSIZE(dmsize) | DWC_CTLL_SRC_MSIZE(smsize);
|
||||
}
|
||||
|
||||
static void idma32_encode_maxburst(struct dw_dma_chan *dwc, u32 *maxburst)
|
||||
{
|
||||
*maxburst = *maxburst > 1 ? fls(*maxburst) - 1 : 0;
|
||||
}
|
||||
|
||||
static void idma32_set_device_name(struct dw_dma *dw, int id)
|
||||
{
|
||||
snprintf(dw->name, sizeof(dw->name), "idma32:dmac%d", id);
|
||||
@@ -270,7 +274,6 @@ int idma32_dma_probe(struct dw_dma_chip *chip)
|
||||
dw->suspend_chan = idma32_suspend_chan;
|
||||
dw->resume_chan = idma32_resume_chan;
|
||||
dw->prepare_ctllo = idma32_prepare_ctllo;
|
||||
dw->encode_maxburst = idma32_encode_maxburst;
|
||||
dw->bytes2block = idma32_bytes2block;
|
||||
dw->block2bytes = idma32_block2bytes;
|
||||
|
||||
|
||||
+10
-10
@@ -29,7 +29,7 @@ static int dw_probe(struct platform_device *pdev)
|
||||
struct dw_dma_chip_pdata *data;
|
||||
struct dw_dma_chip *chip;
|
||||
struct device *dev = &pdev->dev;
|
||||
int err;
|
||||
int ret;
|
||||
|
||||
match = device_get_match_data(dev);
|
||||
if (!match)
|
||||
@@ -51,9 +51,9 @@ static int dw_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(chip->regs))
|
||||
return PTR_ERR(chip->regs);
|
||||
|
||||
err = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
|
||||
if (err)
|
||||
return err;
|
||||
ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (!data->pdata)
|
||||
data->pdata = dev_get_platdata(dev);
|
||||
@@ -69,14 +69,14 @@ static int dw_probe(struct platform_device *pdev)
|
||||
chip->clk = devm_clk_get_optional(chip->dev, "hclk");
|
||||
if (IS_ERR(chip->clk))
|
||||
return PTR_ERR(chip->clk);
|
||||
err = clk_prepare_enable(chip->clk);
|
||||
if (err)
|
||||
return err;
|
||||
ret = clk_prepare_enable(chip->clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
err = data->probe(chip);
|
||||
if (err)
|
||||
ret = data->probe(chip);
|
||||
if (ret)
|
||||
goto err_dw_dma_probe;
|
||||
|
||||
platform_set_drvdata(pdev, data);
|
||||
@@ -90,7 +90,7 @@ static int dw_probe(struct platform_device *pdev)
|
||||
err_dw_dma_probe:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
clk_disable_unprepare(chip->clk);
|
||||
return err;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void dw_remove(struct platform_device *pdev)
|
||||
|
||||
@@ -327,7 +327,6 @@ struct dw_dma {
|
||||
void (*suspend_chan)(struct dw_dma_chan *dwc, bool drain);
|
||||
void (*resume_chan)(struct dw_dma_chan *dwc, bool drain);
|
||||
u32 (*prepare_ctllo)(struct dw_dma_chan *dwc);
|
||||
void (*encode_maxburst)(struct dw_dma_chan *dwc, u32 *maxburst);
|
||||
u32 (*bytes2block)(struct dw_dma_chan *dwc, size_t bytes,
|
||||
unsigned int width, size_t *len);
|
||||
size_t (*block2bytes)(struct dw_dma_chan *dwc, u32 block, u32 width);
|
||||
|
||||
@@ -403,6 +403,7 @@ static struct stm32_dma3_swdesc *stm32_dma3_chan_desc_alloc(struct stm32_dma3_ch
|
||||
swdesc = kzalloc(struct_size(swdesc, lli, count), GFP_NOWAIT);
|
||||
if (!swdesc)
|
||||
return NULL;
|
||||
swdesc->lli_size = count;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
swdesc->lli[i].hwdesc = dma_pool_zalloc(chan->lli_pool, GFP_NOWAIT,
|
||||
@@ -410,7 +411,6 @@ static struct stm32_dma3_swdesc *stm32_dma3_chan_desc_alloc(struct stm32_dma3_ch
|
||||
if (!swdesc->lli[i].hwdesc)
|
||||
goto err_pool_free;
|
||||
}
|
||||
swdesc->lli_size = count;
|
||||
swdesc->ccr = 0;
|
||||
|
||||
/* Set LL base address */
|
||||
|
||||
@@ -1186,10 +1186,10 @@ static struct dma_async_tx_descriptor *omap_dma_prep_dma_cyclic(
|
||||
d->dev_addr = dev_addr;
|
||||
d->fi = burst;
|
||||
d->es = es;
|
||||
d->sglen = 1;
|
||||
d->sg[0].addr = buf_addr;
|
||||
d->sg[0].en = period_len / es_bytes[es];
|
||||
d->sg[0].fn = buf_len / period_len;
|
||||
d->sglen = 1;
|
||||
|
||||
d->ccr = c->ccr;
|
||||
if (dir == DMA_DEV_TO_MEM)
|
||||
@@ -1258,10 +1258,10 @@ static struct dma_async_tx_descriptor *omap_dma_prep_dma_memcpy(
|
||||
d->dev_addr = src;
|
||||
d->fi = 0;
|
||||
d->es = data_type;
|
||||
d->sglen = 1;
|
||||
d->sg[0].en = len / BIT(data_type);
|
||||
d->sg[0].fn = 1;
|
||||
d->sg[0].addr = dest;
|
||||
d->sglen = 1;
|
||||
d->ccr = c->ccr;
|
||||
d->ccr |= CCR_DST_AMODE_POSTINC | CCR_SRC_AMODE_POSTINC;
|
||||
|
||||
@@ -1309,6 +1309,7 @@ static struct dma_async_tx_descriptor *omap_dma_prep_dma_interleaved(
|
||||
if (data_type > CSDP_DATA_TYPE_32)
|
||||
data_type = CSDP_DATA_TYPE_32;
|
||||
|
||||
d->sglen = 1;
|
||||
sg = &d->sg[0];
|
||||
d->dir = DMA_MEM_TO_MEM;
|
||||
d->dev_addr = xt->src_start;
|
||||
@@ -1316,7 +1317,6 @@ static struct dma_async_tx_descriptor *omap_dma_prep_dma_interleaved(
|
||||
sg->en = xt->sgl[0].size / BIT(data_type);
|
||||
sg->fn = xt->numf;
|
||||
sg->addr = xt->dst_start;
|
||||
d->sglen = 1;
|
||||
d->ccr = c->ccr;
|
||||
|
||||
src_icg = dmaengine_get_src_icg(xt, &xt->sgl[0]);
|
||||
|
||||
@@ -166,7 +166,7 @@ static enum fw_upload_err mpfs_auto_update_poll_complete(struct fw_upload *fw_up
|
||||
*/
|
||||
ret = wait_for_completion_timeout(&priv->programming_complete,
|
||||
msecs_to_jiffies(AUTO_UPDATE_TIMEOUT_MS));
|
||||
if (ret)
|
||||
if (!ret)
|
||||
return FW_UPLOAD_ERR_TIMEOUT;
|
||||
|
||||
return FW_UPLOAD_ERR_NONE;
|
||||
|
||||
@@ -73,7 +73,7 @@ int scm_get_wq_ctx(u32 *wq_ctx, u32 *flags, u32 *more_pending)
|
||||
struct arm_smccc_res get_wq_res;
|
||||
struct arm_smccc_args get_wq_ctx = {0};
|
||||
|
||||
get_wq_ctx.args[0] = ARM_SMCCC_CALL_VAL(ARM_SMCCC_STD_CALL,
|
||||
get_wq_ctx.args[0] = ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL,
|
||||
ARM_SMCCC_SMC_64, ARM_SMCCC_OWNER_SIP,
|
||||
SCM_SMC_FNID(QCOM_SCM_SVC_WAITQ, QCOM_SCM_WAITQ_GET_WQ_CTX));
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ struct qcom_tzmem_pool {
|
||||
};
|
||||
|
||||
struct qcom_tzmem_chunk {
|
||||
phys_addr_t paddr;
|
||||
size_t size;
|
||||
struct qcom_tzmem_pool *owner;
|
||||
};
|
||||
@@ -78,6 +77,7 @@ static bool qcom_tzmem_using_shm_bridge;
|
||||
/* List of machines that are known to not support SHM bridge correctly. */
|
||||
static const char *const qcom_tzmem_blacklist[] = {
|
||||
"qcom,sc8180x",
|
||||
"qcom,sdm670", /* failure in GPU firmware loading */
|
||||
"qcom,sdm845", /* reset in rmtfs memory assignment */
|
||||
"qcom,sm8150", /* reset in rmtfs memory assignment */
|
||||
NULL
|
||||
@@ -385,7 +385,6 @@ again:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
chunk->paddr = gen_pool_virt_to_phys(pool->genpool, vaddr);
|
||||
chunk->size = size;
|
||||
chunk->owner = pool;
|
||||
|
||||
@@ -431,25 +430,37 @@ void qcom_tzmem_free(void *vaddr)
|
||||
EXPORT_SYMBOL_GPL(qcom_tzmem_free);
|
||||
|
||||
/**
|
||||
* qcom_tzmem_to_phys() - Map the virtual address of a TZ buffer to physical.
|
||||
* @vaddr: Virtual address of the buffer allocated from a TZ memory pool.
|
||||
* qcom_tzmem_to_phys() - Map the virtual address of TZ memory to physical.
|
||||
* @vaddr: Virtual address of memory allocated from a TZ memory pool.
|
||||
*
|
||||
* Can be used in any context. The address must have been returned by a call
|
||||
* to qcom_tzmem_alloc().
|
||||
* Can be used in any context. The address must point to memory allocated
|
||||
* using qcom_tzmem_alloc().
|
||||
*
|
||||
* Returns: Physical address of the buffer.
|
||||
* Returns:
|
||||
* Physical address mapped from the virtual or 0 if the mapping failed.
|
||||
*/
|
||||
phys_addr_t qcom_tzmem_to_phys(void *vaddr)
|
||||
{
|
||||
struct qcom_tzmem_chunk *chunk;
|
||||
struct radix_tree_iter iter;
|
||||
void __rcu **slot;
|
||||
phys_addr_t ret;
|
||||
|
||||
guard(spinlock_irqsave)(&qcom_tzmem_chunks_lock);
|
||||
|
||||
chunk = radix_tree_lookup(&qcom_tzmem_chunks, (unsigned long)vaddr);
|
||||
if (!chunk)
|
||||
return 0;
|
||||
radix_tree_for_each_slot(slot, &qcom_tzmem_chunks, &iter, 0) {
|
||||
chunk = radix_tree_deref_slot_protected(slot,
|
||||
&qcom_tzmem_chunks_lock);
|
||||
|
||||
return chunk->paddr;
|
||||
ret = gen_pool_virt_to_phys(chunk->owner->genpool,
|
||||
(unsigned long)vaddr);
|
||||
if (ret == -1)
|
||||
continue;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(qcom_tzmem_to_phys);
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ static struct platform_device *pd;
|
||||
static DEFINE_MUTEX(disable_lock);
|
||||
static bool disabled;
|
||||
|
||||
static struct device *sysfb_parent_dev(const struct screen_info *si);
|
||||
|
||||
static bool sysfb_unregister(void)
|
||||
{
|
||||
if (IS_ERR_OR_NULL(pd))
|
||||
@@ -52,6 +54,7 @@ static bool sysfb_unregister(void)
|
||||
|
||||
/**
|
||||
* sysfb_disable() - disable the Generic System Framebuffers support
|
||||
* @dev: the device to check if non-NULL
|
||||
*
|
||||
* This disables the registration of system framebuffer devices that match the
|
||||
* generic drivers that make use of the system framebuffer set up by firmware.
|
||||
@@ -61,17 +64,21 @@ static bool sysfb_unregister(void)
|
||||
* Context: The function can sleep. A @disable_lock mutex is acquired to serialize
|
||||
* against sysfb_init(), that registers a system framebuffer device.
|
||||
*/
|
||||
void sysfb_disable(void)
|
||||
void sysfb_disable(struct device *dev)
|
||||
{
|
||||
struct screen_info *si = &screen_info;
|
||||
|
||||
mutex_lock(&disable_lock);
|
||||
sysfb_unregister();
|
||||
disabled = true;
|
||||
if (!dev || dev == sysfb_parent_dev(si)) {
|
||||
sysfb_unregister();
|
||||
disabled = true;
|
||||
}
|
||||
mutex_unlock(&disable_lock);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(sysfb_disable);
|
||||
|
||||
#if defined(CONFIG_PCI)
|
||||
static __init bool sysfb_pci_dev_is_enabled(struct pci_dev *pdev)
|
||||
static bool sysfb_pci_dev_is_enabled(struct pci_dev *pdev)
|
||||
{
|
||||
/*
|
||||
* TODO: Try to integrate this code into the PCI subsystem
|
||||
@@ -87,13 +94,13 @@ static __init bool sysfb_pci_dev_is_enabled(struct pci_dev *pdev)
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
static __init bool sysfb_pci_dev_is_enabled(struct pci_dev *pdev)
|
||||
static bool sysfb_pci_dev_is_enabled(struct pci_dev *pdev)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
static __init struct device *sysfb_parent_dev(const struct screen_info *si)
|
||||
static struct device *sysfb_parent_dev(const struct screen_info *si)
|
||||
{
|
||||
struct pci_dev *pdev;
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@ static int amdgpu_discovery_read_binary_from_mem(struct amdgpu_device *adev,
|
||||
msg = RREG32(mmMP0_SMN_C2PMSG_33);
|
||||
if (msg & 0x80000000)
|
||||
break;
|
||||
usleep_range(1000, 1100);
|
||||
msleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1500,6 +1500,7 @@ union gc_info {
|
||||
struct gc_info_v1_0 v1;
|
||||
struct gc_info_v1_1 v1_1;
|
||||
struct gc_info_v1_2 v1_2;
|
||||
struct gc_info_v1_3 v1_3;
|
||||
struct gc_info_v2_0 v2;
|
||||
struct gc_info_v2_1 v2_1;
|
||||
};
|
||||
@@ -1558,6 +1559,16 @@ static int amdgpu_discovery_get_gfx_info(struct amdgpu_device *adev)
|
||||
adev->gfx.config.gc_gl1c_size_per_instance = le32_to_cpu(gc_info->v1_2.gc_gl1c_size_per_instance);
|
||||
adev->gfx.config.gc_gl2c_per_gpu = le32_to_cpu(gc_info->v1_2.gc_gl2c_per_gpu);
|
||||
}
|
||||
if (le16_to_cpu(gc_info->v1.header.version_minor) >= 3) {
|
||||
adev->gfx.config.gc_tcp_size_per_cu = le32_to_cpu(gc_info->v1_3.gc_tcp_size_per_cu);
|
||||
adev->gfx.config.gc_tcp_cache_line_size = le32_to_cpu(gc_info->v1_3.gc_tcp_cache_line_size);
|
||||
adev->gfx.config.gc_instruction_cache_size_per_sqc = le32_to_cpu(gc_info->v1_3.gc_instruction_cache_size_per_sqc);
|
||||
adev->gfx.config.gc_instruction_cache_line_size = le32_to_cpu(gc_info->v1_3.gc_instruction_cache_line_size);
|
||||
adev->gfx.config.gc_scalar_data_cache_size_per_sqc = le32_to_cpu(gc_info->v1_3.gc_scalar_data_cache_size_per_sqc);
|
||||
adev->gfx.config.gc_scalar_data_cache_line_size = le32_to_cpu(gc_info->v1_3.gc_scalar_data_cache_line_size);
|
||||
adev->gfx.config.gc_tcc_size = le32_to_cpu(gc_info->v1_3.gc_tcc_size);
|
||||
adev->gfx.config.gc_tcc_cache_line_size = le32_to_cpu(gc_info->v1_3.gc_tcc_cache_line_size);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
adev->gfx.config.max_shader_engines = le32_to_cpu(gc_info->v2.gc_num_se);
|
||||
|
||||
@@ -240,6 +240,12 @@ struct amdgpu_gfx_config {
|
||||
uint32_t gc_tcp_size_per_cu;
|
||||
uint32_t gc_num_cu_per_sqc;
|
||||
uint32_t gc_tcc_size;
|
||||
uint32_t gc_tcp_cache_line_size;
|
||||
uint32_t gc_instruction_cache_size_per_sqc;
|
||||
uint32_t gc_instruction_cache_line_size;
|
||||
uint32_t gc_scalar_data_cache_size_per_sqc;
|
||||
uint32_t gc_scalar_data_cache_line_size;
|
||||
uint32_t gc_tcc_cache_line_size;
|
||||
};
|
||||
|
||||
struct amdgpu_cu_info {
|
||||
|
||||
@@ -166,6 +166,9 @@ static ssize_t ta_if_load_debugfs_write(struct file *fp, const char *buf, size_t
|
||||
if (ret)
|
||||
return -EFAULT;
|
||||
|
||||
if (ta_bin_len > PSP_1_MEG)
|
||||
return -EINVAL;
|
||||
|
||||
copy_pos += sizeof(uint32_t);
|
||||
|
||||
ta_bin = kzalloc(ta_bin_len, GFP_KERNEL);
|
||||
|
||||
@@ -4116,6 +4116,7 @@ static void gfx_v10_0_check_gfxoff_flag(struct amdgpu_device *adev)
|
||||
|
||||
static int gfx_v10_0_init_microcode(struct amdgpu_device *adev)
|
||||
{
|
||||
char fw_name[53];
|
||||
char ucode_prefix[30];
|
||||
const char *wks = "";
|
||||
int err;
|
||||
@@ -4149,8 +4150,8 @@ static int gfx_v10_0_init_microcode(struct amdgpu_device *adev)
|
||||
amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_CE);
|
||||
|
||||
if (!amdgpu_sriov_vf(adev)) {
|
||||
err = amdgpu_ucode_request(adev, &adev->gfx.rlc_fw,
|
||||
"amdgpu/%s_rlc.bin", ucode_prefix);
|
||||
snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_rlc.bin", ucode_prefix);
|
||||
err = request_firmware(&adev->gfx.rlc_fw, fw_name, adev->dev);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
|
||||
@@ -3005,7 +3005,7 @@ static int gfx_v12_0_compute_mqd_init(struct amdgpu_device *adev, void *m,
|
||||
(order_base_2(prop->queue_size / 4) - 1));
|
||||
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, RPTR_BLOCK_SIZE,
|
||||
(order_base_2(AMDGPU_GPU_PAGE_SIZE / 4) - 1));
|
||||
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, UNORD_DISPATCH, 0);
|
||||
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, UNORD_DISPATCH, 1);
|
||||
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, TUNNEL_DISPATCH, 0);
|
||||
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, PRIV_STATE, 1);
|
||||
tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, KMD_QUEUE, 1);
|
||||
|
||||
@@ -176,14 +176,16 @@ static void sdma_v5_2_ring_set_wptr(struct amdgpu_ring *ring)
|
||||
DRM_DEBUG("calling WDOORBELL64(0x%08x, 0x%016llx)\n",
|
||||
ring->doorbell_index, ring->wptr << 2);
|
||||
WDOORBELL64(ring->doorbell_index, ring->wptr << 2);
|
||||
/* SDMA seems to miss doorbells sometimes when powergating kicks in.
|
||||
* Updating the wptr directly will wake it. This is only safe because
|
||||
* we disallow gfxoff in begin_use() and then allow it again in end_use().
|
||||
*/
|
||||
WREG32(sdma_v5_2_get_reg_offset(adev, ring->me, mmSDMA0_GFX_RB_WPTR),
|
||||
lower_32_bits(ring->wptr << 2));
|
||||
WREG32(sdma_v5_2_get_reg_offset(adev, ring->me, mmSDMA0_GFX_RB_WPTR_HI),
|
||||
upper_32_bits(ring->wptr << 2));
|
||||
if (amdgpu_ip_version(adev, SDMA0_HWIP, 0) == IP_VERSION(5, 2, 1)) {
|
||||
/* SDMA seems to miss doorbells sometimes when powergating kicks in.
|
||||
* Updating the wptr directly will wake it. This is only safe because
|
||||
* we disallow gfxoff in begin_use() and then allow it again in end_use().
|
||||
*/
|
||||
WREG32(sdma_v5_2_get_reg_offset(adev, ring->me, mmSDMA0_GFX_RB_WPTR),
|
||||
lower_32_bits(ring->wptr << 2));
|
||||
WREG32(sdma_v5_2_get_reg_offset(adev, ring->me, mmSDMA0_GFX_RB_WPTR_HI),
|
||||
upper_32_bits(ring->wptr << 2));
|
||||
}
|
||||
} else {
|
||||
DRM_DEBUG("Not using doorbell -- "
|
||||
"mmSDMA%i_GFX_RB_WPTR == 0x%08x "
|
||||
|
||||
@@ -187,6 +187,7 @@ static void update_mqd(struct mqd_manager *mm, void *mqd,
|
||||
m->cp_hqd_pq_control = 5 << CP_HQD_PQ_CONTROL__RPTR_BLOCK_SIZE__SHIFT;
|
||||
m->cp_hqd_pq_control |=
|
||||
ffs(q->queue_size / sizeof(unsigned int)) - 1 - 1;
|
||||
m->cp_hqd_pq_control |= CP_HQD_PQ_CONTROL__UNORD_DISPATCH_MASK;
|
||||
pr_debug("cp_hqd_pq_control 0x%x\n", m->cp_hqd_pq_control);
|
||||
|
||||
m->cp_hqd_pq_base_lo = lower_32_bits((uint64_t)q->queue_address >> 8);
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <drm/drm_blend.h>
|
||||
#include <drm/drm_gem_atomic_helper.h>
|
||||
#include <drm/drm_plane_helper.h>
|
||||
#include <drm/drm_gem_framebuffer_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
|
||||
#include "amdgpu.h"
|
||||
@@ -935,10 +936,14 @@ static int amdgpu_dm_plane_helper_prepare_fb(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
afb = to_amdgpu_framebuffer(new_state->fb);
|
||||
obj = new_state->fb->obj[0];
|
||||
obj = drm_gem_fb_get_obj(new_state->fb, 0);
|
||||
if (!obj) {
|
||||
DRM_ERROR("Failed to get obj from framebuffer\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
rbo = gem_to_amdgpu_bo(obj);
|
||||
adev = amdgpu_ttm_adev(rbo->tbo.bdev);
|
||||
|
||||
r = amdgpu_bo_reserve(rbo, true);
|
||||
if (r) {
|
||||
dev_err(adev->dev, "fail to reserve bo (%d)\n", r);
|
||||
|
||||
@@ -258,6 +258,48 @@ struct gc_info_v1_2 {
|
||||
uint32_t gc_gl2c_per_gpu;
|
||||
};
|
||||
|
||||
struct gc_info_v1_3 {
|
||||
struct gpu_info_header header;
|
||||
uint32_t gc_num_se;
|
||||
uint32_t gc_num_wgp0_per_sa;
|
||||
uint32_t gc_num_wgp1_per_sa;
|
||||
uint32_t gc_num_rb_per_se;
|
||||
uint32_t gc_num_gl2c;
|
||||
uint32_t gc_num_gprs;
|
||||
uint32_t gc_num_max_gs_thds;
|
||||
uint32_t gc_gs_table_depth;
|
||||
uint32_t gc_gsprim_buff_depth;
|
||||
uint32_t gc_parameter_cache_depth;
|
||||
uint32_t gc_double_offchip_lds_buffer;
|
||||
uint32_t gc_wave_size;
|
||||
uint32_t gc_max_waves_per_simd;
|
||||
uint32_t gc_max_scratch_slots_per_cu;
|
||||
uint32_t gc_lds_size;
|
||||
uint32_t gc_num_sc_per_se;
|
||||
uint32_t gc_num_sa_per_se;
|
||||
uint32_t gc_num_packer_per_sc;
|
||||
uint32_t gc_num_gl2a;
|
||||
uint32_t gc_num_tcp_per_sa;
|
||||
uint32_t gc_num_sdp_interface;
|
||||
uint32_t gc_num_tcps;
|
||||
uint32_t gc_num_tcp_per_wpg;
|
||||
uint32_t gc_tcp_l1_size;
|
||||
uint32_t gc_num_sqc_per_wgp;
|
||||
uint32_t gc_l1_instruction_cache_size_per_sqc;
|
||||
uint32_t gc_l1_data_cache_size_per_sqc;
|
||||
uint32_t gc_gl1c_per_sa;
|
||||
uint32_t gc_gl1c_size_per_instance;
|
||||
uint32_t gc_gl2c_per_gpu;
|
||||
uint32_t gc_tcp_size_per_cu;
|
||||
uint32_t gc_tcp_cache_line_size;
|
||||
uint32_t gc_instruction_cache_size_per_sqc;
|
||||
uint32_t gc_instruction_cache_line_size;
|
||||
uint32_t gc_scalar_data_cache_size_per_sqc;
|
||||
uint32_t gc_scalar_data_cache_line_size;
|
||||
uint32_t gc_tcc_size;
|
||||
uint32_t gc_tcc_cache_line_size;
|
||||
};
|
||||
|
||||
struct gc_info_v2_0 {
|
||||
struct gpu_info_header header;
|
||||
|
||||
|
||||
@@ -2224,8 +2224,9 @@ static int smu_bump_power_profile_mode(struct smu_context *smu,
|
||||
}
|
||||
|
||||
static int smu_adjust_power_state_dynamic(struct smu_context *smu,
|
||||
enum amd_dpm_forced_level level,
|
||||
bool skip_display_settings)
|
||||
enum amd_dpm_forced_level level,
|
||||
bool skip_display_settings,
|
||||
bool force_update)
|
||||
{
|
||||
int ret = 0;
|
||||
int index = 0;
|
||||
@@ -2254,7 +2255,7 @@ static int smu_adjust_power_state_dynamic(struct smu_context *smu,
|
||||
}
|
||||
}
|
||||
|
||||
if (smu_dpm_ctx->dpm_level != level) {
|
||||
if (force_update || smu_dpm_ctx->dpm_level != level) {
|
||||
ret = smu_asic_set_performance_level(smu, level);
|
||||
if (ret) {
|
||||
dev_err(smu->adev->dev, "Failed to set performance level!");
|
||||
@@ -2265,13 +2266,12 @@ static int smu_adjust_power_state_dynamic(struct smu_context *smu,
|
||||
smu_dpm_ctx->dpm_level = level;
|
||||
}
|
||||
|
||||
if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_MANUAL &&
|
||||
smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM) {
|
||||
if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM) {
|
||||
index = fls(smu->workload_mask);
|
||||
index = index > 0 && index <= WORKLOAD_POLICY_MAX ? index - 1 : 0;
|
||||
workload[0] = smu->workload_setting[index];
|
||||
|
||||
if (smu->power_profile_mode != workload[0])
|
||||
if (force_update || smu->power_profile_mode != workload[0])
|
||||
smu_bump_power_profile_mode(smu, workload, 0);
|
||||
}
|
||||
|
||||
@@ -2292,11 +2292,13 @@ static int smu_handle_task(struct smu_context *smu,
|
||||
ret = smu_pre_display_config_changed(smu);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = smu_adjust_power_state_dynamic(smu, level, false);
|
||||
ret = smu_adjust_power_state_dynamic(smu, level, false, false);
|
||||
break;
|
||||
case AMD_PP_TASK_COMPLETE_INIT:
|
||||
ret = smu_adjust_power_state_dynamic(smu, level, true, true);
|
||||
break;
|
||||
case AMD_PP_TASK_READJUST_POWER_STATE:
|
||||
ret = smu_adjust_power_state_dynamic(smu, level, true);
|
||||
ret = smu_adjust_power_state_dynamic(smu, level, true, false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -2343,8 +2345,7 @@ static int smu_switch_power_profile(void *handle,
|
||||
workload[0] = smu->workload_setting[index];
|
||||
}
|
||||
|
||||
if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_MANUAL &&
|
||||
smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM)
|
||||
if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM)
|
||||
smu_bump_power_profile_mode(smu, workload, 0);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -92,7 +92,6 @@
|
||||
|
||||
//Resets
|
||||
#define PPSMC_MSG_PrepareMp1ForUnload 0x2E
|
||||
#define PPSMC_MSG_Mode1Reset 0x2F
|
||||
|
||||
//Set SystemVirtual DramAddrHigh
|
||||
#define PPSMC_MSG_SetSystemVirtualDramAddrHigh 0x30
|
||||
@@ -119,11 +118,12 @@
|
||||
|
||||
//STB to dram log
|
||||
#define PPSMC_MSG_DumpSTBtoDram 0x3D
|
||||
#define PPSMC_MSG_STBtoDramLogSetDramAddrHigh 0x3E
|
||||
#define PPSMC_MSG_STBtoDramLogSetDramAddrLow 0x3F
|
||||
#define PPSMC_MSG_STBtoDramLogSetDramAddress 0x3E
|
||||
#define PPSMC_MSG_DummyUndefined 0x3F
|
||||
#define PPSMC_MSG_STBtoDramLogSetDramSize 0x40
|
||||
#define PPSMC_MSG_SetOBMTraceBufferLogging 0x41
|
||||
|
||||
#define PPSMC_MSG_UseProfilingMode 0x42
|
||||
#define PPSMC_MSG_AllowGfxDcs 0x43
|
||||
#define PPSMC_MSG_DisallowGfxDcs 0x44
|
||||
#define PPSMC_MSG_EnableAudioStutterWA 0x45
|
||||
@@ -135,6 +135,16 @@
|
||||
#define PPSMC_MSG_SetBadMemoryPagesRetiredFlagsPerChannel 0x4B
|
||||
#define PPSMC_MSG_SetPriorityDeltaGain 0x4C
|
||||
#define PPSMC_MSG_AllowIHHostInterrupt 0x4D
|
||||
#define PPSMC_MSG_EnableShadowDpm 0x4E
|
||||
#define PPSMC_MSG_Mode3Reset 0x4F
|
||||
#define PPSMC_Message_Count 0x50
|
||||
#define PPSMC_MSG_SetDriverDramAddr 0x50
|
||||
#define PPSMC_MSG_SetToolsDramAddr 0x51
|
||||
#define PPSMC_MSG_TransferTableSmu2DramWithAddr 0x52
|
||||
#define PPSMC_MSG_TransferTableDram2SmuWithAddr 0x53
|
||||
#define PPSMC_MSG_GetAllRunningSmuFeatures 0x54
|
||||
#define PPSMC_MSG_GetSvi3Voltage 0x55
|
||||
#define PPSMC_MSG_UpdatePolicy 0x56
|
||||
#define PPSMC_MSG_ExtPwrConnSupport 0x57
|
||||
#define PPSMC_MSG_PreloadSwPstateForUclkOverDrive 0x58
|
||||
#define PPSMC_Message_Count 0x59
|
||||
#endif
|
||||
|
||||
@@ -121,6 +121,7 @@ struct mca_ras_info {
|
||||
|
||||
#define P2S_TABLE_ID_A 0x50325341
|
||||
#define P2S_TABLE_ID_X 0x50325358
|
||||
#define P2S_TABLE_ID_3 0x50325303
|
||||
|
||||
// clang-format off
|
||||
static const struct cmn2asic_msg_mapping smu_v13_0_6_message_map[SMU_MSG_MAX_COUNT] = {
|
||||
@@ -271,14 +272,18 @@ static int smu_v13_0_6_init_microcode(struct smu_context *smu)
|
||||
struct amdgpu_device *adev = smu->adev;
|
||||
uint32_t p2s_table_id = P2S_TABLE_ID_A;
|
||||
int ret = 0, i, p2stable_count;
|
||||
int var = (adev->pdev->device & 0xF);
|
||||
char ucode_prefix[15];
|
||||
|
||||
/* No need to load P2S tables in IOV mode */
|
||||
if (amdgpu_sriov_vf(adev))
|
||||
return 0;
|
||||
|
||||
if (!(adev->flags & AMD_IS_APU))
|
||||
if (!(adev->flags & AMD_IS_APU)) {
|
||||
p2s_table_id = P2S_TABLE_ID_X;
|
||||
if (var == 0x5)
|
||||
p2s_table_id = P2S_TABLE_ID_3;
|
||||
}
|
||||
|
||||
amdgpu_ucode_ip_version_decode(adev, MP1_HWIP, ucode_prefix,
|
||||
sizeof(ucode_prefix));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user