public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] alpha build fixes
@ 2005-03-19  4:34 Jeff Garzik
  2005-03-19 23:11 ` Richard Henderson
  0 siblings, 1 reply; 14+ messages in thread
From: Jeff Garzik @ 2005-03-19  4:34 UTC (permalink / raw)
  To: Andrew Morton, Richard Henderson, Dave Jones, Greg KH,
	chas williams - CONTRACTOR, Leendert van Doorn, Reiner Sailer
  Cc: Linux Kernel

[-- Attachment #1: Type: text/plain, Size: 181 bytes --]

Needed this to build Fedora rawhide kernel (2.6.12-rc1 + some patches) 
on alpha.  This is the upstream portion of the build fixes.

Signed-off-by: Jeff Garzik <jgarzik@pobox.com>


[-- Attachment #2: kernel-build1.patch --]
[-- Type: text/x-patch, Size: 2566 bytes --]

diff -urN ../kernel-2.6.11.orig/linux-2.6.11/drivers/char/agp/generic.c linux-2.6.11/drivers/char/agp/generic.c
--- ../kernel-2.6.11.orig/linux-2.6.11/drivers/char/agp/generic.c	2005-03-18 16:45:23.000000000 -0500
+++ linux-2.6.11/drivers/char/agp/generic.c	2005-03-18 18:34:00.000000000 -0500
@@ -35,6 +35,7 @@
 #include <linux/pm.h>
 #include <linux/agp_backend.h>
 #include <linux/vmalloc.h>
+#include <linux/dma-mapping.h>
 #include <linux/mm.h>
 #include <asm/io.h>
 #include <asm/cacheflush.h>
diff -urN ../kernel-2.6.11.orig/linux-2.6.11/include/asm-alpha/pci.h linux-2.6.11/include/asm-alpha/pci.h
--- ../kernel-2.6.11.orig/linux-2.6.11/include/asm-alpha/pci.h	2005-03-02 02:38:34.000000000 -0500
+++ linux-2.6.11/include/asm-alpha/pci.h	2005-03-18 18:39:31.000000000 -0500
@@ -223,6 +223,12 @@
 	/* Nothing to do. */
 }
 
+/* TODO: integrate with include/asm-generic/pci.h ? */
+static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
+{
+	return channel ? 15 : 14;
+}
+
 extern void pcibios_resource_to_bus(struct pci_dev *, struct pci_bus_region *,
 				    struct resource *);
 
diff -urN ../kernel-2.6.11.orig/linux-2.6.11/include/linux/debugfs.h linux-2.6.11/include/linux/debugfs.h
--- ../kernel-2.6.11.orig/linux-2.6.11/include/linux/debugfs.h	2005-03-02 02:38:33.000000000 -0500
+++ linux-2.6.11/include/linux/debugfs.h	2005-03-18 18:14:12.000000000 -0500
@@ -15,6 +15,8 @@
 #ifndef _DEBUGFS_H_
 #define _DEBUGFS_H_
 
+#include <linux/fs.h>
+
 #if defined(CONFIG_DEBUG_FS)
 struct dentry *debugfs_create_file(const char *name, mode_t mode,
 				   struct dentry *parent, void *data,
diff -ur ../kernel-2.6.11.orig/linux-2.6.11/drivers/atm/lanai.c linux-2.6.11/drivers/atm/lanai.c
--- ../kernel-2.6.11.orig/linux-2.6.11/drivers/atm/lanai.c	2005-03-18 20:06:31.000000000 -0500
+++ linux-2.6.11/drivers/atm/lanai.c	2005-03-18 20:36:19.000000000 -0500
@@ -61,6 +61,7 @@
 #include <asm/byteorder.h>
 #include <linux/spinlock.h>
 #include <linux/pci.h>
+#include <linux/dma-mapping.h>
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
diff -ur ../kernel-2.6.11.orig/linux-2.6.11/drivers/char/tpm/tpm.h linux-2.6.11/drivers/char/tpm/tpm.h
--- ../kernel-2.6.11.orig/linux-2.6.11/drivers/char/tpm/tpm.h	2005-03-18 20:06:31.000000000 -0500
+++ linux-2.6.11/drivers/char/tpm/tpm.h	2005-03-18 20:50:31.000000000 -0500
@@ -22,6 +22,7 @@
 #include <linux/version.h>
 #include <linux/pci.h>
 #include <linux/delay.h>
+#include <linux/fs.h>
 #include <linux/miscdevice.h>
 
 #define TPM_TIMEOUT msecs_to_jiffies(5)

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: [PATCH] alpha build fixes
@ 2005-03-23 13:49 Matthew Wilcox
  0 siblings, 0 replies; 14+ messages in thread
From: Matthew Wilcox @ 2005-03-23 13:49 UTC (permalink / raw)
  To: Alan Cox, linux-kernel


[I'm not subscribed, please excuse the thread-breaking]

Alan Cox wrote:
> > +static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
> > +{
> > + return channel ? 15 : 14;
> > +}
> 
> The issue is bigger - it's needed for the CMD controllers on PA-RISC for
> example it appears - and anything else where IDE legacy IRQ is wired
> oddly.

The built-in IDE controller on the Astro/Elroy based PA-RISC workstations
(B1000, C3000, J5000 and similar) is part of a NS87560 chip.  By default
(and we don't currently touch this), we route the internal interrupts
to Linux interrupts 14 and 15.  We could change that, but I don't currently
see a need to, since we're "the same as x86".  It uses the ns87415 driver.

I don't know what the situation is with the zx1-based boxes, currently only
the C8000.  If it's the same as the ia64 zx1 boxes, it'll have a CMD 649.

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [patch] alpha: build fixes
@ 2007-12-13  9:21 Ivan Kokshaysky
  0 siblings, 0 replies; 14+ messages in thread
From: Ivan Kokshaysky @ 2007-12-13  9:21 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Richard Henderson, linux-kernel

This fixes some of the alpha-specific build problems, except a) modpost
warning about COMMON symbol "saved_config" and b) nasty final link
failure with gcc-4.x, -Os and scsi-disk driver configured built-in
(due to jump table in .rodata referencing discarded .exit.text).

- build failure with gcc-4.2.x: fix up casts in cia_io* routines to avoid
  warnings ('discards qualifiers from pointer target type'), which are
  failures, thanks to -Werror;
- modpost warnings: add missing __init qualifier for titan and marvel;
  for non-generic build, move machine vectors from .data to .data.init.refok
  section;
- unbreak CPU-specific optimization: rearrange cpuflags-y assignments
  so that extended -mcpu value (ev56, pca56, ev67) overrides basic
  one (ev5, ev6) and not vice versa.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>

Ivan.

--- 2.6.24-rc5/arch/alpha/Makefile	2007-12-04 13:08:46.000000000 +0300
+++ linux/arch/alpha/Makefile	2007-12-04 13:24:22.000000000 +0300
@@ -14,13 +14,13 @@ LDFLAGS_vmlinux	:= -static -N #-relax
 CHECKFLAGS	+= -D__alpha__ -m64
 cflags-y	:= -pipe -mno-fp-regs -ffixed-8 -msmall-data
 
-cpuflags-$(CONFIG_ALPHA_EV67)		:= -mcpu=ev67
-cpuflags-$(CONFIG_ALPHA_EV6)		:= -mcpu=ev6
+cpuflags-$(CONFIG_ALPHA_EV4)		:= -mcpu=ev4
+cpuflags-$(CONFIG_ALPHA_EV5)		:= -mcpu=ev5
+cpuflags-$(CONFIG_ALPHA_EV56)		:= -mcpu=ev56
 cpuflags-$(CONFIG_ALPHA_POLARIS)	:= -mcpu=pca56
 cpuflags-$(CONFIG_ALPHA_SX164)		:= -mcpu=pca56
-cpuflags-$(CONFIG_ALPHA_EV56)		:= -mcpu=ev56
-cpuflags-$(CONFIG_ALPHA_EV5)		:= -mcpu=ev5
-cpuflags-$(CONFIG_ALPHA_EV4)		:= -mcpu=ev4
+cpuflags-$(CONFIG_ALPHA_EV6)		:= -mcpu=ev6
+cpuflags-$(CONFIG_ALPHA_EV67)		:= -mcpu=ev67
 # If GENERIC, make sure to turn off any instruction set extensions that
 # the host compiler might have on by default.  Given that EV4 and EV5
 # have the same instruction set, prefer EV5 because an EV5 schedule is
--- 2.6.24-rc5/include/asm-alpha/io_trivial.h	2007-10-10 00:31:38.000000000 +0400
+++ linux/include/asm-alpha/io_trivial.h	2007-12-04 14:30:13.000000000 +0300
@@ -72,25 +72,29 @@ IO_CONCAT(__IO_PREFIX,writew)(u16 b, vol
 __EXTERN_INLINE u8
 IO_CONCAT(__IO_PREFIX,readb)(const volatile void __iomem *a)
 {
-	return IO_CONCAT(__IO_PREFIX,ioread8)((void __iomem *)a);
+	void __iomem *addr = (void __iomem *)a;
+	return IO_CONCAT(__IO_PREFIX,ioread8)(addr);
 }
 
 __EXTERN_INLINE u16
 IO_CONCAT(__IO_PREFIX,readw)(const volatile void __iomem *a)
 {
-	return IO_CONCAT(__IO_PREFIX,ioread16)((void __iomem *)a);
+	void __iomem *addr = (void __iomem *)a;
+	return IO_CONCAT(__IO_PREFIX,ioread16)(addr);
 }
 
 __EXTERN_INLINE void
 IO_CONCAT(__IO_PREFIX,writeb)(u8 b, volatile void __iomem *a)
 {
-	IO_CONCAT(__IO_PREFIX,iowrite8)(b, (void __iomem *)a);
+	void __iomem *addr = (void __iomem *)a;
+	IO_CONCAT(__IO_PREFIX,iowrite8)(b, addr);
 }
 
 __EXTERN_INLINE void
 IO_CONCAT(__IO_PREFIX,writew)(u16 b, volatile void __iomem *a)
 {
-	IO_CONCAT(__IO_PREFIX,iowrite16)(b, (void __iomem *)a);
+	void __iomem *addr = (void __iomem *)a;
+	IO_CONCAT(__IO_PREFIX,iowrite16)(b, addr);
 }
 #endif
 
--- 2.6.24-rc5/arch/alpha/kernel/err_marvel.c	Thu Dec  6 14:33:58 2007
+++ linux/arch/alpha/kernel/err_marvel.c	Thu Dec  6 20:14:17 2007
@@ -1152,7 +1152,7 @@ marvel_machine_check(u64 vector, u64 la_
 	mb();
 }
 
-void
+void __init
 marvel_register_error_handlers(void)
 {
 	ev7_register_error_handlers();
--- 2.6.24-rc5/arch/alpha/kernel/machvec_impl.h	Wed Oct 10 00:31:38 2007
+++ linux/arch/alpha/kernel/machvec_impl.h	Thu Dec  6 12:14:57 2007
@@ -134,7 +134,7 @@
 #define __initmv __initdata
 #define ALIAS_MV(x)
 #else
-#define __initmv
+#define __initmv __initdata_refok
 
 /* GCC actually has a syntax for defining aliases, but is under some
    delusion that you shouldn't be able to declare it extern somewhere
--- 2.6.24-rc5/arch/alpha/kernel/err_titan.c	Thu Dec  6 02:11:54 2007
+++ linux/arch/alpha/kernel/err_titan.c	Thu Dec  6 20:03:15 2007
@@ -564,7 +564,7 @@ static struct el_subpacket_handler titan
 	SUBPACKET_HANDLER_INIT(EL_CLASS__REGATTA_FAMILY, 
 			       el_process_regatta_subpacket);
 
-void
+void __init
 titan_register_error_handlers(void)
 {
 	size_t i;
--- 2.6.24-rc5/arch/alpha/kernel/err_ev7.c	Wed Oct 10 00:31:38 2007
+++ linux/arch/alpha/kernel/err_ev7.c	Thu Dec  6 20:02:28 2007
@@ -273,7 +273,7 @@ ev7_process_pal_subpacket(struct el_subp
 struct el_subpacket_handler ev7_pal_subpacket_handler =
 	SUBPACKET_HANDLER_INIT(EL_CLASS__PAL, ev7_process_pal_subpacket);
 
-void
+void __init
 ev7_register_error_handlers(void)
 {
 	int i;

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2007-12-13  9:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-19  4:34 [PATCH] alpha build fixes Jeff Garzik
2005-03-19 23:11 ` Richard Henderson
2005-03-19 23:16   ` Jeff Garzik
2005-03-21  8:05     ` Bartlomiej Zolnierkiewicz
2005-03-21  9:16       ` Ivan Kokshaysky
2005-03-21  9:45         ` Bartlomiej Zolnierkiewicz
2005-03-21 12:27           ` Benjamin Herrenschmidt
2005-03-21 13:53             ` Ivan Kokshaysky
2005-03-21 23:27               ` Benjamin Herrenschmidt
2005-03-21 14:52   ` Alan Cox
2005-03-21 18:16     ` Richard Henderson
2005-03-21 18:22       ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2005-03-23 13:49 Matthew Wilcox
2007-12-13  9:21 [patch] alpha: " Ivan Kokshaysky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox