lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 7 May 2015 17:21:39 -0700
From:	Dan Williams <dan.j.williams@...el.com>
To:	Stephen Rothwell <sfr@...b.auug.org.au>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Jens Axboe <axboe@...nel.dk>, Rik van Riel <riel@...hat.com>,
	"linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
	Ingo Molnar <mingo@...nel.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	Mel Gorman <mgorman@...e.de>, "H. Peter Anvin" <hpa@...or.com>,
	Tejun Heo <tj@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v2 01/10] arch: introduce __pfn_t for persistent memory i/o

On Thu, May 7, 2015 at 7:55 AM, Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> Hi Dan,
>
> On Wed, 06 May 2015 16:04:59 -0400 Dan Williams <dan.j.williams@...el.com> 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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ