From 42eb9640b7616b14e924da5a36778846a495f571 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Thu, 2 Apr 2009 12:31:16 +0900 Subject: [PATCH] --- yaml --- r: 141823 b: refs/heads/master c: eeee7853c4ffaf5b9eb58f39708e3c78f66cee15 h: refs/heads/master i: 141821: 0f62b8fd6e1b39e35859fd6a50a62e8a45453a0c 141819: e5bbf2c8f7a6b21c43fd02268949a1fd93fe11e5 141815: 86c7af1ad588900e6642f45286d00c650e5cb8c9 141807: 7e56de99b326a91bb3d9861956a77aa0281d2da6 141791: e672dffe59281b431c60799733aa7c37bf1ead14 141759: 0a380593c288020aec2bea9e0df360290ead979c 141695: 0b9502b07915d0f484f3fa551f1b1d8dfe779c29 141567: 314dd180f9e9f20e95c4d79586ef45145192008b 141311: b9f0a2a9a55e27e85fa43af27ba7b2eba7599985 v: v3 --- [refs] | 2 +- trunk/Documentation/kernel-parameters.txt | 2 ++ trunk/arch/sh/kernel/io_trapped.c | 13 +++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index dca906ac3856..a852500e3989 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8dafc34616282c1fd79d42a4353ee5322767d720 +refs/heads/master: eeee7853c4ffaf5b9eb58f39708e3c78f66cee15 diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt index 240257dd4238..8b2067cceadc 100644 --- a/trunk/Documentation/kernel-parameters.txt +++ b/trunk/Documentation/kernel-parameters.txt @@ -1544,6 +1544,8 @@ and is between 256 and 4096 characters. It is defined in the file Valid arguments: on, off Default: on + noiotrap [SH] Disables trapped I/O port accesses. + noirqdebug [X86-32] Disables the code which attempts to detect and disable unhandled interrupt sources. diff --git a/trunk/arch/sh/kernel/io_trapped.c b/trunk/arch/sh/kernel/io_trapped.c index 39cd7f3aec7b..c22853b059ef 100644 --- a/trunk/arch/sh/kernel/io_trapped.c +++ b/trunk/arch/sh/kernel/io_trapped.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -32,6 +33,15 @@ EXPORT_SYMBOL_GPL(trapped_mem); #endif static DEFINE_SPINLOCK(trapped_lock); +static int trapped_io_disable __read_mostly; + +static int __init trapped_io_setup(char *__unused) +{ + trapped_io_disable = 1; + return 1; +} +__setup("noiotrap", trapped_io_setup); + int register_trapped_io(struct trapped_io *tiop) { struct resource *res; @@ -39,6 +49,9 @@ int register_trapped_io(struct trapped_io *tiop) struct page *pages[TRAPPED_PAGES_MAX]; int k, n; + if (unlikely(trapped_io_disable)) + return 0; + /* structure must be page aligned */ if ((unsigned long)tiop & (PAGE_SIZE - 1)) goto bad;