[PATCH 7/7] [POWERPC] implement BEGIN/END_FW_FTR_SECTION

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Oct 4 17:58:03 EST 2006


> +/*
> + * do_fw_ftr_fixups - goes through the list of firmware feature fixups
> + * and writes nop's over sections of code that don't apply for this firmware.
> + * r3 = data offset (not changed)
> + */
> +_GLOBAL(do_fw_ftr_fixups)
> +	/* Get firmware features */
> +	LOAD_REG_IMMEDIATE(r6,powerpc_firmware_features)
> +	sub	r6,r6,r3
> +	ld	r4,0(r6)
> +	/* Get the fixup table */
> +	LOAD_REG_IMMEDIATE(r6,__start___fw_ftr_fixup)
> +	sub	r6,r6,r3
> +	LOAD_REG_IMMEDIATE(r7,__stop___fw_ftr_fixup)
> +	sub	r7,r7,r3
> +	/* Do the fixup */
> +1:	cmpld	r6,r7
> +	bgelr

 .../...

I'd rather have a single apply_ftr_fixups() that takes the start/stop of
the fixup table and the value to compare against. That could then be
called for fw fixups at boot, fw fixups from modules, cpu fixups at
boot, cpu fixups from modules, and possibly fixups in the vdso's is a
feature I've been thinking of, and which would be easier with just a
single function like that.

Ben.
 




More information about the Linuxppc-dev mailing list