From owner-freebsd-hackers@FreeBSD.ORG Mon May 25 13:50:42 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 701F6B7E for ; Mon, 25 May 2015 13:50:42 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-ie0-x22b.google.com (mail-ie0-x22b.google.com [IPv6:2607:f8b0:4001:c03::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33AA82C5 for ; Mon, 25 May 2015 13:50:42 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by iebgx4 with SMTP id gx4so72864246ieb.0 for ; Mon, 25 May 2015 06:50:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=X99t0shY5lUl8hgCRur8CwwBDPeYMoQVLElZ4av39mI=; b=Fq7EICt8EPNuBj9pF7VRyn7lqu2PMhFZxiTLOs0+svN0U9++MnV0xu0oxiGio54NKY kVb3URR9WOGf1LGLjpfIaYUU/KmLKVeYgg7fEQILfIQmcxThljRiTFv+39l6p4R9WLAX iEGFH1D0fkT2qEEI4WeWIt+0YihAujcUEUaxqxvOsSi5qBXTlr2xChLa9MI+GkxG3qlC V+H46j7p+JiwAV76jNrU8f1VVozkEma8iU8/cVZTKrJBWUBEeIdbjiqVwnFaKrkHjyQh hBJ9IJcz1jYS6fMlQqi284L3cRHYDN9uwjrw4KoRYNbEcWNi0jW8GsPuhmQh7qXoZfDa GAZw== X-Received: by 10.107.168.164 with SMTP id e36mr28287964ioj.87.1432561841540; Mon, 25 May 2015 06:50:41 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:edac:574a:2770:5776? ([2601:8:ab80:7d6:edac:574a:2770:5776]) by mx.google.com with ESMTPSA id rj5sm6105898igc.2.2015.05.25.06.50.40 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 May 2015 06:50:40 -0700 (PDT) Subject: Re: Convert virtual address to physical address Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_02F3F810-9606-468E-A740-F8D3C72BA2EE"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: Date: Mon, 25 May 2015 06:50:38 -0700 Cc: freebsd-hackers Message-Id: <1E426B87-C1AF-495A-8125-8B7CBFF566D4@gmail.com> References: To: Pratik Singhal X-Mailer: Apple Mail (2.1878.6) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2015 13:50:42 -0000 --Apple-Mail=_02F3F810-9606-468E-A740-F8D3C72BA2EE Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On May 25, 2015, at 6:46, Pratik Singhal wrote: > I need to convert a kernel virtual address to physical address. To do that, > as far as I know, we have 2 macros :- > > vtophys :- In sys/arm/include/pmap.h > VTOP :- In sys/boot/i386/libi386/amd64_tramp.S > > Since, I am working on arm kernel with ARM_NEW_PMAP option, I am using > vtophys macro by including the pmap.h file. > > Now, if I compile the kernel after including the pmap.h file, I am getting > the error :- > > error: field has incomplete type 'struct pmap_statistics' > struct pmap_statistics pm_stats; /* pmap statictics */ > ^ > ./machine/pmap-v6.h:127:9: note: forward declaration of 'struct > pmap_statistics' > struct pmap_statistics pm_stats; /* pmap statictics */ > > How, should I resolve this error ? Or is there some other way to convert > virtual address to physical address for arm kernel ? Try using `#include ` instead. Cheers, -NGie --Apple-Mail=_02F3F810-9606-468E-A740-F8D3C72BA2EE Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVYyivAAoJEMZr5QU6S73eUXoH/0gfDj4/ugn4H/6ZzN7edgtu yQCQNthhYsG3B9xIY5veWIyiTShE2gAiZQtelon8dRad3pkwO/uO+u+2EJSoipYV oD/t9H7lF6meiUNcJmMQC+VMCHSMhu31QLCbi3agJk7bJeTuuQiRekzqo41qXHZ2 YLZL0dK7fBFg8PlYSDsLySDorqyzCpPrvDoJNFQGrymcR8fQdbPef7qfBri4c3ns zT8smYxT+diYDHd8iVJaO/cTGDAu3z5eNIiPdV/M0vCgEOJLfhofctx1vMOiiCag ZrHcty41bxd1tBV5rl0tBRVIvlsDK1Si/WrEq0IOH5as82Rz80gqQHYZ1z8vARw= =xxam -----END PGP SIGNATURE----- --Apple-Mail=_02F3F810-9606-468E-A740-F8D3C72BA2EE--