arch/tile: Miscellaneous cleanup changes.

This commit is primarily changes caused by reviewing "sparse"
and "checkpatch" output on our sources, so is somewhat noisy, since
things like "printk() -> pr_err()" (or whatever) throughout the
codebase tend to get tedious to read.  Rather than trying to tease
apart precisely which things changed due to which type of code
review, this commit includes various cleanups in the code:

- sparse: Add declarations in headers for globals.
- sparse: Fix __user annotations.
- sparse: Using gfp_t consistently instead of int.
- sparse: removing functions not actually used.
- checkpatch: Clean up printk() warnings by using pr_info(), etc.;
  also avoid partial-line printks except in bootup code.
  - checkpatch: Use exposed structs rather than typedefs.
  - checkpatch: Change some C99 comments to C89 comments.

In addition, a couple of minor other changes are rolled in
to this commit:

- Add support for a "raise" instruction to cause SIGFPE, etc., to be raised.
- Remove some compat code that is unnecessary when we fully eliminate
  some of the deprecated syscalls from the generic syscall ABI.
- Update the tile_defconfig to reflect current config contents.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
diff --git a/arch/tile/kernel/machine_kexec.c b/arch/tile/kernel/machine_kexec.c
index ed3e1cb..ba7a265 100644
--- a/arch/tile/kernel/machine_kexec.c
+++ b/arch/tile/kernel/machine_kexec.c
@@ -75,13 +75,13 @@
 int machine_kexec_prepare(struct kimage *image)
 {
 	if (num_online_cpus() > 1) {
-		printk(KERN_WARNING "%s: detected attempt to kexec "
+		pr_warning("%s: detected attempt to kexec "
 		       "with num_online_cpus() > 1\n",
 		       __func__);
 		return -ENOSYS;
 	}
 	if (image->type != KEXEC_TYPE_DEFAULT) {
-		printk(KERN_WARNING "%s: detected attempt to kexec "
+		pr_warning("%s: detected attempt to kexec "
 		       "with unsupported type: %d\n",
 		       __func__,
 		       image->type);
@@ -124,22 +124,13 @@
 		return 0;
 
 	/*
-	 * If we get a checksum mismatch, it's possible that this is
-	 * just a false positive, but relatively unlikely.  We dump
-	 * out the contents of the section so we can diagnose better.
+	 * If we get a checksum mismatch, warn with the checksum
+	 * so we can diagnose better.
 	 */
 	csum = ip_compute_csum(pg, bhdrp->b_size);
 	if (csum != 0) {
-		int i;
-		unsigned char *p = pg;
-		int nbytes = min((Elf32_Word)1000, bhdrp->b_size);
-		printk(KERN_INFO "%s: bad checksum %#x\n", __func__, csum);
-		printk(KERN_INFO "bytes (%d):", bhdrp->b_size);
-		for (i = 0; i < nbytes; ++i)
-			printk(" %02x", p[i]);
-		if (bhdrp->b_size != nbytes)
-			printk(" ...");
-		printk("\n");
+		pr_warning("%s: bad checksum %#x (size %d)\n",
+			   __func__, csum, bhdrp->b_size);
 		return 0;
 	}
 
@@ -156,7 +147,7 @@
 		if ((unsigned char *) (nhdrp + 1) >
 		    ((unsigned char *) pg) + bhdrp->b_size) {
 
-			printk(KERN_INFO "%s: out of bounds\n", __func__);
+			pr_info("%s: out of bounds\n", __func__);
 			return 0;
 		}
 	}
@@ -167,7 +158,7 @@
 	while (*desc != '\0') {
 		desc++;
 		if (((unsigned long)desc & PAGE_MASK) != (unsigned long)pg) {
-			printk(KERN_INFO "%s: ran off end of page\n",
+			pr_info("%s: ran off end of page\n",
 			       __func__);
 			return 0;
 		}
@@ -202,23 +193,20 @@
 	}
 
 	if (command_line != 0) {
-		printk(KERN_INFO "setting new command line to \"%s\"\n",
+		pr_info("setting new command line to \"%s\"\n",
 		       command_line);
 
 		hverr = hv_set_command_line(
 			(HV_VirtAddr) command_line, strlen(command_line));
 		kunmap_atomic(command_line, KM_USER0);
 	} else {
-		printk(KERN_INFO "%s: no command line found; making empty\n",
+		pr_info("%s: no command line found; making empty\n",
 		       __func__);
 		hverr = hv_set_command_line((HV_VirtAddr) command_line, 0);
 	}
-	if (hverr) {
-		printk(KERN_WARNING
-		      "%s: call to hv_set_command_line returned error: %d\n",
-		      __func__, hverr);
-
-	}
+	if (hverr)
+		pr_warning("%s: hv_set_command_line returned error: %d\n",
+			   __func__, hverr);
 }
 
 /*