Re: [PATCH v2 1/4] staging/vc04_services: Use correct cache line size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14/09/2018 18:03, Florian Fainelli wrote:
On 09/14/2018 06:22 AM, Phil Elwell wrote:
Use the compatible string in the DTB to select the correct cache line
size for the SoC - 32 for BCM2835, and 64 for BCM2836 and BCM2837.

Signed-off-by: Phil Elwell <phil@xxxxxxxxxxxxxxx>
---

[snip]

@@ -170,6 +170,14 @@ static struct device *vchiq_dev;
  static DEFINE_SPINLOCK(msg_queue_spinlock);
  static struct platform_device *bcm2835_camera;
+static struct vchiq_drvdata bcm2835_drvdata = {
+	.cache_line_size = 32,
+};
+
+static struct vchiq_drvdata bcm2836_drvdata = {
+	.cache_line_size = 64,
+};

Those two structures could probably be marked const. Other than that,
the approach definitively looks good to me.

The mutability is intentional - the structure pointer to the firmware is also
stored there. This isn't the only piece of mutable static data in a driver
that will only have a single instance, so allocating and initialising a
per-instance structure seems needlessly complicated.

Thanks for the feedback.

Phil



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux