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 -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/alpha/kernel/smp.c .8320-linux-2.5.36.updated/arch/alpha/kernel/smp.c --- .8320-linux-2.5.36/arch/alpha/kernel/smp.c 2002-09-18 16:03:24.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/alpha/kernel/smp.c 2002-09-18 16:46:44.000000000 +1000 @@ -87,22 +87,14 @@ extern void calibrate_delay(void); 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 -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/arm/kernel/process.c .8320-linux-2.5.36.updated/arch/arm/kernel/process.c --- .8320-linux-2.5.36/arch/arm/kernel/process.c 2002-07-17 10:25:45.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/arm/kernel/process.c 2002-09-18 16:46:44.000000000 +1000 @@ -48,20 +48,8 @@ void enable_hlt(void) 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. @@ -104,13 +92,7 @@ void cpu_idle(void) 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 -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/arm/kernel/setup.c .8320-linux-2.5.36.updated/arch/arm/kernel/setup.c --- .8320-linux-2.5.36/arch/arm/kernel/setup.c 2002-08-28 09:29:39.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/arm/kernel/setup.c 2002-09-18 16:46:44.000000000 +1000 @@ -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 -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/arm/mm/init.c .8320-linux-2.5.36.updated/arch/arm/mm/init.c --- .8320-linux-2.5.36/arch/arm/mm/init.c 2002-09-18 16:03:24.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/arm/mm/init.c 2002-09-18 16:46:44.000000000 +1000 @@ -624,11 +624,5 @@ void free_initrd_mem(unsigned long start 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 diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/arm/mm/mm-armv.c .8320-linux-2.5.36.updated/arch/arm/mm/mm-armv.c --- .8320-linux-2.5.36/arch/arm/mm/mm-armv.c 2002-08-02 11:15:05.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/arm/mm/mm-armv.c 2002-09-18 16:55:10.000000000 +1000 @@ -29,35 +29,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 &= ~CR1_C; cr_no_alignment &= ~CR1_C; 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 &= ~(CR1_W|CR1_C); cr_no_alignment &= ~(CR1_W|CR1_C); 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 &= ~CR1_A; cr_no_alignment &= ~CR1_A; 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 -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/arm/nwfpe/fpmodule.c .8320-linux-2.5.36.updated/arch/arm/nwfpe/fpmodule.c --- .8320-linux-2.5.36/arch/arm/nwfpe/fpmodule.c 2002-04-27 13:29:17.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/arm/nwfpe/fpmodule.c 2002-09-18 16:46:44.000000000 +1000 @@ -55,7 +55,7 @@ MODULE_DESCRIPTION("NWFPE floating point #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 */ @@ -98,7 +98,7 @@ static int __init fpe_init(void) 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 -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/i386/kernel/apm.c .8320-linux-2.5.36.updated/arch/i386/kernel/apm.c --- .8320-linux-2.5.36/arch/i386/kernel/apm.c 2002-08-28 09:29:40.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/i386/kernel/apm.c 2002-09-18 16:52:42.000000000 +1000 @@ -1792,53 +1792,6 @@ static int apm(void *unused) 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); - if ((strncmp(str, "idle-threshold=", 15) == 0) || - (strncmp(str, "idle_threshold=", 15) == 0)) - idle_threshold = simple_strtol(str + 15, NULL, 0); - if ((strncmp(str, "idle-period=", 12) == 0) || - (strncmp(str, "idle_period=", 12) == 0)) - idle_period = simple_strtol(str + 12, NULL, 0); - invert = (strncmp(str, "no-", 3) == 0) || - (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, @@ -2029,23 +1982,22 @@ module_exit(apm_exit); 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"); -MODULE_PARM(idle_threshold, "i"); +PARAM(idle_threshold, int, S_IWUSR|S_IRUGO); MODULE_PARM_DESC(idle_threshold, "System idle percentage above which to make APM BIOS idle calls"); -MODULE_PARM(idle_period, "i"); +PARAM(idle_period, int, S_IWUSR|S_IRUGO); MODULE_PARM_DESC(idle_period, "Period (in sec/100) over which to caculate the idle percentage"); diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/i386/kernel/bluesmoke.c .8320-linux-2.5.36.updated/arch/i386/kernel/bluesmoke.c --- .8320-linux-2.5.36/arch/i386/kernel/bluesmoke.c 2002-08-28 09:29:40.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/i386/kernel/bluesmoke.c 2002-09-18 16:59:34.000000000 +1000 @@ -488,20 +488,14 @@ void __init mcheck_init(struct cpuinfo_x } } -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); #else asmlinkage void do_machine_check(struct pt_regs * regs, long error_code) {} diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/i386/kernel/cpu/common.c .8320-linux-2.5.36.updated/arch/i386/kernel/cpu/common.c --- .8320-linux-2.5.36/arch/i386/kernel/cpu/common.c 2002-09-18 16:04:37.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/i386/kernel/cpu/common.c 2002-09-18 17:02:35.000000000 +1000 @@ -35,23 +35,12 @@ static struct cpu_dev default_cpu = { }; static struct cpu_dev * this_cpu = &default_cpu; -static int __init cachesize_setup(char *str) -{ - get_option (&str, &cachesize_override); - return 1; -} -__setup("cachesize=", cachesize_setup); +PARAM_NAMED(cachesize, cachesize_override, int, 000); #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, bool, 000); #endif int __init get_model_name(struct cpuinfo_x86 *c) @@ -165,14 +154,7 @@ void __init get_cpu_vendor(struct cpuinf } } - -static int __init x86_fxsr_setup(char * s) -{ - disable_x86_fxsr = 1; - return 1; -} -__setup("nofxsr", x86_fxsr_setup); - +PARAM_NAMED(nofxsr, disable_x86_fxsr, bool, 000); /* Standard macro to see if a specific flag is changeable */ static inline int flag_is_changeable_p(u32 flag) diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/i386/kernel/cpu/intel.c .8320-linux-2.5.36.updated/arch/i386/kernel/cpu/intel.c --- .8320-linux-2.5.36/arch/i386/kernel/cpu/intel.c 2002-09-18 16:04:37.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/i386/kernel/cpu/intel.c 2002-09-18 17:05:03.000000000 +1000 @@ -77,19 +77,8 @@ static void __init squash_the_stupid_ser } } -static int __init x86_serial_nr_setup(char *s) -{ - disable_x86_serial_nr = 0; - return 1; -} -__setup("serialnumber", x86_serial_nr_setup); - -static int __init P4_disable_ht(char *s) -{ - disable_P4_HT = 1; - return 1; -} -__setup("noht", P4_disable_ht); +PARAM_NAMED(serialnumber, disable_x86_serial_nr, invbool, 000); +PARAM_NAMED(noht, disable_P4_HT, bool, 000); #define LVL_1_INST 1 #define LVL_1_DATA 2 diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/i386/kernel/io_apic.c .8320-linux-2.5.36.updated/arch/i386/kernel/io_apic.c --- .8320-linux-2.5.36/arch/i386/kernel/io_apic.c 2002-09-18 16:03:55.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/i386/kernel/io_apic.c 2002-09-18 16:46:44.000000000 +1000 @@ -294,9 +294,9 @@ static int __init ioapic_setup(char *str 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]; @@ -319,10 +319,10 @@ static int __init ioapic_pirq_setup(char */ 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 -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/i386/kernel/nmi.c .8320-linux-2.5.36.updated/arch/i386/kernel/nmi.c --- .8320-linux-2.5.36/arch/i386/kernel/nmi.c 2002-07-27 15:24:35.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/i386/kernel/nmi.c 2002-09-18 16:46:44.000000000 +1000 @@ -102,7 +102,7 @@ int __init check_nmi_watchdog (void) return 0; } -static int __init setup_nmi_watchdog(char *str) +static int __init setup_nmi_watchdog(char *str, struct kernel_param *kp) { int nmi; @@ -131,10 +131,10 @@ static int __init setup_nmi_watchdog(cha */ 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 -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/i386/kernel/process.c .8320-linux-2.5.36.updated/arch/i386/kernel/process.c --- .8320-linux-2.5.36/arch/i386/kernel/process.c 2002-09-01 12:22:57.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/i386/kernel/process.c 2002-09-18 16:46:44.000000000 +1000 @@ -148,17 +148,17 @@ void cpu_idle (void) } } -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; @@ -170,7 +170,7 @@ static int reboot_cpu = -1; /* 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) { @@ -205,10 +205,10 @@ static int __init reboot_setup(char *str 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 -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/i386/kernel/setup.c .8320-linux-2.5.36.updated/arch/i386/kernel/setup.c --- .8320-linux-2.5.36/arch/i386/kernel/setup.c 2002-09-18 16:03:25.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/i386/kernel/setup.c 2002-09-18 16:48:19.000000000 +1000 @@ -914,13 +914,7 @@ void __init setup_arch(char **cmdline_p) dmi_scan_machine(); } -static int __init highio_setup(char *str) -{ - printk("i386: disabling HIGHMEM block I/O\n"); - blk_nohighio = 1; - return 1; -} -__setup("nohighio", highio_setup); +PARAM_NAMED(nohighio, blk_nohighio, int, 0); /* * Local Variables: diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/ia64/hp/common/sba_iommu.c .8320-linux-2.5.36.updated/arch/ia64/hp/common/sba_iommu.c --- .8320-linux-2.5.36/arch/ia64/hp/common/sba_iommu.c 2002-09-01 12:22:58.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/ia64/hp/common/sba_iommu.c 2002-09-18 17:10:58.000000000 +1000 @@ -1676,14 +1676,7 @@ void __init sba_init(void) #endif } -static int __init -nosbagart (char *str) -{ - reserve_sba_gart = 0; - return 1; -} - -__setup("nosbagart",nosbagart); +PARAM_NAMED(nosbagart, reserve_sba_gart, invbool, 000); EXPORT_SYMBOL(sba_init); EXPORT_SYMBOL(sba_map_single); diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/ia64/hp/sim/simeth.c .8320-linux-2.5.36.updated/arch/ia64/hp/sim/simeth.c --- .8320-linux-2.5.36/arch/ia64/hp/sim/simeth.c 2002-09-01 12:22:58.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/ia64/hp/sim/simeth.c 2002-09-18 17:10:30.000000000 +1000 @@ -97,14 +97,7 @@ static struct notifier_block simeth_dev_ * * Format: simeth=interface_name (like eth0) */ -static int __init -simeth_setup(char *str) -{ - simeth_device = str; - return 1; -} - -__setup("simeth=", simeth_setup); +PARAM_NAMED(simeth, simeth_device, charp, 000); /* * Function used to probe for simeth devices when not installed diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/ia64/hp/sim/simscsi.c .8320-linux-2.5.36.updated/arch/ia64/hp/sim/simscsi.c --- .8320-linux-2.5.36/arch/ia64/hp/sim/simscsi.c 2002-08-28 09:29:40.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/ia64/hp/sim/simscsi.c 2002-09-18 17:10:23.000000000 +1000 @@ -84,17 +84,17 @@ static char *simscsi_root = DEFAULT_SIMS * you have to specify simscsi=/foo/bar/disk on the command line */ static int __init -simscsi_setup (char *s) +simscsi_setup (char *s, struct kernel_param *kp) { /* XXX Fix me we may need to strcpy() ? */ if (strlen(s) > MAX_ROOT_LEN) { printk("simscsi_setup: prefix too long---using default %s\n", simscsi_root); } simscsi_root = s; - return 1; + return 0; } -__setup("simscsi=", simscsi_setup); +PARAM_CALL(simscsi, simscsi_setup, NULL); static void simscsi_interrupt (unsigned long val) diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/ia64/kernel/smpboot.c .8320-linux-2.5.36.updated/arch/ia64/kernel/smpboot.c --- .8320-linux-2.5.36/arch/ia64/kernel/smpboot.c 2002-09-01 12:22:58.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/ia64/kernel/smpboot.c 2002-09-18 16:57:03.000000000 +1000 @@ -94,14 +94,7 @@ char __initdata no_int_routing; unsigned char smp_int_redirect; /* are INT and IPI redirectable by the chipset? */ -static int __init -nointroute (char *str) -{ - no_int_routing = 1; - return 1; -} - -__setup("nointroute", nointroute); +PARAM_NAMED(nointroute, no_int_routing, bool, 0); void sync_master (void *arg) diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/ia64/lib/swiotlb.c .8320-linux-2.5.36.updated/arch/ia64/lib/swiotlb.c --- .8320-linux-2.5.36/arch/ia64/lib/swiotlb.c 2002-08-28 09:29:41.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/ia64/lib/swiotlb.c 2002-09-18 16:56:13.000000000 +1000 @@ -73,16 +73,16 @@ static unsigned char **io_tlb_orig_addr; 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); /* avoid tail segment of size < IO_TLB_SEGSIZE */ io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE); - return 1; + return 0; } -__setup("swiotlb=", setup_io_tlb_npages); +PARAM_CALL(swiotlb, setup_io_tlb_npages, NULL); /* diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/ia64/sn/io/hcl.c .8320-linux-2.5.36.updated/arch/ia64/sn/io/hcl.c --- .8320-linux-2.5.36/arch/ia64/sn/io/hcl.c 2002-08-02 11:15:06.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/ia64/sn/io/hcl.c 2002-09-18 16:46:44.000000000 +1000 @@ -210,7 +210,7 @@ int __init init_hcl(void) * 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) ) { @@ -229,7 +229,7 @@ static int __init hcl_setup(char *str) } -__setup("hcl=", hcl_setup); +PARAM_CALL(hcl, hcl_setup, NULL); /* diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/ia64/sn/kernel/llsc4.c .8320-linux-2.5.36.updated/arch/ia64/sn/kernel/llsc4.c --- .8320-linux-2.5.36/arch/ia64/sn/kernel/llsc4.c 2002-09-01 12:22:58.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/ia64/sn/kernel/llsc4.c 2002-09-18 17:20:22.000000000 +1000 @@ -157,43 +157,25 @@ static int dump_block_addrs_opt=0; static lock_t errlock=NOLOCK; static private_t init_private[LLSC_MAXCPUS]; -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; + return 0; } -static int __init set_llscfail(char *str) +static int __init set_llscfail(char *str, struct kernel_param *kp) { fail_enabled = 8; - return 1; -} -static int __init set_llscl4(char *str) -{ - l4_opt = 1; - return 1; + return 0; } +PARAM_NAMED(autotest, autotest_enabled, bool, 000); +PARAM_CALL(llsctest, set_llctest, NULL); +PARAM_NAMED(llscerrstop, errstop_enabled, bool, 000); +PARAM_CALL(llscfail, set_llscfail, NULL); +PARAM_NAMED(llscselt, selective_trigger, bool, 000); +PARAM_NAMED(llscblkadr, dump_block_addrs_opt, bool, 000); +PARAM_NAMED(llscl4, l4_opt, bool, 000); static void print_params(void) { @@ -208,15 +190,6 @@ static void print_params(void) 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); -__setup("llscl4", set_llscl4); - - static inline int set_lock(uint *lock, uint id) @@ -983,15 +956,15 @@ Speedo(void) * */ -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 -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/ia64/sn/kernel/misctest.c .8320-linux-2.5.36.updated/arch/ia64/sn/kernel/misctest.c --- .8320-linux-2.5.36/arch/ia64/sn/kernel/misctest.c 2002-05-29 16:36:35.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/ia64/sn/kernel/misctest.c 2002-09-18 17:21:01.000000000 +1000 @@ -31,13 +31,7 @@ int mcatest=0; * 6 = speculative load with ld8.s (needs poison hack in PROM) * 7 = speculative load from mis-predicted branch (needs poison hack in PROM) */ -static int __init set_mcatest(char *str) -{ - get_option(&str, &mcatest); - return 1; -} - -__setup("mcatest=", set_mcatest); +PARAM(mcatest, int, 000); void sgi_mcatest(void) diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/ppc/kernel/setup.c .8320-linux-2.5.36.updated/arch/ppc/kernel/setup.c --- .8320-linux-2.5.36/arch/ppc/kernel/setup.c 2002-09-18 16:03:55.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/ppc/kernel/setup.c 2002-09-18 16:46:44.000000000 +1000 @@ -538,7 +538,7 @@ machine_init(unsigned long r3, unsigned } /* 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); @@ -546,9 +546,9 @@ int __init ppc_setup_l2cr(char *str) _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); #ifdef CONFIG_NVRAM /* Generic nvram hooks we now look into ppc_md.nvram_read_val diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/ppc/platforms/iSeries_setup.c .8320-linux-2.5.36.updated/arch/ppc/platforms/iSeries_setup.c --- .8320-linux-2.5.36/arch/ppc/platforms/iSeries_setup.c 2002-07-17 10:25:46.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/ppc/platforms/iSeries_setup.c 2002-09-18 17:08:43.000000000 +1000 @@ -765,7 +765,7 @@ unsigned int __init iSeries_build_hose_l } #endif /* CONFIG_PCI */ -int iSeries_spread_lpevents( char * str ) +int iSeries_spread_lpevents( char * str, struct kernel_param *kp ) { /* The parameter is the number of processors to share in processing lp events */ unsigned long i; @@ -776,10 +776,10 @@ int iSeries_spread_lpevents( char * str } else printk("invalid spread_lpevents %ld\n", val); - return 1; + return 0; } -int iSeries_decr_overclock_proc0( char * str ) +int iSeries_decr_overclock_proc0( char * str, struct kernel_param *kp ) { unsigned long val = simple_strtoul(str, NULL, 0 ); if ( ( val >= 1 ) && ( val <= 48 ) ) { @@ -790,10 +790,10 @@ int iSeries_decr_overclock_proc0( char * else { printk("invalid proc 0 decrementer overclock factor of %ld\n", val); } - return 1; + return 0; } -int iSeries_decr_overclock( char * str ) +int iSeries_decr_overclock( char * str, struct kernel_param *kp ) { unsigned long val = simple_strtoul( str, NULL, 0 ); if ( ( val >= 1 ) && ( val <= 48 ) ) { @@ -804,10 +804,10 @@ int iSeries_decr_overclock( char * str ) else { printk("invalid decrementer overclock factor of %ld\n", val); } - return 1; + return 0; } -__setup("spread_lpevents=", iSeries_spread_lpevents ); -__setup("decr_overclock_proc0=", iSeries_decr_overclock_proc0 ); -__setup("decr_overclock=", iSeries_decr_overclock ); +PARAM_CALL(spread_lpevents, iSeries_spread_lpevents, NULL); +PARAM_CALL(decr_overclock_proc0, iSeries_decr_overclock_proc0, NULL); +PARAM_CALL(decr_overclock, iSeries_decr_overclock, NULL); diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/ppc64/kernel/eeh.c .8320-linux-2.5.36.updated/arch/ppc64/kernel/eeh.c --- .8320-linux-2.5.36/arch/ppc64/kernel/eeh.c 2002-09-18 16:03:55.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/ppc64/kernel/eeh.c 2002-09-18 17:27:15.000000000 +1000 @@ -359,7 +359,7 @@ static int __init eeh_parm(char *str, in if (*str == '\0') { eeh_opts[eeh_opts_last++] = state ? '+' : '-'; eeh_opts[eeh_opts_last++] = '\0'; - return 1; + return 0; } if (*str == '=') str++; @@ -374,7 +374,7 @@ static int __init eeh_parm(char *str, in int curlen = curend-cur; if (eeh_opts_last + curlen > EEH_MAX_OPTS-2) { printk(KERN_INFO "EEH: sorry...too many eeh cmd line options\n"); - return 1; + return -ENOSPC; } eeh_opts[eeh_opts_last++] = state ? '+' : '-'; strncpy(eeh_opts+eeh_opts_last, cur, curlen); @@ -382,19 +382,19 @@ static int __init eeh_parm(char *str, in eeh_opts[eeh_opts_last++] = '\0'; } } - return 1; + return 0; } -static int __init eehoff_parm(char *str) +static int __init eehoff_parm(char *str, struct kernel_param *kp) { return eeh_parm(str, 0); } -static int __init eehon_parm(char *str) +static int __init eehon_parm(char *str, struct kernel_param *kp) { return eeh_parm(str, 1); } __initcall(eeh_init_proc); -__setup("eeh-off", eehoff_parm); -__setup("eeh-on", eehon_parm); +PARAM_CALL(eeh-off, eehoff_parm, NULL); +PARAM_CALL(eeh-on, eehon_parm, NULL); diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/ppc64/kernel/rtasd.c .8320-linux-2.5.36.updated/arch/ppc64/kernel/rtasd.c --- .8320-linux-2.5.36/arch/ppc64/kernel/rtasd.c 2002-08-28 09:29:42.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/ppc64/kernel/rtasd.c 2002-09-18 17:29:58.000000000 +1000 @@ -291,17 +291,5 @@ static int __init rtas_init(void) return 0; } -static int __init surveillance_setup(char *str) -{ - int i; - - if (get_option(&str,&i)) { - if (i == 1) - surveillance_requested = 1; - } - - return 1; -} - __initcall(rtas_init); -__setup("surveillance=", surveillance_setup); +PARAM_NAMED(surveillance, surveillance_requested, bool, 000); diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/ppc64/kernel/setup.c .8320-linux-2.5.36.updated/arch/ppc64/kernel/setup.c --- .8320-linux-2.5.36/arch/ppc64/kernel/setup.c 2002-09-18 16:03:56.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/ppc64/kernel/setup.c 2002-09-18 17:29:07.000000000 +1000 @@ -550,7 +550,7 @@ void __init setup_arch(char **cmdline_p) ppc_md.progress("setup_arch: exit", 0x3eab); } -int set_spread_lpevents( char * str ) +int set_spread_lpevents( char * str, struct kernel_param *kp ) { /* The parameter is the number of processors to share in processing lp events */ unsigned long i; @@ -562,7 +562,7 @@ int set_spread_lpevents( char * str ) } else printk("invalid spreaqd_lpevents %ld\n", val); - return 1; + return 0; } /* This should only be called on processor 0 during calibrate decr */ @@ -577,7 +577,7 @@ void setup_default_decr(void) lpaca->next_jiffy_update_tb = get_tb() + tb_ticks_per_jiffy; } -int set_decr_overclock_proc0( char * str ) +int set_decr_overclock_proc0( char * str, struct kernel_param *kp ) { unsigned long val = simple_strtoul( str, NULL, 0 ); if ( ( val >= 1 ) && ( val <= 48 ) ) { @@ -587,10 +587,10 @@ int set_decr_overclock_proc0( char * str } else printk("invalid proc 0 decrementer overclock factor of %ld\n", val); - return 1; + return 0; } -int set_decr_overclock( char * str ) +int set_decr_overclock( char * str, struct kernel_param *kp ) { unsigned long val = simple_strtoul( str, NULL, 0 ); if ( ( val >= 1 ) && ( val <= 48 ) ) { @@ -600,10 +600,10 @@ int set_decr_overclock( char * str ) } else printk("invalid decrementer overclock factor of %ld\n", val); - return 1; + return 0; } -__setup("spread_lpevents=", set_spread_lpevents ); -__setup("decr_overclock_proc0=", set_decr_overclock_proc0 ); -__setup("decr_overclock=", set_decr_overclock ); +PARAM_CALL(spread_lpevents, set_spread_lpevents, NULL); +PARAM_CALL(decr_overclock_proc0, set_decr_overclock_proc0, NULL); +PARAM_CALL(decr_overclock, set_decr_overclock, NULL); diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/ppc64/kernel/syscalls.c .8320-linux-2.5.36.updated/arch/ppc64/kernel/syscalls.c --- .8320-linux-2.5.36/arch/ppc64/kernel/syscalls.c 2002-09-18 16:03:56.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/ppc64/kernel/syscalls.c 2002-09-18 17:32:50.000000000 +1000 @@ -197,14 +197,14 @@ out: return ret; } -static int __init set_fakeppc(char *str) +static int __init set_fakeppc(char *str, struct kernel_param *kp) { if (*str) - return 0; + return -EINVAL; init_task.personality = PER_LINUX32; - return 1; + return 0; } -__setup("fakeppc", set_fakeppc); +PARAM_CALL(fakeppc, set_fakeppc, NULL); asmlinkage int sys_uname(struct old_utsname * name) { diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/s390/kernel/setup.c .8320-linux-2.5.36.updated/arch/s390/kernel/setup.c --- .8320-linux-2.5.36/arch/s390/kernel/setup.c 2002-07-25 10:13:05.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/s390/kernel/setup.c 2002-09-18 16:46:44.000000000 +1000 @@ -129,41 +129,41 @@ static inline void strncpy_skip_quote(ch } } -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) @@ -177,10 +177,10 @@ static int __init conmode_setup(char *st if (strncmp(str, "3270", 5) == 0) 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 -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/s390/kernel/smp.c .8320-linux-2.5.36.updated/arch/s390/kernel/smp.c --- .8320-linux-2.5.36/arch/s390/kernel/smp.c 2002-08-28 09:29:42.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/s390/kernel/smp.c 2002-09-18 16:46:44.000000000 +1000 @@ -69,21 +69,14 @@ unsigned long cache_decay_ticks = 0; * 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 -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/s390/mm/fault.c .8320-linux-2.5.36.updated/arch/s390/mm/fault.c --- .8320-linux-2.5.36/arch/s390/mm/fault.c 2002-07-25 10:13:05.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/s390/mm/fault.c 2002-09-18 16:46:44.000000000 +1000 @@ -440,13 +440,7 @@ do_pseudo_page_fault(struct pt_regs *reg */ 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 -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/s390x/kernel/setup.c .8320-linux-2.5.36.updated/arch/s390x/kernel/setup.c --- .8320-linux-2.5.36/arch/s390x/kernel/setup.c 2002-07-25 10:13:05.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/s390x/kernel/setup.c 2002-09-18 16:46:44.000000000 +1000 @@ -129,41 +129,41 @@ static inline void strncpy_skip_quote(ch } } -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) @@ -177,10 +177,10 @@ static int __init conmode_setup(char *st if (strncmp(str, "3270", 5) == 0) 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 -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/s390x/kernel/smp.c .8320-linux-2.5.36.updated/arch/s390x/kernel/smp.c --- .8320-linux-2.5.36/arch/s390x/kernel/smp.c 2002-08-28 09:29:42.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/s390x/kernel/smp.c 2002-09-18 16:46:44.000000000 +1000 @@ -68,21 +68,14 @@ unsigned long cache_decay_ticks = 0; * 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 -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/s390x/mm/fault.c .8320-linux-2.5.36.updated/arch/s390x/mm/fault.c --- .8320-linux-2.5.36/arch/s390x/mm/fault.c 2002-07-25 10:13:05.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/s390x/mm/fault.c 2002-09-18 16:46:44.000000000 +1000 @@ -344,13 +344,7 @@ void do_region_exception(struct pt_regs */ 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 -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/um/drivers/mconsole_kern.c .8320-linux-2.5.36.updated/arch/um/drivers/mconsole_kern.c --- .8320-linux-2.5.36/arch/um/drivers/mconsole_kern.c 2002-09-18 16:03:56.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/um/drivers/mconsole_kern.c 2002-09-18 17:39:26.000000000 +1000 @@ -308,17 +308,17 @@ __initcall(create_proc_mconsole); #define NOTIFY "=notify:" -static int mconsole_setup(char *str) +static int mconsole_setup(char *str, struct kernel_param *kp) { if(!strncmp(str, NOTIFY, strlen(NOTIFY))){ str += strlen(NOTIFY); notify_socket = str; + return 0; } - else printk(KERN_ERR "mconsole_setup : Unknown option - '%s'\n", str); - return(1); + return -EINVAL; } -__setup("mconsole", mconsole_setup); +PARAM_CALL(mconsole, mconsole_setup, NULL); __uml_help(mconsole_setup, "mconsole=notify:\n" diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/x86_64/kernel/bluesmoke.c .8320-linux-2.5.36.updated/arch/x86_64/kernel/bluesmoke.c --- .8320-linux-2.5.36/arch/x86_64/kernel/bluesmoke.c 2002-05-24 15:20:15.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/x86_64/kernel/bluesmoke.c 2002-09-18 17:33:23.000000000 +1000 @@ -223,20 +223,14 @@ void __init mcheck_init(struct cpuinfo_x } } -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); #else asmlinkage void do_machine_check(struct pt_regs * regs, long error_code) {} diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/x86_64/kernel/early_printk.c .8320-linux-2.5.36.updated/arch/x86_64/kernel/early_printk.c --- .8320-linux-2.5.36/arch/x86_64/kernel/early_printk.c 2002-06-12 22:38:30.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/x86_64/kernel/early_printk.c 2002-09-18 17:33:56.000000000 +1000 @@ -161,7 +161,7 @@ void early_printk(const char *fmt, ...) static int keep_early; -int __init setup_early_printk(char *opt) +int __init setup_early_printk(char *opt, struct kernel_param *kp) { char *space; char buf[256]; @@ -212,4 +212,4 @@ void __init disable_early_printk(void) Currently only ttyS0 and ttyS1 are supported. Interaction with the standard serial driver is not very good. The VGA output is eventually overwritten by the real console. */ -__setup("earlyprintk=", setup_early_printk); +PARAM_CALL(earlyprintk, setup_early_printk, NULL); diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/x86_64/kernel/io_apic.c .8320-linux-2.5.36.updated/arch/x86_64/kernel/io_apic.c --- .8320-linux-2.5.36/arch/x86_64/kernel/io_apic.c 2002-05-24 15:20:16.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/x86_64/kernel/io_apic.c 2002-09-18 17:35:28.000000000 +1000 @@ -173,15 +173,9 @@ int pirq_entries [MAX_PIRQS]; int pirqs_enabled; int skip_ioapic_setup; -static int __init ioapic_setup(char *str) -{ - skip_ioapic_setup = 1; - 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 +198,10 @@ static int __init ioapic_pirq_setup(char */ 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 -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/x86_64/kernel/nmi.c .8320-linux-2.5.36.updated/arch/x86_64/kernel/nmi.c --- .8320-linux-2.5.36/arch/x86_64/kernel/nmi.c 2002-06-12 22:38:30.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/x86_64/kernel/nmi.c 2002-09-18 17:35:47.000000000 +1000 @@ -76,7 +76,7 @@ int __init check_nmi_watchdog (void) return 0; } -static int __init setup_nmi_watchdog(char *str) +static int __init setup_nmi_watchdog(char *str, struct kernel_param *kp) { int nmi; @@ -108,7 +108,7 @@ static int __init setup_nmi_watchdog(cha return 1; } -__setup("nmi_watchdog=", setup_nmi_watchdog); +PARAM_CALL(nmi_watchdog, setup_nmi_watchdog, NULL); #ifdef CONFIG_PM diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/x86_64/kernel/process.c .8320-linux-2.5.36.updated/arch/x86_64/kernel/process.c --- .8320-linux-2.5.36/arch/x86_64/kernel/process.c 2002-07-25 10:13:05.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/x86_64/kernel/process.c 2002-09-18 17:36:49.000000000 +1000 @@ -148,17 +148,18 @@ void cpu_idle (void) } } -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 0; } - return 1; + return -EINVAL; } -__setup("idle=", idle_setup); +PARAM_CALL(idle, idle_setup, NULL); static long no_idt[3]; static int reboot_mode; @@ -167,7 +168,7 @@ static int reboot_mode; int reboot_smp = 0; static int reboot_cpu = -1; #endif -static int __init reboot_setup(char *str) +static int __init reboot_setup(char *str, struct kernel_param *kp) { while(1) { switch (*str) { @@ -195,10 +196,10 @@ static int __init reboot_setup(char *str else break; } - return 1; + return 0; } -__setup("reboot=", reboot_setup); +PARAM_CALL(reboot, reboot_setup, NULL); static inline void kb_wait(void) { diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/x86_64/kernel/setup.c .8320-linux-2.5.36.updated/arch/x86_64/kernel/setup.c --- .8320-linux-2.5.36/arch/x86_64/kernel/setup.c 2002-06-12 22:38:30.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/x86_64/kernel/setup.c 2002-09-18 17:37:46.000000000 +1000 @@ -794,13 +794,7 @@ void __init setup_arch(char **cmdline_p) #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, bool, 000); #endif static int __init get_model_name(struct cpuinfo_x86 *c) @@ -882,13 +876,7 @@ struct cpu_model_info { char *model_names[16]; }; -int __init x86_fxsr_setup(char * s) -{ - disable_x86_fxsr = 1; - return 1; -} -__setup("nofxsr", x86_fxsr_setup); - +PARAM_NAMED(nofxsr, disable_x86_fxsr, bool, 000); /* diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .8320-linux-2.5.36/arch/x86_64/kernel/smpboot.c .8320-linux-2.5.36.updated/arch/x86_64/kernel/smpboot.c --- .8320-linux-2.5.36/arch/x86_64/kernel/smpboot.c 2002-06-12 22:38:30.000000000 +1000 +++ .8320-linux-2.5.36.updated/arch/x86_64/kernel/smpboot.c 2002-09-18 17:38:01.000000000 +1000 @@ -74,33 +74,6 @@ struct cpuinfo_x86 cpu_data[NR_CPUS] __c int smp_threads_ready; /* - * Setup routine for controlling SMP activation - * - * Command-line option of "nosmp" or "maxcpus=0" will disable SMP - * activation entirely (the MPS table probe still happens, though). - * - * Command-line option of "maxcpus=", where is an integer - * greater than 0, limits the maximum number of CPUs activated in - * SMP mode to . - */ - -static int __init nosmp(char *str) -{ - max_cpus = 0; - return 1; -} - -__setup("nosmp", nosmp); - -static int __init maxcpus(char *str) -{ - get_option(&str, &max_cpus); - return 1; -} - -__setup("maxcpus=", maxcpus); - -/* * Trampoline 80x86 program as an array. */