Name: Parameter Changes: arch/ Depends: Module/param.patch.gz Author: Rusty Russell D: This replaces all the arch/ directory occurrances of __setup with D: the new PARAM calls. diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/alpha/kernel/smp.c working-2.4.14-param-all/arch/alpha/kernel/smp.c --- working-2.4.14-param/arch/alpha/kernel/smp.c Tue Oct 9 05:37:11 2001 +++ working-2.4.14-param-all/arch/alpha/kernel/smp.c Thu Nov 22 08:21:31 2001 @@ -89,22 +89,14 @@ extern asmlinkage void entInt(void); -static int __init nosmp(char *str) +static int __init nosmp(char *str, struct kernel_param *kp) { max_cpus = 0; return 1; } -__setup("nosmp", nosmp); - -static int __init maxcpus(char *str) -{ - get_option(&str, &max_cpus); - return 1; -} - -__setup("maxcpus", maxcpus); - +PARAM_CALL(nosmp, nosmp, NULL); +PARAM_NAMED(maxcpus, max_cpus, int, S_IRUGO); /* * Called by both boot and secondaries to move global data into diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/arm/kernel/process.c working-2.4.14-param-all/arch/arm/kernel/process.c --- working-2.4.14-param/arch/arm/kernel/process.c Thu Nov 22 08:19:27 2001 +++ working-2.4.14-param-all/arch/arm/kernel/process.c Thu Nov 22 08:21:31 2001 @@ -55,20 +55,8 @@ hlt_counter--; } -static int __init nohlt_setup(char *__unused) -{ - hlt_counter = 1; - return 1; -} - -static int __init hlt_setup(char *__unused) -{ - hlt_counter = 0; - return 1; -} - -__setup("nohlt", nohlt_setup); -__setup("hlt", hlt_setup); +NAMED_PARAM(nohlt, hlt_counter, bool, 000); +NAMED_PARAM(hlt, hlt_counter, invbool, 000); /* * The following aren't currently used. @@ -105,13 +93,7 @@ static char reboot_mode = 'h'; -int __init reboot_setup(char *str) -{ - reboot_mode = str[0]; - return 1; -} - -__setup("reboot=", reboot_setup); +PARAM_STRING(reboot, &reboot_mode, 1, S_IWUSR|S_IRUGO); void machine_halt(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/arm/kernel/setup.c working-2.4.14-param-all/arch/arm/kernel/setup.c --- working-2.4.14-param/arch/arm/kernel/setup.c Fri Oct 12 02:04:57 2001 +++ working-2.4.14-param-all/arch/arm/kernel/setup.c Thu Nov 22 08:21:31 2001 @@ -37,15 +37,9 @@ #endif #if defined(CONFIG_FPE_NWFPE) || defined(CONFIG_FPE_FASTFPE) -char fpe_type[8]; - -static int __init fpe_setup(char *line) -{ - memcpy(fpe_type, line, 8); - return 1; -} +char *fpe_type; -__setup("fpe=", fpe_setup); +PARAM_NAMED(fpe, fpe_type, charp, S_IRUGO); #endif extern unsigned int mem_fclk_21285; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/arm/mm/init.c working-2.4.14-param-all/arch/arm/mm/init.c --- working-2.4.14-param/arch/arm/mm/init.c Fri Oct 12 02:04:57 2001 +++ working-2.4.14-param-all/arch/arm/mm/init.c Thu Nov 22 08:21:31 2001 @@ -670,13 +670,7 @@ free_area(start, end, "initrd"); } -static int __init keepinitrd_setup(char *__unused) -{ - keep_initrd = 1; - return 1; -} - -__setup("keepinitrd", keepinitrd_setup); +NAMED_PARAM(keepinitrd, keep_initrd, bool, S_IRUGO); #endif void si_meminfo(struct sysinfo *val) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/arm/mm/mm-armv.c working-2.4.14-param-all/arch/arm/mm/mm-armv.c --- working-2.4.14-param/arch/arm/mm/mm-armv.c Thu Jun 28 07:12:04 2001 +++ working-2.4.14-param-all/arch/arm/mm/mm-armv.c Thu Nov 22 08:21:31 2001 @@ -28,35 +28,35 @@ * writebuffer to be turned off. (Note: the write * buffer should not be on and the cache off). */ -static int __init nocache_setup(char *__unused) +static int __init nocache_setup(char *__unused, struct kernel_param *kp) { cr_alignment &= ~4; cr_no_alignment &= ~4; flush_cache_all(); set_cr(cr_alignment); - return 1; + return 0; } -static int __init nowrite_setup(char *__unused) +static int __init nowrite_setup(char *__unused, struct kernel_param *kp) { cr_alignment &= ~(8|4); cr_no_alignment &= ~(8|4); flush_cache_all(); set_cr(cr_alignment); - return 1; + return 0; } -static int __init noalign_setup(char *__unused) +static int __init noalign_setup(char *__unused, struct kernel_param *kp) { cr_alignment &= ~2; cr_no_alignment &= ~2; set_cr(cr_alignment); - return 1; + return 0; } -__setup("noalign", noalign_setup); -__setup("nocache", nocache_setup); -__setup("nowb", nowrite_setup); +PARAM_CALL(noalign, noalign_setup, NULL); +PARAM_CALL(nocache, nocache_setup, NULL); +PARAM_CALL(nowb, nowrite_setup, NULL); #define FIRST_KERNEL_PGD_NR (FIRST_USER_PGD_NR + USER_PTRS_PER_PGD) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/arm/nwfpe/fpmodule.c working-2.4.14-param-all/arch/arm/nwfpe/fpmodule.c --- working-2.4.14-param/arch/arm/nwfpe/fpmodule.c Mon Aug 13 04:13:59 2001 +++ working-2.4.14-param-all/arch/arm/nwfpe/fpmodule.c Thu Nov 22 08:21:31 2001 @@ -53,7 +53,7 @@ #define fp_send_sig send_sig #define kern_fp_enter fp_enter -extern char fpe_type[]; +extern char *fpe_type; #endif /* kernel function prototypes required */ @@ -91,7 +91,7 @@ return -EINVAL; __this_module.can_unload = fpe_unload; #else - if (fpe_type[0] && strcmp(fpe_type, "nwfpe")) + if (fpe_type && strcmp(fpe_type, "nwfpe")) return 0; #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/i386/kernel/apm.c working-2.4.14-param-all/arch/i386/kernel/apm.c --- working-2.4.14-param/arch/i386/kernel/apm.c Thu Nov 22 08:19:27 2001 +++ working-2.4.14-param-all/arch/i386/kernel/apm.c Thu Nov 22 08:21:31 2001 @@ -1785,46 +1785,6 @@ return 0; } -#ifndef MODULE -static int __init apm_setup(char *str) -{ - int invert; - - while ((str != NULL) && (*str != '\0')) { - if (strncmp(str, "off", 3) == 0) - apm_disabled = 1; - if (strncmp(str, "on", 2) == 0) - apm_disabled = 0; - if ((strncmp(str, "bounce-interval=", 16) == 0) || - (strncmp(str, "bounce_interval=", 16) == 0)) - bounce_interval = simple_strtol(str + 16, NULL, 0); - invert = (strncmp(str, "no-", 3) == 0); - if (invert) - str += 3; - if (strncmp(str, "debug", 5) == 0) - debug = !invert; - if ((strncmp(str, "power-off", 9) == 0) || - (strncmp(str, "power_off", 9) == 0)) - power_off = !invert; - if ((strncmp(str, "allow-ints", 10) == 0) || - (strncmp(str, "allow_ints", 10) == 0)) - apm_info.allow_ints = !invert; - if ((strncmp(str, "broken-psr", 10) == 0) || - (strncmp(str, "broken_psr", 10) == 0)) - apm_info.get_power_status_broken = !invert; - if ((strncmp(str, "realmode-power-off", 18) == 0) || - (strncmp(str, "realmode_power_off", 18) == 0)) - apm_info.realmode_power_off = !invert; - str = strchr(str, ','); - if (str != NULL) - str += strspn(str, ", \t"); - } - return 1; -} - -__setup("apm=", apm_setup); -#endif - static struct file_operations apm_bios_fops = { owner: THIS_MODULE, read: do_read, @@ -1999,18 +1959,17 @@ MODULE_AUTHOR("Stephen Rothwell"); MODULE_DESCRIPTION("Advanced Power Management"); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); +PARAM(debug, bool, S_IWUSR|S_IRUGO); MODULE_PARM_DESC(debug, "Enable debug mode"); -MODULE_PARM(power_off, "i"); +PARAM(power_off, bool, S_IWUSR|S_IRUGO); MODULE_PARM_DESC(power_off, "Enable power off"); -MODULE_PARM(bounce_interval, "i"); -MODULE_PARM_DESC(bounce_interval, - "Set the number of ticks to ignore suspend bounces"); -MODULE_PARM(allow_ints, "i"); +PARAM(bounce_interval, int, S_IWUSR|S_IRUGO); +MODULE_PARM_DESC(bounce_interval, "Set the number of ticks to ignore suspend bounces"); +PARAM(allow_ints, bool, S_IWUSR|S_IRUGO); MODULE_PARM_DESC(allow_ints, "Allow interrupts during BIOS calls"); -MODULE_PARM(broken_psr, "i"); +PARAM(broken_psr, bool, S_IWUSR|S_IRUGO); MODULE_PARM_DESC(broken_psr, "BIOS has a broken GetPowerStatus call"); -MODULE_PARM(realmode_power_off, "i"); +PARAM(realmode_power_off, bool, S_IWUSR|S_IRUGO); MODULE_PARM_DESC(realmode_power_off, "Switch to real mode before powering off"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/i386/kernel/bluesmoke.c working-2.4.14-param-all/arch/i386/kernel/bluesmoke.c --- working-2.4.14-param/arch/i386/kernel/bluesmoke.c Fri Oct 12 02:04:57 2001 +++ working-2.4.14-param-all/arch/i386/kernel/bluesmoke.c Thu Nov 22 08:21:31 2001 @@ -233,17 +233,11 @@ } } -static int __init mcheck_disable(char *str) -{ - mce_disabled = 1; - return 0; -} - -static int __init mcheck_enable(char *str) +static int __init mcheck_enable(char *str, struct kernel_param *kp) { mce_disabled = -1; return 0; } -__setup("nomce", mcheck_disable); -__setup("mce", mcheck_enable); +PARAM_NAMED(nomce, mce_disabled, bool, 000); +PARAM_CALL(mce, mcheck_enable, NULL); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/i386/kernel/io_apic.c working-2.4.14-param-all/arch/i386/kernel/io_apic.c --- working-2.4.14-param/arch/i386/kernel/io_apic.c Tue Nov 6 11:41:28 2001 +++ working-2.4.14-param-all/arch/i386/kernel/io_apic.c Thu Nov 22 08:21:31 2001 @@ -179,9 +179,9 @@ return 1; } -__setup("noapic", ioapic_setup); +PARAM_NAMED(noapic, skip_ioapic_setup, bool, 000); -static int __init ioapic_pirq_setup(char *str) +static int __init ioapic_pirq_setup(char *str, struct kernel_param *kp) { int i, max; int ints[MAX_PIRQS+1]; @@ -204,10 +204,10 @@ */ pirq_entries[MAX_PIRQS-i-1] = ints[i+1]; } - return 1; + return 0; } -__setup("pirq=", ioapic_pirq_setup); +PARAM_CALL(pirq, ioapic_pirq_setup, NULL); /* * Find the IRQ entry number of a certain pin. diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/i386/kernel/nmi.c working-2.4.14-param-all/arch/i386/kernel/nmi.c --- working-2.4.14-param/arch/i386/kernel/nmi.c Fri Sep 21 13:55:24 2001 +++ working-2.4.14-param-all/arch/i386/kernel/nmi.c Thu Nov 22 08:21:31 2001 @@ -71,7 +71,7 @@ return 0; } -static int __init setup_nmi_watchdog(char *str) +static int __init setup_nmi_watchdog(char *str, struct kernel_param *kp) { int nmi; @@ -100,10 +100,10 @@ */ if (nmi == NMI_IO_APIC) nmi_watchdog = nmi; - return 1; + return 0; } -__setup("nmi_watchdog=", setup_nmi_watchdog); +PARAM_CALL(nmi_watchdog, setup_nmi_watchdog, NULL); #ifdef CONFIG_PM diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/i386/kernel/process.c working-2.4.14-param-all/arch/i386/kernel/process.c --- working-2.4.14-param/arch/i386/kernel/process.c Thu Nov 22 08:19:27 2001 +++ working-2.4.14-param-all/arch/i386/kernel/process.c Thu Nov 22 08:21:31 2001 @@ -139,17 +139,17 @@ } } -static int __init idle_setup (char *str) +static int __init idle_setup (char *str, struct kernel_param *kp) { if (!strncmp(str, "poll", 4)) { printk("using polling idle threads.\n"); pm_idle = poll_idle; } - return 1; + return 0; } -__setup("idle=", idle_setup); +PARAM_CALL(idle, idle_setup, NULL); static long no_idt[2]; static int reboot_mode; @@ -161,7 +161,7 @@ /* shamelessly grabbed from lib/vsprintf.c for readability */ #define is_digit(c) ((c) >= '0' && (c) <= '9') #endif -static int __init reboot_setup(char *str) +static int __init reboot_setup(char *str, struct kernel_param *kp) { while(1) { switch (*str) { @@ -196,10 +196,10 @@ else break; } - return 1; + return 0; } -__setup("reboot=", reboot_setup); +PARAM_CALL(reboot, reboot_setup, NULL); /* The following code and data reboots the machine by switching to real mode and jumping to the BIOS reset entry point, as if the CPU has diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/i386/kernel/setup.c working-2.4.14-param-all/arch/i386/kernel/setup.c --- working-2.4.14-param/arch/i386/kernel/setup.c Thu Nov 22 08:20:16 2001 +++ working-2.4.14-param-all/arch/i386/kernel/setup.c Thu Nov 22 08:21:31 2001 @@ -1038,13 +1038,7 @@ #ifndef CONFIG_X86_TSC static int tsc_disable __initdata = 0; -static int __init tsc_setup(char *str) -{ - tsc_disable = 1; - return 1; -} - -__setup("notsc", tsc_setup); +PARAM_NAMED(notsc, tsc_disable, int, 0); #endif static int __init get_model_name(struct cpuinfo_x86 *c) @@ -2301,20 +2295,13 @@ } -int __init x86_serial_nr_setup(char *s) +int __init x86_serial_nr_setup(char *s, struct kernel_param *kp) { disable_x86_serial_nr = 0; - return 1; -} -__setup("serialnumber", x86_serial_nr_setup); - -int __init x86_fxsr_setup(char * s) -{ - disable_x86_fxsr = 1; - return 1; + return 0; } -__setup("nofxsr", x86_fxsr_setup); - +PARAM_CALL(serialnumber, x86_serial_nr_setup, NULL); +PARAM_NAMED(nofxsr, disable_x86_fxsr, int, 000); /* Standard macro to see if a specific flag is changeable */ static inline int flag_is_changeable_p(u32 flag) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/i386/kernel/smpboot.c working-2.4.14-param-all/arch/i386/kernel/smpboot.c --- working-2.4.14-param/arch/i386/kernel/smpboot.c Fri Oct 5 11:42:54 2001 +++ working-2.4.14-param-all/arch/i386/kernel/smpboot.c Thu Nov 22 08:21:31 2001 @@ -79,21 +79,14 @@ * SMP mode to . */ -static int __init nosmp(char *str) +static int __init nosmp(char *str, struct kernel_param *kp) { max_cpus = 0; return 1; } -__setup("nosmp", nosmp); - -static int __init maxcpus(char *str) -{ - get_option(&str, &max_cpus); - return 1; -} - -__setup("maxcpus=", maxcpus); +PARAM_CALL(nosmp, nosmp, NULL); +PARAM_NAMED(maxcpus, max_cpus, int, S_IRUGO); /* * Trampoline 80x86 program as an array. diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/ia64/kernel/smpboot.c working-2.4.14-param-all/arch/ia64/kernel/smpboot.c --- working-2.4.14-param/arch/ia64/kernel/smpboot.c Wed Aug 1 03:30:08 2001 +++ working-2.4.14-param-all/arch/ia64/kernel/smpboot.c Thu Nov 22 08:21:31 2001 @@ -105,31 +105,15 @@ */ static int __init -nosmp (char *str) +nosmp (char *str, struct kernel_param *kp) { max_cpus = 0; - return 1; -} - -__setup("nosmp", nosmp); - -static int __init -maxcpus (char *str) -{ - get_option(&str, &max_cpus); - return 1; -} - -__setup("maxcpus=", maxcpus); - -static int __init -nointroute (char *str) -{ - no_int_routing = 1; - return 1; + return 0; } -__setup("nointroute", nointroute); +PARAM_CALL(nosmp, nosmp, NULL); +PARAM_NAMED(maxcpus, max_cpus, int, S_IRUGO); +PARAM_NAMED(nointroute, no_int_routing, bool, S_IRUGO); void sync_master (void *arg) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/ia64/lib/swiotlb.c working-2.4.14-param-all/arch/ia64/lib/swiotlb.c --- working-2.4.14-param/arch/ia64/lib/swiotlb.c Wed Aug 1 03:30:08 2001 +++ working-2.4.14-param-all/arch/ia64/lib/swiotlb.c Thu Nov 22 08:21:31 2001 @@ -62,12 +62,12 @@ static spinlock_t io_tlb_lock = SPIN_LOCK_UNLOCKED; static int __init -setup_io_tlb_npages (char *str) +setup_io_tlb_npages (char *str, struct kernel_param *kp) { io_tlb_nslabs = simple_strtoul(str, NULL, 0) << (PAGE_SHIFT - IO_TLB_SHIFT); - return 1; + return 0; } -__setup("swiotlb=", setup_io_tlb_npages); +PARAM_CALL(swiotlb, setup_io_tlb_npages, NULL); /* * Statically reserve bounce buffer space and initialize bounce buffer data structures for diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/ia64/sn/io/hcl.c working-2.4.14-param-all/arch/ia64/sn/io/hcl.c --- working-2.4.14-param/arch/ia64/sn/io/hcl.c Fri Apr 6 05:51:47 2001 +++ working-2.4.14-param-all/arch/ia64/sn/io/hcl.c Thu Nov 22 08:21:31 2001 @@ -207,7 +207,7 @@ * functionalities can be added here. * */ -static int __init hcl_setup(char *str) +static int __init hcl_setup(char *str, struct kernel_param *kp) { while ( (*str != '\0') && !isspace (*str) ) { @@ -226,7 +226,7 @@ } -__setup("hcl=", hcl_setup); +PARAM_CALL(hcl, hcl_setup, NULL); /* diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/ia64/sn/sn1/llsc4.c working-2.4.14-param-all/arch/ia64/sn/sn1/llsc4.c --- working-2.4.14-param/arch/ia64/sn/sn1/llsc4.c Fri Apr 6 05:51:47 2001 +++ working-2.4.14-param-all/arch/ia64/sn/sn1/llsc4.c Thu Nov 22 08:21:31 2001 @@ -150,39 +150,26 @@ static int dump_block_addrs_opt=0; static uint errlock=0; -static int __init autotest_enable(char *str) -{ - autotest_enabled = 1; - return 1; -} -static int __init set_llscblkadr(char *str) -{ - dump_block_addrs_opt = 1; - return 1; -} -static int __init set_llscselt(char *str) -{ - selective_trigger = 1; - return 1; -} -static int __init set_llsctest(char *str) +static int __init set_llsctest(char *str, struct kernel_param *kp) { llsctest_number = simple_strtol(str, &str, 10); if (llsctest_number < 0 || llsctest_number > 15) llsctest_number = -1; return 1; } -static int __init set_llscerrstop(char *str) -{ - errstop_enabled = 1; - return 1; -} -static int __init set_llscfail(char *str) +static int __init set_llscfail(char *str, struct kernel_param *kp) { fail_enabled = 8; return 1; } +PARAM_NAMED(autotest, autotest_enabled, bool, S_IRUGO); +PARAM_CALL(llsctest, set_llsctest, NULL); +PARAM_NAMED(llscerrstop, errstop_enabled, bool, S_IRUGO); +PARAM_CALL(llscfail, set_llscfail, NULL); +PARAM_NAMED(llscselt, selective_trigger, bool, S_IRUGO); +PARAM_NAMED(llscblkadr, dump_block_addrs_opt, bool, S_IRUGO); + static void print_params(void) { printk ("********* Enter AUTOTEST facility on master cpu *************\n"); @@ -195,13 +182,6 @@ printk (" SEMFIX: %s\n", IA64_SEMFIX); printk ("\n"); } -__setup("autotest", autotest_enable); -__setup("llsctest=", set_llsctest); -__setup("llscerrstop", set_llscerrstop); -__setup("llscfail", set_llscfail); -__setup("llscselt", set_llscselt); -__setup("llscblkadr", set_llscblkadr); - extern inline int set_lock(uint *lock, uint id) @@ -909,15 +889,15 @@ * */ -static int __init set_inttest(char *str) +static int __init set_inttest(char *str, struct kernel_param *kp) { inttest = 1; autotest_enabled = 1; - return 1; -} + return 0; +} -__setup("inttest=", set_inttest); +PARAM_CALL(inttest, set_inttest, NULL); int zzzprint_resched=0; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/ppc/kernel/setup.c working-2.4.14-param-all/arch/ppc/kernel/setup.c --- working-2.4.14-param/arch/ppc/kernel/setup.c Tue Nov 6 11:41:28 2001 +++ working-2.4.14-param-all/arch/ppc/kernel/setup.c Thu Nov 22 08:21:31 2001 @@ -536,7 +536,7 @@ } /* Checks "l2cr=xxxx" command-line option */ -int __init ppc_setup_l2cr(char *str) +int __init ppc_setup_l2cr(char *str, struct kernel_param *kp) { if (cur_cpu_spec[0]->cpu_features & CPU_FTR_L2CR) { unsigned long val = simple_strtoul(str, NULL, 0); @@ -544,9 +544,9 @@ _set_L2CR(0); /* force invalidate by disable cache */ _set_L2CR(val); /* and enable it */ } - return 1; + return 0; } -__setup("l2cr=", ppc_setup_l2cr); +PARAM_CALL(l2cr, ppc_setup_l2cr, NULL); void __init ppc_init(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/ppc/kernel/smp.c working-2.4.14-param-all/arch/ppc/kernel/smp.c --- working-2.4.14-param/arch/ppc/kernel/smp.c Tue Nov 6 11:41:28 2001 +++ working-2.4.14-param-all/arch/ppc/kernel/smp.c Thu Nov 22 08:21:31 2001 @@ -559,10 +559,4 @@ c->pvr = mfspr(PVR); } -static int __init maxcpus(char *str) -{ - get_option(&str, &max_cpus); - return 1; -} - -__setup("maxcpus=", maxcpus); +NAMED_PARAM(maxcpus, max_cpus, int, S_IRUGO); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/s390/kernel/setup.c working-2.4.14-param-all/arch/s390/kernel/setup.c --- working-2.4.14-param/arch/s390/kernel/setup.c Fri Oct 12 02:04:57 2001 +++ working-2.4.14-param-all/arch/s390/kernel/setup.c Thu Nov 22 08:21:31 2001 @@ -127,41 +127,41 @@ } } -static int __init vmhalt_setup(char *str) +static int __init vmhalt_setup(char *str, struct kernel_param *kp) { strncpy_skip_quote(vmhalt_cmd, str, 127); vmhalt_cmd[127] = 0; - return 1; + return 0; } -__setup("vmhalt=", vmhalt_setup); +PARAM_CALL(vmhalt, vmhalt_setup, NULL); -static int __init vmpoff_setup(char *str) +static int __init vmpoff_setup(char *str, struct kernel_param *kp) { strncpy_skip_quote(vmpoff_cmd, str, 127); vmpoff_cmd[127] = 0; - return 1; + return 0; } -__setup("vmpoff=", vmpoff_setup); +PARAM_CALL(vmpoff, vmpoff_setup, NULL); /* * condev= and conmode= setup parameter. */ -static int __init condev_setup(char *str) +static int __init condev_setup(char *str, struct kernel_param *kp) { int vdev; vdev = simple_strtoul(str, &str, 0); if (vdev >= 0 && vdev < 65536) console_device = vdev; - return 1; + return 0; } -__setup("condev=", condev_setup); +PARAM_CALL(condev, condev_setup, NULL); -static int __init conmode_setup(char *str) +static int __init conmode_setup(char *str, struct kernel_param *kp) { #if defined(CONFIG_HWC_CONSOLE) if (strncmp(str, "hwc", 4) == 0 && !MACHINE_IS_P390) @@ -175,10 +175,10 @@ if (strncmp(str, "3270", 5) == 0 && (MACHINE_IS_VM || MACHINE_IS_P390)) SET_CONSOLE_3270; #endif - return 1; + return 0; } -__setup("conmode=", conmode_setup); +PARAM_CALL(conmode, conmode_setup, NULL); static void __init conmode_default(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/s390/kernel/smp.c working-2.4.14-param-all/arch/s390/kernel/smp.c --- working-2.4.14-param/arch/s390/kernel/smp.c Fri Oct 12 02:04:57 2001 +++ working-2.4.14-param-all/arch/s390/kernel/smp.c Thu Nov 22 08:21:31 2001 @@ -70,21 +70,14 @@ * SMP mode to . */ -static int __init nosmp(char *str) +static int __init nosmp(char *str, struct kernel_param *kp) { max_cpus = 0; - return 1; -} - -__setup("nosmp", nosmp); - -static int __init maxcpus(char *str) -{ - get_option(&str, &max_cpus); - return 1; + return 0; } -__setup("maxcpus=", maxcpus); +PARAM_CALL(nosmp, nosmp, NULL); +PARAM_NAMED(maxcpus, max_cpus, int, S_IRUGO); /* * Reboot, halt and power_off routines for SMP. diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/s390/mm/fault.c working-2.4.14-param-all/arch/s390/mm/fault.c --- working-2.4.14-param/arch/s390/mm/fault.c Fri Oct 12 02:04:57 2001 +++ working-2.4.14-param-all/arch/s390/mm/fault.c Thu Nov 22 08:21:31 2001 @@ -439,13 +439,7 @@ */ static int pfault_disable = 0; -static int __init nopfault(char *str) -{ - pfault_disable = 1; - return 1; -} - -__setup("nopfault", nopfault); +PARAM_NAMED(nopfault, pfault_disable, bool, S_IRUGO); typedef struct { __u16 refdiagc; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/s390x/kernel/setup.c working-2.4.14-param-all/arch/s390x/kernel/setup.c --- working-2.4.14-param/arch/s390x/kernel/setup.c Fri Oct 12 02:04:57 2001 +++ working-2.4.14-param-all/arch/s390x/kernel/setup.c Thu Nov 22 08:21:31 2001 @@ -127,41 +127,41 @@ } } -static int __init vmhalt_setup(char *str) +static int __init vmhalt_setup(char *str, struct kernel_param *kp) { strncpy_skip_quote(vmhalt_cmd, str, 127); vmhalt_cmd[127] = 0; - return 1; + return 0; } -__setup("vmhalt=", vmhalt_setup); +PARAM_CALL(vmhalt, vmhalt_setup, NULL); -static int __init vmpoff_setup(char *str) +static int __init vmpoff_setup(char *str, struct kernel_param *kp) { strncpy_skip_quote(vmpoff_cmd, str, 127); vmpoff_cmd[127] = 0; - return 1; + return 0; } -__setup("vmpoff=", vmpoff_setup); +PARAM_CALL(vmpoff, vmpoff_setup, NULL); /* * condev= and conmode= setup parameter. */ -static int __init condev_setup(char *str) +static int __init condev_setup(char *str, struct kernel_param *kp) { int vdev; vdev = simple_strtoul(str, &str, 0); if (vdev >= 0 && vdev < 65536) console_device = vdev; - return 1; + return 0; } -__setup("condev=", condev_setup); +PARAM_CALL(condev, condev_setup, NULL); -static int __init conmode_setup(char *str) +static int __init conmode_setup(char *str, struct kernel_param *kp) { #if defined(CONFIG_HWC_CONSOLE) if (strncmp(str, "hwc", 4) == 0 && !MACHINE_IS_P390) @@ -175,10 +175,10 @@ if (strncmp(str, "3270", 5) == 0 && (MACHINE_IS_VM || MACHINE_IS_P390)) SET_CONSOLE_3270; #endif - return 1; + return 0; } -__setup("conmode=", conmode_setup); +PARAM_CALL(conmode, conmode_setup, NULL); static void __init conmode_default(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/s390x/kernel/smp.c working-2.4.14-param-all/arch/s390x/kernel/smp.c --- working-2.4.14-param/arch/s390x/kernel/smp.c Fri Oct 12 02:04:57 2001 +++ working-2.4.14-param-all/arch/s390x/kernel/smp.c Thu Nov 22 08:21:31 2001 @@ -70,21 +70,14 @@ * SMP mode to . */ -static int __init nosmp(char *str) +static int __init nosmp(char *str, struct kernel_param *kp) { max_cpus = 0; - return 1; -} - -__setup("nosmp", nosmp); - -static int __init maxcpus(char *str) -{ - get_option(&str, &max_cpus); - return 1; + return 0; } -__setup("maxcpus=", maxcpus); +PARAM_CALL(nosmp, nosmp, NULL); +PARAM_NAMED(maxcpus, max_cpus, int, S_IRUGO); /* * Reboot, halt and power_off routines for SMP. diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/s390x/mm/fault.c working-2.4.14-param-all/arch/s390x/mm/fault.c --- working-2.4.14-param/arch/s390x/mm/fault.c Fri Oct 12 02:04:57 2001 +++ working-2.4.14-param-all/arch/s390x/mm/fault.c Thu Nov 22 08:21:31 2001 @@ -329,13 +329,7 @@ */ static int pfault_disable = 0; -static int __init nopfault(char *str) -{ - pfault_disable = 1; - return 1; -} - -__setup("nopfault", nopfault); +PARAM_NAMED(nopfault, pfault_disable, bool, S_IRUGO); typedef struct { __u16 refdiagc; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.4.14-param/arch/sparc64/kernel/smp.c working-2.4.14-param-all/arch/sparc64/kernel/smp.c --- working-2.4.14-param/arch/sparc64/kernel/smp.c Tue Nov 6 11:41:29 2001 +++ working-2.4.14-param-all/arch/sparc64/kernel/smp.c Thu Nov 22 08:21:31 2001 @@ -60,13 +60,7 @@ } static int max_cpus = NR_CPUS; -static int __init maxcpus(char *str) -{ - get_option(&str, &max_cpus); - return 1; -} - -__setup("maxcpus=", maxcpus); +PARAM_NAMED(maxcpus, max_cpus, int, S_IRUGO); int smp_info(char *buf) {