Received: by mail.netbsd.org (Postfix, from userid 0) id 0904A63B103; Sat, 26 Jun 2010 07:23:59 +0000 (UTC) Received: from cvs.netbsd.org (cvs.NetBSD.org [IPv6:2001:4f8:3:7:2e0:81ff:fe30:95bd]) by mail.netbsd.org (Postfix) with ESMTP id 314D063B103 for ; Sat, 26 Jun 2010 07:23:58 +0000 (UTC) Received: by cvs.netbsd.org (Postfix, from userid 500) id E880A175DF; Sat, 26 Jun 2010 07:23:57 +0000 (UTC) MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: binary Content-Type: text/plain Date: Sat, 26 Jun 2010 07:23:57 +0000 From: Paul Goyette Subject: CVS commit: src/sys To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20100626072357.E880A175DF@cvs.netbsd.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: list Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: Paul Goyette Mail-Followup-To: source-changes-d@NetBSD.org Module Name: src Committed By: pgoyette Date: Sat Jun 26 07:23:57 UTC 2010 Modified Files: src/sys/kern: init_main.c kern_module.c src/sys/sys: module.h Log Message: 1. Add an allocator for 'struct module *' and use it instead of local allocations. 2. Add a new member mod_flags to the 'struct module *' and define MODFLG_MUST_FORCE. If this flag is set and the entry is on the list of builtins, it means that the module has been explicitly unloaded and any re-loads will require the MODCTL_LOAD_FORCE flag. Provide a module_require_force() method to set this flag; once set, it should never be unset. 3. Rename original module_init2() to module_start_unload_thread() to be more descriptive of what it does. 4. Add a new module_builtin_require_force() routine that sets the MODFLG_MUST_FORCE flag for any module that has not yet successfully been initialized. Call it after module_init_class(MODULE_CLASS_ANY) to disable remaining built-in modules. This makes built-in versions of the xxxVERBOSE modules work once more, resolving breakage reported by jruoho@ and njoly@. Discussed on tech-kern, and comments and suggestions implemented. No additional discussion for last week. Tested only on amd64 systems, but there's nothing here that should be port- or architecture-specific (no more specific than existing module implementation) so others should not break. To generate a diff of this commit: cvs rdiff -u -r1.421 -r1.422 src/sys/kern/init_main.c cvs rdiff -u -r1.69 -r1.70 src/sys/kern/kern_module.c cvs rdiff -u -r1.23 -r1.24 src/sys/sys/module.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.