Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Aug 2010 00:17:13 -0500
From:      Alan Cox <alc@cs.rice.edu>
To:        ppc@freebsd.org
Subject:   [Fwd: svn commit: r210837 - head/sys/kern]
Message-ID:  <4C58F7D9.8060801@cs.rice.edu>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------080504010208080108090102
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Is there any reason that PAGE_SIZE is defined as a "long" on powerpc?  
Generally speaking, other 32- and 64-bit architectures define it as an 
"int".

Alan


--------------080504010208080108090102
Content-Type: message/rfc822;
 name="svn commit: r210837 - head/sys/kern.eml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="svn commit: r210837 - head/sys/kern.eml"

Return-Path: <owner-src-committers@FreeBSD.org>
X-Original-To: alc@cs.rice.edu
Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1])
	by mail.cs.rice.edu (Postfix) with ESMTP id 259FC2C2B32
	for <alc@cs.rice.edu>; Wed,  4 Aug 2010 00:09:19 -0500 (CDT)
X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu
X-Spam-Score: 0.008
X-Spam-Level: 
X-Spam-Status: No, score=0.008 tagged_above=-999 required=6.31
	tests=[AWL=0.008]
Received: from mail.cs.rice.edu ([127.0.0.1])
	by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new,
	port 10024) with LMTP id aCOG8iH+XXef for <alc@cs.rice.edu>;
	Wed,  4 Aug 2010 00:09:09 -0500 (CDT)
X-policyd-weight: using cached result; rate:hard: -8.5
Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53])
	by mail.cs.rice.edu (Postfix) with ESMTP id E39402C2A81
	for <alc@cs.rice.edu>; Wed,  4 Aug 2010 00:09:09 -0500 (CDT)
Received: from hub.freebsd.org (hub.freebsd.org [IPv6:2001:4f8:fff6::36])
	by mx2.freebsd.org (Postfix) with ESMTP id 1D9B0160E59;
	Wed,  4 Aug 2010 05:09:08 +0000 (UTC)
Received: by hub.freebsd.org (Postfix)
	id 098C71065679; Wed,  4 Aug 2010 05:09:08 +0000 (UTC)
Delivered-To: alc@freebsd.org
Received: by hub.freebsd.org (Postfix, from userid 538)
	id F3CFA1065675; Wed,  4 Aug 2010 05:09:07 +0000 (UTC)
Delivered-To: src-committers@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B536D1065688;
	Wed,  4 Aug 2010 05:09:02 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A45418FC24;
	Wed,  4 Aug 2010 05:09:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o74592Vw068774;
	Wed, 4 Aug 2010 05:09:02 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o74592lI068772;
	Wed, 4 Aug 2010 05:09:02 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201008040509.o74592lI068772@svn.freebsd.org>
From: Alan Cox <alc@FreeBSD.org>
Date: Wed, 4 Aug 2010 05:09:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
Subject: svn commit: r210837 - head/sys/kern
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Sender: owner-src-committers@FreeBSD.org
Precedence: bulk
X-Loop: FreeBSD.ORG
X-DSPAM-Result: Whitelisted
X-DSPAM-Processed: Wed Aug  4 00:09:19 2010
X-DSPAM-Confidence: 0.7829
X-DSPAM-Probability: 0.0000
X-DSPAM-Signature: 4c58f5ff237352347716413

Author: alc
Date: Wed Aug  4 05:09:02 2010
New Revision: 210837
URL: http://svn.freebsd.org/changeset/base/210837

Log:
  In order for MAXVNODES_MAX to be an "int" on powerpc and sparc, we must
  cast PAGE_SIZE to an "int".  (Powerpc and sparc, unlike the other
  architectures, define PAGE_SIZE as a "long".)
  
  Submitted by:	Andreas Tobler

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Wed Aug  4 01:36:48 2010	(r210836)
+++ head/sys/kern/vfs_subr.c	Wed Aug  4 05:09:02 2010	(r210837)
@@ -288,7 +288,7 @@ SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhe
  * grows, the ratio of physical pages to vnodes approaches sixteen to one.
  */
 #ifndef	MAXVNODES_MAX
-#define	MAXVNODES_MAX	(512 * (1024 * 1024 * 1024 / PAGE_SIZE / 16))
+#define	MAXVNODES_MAX	(512 * (1024 * 1024 * 1024 / (int)PAGE_SIZE / 16))
 #endif
 static void
 vntblinit(void *dummy __unused)

--------------080504010208080108090102--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C58F7D9.8060801>