Re: 2.4.19rc2aa1 i_size atomic access

From: Maciej W. Rozycki (macro@ds2.pg.gda.pl)
Date: Wed Jul 24 2002 - 09:19:41 EST


On Tue, 23 Jul 2002, Andrea Arcangeli wrote:

> the problem with the feature flag check is that I don't want to make it
> conditional at runtime, if I start adding branches and checks on the

 No, no, no, that would be insane, no doubt.

> feature flag (or pointer to functions) I can as well use the ordered
> read/writes C version without reading/writing the 64bit atomically. So
> the check_config() will be the oops or the not-oops at the first i_size
> read/write :).

 I meant something explicit like that:

#ifdef CONFIG_X86_CMPXCHG8B
        if (!cpu_has_cx8)
                panic("Kernel compiled for Pentium+, requires CMPXCHG8B
                      feature!");
#endif

An oops would be quite an obscure response for a configuration error. As
I stated, just look into check_config(), for how it's done in similar
cases.

> As for the CONFIG_X86_CMPXCHG8B you're right it's needed, setting
> CONFIG_M486=y and CONFIG_SMP=y would generate a kernel that would oops
> on a 486 and I don't see any other way to get 486+SMP case right without
> checking for the X86_FEATURE_CX8 capability at runtime. Not that I think
> 486+SMP is high prio but yes, theoretically it's a bug.

 No need to break what works, either.

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

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



This archive was generated by hypermail 2b29 : Tue Jul 30 2002 - 14:00:16 EST