Thread (40 messages) 40 messages, 7 authors, 2012-08-16

Re: [PATCH V5 13/18] drm: Define SAREA_MAX for Loongson (PageSize = 16KB).

From: Huacai Chen <hidden>
Date: 2012-08-16 00:43:25
Also in: dri-devel, lkml

On Thu, Aug 16, 2012 at 5:31 AM, Ralf Baechle [off-list ref] wrote:
On Sat, Aug 11, 2012 at 05:32:18PM +0800, Huacai Chen wrote:
quoted
Subject: [PATCH V5 13/18] drm: Define SAREA_MAX for Loongson (PageSize = 16KB).
But your code doesn't define it just for Loongsson as the log message claims
but rather for all MIPS.
quoted
diff --git a/include/drm/drm_sarea.h b/include/drm/drm_sarea.h
index ee5389d..1d1a858 100644
--- a/include/drm/drm_sarea.h
+++ b/include/drm/drm_sarea.h
@@ -37,6 +37,8 @@
 /* SAREA area needs to be at least a page */
 #if defined(__alpha__)
 #define SAREA_MAX                       0x2000U
+#elif defined(__mips__)
+#define SAREA_MAX                       0x4000U
How about replacing this whole #ifdef mess with something like:

#include <linux/kernel.h>
#include <asm/page.h>

/* Intel 830M driver needs at least 8k SAREA */
#define SAREA_MAX       max(PAGE_SIZE, 0x2000U)

MIPS also uses 64K page size and your patch as posted would break with 64k
pages.
Yes, I think this is better. Thank you.
  Ralf
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help