Re: [PATCH 09/21] amd64_edac: assign DRAM chip select base and mask in a family-specific way

From: Doug Thompson
Date: Wed May 06 2009 - 14:39:19 EST



- On Tue, 5/5/09, Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> wrote:

> From: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
> Subject: Re: [PATCH 09/21] amd64_edac: assign DRAM chip select base and mask in a family-specific way
> To: "Doug Thompson" <norsk5@xxxxxxxxx>
> Cc: "Borislav Petkov" <borislav.petkov@xxxxxxx>, akpm@xxxxxxxxxxxxxxxxxxxx, greg@xxxxxxxxx, mingo@xxxxxxx, tglx@xxxxxxxxxxxxx, hpa@xxxxxxxxx, dougthompson@xxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
> Date: Tuesday, May 5, 2009, 3:39 PM
> Em Tue, 5 May 2009 12:28:01 -0700
> (PDT)
> Doug Thompson <norsk5@xxxxxxxxx>
> escreveu:

> > BACKGROUND: The error checking of the pci config space
> read was added during the time when the kernel couldn't read
> the extended 4k config space via the AMD IOConfig port
> access function (12 bits of offset) not via MMCONFIG.
>
> As this is unlikely to happen, I would also replace the:
>     if (err != 0)
>
> by:
>     if (unlikely(err))
>
> in order to optimize the tests a little bit, avoiding the
> risk of cache flushes due to the branches.
>
> Cheers,
> Mauro
>

when the driver is configured without DEBUG config flag on, the statement becomes:

if (exp)
;

which with a good optimizer the code disappears altogether in the production condition. Only with DEBUGGING on will these outputs be generated.

thanks for the extra review eyes

doug t

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/