All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
	linux-kernel@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Ley Foon Tan <lftan@altera.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/5] ARM: add EXPORT_SYMBOL of hook_fault_code for PCI host modularization
Date: Mon, 8 Feb 2016 17:27:00 +0000	[thread overview]
Message-ID: <20160208172700.GR10826@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <2567476.SknW0BEsQJ@wuerfel>

On Mon, Feb 08, 2016 at 10:53:10AM +0100, Arnd Bergmann wrote:
> On Sunday 07 February 2016 19:00:40 Paul Gortmaker wrote:
> > In a discussion of a previous patch set[1], it was suggested that
> > modularizing some of the PCI host support would be good to keep
> > multi platform bzImage sizes smaller.
> > 
> > Two of the files that are candidates for conversion to tristate
> > from bool are:
> > 
> > drivers/pci/host/pci-imx6.c
> > drivers/pci/host/pci-keystone.c
> > 
> > However, doing the conversion reveals that they are going to fail
> > at modpost time since hook_fault_code isn't currently exported.
> > 
> > Since we are now going to export it we also need to remove the
> > __init tag, as the fcn needs to be present at insmod time.
> > 
> > [1] https://lkml.kernel.org/r/20160108203102.GH5354@localhost
> > 
> 
> If we want to make hook_fault_code() visible, we at least also need
> an unhook_fault_code() function that removes the fault handler
> when unloading the module, and preferably does so in a safe way.
> 
> The usage of hook_fault_code() at least in the imx driver is also
> problematic, as it just ignores all "imprecise external abort"
> faults, whether they come from PCI or not.

And that gets a NAK from me.  We can't take locks around this code
(to do so would be deadlocky due to imprecise aborts), so we can't
ever safely remove any function that has been hooked into the fault
processing.

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

WARNING: multiple messages have this Message-ID (diff)
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/5] ARM: add EXPORT_SYMBOL of hook_fault_code for PCI host modularization
Date: Mon, 8 Feb 2016 17:27:00 +0000	[thread overview]
Message-ID: <20160208172700.GR10826@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <2567476.SknW0BEsQJ@wuerfel>

On Mon, Feb 08, 2016 at 10:53:10AM +0100, Arnd Bergmann wrote:
> On Sunday 07 February 2016 19:00:40 Paul Gortmaker wrote:
> > In a discussion of a previous patch set[1], it was suggested that
> > modularizing some of the PCI host support would be good to keep
> > multi platform bzImage sizes smaller.
> > 
> > Two of the files that are candidates for conversion to tristate
> > from bool are:
> > 
> > drivers/pci/host/pci-imx6.c
> > drivers/pci/host/pci-keystone.c
> > 
> > However, doing the conversion reveals that they are going to fail
> > at modpost time since hook_fault_code isn't currently exported.
> > 
> > Since we are now going to export it we also need to remove the
> > __init tag, as the fcn needs to be present at insmod time.
> > 
> > [1] https://lkml.kernel.org/r/20160108203102.GH5354 at localhost
> > 
> 
> If we want to make hook_fault_code() visible, we at least also need
> an unhook_fault_code() function that removes the fault handler
> when unloading the module, and preferably does so in a safe way.
> 
> The usage of hook_fault_code() at least in the imx driver is also
> problematic, as it just ignores all "imprecise external abort"
> faults, whether they come from PCI or not.

And that gets a NAK from me.  We can't take locks around this code
(to do so would be deadlocky due to imprecise aborts), so we can't
ever safely remove any function that has been hooked into the fault
processing.

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

  parent reply	other threads:[~2016-02-08 17:27 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08  0:00 [PATCH 0/5] Modularize PCI_DW related drivers Paul Gortmaker
2016-02-08  0:00 ` Paul Gortmaker
2016-02-08  0:00 ` Paul Gortmaker
2016-02-08  0:00 ` [PATCH 1/5] ARM: add EXPORT_SYMBOL of hook_fault_code for PCI host modularization Paul Gortmaker
2016-02-08  0:00   ` Paul Gortmaker
2016-02-08  9:53   ` Arnd Bergmann
2016-02-08  9:53     ` Arnd Bergmann
2016-02-08 16:39     ` Paul Gortmaker
2016-02-08 16:39       ` Paul Gortmaker
2016-02-08 17:27     ` Russell King - ARM Linux [this message]
2016-02-08 17:27       ` Russell King - ARM Linux
2016-02-08 17:34   ` Russell King - ARM Linux
2016-02-08 17:34     ` Russell King - ARM Linux
2016-02-08  0:00 ` [PATCH 2/5] drivers/of: add EXPORT_SYMBOL to of_irq_count Paul Gortmaker
2016-02-08  0:00   ` Paul Gortmaker
2016-02-08  9:56   ` Arnd Bergmann
2016-02-08  9:56     ` Arnd Bergmann
2016-02-08 15:54     ` Paul Gortmaker
2016-02-08 15:54       ` Paul Gortmaker
2016-02-08  0:00 ` [PATCH 3/5] drivers/pci: export dw syms enabling board specific PCI code to be tristate Paul Gortmaker
2016-02-08  9:57   ` Arnd Bergmann
2016-02-08 15:53     ` Paul Gortmaker
2016-02-08  0:00 ` [PATCH 4/5] drivers/pci: make host/pci-keystone-dw.c modular Paul Gortmaker
2016-02-08  0:00   ` Paul Gortmaker
2016-02-08  9:59   ` Arnd Bergmann
2016-02-08  9:59     ` Arnd Bergmann
2016-02-08 15:53     ` Paul Gortmaker
2016-02-08 15:53       ` Paul Gortmaker
2016-02-08 19:03       ` Murali Karicheri
2016-02-08 19:03         ` Murali Karicheri
2016-02-08  0:00 ` [PATCH 5/5] drivers/pci: make most of the PCI_DW drivers modular Paul Gortmaker
2016-02-08  0:00   ` Paul Gortmaker
2016-02-08 10:00   ` Arnd Bergmann
2016-02-08 15:51     ` Paul Gortmaker
2016-02-08 15:51       ` Paul Gortmaker
2016-02-24  6:09 ` [PATCH 0/5] Modularize PCI_DW related drivers Kishon Vijay Abraham I
2016-02-24  6:09   ` Kishon Vijay Abraham I
2016-02-24  6:09   ` Kishon Vijay Abraham I
2016-02-24  9:04   ` Arnd Bergmann
2016-02-24  9:04     ` Arnd Bergmann
2016-02-25  8:13     ` Kishon Vijay Abraham I
2016-02-25  8:13       ` Kishon Vijay Abraham I
2016-02-25  8:13       ` Kishon Vijay Abraham I
2016-02-25  8:35       ` Arnd Bergmann
2016-02-25  8:35         ` Arnd Bergmann
2016-02-29  9:29         ` Kishon Vijay Abraham I
2016-02-29  9:29           ` Kishon Vijay Abraham I
2016-02-29  9:29           ` Kishon Vijay Abraham I
2016-03-01 21:35           ` Arnd Bergmann
2016-03-01 21:35             ` Arnd Bergmann
2016-03-15 20:50             ` Murali Karicheri
2016-03-15 20:50               ` Murali Karicheri
2016-03-15 20:50               ` Murali Karicheri

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=20160208172700.GR10826@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=geert@linux-m68k.org \
    --cc=lftan@altera.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=thierry.reding@gmail.com \
    /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.