[parisc-linux] [PATCH] Fix HPUX fork

Grant Grundler grundler@cup.hp.com
Thu, 22 Feb 2001 22:26:47 -0800


Matthew Wilcox wrote:
> -		cregs->kpc = &child_return;
>  		cregs->gr[30] = usp;
> +		if (p->personality == PER_HPUX) {
> +			cregs->kpc = &hpux_child_return;
> +		} else {
> +			cregs->kpc = &child_return;
> +		}

Matthew,
In general, branches hurt performance on RISC archs.
Could the code be structured something like:

	cregs->kpc = child_return_ftn[p->personality];
or 
	cregs->kpc = personality_data[p->personality].child_ret_ftn;


For PARISC-linux, do we need more personalities for wide-mode or SOM support?
If so, then indexing is probably a better solution.

thanks,
grant

Grant Grundler
parisc-linux {PCI|IOMMU|SMP} hacker
+1.408.447.7253