Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1203366 > unrolled thread
| Started by | Paul Gortmaker <paul.gortmaker@windriver.com> |
|---|---|
| First post | 2015-08-08 22:40 +0200 |
| Last post | 2015-08-10 19:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 4/4] drivers/misc: make kgdbts.c slightly more explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2015-08-08 22:40 +0200
Re: [PATCH 4/4] drivers/misc: make kgdbts.c slightly more explicitly non-modular Jason Wessel <jason.wessel@windriver.com> - 2015-08-10 19:30 +0200
| From | Paul Gortmaker <paul.gortmaker@windriver.com> |
|---|---|
| Date | 2015-08-08 22:40 +0200 |
| Subject | [PATCH 4/4] drivers/misc: make kgdbts.c slightly more explicitly non-modular |
| Message-ID | <pVj4m-19X-13@gated-at.bofh.it> |
The Kconfig currently controlling compilation of this code is:
lib/Kconfig.kgdb:config KGDB_TESTS
lib/Kconfig.kgdb: bool "KGDB: internal test suite"
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.
Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.
We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.
We can't remove the module.h include since we've kept the use of
module_param in this file for now.
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: kgdb-bugreport@lists.sourceforge.net
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/misc/kgdbts.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c
index 9a60bd4d3c49..99635dd9dbac 100644
--- a/drivers/misc/kgdbts.c
+++ b/drivers/misc/kgdbts.c
@@ -1112,6 +1112,7 @@ static int __init init_kgdbts(void)
return configure_kgdbts();
}
+device_initcall(init_kgdbts);
static int kgdbts_get_char(void)
{
@@ -1180,10 +1181,9 @@ static struct kgdb_io kgdbts_io_ops = {
.post_exception = kgdbts_post_exp_handler,
};
-module_init(init_kgdbts);
+/*
+ * not really modular, but the easiest way to keep compat with existing
+ * bootargs behaviour is to continue using module_param here.
+ */
module_param_call(kgdbts, param_set_kgdbts_var, param_get_string, &kps, 0644);
MODULE_PARM_DESC(kgdbts, "<A|V1|V2>[F#|S#][N#]");
-MODULE_DESCRIPTION("KGDB Test Suite");
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Wind River Systems, Inc.");
-
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Jason Wessel <jason.wessel@windriver.com> |
|---|---|
| Date | 2015-08-10 19:30 +0200 |
| Subject | Re: [PATCH 4/4] drivers/misc: make kgdbts.c slightly more explicitly non-modular |
| Message-ID | <pVZ3A-4xY-17@gated-at.bofh.it> |
| In reply to | #1203366 |
On 08/08/2015 03:35 PM, Paul Gortmaker wrote: > The Kconfig currently controlling compilation of this code is: > > lib/Kconfig.kgdb:config KGDB_TESTS > lib/Kconfig.kgdb: bool "KGDB: internal test suite" > > ...meaning that it currently is not being built as a module by anyone. > > Lets remove the modular code that is essentially orphaned, so that > when reading the driver there is no doubt it is builtin-only. > > Since module_init translates to device_initcall in the non-modular > case, the init ordering remains unchanged with this commit. > > We also delete the MODULE_LICENSE tag etc. since all that information > is already contained at the top of the file in the comments. > > We can't remove the module.h include since we've kept the use of > module_param in this file for now. This is correct, if you remove that there is no way to invoke the test suite later on at run time. I tried out the patch and it works fine with no regressions. Unrelated to this it seems there is a problem with the read/write of the break points when crossing the point where the kernel write protects the read-only data. Basically, the break point is implanted into the code page, which is made read-only, and then it can no longer be removed. What we typically do in that case "after read-only pages are established", is to use COW pages for the break points. I'll have to look further into what if anything we might have to do about it. At least the emergency printk logic worked to show there is a problem. :-) Acked-by: Jason Wessel <jason.wessel@windriver.com> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web