FRV: Permit compilation with allmodconfig
Subsystems (10)
cover FRV: Permit compilation with allmodconfig
The attached patches permit the FRV arch to be mostly compiled with allmodconfig, barring compiler errors.
PATCH 1/17 FRV: Suppress configuration of certain features for FRV
The attached patch suppresses configuration of certain features for the FRV arch as they can't be built for FRV at the moment:
(*) RTC
(*) HISAX_*
(*) PARPORT_PC
(*) VGA_CONSOLE
(*) BINFMT_ELF
---
warthog>diffstat -p1 frv-deconfig-2615.diff
drivers/char/Kconfig | 4 ++-- drivers/isdn/hisax/Kconfig | 10 +++++----- drivers/parport/Kconfig | 2 +- drivers/video/console/Kconfig | 2 +- fs/Kconfig.binfmt | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-)
drivers/char/Kconfig renamed from warthog/kernels/linux-2.6.15/drivers/char/Kconfig +2 -2
@@ -687,7 +687,7 @@ config NVRAM config RTC tristate "Enhanced Real Time Clock Support" - depends on !PPC32 && !PARISC && !IA64 && !M68K && (!SPARC || PCI) + depends on !PPC32 && !PARISC && !IA64 && !M68K && (!SPARC || PCI) && !FRV ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you
@@ -735,7 +735,7 @@ config SGI_IP27_RTC config GEN_RTC tristate "Generic /dev/rtc emulation" - depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC + depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC && !FRV ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you
drivers/isdn/hisax/Kconfig renamed from warthog/kernels/linux-2.6.15/drivers/isdn/hisax/Kconfig +5 -5
@@ -110,7 +110,7 @@ config HISAX_16_3 config HISAX_TELESPCI bool "Teles PCI" - depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K)) + depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || FRV)) help This enables HiSax support for the Teles PCI. See <file:Documentation/isdn/README.HiSax> on how to configure it.
@@ -238,7 +238,7 @@ config HISAX_MIC config HISAX_NETJET bool "NETjet card" - depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K)) + depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || FRV)) help This enables HiSax support for the NetJet from Traverse Technologies.
@@ -249,7 +249,7 @@ config HISAX_NETJET config HISAX_NETJET_U bool "NETspider U card" - depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K)) + depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || FRV)) help This enables HiSax support for the Netspider U interface ISDN card from Traverse Technologies.
@@ -317,7 +317,7 @@ config HISAX_GAZEL config HISAX_HFC_PCI bool "HFC PCI-Bus cards" - depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K)) + depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || FRV)) help This enables HiSax support for the HFC-S PCI 2BDS0 based cards.
@@ -344,7 +344,7 @@ config HISAX_HFC_SX config HISAX_ENTERNOW_PCI bool "Formula-n enter:now PCI card" - depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K)) + depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || FRV)) help This enables HiSax support for the Formula-n enter:now PCI ISDN card.
drivers/parport/Kconfig renamed from warthog/kernels/linux-2.6.15/drivers/parport/Kconfig +1 -1
@@ -34,7 +34,7 @@ config PARPORT config PARPORT_PC tristate "PC-style hardware" - depends on PARPORT && (!SPARC64 || PCI) && !SPARC32 && !M32R + depends on PARPORT && (!SPARC64 || PCI) && !SPARC32 && !M32R && !FRV ---help--- You should say Y here if you have a PC-style parallel port. All IBM PC compatible computers and some Alphas have PC-style
drivers/video/console/Kconfig renamed from warthog/kernels/linux-2.6.15/drivers/video/console/Kconfig +1 -1
@@ -6,7 +6,7 @@ menu "Console display driver support" config VGA_CONSOLE bool "VGA text console" if EMBEDDED || !X86 - depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC && !M68K && !PARISC && !ARCH_VERSATILE + depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && !ARCH_VERSATILE default y help Saying Y here will allow you to use Linux in text mode through a
fs/Kconfig.binfmt renamed from warthog/kernels/linux-2.6.15/fs/Kconfig.binfmt +1 -1
@@ -1,6 +1,6 @@ config BINFMT_ELF bool "Kernel support for ELF binaries" - depends on MMU + depends on MMU && (BROKEN || !FRV) default y ---help--- ELF (Executable and Linkable Format) is a format for libraries and
PATCH 2/17 FRV: Drop 8/16-bit xchg and cmpxchg
In reply to David HowellsThe attached patch drops support for 8-bit and 16-bit xchg and cmpxchg emulation and implements 32-bit xchg with the SWAP/SWAPI instruction.
---
warthog>diffstat -p1 frv-atomic-2615.diff
arch/frv/lib/atomic-ops.S | 92 -------------------------------------------- include/asm-frv/atomic.h | 96 ++-------------------------------------------- 2 files changed, 5 insertions(+), 183 deletions(-)
arch/frv/lib/atomic-ops.S renamed from warthog/kernels/linux-2.6.15/arch/frv/lib/atomic-ops.S +0 -92
@@ -129,48 +129,6 @@ atomic_sub_return: ############################################################################### # -# uint8_t __xchg_8(uint8_t i, uint8_t *v) -# -############################################################################### - .globl __xchg_8 - .type __xchg_8,@function -__xchg_8: - or.p gr8,gr8,gr10 -0: - orcc gr0,gr0,gr0,icc3 /* set ICC3.Z */ - ckeq icc3,cc7 - ldub.p @(gr9,gr0),gr8 /* LD.P/ORCR must be atomic */ - orcr cc7,cc7,cc3 /* set CC3 to true */ - cstb.p gr10,@(gr9,gr0) ,cc3,#1 - corcc gr29,gr29,gr0 ,cc3,#1 /* clear ICC3.Z if store happens */ - beq icc3,#0,0b - bralr - - .size __xchg_8, .-__xchg_8 - -############################################################################### -# -# uint16_t __xchg_16(uint16_t i, uint16_t *v) -# -############################################################################### - .globl __xchg_16 - .type __xchg_16,@function -__xchg_16: - or.p gr8,gr8,gr10 -0: - orcc gr0,gr0,gr0,icc3 /* set ICC3.Z */ - ckeq icc3,cc7 - lduh.p @(gr9,gr0),gr8 /* LD.P/ORCR must be atomic */ - orcr cc7,cc7,cc3 /* set CC3 to true */ - csth.p gr10,@(gr9,gr0) ,cc3,#1 - corcc gr29,gr29,gr0 ,cc3,#1 /* clear ICC3.Z if store happens */ - beq icc3,#0,0b - bralr - - .size __xchg_16, .-__xchg_16 - -############################################################################### -# # uint32_t __xchg_32(uint32_t i, uint32_t *v) # ###############################################################################
@@ -192,56 +150,6 @@ __xchg_32: ############################################################################### # -# uint8_t __cmpxchg_8(uint8_t *v, uint8_t test, uint8_t new) -# -############################################################################### - .globl __cmpxchg_8 - .type __cmpxchg_8,@function -__cmpxchg_8: - or.p gr8,gr8,gr11 -0: - orcc gr0,gr0,gr0,icc3 - ckeq icc3,cc7 - ldub.p @(gr11,gr0),gr8 - orcr cc7,cc7,cc3 - sub gr8,gr9,gr7 - sllicc gr7,#24,gr0,icc0 - bne icc0,#0,1f - cstb.p gr10,@(gr11,gr0) ,cc3,#1 - corcc gr29,gr29,gr0 ,cc3,#1 - beq icc3,#0,0b -1: - bralr - - .size __cmpxchg_8, .-__cmpxchg_8 - -############################################################################### -# -# uint16_t __cmpxchg_16(uint16_t *v, uint16_t test, uint16_t new) -# -############################################################################### - .globl __cmpxchg_16 - .type __cmpxchg_16,@function -__cmpxchg_16: - or.p gr8,gr8,gr11 -0: - orcc gr0,gr0,gr0,icc3 - ckeq icc3,cc7 - lduh.p @(gr11,gr0),gr8 - orcr cc7,cc7,cc3 - sub gr8,gr9,gr7 - sllicc gr7,#16,gr0,icc0 - bne icc0,#0,1f - csth.p gr10,@(gr11,gr0) ,cc3,#1 - corcc gr29,gr29,gr0 ,cc3,#1 - beq icc3,#0,0b -1: - bralr - - .size __cmpxchg_16, .-__cmpxchg_16 - -############################################################################### -# # uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new) # ###############################################################################
include/asm-frv/atomic.h renamed from warthog/kernels/linux-2.6.15/include/asm-frv/atomic.h +5 -91
147 lines not on this page · raw message
PATCH 3/17 FRV: Drop unsupported debugging features
In reply to David HowellsThe attached patch drops support for debugging features that aren't supported on FRV:
(*) EARLY_PRINTK
The on-chip UARTs are set up early enough that this isn't required, and VGA support isn't available. There's also a gdbstub available.
(*) DEBUG_PAGEALLOC
This can't be easily be done since we use huge static mappings to cover the kernel, not pages.
---
warthog>diffstat -p1 frv-debugging-2615.diff
arch/frv/Kconfig.debug | 22 ---------------------- 1 files changed, 22 deletions(-)
arch/frv/Kconfig.debug renamed from warthog/kernels/linux-2.6.15/arch/frv/Kconfig.debug +0 -22
@@ -2,32 +2,10 @@ menu "Kernel hacking" source "lib/Kconfig.debug" -config EARLY_PRINTK - bool "Early printk" - depends on EMBEDDED && DEBUG_KERNEL - default n - help - Write kernel log output directly into the VGA buffer or to a serial - port. - - This is useful for kernel debugging when your machine crashes very - early before the console code is initialized. For normal operation - it is not recommended because it looks ugly and doesn't cooperate - with klogd/syslogd or the X server. You should normally N here, - unless you want to debug such a crash. - config DEBUG_STACKOVERFLOW bool "Check for stack overflows" depends on DEBUG_KERNEL -config DEBUG_PAGEALLOC - bool "Page alloc debugging" - depends on DEBUG_KERNEL - help - Unmap pages from the kernel linear mapping after free_pages(). - This results in a large slowdown, but helps to find certain types - of memory corruptions. - config GDBSTUB bool "Remote GDB kernel debugging" depends on DEBUG_KERNEL
PATCH 4/17 FRV: Implement and export various things required by modules
In reply to David HowellsThe attached patch exports a number of features required to build all the modules. It also implements the following simple features:
(*) csum_partial_copy_from_user() for MMU as well as no-MMU.
(*) __ucmpdi2().
so that they can be exported too.
---
warthog>diffstat -p1 frv-exports-2615.diff
arch/frv/kernel/frv_ksyms.c | 25 +++++++++++++----- arch/frv/kernel/irq.c | 17 ++++++++++++ arch/frv/kernel/pm.c | 2 + arch/frv/kernel/time.c | 3 ++ arch/frv/kernel/traps.c | 3 ++ arch/frv/kernel/uaccess.c | 7 +++++ arch/frv/lib/Makefile | 2 - arch/frv/lib/__ucmpdi2.S | 45 ++++++++++++++++++++++++++++++++++ arch/frv/lib/checksum.c | 31 ++++++++++++++++++----- arch/frv/mb93090-mb00/pci-dma-nommu.c | 8 ++++++ arch/frv/mb93090-mb00/pci-dma.c | 10 +++++++ arch/frv/mm/cache-page.c | 5 +++ arch/frv/mm/highmem.c | 8 ++++++ lib/find_next_bit.c | 3 ++ 14 files changed, 155 insertions(+), 14 deletions(-)
arch/frv/kernel/frv_ksyms.c renamed from warthog/kernels/linux-2.6.15/arch/frv/kernel/frv_ksyms.c +18 -7
@@ -16,10 +16,11 @@#include <asm/semaphore.h> #include <asm/checksum.h> #include <asm/hardirq.h> -#include <asm/current.h> +#include <asm/cacheflush.h> extern void dump_thread (struct pt_regs *,struct user *);extern long __memcpy_user (void *dst,const void *src,size_t count); +extern long __memset_user (void *dst,const void *src,size_t count);/* platform dependent support */
@@ -50,7 +51,11 @@ EXPORT_SYMBOL(disable_irq);EXPORT_SYMBOL (__res_bus_clock_speed_HZ);EXPORT_SYMBOL (__page_offset);EXPORT_SYMBOL (__memcpy_user); -EXPORT_SYMBOL (flush_dcache_page); +EXPORT_SYMBOL (__memset_user); +EXPORT_SYMBOL (frv_dcache_writeback); +EXPORT_SYMBOL (frv_cache_invalidate); +EXPORT_SYMBOL (frv_icache_invalidate); +EXPORT_SYMBOL (frv_cache_wback_inv);#ifndef CONFIG_MMU EXPORT_SYMBOL (memory_start);
@@ -72,6 +77,9 @@ EXPORT_SYMBOL(memcmp);EXPORT_SYMBOL (memscan);EXPORT_SYMBOL (memmove); +EXPORT_SYMBOL (__outsl_ns); +EXPORT_SYMBOL (__insl_ns); +EXPORT_SYMBOL (get_wchan);#ifdef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
@@ -80,14 +88,13 @@ EXPORT_SYMBOL(atomic_test_and_OR_mask);EXPORT_SYMBOL (atomic_test_and_XOR_mask);EXPORT_SYMBOL (atomic_add_return);EXPORT_SYMBOL (atomic_sub_return); -EXPORT_SYMBOL (__xchg_8); -EXPORT_SYMBOL (__xchg_16);EXPORT_SYMBOL (__xchg_32); -EXPORT_SYMBOL (__cmpxchg_8); -EXPORT_SYMBOL (__cmpxchg_16);EXPORT_SYMBOL (__cmpxchg_32);#endif +EXPORT_SYMBOL (__debug_bug_printk); +EXPORT_SYMBOL (__delay_loops_MHz); +/* * libgcc functions - functions that are used internally by the * compiler... (prototypes are not correct though, but that
@@ -101,6 +108,8 @@ extern void __divdi3(void);extern void __lshrdi3 (void );extern void __moddi3 (void );extern void __muldi3 (void ); +extern void __mulll (void ); +extern void __umulll (void );extern void __negdi2 (void );extern void __ucmpdi2 (void );extern void __udivdi3 (void );
@@ -116,8 +125,10 @@ EXPORT_SYMBOL(__ashrdi3);EXPORT_SYMBOL (__lshrdi3);//EXPORT_SYMBOL(__moddi3); EXPORT_SYMBOL (__muldi3); +EXPORT_SYMBOL (__mulll); +EXPORT_SYMBOL (__umulll);EXPORT_SYMBOL (__negdi2); -//EXPORT_SYMBOL(__ucmpdi2); +EXPORT_SYMBOL (__ucmpdi2);//EXPORT_SYMBOL(__udivdi3); //EXPORT_SYMBOL(__udivmoddi4); //EXPORT_SYMBOL(__umoddi3);
arch/frv/kernel/irq.c renamed from warthog/kernels/linux-2.6.15/arch/frv/kernel/irq.c +17 -0
@@ -32,6 +32,7 @@#include <linux/irq.h> #include <linux/proc_fs.h> #include <linux/seq_file.h> +#include <linux/module.h> #include <asm/atomic.h> #include <asm/io.h>
@@ -178,6 +179,8 @@ void disable_irq_nosync(unsigned int irqspin_unlock_irqrestore (&level->lock, flags); } +EXPORT_SYMBOL (disable_irq_nosync); +/** * disable_irq - disable an irq and wait for completion * @irq: Interrupt to disable
@@ -204,6 +207,8 @@ void disable_irq(unsigned int irq)#endif } +EXPORT_SYMBOL (disable_irq); +/** * enable_irq - enable handling of an irq * @irq: Interrupt to enable
@@ -268,6 +273,8 @@ void enable_irq(unsigned int irq)spin_unlock_irqrestore (&level->lock, flags); } +EXPORT_SYMBOL (enable_irq); +/*****************************************************************************/ /* * handles all normal device IRQ's
@@ -425,6 +432,8 @@ int request_irq(unsigned int irq,return retval; } +EXPORT_SYMBOL (request_irq); +/** * free_irq - free an interrupt * @irq: Interrupt line to free
@@ -496,6 +505,8 @@ void free_irq(unsigned int irq, void *de } } +EXPORT_SYMBOL (free_irq); +/* * IRQ autodetection code.. *
@@ -519,6 +530,8 @@ unsigned long probe_irq_on(void)return 0 ; } +EXPORT_SYMBOL (probe_irq_on); +/* * Return a mask of triggered interrupts (this * can handle only legacy ISA interrupts).
@@ -542,6 +555,8 @@ unsigned int probe_irq_mask(unsigned lonreturn 0 ; } +EXPORT_SYMBOL (probe_irq_mask); +/* * Return the one interrupt that triggered (this can * handle any interrupt source).
@@ -571,6 +586,8 @@ int probe_irq_off(unsigned long xmask)return -1 ; } +EXPORT_SYMBOL (probe_irq_off); +/* this was setup_x86_irq but it seems pretty generic */ int setup_irq (unsigned int irq,struct irqaction *new) {
arch/frv/kernel/pm.c renamed from warthog/kernels/linux-2.6.15/arch/frv/kernel/pm.c +2 -0
@@ -13,6 +13,7 @@#include <linux/config.h> #include <linux/init.h> +#include <linux/module.h> #include <linux/pm.h> #include <linux/pm_legacy.h> #include <linux/sched.h>
@@ -27,6 +28,7 @@#include "local.h" void (*pm_power_off)(void ); +EXPORT_SYMBOL (pm_power_off);extern void frv_change_cmode (int );
arch/frv/kernel/time.c renamed from warthog/kernels/linux-2.6.15/arch/frv/kernel/time.c +3 -0
@@ -189,6 +189,8 @@ void do_gettimeofday(struct timeval *tv) tv->tv_usec = usec; } +EXPORT_SYMBOL (do_gettimeofday); +int do_settimeofday (struct timespec *tv) {time_t wtm_sec, sec = tv->tv_sec;
@@ -218,6 +220,7 @@ int do_settimeofday(struct timespec *tv)clock_was_set ();return 0 ; } +EXPORT_SYMBOL (do_settimeofday);/*
arch/frv/kernel/traps.c renamed from warthog/kernels/linux-2.6.15/arch/frv/kernel/traps.c +3 -0
@@ -19,6 +19,7 @@#include <linux/string.h> #include <linux/linkage.h> #include <linux/init.h> +#include <linux/module.h> #include <asm/setup.h> #include <asm/fpu.h>
@@ -250,6 +251,8 @@ void dump_stack(void)show_stack (NULL ,NULL ); } +EXPORT_SYMBOL (dump_stack); +void show_stack (struct task_struct *task,unsigned long *sp) { }
arch/frv/kernel/uaccess.c renamed from warthog/kernels/linux-2.6.15/arch/frv/kernel/uaccess.c +7 -0
@@ -10,6 +10,7 @@*/ #include <linux/mm.h> +#include <linux/module.h> #include <asm/uaccess.h> /*****************************************************************************/
@@ -58,8 +59,11 @@ long strncpy_from_user(char *dst, constmemset (p,0 , count);/* clear remainder of buffer [security] */ return err; + }/* end strncpy_from_user() */ +EXPORT_SYMBOL (strncpy_from_user); +/*****************************************************************************/ /* * Return the size of a string (including the ending 0)
@@ -92,4 +96,7 @@ long strnlen_user(const char *src, long }return p - src +1 ;/* return length including NUL */ + }/* end strnlen_user() */ + +EXPORT_SYMBOL (strnlen_user);
arch/frv/lib/checksum.c renamed from warthog/kernels/linux-2.6.15/arch/frv/lib/checksum.c +25 -6
@@ -33,6 +33,7 @@#include <net/checksum.h> #include <asm/checksum.h> +#include <linux/module.h> static inline unsigned short from32to16 (unsigned long x) {
@@ -115,34 +116,52 @@ unsigned int csum_partial(const unsignedreturn result; } +EXPORT_SYMBOL (csum_partial); +/* * this routine is used for miscellaneous IP-like checksums, mainly * in icmp.c */ unsigned short ip_compute_csum (const unsigned char * buff,int len) { -return ~do_csum (buff,len); +return ~do_csum (buff, len); } +EXPORT_SYMBOL (ip_compute_csum); +/* * copy from fs while checksumming, otherwise like csum_partial */ -unsigned int -csum_partial_copy_from_user (const char *src,char *dst,int len,int sum,int *csum_err) +csum_partial_copy_from_user (const char __user *src,char *dst, +int len,int sum,int *csum_err) { -if (csum_err) *csum_err =0 ; -memcpy (dst, src, len); +int rem; + +if (csum_err) + *csum_err =0 ; + + rem =copy_from_user (dst, src, len); +if (rem !=0 ) { +if (csum_err) + *csum_err = -EFAULT ; +memset (dst + len - rem,0 , rem); + len = rem; + } +return csum_partial (dst, len, sum); } +EXPORT_SYMBOL (csum_partial_copy_from_user); +/* * copy from ds while checksumming, otherwise like csum_partial */ -unsigned int csum_partial_copy (const char *src,char *dst,int len,int sum) {memcpy (dst, src, len);return csum_partial (dst, len, sum); } + +EXPORT_SYMBOL (csum_partial_copy);
arch/frv/lib/Makefile renamed from warthog/kernels/linux-2.6.15/arch/frv/lib/Makefile +1 -1
@@ -3,6 +3,6 @@ # lib-y := \ - __ashldi3.o __lshrdi3.o __muldi3.o __ashrdi3.o __negdi2.o \ + __ashldi3.o __lshrdi3.o __muldi3.o __ashrdi3.o __negdi2.o __ucmpdi2.o \ checksum.o memcpy.o memset.o atomic-ops.o \ outsl_ns.o outsl_sw.o insl_ns.o insl_sw.o cache.o
arch/frv/lib/__ucmpdi2.S renamed from warthog/kernels/linux-2.6.15/arch/frv/lib/__ucmpdi2.S +45 -0
45 lines not on this page · raw message
arch/frv/mb93090-mb00/pci-dma.c renamed from warthog/kernels/linux-2.6.15/arch/frv/mb93090-mb00/pci-dma.c +10 -0
@@ -28,11 +28,15 @@ void *dma_alloc_coherent(struct device *return ret; } +EXPORT_SYMBOL (dma_alloc_coherent); +void dma_free_coherent (struct device *hwdev,size_t size,void *vaddr,dma_addr_t dma_handle) {consistent_free (vaddr); } +EXPORT_SYMBOL (dma_free_coherent); +/* * Map a single buffer of the indicated size for DMA in streaming mode. * The 32-bit bus address to use is returned.
@@ -51,6 +55,8 @@ dma_addr_t dma_map_single(struct devicereturn virt_to_bus (ptr); } +EXPORT_SYMBOL (dma_map_single); +/* * Map a set of buffers described by scatterlist in streaming * mode for DMA. This is the scather-gather version of the
@@ -96,6 +102,8 @@ int dma_map_sg(struct device *dev, strucreturn nents; } +EXPORT_SYMBOL (dma_map_sg); +dma_addr_t dma_map_page (struct device *dev,struct page *page,unsigned long offset,size_t size,enum dma_data_direction direction) {
@@ -103,3 +111,5 @@ dma_addr_t dma_map_page(struct device *dflush_dcache_page (page);return (dma_addr_t )page_to_phys (page) + offset; } + +EXPORT_SYMBOL (dma_map_page);
arch/frv/mb93090-mb00/pci-dma-nommu.c renamed from warthog/kernels/linux-2.6.15/arch/frv/mb93090-mb00/pci-dma-nommu.c +8 -0
@@ -83,6 +83,8 @@ void *dma_alloc_coherent(struct device *return NULL ; } +EXPORT_SYMBOL (dma_alloc_coherent); +void dma_free_coherent (struct device *hwdev,size_t size,void *vaddr,dma_addr_t dma_handle) {struct dma_alloc_record *rec;
@@ -102,6 +104,8 @@ void dma_free_coherent(struct device *hwBUG (); } +EXPORT_SYMBOL (dma_free_coherent); +/* * Map a single buffer of the indicated size for DMA in streaming mode. * The 32-bit bus address to use is returned.
@@ -120,6 +124,8 @@ dma_addr_t dma_map_single(struct devicereturn virt_to_bus (ptr); } +EXPORT_SYMBOL (dma_map_single); +/* * Map a set of buffers described by scatterlist in streaming * mode for DMA. This is the scather-gather version of the
@@ -150,3 +156,5 @@ int dma_map_sg(struct device *dev, strucreturn nents; } + +EXPORT_SYMBOL (dma_map_sg);
arch/frv/mm/cache-page.c renamed from warthog/kernels/linux-2.6.15/arch/frv/mm/cache-page.c +5 -0
@@ -11,6 +11,7 @@#include <linux/sched.h> #include <linux/mm.h> #include <linux/highmem.h> +#include <linux/module.h> #include <asm/pgalloc.h> /*****************************************************************************/
@@ -38,6 +39,8 @@ void flush_dcache_page(struct page *page }/* end flush_dcache_page() */ +EXPORT_SYMBOL (flush_dcache_page); +/*****************************************************************************/ /* * ICI takes a virtual address and the page may not currently have one
@@ -64,3 +67,5 @@ void flush_icache_user_range(struct vm_a } }/* end flush_icache_user_range() */ + +EXPORT_SYMBOL (flush_icache_user_range);
arch/frv/mm/highmem.c renamed from warthog/kernels/linux-2.6.15/arch/frv/mm/highmem.c +8 -0
@@ -9,6 +9,7 @@* 2 of the License, or (at your option) any later version. */ #include <linux/highmem.h> +#include <linux/module.h> void *kmap (struct page *page) {
@@ -18,6 +19,8 @@ void *kmap(struct page *page)return kmap_high (page); } +EXPORT_SYMBOL (kmap); +void kunmap (struct page *page) {if (in_interrupt ())
@@ -27,7 +30,12 @@ void kunmap(struct page *page)kunmap_high (page); } +EXPORT_SYMBOL (kunmap); +struct page *kmap_atomic_to_page (void *ptr) {return virt_to_page (ptr); } + + +EXPORT_SYMBOL (kmap_atomic_to_page);
lib/find_next_bit.c renamed from warthog/kernels/linux-2.6.15/lib/find_next_bit.c +3 -0
@@ -10,6 +10,7 @@*/ #include <linux/bitops.h> +#include <linux/module.h> int find_next_bit (const unsigned long *addr,int size,int offset) {
@@ -53,3 +54,5 @@ int find_next_bit(const unsigned long *areturn offset; } + +EXPORT_SYMBOL (find_next_bit);
PATCH 5/17 FRV: Support module exception tables
In reply to David HowellsThe attached patch fixes the exception table handling so that modules exceptions are dealt with.
---
warthog>diffstat -p1 frv-extab-2615.diff
arch/frv/mm/extable.c | 34 +++++++++------------------------- 1 files changed, 9 insertions(+), 25 deletions(-)
arch/frv/mm/extable.c renamed from warthog/kernels/linux-2.6.15/arch/frv/mm/extable.c +9 -25
@@ -43,7 +43,7 @@ static inline unsigned long search_one_t*/ unsigned long search_exception_table (unsigned long pc) { -unsigned long ret =0 ; +const struct exception_table_entry *extab;/* determine if the fault lay during a memcpy_user or a memset_user */ if (__frame->lr == (unsigned long) &__memset_user_error_lr &&
@@ -55,9 +55,10 @@ unsigned long search_exception_table(uns*/ return (unsigned long ) &__memset_user_error_handler; } -else if (__frame->lr == (unsigned long ) &__memcpy_user_error_lr && - (unsigned long ) &memcpy <= pc && pc < (unsigned long ) &__memcpy_end - ) { + +if (__frame->lr == (unsigned long ) &__memcpy_user_error_lr && + (unsigned long ) &memcpy <= pc && pc < (unsigned long ) &__memcpy_end + ) {/* the fault occurred in a protected memset * - we search for the return address (in LR) instead of the program counter * - it was probably during a copy_to/from_user()
@@ -65,27 +66,10 @@ unsigned long search_exception_table(unsreturn (unsigned long ) &__memcpy_user_error_handler; } -#ifndef CONFIG_MODULES -/* there is only the kernel to search. */ - ret =search_one_table (__start___ex_table, __stop___ex_table -1 , pc); -return ret; - -#else -/* the kernel is the last "module" -- no need to treat it special */ -unsigned long flags; -struct module *mp; + extab =search_exception_tables (pc); +if (extab) +return extab->fixup; -spin_lock_irqsave (&modlist_lock, flags); - -for (mp = module_list; mp !=NULL ; mp = mp->next) { -if (mp->ex_table_start ==NULL || !(mp->flags & (MOD_RUNNING |MOD_INITIALIZING ))) -continue ; - ret =search_one_table (mp->ex_table_start, mp->ex_table_end -1 , pc); -if (ret) -break ; - } +return 0 ; -spin_unlock_irqrestore (&modlist_lock, flags); -return ret; -#endif }/* end search_exception_table() */
PATCH 6/17 FRV: Supply various missing I/O access primitives
In reply to David HowellsThe attached patch supplies various I/O access primitives that are missing for the FRV arch:
(*) mmiowb()
(*) read*_relaxed()
(*) ioport_*map()
(*) ioread*(), iowrite*(), ioread*_rep() and iowrite*_rep()
(*) pci_io*map()
(*) check_signature()
The patch also makes __is_PCI_addr() more efficient.
---
warthog>diffstat -p1 frv-io-2615.diff
include/asm-frv/io.h | 123 ++++++++++++++++++++++++++++++++++++++++++++++ include/asm-frv/mb-regs.h | 4 + 2 files changed, 127 insertions(+)
include/asm-frv/io.h renamed from warthog/kernels/linux-2.6.15/include/asm-frv/io.h +123 -0
@@ -18,6 +18,7 @@#ifdef __KERNEL__#include <linux/config.h> +#include <linux/types.h> #include <asm/virtconvert.h> #include <asm/string.h> #include <asm/mb-regs.h>
@@ -104,6 +105,8 @@ static inline void __insl(unsigned long__insl_sw (addr, buf, len); } +#define mmiowb () mb() +/* * make the short names macros so specific devices * can override them as required
@@ -209,6 +212,10 @@ static inline uint32_t readl(const volatreturn ret; } +#define readb_relaxed readb +#define readw_relaxed readw +#define readl_relaxed readl +static inline void writeb (uint8_t datum,volatile void __iomem *addr) {__builtin_write8 ((volatile uint8_t __force *) addr, datum);
@@ -268,11 +275,106 @@ static inline void __iomem *ioremap_fullextern void iounmap (void __iomem *addr); +static inline void __iomem *ioport_map (unsigned long port,unsigned int nr) +{ +return (void __iomem *) port; +} + +static inline void ioport_unmap (void __iomem *p) +{ +} +static inline void flush_write_buffers (void ) { __asm__ __volatile__ ("membar" : : :"memory" ); } +/* +* do appropriate I/O accesses for token type +*/ +static inline unsigned int ioread8 (void __iomem *p) +{ +return __builtin_read8 (p); +} + +static inline unsigned int ioread16 (void __iomem *p) +{ +uint16_t ret =__builtin_read16 (p); +if (__is_PCI_addr (p)) + ret =_swapw (ret); +return ret; +} + +static inline unsigned int ioread32 (void __iomem *p) +{ +uint32_t ret =__builtin_read32 (p); +if (__is_PCI_addr (p)) + ret =_swapl (ret); +return ret; +} + +static inline void iowrite8 (u8 val,void __iomem *p) +{ +__builtin_write8 (p, val); +if (__is_PCI_MEM (p)) +__flush_PCI_writes (); +} + +static inline void iowrite16 (u16 val,void __iomem *p) +{ +if (__is_PCI_addr (p)) + val =_swapw (val); +__builtin_write16 (p, val); +if (__is_PCI_MEM (p)) +__flush_PCI_writes (); +} + +static inline void iowrite32 (u32 val,void __iomem *p) +{ +if (__is_PCI_addr (p)) + val =_swapl (val); +__builtin_write32 (p, val); +if (__is_PCI_MEM (p)) +__flush_PCI_writes (); +} + +static inline void ioread8_rep (void __iomem *p,void *dst,unsigned long count) +{ +io_insb ((unsigned long ) p, dst, count); +} + +static inline void ioread16_rep (void __iomem *p,void *dst,unsigned long count) +{ +io_insw ((unsigned long ) p, dst, count); +} + +static inline void ioread32_rep (void __iomem *p,void *dst,unsigned long count) +{ +__insl_ns ((unsigned long ) p, dst, count); +} + +static inline void iowrite8_rep (void __iomem *p,const void *src,unsigned long count) +{ +io_outsb ((unsigned long ) p, src, count); +} + +static inline void iowrite16_rep (void __iomem *p,const void *src,unsigned long count) +{ +io_outsw ((unsigned long ) p, src, count); +} + +static inline void iowrite32_rep (void __iomem *p,const void *src,unsigned long count) +{ +__outsl_ns ((unsigned long ) p, src, count); +} + +/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ +struct pci_dev ; +extern void __iomem *pci_iomap (struct pci_dev *dev,int bar,unsigned long max); +static inline void pci_iounmap (struct pci_dev *dev,void __iomem *p) +{ +} +/* * Convert a physical pointer to a virtual kernel pointer for /dev/mem
@@ -284,6 +386,27 @@ static inline void flush_write_buffers(v* Convert a virtual cached pointer to an uncached pointer */ #define xlate_dev_kmem_ptr (p) p + +/* +* Check BIOS signature +*/ +static inline int check_signature (volatile void __iomem *io_addr, +const unsigned char *signature,int length) +{ +int retval =0 ; + +do { +if (readb (io_addr) != *signature) + goto out; + io_addr++; + signature++; + length--; + }while (length); + + retval =1 ; +out: +return retval; +}#endif /* __KERNEL__ */
include/asm-frv/mb-regs.h renamed from warthog/kernels/linux-2.6.15/include/asm-frv/mb-regs.h +4 -0
@@ -68,6 +68,9 @@ do { \#define __is_PCI_MEM (addr) \ ((unsigned long)(addr) - __region_PCI_MEM < 0x08000000UL) +#define __is_PCI_addr (addr) \ + ((unsigned long)(addr) - __region_PCI_IO < 0x0c000000UL) +#define __get_CLKSW () ({ *(volatile unsigned long *)(__region_CS2 + 0x0130000cUL) & 0xffUL; })#define __get_CLKIN () (__get_CLKSW() * 125U * 100000U / 24U)
@@ -149,6 +152,7 @@ do { \#define __is_PCI_IO (addr) 0/* no PCI */ #define __is_PCI_MEM (addr) 0 +#define __is_PCI_addr (addr) 0#define __region_PCI_IO 0#define __region_PCI_MEM 0#define __flush_PCI_writes () do { } while(0)
PATCH 7/17 FRV: Add module support stubs
In reply to David HowellsThe attached patch adds stubs for FRV module support.
---
warthog>diffstat -p1 frv-modules-2615.diff
arch/frv/kernel/Makefile | 1 arch/frv/kernel/module.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++ include/asm-frv/module.h | 16 +++++++-- 3 files changed, 93 insertions(+), 4 deletions(-)
arch/frv/kernel/Makefile renamed from warthog/kernels/linux-2.6.15/arch/frv/kernel/Makefile +1 -0
@@ -20,3 +20,4 @@ obj-$(CONFIG_FUJITSU_MB93493) += irq-mb9 obj-$(CONFIG_PM) += pm.o cmode.o obj-$(CONFIG_MB93093_PDK) += pm-mb93093.o obj-$(CONFIG_SYSCTL) += sysctl.o +obj-$(CONFIG_MODULES) += module.o
arch/frv/kernel/module.c renamed from warthog/kernels/linux-2.6.15/arch/frv/kernel/module.c +80 -0
80 lines not on this page · raw message
include/asm-frv/module.h renamed from warthog/kernels/linux-2.6.15/include/asm-frv/module.h +12 -4
@@ -11,10 +11,18 @@#ifndef _ASM_MODULE_H#define _ASM_MODULE_H -#define module_map (x) vmalloc(x) -#define module_unmap (x) vfree(x) -#define module_arch_init (x) (0) -#define arch_init_modules (x) do { } while (0) +struct mod_arch_specific +{ +}; + +#define Elf_Shdr Elf32_Shdr +#define Elf_Sym Elf32_Sym +#define Elf_Ehdr Elf32_Ehdr + +/* +* Include the architecture version. +*/ +#define MODULE_ARCH_VERMAGIC __stringify(PROCESSOR_MODEL_NAME) " "#endif /* _ASM_MODULE_H */
PATCH 8/17 FRV: Add pci_iomap
In reply to David HowellsThe attached patch implements pci_iomap() for FRV.
---
warthog>diffstat -p1 frv-pci-iomap-2615.diff
arch/frv/mb93090-mb00/Makefile | 2 +- arch/frv/mb93090-mb00/pci-iomap.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-)
arch/frv/mb93090-mb00/Makefile renamed from warthog/kernels/linux-2.6.15/arch/frv/mb93090-mb00/Makefile +1 -1
@@ -3,7 +3,7 @@ # ifeq "$(CONFIG_PCI)" "y" -obj-y := pci-frv.o pci-irq.o pci-vdk.o +obj-y := pci-frv.o pci-irq.o pci-vdk.o pci-iomap.o ifeq "$(CONFIG_MMU)" "y" obj-y += pci-dma.o
arch/frv/mb93090-mb00/pci-iomap.c renamed from warthog/kernels/linux-2.6.15/arch/frv/mb93090-mb00/pci-iomap.c +29 -0
@@ -0,0 +1,29 @@ +/* pci-iomap.c: description +* +* Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. +* Written by David Howells ([email protected]) +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version +* 2 of the License, or (at your option) any later version. +*/ +#include <linux/pci.h> +#include <linux/module.h> + +void __iomem *pci_iomap (struct pci_dev *dev,int bar,unsigned long maxlen) +{ +unsigned long start =pci_resource_start (dev, bar); +unsigned long len =pci_resource_len (dev, bar); +unsigned long flags =pci_resource_flags (dev, bar); + +if (!len || !start) +return NULL ; + +if ((flags &IORESOURCE_IO ) || (flags &IORESOURCE_MEM )) +return (void __iomem *) start; + +return NULL ; +} + +EXPORT_SYMBOL (pci_iomap);
PATCH 9/17 FRV: Fix PCMCIA configuration
In reply to David HowellsThe attached patch fixes PCMCIA configuration for FRV by including the stock PCMCIA configuration description file.
---
warthog>diffstat -p1 frv-pcmcia-2615.diff
arch/frv/Kconfig | 18 +----------------- 1 files changed, 1 insertion(+), 17 deletions(-)
arch/frv/Kconfig renamed from warthog/kernels/linux-2.6.15/arch/frv/Kconfig +1 -17
@@ -305,23 +310,7 @@ config RESERVE_DMA_COHERENT source "drivers/pci/Kconfig" -config PCMCIA - tristate "Use PCMCIA" - help - Say Y here if you want to attach PCMCIA- or PC-cards to your FR-V - board. These are credit-card size devices such as network cards, - modems or hard drives often used with laptops computers. There are - actually two varieties of these cards: the older 16 bit PCMCIA cards - and the newer 32 bit CardBus cards. If you want to use CardBus - cards, you need to say Y here and also to "CardBus support" below. - - To use your PC-cards, you will need supporting software from David - Hinds pcmcia-cs package (see the file <file:Documentation/Changes> - for location). Please also read the PCMCIA-HOWTO, available from - <http://www.tldp.org/docs.html#howto>. - - To compile this driver as modules, choose M here: the - modules will be called pcmcia_core and ds. +source "drivers/pcmcia/Kconfig" #config MATH_EMULATION # bool "Math emulation support (EXPERIMENTAL)"
PATCH 10/17 FRV: Force serial driver inclusion
In reply to David HowellsThe attached patch forces the 8230 serial driver to be built in if the on-CPU UARTs are to be used. It can't be used as a module because the arch setup needs to call into it.
---
warthog>diffstat -p1 frv-serial-2615.diff
arch/frv/Kconfig | 5 +++++ arch/frv/kernel/setup.c | 2 ++ 2 files changed, 7 insertions(+)
arch/frv/Kconfig renamed from warthog/kernels/linux-2.6.15/arch/frv/Kconfig +5 -0
@@ -274,6 +274,11 @@ config GPREL_DATA_NONE endchoice +config FRV_ONCPU_SERIAL + bool "Use on-CPU serial ports" + select SERIAL_8250 + default y + config PCI bool "Use PCI" depends on MB93090_MB00
arch/frv/kernel/setup.c renamed from warthog/kernels/linux-2.6.15/arch/frv/kernel/setup.c +2 -0
@@ -787,6 +787,7 @@ void __init setup_arch(char **cmdline_p)#endif /* register those serial ports that are available */ +#ifdef CONFIG_FRV_ONCPU_SERIAL #ifndef CONFIG_GDBSTUB_UART0 __reg (UART0_BASE +UART_IER *8 ) =0 ;early_serial_setup (&__frv_uart0);
@@ -795,6 +796,7 @@ void __init setup_arch(char **cmdline_p)__reg (UART1_BASE +UART_IER *8 ) =0 ;early_serial_setup (&__frv_uart1);#endif +#endif #if defined(CONFIG_CHR_DEV_FLASH ) || defined(CONFIG_BLK_DEV_FLASH )/* we need to initialize the Flashrom device here since we might
PATCH 11/17 FRV: Make get_user macro cast pointers
In reply to David HowellsThe attached patch makes the get_user macro cast the source pointer to an appropriate type for the specified size.
---
warthog>diffstat -p1 frv-uaccess-2615.diff
include/asm-frv/uaccess.h | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
include/asm-frv/uaccess.h renamed from warthog/kernels/linux-2.6.15/include/asm-frv/uaccess.h +4 -4
@@ -180,16 +180,16 @@ do { \ \switch (sizeof (*(ptr))) { \case 1 : \ -__get_user_asm (__gu_err, __gu_val, ptr,"ub" ,"=r" ); \ +__get_user_asm (__gu_err, *(u8 *)&__gu_val, ptr,"ub" ,"=r" ); \break ; \case 2 : \ -__get_user_asm (__gu_err, __gu_val, ptr,"uh" ,"=r" ); \ +__get_user_asm (__gu_err, *(u16 *)&__gu_val, ptr,"uh" ,"=r" ); \break ; \case 4 : \ -__get_user_asm (__gu_err, __gu_val, ptr,"" ,"=r" ); \ +__get_user_asm (__gu_err, *(u32 *)&__gu_val, ptr,"" ,"=r" ); \break ; \case 8 : \ -__get_user_asm (__gu_err, __gu_val, ptr,"d" ,"=e" ); \ +__get_user_asm (__gu_err, *(u64 *)&__gu_val, ptr,"d" ,"=e" ); \break ; \default : \ __gu_err =__get_user_bad (); \
PATCH 12/17 FRV: Miscellaneous changes
In reply to David HowellsThe attached patch fixes a number of miscellanous items:
(1) Declare lock sections in the linker script.
(2) Recurse in the correct manner in the arch makefile.
(3) asm/bug.h requires asm/linkage.h to be included first. One C file puts asm/bug.h first.
(4) Add an empty RTC header file to avoid missing header file errors.
(5) sg_dma_address() should use the dma_address member of a scatter list.
(6) Add trivial pci_unmap support.
(7) Add pgprot_noncached()
(8) Discard u_quad_t.
(9) Use ~0UL rather than ULONG_MAX in unistd.h in case the latter isn't declared.
(10) Add an empty VGA header file to avoid missing header file errors.
(11) Add an XOR header file to use the generic XOR stuff.
---
warthog>diffstat -p1 frv-misc-2615.diff
arch/frv/Makefile | 6 +++--- arch/frv/kernel/vmlinux.lds.S | 1 + include/asm-frv/bug.h | 1 + include/asm-frv/dma-mapping.h | 2 +- include/asm-frv/mc146818rtc.h | 16 ++++++++++++++++ include/asm-frv/pci.h | 8 ++++++++ include/asm-frv/pgtable.h | 5 +++++ include/asm-frv/types.h | 1 - include/asm-frv/unistd.h | 2 +- include/asm-frv/vga.h | 17 +++++++++++++++++ include/asm-frv/xor.h | 1 + 11 files changed, 54 insertions(+), 6 deletions(-)
arch/frv/kernel/vmlinux.lds.S renamed from warthog/kernels/linux-2.6.15/arch/frv/kernel/vmlinux.lds.S +1 -0
@@ -112,6 +112,7 @@ SECTIONS #endif ) SCHED_TEXT + LOCK_TEXT *(.fixup) *(.gnu.warning) *(.exitcall.exit)
arch/frv/Makefile renamed from warthog/kernels/linux-2.6.15/arch/frv/Makefile +3 -3
@@ -109,10 +109,10 @@ bootstrap: $(Q)$(MAKEBOOT) bootstrap archmrproper: - $(Q)$(MAKE) -C arch/frv/boot mrproper + $(Q)$(MAKE) $(build)=arch/frv/boot mrproper archclean: - $(Q)$(MAKE) -C arch/frv/boot clean + $(Q)$(MAKE) $(build)=arch/frv/boot clean archdep: scripts/mkdep symlinks - $(Q)$(MAKE) -C arch/frv/boot dep + $(Q)$(MAKE) $(build)=arch/frv/boot dep
include/asm-frv/bug.h renamed from warthog/kernels/linux-2.6.15/include/asm-frv/bug.h +1 -0
@@ -12,6 +12,7 @@#define _ASM_BUG_H#include <linux/config.h> +#include <linux/linkage.h> #ifdef CONFIG_BUG /*
include/asm-frv/mc146818rtc.h renamed from warthog/kernels/linux-2.6.15/include/asm-frv/mc146818rtc.h +16 -0
@@ -0,0 +1,16 @@ +/* mc146818rtc.h: RTC defs +* +* Copyright (C) 2005 Red Hat, Inc. All Rights Reserved. +* Written by David Howells ([email protected]) +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version +* 2 of the License, or (at your option) any later version. +*/ + +#ifndef _ASM_MC146818RTC_H +#define _ASM_MC146818RTC_H + + +#endif /* _ASM_MC146818RTC_H */
include/asm-frv/dma-mapping.h renamed from warthog/kernels/linux-2.6.15/include/asm-frv/dma-mapping.h +1 -1
@@ -23,7 +23,7 @@ void dma_free_coherent(struct device *de* returns, or alternatively stop on the first sg_dma_len(sg) which * is 0. */ -#define sg_dma_address (sg) ((unsigned long) (page_to_phys((sg)->page) + (sg)->offset)) +#define sg_dma_address (sg) ((sg)->dma_address)#define sg_dma_len (sg) ((sg)->length)/*
include/asm-frv/pci.h renamed from warthog/kernels/linux-2.6.15/include/asm-frv/pci.h +8 -0
@@ -57,6 +57,14 @@ extern void pci_free_consistent(struct p*/ #define PCI_DMA_BUS_IS_PHYS (1) +/* pci_unmap_{page,single} is a nop so... */ +#define DECLARE_PCI_UNMAP_ADDR (ADDR_NAME ) +#define DECLARE_PCI_UNMAP_LEN (LEN_NAME ) +#define pci_unmap_addr (PTR ,ADDR_NAME ) (0) +#define pci_unmap_addr_set (PTR ,ADDR_NAME ,VAL ) do { } while (0) +#define pci_unmap_len (PTR ,LEN_NAME ) (0) +#define pci_unmap_len_set (PTR ,LEN_NAME ,VAL ) do { } while (0) +#ifdef CONFIG_PCI static inline void pci_dma_burst_advice(struct pci_dev *pdev, enum pci_dma_burst_strategy *strat,
include/asm-frv/pgtable.h renamed from warthog/kernels/linux-2.6.15/include/asm-frv/pgtable.h +5 -0
@@ -421,6 +421,11 @@ static inline void ptep_set_wrprotect(st }/* +* Macro to mark a page protection value as "uncacheable" +*/ +#define pgprot_noncached (prot) (__pgprot(pgprot_val(prot) | _PAGE_NOCACHE)) + +/* * Conversion functions: convert a page and protection to a page entry, * and a page entry and page directory to the page they refer to. */
include/asm-frv/types.h renamed from warthog/kernels/linux-2.6.15/include/asm-frv/types.h +0 -1
@@ -59,7 +59,6 @@ typedef unsigned int u32;typedef signed long long s64 ;typedef unsigned long long u64 ; -typedef u64 u_quad_t ;/* Dma addresses are 32-bits wide. */
include/asm-frv/unistd.h renamed from warthog/kernels/linux-2.6.15/include/asm-frv/unistd.h +1 -1
@@ -313,7 +313,7 @@ do { \unsigned long __sr2 = (res); \if (__builtin_expect (__sr2 >= (unsigned long )(-4095 ),0 )) { \ errno = (-__sr2); \ - __sr2 =ULONG_MAX ; \ + __sr2 = ~0UL ; \ } \return (type ) __sr2; \ }while (0 )
include/asm-frv/vga.h renamed from warthog/kernels/linux-2.6.15/include/asm-frv/vga.h +17 -0
@@ -0,0 +1,17 @@ +/* vga.h: VGA register stuff +* +* Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. +* Written by David Howells ([email protected]) +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version +* 2 of the License, or (at your option) any later version. +*/ + +#ifndef _ASM_VGA_H +#define _ASM_VGA_H + + + +#endif /* _ASM_VGA_H */
include/asm-frv/xor.h renamed from warthog/kernels/linux-2.6.15/include/asm-frv/xor.h +1 -0
@@ -0,0 +1 @@ +#include <asm-generic/xor.h>
PATCH 13/17 FRV: Fix uninitialised variable in atm nicstar driver
In reply to David HowellsThe attached patch fixes an uninitialised variable warning in the atm nicstar driver.
---
warthog>diffstat -p1 atm-nicstar-2615.diff
drivers/atm/nicstar.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/atm/nicstar.c renamed from warthog/kernels/linux-2.6.15/drivers/atm/nicstar.c +2 -3
@@ -2126,8 +2126,7 @@ static void process_rsq(ns_dev *card)if (!ns_rsqe_valid (card->rsq.next))return ; -while (ns_rsqe_valid (card->rsq.next)) - { + do { dequeue_rx(card, card->rsq.next); ns_rsqe_init(card->rsq.next); previous = card->rsq.next;
@@ -2135,7 +2134,7 @@ static void process_rsq(ns_dev *card) card->rsq.next = card->rsq.base; else card->rsq.next++; - } + }while (ns_rsqe_valid (card->rsq.next));writel ((((u32 ) previous) - ((u32 ) card->rsq.base)), card->membase +RSQH ); }
PATCH 14/17 FRV: Stop the IEEE1394 nodemanager from accessing sem count directly
In reply to David HowellsThe attached patch stops the IEEE1394 nodemanager from accessing the internals of a semaphore directly. On the FRV arch, what it does does not work, and there's a macro for doing what it wants.
---
warthog>diffstat -p1 ieee1394-2615.diff
drivers/ieee1394/nodemgr.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/ieee1394/nodemgr.c renamed from warthog/kernels/linux-2.6.15/drivers/ieee1394/nodemgr.c +1 -1
@@ -284,7 +284,7 @@ static DEVICE_ATTR(bus_options,S_IRUGO,fstatic ssize_t fw_show_ne_tlabels_free (struct device *dev,struct device_attribute *attr,char *buf) { struct node_entry *ne = container_of(dev, struct node_entry, device); -return sprintf (buf,"%d\n" ,atomic_read (&ne->tpool->count.count) +1 ); +return sprintf (buf,"%d\n" ,sem_getcount (&ne->tpool->count) +1 ); } static DEVICE_ATTR(tlabels_free,S_IRUGO,fw_show_ne_tlabels_free,NULL);
PATCH 15/17 FRV: Export __rcuref_hash
In reply to David HowellsThe attached patch exports __rcuref_hash which is required by some modules.
---
warthog>diffstat -p1 rcu-export-2615.diff
kernel/rcupdate.c | 1 + 1 files changed, 1 insertion(+)
kernel/rcupdate.c renamed from warthog/kernels/linux-2.6.15/kernel/rcupdate.c +1 -0
@@ -564,3 +564,4 @@ EXPORT_SYMBOL(call_rcu); /* WARNING: GPEXPORT_SYMBOL (call_rcu_bh);/* WARNING: GPL-only in April 2006. */ EXPORT_SYMBOL_GPL (synchronize_rcu);EXPORT_SYMBOL (synchronize_kernel);/* WARNING: GPL-only in April 2006. */ +EXPORT_SYMBOL_GPL (__rcuref_hash);
Eric Dumazet
NAKRe: [PATCH 15/17] FRV: Export __rcuref_hash
Quoted 12 lines · David Howells
The attached patch exports
__rcuref_hashwhich is required by some modules.Signed-off-by David Howells <[email protected]>---
warthog>diffstat -p1 rcu-export-2615.diffkernel/rcupdate.c | 1 + 1 files changed, 1 insertion(+)diff -uNrp /warthog/kernels/linux-2.6.15/kernel/rcupdate.c
linux-2.6.15-frv/kernel/rcupdate.c
kernel/rcupdate.c EXPORT_SYMBOL(call_rcu); /* WARNING: GP · line 567
Quoted 4 lines
kernel/rcupdate.c renamed from warthog/kernels/linux-2.6.15/kernel/rcupdate.c +1
-0@@ -564,3 +564,4 @@ EXPORT_SYMBOL(call_rcu); /* WARNING: GPEXPORT_SYMBOL (call_rcu_bh);/* WARNING: GPL-only in April 2006. */ EXPORT_SYMBOL_GPL (synchronize_rcu);EXPORT_SYMBOL (synchronize_kernel);/* WARNING: GPL-only in April 2006. */ +EXPORT_SYMBOL_GPL (__rcuref_hash);
NACK
This break all platforms were __HAVE_ARCH_CMPXCHG is defined, since they have no __rcuref_hash
Eric
PATCH 16/17 FRV: Fix uninitialised variable in serverworks driver
In reply to David HowellsThe attached patch fixes an uninitialised variable warning in the serverworks driver.
---
warthog>diffstat -p1 serverworks-2615.diff
drivers/ide/pci/serverworks.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/ide/pci/serverworks.c renamed from warthog/kernels/linux-2.6.15/drivers/ide/pci/serverworks.c +1 -1
@@ -69,7 +69,7 @@ static int check_in_drive_lists (ide_dristatic u8 svwks_ratemask (ide_drive_t *drive) {struct pci_dev *dev =HWIF (drive)->pci_dev; -u8 mode; +u8 mode =0 ;if (!svwks_revision)pci_read_config_byte (dev,PCI_REVISION_ID , &svwks_revision);
PATCH 17/17 FRV: Stop XFS from accessing sem count directly
In reply to David HowellsThe attached patch stops the XFS from accessing the internals of a semaphore directly. On the FRV arch, which XFS does does not work. This alternative implementation was supplied by Al Viro.
If Ingo Molnar's mutexes are going to be accepted into the kernel, then this patch should be dropped.
---
warthog>diffstat -p1 xfs-sema-2615.diff
fs/xfs/linux-2.6/sema.h | 5 ++++- fs/xfs/quota/xfs_dquot.h | 4 ++-- fs/xfs/quota/xfs_dquot_item.c | 4 ++-- fs/xfs/xfs_iget.c | 2 +- fs/xfs/xfs_inode.c | 4 ++-- fs/xfs/xfs_inode_item.c | 6 +++--- 6 files changed, 14 insertions(+), 11 deletions(-)
fs/xfs/linux-2.6/sema.h renamed from warthog/kernels/linux-2.6.15/fs/xfs/linux-2.6/sema.h +4 -1
@@ -34,8 +34,11 @@ typedef struct semaphore sema_t;#define initnsema (sp, val, name) sema_init(sp, val)#define psema (sp, b) down(sp)#define vsema (sp) up(sp) -#define valusema (sp) (atomic_read(&(sp)->count))#define freesema (sema) +static inline int sem_is_locked (sema_t *sp) +{ +return down_trylock (sp) || (up (sp),0 ); +}/* * Map cpsema (try to get the sema) to down_trylock. We need to switch
fs/xfs/quota/xfs_dquot.h renamed from warthog/kernels/linux-2.6.15/fs/xfs/quota/xfs_dquot.h +2 -2
@@ -119,7 +119,7 @@ XFS_DQ_IS_LOCKED(xfs_dquot_t *dqp)*/ #define xfs_dqflock (dqp) { psema(&((dqp)->q_flock), PINOD | PRECALC);\ (dqp)->dq_flags |= XFS_DQ_FLOCKED; } -#define xfs_dqfunlock (dqp) { ASSERT(valusema(&((dqp)->q_flock)) <= 0); \ +#define xfs_dqfunlock (dqp) { ASSERT(sem_is_locked(&((dqp)->q_flock))); \ vsema(&((dqp)->q_flock)); \ (dqp)->dq_flags &= ~(XFS_DQ_FLOCKED); }
@@ -128,7 +128,7 @@ XFS_DQ_IS_LOCKED(xfs_dquot_t *dqp)#define XFS_DQ_PINUNLOCK (dqp, s) mutex_spinunlock( \ &(XFS_DQ_TO_QINF(dqp)->qi_pinlock), s) -#define XFS_DQ_IS_FLUSH_LOCKED (dqp) (valusema(&((dqp)->q_flock)) <= 0) +#define XFS_DQ_IS_FLUSH_LOCKED (dqp) (sem_is_locked(&((dqp)->q_flock)))#define XFS_DQ_IS_ON_FREELIST (dqp) ((dqp)->dq_flnext != (dqp))#define XFS_DQ_IS_DIRTY (dqp) ((dqp)->dq_flags & XFS_DQ_DIRTY)#define XFS_QM_ISUDQ (dqp) ((dqp)->dq_flags & XFS_DQ_USER)
fs/xfs/quota/xfs_dquot_item.c renamed from warthog/kernels/linux-2.6.15/fs/xfs/quota/xfs_dquot_item.c +2 -2
@@ -246,7 +246,7 @@ xfs_qm_dquot_logitem_pushbuf(* inode flush completed and the inode was taken off the AIL. * So, just get out. */ -if ((valusema (&(dqp->q_flock)) >0 ) || +if (!sem_is_locked (&(dqp->q_flock)) || ((qip->qli_item.li_flags &XFS_LI_IN_AIL ) ==0 )) { qip->qli_pushbuf_flag =0 ;xfs_dqunlock (dqp);
@@ -259,7 +259,7 @@ xfs_qm_dquot_logitem_pushbuf(if (bp !=NULL ) {if (XFS_BUF_ISDELAYWRITE (bp)) { dopush = ((qip->qli_item.li_flags &XFS_LI_IN_AIL ) && - (valusema (&(dqp->q_flock)) <=0 )); +sem_is_locked (&(dqp->q_flock))); qip->qli_pushbuf_flag =0 ;xfs_dqunlock (dqp);
fs/xfs/xfs_iget.c renamed from warthog/kernels/linux-2.6.15/fs/xfs/xfs_iget.c +1 -1
@@ -1041,6 +1041,6 @@ xfs_iflock_nowait(xfs_inode_t *ip)void xfs_ifunlock (xfs_inode_t *ip) { -ASSERT (valusema (&(ip->i_flock)) <=0 ); +ASSERT (sem_is_locked (&(ip->i_flock)));vsema (&(ip->i_flock)); }
fs/xfs/xfs_inode.c renamed from warthog/kernels/linux-2.6.15/fs/xfs/xfs_inode.c +2 -2
@@ -3061,7 +3061,7 @@ xfs_iflush(XFS_STATS_INC (xs_iflush_count);ASSERT (ismrlocked (&ip->i_lock,MR_UPDATE |MR_ACCESS )); -ASSERT (valusema (&ip->i_flock) <=0 ); +ASSERT (sem_is_locked (&(ip->i_flock)));ASSERT (ip->i_d.di_format !=XFS_DINODE_FMT_BTREE || ip->i_d.di_nextents > ip->i_df.if_ext_max);
@@ -3319,7 +3319,7 @@ xfs_iflush_int(SPLDECL (s);ASSERT (ismrlocked (&ip->i_lock,MR_UPDATE |MR_ACCESS )); -ASSERT (valusema (&ip->i_flock) <=0 ); +ASSERT (sem_is_locked (&(ip->i_flock)));ASSERT (ip->i_d.di_format !=XFS_DINODE_FMT_BTREE || ip->i_d.di_nextents > ip->i_df.if_ext_max);
fs/xfs/xfs_inode_item.c renamed from warthog/kernels/linux-2.6.15/fs/xfs/xfs_inode_item.c +3 -3
@@ -789,7 +789,7 @@ xfs_inode_item_pushbuf(* inode flush completed and the inode was taken off the AIL. * So, just get out. */ -if ((valusema (&(ip->i_flock)) >0 ) || +if (!sem_is_locked (&(ip->i_flock)) || ((iip->ili_item.li_flags &XFS_LI_IN_AIL ) ==0 )) { iip->ili_pushbuf_flag =0 ;xfs_iunlock (ip,XFS_ILOCK_SHARED );
@@ -811,7 +811,7 @@ xfs_inode_item_pushbuf(* If not, we can flush it async. */ dopush = ((iip->ili_item.li_flags &XFS_LI_IN_AIL ) && - (valusema (&(ip->i_flock)) <=0 )); +sem_is_locked (&(ip->i_flock))); iip->ili_pushbuf_flag =0 ;xfs_iunlock (ip,XFS_ILOCK_SHARED );xfs_buftrace ("INODE ITEM PUSH" , bp);
@@ -859,7 +859,7 @@ xfs_inode_item_push( ip = iip->ili_inode;ASSERT (ismrlocked (&(ip->i_lock),MR_ACCESS )); -ASSERT (valusema (&(ip->i_flock)) <=0 ); +ASSERT (sem_is_locked (&(ip->i_flock)));/* * Since we were able to lock the inode's flush lock and * we found it on the AIL, the inode must be dirty. This
Quoted 2 lines · David Howells
The attached patches permit the FRV arch to be mostly compiled with allmodconfig, barring compiler errors.
What are the required and known working gcc and binutils versions for that?
Thanks,
Jan