Re: coding for optimizations (Re: [PATCH 1/2] i386: mce cleanup part1: functional change)

2007-10-11 Thread Oleg Verych
On Thu, Oct 11, 2007 at 05:21:30PM +0200, Adrian Bunk wrote: > On Thu, Oct 11, 2007 at 05:26:09PM +0200, Oleg Verych wrote: > > On Thu, Oct 11, 2007 at 01:14:29AM +0200, Adrian Bunk wrote: > > [] > > > It's also a quite ill idea to think about whether gcc might produce a > > > few bytes more or l

Re: coding for optimizations (Re: [PATCH 1/2] i386: mce cleanup part1: functional change)

2007-10-11 Thread Adrian Bunk
On Thu, Oct 11, 2007 at 05:26:09PM +0200, Oleg Verych wrote: > On Thu, Oct 11, 2007 at 01:14:29AM +0200, Adrian Bunk wrote: > [] > > It's also a quite ill idea to think about whether gcc might produce a > > few bytes more or less code at the if when there's such a long printk() > > in the middle

Re: coding for optimizations (Re: [PATCH 1/2] i386: mce cleanup part1: functional change)

2007-10-11 Thread Oleg Verych
On Thu, Oct 11, 2007 at 01:14:29AM +0200, Adrian Bunk wrote: [] > It's also a quite ill idea to think about whether gcc might produce a > few bytes more or less code at the if when there's such a long printk() > in the middle... printk() problem was discussed with proper banana userspace replac

Re: coding for optimizations (Re: [PATCH 1/2] i386: mce cleanup part1: functional change)

2007-10-10 Thread Adrian Bunk
On Tue, Oct 09, 2007 at 08:30:11PM +0200, Joerg Roedel wrote: >... > But you are right with the redundant mca and mce variables. They are not > needed and I will inline the cpu_has() checks into the condition check. > I'll resubmit tomorrow. Please don't let Oley bring you away from the right path

Re: coding for optimizations (Re: [PATCH 1/2] i386: mce cleanup part1: functional change)

2007-10-09 Thread Joerg Roedel
On Tue, Oct 09, 2007 at 07:33:17PM +0200, [EMAIL PROTECTED] wrote: > if (!mce_disabled) { > if (!(c->x86_capability & (X86_FEATURE_MCA | X86_FEATURE_MCE)) { > printk(KERN_INFO "CPU%i: No machine check support available\n", > smp_processor_id()); >

coding for optimizations (Re: [PATCH 1/2] i386: mce cleanup part1: functional change)

2007-10-09 Thread Oleg Verych
On Tue, Oct 09, 2007 at 06:06:05PM +0200, Joerg Roedel wrote: > > > void mcheck_init(struct cpuinfo_x86 *c) > > > { > > > + uint32_t mca, mce; > > > + > > > if (mce_disabled==1) > > > return; > > > > > > + mca = cpu_has(c, X86_FEATURE_MCA); > > > + mce = cpu_has(c, X86_FEATURE_MCE);