netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kyle McMartin <kyle@redhat.com>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: jeff@garzik.org, mingo@elte.hu, davem@davemloft.net,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	jesse.brandeburg@intel.com, john.ronciak@intel.com,
	Bruce Allan <bruce.w.allan@intel.com>
Subject: Re: [PATCH 2/3] e1000e: Useset_memory_ro()/set_memory_rw() to protect flash memory
Date: Wed, 24 Sep 2008 13:53:58 -0400	[thread overview]
Message-ID: <20080924175358.GA2591@phobos.i.cabal.ca> (raw)
In-Reply-To: <20080923224535.6869.76210.stgit@jtkirshe-mobile.jf.intel.com>

On Tue, Sep 23, 2008 at 03:45:54PM -0700, Jeff Kirsher wrote:
> +#ifdef _ASM_X86_CACHEFLUSH_H
> +	set_memory_rw((unsigned long)hw->flash_address,
> +	              hw->flash_len >> PAGE_SHIFT);
> +#endif
>  	writew(val, hw->flash_address + reg);
> +#ifdef _ASM_X86_CACHEFLUSH_H
> +	set_memory_ro((unsigned long)hw->flash_address,
> +	              hw->flash_len >> PAGE_SHIFT);
> +#endif
>  }

Hi Jeff,

You're making the entire read-only mapping read-write for the single
writel call... why not just limit it to the page that the writel is
targetting?

regards, Kyle
[sorry, I've only been following this at a glance, but it's somewhat
 important for rawhide... does someone have a way to reproduce this at
 whim? Has someone tried catching it using an IOMMU on one of the newer
 Intel boxes, if it is a DMA going awry?]

  parent reply	other threads:[~2008-09-24 17:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-23 22:45 [PATCH 2/3] e1000e: Useset_memory_ro()/set_memory_rw() to protect flash memory Jeff Kirsher
2008-09-23 23:29 ` David Miller
2008-09-23 23:45   ` Jiri Kosina
2008-09-23 23:47     ` David Miller
2008-09-24 10:51       ` Stefan Richter
2008-09-24 17:53 ` Kyle McMartin [this message]
2008-09-24 18:13   ` Allan, Bruce W
2008-09-24 22:55   ` Jiri Kosina

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=20080924175358.GA2591@phobos.i.cabal.ca \
    --to=kyle@redhat.com \
    --cc=bruce.w.allan@intel.com \
    --cc=davem@davemloft.net \
    --cc=jeff@garzik.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).