diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-17 17:05:49 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-17 17:05:49 -0800 |
commit | d9cb5bfcc3339f1a63df8fe0af8cece33c83c3af (patch) | |
tree | 091dea1a92466e87e2171bbd18f2e3f4908d5f4a /arch/tile/kernel | |
parent | 0f484e42baaf5a38fc79e99b917caa5431651fb1 (diff) | |
parent | 14e73e78ee982710292248536aa84cba41e974f4 (diff) | |
download | op-kernel-dev-d9cb5bfcc3339f1a63df8fe0af8cece33c83c3af.zip op-kernel-dev-d9cb5bfcc3339f1a63df8fe0af8cece33c83c3af.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
Pull arch/tile updates from Chris Metcalf:
"Another grab-bag of miscellaneous changes"
* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
tile: use __ro_after_init instead of tile-specific __write_once
tile: migrate exception table users off module.h and onto extable.h
tile: remove #pragma unroll from finv_buffer_remote()
tile-module: Rename jump labels in module_alloc()
tile-module: Use kmalloc_array() in module_alloc()
tile/pci_gx: fix spelling mistake: "delievered" -> "delivered"
Diffstat (limited to 'arch/tile/kernel')
-rw-r--r-- | arch/tile/kernel/module.c | 11 | ||||
-rw-r--r-- | arch/tile/kernel/pci.c | 2 | ||||
-rw-r--r-- | arch/tile/kernel/pci_gx.c | 2 | ||||
-rw-r--r-- | arch/tile/kernel/setup.c | 18 | ||||
-rw-r--r-- | arch/tile/kernel/smp.c | 2 | ||||
-rw-r--r-- | arch/tile/kernel/time.c | 4 | ||||
-rw-r--r-- | arch/tile/kernel/unaligned.c | 2 |
7 files changed, 20 insertions, 21 deletions
diff --git a/arch/tile/kernel/module.c b/arch/tile/kernel/module.c index 2305084..09233fb 100644 --- a/arch/tile/kernel/module.c +++ b/arch/tile/kernel/module.c @@ -43,29 +43,28 @@ void *module_alloc(unsigned long size) int npages; npages = (size + PAGE_SIZE - 1) / PAGE_SIZE; - pages = kmalloc(npages * sizeof(struct page *), GFP_KERNEL); + pages = kmalloc_array(npages, sizeof(*pages), GFP_KERNEL); if (pages == NULL) return NULL; for (; i < npages; ++i) { pages[i] = alloc_page(GFP_KERNEL | __GFP_HIGHMEM); if (!pages[i]) - goto error; + goto free_pages; } area = __get_vm_area(size, VM_ALLOC, MEM_MODULE_START, MEM_MODULE_END); if (!area) - goto error; + goto free_pages; area->nr_pages = npages; area->pages = pages; if (map_vm_area(area, prot_rwx, pages)) { vunmap(area->addr); - goto error; + goto free_pages; } return area->addr; - -error: + free_pages: while (--i >= 0) __free_page(pages[i]); kfree(pages); diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index 9475a74..bc6656b 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c @@ -57,7 +57,7 @@ static int pci_probe = 1; * This flag tells if the platform is TILEmpower that needs * special configuration for the PLX switch chip. */ -int __write_once tile_plx_gen1; +int __ro_after_init tile_plx_gen1; static struct pci_controller controllers[TILE_NUM_PCIE]; static int num_controllers; diff --git a/arch/tile/kernel/pci_gx.c b/arch/tile/kernel/pci_gx.c index 0e7a5d0..b554a68 100644 --- a/arch/tile/kernel/pci_gx.c +++ b/arch/tile/kernel/pci_gx.c @@ -131,7 +131,7 @@ static int tile_irq_cpu(int irq) count = cpumask_weight(&intr_cpus_map); if (unlikely(count == 0)) { - pr_warn("intr_cpus_map empty, interrupts will be delievered to dataplane tiles\n"); + pr_warn("intr_cpus_map empty, interrupts will be delivered to dataplane tiles\n"); return irq % (smp_height * smp_width); } diff --git a/arch/tile/kernel/setup.c b/arch/tile/kernel/setup.c index 153020a..443a70b 100644 --- a/arch/tile/kernel/setup.c +++ b/arch/tile/kernel/setup.c @@ -49,7 +49,7 @@ static inline int ABS(int x) { return x >= 0 ? x : -x; } /* Chip information */ -char chip_model[64] __write_once; +char chip_model[64] __ro_after_init; #ifdef CONFIG_VT struct screen_info screen_info; @@ -97,17 +97,17 @@ int node_controller[MAX_NUMNODES] = { [0 ... MAX_NUMNODES-1] = -1 }; #ifdef CONFIG_HIGHMEM /* Map information from VAs to PAs */ unsigned long pbase_map[1 << (32 - HPAGE_SHIFT)] - __write_once __attribute__((aligned(L2_CACHE_BYTES))); + __ro_after_init __attribute__((aligned(L2_CACHE_BYTES))); EXPORT_SYMBOL(pbase_map); /* Map information from PAs to VAs */ void *vbase_map[NR_PA_HIGHBIT_VALUES] - __write_once __attribute__((aligned(L2_CACHE_BYTES))); + __ro_after_init __attribute__((aligned(L2_CACHE_BYTES))); EXPORT_SYMBOL(vbase_map); #endif /* Node number as a function of the high PA bits */ -int highbits_to_node[NR_PA_HIGHBIT_VALUES] __write_once; +int highbits_to_node[NR_PA_HIGHBIT_VALUES] __ro_after_init; EXPORT_SYMBOL(highbits_to_node); static unsigned int __initdata maxmem_pfn = -1U; @@ -844,11 +844,11 @@ static void __init zone_sizes_init(void) #ifdef CONFIG_NUMA /* which logical CPUs are on which nodes */ -struct cpumask node_2_cpu_mask[MAX_NUMNODES] __write_once; +struct cpumask node_2_cpu_mask[MAX_NUMNODES] __ro_after_init; EXPORT_SYMBOL(node_2_cpu_mask); /* which node each logical CPU is on */ -char cpu_2_node[NR_CPUS] __write_once __attribute__((aligned(L2_CACHE_BYTES))); +char cpu_2_node[NR_CPUS] __ro_after_init __attribute__((aligned(L2_CACHE_BYTES))); EXPORT_SYMBOL(cpu_2_node); /* Return cpu_to_node() except for cpus not yet assigned, which return -1 */ @@ -1269,7 +1269,7 @@ static void __init validate_va(void) * cpus plus any other cpus that are willing to share their cache. * It is set by hv_inquire_tiles(HV_INQ_TILES_LOTAR). */ -struct cpumask __write_once cpu_lotar_map; +struct cpumask __ro_after_init cpu_lotar_map; EXPORT_SYMBOL(cpu_lotar_map); /* @@ -1291,7 +1291,7 @@ EXPORT_SYMBOL(hash_for_home_map); * cache, those tiles will only appear in cpu_lotar_map, NOT in * cpu_cacheable_map, as they are a special case. */ -struct cpumask __write_once cpu_cacheable_map; +struct cpumask __ro_after_init cpu_cacheable_map; EXPORT_SYMBOL(cpu_cacheable_map); static __initdata struct cpumask disabled_map; @@ -1506,7 +1506,7 @@ void __init setup_arch(char **cmdline_p) * Set up per-cpu memory. */ -unsigned long __per_cpu_offset[NR_CPUS] __write_once; +unsigned long __per_cpu_offset[NR_CPUS] __ro_after_init; EXPORT_SYMBOL(__per_cpu_offset); static size_t __initdata pfn_offset[MAX_NUMNODES] = { 0 }; diff --git a/arch/tile/kernel/smp.c b/arch/tile/kernel/smp.c index 07e3ff5..94a62e1 100644 --- a/arch/tile/kernel/smp.c +++ b/arch/tile/kernel/smp.c @@ -27,7 +27,7 @@ * We write to width and height with a single store in head_NN.S, * so make the variable aligned to "long". */ -HV_Topology smp_topology __write_once __aligned(sizeof(long)); +HV_Topology smp_topology __ro_after_init __aligned(sizeof(long)); EXPORT_SYMBOL(smp_topology); #if CHIP_HAS_IPI() diff --git a/arch/tile/kernel/time.c b/arch/tile/kernel/time.c index ea960d6..c935701 100644 --- a/arch/tile/kernel/time.c +++ b/arch/tile/kernel/time.c @@ -37,7 +37,7 @@ */ /* How many cycles per second we are running at. */ -static cycles_t cycles_per_sec __write_once; +static cycles_t cycles_per_sec __ro_after_init; cycles_t get_clock_rate(void) { @@ -68,7 +68,7 @@ EXPORT_SYMBOL(get_cycles); */ #define SCHED_CLOCK_SHIFT 10 -static unsigned long sched_clock_mult __write_once; +static unsigned long sched_clock_mult __ro_after_init; static cycles_t clocksource_get_cycles(struct clocksource *cs) { diff --git a/arch/tile/kernel/unaligned.c b/arch/tile/kernel/unaligned.c index 9772a35..4fe78c5 100644 --- a/arch/tile/kernel/unaligned.c +++ b/arch/tile/kernel/unaligned.c @@ -22,7 +22,7 @@ #include <linux/mman.h> #include <linux/types.h> #include <linux/err.h> -#include <linux/module.h> +#include <linux/extable.h> #include <linux/compat.h> #include <linux/prctl.h> #include <asm/cacheflush.h> |