From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Keith Owens <kaos@ocs.com.au>
Cc: Len Brown <lenb@kernel.org>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: Matthieu CASTET <castet.matthieu@free.fr>
Cc: Jean Tourrilhes <jt@hpl.hp.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Ville Syrjala <syrjala@sci.fi>
Cc: Russell King <rmk+serial@arm.linux.org.uk>
Cc: linux-serial@vger.kernel.org
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: linux-kernel@vger.kernel.org
Subject: [patch 1/5] PNP: notice whether we have PNP devices (PNPBIOS or PNPACPI)
Date: Wed, 04 Apr 2007 16:45:37 -0600 [thread overview]
Message-ID: <20070404224608.371449000@ldl.fc.hp.com> (raw)
In-Reply-To: <20070404224536.337573000@ldl.fc.hp.com>
[-- Attachment #1: pnp-platform-devs.patch --]
[-- Type: text/plain, Size: 2645 bytes --]
If we can discover devices using PNP, we can skip some legacy probes.
This flag ("pnp_platform_devices") indicates that PNPBIOS or PNPACPI
is enabled and should tell us about builtin devices.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Index: work/drivers/pnp/core.c
===================================================================
--- work.orig/drivers/pnp/core.c 2007-03-27 13:05:23.000000000 -0600
+++ work/drivers/pnp/core.c 2007-03-27 16:12:54.000000000 -0600
@@ -23,6 +23,14 @@
LIST_HEAD(pnp_global);
DEFINE_SPINLOCK(pnp_lock);
+/*
+ * ACPI or PNPBIOS should tell us about all platform devices, so we can
+ * skip some blind probes. ISAPNP typically enumerates only plug-in ISA
+ * devices, not built-in things like COM ports.
+ */
+int pnp_platform_devices;
+EXPORT_SYMBOL(pnp_platform_devices);
+
void *pnp_alloc(long size)
{
void *result;
Index: work/drivers/pnp/pnpacpi/core.c
===================================================================
--- work.orig/drivers/pnp/pnpacpi/core.c 2007-03-27 13:05:23.000000000 -0600
+++ work/drivers/pnp/pnpacpi/core.c 2007-03-27 14:44:05.000000000 -0600
@@ -247,6 +247,7 @@
pnp_register_protocol(&pnpacpi_protocol);
acpi_get_devices(NULL, pnpacpi_add_device_handler, NULL, NULL);
pnp_info("PnP ACPI: found %d devices", num);
+ pnp_platform_devices = 1;
return 0;
}
subsys_initcall(pnpacpi_init);
Index: work/drivers/pnp/pnpbios/core.c
===================================================================
--- work.orig/drivers/pnp/pnpbios/core.c 2007-03-27 13:05:23.000000000 -0600
+++ work/drivers/pnp/pnpbios/core.c 2007-03-27 14:44:05.000000000 -0600
@@ -574,6 +574,7 @@
/* scan for pnpbios devices */
build_devlist();
+ pnp_platform_devices = 1;
return 0;
}
Index: work/include/linux/pnp.h
===================================================================
--- work.orig/include/linux/pnp.h 2007-03-27 13:05:23.000000000 -0600
+++ work/include/linux/pnp.h 2007-03-27 14:44:05.000000000 -0600
@@ -364,6 +364,7 @@
int pnp_device_attach(struct pnp_dev *pnp_dev);
void pnp_device_detach(struct pnp_dev *pnp_dev);
extern struct list_head pnp_global;
+extern int pnp_platform_devices;
/* multidevice card support */
int pnp_add_card(struct pnp_card *card);
@@ -411,6 +412,7 @@
static inline int pnp_add_device(struct pnp_dev *dev) { return -ENODEV; }
static inline int pnp_device_attach(struct pnp_dev *pnp_dev) { return -ENODEV; }
static inline void pnp_device_detach(struct pnp_dev *pnp_dev) { ; }
+#define pnp_platform_devices 0
/* multidevice card support */
static inline int pnp_add_card(struct pnp_card *card) { return -ENODEV; }
--
next prev parent reply other threads:[~2007-04-04 22:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-04 22:45 [patch 0/5] PNP: convert x86 legacy serial to platform devs, add SMC IR PNP probe Bjorn Helgaas
2007-04-04 22:45 ` Bjorn Helgaas [this message]
2007-04-04 22:45 ` [patch 2/5] PNP: workaround HP BIOS defect that leaves SMCF010 device partly enabled Bjorn Helgaas
2007-04-04 22:45 ` [patch 3/5] smsc-ircc2: tidy up module parameter checking Bjorn Helgaas
2007-04-04 22:45 ` [patch 4/5] smsc-ircc2: add PNP support Bjorn Helgaas
2007-04-04 23:16 ` Randy Dunlap
2007-04-05 18:45 ` Bjorn Helgaas
2007-04-04 22:45 ` [patch 5/5] x86, serial: convert legacy COM ports to platform devices Bjorn Helgaas
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=20070404224608.371449000@ldl.fc.hp.com \
--to=bjorn.helgaas@hp.com \
--cc=akpm@linux-foundation.org \
--cc=kaos@ocs.com.au \
/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
Powered by JetHome