cregit-Linux how code gets into the kernel

Release 4.14 arch/powerpc/kernel/module.c

/*  Kernel module help for powerpc.
    Copyright (C) 2001, 2003 Rusty Russell IBM Corporation.
    Copyright (C) 2008 Freescale Semiconductor, Inc.

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
#include <linux/elf.h>
#include <linux/moduleloader.h>
#include <linux/err.h>
#include <linux/vmalloc.h>
#include <linux/bug.h>
#include <asm/module.h>
#include <linux/uaccess.h>
#include <asm/firmware.h>
#include <linux/sort.h>
#include <asm/setup.h>

static LIST_HEAD(module_bug_list);


static const Elf_Shdr *find_section(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, const char *name) { char *secstrings; unsigned int i; secstrings = (char *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; for (i = 1; i < hdr->e_shnum; i++) if (strcmp(secstrings+sechdrs[i].sh_name, name) == 0) return &sechdrs[i]; return NULL; }

Contributors

PersonTokensPropCommitsCommitProp
Kumar Gala91100.00%1100.00%
Total91100.00%1100.00%


int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) { const Elf_Shdr *sect; int rc; rc = module_finalize_ftrace(me, sechdrs); if (rc) return rc; /* Apply feature fixups */ sect = find_section(hdr, sechdrs, "__ftr_fixup"); if (sect != NULL) do_feature_fixups(cur_cpu_spec->cpu_features, (void *)sect->sh_addr, (void *)sect->sh_addr + sect->sh_size); sect = find_section(hdr, sechdrs, "__mmu_ftr_fixup"); if (sect != NULL) do_feature_fixups(cur_cpu_spec->mmu_features, (void *)sect->sh_addr, (void *)sect->sh_addr + sect->sh_size); #ifdef CONFIG_PPC64 sect = find_section(hdr, sechdrs, "__fw_ftr_fixup"); if (sect != NULL) do_feature_fixups(powerpc_firmware_features, (void *)sect->sh_addr, (void *)sect->sh_addr + sect->sh_size); #endif sect = find_section(hdr, sechdrs, "__lwsync_fixup"); if (sect != NULL) do_lwsync_fixups(cur_cpu_spec->cpu_features, (void *)sect->sh_addr, (void *)sect->sh_addr + sect->sh_size); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Kumar Gala16472.25%250.00%
Benjamin Herrenschmidt4419.38%125.00%
Michael Ellerman198.37%125.00%
Total227100.00%4100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Kumar Gala28981.41%228.57%
Benjamin Herrenschmidt4412.39%114.29%
Michael Ellerman195.35%114.29%
Linus Torvalds10.28%114.29%
Daniel Axtens10.28%114.29%
Robert Jennings10.28%114.29%
Total355100.00%7100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.