Skip to contentSkip to conversation

kernel fails to build without CONFIG_ALPHA_LEGACY_START_ADDRESS

DISCUSSION Raúl Porcel 2 participants 3 messages Dec 5, 2009 – Dec 7, 2009 Alpha port

lore
Share & tools
lore
#0 lore raw

If CONFIG_ALPHA_LEGACY_START_ADDRESS is not set, which is needed to be unset if the machine is Marvel/Titan/Wildfire, it fails to build:

CC arch/alpha/kernel/err_marvel.o
cc1: warnings being treated as errors arch/alpha/kernel/err_marvel.c: In function 'marvel_print_err_cyc':
arch/alpha/kernel/err_marvel.c:119: error: format '%ld' expects type 'long int', but argument 6 has type 'u64' arch/alpha/kernel/err_marvel.c: In function 'marvel_print_po7_ugbge_sym':
arch/alpha/kernel/err_marvel.c:321: error: format '%ld' expects type 'long int', but argument 4 has type 'u64' arch/alpha/kernel/err_marvel.c:321: error: format '%ld' expects type 'long int', but argument 5 has type 'u64' arch/alpha/kernel/err_marvel.c: In function 'marvel_print_pox_spl_cmplt':
arch/alpha/kernel/err_marvel.c:560: error: format '%ld' expects type 'long int', but argument 4 has type 'long long unsigned int' arch/alpha/kernel/err_marvel.c:560: error: format '%ld' expects type 'long int', but argument 5 has type 'long long unsigned int' arch/alpha/kernel/err_marvel.c:560: error: format '%ld' expects type 'long int', but argument 6 has type 'long long unsigned int' make[1]: *** [arch/alpha/kernel/err_marvel.o] Error 1
make: *** [arch/alpha/kernel] Error 2

maintainer
#1 lore raw
Quoted 14 lines · Raúl Porcel

If CONFIG_ALPHA_LEGACY_START_ADDRESS is not set, which is needed to be unset if the machine is Marvel/Titan/Wildfire, it fails to build:

 CC      arch/alpha/kernel/err_marvel.o
cc1: warnings being treated as errors arch/alpha/kernel/err_marvel.c: In function 'marvel_print_err_cyc':
arch/alpha/kernel/err_marvel.c:119: error: format '%ld' expects type 'long int', but argument 6 has type 'u64' arch/alpha/kernel/err_marvel.c: In function 'marvel_print_po7_ugbge_sym':
arch/alpha/kernel/err_marvel.c:321: error: format '%ld' expects type 'long int', but argument 4 has type 'u64' arch/alpha/kernel/err_marvel.c:321: error: format '%ld' expects type 'long int', but argument 5 has type 'u64' arch/alpha/kernel/err_marvel.c: In function 'marvel_print_pox_spl_cmplt':

Quoted 8 lines

arch/alpha/kernel/err_marvel.c:560: error: format '%ld' expects type 'long int', but argument 4 has type 'long long unsigned int' arch/alpha/kernel/err_marvel.c:560: error: format '%ld' expects type 'long int', but argument 5 has type 'long long unsigned int' arch/alpha/kernel/err_marvel.c:560: error: format '%ld' expects type 'long int', but argument 6 has type 'long long unsigned int' make[1]: *** [arch/alpha/kernel/err_marvel.o] Error 1
make: *** [arch/alpha/kernel] Error 2

Attached is a completely untested patch. It just tries to get rid of u64 by replacing them with unsigned long.

Matt

arch/alpha/kernel/err_marvel.c +19 -19
index 52a79df..edf6f1a 100644
@@ -86,7 +86,7 @@ marvel_process_680_frame(struct ev7_lf_subpackets *lf_subpackets, int print)
 #ifdef CONFIG_VERBOSE_MCHECK
 
 static void
-marvel_print_err_cyc(u64 err_cyc)
+marvel_print_err_cyc(unsigned long err_cyc)
 {
 	static char *packet_desc[] = {
 		"No Error",
@@ -120,7 +120,7 @@ marvel_print_err_cyc(u64 err_cyc)
 }
 
 static void
-marvel_print_po7_crrct_sym(u64 crrct_sym)
+marvel_print_po7_crrct_sym(unsigned long crrct_sym)
 {
 #define IO7__PO7_CRRCT_SYM__SYN__S	(0)
 #define IO7__PO7_CRRCT_SYM__SYN__M	(0x7f)
@@ -129,14 +129,14 @@ marvel_print_po7_crrct_sym(u64 crrct_sym)
 
 
 	printk("%s      Correctable Error Symptoms:\n"
-	       "%s        Syndrome: 0x%llx\n",
+	       "%s        Syndrome: 0x%lx\n",
 	       err_print_prefix,
 	       err_print_prefix, EXTRACT(crrct_sym, IO7__PO7_CRRCT_SYM__SYN));
 	marvel_print_err_cyc(EXTRACT(crrct_sym, IO7__PO7_CRRCT_SYM__ERR_CYC));
 }
 
 static void
-marvel_print_po7_uncrr_sym(u64 uncrr_sym, u64 valid_mask)
+marvel_print_po7_uncrr_sym(unsigned long uncrr_sym, unsigned long valid_mask)
 {
 	static char *clk_names[] = { "_h[0]", "_h[1]", "_n[0]", "_n[1]" };
 	static char *clk_decode[] = {
@@ -186,7 +186,7 @@ marvel_print_po7_uncrr_sym(u64 uncrr_sym, u64 valid_mask)
 	uncrr_sym &= valid_mask;
 
 	if (EXTRACT(valid_mask, IO7__PO7_UNCRR_SYM__SYN))
-		printk("%s        Syndrome: 0x%llx\n",
+		printk("%s        Syndrome: 0x%lx\n",
 		       err_print_prefix, 
 		       EXTRACT(uncrr_sym, IO7__PO7_UNCRR_SYM__SYN));
 
@@ -273,7 +273,7 @@ marvel_print_po7_uncrr_sym(u64 uncrr_sym, u64 valid_mask)
 }
 
 static void
-marvel_print_po7_ugbge_sym(u64 ugbge_sym)
+marvel_print_po7_ugbge_sym(unsigned long ugbge_sym)
 {
 	char opcode_str[10];
 
@@ -307,7 +307,7 @@ marvel_print_po7_ugbge_sym(u64 ugbge_sym)
 		sprintf(opcode_str, "BlkIO");
 		break;
 	default:
-		sprintf(opcode_str, "0x%llx\n",
+		sprintf(opcode_str, "0x%lx\n",
 			EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_OPCODE));
 		break;
 	}
@@ -321,7 +321,7 @@ marvel_print_po7_ugbge_sym(u64 ugbge_sym)
 	       opcode_str);
 
 	if (0xC5 != EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_OPCODE))
-		printk("%s        Packet Offset 0x%08llx\n",
+		printk("%s        Packet Offset 0x%08lx\n",
 		       err_print_prefix,
 		       EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_PKT_OFF));
 }
@@ -329,7 +329,7 @@ marvel_print_po7_ugbge_sym(u64 ugbge_sym)
 static void
 marvel_print_po7_err_sum(struct ev7_pal_io_subpacket *io)
 {
-	u64	uncrr_sym_valid = 0;
+	unsigned long uncrr_sym_valid = 0;
 
 #define IO7__PO7_ERRSUM__CR_SBE		(1UL << 32)
 #define IO7__PO7_ERRSUM__CR_SBE2	(1UL << 33)
@@ -495,7 +495,7 @@ check_uncrr_sym:
 }
 
 static void
-marvel_print_pox_tlb_err(u64 tlb_err)
+marvel_print_pox_tlb_err(unsigned long tlb_err)
 {
 	static char *tlb_errors[] = {
 		"No Error",
@@ -515,9 +515,9 @@ marvel_print_pox_tlb_err(u64 tlb_err)
 	if (!(tlb_err & IO7__POX_TLBERR__ERR_VALID))
 		return;
 
-	printk("%s      TLB Error on index 0x%llx:\n"
+	printk("%s      TLB Error on index 0x%lx:\n"
 	       "%s        - %s\n"
-	       "%s        - Addr: 0x%016llx\n",
+	       "%s        - Addr: 0x%016lx\n",
 	       err_print_prefix,
 	       EXTRACT(tlb_err, IO7__POX_TLBERR__ERR_TLB_PTR),
 	       err_print_prefix,
@@ -527,7 +527,7 @@ marvel_print_pox_tlb_err(u64 tlb_err)
 }
 
 static  void
-marvel_print_pox_spl_cmplt(u64 spl_cmplt)
+marvel_print_pox_spl_cmplt(unsigned long spl_cmplt)
 {
 	char message[80];
 
@@ -579,7 +579,7 @@ marvel_print_pox_spl_cmplt(u64 spl_cmplt)
 		sprintf(message, "Uncorrectable Split Write Data Error");
 		break;
 	default:
-		sprintf(message, "%08llx\n",
+		sprintf(message, "%08lx\n",
 			EXTRACT(spl_cmplt, IO7__POX_SPLCMPLT__MESSAGE));
 		break;
 	}
@@ -587,7 +587,7 @@ marvel_print_pox_spl_cmplt(u64 spl_cmplt)
 }
 
 static void
-marvel_print_pox_trans_sum(u64 trans_sum)
+marvel_print_pox_trans_sum(unsigned long trans_sum)
 {
 	char *pcix_cmd[] = { "Interrupt Acknowledge",
 			     "Special Cycle",
@@ -620,9 +620,9 @@ marvel_print_pox_trans_sum(u64 trans_sum)
 		return;
 
 	printk("%s      Transaction Summary:\n"
-	       "%s        Command: 0x%llx - %s\n"
-	       "%s        Address: 0x%016llx%s\n"
-	       "%s        PCI-X Master Slot: 0x%llx\n",
+	       "%s        Command: 0x%lx - %s\n"
+	       "%s        Address: 0x%016lx%s\n"
+	       "%s        PCI-X Master Slot: 0x%lx\n",
 	       err_print_prefix, 
 	       err_print_prefix, 
 	       EXTRACT(trans_sum, IO7__POX_TRANSUM__PCIX_CMD),
@@ -635,7 +635,7 @@ marvel_print_pox_trans_sum(u64 trans_sum)
 }
 
 static void
-marvel_print_pox_err(u64 err_sum, struct ev7_pal_io_one_port *port)
+marvel_print_pox_err(unsigned long err_sum, struct ev7_pal_io_one_port *port)
 {
 #define IO7__POX_ERRSUM__AGP_REQQ_OVFL    (1UL <<  4)
 #define IO7__POX_ERRSUM__AGP_SYNC_ERR     (1UL <<  5)
#2 lore raw
Quoted 24 lines · Matt Turner
Quoted 14 lines · Raúl Porcel

If CONFIG_ALPHA_LEGACY_START_ADDRESS is not set, which is needed to be unset if the machine is Marvel/Titan/Wildfire, it fails to build:

CC arch/alpha/kernel/err_marvel.o
cc1: warnings being treated as errors arch/alpha/kernel/err_marvel.c: In function 'marvel_print_err_cyc':
arch/alpha/kernel/err_marvel.c:119: error: format '%ld' expects type 'long int', but argument 6 has type 'u64' arch/alpha/kernel/err_marvel.c: In function 'marvel_print_po7_ugbge_sym':
arch/alpha/kernel/err_marvel.c:321: error: format '%ld' expects type 'long int', but argument 4 has type 'u64' arch/alpha/kernel/err_marvel.c:321: error: format '%ld' expects type 'long int', but argument 5 has type 'u64' arch/alpha/kernel/err_marvel.c: In function 'marvel_print_pox_spl_cmplt':

Quoted 8 lines

arch/alpha/kernel/err_marvel.c:560: error: format '%ld' expects type 'long int', but argument 4 has type 'long long unsigned int' arch/alpha/kernel/err_marvel.c:560: error: format '%ld' expects type 'long int', but argument 5 has type 'long long unsigned int' arch/alpha/kernel/err_marvel.c:560: error: format '%ld' expects type 'long int', but argument 6 has type 'long long unsigned int' make[1]: *** [arch/alpha/kernel/err_marvel.o] Error 1
make: *** [arch/alpha/kernel] Error 2

Quoted 4 lines

Attached is a completely untested patch. It just tries to get rid of u64 by replacing them with unsigned long.

Matt

Patch made it compile. Unfortunately its not tested as the DS15 machine where it was needed its not a Marvel but a Titan.
--
To unsubscribe from this list: send the line "unsubscribe linux-alpha" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html