linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Koehrer Mathias (ETAS/ESW5)" <mathias.koehrer@etas.com>
To: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"bhelgaas@google.com" <bhelgaas@google.com>,
	"hjk@hansjkoch.de" <hjk@hansjkoch.de>,
	"helgaas@kernel.org" <helgaas@kernel.org>
Subject: Re: [PATCH] Introducing kernel option to force all PCI memory resources to be page aligned. Fixes issues with uio based drivers.
Date: Wed, 8 Jun 2016 08:32:52 +0000	[thread overview]
Message-ID: <ef1a9c8e1ef0439a84ad43c1a8f92d79@FE-MBX1012.de.bosch.com> (raw)

Hi Greg,
> > > > The issue is not the firmware. The issue is that the Linux uio
> > > > driver
> > > > (here: uio_cif) does not work as uio_mmap() -> uio_mmap_physical()
> > > > does not do a mmap on physical memory that is not page aligned...
> > >
> > > Then why not fix the uio_cif driver?
> > The fix might be in uio and not in uio_cif. However
> > uio_mmap_physical() in uio.c has introduced checks to reject non page-
> aligned addresses.
> 
> Yes, because we had real problems with that in the past.
> 
> > These checks have been introduced somewhere in between kernel V3.2 and
> kernel V3.18.
> > Removing these checks again does not sound to me like a good idea...
> 
> I agree, you should fix your hardware :)
> 
> > The overall question is now if the UIO system is working at all with
> > non page aligned PCI memory resources. For me it looks as if this is not the
> case.
> 
> How is your system ending up with such alignment in the first place?
> What is the resource list after booting?
Here is the resource list of the relevant PCI board. The first memory resource has a size of 128k and is not page aligned.

0f:05.0 Bridge: PLX Technology, Inc. PCI9030 32-bit 33MHz PCI <-> IOBus Bridge (rev 01)
	Subsystem: PLX Technology, Inc. Hilscher CIF50-PB/DPS Profibus
	Flags: medium devsel, IRQ 23
	Memory at eae4f400 (32-bit, non-prefetchable) [size=128]
	I/O ports at 9800 [size=128]
	Memory at eae4c000 (32-bit, non-prefetchable) [size=8K]
	Capabilities: [40] Power Management version 1
	Capabilities: [48] CompactPCI hot-swap <?>
	Capabilities: [4c] Vital Product Data
	Kernel driver in use: hilscher

Regards

Mathias

             reply	other threads:[~2016-06-08  8:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-08  8:32 Koehrer Mathias (ETAS/ESW5) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-06-07  6:51 [PATCH] Introducing kernel option to force all PCI memory resources to be page aligned. Fixes issues with uio based drivers Koehrer Mathias (ETAS/ESW5)
2016-06-07 14:31 ` gregkh
2016-06-06 14:59 Koehrer Mathias (ETAS/ESW5)
2016-06-06 15:26 ` gregkh
2016-06-06  6:53 Koehrer Mathias (ETAS/ESW5)
2016-06-06 14:46 ` gregkh

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=ef1a9c8e1ef0439a84ad43c1a8f92d79@FE-MBX1012.de.bosch.com \
    --to=mathias.koehrer@etas.com \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=helgaas@kernel.org \
    --cc=hjk@hansjkoch.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@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).