Fix to missing sysctls on Zaurus

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Fix to missing sysctls on Zaurus

asmith-4
The last change to sys/arch/arm/include/cpu.h (1.17) made by robert@ broke the machdep.maxspeed and machdep.lidsuspend sysctls.

Basically robert@ removed two sysctls (ztsscale and ztsrawmode) without renumbering the #defines in the CTL_MACHDEP section. Since sysctl uses the index of the text string to find the mib the defines must match the index position of the strings.

The following patch corrects the defines and has been tested with 4.2 -current.

Regards,

-Andy

[demime 1.01d removed an attachment of type application/octet-stream which had a name of sys_arch_arm_include_cpu_h_fix-machdeps.patch]

Reply | Threaded
Open this post in threaded view
|

Re: Fix to missing sysctls on Zaurus

Miod Vallat
> The last change to sys/arch/arm/include/cpu.h (1.17) made by robert@  
>  broke the machdep.maxspeed and machdep.lidsuspend sysctls.
>
> Basically robert@ removed two sysctls (ztsscale and ztsrawmode)  
> without renumbering the #defines in the CTL_MACHDEP section. Since  
> sysctl uses the index of the text string to find the mib the defines  
>  must match the index position of the strings.
>
> The following patch corrects the defines and has been tested with  
> 4.2 -current.

No, that's not correct, the sysctl values should never change.

Instead, you should fix CTL_MACHDEP_NAMES by restoring the removed
entries, even though they are not handled anymore, so that the final
entries positions match their CPU_xxx value.

Miod

Reply | Threaded
Open this post in threaded view
|

Re: Fix to missing sysctls on Zaurus

asmith-4
In reply to this post by asmith-4
Miod,

Thanks for that point of clarity, I wondered if the assigned ordinals should be a permanent mapping.

I shall produce an alternative patch and post again shortly.

Regards,

-Andy


> Message Received: Aug 13 2007, 03:46 PM
> From: "Miod Vallat" <[hidden email]>
> To: [hidden email]
> Cc: [hidden email]
> Subject: Re: Fix to missing sysctls on Zaurus
>
> > The last change to sys/arch/arm/include/cpu.h (1.17) made by robert@  
> >  broke the machdep.maxspeed and machdep.lidsuspend sysctls.
> >
> > Basically robert@ removed two sysctls (ztsscale and ztsrawmode)  
> > without renumbering the #defines in the CTL_MACHDEP section. Since  
> > sysctl uses the index of the text string to find the mib the defines  
> >  must match the index position of the strings.
> >
> > The following patch corrects the defines and has been tested with  
> > 4.2 -current.
>
> No, that's not correct, the sysctl values should never change.
>
> Instead, you should fix CTL_MACHDEP_NAMES by restoring the removed
> entries, even though they are not handled anymore, so that the final
> entries positions match their CPU_xxx value.
>
> Miod