All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux1394-devel@lists.sourceforge.net
Subject: [git pull] FireWire build fix
Date: Thu, 13 Jan 2011 16:00:21 +0100	[thread overview]
Message-ID: <20110113160021.07a8ce85@stein> (raw)
In-Reply-To: <20110107175539.2b882d3d@stein>

Linus, please pull from the for-linus branch at

    git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git for-linus

to receive the following update for the IEEE 1394 (FireWire) subsystem.
It's straightforward and runtime tested.

Clemens Ladisch (1):
      firewire: ohci: fix compilation on arches without PAGE_KERNEL_RO

 drivers/firewire/ohci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Thanks.


commit 1427130425c1239d977e8891c3a8923f53a6e352
Author: Clemens Ladisch <clemens@ladisch.de>
Date:   Thu Jan 13 10:12:17 2011 +0100

    firewire: ohci: fix compilation on arches without PAGE_KERNEL_RO
    
    PAGE_KERNEL_RO is not available on all architectures, so its use
    in the new AR code broke compilation on sparc64.
    
    Because the read-only mapping was just a debugging aid, just use
    PAGE_KERNEL instead.
    
    Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
    
    James Bottomley wrote:
    > On Thu, 2011-01-13 at 08:27 +0100, Clemens Ladisch wrote:
    >> firewire: ohci: fix compilation on arches without PAGE_KERNEL_RO, e.g. sparc
    >>
    >> PAGE_KERNEL_RO is not available on all architectures, so its use in the
    >> new AR code broke compilation on sparc64.
    >>
    >> Because the R/O mapping is only used to catch drivers that try to write
    >> to the reception buffer and not actually required for correct operation,
    >> we can just use a normal PAGE_KERNEL mapping where _RO is not available.
    [...]
    >> +/*
    >> + * For archs where PAGE_KERNEL_RO is not supported;
    >> + * mapping the AR buffers readonly for the CPU is just a debugging aid.
    >> + */
    >> +#ifndef PAGE_KERNEL_RO
    >> +#define PAGE_KERNEL_RO PAGE_KERNEL
    >> +#endif
    >
    > This might cause interesting issues on sparc64 if it ever acquired a
    > PAGE_KERNEL_RO.  Sparc64 has extern pgprot_t for it's PAGE_KERNEL types
    > rather than #defines, so the #ifdef check wouldn't see this.
    >
    > I think either PAGE_PROT_RO becomes part of our arch API (so all
    > architectures are forced to add it), or, if it's not part of the API,
    > ohci isn't entitled to use it.  The latter seems simplest since you have
    > no real use for write protection anyway.
    
    Reported-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index d77d120..bd3c61b 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -961,7 +961,7 @@ static int ar_context_init(struct ar_context *ctx, struct fw_ohci *ohci,
 	for (i = 0; i < AR_WRAPAROUND_PAGES; i++)
 		pages[AR_BUFFERS + i] = ctx->pages[i];
 	ctx->buffer = vm_map_ram(pages, AR_BUFFERS + AR_WRAPAROUND_PAGES,
-				 -1, PAGE_KERNEL_RO);
+				 -1, PAGE_KERNEL);
 	if (!ctx->buffer)
 		goto out_of_memory;
 
-- 
Stefan Richter
-=====-==-== ---= -==-=
http://arcgraph.de/sr/

      parent reply	other threads:[~2011-01-13 15:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-07 16:55 [git pull] FireWire updates post 2.6.37 Stefan Richter
2011-01-07 16:56 ` Stefan Richter
2011-01-13 15:00 ` Stefan Richter [this message]

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=20110113160021.07a8ce85@stein \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=torvalds@linux-foundation.org \
    /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.