lkml.org 
[lkml]   [2005]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] SMP alternatives
Hi!

> For testing & benchmarking purposes I've put also in two (temporary)
> sysrq's to switch between UP and SMP bits without booting/shutting down
> the second CPU. That one breaks non-i386 builds which are trivially
> fixable by just dropping the drivers/char/sysrq.c changes ;)

> +/* Replace instructions with better alternatives for this CPU type.
> +
> + This runs before SMP is initialized to avoid SMP problems with
> + self modifying code. This implies that assymetric systems where
> + APs have less capabilities than the boot processor are not handled.
> + Tough. Make sure you disable such features by hand. */
> +void apply_alternatives(struct alt_instr *start, struct alt_instr *end,
> + __u8 *tstart, __u8 *tend)
> +{
> + unsigned char **noptable = intel_nops;
> + struct alt_instr *a;

Some alignment problems here. (Maybe it is okay as a source).

> +struct smp_alt_module {
> + /* what is this ??? */

:-))))))).

> + struct module *mod;
> + char *name;
> +
> + /* our SMP alternatives table */
> + struct alt_instr *astart;
> + struct alt_instr *aend;
> +
> + /* .text segment, needed to avoid patching init code ;) */
> + __u8 *tstart;
> + __u8 *tend;

You should be able to use u8 here.

> + if (0 == strcmp(".text", secstrings + s->sh_name))
> + text = s;
> + if (0 == strcmp(".altinstructions", secstrings + s->sh_name))
> + alt = s;
> + if (0 == strcmp(".smp_altinstructions", secstrings + s->sh_name))
> + smpalt = s;

Can we get if (!strcmp()) here?

Pavel

--
Thanks, Sharp!
-
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/

\
 
 \ /
  Last update: 2005-11-22 19:04    [W:0.336 / U:1.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site