Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756067Ab2HPAnZ (ORCPT ); Wed, 15 Aug 2012 20:43:25 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:40132 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755928Ab2HPAnI (ORCPT ); Wed, 15 Aug 2012 20:43:08 -0400 MIME-Version: 1.0 In-Reply-To: <20120815213126.GC15844@linux-mips.org> References: <1344677543-22591-1-git-send-email-chenhc@lemote.com> <1344677543-22591-14-git-send-email-chenhc@lemote.com> <20120815213126.GC15844@linux-mips.org> Date: Thu, 16 Aug 2012 08:43:06 +0800 Message-ID: Subject: Re: [PATCH V5 13/18] drm: Define SAREA_MAX for Loongson (PageSize = 16KB). From: Huacai Chen To: Ralf Baechle Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Fuxin Zhang , Zhangjin Wu , Hongliang Tao , Hua Yan , dri-devel@lists.freedesktop.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1335 Lines: 37 On Thu, Aug 16, 2012 at 5:31 AM, Ralf Baechle wrote: > On Sat, Aug 11, 2012 at 05:32:18PM +0800, Huacai Chen wrote: > >> 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. > >> 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 > #include > > /* 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/