Skip to content

Commit

Permalink
sh64: Some symbol exports and build fixes.
Browse files Browse the repository at this point in the history
This fixes up misc build issues that were hit on the non-cayman
boards. Additionally, quite a few symbols needed to be exported
to fix the module build.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Oct 1, 2007
1 parent 6b3d7f0 commit 749c849
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 28 deletions.
1 change: 0 additions & 1 deletion arch/sh64/kernel/alphanum.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <linux/sched.h>

void mach_alphanum(int pos, unsigned char val);
void mach_led(int pos, int val);

void print_seg(char *file, int line)
{
Expand Down
4 changes: 3 additions & 1 deletion arch/sh64/kernel/pci-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/pci.h>
#include <linux/module.h>
#include <asm/io.h>

void *consistent_alloc(struct pci_dev *hwdev, size_t size,
Expand All @@ -36,6 +37,7 @@ void *consistent_alloc(struct pci_dev *hwdev, size_t size,

return vp;
}
EXPORT_SYMBOL(consistent_alloc);

void consistent_free(struct pci_dev *hwdev, size_t size,
void *vaddr, dma_addr_t dma_handle)
Expand All @@ -47,4 +49,4 @@ void consistent_free(struct pci_dev *hwdev, size_t size,

iounmap(vaddr);
}

EXPORT_SYMBOL(consistent_free);
26 changes: 8 additions & 18 deletions arch/sh64/kernel/sh_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,11 @@ extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);

/* platform dependent support */
EXPORT_SYMBOL(dump_fpu);
EXPORT_SYMBOL(iounmap);
EXPORT_SYMBOL(enable_irq);
EXPORT_SYMBOL(disable_irq);
EXPORT_SYMBOL(kernel_thread);

/* Networking helper routines. */
EXPORT_SYMBOL(csum_partial_copy_nocheck);

EXPORT_SYMBOL(strstr);

#ifdef CONFIG_VT
EXPORT_SYMBOL(screen_info);
#endif
Expand All @@ -50,27 +45,22 @@ EXPORT_SYMBOL(__down_trylock);
EXPORT_SYMBOL(__up);
EXPORT_SYMBOL(__put_user_asm_l);
EXPORT_SYMBOL(__get_user_asm_l);
EXPORT_SYMBOL(memcmp);
EXPORT_SYMBOL(memcpy);
EXPORT_SYMBOL(memset);
EXPORT_SYMBOL(memscan);
EXPORT_SYMBOL(strchr);
EXPORT_SYMBOL(strlen);

EXPORT_SYMBOL(udelay);
EXPORT_SYMBOL(__udelay);
EXPORT_SYMBOL(ndelay);
EXPORT_SYMBOL(__ndelay);
EXPORT_SYMBOL(flush_dcache_page);

/* For ext3 */
EXPORT_SYMBOL(sh64_page_clear);

/* Ugh. These come in from libgcc.a at link time. */

extern void __sdivsi3(void);
extern void __muldi3(void);
extern void __udivsi3(void);
#define DECLARE_EXPORT(name) extern void name(void);EXPORT_SYMBOL(name)
extern char __div_table;
EXPORT_SYMBOL(__sdivsi3);
EXPORT_SYMBOL(__muldi3);
EXPORT_SYMBOL(__udivsi3);
EXPORT_SYMBOL(__div_table);


DECLARE_EXPORT(__sdivsi3);
DECLARE_EXPORT(__muldi3);
DECLARE_EXPORT(__udivsi3);
3 changes: 2 additions & 1 deletion arch/sh64/lib/c-checksum.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <asm/byteorder.h>
#include <asm/uaccess.h>

Expand Down Expand Up @@ -110,7 +111,7 @@ static unsigned long do_csum(const unsigned char *buff, int len)
if (odd)
result = ((result >> 8) & 0xff) | ((result & 0xff) << 8);

pr_debug("\nCHECKSUM is 0x%x\n", result);
pr_debug("\nCHECKSUM is 0x%lx\n", result);

out:
return result;
Expand Down
10 changes: 5 additions & 5 deletions arch/sh64/lib/iomap.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ ioport_map(unsigned long port, unsigned int len)
{
return (void __iomem *)port;
}
EXPORT_SYMBOL(ioport_map);

void ioport_unmap(void __iomem *addr)
{
/* Nothing .. */
}
EXPORT_SYMBOL(ioport_unmap);

#ifdef CONFIG_PCI
void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max)
{
unsigned long start = pci_resource_start(dev, bar);
Expand All @@ -41,14 +44,11 @@ void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max)
/* What? */
return NULL;
}
EXPORT_SYMBOL(pci_iomap);

void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
{
/* Nothing .. */
}

EXPORT_SYMBOL(ioport_map);
EXPORT_SYMBOL(ioport_unmap);
EXPORT_SYMBOL(pci_iomap);
EXPORT_SYMBOL(pci_iounmap);

#endif
7 changes: 5 additions & 2 deletions arch/sh64/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/io.h>
#include <asm/pgalloc.h>
#include <asm/tlbflush.h>
#include <linux/ioport.h>
#include <linux/bootmem.h>
#include <linux/proc_fs.h>
#include <linux/module.h>
#include <asm/pgalloc.h>
#include <asm/tlbflush.h>

static void shmedia_mapioaddr(unsigned long, unsigned long);
static unsigned long shmedia_ioremap(struct resource *, u32, int);
Expand Down Expand Up @@ -80,6 +81,7 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag
}
return (void *) (offset + (char *)addr);
}
EXPORT_SYMBOL(__ioremap);

void iounmap(void *addr)
{
Expand All @@ -94,6 +96,7 @@ void iounmap(void *addr)

kfree(area);
}
EXPORT_SYMBOL(iounmap);

static struct resource shmedia_iomap = {
.name = "shmedia_iomap",
Expand Down

0 comments on commit 749c849

Please sign in to comment.