Re: [PATCH 2/8] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-12-05 Thread Nicholas Piggin
Excerpts from Andy Lutomirski's message of December 6, 2020 10:36 am: > On Sat, Dec 5, 2020 at 3:15 PM Nicholas Piggin wrote: >> >> Excerpts from Andy Lutomirski's message of December 6, 2020 2:11 am: >> > > >> If an mm was lazy tlb for a kernel thread and then it becomes unlazy, >> and if switch

[powerpc:next-test] BUILD SUCCESS 8817aabb1bdd5811130f94ff6442bb19c9158a3a

2020-12-05 Thread kernel test robot
mips allyesconfig mips allmodconfig powerpc allyesconfig powerpc allmodconfig powerpc allnoconfig i386 randconfig-a005-20201205 i386

[powerpc:merge] BUILD SUCCESS 9acd775e4579bde0a6d937d72f9669e418aa87ad

2020-12-05 Thread kernel test robot
ig powerpc allnoconfig i386 randconfig-a005-20201205 i386 randconfig-a004-20201205 i386 randconfig-a001-20201205 i386 randconfig-a002-20201205 i386 randconfig-a006-20201205 i386 randc

Re: [PATCH 2/8] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-12-05 Thread Andy Lutomirski
On Sat, Dec 5, 2020 at 3:15 PM Nicholas Piggin wrote: > > Excerpts from Andy Lutomirski's message of December 6, 2020 2:11 am: > > > If an mm was lazy tlb for a kernel thread and then it becomes unlazy, > and if switch_mm is serialising but return to user is not, then you > need a serialising ins

[PATCH 15/20] ethernet: ucc_geth: use UCC_GETH_{RX, TX}_BD_RING_ALIGNMENT macros directly

2020-12-05 Thread Rasmus Villemoes
These macros both have the value 32, there's no point first initializing align to a lower value. If anything, one could throw in a BUILD_BUG_ON(UCC_GETH_TX_BD_RING_ALIGNMENT < 4), but it's not worth it - lots of code depends on named constants having sensible values. Signed-off-by: Rasmus Villemo

[PATCH 12/20] ethernet: ucc_geth: factor out parsing of {rx, tx}-clock{, -name} properties

2020-12-05 Thread Rasmus Villemoes
Reduce the code duplication a bit by moving the parsing of rx-clock-name and the fallback handling to a helper function. Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 79 ++- 1 file changed, 35 insertions(+), 44 deletions(-) diff --git a/dri

[PATCH 10/20] ethernet: ucc_geth: remove {rx, tx}_glbl_pram_offset from struct ucc_geth_private

2020-12-05 Thread Rasmus Villemoes
These fields are only used within ucc_geth_startup(), so they might as well be local variables in that function rather than being stashed in struct ucc_geth_private. Aside from making that struct a tiny bit smaller, it also shortens some lines (getting rid of pointless casts while here), and fixes

Re: [PATCH 2/8] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-12-05 Thread Nicholas Piggin
Excerpts from Andy Lutomirski's message of December 6, 2020 2:11 am: > >> On Dec 5, 2020, at 12:00 AM, Nicholas Piggin wrote: >> >> >> I disagree. Until now nobody following it noticed that the mm gets >> un-lazied in other cases, because that was not too clear from the >> code (only indirectly

Re: [PATCH 11/20] ethernet: ucc_geth: fix use-after-free in ucc_geth_remove()

2020-12-05 Thread Rasmus Villemoes
> I only noticed because I needed to add a free of the ug_info in a later > patch. Where, ironically, I add a use-after-free bug by freeing ug_info before the ucc_geth_memclean() call. :facepalm:

Re: [PATCH 00/20] ethernet: ucc_geth: assorted fixes and simplifications

2020-12-05 Thread Rasmus Villemoes
On 05/12/2020 22.27, Jakub Kicinski wrote: > On Sat, 5 Dec 2020 22:11:39 +0100 Rasmus Villemoes wrote: >>> rebase (retest) and post them against the net tree: >>> >>> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/ >> >> So I thought this would go through Li Yang's tree. That's wh

Re: [PATCH 11/20] ethernet: ucc_geth: fix use-after-free in ucc_geth_remove()

2020-12-05 Thread Rasmus Villemoes
On 05/12/2020 22.19, Jakub Kicinski wrote: > On Sat, 5 Dec 2020 22:04:28 +0100 Rasmus Villemoes wrote: >> On 05/12/2020 21.48, Jakub Kicinski wrote: >>> On Sat, 5 Dec 2020 20:17:34 +0100 Rasmus Villemoes wrote: - unregister_netdev(dev); - free_netdev(dev); ucc_geth_memclean(u

Re: [PATCH 00/20] ethernet: ucc_geth: assorted fixes and simplifications

2020-12-05 Thread Jakub Kicinski
On Sat, 5 Dec 2020 22:11:39 +0100 Rasmus Villemoes wrote: > > Looks like a nice clean up on a quick look. > > > > Please separate patches 1 and 11 (which are the two bug fixes I see) > > I think patch 2 is a bug fix as well, but I'd like someone from NXP to > comment. Sure, makes sense. > > r

Re: [PATCH 11/20] ethernet: ucc_geth: fix use-after-free in ucc_geth_remove()

2020-12-05 Thread Jakub Kicinski
On Sat, 5 Dec 2020 22:04:28 +0100 Rasmus Villemoes wrote: > On 05/12/2020 21.48, Jakub Kicinski wrote: > > On Sat, 5 Dec 2020 20:17:34 +0100 Rasmus Villemoes wrote: > >> - unregister_netdev(dev); > >> - free_netdev(dev); > >>ucc_geth_memclean(ugeth); > >>if (of_phy_is_fixed_link(np)) >

Re: [PATCH 00/20] ethernet: ucc_geth: assorted fixes and simplifications

2020-12-05 Thread Rasmus Villemoes
On 05/12/2020 21.53, Jakub Kicinski wrote: > On Sat, 5 Dec 2020 20:17:23 +0100 Rasmus Villemoes wrote: >> While trying to figure out how to allow bumping the MTU with the >> ucc_geth driver, I fell into a rabbit hole and stumbled on a whole >> bunch of issues of varying importance - some are outri

Re: [PATCH 11/20] ethernet: ucc_geth: fix use-after-free in ucc_geth_remove()

2020-12-05 Thread Rasmus Villemoes
On 05/12/2020 21.48, Jakub Kicinski wrote: > On Sat, 5 Dec 2020 20:17:34 +0100 Rasmus Villemoes wrote: >> -unregister_netdev(dev); >> -free_netdev(dev); >> ucc_geth_memclean(ugeth); >> if (of_phy_is_fixed_link(np)) >> of_phy_deregister_fixed_link(np); >> of_node

Re: [PATCH 00/20] ethernet: ucc_geth: assorted fixes and simplifications

2020-12-05 Thread Jakub Kicinski
On Sat, 5 Dec 2020 20:17:23 +0100 Rasmus Villemoes wrote: > While trying to figure out how to allow bumping the MTU with the > ucc_geth driver, I fell into a rabbit hole and stumbled on a whole > bunch of issues of varying importance - some are outright bug fixes, > while most are a matter of simp

Re: [PATCH 11/20] ethernet: ucc_geth: fix use-after-free in ucc_geth_remove()

2020-12-05 Thread Jakub Kicinski
On Sat, 5 Dec 2020 20:17:34 +0100 Rasmus Villemoes wrote: > - unregister_netdev(dev); > - free_netdev(dev); > ucc_geth_memclean(ugeth); > if (of_phy_is_fixed_link(np)) > of_phy_deregister_fixed_link(np); > of_node_put(ugeth->ug_info->tbi_node); > of_no

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.10-5 tag

2020-12-05 Thread pr-tracker-bot
The pull request you sent on Sat, 05 Dec 2020 23:19:45 +1100: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-5.10-5 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/32f741b02f1a84dd15cdaf74ea3c8d724f812318 Thank you! -- Deet-doot-d

[PATCH 20/20] ethernet: ucc_geth: simplify rx/tx allocations

2020-12-05 Thread Rasmus Villemoes
Since kmalloc() is nowadays [1] guaranteed to return naturally aligned (i.e., aligned to the size itself) memory for power-of-2 sizes, we don't need to over-allocate the align amount, compute an aligned address within the allocation, and (for later freeing) also storing the original pointer [2]. I

[PATCH 19/20] ethernet: ucc_geth: inform the compiler that numQueues is always 1

2020-12-05 Thread Rasmus Villemoes
The numQueuesTx and numQueuesRx members of struct ucc_geth_info are never set to anything but 1, and never have been. It's unclear how well the code supporting multiple queues would work. Until somebody wants to play with enabling that, help the compiler eliminate a lot of dead code and loops that

[PATCH 18/20] ethernet: ucc_geth: add helper to replace repeated switch statements

2020-12-05 Thread Rasmus Villemoes
The translation from the ucc_geth_num_of_threads enum value to the actual count can be written somewhat more compactly with a small lookup table, allowing us to replace the four switch statements. Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 100 +--

[PATCH 17/20] ethernet: ucc_geth: replace kmalloc_array()+for loop by kcalloc()

2020-12-05 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c index c9f619908561..3aebea191b52 100644 --- a/dr

[PATCH 16/20] ethernet: ucc_geth: remove bd_mem_part and all associated code

2020-12-05 Thread Rasmus Villemoes
The bd_mem_part member of ucc_geth_info always has the value MEM_PART_SYSTEM, and AFAICT, there has never been any code setting it to any other value. Moreover, muram is a somewhat precious resource, so there's no point using that when normal memory serves just as well. Apart from removing a lot o

[PATCH 14/20] ethernet: ucc_geth: don't statically allocate eight ucc_geth_info

2020-12-05 Thread Rasmus Villemoes
struct ucc_geth_info is somewhat large, and on systems with only one or two UCC instances, that just wastes a few KB of memory. So allocate and populate a chunk of memory at probe time instead of initializing them all during driver init. Note that the existing "ug_info == NULL" check was dead code

[PATCH 13/20] ethernet: ucc_geth: constify ugeth_primary_info

2020-12-05 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c index 700eafef4921..a06744d8b4af 100644 --- a/drivers/net/ethern

[PATCH 11/20] ethernet: ucc_geth: fix use-after-free in ucc_geth_remove()

2020-12-05 Thread Rasmus Villemoes
ugeth is the netdiv_priv() part of the netdevice. Accessing the memory pointed to by ugeth (such as done by ucc_geth_memclean() and the two of_node_puts) after free_netdev() is thus use-after-free. Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 4 ++-- 1 file cha

[PATCH 09/20] ethernet: ucc_geth: replace kmalloc+memset by kzalloc

2020-12-05 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c index f854ff90f238..e1574c14b7e5 100644 --- a/drivers/net/et

[PATCH 03/20] ethernet: ucc_geth: remove unused read of temoder field

2020-12-05 Thread Rasmus Villemoes
In theory, such a read-after-write might be required by the hardware, but nothing in the data sheet suggests that to be the case. The name test also suggests that it's some debug leftover. Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 3 --- 1 file changed, 3 de

[PATCH 08/20] ethernet: ucc_geth: remove unnecessary memset_io() calls

2020-12-05 Thread Rasmus Villemoes
These buffers have all just been handed out from qe_muram_alloc(), aka cpm_muram_alloc(), and the helper cpm_muram_alloc_common() already does memset_io(cpm_muram_addr(start), 0, size); Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 19 --

[PATCH 07/20] ethernet: ucc_geth: use qe_muram_free_addr()

2020-12-05 Thread Rasmus Villemoes
This removes the explicit NULL checks, and allows us to stop storing at least some of the _offset values separately. Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 77 ++- 1 file changed, 33 insertions(+), 44 deletions(-) diff --git a/drivers

[PATCH 06/20] soc: fsl: qe: add cpm_muram_free_addr() helper

2020-12-05 Thread Rasmus Villemoes
Add a helper that takes a virtual address rather than the muram offset. This will be used in a couple of places to avoid having to store both the offset and the virtual address, as well as removing NULL checks from the callers. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_common.c |

[PATCH 04/20] soc: fsl: qe: make cpm_muram_offset take a const void* argument

2020-12-05 Thread Rasmus Villemoes
Allow passing const-qualified pointers without requiring a cast in the caller. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_common.c | 2 +- include/soc/fsl/qe/qe.h| 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_common.c b/drive

[PATCH 05/20] soc: fsl: qe: store muram_vbase as a void pointer instead of u8

2020-12-05 Thread Rasmus Villemoes
The two functions cpm_muram_offset() and cpm_muram_dma() both need a cast currently, one casts muram_vbase to do the pointer arithmetic on void pointers, the other casts the the passed-in address u8*. It's simpler and more consistent to just always use void* and drop all the casting. Signed-off-b

[PATCH 00/20] ethernet: ucc_geth: assorted fixes and simplifications

2020-12-05 Thread Rasmus Villemoes
While trying to figure out how to allow bumping the MTU with the ucc_geth driver, I fell into a rabbit hole and stumbled on a whole bunch of issues of varying importance - some are outright bug fixes, while most are a matter of simplifying the code to make it more accessible. At the end of digging

[PATCH 02/20] ethernet: ucc_geth: fix definition and size of ucc_geth_tx_global_pram

2020-12-05 Thread Rasmus Villemoes
Table 8-53 in the QUICC Engine Reference manual shows definitions of fields up to a size of 192 bytes, not just 128. But in table 8-111, one does find the text Base Address of the Global Transmitter Parameter RAM Page. [...] The user needs to allocate 128 bytes for this page. The address must

[PATCH 01/20] ethernet: ucc_geth: set dev->max_mtu to 1518

2020-12-05 Thread Rasmus Villemoes
All the buffers and registers are already set up appropriately for an MTU slightly above 1500, so we just need to expose this to the networking stack. AFAICT, there's no need to implement .ndo_change_mtu when the receive buffers are always set up to support the max_mtu. This fixes several warnings

Re: [PATCH 2/8] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-12-05 Thread Andy Lutomirski
> On Dec 5, 2020, at 12:00 AM, Nicholas Piggin wrote: > > > I disagree. Until now nobody following it noticed that the mm gets > un-lazied in other cases, because that was not too clear from the > code (only indirectly using non-standard terminology in the arch > support document). > In other

[PATCH v3 05/10] powerpc: dts: akebono: Harmonize EHCI/OHCI DT nodes name

2020-12-05 Thread Serge Semin
In accordance with the Generic EHCI/OHCI bindings the corresponding node name is suppose to comply with the Generic USB HCD DT schema, which requires the USB nodes to have the name acceptable by the regexp: "^usb(@.*)?" . Make sure the "generic-ehci" and "generic-ohci"-compatible nodes are correctl

[PATCH RESEND v3 00/10] dt-bindings: usb: Harmonize xHCI/EHCI/OHCI/DWC3 nodes name

2020-12-05 Thread Serge Semin
As the subject states this series is an attempt to harmonize the xHCI, EHCI, OHCI and DWC USB3 DT nodes with the DT schema introduced in the framework of the patchset [1]. Firstly as Krzysztof suggested we've deprecated a support of DWC USB3 controllers with "synopsys,"-vendor prefix compatible st

[PATCH v5 19/19] dt-bindings: usb: intel, keembay-dwc3: Validate DWC3 sub-node

2020-12-05 Thread Serge Semin
Intel Keem Bay DWC3 compatible DT nodes are supposed to have a DWC USB3 compatible sub-node to describe a fully functioning USB interface. Let's use the available DWC USB3 DT schema to validate the Qualcomm DWC3 sub-nodes. Note since the generic DWC USB3 DT node is supposed to be named as generic

[PATCH v5 18/19] dt-bindings: usb: qcom,dwc3: Validate DWC3 sub-node

2020-12-05 Thread Serge Semin
Qualcomm msm8996/sc7180/sdm845 DWC3 compatible DT nodes are supposed to have a DWC USB3 compatible sub-node to describe a fully functioning USB interface. Let's use the available DWC USB3 DT schema to validate the Qualcomm DWC3 sub-nodes. Note since the generic DWC USB3 DT node is supposed to be n

[PATCH v5 17/19] dt-bindings: usb: keystone-dwc3: Validate DWC3 sub-node

2020-12-05 Thread Serge Semin
TI Keystone DWC3 compatible DT node is supposed to have a DWC USB3 compatible sub-node to describe a fully functioning USB interface. Since DWC USB3 has now got a DT schema describing its DT node, let's make sure the TI Keystone DWC3 sub-node passes validation against it. Signed-off-by: Serge Semi

[PATCH v5 16/19] dt-bindings: usb: meson-g12a-usb: Validate DWC2/DWC3 sub-nodes

2020-12-05 Thread Serge Semin
Amlogic G12A USB DT sub-nodes are supposed to be compatible with the generic DWC USB2 and USB3 devices. Since now we've got DT schemas for both of the later IP cores let's make sure that the Amlogic G12A USB DT nodes are fully evaluated including the DWC sub-nodes. Signed-off-by: Serge Semin Revi

[PATCH v5 15/19] dt-bindings: usb: meson-g12a-usb: Fix FL-adj property value

2020-12-05 Thread Serge Semin
An empty snps,quirk-frame-length-adjustment won't cause any change performed by the driver. Moreover the DT schema validation will fail, since it expects the property being assigned with some value. So set fix the example by setting a valid FL-adj value in accordance with Neil Armstrong comment. L

[PATCH v5 14/19] dt-bindings: usb: dwc3: Add Frame Length Adj constraints

2020-12-05 Thread Serge Semin
In accordance with the IP core databook the snps,quirk-frame-length-adjustment property can be set within [0, 0x3F]. Let's make sure the DT schema applies a correct constraints on the property. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/usb/snps,dw

[PATCH v5 09/19] dt-bindings: usb: renesas-xhci: Refer to the usb-xhci.yaml file

2020-12-05 Thread Serge Semin
With minor peculiarities (like uploading some vendor-specific firmware) these are just Generic xHCI controllers fully compatible with its properties. Make sure the Renesas USB xHCI DT nodes are also validated against the Generic xHCI DT schema. Signed-off-by: Serge Semin Reviewed-by: Rob Herring

[PATCH v5 10/19] dt-bindings: usb: Convert DWC USB3 bindings to DT schema

2020-12-05 Thread Serge Semin
DWC USB3 DT node is supposed to be compliant with the Generic xHCI Controller schema, but with additional vendor-specific properties, the controller-specific reference clocks and PHYs. So let's convert the currently available legacy text-based DWC USB3 bindings to the DT schema and make sure the DW

[PATCH v5 12/19] dt-bindings: usb: dwc3: Add synopsys, dwc3 compatible string

2020-12-05 Thread Serge Semin
The DWC USB3 driver and some DTS files like Exynos 5250, Keystone k2e, etc expects the DWC USB3 DT node to have the compatible string with the "synopsys" vendor prefix. Let's add the corresponding compatible string to the controller DT schema, but mark it as deprecated seeing the Synopsys, Inc. is

[PATCH v5 13/19] dt-bindings: usb: dwc3: Add Tx De-emphasis constraints

2020-12-05 Thread Serge Semin
In accordance with the driver comments the PIPE3 de-emphasis can be tuned to be either -6dB, -2.5dB or disabled. Let's add the de-emphasis property constraints so the DT schema would make sure the controller DT node is equipped with correct value. Signed-off-by: Serge Semin Reviewed-by: Rob Herri

[PATCH v5 07/19] dt-bindings: usb: Convert xHCI bindings to DT schema

2020-12-05 Thread Serge Semin
Currently the DT bindings of Generic xHCI Controllers are described by means of the legacy text file. Since such format is deprecated in favor of the DT schema, let's convert the Generic xHCI Controllers bindings file to the corresponding yaml files. There will be two of them: a DT schema for the x

[PATCH v5 05/19] dt-bindings: usb: usb-hcd: Add "tpl-support" property

2020-12-05 Thread Serge Semin
The host controller device might be designed to work for the particular products or applications. In that case its DT node is supposed to be equipped with the tpl-support property. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v2: - Grammar fix: "s/it'/its" - Discard '|' fr

[PATCH v5 11/19] dt-bindings: usb: dwc3: Add interrupt-names property support

2020-12-05 Thread Serge Semin
The controller driver supports two types of DWC USB3 devices: with a common interrupt lane and with individual interrupts for each mode. Add support for both these cases to the DWC USB3 DT schema. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v2: - Grammar fix: "s/both of t

[PATCH v5 08/19] dt-bindings: usb: xhci: Add Broadcom STB v2 compatible device

2020-12-05 Thread Serge Semin
For some reason the "brcm,xhci-brcm-v2" compatible string has been missing in the original bindings file. Add it to the Generic xHCI Controllers DT schema since the controller driver expects it to be supported. Signed-off-by: Serge Semin Acked-by: Florian Fainelli Reviewed-by: Rob Herring ---

[PATCH v5 06/19] dt-bindings: usb: Add generic "usb-phy" property

2020-12-05 Thread Serge Semin
Even though the Generic PHY framework is the more preferable way of setting the USB PHY up, there are still many dts-files and DT bindings which rely on having the legacy "usb-phy" specified to attach particular USB PHYs to USB cores. Let's have the "usb-phy" property described in the generic USB H

[PATCH v5 04/19] dt-bindings: usb: Add "ulpi/serial/hsic" PHY types

2020-12-05 Thread Serge Semin
Aside from the UTMI+ there are also ULPI, Serial and HSIC PHY types that can be specified in the phy_type HCD property. Add them to the enumeration of the acceptable values. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v2: - Grammar fix: "s/PHY types can be/PHY types that

[PATCH v5 00/19] dt-bindings: usb: Add generic USB HCD, xHCI, DWC USB3 DT schema

2020-12-05 Thread Serge Semin
We've performed some work on the Generic USB HCD, xHCI and DWC USB3 DT bindings in the framework of the Baikal-T1 SoC support integration into the kernel. This patchset is a result of that work. First of all we moved the generic USB properties from the legacy text bindings to the USB DT schema. Th

[PATCH v5 03/19] dt-bindings: usb: usb-drd: Add "otg-rev" property constraints

2020-12-05 Thread Serge Semin
There are only four OTG revisions are currently supported by the kernel: 0x0100, 0x0120, 0x0130, 0x0200. Any another value is considered as invalid. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v4: - Move the constraints to the usb-drd.yaml schema where the otg-rev prope

[PATCH v5 02/19] dt-bindings: usb: Convert generic USB properties to DT schemas

2020-12-05 Thread Serge Semin
The generic USB properties have been described in the legacy bindings text file: Documentation/devicetree/bindings/usb/generic.txt . Let's convert its content into the generic USB, USB HCD and USB DRD DT schemas. So the Generic USB schema will be applicable to all USB controllers, USB HCD - for the

[PATCH v5 01/19] dt-bindings: usb: usb-hcd: Detach generic USB controller properties

2020-12-05 Thread Serge Semin
There can be three distinctive types of the USB controllers: USB hosts, USB peripherals/gadgets and USB OTG, which can switch from one role to another. In order to have that hierarchy handled in the DT binding files, we need to collect common properties in a common DT schema and specific properties

Re: [PATCH] powerpc/mm: Fix KUAP warning by providing copy_from_kernel_nofault_allowed()

2020-12-05 Thread Christoph Hellwig
Yes, I think at this point in the release cycle the specific powerpc fix is safer anyway. But this screams for an eventual general solution.

Re: [PATCH] powerpc/mm: Fix KUAP warning by providing copy_from_kernel_nofault_allowed()

2020-12-05 Thread Christophe Leroy
Le 05/12/2020 à 10:56, Christophe Leroy a écrit : Le 05/12/2020 à 09:48, Christoph Hellwig a écrit : On Sat, Dec 05, 2020 at 08:43:06AM +, Christophe Leroy wrote: Since commit c33165253492 ("powerpc: use non-set_fs based maccess routines"), userspace access is not granted anymore when

[GIT PULL] Please pull powerpc/linux.git powerpc-5.10-5 tag

2020-12-05 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some more powerpc fixes for 5.10. The change to kernel/cpu.c is just adding an optional arch override, and has Peter's ack. cheers The following changes since commit b6b79dd53082db11070b4368d85dd6699ff0b063: powerpc/64s:

Re: [PATCH 13/29] powerpc/pseries/mobility: use stop_machine for join/suspend

2020-12-05 Thread Michael Ellerman
Nathan Lynch writes: > Hi Michael, > > Michael Ellerman writes: >> Nathan Lynch writes: >>> The partition suspend sequence as specified in the platform >>> architecture requires that all active processor threads call >>> H_JOIN, which: >> ... >>> diff --git a/arch/powerpc/platforms/pseries/mobil

Re: [PATCH] powerpc: Stop exporting __clear_user which is now inlined.

2020-12-05 Thread Michael Ellerman
Michal Suchanek writes: > Stable commit 452e2a83ea23 ("powerpc: Fix __clear_user() with KUAP > enabled") redefines __clear_user as inline function but does not remove > the export. > > Fixes: 452e2a83ea23 ("powerpc: Fix __clear_user() with KUAP enabled") > > Signed-off-by: Michal Suchanek > --- >

Re: [PATCH] MAINTAINERS: Update 68k Mac entry

2020-12-05 Thread Michael Ellerman
Finn Thain writes: > Two files under drivers/macintosh are actually m68k-only. I think that > patches for these files should be reviewed in the appropriate forum and > merged via the appropriate tree, rather than falling to the powerpc > maintainers to deal with. Update the "M68K ON APPLE MACINTOS

Re: [PATCH] powerpc/mm: Fix KUAP warning by providing copy_from_kernel_nofault_allowed()

2020-12-05 Thread Christophe Leroy
Le 05/12/2020 à 09:48, Christoph Hellwig a écrit : On Sat, Dec 05, 2020 at 08:43:06AM +, Christophe Leroy wrote: Since commit c33165253492 ("powerpc: use non-set_fs based maccess routines"), userspace access is not granted anymore when using copy_from_kernel_nofault() However, kthread_pr

Re: [PATCH v2] clk: renesas: r9a06g032: Drop __packed for portability

2020-12-05 Thread Geert Uytterhoeven
Hi Stephen, On Sat, Dec 5, 2020 at 7:24 AM Stephen Boyd wrote: > Quoting Geert Uytterhoeven (2020-11-30 00:57:43) > > The R9A06G032 clock driver uses an array of packed structures to reduce > > kernel size. However, this array contains pointers, which are no longer > > aligned naturally, and can

Re: [PATCH] powerpc/mm: Fix KUAP warning by providing copy_from_kernel_nofault_allowed()

2020-12-05 Thread Christoph Hellwig
On Sat, Dec 05, 2020 at 08:43:06AM +, Christophe Leroy wrote: > Since commit c33165253492 ("powerpc: use non-set_fs based maccess > routines"), userspace access is not granted anymore when using > copy_from_kernel_nofault() > > However, kthread_probe_data() uses copy_from_kernel_nofault() > to

[PATCH] powerpc/mm: Fix KUAP warning by providing copy_from_kernel_nofault_allowed()

2020-12-05 Thread Christophe Leroy
Since commit c33165253492 ("powerpc: use non-set_fs based maccess routines"), userspace access is not granted anymore when using copy_from_kernel_nofault() However, kthread_probe_data() uses copy_from_kernel_nofault() to check validity of pointers. When the pointer is NULL, it points to userspace,

Re: [PATCH 2/8] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-12-05 Thread Nicholas Piggin
Excerpts from Andy Lutomirski's message of December 3, 2020 3:09 pm: > On Tue, Dec 1, 2020 at 6:50 PM Nicholas Piggin wrote: >> >> Excerpts from Andy Lutomirski's message of November 29, 2020 3:55 am: >> > On Sat, Nov 28, 2020 at 8:02 AM Nicholas Piggin wrote: >> >> >> >> And get rid of the gener