From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753301AbcFFO7w (ORCPT ); Mon, 6 Jun 2016 10:59:52 -0400 Received: from smtp6-v.fe.bosch.de ([139.15.237.11]:17147 "EHLO smtp6-v.fe.bosch.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752686AbcFFO7u convert rfc822-to-8bit (ORCPT ); Mon, 6 Jun 2016 10:59:50 -0400 From: "Koehrer Mathias (ETAS/ESW5)" To: "gregkh@linuxfoundation.org" CC: "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "bhelgaas@google.com" , "hjk@hansjkoch.de" Subject: Re: [PATCH] Introducing kernel option to force all PCI memory resources to be page aligned. Fixes issues with uio based drivers. Thread-Topic: [PATCH] Introducing kernel option to force all PCI memory resources to be page aligned. Fixes issues with uio based drivers. Thread-Index: AdHAAyf56f3+L61rSfuKnYoG8po80Q== Date: Mon, 6 Jun 2016 14:59:47 +0000 Message-ID: Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.5.145.185] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-TM-AS-MML: disable X-TM-AS-Product-Ver: IMSS-7.1.0.1679-8.0.0.1202-22374.006 X-TMASE-MatchedRID: VPleTT1nwdSnykMun0J1wrmR+C0l9vjVkd8i2lgND8uae6AcsiK/zVWf MUL6s7SErTKkwsUc4lcAr9cazk30r3mVnpZCEhlXPJAf1AuYU6BQCOsAlaxN7yzt4/lw8JZDmE9 Wy0YSLEOfhHQDFoWdjKa+gBH27IX3Z73RnaBbLFqXXOyNnX/prAXXmzqmsIi7Ri9INZ1ZpGFASA ka3p+8Qni0ZcUW1po7jenw2507tJ9Dq2SVEk72KAtuKBGekqUpPjKoPgsq7cA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Greg, thanks for the response. > > Some uio based PCI drivers (e.g. uio_cif) do not work if the assigned > > PCI memory resources are not page aligned. > > By using the kernel option "pci=resource_alignment" it is possible to > > force single PCI boards to use page alignment for their memory resources. > > However, this is fairly cumbersome if multiple of these cards are in use. > > This patch adds another kernel option "pci=resources_page_aligned" > > that allows to set the default alignment of PCI memory resources to be > > page aligned. > > Overwriting of this default alignment via "pci=resource_alignment" is > > still possible. > > This seems like a very large hammer for a very specific problem with a card > that seems to be not-in-spec (I can't find anywhere that requires resources to > be "page" aligned in the PCI spec). Why not fix the firmware in these cards? 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... Regards Mathias