Skip to content

Commit

Permalink
Merge tag 'char-misc-4.21-rc1' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/gregkh/char-misc

Pull char/misc driver updates from Greg KH:
 "Here is the big set of char and misc driver patches for 4.21-rc1.

  Lots of different types of driver things in here, as this tree seems
  to be the "collection of various driver subsystems not big enough to
  have their own git tree" lately.

  Anyway, some highlights of the changes in here:

   - binderfs: is it a rule that all driver subsystems will eventually
     grow to have their own filesystem? Binder now has one to handle the
     use of it in containerized systems.

     This was discussed at the Plumbers conference a few months ago and
     knocked into mergable shape very fast by Christian Brauner. Who
     also has signed up to be another binder maintainer, showing a
     distinct lack of good judgement :)

   - binder updates and fixes

   - mei driver updates

   - fpga driver updates and additions

   - thunderbolt driver updates

   - soundwire driver updates

   - extcon driver updates

   - nvmem driver updates

   - hyper-v driver updates

   - coresight driver updates

   - pvpanic driver additions and reworking for more device support

   - lp driver updates. Yes really, it's _finally_ moved to the proper
     parallal port driver model, something I never thought I would see
     happen. Good stuff.

   - other tiny driver updates and fixes.

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'char-misc-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (116 commits)
  MAINTAINERS: add another Android binder maintainer
  intel_th: msu: Fix an off-by-one in attribute store
  stm class: Add a reference to the SyS-T document
  stm class: Fix a module refcount leak in policy creation error path
  char: lp: use new parport device model
  char: lp: properly count the lp devices
  char: lp: use first unused lp number while registering
  char: lp: detach the device when parallel port is removed
  char: lp: introduce list to save port number
  bus: qcom: remove duplicated include from qcom-ebi2.c
  VMCI: Use memdup_user() rather than duplicating its implementation
  char/rtc: Use of_node_name_eq for node name comparisons
  misc: mic: fix a DMA pool free failure
  ptp: fix an IS_ERR() vs NULL check
  genwqe: Fix size check
  binder: implement binderfs
  binder: fix use-after-free due to ksys_close() during fdget()
  bus: fsl-mc: remove duplicated include files
  bus: fsl-mc: explicitly define the fsl_mc_command endianness
  misc: ti-st: make array read_ver_cmd static, shrinks object size
  ...
  • Loading branch information
torvalds committed Dec 29, 2018
2 parents b07039b + fbc4904 commit 457fa34
Show file tree
Hide file tree
Showing 123 changed files with 4,973 additions and 917 deletions.
9 changes: 9 additions & 0 deletions Documentation/ABI/testing/sysfs-bus-thunderbolt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ Description: Holds a comma separated list of device unique_ids that
If a device is authorized automatically during boot its
boot attribute is set to 1.

What: /sys/bus/thunderbolt/devices/.../domainX/iommu_dma_protection
Date: Mar 2019
KernelVersion: 4.21
Contact: [email protected]
Description: This attribute tells whether the system uses IOMMU
for DMA protection. Value of 1 means IOMMU is used 0 means
it is not (DMA protection is solely based on Thunderbolt
security levels).

What: /sys/bus/thunderbolt/devices/.../domainX/security
Date: Sep 2017
KernelVersion: 4.13
Expand Down
20 changes: 20 additions & 0 deletions Documentation/admin-guide/thunderbolt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,26 @@ If the user still wants to connect the device they can either approve
the device without a key or write a new key and write 1 to the
``authorized`` file to get the new key stored on the device NVM.

DMA protection utilizing IOMMU
------------------------------
Recent systems from 2018 and forward with Thunderbolt ports may natively
support IOMMU. This means that Thunderbolt security is handled by an IOMMU
so connected devices cannot access memory regions outside of what is
allocated for them by drivers. When Linux is running on such system it
automatically enables IOMMU if not enabled by the user already. These
systems can be identified by reading ``1`` from
``/sys/bus/thunderbolt/devices/domainX/iommu_dma_protection`` attribute.

The driver does not do anything special in this case but because DMA
protection is handled by the IOMMU, security levels (if set) are
redundant. For this reason some systems ship with security level set to
``none``. Other systems have security level set to ``user`` in order to
support downgrade to older OS, so users who want to automatically
authorize devices when IOMMU DMA protection is enabled can use the
following ``udev`` rule::

ACTION=="add", SUBSYSTEM=="thunderbolt", ATTRS{iommu_dma_protection}=="1", ATTR{authorized}=="0", ATTR{authorized}="1"

Upgrading NVM on Thunderbolt device or host
-------------------------------------------
Since most of the functionality is handled in firmware running on a
Expand Down
57 changes: 57 additions & 0 deletions Documentation/devicetree/bindings/firmware/intel,stratix10-svc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Intel Service Layer Driver for Stratix10 SoC
============================================
Intel Stratix10 SoC is composed of a 64 bit quad-core ARM Cortex A53 hard
processor system (HPS) and Secure Device Manager (SDM). When the FPGA is
configured from HPS, there needs to be a way for HPS to notify SDM the
location and size of the configuration data. Then SDM will get the
configuration data from that location and perform the FPGA configuration.

To meet the whole system security needs and support virtual machine requesting
communication with SDM, only the secure world of software (EL3, Exception
Layer 3) can interface with SDM. All software entities running on other
exception layers must channel through the EL3 software whenever it needs
service from SDM.

Intel Stratix10 service layer driver, running at privileged exception level
(EL1, Exception Layer 1), interfaces with the service providers and provides
the services for FPGA configuration, QSPI, Crypto and warm reset. Service layer
driver also manages secure monitor call (SMC) to communicate with secure monitor
code running in EL3.

Required properties:
-------------------
The svc node has the following mandatory properties, must be located under
the firmware node.

- compatible: "intel,stratix10-svc"
- method: smc or hvc
smc - Secure Monitor Call
hvc - Hypervisor Call
- memory-region:
phandle to the reserved memory node. See
Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
for details

Example:
-------

reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;

service_reserved: svcbuffer@0 {
compatible = "shared-dma-pool";
reg = <0x0 0x0 0x0 0x1000000>;
alignment = <0x1000>;
no-map;
};
};

firmware {
svc {
compatible = "intel,stratix10-svc";
method = "smc";
memory-region = <&service_reserved>;
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Intel Stratix10 SoC FPGA Manager

Required properties:
The fpga_mgr node has the following mandatory property, must be located under
firmware/svc node.

- compatible : should contain "intel,stratix10-soc-fpga-mgr"

Example:

firmware {
svc {
fpga_mgr: fpga-mgr {
compatible = "intel,stratix10-soc-fpga-mgr";
};
};
};
29 changes: 29 additions & 0 deletions Documentation/devicetree/bindings/misc/pvpanic-mmio.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
* QEMU PVPANIC MMIO Configuration bindings

QEMU's emulation / virtualization targets provide the following PVPANIC
MMIO Configuration interface on the "virt" machine.
type:

- a read-write, 16-bit wide data register.

QEMU exposes the data register to guests as memory mapped registers.

Required properties:

- compatible: "qemu,pvpanic-mmio".
- reg: the MMIO region used by the device.
* Bytes 0x0 Write panic event to the reg when guest OS panics.
* Bytes 0x1 Reserved.

Example:

/ {
#size-cells = <0x2>;
#address-cells = <0x2>;

pvpanic-mmio@9060000 {
compatible = "qemu,pvpanic-mmio";
reg = <0x0 0x9060000 0x0 0x2>;
};
};

3 changes: 3 additions & 0 deletions Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Required properties:
- compatible: should be "amlogic,meson-gxbb-efuse"
- clocks: phandle to the efuse peripheral clock provided by the
clock controller.

= Data cells =
Are child nodes of eFuse, bindings of which as described in
Expand All @@ -11,6 +13,7 @@ Example:

efuse: efuse {
compatible = "amlogic,meson-gxbb-efuse";
clocks = <&clkc CLKID_EFUSE>;
#address-cells = <1>;
#size-cells = <1>;

Expand Down
30 changes: 30 additions & 0 deletions Documentation/driver-api/firmware/other_interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,33 @@ EDD Interfaces
.. kernel-doc:: drivers/firmware/edd.c
:internal:

Intel Stratix10 SoC Service Layer
---------------------------------
Some features of the Intel Stratix10 SoC require a level of privilege
higher than the kernel is granted. Such secure features include
FPGA programming. In terms of the ARMv8 architecture, the kernel runs
at Exception Level 1 (EL1), access to the features requires
Exception Level 3 (EL3).

The Intel Stratix10 SoC service layer provides an in kernel API for
drivers to request access to the secure features. The requests are queued
and processed one by one. ARM’s SMCCC is used to pass the execution
of the requests on to a secure monitor (EL3).

.. kernel-doc:: include/linux/firmware/intel/stratix10-svc-client.h
:functions: stratix10_svc_command_code

.. kernel-doc:: include/linux/firmware/intel/stratix10-svc-client.h
:functions: stratix10_svc_client_msg

.. kernel-doc:: include/linux/firmware/intel/stratix10-svc-client.h
:functions: stratix10_svc_command_reconfig_payload

.. kernel-doc:: include/linux/firmware/intel/stratix10-svc-client.h
:functions: stratix10_svc_cb_data

.. kernel-doc:: include/linux/firmware/intel/stratix10-svc-client.h
:functions: stratix10_svc_client

.. kernel-doc:: drivers/firmware/stratix10-svc.c
:export:
1 change: 1 addition & 0 deletions Documentation/trace/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ Linux Tracing Technologies
hwlat_detector
intel_th
stm
sys-t
4 changes: 3 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,7 @@ M: Arve Hjønnevåg <[email protected]>
M: Todd Kjos <[email protected]>
M: Martijn Coenen <[email protected]>
M: Joel Fernandes <[email protected]>
M: Christian Brauner <[email protected]>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
L: [email protected]
S: Supported
Expand Down Expand Up @@ -1442,6 +1443,7 @@ F: arch/arm/mach-ep93xx/micro9.c

ARM/CORESIGHT FRAMEWORK AND DRIVERS
M: Mathieu Poirier <[email protected]>
R: Suzuki K Poulose <[email protected]>
L: [email protected] (moderated for non-subscribers)
S: Maintained
F: drivers/hwtracing/coresight/*
Expand Down Expand Up @@ -16242,7 +16244,7 @@ F: drivers/vme/
F: include/linux/vme*

VMWARE BALLOON DRIVER
M: Xavier Deguillard <xdeguillard@vmware.com>
M: Julien Freche <jfreche@vmware.com>
M: Nadav Amit <[email protected]>
M: "VMware, Inc." <[email protected]>
L: [email protected]
Expand Down
33 changes: 33 additions & 0 deletions arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@
#address-cells = <2>;
#size-cells = <2>;

reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;

service_reserved: svcbuffer@0 {
compatible = "shared-dma-pool";
reg = <0x0 0x0 0x0 0x1000000>;
alignment = <0x1000>;
no-map;
};
};

cpus {
#address-cells = <1>;
#size-cells = <0>;
Expand Down Expand Up @@ -93,6 +106,14 @@
interrupt-parent = <&intc>;
ranges = <0 0 0 0xffffffff>;

base_fpga_region {
#address-cells = <0x1>;
#size-cells = <0x1>;

compatible = "fpga-region";
fpga-mgr = <&fpga_mgr>;
};

clkmgr: clock-controller@ffd10000 {
compatible = "intel,stratix10-clkmgr";
reg = <0xffd10000 0x1000>;
Expand Down Expand Up @@ -537,5 +558,17 @@

status = "disabled";
};

firmware {
svc {
compatible = "intel,stratix10-svc";
method = "smc";
memory-region = <&service_reserved>;

fpga_mgr: fpga-mgr {
compatible = "intel,stratix10-soc-fpga-mgr";
};
};
};
};
};
11 changes: 11 additions & 0 deletions drivers/acpi/property.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,24 @@ static int acpi_data_get_property_array(const struct acpi_device_data *data,
acpi_object_type type,
const union acpi_object **obj);

/*
* The GUIDs here are made equivalent to each other in order to avoid extra
* complexity in the properties handling code, with the caveat that the
* kernel will accept certain combinations of GUID and properties that are
* not defined without a warning. For instance if any of the properties
* from different GUID appear in a property list of another, it will be
* accepted by the kernel. Firmware validation tools should catch these.
*/
static const guid_t prp_guids[] = {
/* ACPI _DSD device properties GUID: daffd814-6eba-4d8c-8a91-bc9bbf4aa301 */
GUID_INIT(0xdaffd814, 0x6eba, 0x4d8c,
0x8a, 0x91, 0xbc, 0x9b, 0xbf, 0x4a, 0xa3, 0x01),
/* Hotplug in D3 GUID: 6211e2c0-58a3-4af3-90e1-927a4e0c55a4 */
GUID_INIT(0x6211e2c0, 0x58a3, 0x4af3,
0x90, 0xe1, 0x92, 0x7a, 0x4e, 0x0c, 0x55, 0xa4),
/* External facing port GUID: efcc06cc-73ac-4bc3-bff0-76143807c389 */
GUID_INIT(0xefcc06cc, 0x73ac, 0x4bc3,
0xbf, 0xf0, 0x76, 0x14, 0x38, 0x07, 0xc3, 0x89),
};

static const guid_t ads_guid =
Expand Down
12 changes: 12 additions & 0 deletions drivers/android/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ config ANDROID_BINDER_IPC
Android process, using Binder to identify, invoke and pass arguments
between said processes.

config ANDROID_BINDERFS
bool "Android Binderfs filesystem"
depends on ANDROID_BINDER_IPC
default n
---help---
Binderfs is a pseudo-filesystem for the Android Binder IPC driver
which can be mounted per-ipc namespace allowing to run multiple
instances of Android.
Each binderfs mount initially only contains a binder-control device.
It can be used to dynamically allocate new binder IPC devices via
ioctls.

config ANDROID_BINDER_DEVICES
string "Android Binder devices"
depends on ANDROID_BINDER_IPC
Expand Down
1 change: 1 addition & 0 deletions drivers/android/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ccflags-y += -I$(src) # needed for trace events

obj-$(CONFIG_ANDROID_BINDERFS) += binderfs.o
obj-$(CONFIG_ANDROID_BINDER_IPC) += binder.o binder_alloc.o
obj-$(CONFIG_ANDROID_BINDER_IPC_SELFTEST) += binder_alloc_selftest.o
Loading

0 comments on commit 457fa34

Please sign in to comment.