Re: [PATCH] Support cpu_map/cpu_mask changes in 2.6.29

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- "Michael Holzheu" <holzheu@xxxxxxxxxxxxxxxxxx> wrote:

> > So yes, while STRUCT_SIZE("cpumask_t") would always be appropriate for that
> > data type, it would fail for the older kernel types which don't use it.
> 
> So if for older kernels it was an unsigned long, the function should
> work:
> 
> +static int
> +cpu_map_size(void)
> +{
> +	int len;
> +
> +	len = STRUCT_SIZE("cpumask_t");
> +	if (len < 0)
> +		return sizeof(ulong);
> +	else
> +		return len;
> +}

Yeah, you're right, that will probably work.  There were definitions for
"cpumask_t" that existed prior to the transition of cpu_online_map symbol
from being an unsigned long to a cpumask_t.  But except for mips64 (unsupported)
they all appear to have been unsigned longs anyway.

So it should in all probability be safe.  Let me play around with the patch.

Thanks again for taking the time to work this out,
  Dave

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux