powerpc: Move common module code into its own file