<div dir="ltr"><div><div><div><div><div><div><div>It seems wrong to define PHYS_OFFSET here in a gpu driver.<br></div>Is there an actual ARC system using vivante?</div><div>The bit of code that uses PHYS_OFFSET looks pretty ARM specific.</div><div><br></div>If not, then at least maybe<br><br></div>+#if !define (PHYS_OFFSET) && defined (COMPILE_TEST)<br></div>+#define PHY_OFFSET 0<br></div>+#endif<br><br></div>would be more appropriate?<br></div><div><br></div><div>Maybe the use of PHYS_OFFSET should be moved into an inline in a header</div><div>where it can be defined differently for other arches<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 7, 2018 at 7:56 AM, Lucas Stach <span dir="ltr"><<a href="mailto:l.stach@pengutronix.de" target="_blank">l.stach@pengutronix.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Some architecture ports like ARC don't provide the PHYS_OFFSET symbol.<br>
Define it to 0 in that case, which is the most conservative default in<br>
the usage context of the etnaviv driver.<br>
<br>
Signed-off-by: Lucas Stach <<a href="mailto:l.stach@pengutronix.de">l.stach@pengutronix.de</a>><br>
---<br>
drivers/gpu/drm/etnaviv/<wbr>etnaviv_gpu.c | 4 ++++<br>
1 file changed, 4 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/etnaviv/<wbr>etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/<wbr>etnaviv_gpu.c<br>
index 935d99be748e..febbd1e5bbc7 100644<br>
--- a/drivers/gpu/drm/etnaviv/<wbr>etnaviv_gpu.c<br>
+++ b/drivers/gpu/drm/etnaviv/<wbr>etnaviv_gpu.c<br>
@@ -31,6 +31,10 @@<br>
#include "state_hi.xml.h"<br>
#include "cmdstream.xml.h"<br>
<br>
+#ifndef PHYS_OFFSET<br>
+#define PHYS_OFFSET 0<br>
+#endif<br>
+<br>
static const struct platform_device_id gpu_ids[] = {<br>
{ .name = "etnaviv-gpu,2d" },<br>
{ },<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.11.0<br>
<br>
______________________________<wbr>_________________<br>
etnaviv mailing list<br>
<a href="mailto:etnaviv@lists.freedesktop.org">etnaviv@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/etnaviv" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/etnaviv</a><br>
</font></span></blockquote></div><br></div>