aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-11 19:50:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-11 19:50:01 -0400
commit7ec6131b55184084d091953fad9e5c785c5b500b (patch)
tree9c777700e2c237946be8fe775903168f11b77f29 /arch/tile
parent4251c2a67011801caecd63671f26dd8c9aedb24c (diff)
parent50b9ac1813f7f2f13c937a1484c2fe09c4d590ce (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
Pull arch/tile changes from Chris Metcalf: "These mostly just address smaller issues reported to me" * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: arch: tile: kernel: unaligned.c: Cleaning up uninitialized variables drivers/tty/hvc/hvc_tile.c: use PTR_ERR_OR_ZERO replace strict_strto* call with kstrto* tile: Update comments for generic idle conversion tile: cleanup the comment in init_pgprot tile: use BOOTMEM_DEFAULT instead of magic number 0 for reserve_bootmem flags
Diffstat (limited to 'arch/tile')
-rw-r--r--arch/tile/include/asm/thread_info.h2
-rw-r--r--arch/tile/kernel/setup.c12
-rw-r--r--arch/tile/kernel/signal.c7
-rw-r--r--arch/tile/kernel/traps.c5
-rw-r--r--arch/tile/kernel/unaligned.c15
-rw-r--r--arch/tile/mm/init.c8
6 files changed, 17 insertions, 32 deletions
diff --git a/arch/tile/include/asm/thread_info.h b/arch/tile/include/asm/thread_info.h
index d767ff9f59b9..48e4fd0f38e4 100644
--- a/arch/tile/include/asm/thread_info.h
+++ b/arch/tile/include/asm/thread_info.h
@@ -94,7 +94,7 @@ register unsigned long stack_pointer __asm__("sp");
94/* Sit on a nap instruction until interrupted. */ 94/* Sit on a nap instruction until interrupted. */
95extern void smp_nap(void); 95extern void smp_nap(void);
96 96
97/* Enable interrupts racelessly and nap forever: helper for cpu_idle(). */ 97/* Enable interrupts racelessly and nap forever: helper for arch_cpu_idle(). */
98extern void _cpu_idle(void); 98extern void _cpu_idle(void);
99 99
100#else /* __ASSEMBLY__ */ 100#else /* __ASSEMBLY__ */
diff --git a/arch/tile/kernel/setup.c b/arch/tile/kernel/setup.c
index 74c91729a62a..112ababa9e55 100644
--- a/arch/tile/kernel/setup.c
+++ b/arch/tile/kernel/setup.c
@@ -228,13 +228,10 @@ early_param("isolnodes", setup_isolnodes);
228#if defined(CONFIG_PCI) && !defined(__tilegx__) 228#if defined(CONFIG_PCI) && !defined(__tilegx__)
229static int __init setup_pci_reserve(char* str) 229static int __init setup_pci_reserve(char* str)
230{ 230{
231 unsigned long mb; 231 if (str == NULL || kstrtouint(str, 0, &pci_reserve_mb) != 0 ||
232 232 pci_reserve_mb > 3 * 1024)
233 if (str == NULL || strict_strtoul(str, 0, &mb) != 0 ||
234 mb > 3 * 1024)
235 return -EINVAL; 233 return -EINVAL;
236 234
237 pci_reserve_mb = mb;
238 pr_info("Reserving %dMB for PCIE root complex mappings\n", 235 pr_info("Reserving %dMB for PCIE root complex mappings\n",
239 pci_reserve_mb); 236 pci_reserve_mb);
240 return 0; 237 return 0;
@@ -691,7 +688,7 @@ static void __init setup_bootmem_allocator(void)
691 /* Reserve any memory excluded by "memmap" arguments. */ 688 /* Reserve any memory excluded by "memmap" arguments. */
692 for (i = 0; i < memmap_nr; ++i) { 689 for (i = 0; i < memmap_nr; ++i) {
693 struct memmap_entry *m = &memmap_map[i]; 690 struct memmap_entry *m = &memmap_map[i];
694 reserve_bootmem(m->addr, m->size, 0); 691 reserve_bootmem(m->addr, m->size, BOOTMEM_DEFAULT);
695 } 692 }
696 693
697#ifdef CONFIG_BLK_DEV_INITRD 694#ifdef CONFIG_BLK_DEV_INITRD
@@ -715,7 +712,8 @@ static void __init setup_bootmem_allocator(void)
715 712
716#ifdef CONFIG_KEXEC 713#ifdef CONFIG_KEXEC
717 if (crashk_res.start != crashk_res.end) 714 if (crashk_res.start != crashk_res.end)
718 reserve_bootmem(crashk_res.start, resource_size(&crashk_res), 0); 715 reserve_bootmem(crashk_res.start, resource_size(&crashk_res),
716 BOOTMEM_DEFAULT);
719#endif 717#endif
720} 718}
721 719
diff --git a/arch/tile/kernel/signal.c b/arch/tile/kernel/signal.c
index 2d1dbf38a9ab..d1d026f01267 100644
--- a/arch/tile/kernel/signal.c
+++ b/arch/tile/kernel/signal.c
@@ -321,14 +321,13 @@ int show_unhandled_signals = 1;
321 321
322static int __init crashinfo(char *str) 322static int __init crashinfo(char *str)
323{ 323{
324 unsigned long val;
325 const char *word; 324 const char *word;
326 325
327 if (*str == '\0') 326 if (*str == '\0')
328 val = 2; 327 show_unhandled_signals = 2;
329 else if (*str != '=' || strict_strtoul(++str, 0, &val) != 0) 328 else if (*str != '=' || kstrtoint(++str, 0, &show_unhandled_signals) != 0)
330 return 0; 329 return 0;
331 show_unhandled_signals = val; 330
332 switch (show_unhandled_signals) { 331 switch (show_unhandled_signals) {
333 case 0: 332 case 0:
334 word = "No"; 333 word = "No";
diff --git a/arch/tile/kernel/traps.c b/arch/tile/kernel/traps.c
index 6b603d556ca6..f3ceb6308e42 100644
--- a/arch/tile/kernel/traps.c
+++ b/arch/tile/kernel/traps.c
@@ -42,10 +42,9 @@ static int __init setup_unaligned_fixup(char *str)
42 * will still parse the instruction, then fire a SIGBUS with 42 * will still parse the instruction, then fire a SIGBUS with
43 * the correct address from inside the single_step code. 43 * the correct address from inside the single_step code.
44 */ 44 */
45 long val; 45 if (kstrtoint(str, 0, &unaligned_fixup) != 0)
46 if (strict_strtol(str, 0, &val) != 0)
47 return 0; 46 return 0;
48 unaligned_fixup = val; 47
49 pr_info("Fixups for unaligned data accesses are %s\n", 48 pr_info("Fixups for unaligned data accesses are %s\n",
50 unaligned_fixup >= 0 ? 49 unaligned_fixup >= 0 ?
51 (unaligned_fixup ? "enabled" : "disabled") : 50 (unaligned_fixup ? "enabled" : "disabled") :
diff --git a/arch/tile/kernel/unaligned.c b/arch/tile/kernel/unaligned.c
index b030b4e78845..c02ea2a45f67 100644
--- a/arch/tile/kernel/unaligned.c
+++ b/arch/tile/kernel/unaligned.c
@@ -182,18 +182,7 @@ static void find_regs(tilegx_bundle_bits bundle, uint64_t *rd, uint64_t *ra,
182 int i; 182 int i;
183 uint64_t reg; 183 uint64_t reg;
184 uint64_t reg_map = 0, alias_reg_map = 0, map; 184 uint64_t reg_map = 0, alias_reg_map = 0, map;
185 bool alias; 185 bool alias = false;
186
187 *ra = -1;
188 *rb = -1;
189
190 if (rd)
191 *rd = -1;
192
193 *clob1 = -1;
194 *clob2 = -1;
195 *clob3 = -1;
196 alias = false;
197 186
198 /* 187 /*
199 * Parse fault bundle, find potential used registers and mark 188 * Parse fault bundle, find potential used registers and mark
@@ -569,7 +558,7 @@ void jit_bundle_gen(struct pt_regs *regs, tilegx_bundle_bits bundle,
569 tilegx_bundle_bits bundle_2 = 0; 558 tilegx_bundle_bits bundle_2 = 0;
570 /* If bundle_2_enable = false, bundle_2 is fnop/nop operation. */ 559 /* If bundle_2_enable = false, bundle_2 is fnop/nop operation. */
571 bool bundle_2_enable = true; 560 bool bundle_2_enable = true;
572 uint64_t ra, rb, rd = -1, clob1, clob2, clob3; 561 uint64_t ra = -1, rb = -1, rd = -1, clob1 = -1, clob2 = -1, clob3 = -1;
573 /* 562 /*
574 * Indicate if the unalign access 563 * Indicate if the unalign access
575 * instruction's registers hit with 564 * instruction's registers hit with
diff --git a/arch/tile/mm/init.c b/arch/tile/mm/init.c
index 0fa1acfac79a..bfb3127b4df9 100644
--- a/arch/tile/mm/init.c
+++ b/arch/tile/mm/init.c
@@ -273,9 +273,9 @@ static pgprot_t __init init_pgprot(ulong address)
273 /* 273 /*
274 * Otherwise we just hand out consecutive cpus. To avoid 274 * Otherwise we just hand out consecutive cpus. To avoid
275 * requiring this function to hold state, we just walk forward from 275 * requiring this function to hold state, we just walk forward from
276 * _sdata by PAGE_SIZE, skipping the readonly and init data, to reach 276 * __end_rodata by PAGE_SIZE, skipping the readonly and init data, to
277 * the requested address, while walking cpu home around kdata_mask. 277 * reach the requested address, while walking cpu home around
278 * This is typically no more than a dozen or so iterations. 278 * kdata_mask. This is typically no more than a dozen or so iterations.
279 */ 279 */
280 page = (((ulong)__end_rodata) + PAGE_SIZE - 1) & PAGE_MASK; 280 page = (((ulong)__end_rodata) + PAGE_SIZE - 1) & PAGE_MASK;
281 BUG_ON(address < page || address >= (ulong)_end); 281 BUG_ON(address < page || address >= (ulong)_end);
@@ -912,7 +912,7 @@ static long __write_once initfree = 1;
912static int __init set_initfree(char *str) 912static int __init set_initfree(char *str)
913{ 913{
914 long val; 914 long val;
915 if (strict_strtol(str, 0, &val) == 0) { 915 if (kstrtol(str, 0, &val) == 0) {
916 initfree = val; 916 initfree = val;
917 pr_info("initfree: %s free init pages\n", 917 pr_info("initfree: %s free init pages\n",
918 initfree ? "will" : "won't"); 918 initfree ? "will" : "won't");