lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 25 Jun 2012 21:30:57 -0600
From:	Myron Stowe <myron.stowe@...hat.com>
To:	bhelgaas@...gle.com
Cc:	linux-pci@...r.kernel.org, rth@...ddle.net,
	ink@...assic.park.msu.ru, mattst88@...il.com,
	linux@....linux.org.uk, starvik@...s.com, jesper.nilsson@...s.com,
	tony.luck@...el.com, fenghua.yu@...el.com, monstr@...str.eu,
	ralf@...ux-mips.org, yasutake.koichi@...panasonic.com,
	jejb@...isc-linux.org, deller@....de, benh@...nel.crashing.org,
	paulus@...ba.org, lethal@...ux-sh.org, davem@...emloft.net,
	cmetcalf@...era.com, gxt@...c.pku.edu.cn, tglx@...utronix.de,
	mingo@...hat.com, hpa@...or.com, x86@...nel.org, chris@...kel.net,
	linux-kernel@...r.kernel.org
Subject: [PATCH 01/16] PCI: Pull 'pcibios_setup' up into PCI's core

Currently, all of the architectures implement their own 'pcibios_setup()'
routine.  Most of the implementations do nothing so this patch introduces
a generic (__weak) routine into PCI's core that can be used by all
architectures as a default.  If necessary, it can be over-ridden by
architecture-specific code.

No functional change.

Signed-off-by: Myron Stowe <myron.stowe@...hat.com>
---

 drivers/pci/pci.c   |   12 ++++++++++++
 include/linux/pci.h |    1 +
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 77cb54a..0f6d472 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2671,6 +2671,18 @@ static void __pci_set_master(struct pci_dev *dev, bool enable)
 }
 
 /**
+ * pcibios_setup - process "pci=" kernel boot arguments
+ * @str: string used to pass in "pci=" kernel boot arguments
+ *
+ * Process kernel boot arguments.  This is the default implementation.
+ * Architecture specific implementations can override this as necessary.
+ */
+char * __weak __init pcibios_setup(char *str)
+{
+	return str;
+}
+
+/**
  * pcibios_set_master - enable PCI bus-mastering for device dev
  * @dev: the PCI device to enable
  *
diff --git a/include/linux/pci.h b/include/linux/pci.h
index fefb4e1..fdcff0e 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -644,6 +644,7 @@ extern int no_pci_devices(void);
 
 void pcibios_fixup_bus(struct pci_bus *);
 int __must_check pcibios_enable_device(struct pci_dev *, int mask);
+/* Architecture specific versions may override this (weak) */
 char *pcibios_setup(char *str);
 
 /* Used only when drivers/pci/setup.c is used */

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ