mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ashutosh Dixit <ashutosh.dixit@intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"virtualization\@lists.linux-foundation.org" 
	<virtualization@lists.linux-foundation.org>, "Chandramouli\,
	Dasaratharaman"  <dasaratharaman.chandramouli@intel.com>, "Dutt\,
	Sudeep" <sudeep.dutt@intel.com>, "Rao\,
	Nikhil" <nikhil.rao@intel.com>, "Yerramreddy\,
	Siva Krishna Kumar Reddy" 
	<siva.krishna.kumar.reddy.yerramreddy@intel.com>, "Yokoyama\,
	Caz" <caz.yokoyama@intel.com>, "Wu\,
	Fengguang" <fengguang.wu@intel.com>
Subject: Re: [PATCH char-misc-linus 4/5] misc: mic: Fix sparse warnings and other endianness issues.
Date: Wed, 27 Nov 2013 09:12:01 -0800	[thread overview]
Message-ID: <m3zjopwyzi.fsf@adixit-yct.ra.intel.com> (raw)
In-Reply-To: <20131126191525.GA29279@kroah.com> (Greg Kroah-Hartman's message of "Tue, 26 Nov 2013 12:15:25 -0700")

On Tue, Nov 26 2013 at 11:15:25 AM, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> On Tue, Nov 26, 2013 at 10:14:21AM -0800, Ashutosh Dixit wrote:
>> Endianness issues are now consistent as per the documentation in
>> host/mic_virtio.h. Note that the host can be both BE or LE whereas the
>> card is always LE.
>>
>> Memory space sparse warnings are fixed for now by using __force. This is
>> sufficient for now since the driver depends on x86 but will need to be
>> revisited if we support other architectures which treat I/O memory
>> differently from system memory.
>
> Can you split the endian fixes up from the user pointer fixes to make it
> easier to review/apply?

We've just submitted v3 where we now have separate patches (5 and 6) for
endianness and sparse memory access fixes.

> There's no need for this for 3.13-final, right?  No bug fixes are here
> that I can tell.

That's correct.  I've reordered the patches so that v3 patches 1-4
contain the real bug fixes. We'd like to apply patches 5 and 6 for
3.13-final too but if it is not possible we can drop one or both of them
for now for further review.

> And don't use __force, really, can't you fix this some other way?

As stated in the description for patch 6, because of the dependence of
the MIC drivers on the virtio infrastructure there is no simple way to
fix these memory space issues at present. Since the sparse warnings do
not represent real issues the warnings are being suppressed using
__force.

>> +	vq = vring_new_virtqueue(index, le16_to_cpu(config.num),
>> +				 MIC_VIRTIO_RING_ALIGN, vdev, false,
>> +				 (void __force *)va, mic_notify, callback,
>> +				 name);
>
> Why __force a void * here?  That feels wrong.

In all instances in patch 6 __force is used to strip the __iomem
attribute (e.g. va is declared as 'void __iomem *va;').

thanks,

ashutosh

  reply	other threads:[~2013-11-27 17:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-26 18:04 [PATCH char-misc-linus 0/5] misc: mic: Fixes for 3.13-rc2 Ashutosh Dixit
2013-11-26 18:08 ` [PATCH char-misc-linus 1/5] misc: mic: Change mic_notify(...) to return true Ashutosh Dixit
2013-11-26 18:11 ` [PATCH char-misc-linus 2/5] misc: mic: Minor bug fix in 'retry' loops Ashutosh Dixit
2013-11-26 18:12 ` [PATCH char-misc-linus 3/5] misc: mic: Bug fix for sysfs poll usage Ashutosh Dixit
2013-11-26 18:14 ` [PATCH char-misc-linus 4/5] misc: mic: Fix sparse warnings and other endianness issues Ashutosh Dixit
2013-11-26 19:15   ` Greg Kroah-Hartman
2013-11-27 17:12     ` Ashutosh Dixit [this message]
2013-11-26 18:15 ` [PATCH char-misc-linus 5/5] misc: mic: Fix user space namespace pollution from mic_common.h Ashutosh Dixit
2013-11-26 18:12   ` H. Peter Anvin

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=m3zjopwyzi.fsf@adixit-yct.ra.intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=arnd@arndb.de \
    --cc=caz.yokoyama@intel.com \
    --cc=dasaratharaman.chandramouli@intel.com \
    --cc=fengguang.wu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikhil.rao@intel.com \
    --cc=siva.krishna.kumar.reddy.yerramreddy@intel.com \
    --cc=sudeep.dutt@intel.com \
    --cc=virtualization@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®