Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751696AbbEHAVn (ORCPT ); Thu, 7 May 2015 20:21:43 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:36429 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751201AbbEHAVk (ORCPT ); Thu, 7 May 2015 20:21:40 -0400 MIME-Version: 1.0 In-Reply-To: <20150508005536.312c3eff@canb.auug.org.au> References: <20150506200219.40425.74411.stgit@dwillia2-desk3.amr.corp.intel.com> <20150506200459.40425.80269.stgit@dwillia2-desk3.amr.corp.intel.com> <20150508005536.312c3eff@canb.auug.org.au> Date: Thu, 7 May 2015 17:21:39 -0700 Message-ID: Subject: Re: [PATCH v2 01/10] arch: introduce __pfn_t for persistent memory i/o From: Dan Williams To: Stephen Rothwell Cc: "linux-kernel@vger.kernel.org" , Jens Axboe , Rik van Riel , "linux-nvdimm@lists.01.org" , Ingo Molnar , linux-fsdevel , Mel Gorman , "H. Peter Anvin" , Tejun Heo , Andrew Morton , Linus Torvalds , Christoph Hellwig Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1092 Lines: 33 On Thu, May 7, 2015 at 7:55 AM, Stephen Rothwell wrote: > Hi Dan, > > On Wed, 06 May 2015 16:04:59 -0400 Dan Williams wrote: >> >> diff --git a/include/asm-generic/pfn.h b/include/asm-generic/pfn.h >> new file mode 100644 >> index 000000000000..91171e0285d9 >> --- /dev/null >> +++ b/include/asm-generic/pfn.h >> @@ -0,0 +1,51 @@ >> +#ifndef __ASM_PFN_H >> +#define __ASM_PFN_H >> + >> +#ifndef __pfn_to_phys >> +#define __pfn_to_phys(pfn) ((dma_addr_t)(pfn) << PAGE_SHIFT) > > Why dma_addr_t and not phys_addr_t? i.e. it could use a comment if it > is correct. Hmm, this was derived from: #define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) in arch/x86/include/asm/io.h The primary users of __pfn_to_phys() is dma_map_page(). I'll add a comment to that effect. -- 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/