1
0
Fork 0

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
hifive-unleashed-5.1
Linus Torvalds 2014-06-11 16:50:01 -07:00
commit 7ec6131b55
7 changed files with 18 additions and 33 deletions

View File

@ -94,7 +94,7 @@ register unsigned long stack_pointer __asm__("sp");
/* Sit on a nap instruction until interrupted. */
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);
#else /* __ASSEMBLY__ */

View File

@ -228,13 +228,10 @@ early_param("isolnodes", setup_isolnodes);
#if defined(CONFIG_PCI) && !defined(__tilegx__)
static int __init setup_pci_reserve(char* str)
{
unsigned long mb;
if (str == NULL || strict_strtoul(str, 0, &mb) != 0 ||
mb > 3 * 1024)
if (str == NULL || kstrtouint(str, 0, &pci_reserve_mb) != 0 ||
pci_reserve_mb > 3 * 1024)
return -EINVAL;
pci_reserve_mb = mb;
pr_info("Reserving %dMB for PCIE root complex mappings\n",
pci_reserve_mb);
return 0;
@ -691,7 +688,7 @@ static void __init setup_bootmem_allocator(void)
/* Reserve any memory excluded by "memmap" arguments. */
for (i = 0; i < memmap_nr; ++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
@ -715,7 +712,8 @@ static void __init setup_bootmem_allocator(void)
#ifdef CONFIG_KEXEC
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
}

View File

@ -321,14 +321,13 @@ int show_unhandled_signals = 1;
static int __init crashinfo(char *str)
{
unsigned long val;
const char *word;
if (*str == '\0')
val = 2;
else if (*str != '=' || strict_strtoul(++str, 0, &val) != 0)
show_unhandled_signals = 2;
else if (*str != '=' || kstrtoint(++str, 0, &show_unhandled_signals) != 0)
return 0;
show_unhandled_signals = val;
switch (show_unhandled_signals) {
case 0:
word = "No";

View File

@ -42,10 +42,9 @@ static int __init setup_unaligned_fixup(char *str)
* will still parse the instruction, then fire a SIGBUS with
* the correct address from inside the single_step code.
*/
long val;
if (strict_strtol(str, 0, &val) != 0)
if (kstrtoint(str, 0, &unaligned_fixup) != 0)
return 0;
unaligned_fixup = val;
pr_info("Fixups for unaligned data accesses are %s\n",
unaligned_fixup >= 0 ?
(unaligned_fixup ? "enabled" : "disabled") :

View File

@ -182,18 +182,7 @@ static void find_regs(tilegx_bundle_bits bundle, uint64_t *rd, uint64_t *ra,
int i;
uint64_t reg;
uint64_t reg_map = 0, alias_reg_map = 0, map;
bool alias;
*ra = -1;
*rb = -1;
if (rd)
*rd = -1;
*clob1 = -1;
*clob2 = -1;
*clob3 = -1;
alias = false;
bool alias = false;
/*
* 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,
tilegx_bundle_bits bundle_2 = 0;
/* If bundle_2_enable = false, bundle_2 is fnop/nop operation. */
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
* instruction's registers hit with

View File

@ -273,9 +273,9 @@ static pgprot_t __init init_pgprot(ulong address)
/*
* Otherwise we just hand out consecutive cpus. To avoid
* requiring this function to hold state, we just walk forward from
* _sdata by PAGE_SIZE, skipping the readonly and init data, to reach
* the requested address, while walking cpu home around kdata_mask.
* This is typically no more than a dozen or so iterations.
* __end_rodata by PAGE_SIZE, skipping the readonly and init data, to
* reach the requested address, while walking cpu home around
* kdata_mask. This is typically no more than a dozen or so iterations.
*/
page = (((ulong)__end_rodata) + PAGE_SIZE - 1) & PAGE_MASK;
BUG_ON(address < page || address >= (ulong)_end);
@ -912,7 +912,7 @@ static long __write_once initfree = 1;
static int __init set_initfree(char *str)
{
long val;
if (strict_strtol(str, 0, &val) == 0) {
if (kstrtol(str, 0, &val) == 0) {
initfree = val;
pr_info("initfree: %s free init pages\n",
initfree ? "will" : "won't");

View File

@ -196,7 +196,7 @@ static int __init hvc_tile_init(void)
#ifndef __tilegx__
struct hvc_struct *hp;
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
platform_device_register(&hvc_tile_pdev);
return platform_driver_register(&hvc_tile_driver);