lkml.org 
[lkml]   [2008]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2.6.24] x86: add sysfs interface for cpuid module
From
Date
On Tue, 2008-01-29 at 09:44 +0100, Sam Ravnborg wrote:
> > +
> > +static struct notifier_block __cpuinitdata cpuid_sysfs_cpu_notifier = {
> > + .notifier_call = cpuid_sysfs_cpu_callback,
> > +};
> Data is annotated _cpuintidata
>
> but
>
> > +
> Data is annotated _cpuintidata
>
> > @@ -217,11 +445,14 @@ static void __exit cpuid_exit(void)
> > {
> > int cpu = 0;
> >
> > - for_each_online_cpu(cpu)
> > + for_each_online_cpu(cpu) {
> > cpuid_device_destroy(cpu);
> > + remove_cpuid_sysfs(cpu);
> > + }
> > class_destroy(cpuid_class);
> > unregister_chrdev(CPUID_MAJOR, "cpu/cpuid");
> > unregister_hotcpu_notifier(&cpuid_class_cpu_notifier);
> > + unregister_hotcpu_notifier(&cpuid_sysfs_cpu_notifier);
>
> used in an __exit function.
>
> You should have seen a Section mismatch warning for this.
> The right fix is to annotate the cpuid_sysfs_cpu_notifier
> with __initdata_refok (soon to be named __refdata)
> Or even better to declare it const and use _refconst.
I think __cpuinitdata is different from __initdata, i have tested it
by insmod, rmmod, echo 0/1 > /sys/devices/system/cpu/cpu1/online
repeatly, it hasn't any issue.

>
> Sam



\
 
 \ /
  Last update: 2008-01-30 08:39    [W:0.221 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site