lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 24 Mar 2022 19:49:30 +0100
From:   Krzysztof Kozlowski <krzk@...nel.org>
To:     Adrien Thierry <athierry@...hat.com>, linux-kernel@...r.kernel.org
Cc:     Rob Herring <robh+dt@...nel.org>,
        Nicolas Saenz Julienne <nsaenz@...nel.org>,
        Florian Fainelli <f.fainelli@...il.com>,
        Ray Jui <rjui@...adcom.com>,
        Scott Branden <sbranden@...adcom.com>,
        bcm-kernel-feedback-list@...adcom.com,
        Stefan Wahren <stefan.wahren@...e.com>,
        devicetree@...r.kernel.org, linux-rpi-kernel@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Gaston Gonzalez <gascoar@...il.com>,
        Ojaswin Mujoo <ojaswin98@...il.com>,
        linux-staging@...ts.linux.dev
Subject: Re: [PATCH v2 2/2] staging: vchiq_arm: Use bcm2711 compatible string
 for bcm2711-based RPi

On 24/03/2022 18:26, Adrien Thierry wrote:
> Use bcm2711 compatible string in vchiq driver and device tree for
> bcm2711-based Raspberry Pi (Raspberry Pi 4). This is consistent with
> what the downstream device tree uses, and allows running the vchiq
> driver on the upstream kernel with the downstream device tree.
> 
> Signed-off-by: Adrien Thierry <athierry@...hat.com>
> ---
>  arch/arm/boot/dts/bcm2711-rpi.dtsi                           | 1 +

DTS is always separate, independent of device drivers. If you mix them,
it's usually a sign of ABI breakage or compatibility issues, so don't
mix them.

>  .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c    | 5 +++++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/bcm2711-rpi.dtsi b/arch/arm/boot/dts/bcm2711-rpi.dtsi
> index ca266c5d9f9b..c868d1dcaba7 100644
> --- a/arch/arm/boot/dts/bcm2711-rpi.dtsi
> +++ b/arch/arm/boot/dts/bcm2711-rpi.dtsi
> @@ -70,5 +70,6 @@ blconfig: nvram@0 {
>  };
>  
>  &vchiq {
> +	compatible = "brcm,bcm2711-vchiq";

This looks weird. Is BCM2711 on Raspberry Pi 4 different than other
BCM2711? Commit msg also does not explain this.


>  	interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
>  };
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> index 3a2e4582db8e..136c664132f4 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> @@ -81,6 +81,10 @@ static struct vchiq_drvdata bcm2836_drvdata = {
>  	.cache_line_size = 64,
>  };
>  
> +static struct vchiq_drvdata bcm2711_drvdata = {
> +	.cache_line_size = 64,
> +};
> +
>  struct vchiq_arm_state {
>  	/* Keepalive-related data */
>  	struct task_struct *ka_thread;
> @@ -1748,6 +1752,7 @@ void vchiq_platform_conn_state_changed(struct vchiq_state *state,
>  static const struct of_device_id vchiq_of_match[] = {
>  	{ .compatible = "brcm,bcm2835-vchiq", .data = &bcm2835_drvdata },
>  	{ .compatible = "brcm,bcm2836-vchiq", .data = &bcm2836_drvdata },
> +	{ .compatible = "brcm,bcm2711-vchiq", .data = &bcm2711_drvdata },

Just re-use bcm2836_drvdata instead of duplicating it.

>  	{},
>  };
>  MODULE_DEVICE_TABLE(of, vchiq_of_match);


Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ