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-next>] [day] [month] [year] [list]
Message-Id: <20070119.002346.74752797.anemo@mba.ocn.ne.jp>
Date:	Fri, 19 Jan 2007 00:23:46 +0900 (JST)
From:	Atsushi Nemoto <anemo@....ocn.ne.jp>
To:	linux-kernel@...r.kernel.org
Cc:	linux-mips@...ux-mips.org, akpm@...l.org, ralf@...ux-mips.org
Subject: [PATCH] Make CARDBUS_MEM_SIZE and CARDBUS_IO_SIZE customizable

CARDBUS_MEM_SIZE was increased to 64MB on 2.6.20-rc2, but larger size
might result in allocation failure for the reserving itself on some
platforms (for example typical 32bit MIPS).  Make it (and
CARDBUS_IO_SIZE too) customizable for such platforms.

Signed-off-by: Atsushi Nemoto <anemo@....ocn.ne.jp>
---
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 3cfb0a3..6085d3d 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -60,3 +60,19 @@ config HT_IRQ
 	   This allows native hypertransport devices to use interrupts.
 
 	   If unsure say Y.
+
+config PCI_CARDBUS_IO_SIZE
+	int "CardBus IO window size (bytes)"
+	depends on PCI
+	default "256"
+	help
+	  A fixed amount of bus space is reserved for CardBus bridges.
+	  The default value is 256 bytes.
+
+config PCI_CARDBUS_MEM_SIZE
+	int "CardBus Memory window size (megabytes)"
+	depends on PCI
+	default "64"
+	help
+	  A fixed amount of bus space is reserved for CardBus bridges.
+	  The default value is 64 megabytes.
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 89f3036..046c87b 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -40,8 +40,8 @@
  * FIXME: IO should be max 256 bytes.  However, since we may
  * have a P2P bridge below a cardbus bridge, we need 4K.
  */
-#define CARDBUS_IO_SIZE		(256)
-#define CARDBUS_MEM_SIZE	(64*1024*1024)
+#define CARDBUS_IO_SIZE		CONFIG_PCI_CARDBUS_IO_SIZE
+#define CARDBUS_MEM_SIZE	(CONFIG_PCI_CARDBUS_MEM_SIZE * 1024 * 1024)
 
 static void __devinit
 pbus_assign_resources_sorted(struct pci_bus *bus)
-
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