All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@suse.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
	linux-arch@vger.kernel.org, "Kani,
	Toshimitsu" <toshi.kani@hp.com>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Russell King <rmk+kernel@arm.linux.org.uk>,
	Christoph Hellwig <hch@lst.de>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 01/24] mm: enhance region_is_ram() to region_intersects()
Date: Thu, 30 Jul 2015 23:10:26 +0200	[thread overview]
Message-ID: <20150730211026.GR30479@wotan.suse.de> (raw)
In-Reply-To: <CAPcyv4g1cMCDUZGrWz6Epmp4XvYuuLOPneiOTqrRsX1PoOS9gA@mail.gmail.com>

On Thu, Jul 30, 2015 at 01:59:20PM -0700, Dan Williams wrote:
> On Thu, Jul 30, 2015 at 1:54 PM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> > On Thu, Jul 30, 2015 at 01:44:44PM -0700, Dan Williams wrote:
> >> On Thu, Jul 30, 2015 at 1:42 PM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> >> > On Thu, Jul 30, 2015 at 12:53:45PM -0400, Dan Williams wrote:
> >> >> diff --git a/include/linux/mm.h b/include/linux/mm.h
> >> >> index 2e872f92dbac..84b05ebedb2d 100644
> >> >> --- a/include/linux/mm.h
> >> >> +++ b/include/linux/mm.h
> >> >> @@ -369,7 +369,14 @@ static inline int put_page_unless_one(struct page *page)
> >> >>  }
> >> >>
> >> >>  extern int page_is_ram(unsigned long pfn);
> >> >> -extern int region_is_ram(resource_size_t phys_addr, unsigned long size);
> >> >> +
> >> >> +enum {
> >> >> +     REGION_INTERSECTS,
> >> >> +     REGION_DISJOINT,
> >> >> +     REGION_MIXED,
> >> >> +};
> >> >> +
> >> >
> >> > Can you Kdoc'ify this? Part of the reason for the enum request was this
> >> > could be then documented really well. The helper is documented but here
> >> > you can go into more detail about each region intersection.
> >>
> >> Given region_intersects() has its own kdoc I'd probably just say "See
> >> region_intersects() for details".
> >
> > With the kdoc in place in the enum you'd kick people to elaborate when
> > extending the enums, whereas without this you'd hope they do it. With
> > the enum in place you can also be more verbose.
> >
> 
> Care to send a patch on what you are thinking?  I wasn't planning on
> this enum growing any other entries.

I mean something like this:

/**
 * enum region_intersect_type
 *
 * @REGION_INTERSECTS: explain and you you can go into any elaborate
 *	detail as you wish.
 * @REGION_DISJOINT: explain
 * @REGION_MIXED: explain
 */
enum region_intersect_type {
     REGION_INTERSECTS,
     REGION_DISJOINT,
     REGION_MIXED,
};

  Luis

WARNING: multiple messages have this Message-ID (diff)
From: "Luis R. Rodriguez" <mcgrof@suse.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
	linux-arch@vger.kernel.org, "Kani,
	Toshimitsu" <toshi.kani@hp.com>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Russell King <rmk+kernel@arm.linux.org.uk>,
	Christoph Hellwig <hch@lst.de>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 01/24] mm: enhance region_is_ram() to region_intersects()
Date: Thu, 30 Jul 2015 23:10:26 +0200	[thread overview]
Message-ID: <20150730211026.GR30479@wotan.suse.de> (raw)
In-Reply-To: <CAPcyv4g1cMCDUZGrWz6Epmp4XvYuuLOPneiOTqrRsX1PoOS9gA@mail.gmail.com>

On Thu, Jul 30, 2015 at 01:59:20PM -0700, Dan Williams wrote:
> On Thu, Jul 30, 2015 at 1:54 PM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> > On Thu, Jul 30, 2015 at 01:44:44PM -0700, Dan Williams wrote:
> >> On Thu, Jul 30, 2015 at 1:42 PM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> >> > On Thu, Jul 30, 2015 at 12:53:45PM -0400, Dan Williams wrote:
> >> >> diff --git a/include/linux/mm.h b/include/linux/mm.h
> >> >> index 2e872f92dbac..84b05ebedb2d 100644
> >> >> --- a/include/linux/mm.h
> >> >> +++ b/include/linux/mm.h
> >> >> @@ -369,7 +369,14 @@ static inline int put_page_unless_one(struct page *page)
> >> >>  }
> >> >>
> >> >>  extern int page_is_ram(unsigned long pfn);
> >> >> -extern int region_is_ram(resource_size_t phys_addr, unsigned long size);
> >> >> +
> >> >> +enum {
> >> >> +     REGION_INTERSECTS,
> >> >> +     REGION_DISJOINT,
> >> >> +     REGION_MIXED,
> >> >> +};
> >> >> +
> >> >
> >> > Can you Kdoc'ify this? Part of the reason for the enum request was this
> >> > could be then documented really well. The helper is documented but here
> >> > you can go into more detail about each region intersection.
> >>
> >> Given region_intersects() has its own kdoc I'd probably just say "See
> >> region_intersects() for details".
> >
> > With the kdoc in place in the enum you'd kick people to elaborate when
> > extending the enums, whereas without this you'd hope they do it. With
> > the enum in place you can also be more verbose.
> >
> 
> Care to send a patch on what you are thinking?  I wasn't planning on
> this enum growing any other entries.

I mean something like this:

/**
 * enum region_intersect_type
 *
 * @REGION_INTERSECTS: explain and you you can go into any elaborate
 *	detail as you wish.
 * @REGION_DISJOINT: explain
 * @REGION_MIXED: explain
 */
enum region_intersect_type {
     REGION_INTERSECTS,
     REGION_DISJOINT,
     REGION_MIXED,
};

  Luis

WARNING: multiple messages have this Message-ID (diff)
From: mcgrof@suse.com (Luis R. Rodriguez)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 01/24] mm: enhance region_is_ram() to region_intersects()
Date: Thu, 30 Jul 2015 23:10:26 +0200	[thread overview]
Message-ID: <20150730211026.GR30479@wotan.suse.de> (raw)
In-Reply-To: <CAPcyv4g1cMCDUZGrWz6Epmp4XvYuuLOPneiOTqrRsX1PoOS9gA@mail.gmail.com>

On Thu, Jul 30, 2015 at 01:59:20PM -0700, Dan Williams wrote:
> On Thu, Jul 30, 2015 at 1:54 PM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> > On Thu, Jul 30, 2015 at 01:44:44PM -0700, Dan Williams wrote:
> >> On Thu, Jul 30, 2015 at 1:42 PM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> >> > On Thu, Jul 30, 2015 at 12:53:45PM -0400, Dan Williams wrote:
> >> >> diff --git a/include/linux/mm.h b/include/linux/mm.h
> >> >> index 2e872f92dbac..84b05ebedb2d 100644
> >> >> --- a/include/linux/mm.h
> >> >> +++ b/include/linux/mm.h
> >> >> @@ -369,7 +369,14 @@ static inline int put_page_unless_one(struct page *page)
> >> >>  }
> >> >>
> >> >>  extern int page_is_ram(unsigned long pfn);
> >> >> -extern int region_is_ram(resource_size_t phys_addr, unsigned long size);
> >> >> +
> >> >> +enum {
> >> >> +     REGION_INTERSECTS,
> >> >> +     REGION_DISJOINT,
> >> >> +     REGION_MIXED,
> >> >> +};
> >> >> +
> >> >
> >> > Can you Kdoc'ify this? Part of the reason for the enum request was this
> >> > could be then documented really well. The helper is documented but here
> >> > you can go into more detail about each region intersection.
> >>
> >> Given region_intersects() has its own kdoc I'd probably just say "See
> >> region_intersects() for details".
> >
> > With the kdoc in place in the enum you'd kick people to elaborate when
> > extending the enums, whereas without this you'd hope they do it. With
> > the enum in place you can also be more verbose.
> >
> 
> Care to send a patch on what you are thinking?  I wasn't planning on
> this enum growing any other entries.

I mean something like this:

/**
 * enum region_intersect_type
 *
 * @REGION_INTERSECTS: explain and you you can go into any elaborate
 *	detail as you wish.
 * @REGION_DISJOINT: explain
 * @REGION_MIXED: explain
 */
enum region_intersect_type {
     REGION_INTERSECTS,
     REGION_DISJOINT,
     REGION_MIXED,
};

  Luis

  reply	other threads:[~2015-07-30 21:10 UTC|newest]

Thread overview: 118+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30 16:53 [PATCH v3 00/24] replace ioremap_{cache|wt} with memremap Dan Williams
2015-07-30 16:53 ` Dan Williams
2015-07-30 16:53 ` Dan Williams
2015-07-30 16:53 ` Dan Williams
2015-07-30 16:53 ` Dan Williams
2015-07-30 16:53 ` [PATCH v3 01/24] mm: enhance region_is_ram() to region_intersects() Dan Williams
2015-07-30 16:53   ` Dan Williams
2015-07-30 16:53   ` Dan Williams
2015-07-30 20:42   ` Luis R. Rodriguez
2015-07-30 20:42     ` Luis R. Rodriguez
2015-07-30 20:42     ` Luis R. Rodriguez
2015-07-30 20:44     ` Dan Williams
2015-07-30 20:44       ` Dan Williams
2015-07-30 20:44       ` Dan Williams
2015-07-30 20:54       ` Luis R. Rodriguez
2015-07-30 20:54         ` Luis R. Rodriguez
2015-07-30 20:54         ` Luis R. Rodriguez
2015-07-30 20:59         ` Dan Williams
2015-07-30 20:59           ` Dan Williams
2015-07-30 20:59           ` Dan Williams
2015-07-30 21:10           ` Luis R. Rodriguez [this message]
2015-07-30 21:10             ` Luis R. Rodriguez
2015-07-30 21:10             ` Luis R. Rodriguez
2015-07-30 20:58   ` Luis R. Rodriguez
2015-07-30 20:58     ` Luis R. Rodriguez
2015-07-30 20:58     ` Luis R. Rodriguez
2015-07-30 16:53 ` [PATCH v3 02/24] arch, drivers: don't include <asm/io.h> directly, use <linux/io.h> instead Dan Williams
2015-07-30 16:53   ` Dan Williams
2015-07-30 16:53   ` Dan Williams
2015-07-30 16:53 ` [PATCH v3 03/24] cleanup IORESOURCE_CACHEABLE vs ioremap() Dan Williams
2015-07-30 16:53   ` Dan Williams
2015-07-30 16:53   ` Dan Williams
2015-07-30 16:54 ` [PATCH v3 04/24] intel_iommu: fix leaked ioremap mapping Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-08-03 14:26   ` Joerg Roedel
2015-08-03 14:26     ` Joerg Roedel
2015-08-03 14:26     ` Joerg Roedel
2015-07-30 16:54 ` [PATCH v3 05/24] arch: introduce memremap() Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 21:02   ` Luis R. Rodriguez
2015-07-30 21:02     ` Luis R. Rodriguez
2015-07-30 21:02     ` Luis R. Rodriguez
2015-07-30 21:11     ` Dan Williams
2015-07-30 21:11       ` Dan Williams
2015-07-30 21:11       ` Dan Williams
2015-07-30 16:54 ` [PATCH v3 06/24] arm: switch from ioremap_cache to memremap Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54 ` [PATCH v3 07/24] x86: " Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54 ` [PATCH v3 08/24] gma500: switch from acpi_os_ioremap " Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54 ` [PATCH v3 09/24] i915: " Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54 ` [PATCH v3 10/24] acpi: switch from ioremap_cache " Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54 ` [PATCH v3 11/24] toshiba laptop: replace ioremap_cache with ioremap Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54 ` [PATCH v3 12/24] memconsole: fix __iomem mishandling, switch to memremap Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54 ` [PATCH v3 13/24] visorbus: switch from ioremap_cache " Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-08-06  0:27   ` Greg Kroah-Hartman
2015-08-06  0:27     ` Greg Kroah-Hartman
2015-08-06  0:27     ` Greg Kroah-Hartman
2015-07-30 16:54 ` [PATCH v3 14/24] intel-iommu: " Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:54   ` Dan Williams
2015-07-30 16:55 ` [PATCH v3 15/24] libnvdimm, pmem: push call to ioremap_cache out of line Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55 ` [PATCH v3 16/24] pxa2xx-flash: switch from ioremap_cache to memremap Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55 ` [PATCH v3 17/24] sfi: " Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55 ` [PATCH v3 18/24] fbdev: switch from ioremap_wt " Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55 ` [PATCH v3 19/24] pmem: " Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55 ` [PATCH v3 20/24] arch: kill ioremap_cached() Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55 ` [PATCH v3 21/24] arch: kill ioremap_fullcache() Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55 ` [PATCH v3 22/24] arch: remove ioremap_cache, replace with arch_memremap Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55 ` [PATCH v3 23/24] arch: remove ioremap_wt, optionally " Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55 ` [PATCH v3 24/24] pmem: convert to generic memremap Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-07-30 16:55   ` Dan Williams
2015-08-03 17:21   ` Ross Zwisler
2015-08-03 17:21     ` Ross Zwisler
2015-08-03 17:21     ` Ross Zwisler
2015-08-03 18:01     ` Dan Williams
2015-08-03 18:01       ` Dan Williams
2015-08-03 18:01       ` Dan Williams
2015-08-04 16:53       ` Ross Zwisler
2015-08-04 16:53         ` Ross Zwisler
2015-08-04 16:53         ` Ross Zwisler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150730211026.GR30479@wotan.suse.de \
    --to=mcgrof@suse.com \
    --cc=dan.j.williams@intel.com \
    --cc=hch@lst.de \
    --cc=hpa@zytor.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=mingo@kernel.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=tglx@linutronix.de \
    --cc=toshi.kani@hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.