Commit 7ec6131b authored by Linus Torvalds's avatar Linus Torvalds

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
parents 4251c2a6 50b9ac18
...@@ -94,7 +94,7 @@ register unsigned long stack_pointer __asm__("sp"); ...@@ -94,7 +94,7 @@ register unsigned long stack_pointer __asm__("sp");
/* Sit on a nap instruction until interrupted. */ /* Sit on a nap instruction until interrupted. */
extern void smp_nap(void); extern void smp_nap(void);
/* Enable interrupts racelessly and nap forever: helper for cpu_idle(). */ /* Enable interrupts racelessly and nap forever: helper for arch_cpu_idle(). */
extern void _cpu_idle(void); extern void _cpu_idle(void);
#else /* __ASSEMBLY__ */ #else /* __ASSEMBLY__ */
......
...@@ -228,13 +228,10 @@ early_param("isolnodes", setup_isolnodes); ...@@ -228,13 +228,10 @@ early_param("isolnodes", setup_isolnodes);
#if defined(CONFIG_PCI) && !defined(__tilegx__) #if defined(CONFIG_PCI) && !defined(__tilegx__)
static int __init setup_pci_reserve(char* str) static int __init setup_pci_reserve(char* str)
{ {
unsigned long mb; if (str == NULL || kstrtouint(str, 0, &pci_reserve_mb) != 0 ||
pci_reserve_mb > 3 * 1024)
if (str == NULL || strict_strtoul(str, 0, &mb) != 0 ||
mb > 3 * 1024)
return -EINVAL; return -EINVAL;
pci_reserve_mb = mb;
pr_info("Reserving %dMB for PCIE root complex mappings\n", pr_info("Reserving %dMB for PCIE root complex mappings\n",
pci_reserve_mb); pci_reserve_mb);
return 0; return 0;
...@@ -691,7 +688,7 @@ static void __init setup_bootmem_allocator(void) ...@@ -691,7 +688,7 @@ static void __init setup_bootmem_allocator(void)
/* Reserve any memory excluded by "memmap" arguments. */ /* Reserve any memory excluded by "memmap" arguments. */
for (i = 0; i < memmap_nr; ++i) { for (i = 0; i < memmap_nr; ++i) {
struct memmap_entry *m = &memmap_map[i]; struct memmap_entry *m = &memmap_map[i];
reserve_bootmem(m->addr, m->size, 0); reserve_bootmem(m->addr, m->size, BOOTMEM_DEFAULT);
} }
#ifdef CONFIG_BLK_DEV_INITRD #ifdef CONFIG_BLK_DEV_INITRD
...@@ -715,7 +712,8 @@ static void __init setup_bootmem_allocator(void) ...@@ -715,7 +712,8 @@ static void __init setup_bootmem_allocator(void)
#ifdef CONFIG_KEXEC #ifdef CONFIG_KEXEC
if (crashk_res.start != crashk_res.end) if (crashk_res.start != crashk_res.end)
reserve_bootmem(crashk_res.start, resource_size(&crashk_res), 0); reserve_bootmem(crashk_res.start, resource_size(&crashk_res),
BOOTMEM_DEFAULT);
#endif #endif
} }
......
...@@ -321,14 +321,13 @@ int show_unhandled_signals = 1; ...@@ -321,14 +321,13 @@ int show_unhandled_signals = 1;
static int __init crashinfo(char *str) static int __init crashinfo(char *str)
{ {
unsigned long val;
const char *word; const char *word;
if (*str == '\0') if (*str == '\0')
val = 2; show_unhandled_signals = 2;
else if (*str != '=' || strict_strtoul(++str, 0, &val) != 0) else if (*str != '=' || kstrtoint(++str, 0, &show_unhandled_signals) != 0)
return 0; return 0;
show_unhandled_signals = val;
switch (show_unhandled_signals) { switch (show_unhandled_signals) {
case 0: case 0:
word = "No"; word = "No";
......
...@@ -42,10 +42,9 @@ static int __init setup_unaligned_fixup(char *str) ...@@ -42,10 +42,9 @@ static int __init setup_unaligned_fixup(char *str)
* will still parse the instruction, then fire a SIGBUS with * will still parse the instruction, then fire a SIGBUS with
* the correct address from inside the single_step code. * the correct address from inside the single_step code.
*/ */
long val; if (kstrtoint(str, 0, &unaligned_fixup) != 0)
if (strict_strtol(str, 0, &val) != 0)
return 0; return 0;
unaligned_fixup = val;
pr_info("Fixups for unaligned data accesses are %s\n", pr_info("Fixups for unaligned data accesses are %s\n",
unaligned_fixup >= 0 ? unaligned_fixup >= 0 ?
(unaligned_fixup ? "enabled" : "disabled") : (unaligned_fixup ? "enabled" : "disabled") :
......
...@@ -182,18 +182,7 @@ static void find_regs(tilegx_bundle_bits bundle, uint64_t *rd, uint64_t *ra, ...@@ -182,18 +182,7 @@ static void find_regs(tilegx_bundle_bits bundle, uint64_t *rd, uint64_t *ra,
int i; int i;
uint64_t reg; uint64_t reg;
uint64_t reg_map = 0, alias_reg_map = 0, map; uint64_t reg_map = 0, alias_reg_map = 0, map;
bool alias; bool alias = false;
*ra = -1;
*rb = -1;
if (rd)
*rd = -1;
*clob1 = -1;
*clob2 = -1;
*clob3 = -1;
alias = false;
/* /*
* Parse fault bundle, find potential used registers and mark * 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,7 +558,7 @@ void jit_bundle_gen(struct pt_regs *regs, tilegx_bundle_bits bundle,
tilegx_bundle_bits bundle_2 = 0; tilegx_bundle_bits bundle_2 = 0;
/* If bundle_2_enable = false, bundle_2 is fnop/nop operation. */ /* If bundle_2_enable = false, bundle_2 is fnop/nop operation. */
bool bundle_2_enable = true; bool bundle_2_enable = true;
uint64_t ra, rb, rd = -1, clob1, clob2, clob3; uint64_t ra = -1, rb = -1, rd = -1, clob1 = -1, clob2 = -1, clob3 = -1;
/* /*
* Indicate if the unalign access * Indicate if the unalign access
* instruction's registers hit with * instruction's registers hit with
......
...@@ -273,9 +273,9 @@ static pgprot_t __init init_pgprot(ulong address) ...@@ -273,9 +273,9 @@ static pgprot_t __init init_pgprot(ulong address)
/* /*
* Otherwise we just hand out consecutive cpus. To avoid * Otherwise we just hand out consecutive cpus. To avoid
* requiring this function to hold state, we just walk forward from * requiring this function to hold state, we just walk forward from
* _sdata by PAGE_SIZE, skipping the readonly and init data, to reach * __end_rodata by PAGE_SIZE, skipping the readonly and init data, to
* the requested address, while walking cpu home around kdata_mask. * reach the requested address, while walking cpu home around
* This is typically no more than a dozen or so iterations. * kdata_mask. This is typically no more than a dozen or so iterations.
*/ */
page = (((ulong)__end_rodata) + PAGE_SIZE - 1) & PAGE_MASK; page = (((ulong)__end_rodata) + PAGE_SIZE - 1) & PAGE_MASK;
BUG_ON(address < page || address >= (ulong)_end); BUG_ON(address < page || address >= (ulong)_end);
...@@ -912,7 +912,7 @@ static long __write_once initfree = 1; ...@@ -912,7 +912,7 @@ static long __write_once initfree = 1;
static int __init set_initfree(char *str) static int __init set_initfree(char *str)
{ {
long val; long val;
if (strict_strtol(str, 0, &val) == 0) { if (kstrtol(str, 0, &val) == 0) {
initfree = val; initfree = val;
pr_info("initfree: %s free init pages\n", pr_info("initfree: %s free init pages\n",
initfree ? "will" : "won't"); initfree ? "will" : "won't");
......
...@@ -196,7 +196,7 @@ static int __init hvc_tile_init(void) ...@@ -196,7 +196,7 @@ static int __init hvc_tile_init(void)
#ifndef __tilegx__ #ifndef __tilegx__
struct hvc_struct *hp; struct hvc_struct *hp;
hp = hvc_alloc(0, 0, &hvc_tile_get_put_ops, 128); hp = hvc_alloc(0, 0, &hvc_tile_get_put_ops, 128);
return IS_ERR(hp) ? PTR_ERR(hp) : 0; return PTR_ERR_OR_ZERO(hp);
#else #else
platform_device_register(&hvc_tile_pdev); platform_device_register(&hvc_tile_pdev);
return platform_driver_register(&hvc_tile_driver); return platform_driver_register(&hvc_tile_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment