mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
Merge tag 'driver-core-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH: "Here is the big set of driver core and debug printk changes for 6.1-rc1. Included in here is: - dynamic debug updates for the core and the drm subsystem. The drm changes have all been acked by the relevant maintainers - kernfs fixes for syzbot reported problems - kernfs refactors and updates for cgroup requirements - magic number cleanups and removals from the kernel tree (they were not being used and they really did not actually do anything) - other tiny cleanups All of these have been in linux-next for a while with no reported issues" * tag 'driver-core-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (74 commits) docs: filesystems: sysfs: Make text and code for ->show() consistent Documentation: NBD_REQUEST_MAGIC isn't a magic number a.out: restore CMAGIC device property: Add const qualifier to device_get_match_data() parameter drm_print: add _ddebug descriptor to drm_*dbg prototypes drm_print: prefer bare printk KERN_DEBUG on generic fn drm_print: optimize drm_debug_enabled for jump-label drm-print: add drm_dbg_driver to improve namespace symmetry drm-print.h: include dyndbg header drm_print: wrap drm_*_dbg in dyndbg descriptor factory macro drm_print: interpose drm_*dbg with forwarding macros drm: POC drm on dyndbg - use in core, 2 helpers, 3 drivers. drm_print: condense enum drm_debug_category debugfs: use DEFINE_SHOW_ATTRIBUTE to define debugfs_regset32_fops driver core: use IS_ERR_OR_NULL() helper in device_create_groups_vargs() Documentation: ENI155_MAGIC isn't a magic number Documentation: NBD_REPLY_MAGIC isn't a magic number nbd: remove define-only NBD_MAGIC, previously magic number Documentation: FW_HEADER_MAGIC isn't a magic number Documentation: EEPROM_MAGIC_VALUE isn't a magic number ...
This commit is contained in:
@@ -1594,16 +1594,16 @@ static void free_modinfo(struct module *mod)
|
||||
}
|
||||
}
|
||||
|
||||
static void dynamic_debug_setup(struct module *mod, struct _ddebug *debug, unsigned int num)
|
||||
static void dynamic_debug_setup(struct module *mod, struct _ddebug_info *dyndbg)
|
||||
{
|
||||
if (!debug)
|
||||
if (!dyndbg->num_descs)
|
||||
return;
|
||||
ddebug_add_module(debug, num, mod->name);
|
||||
ddebug_add_module(dyndbg, mod->name);
|
||||
}
|
||||
|
||||
static void dynamic_debug_remove(struct module *mod, struct _ddebug *debug)
|
||||
static void dynamic_debug_remove(struct module *mod, struct _ddebug_info *dyndbg)
|
||||
{
|
||||
if (debug)
|
||||
if (dyndbg->num_descs)
|
||||
ddebug_remove_module(mod->name);
|
||||
}
|
||||
|
||||
@@ -2107,8 +2107,10 @@ static int find_module_sections(struct module *mod, struct load_info *info)
|
||||
if (section_addr(info, "__obsparm"))
|
||||
pr_warn("%s: Ignoring obsolete parameters\n", mod->name);
|
||||
|
||||
info->debug = section_objs(info, "__dyndbg",
|
||||
sizeof(*info->debug), &info->num_debug);
|
||||
info->dyndbg.descs = section_objs(info, "__dyndbg",
|
||||
sizeof(*info->dyndbg.descs), &info->dyndbg.num_descs);
|
||||
info->dyndbg.classes = section_objs(info, "__dyndbg_classes",
|
||||
sizeof(*info->dyndbg.classes), &info->dyndbg.num_classes);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2799,7 +2801,7 @@ static int load_module(struct load_info *info, const char __user *uargs,
|
||||
}
|
||||
|
||||
init_build_id(mod, info);
|
||||
dynamic_debug_setup(mod, info->debug, info->num_debug);
|
||||
dynamic_debug_setup(mod, &info->dyndbg);
|
||||
|
||||
/* Ftrace init must be called in the MODULE_STATE_UNFORMED state */
|
||||
ftrace_module_init(mod);
|
||||
@@ -2863,7 +2865,7 @@ static int load_module(struct load_info *info, const char __user *uargs,
|
||||
|
||||
ddebug_cleanup:
|
||||
ftrace_release_mod(mod);
|
||||
dynamic_debug_remove(mod, info->debug);
|
||||
dynamic_debug_remove(mod, &info->dyndbg);
|
||||
synchronize_rcu();
|
||||
kfree(mod->args);
|
||||
free_arch_cleanup:
|
||||
|
Reference in New Issue
Block a user