export m8xx_cpm_hostalloc
PATCH 1/1 export m8xx_cpm_hostalloc
Hi Tom,
to build an i2c driver as a module, m8xx_cpm_hostalloc must be exported. We are using a driver which is not in the kernel tree[1]. I tried to merge the in-kernel i2c driver with it, but I failed and don't have the time to investigate why our driver works with the dbox2 board and the in-kernel driver doesn't.
This function has been exported in 2.4. Is it ok to do that for 2.6, too?
Regards,
Andreas
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Forgot to attach the patch, so here it is.
# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/07/23 15:13:53+02:00 [email protected]
# export m8xx_cpm_hostalloc for modularized i2c driver
#
# arch/ppc/8xx_io/commproc.c # 2004/07/23 15:13:33+02:00 [email protected] +2 -0 # export m8xx_cpm_hostalloc for modularized i2c driver # diff -Nru a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c --- a/arch/ppc/8xx_io/commproc.c 2004-07-23 15:31:13 +02:00 +++ b/arch/ppc/8xx_io/commproc.c 2004-07-23 15:31:13 +02:00 @@ -327,6 +327,8 @@ return(retloc); }
+EXPORT_SYMBOL(m8xx_cpm_hostalloc);
+
/* Set a baud rate generator. This needs lots of work. There are
* four BRGs, any of which can be wired to any channel.
* The internal baud rate clock is the system clock divided by 16.
Quoted 10 lines · Andreas Oberritter
Hi Tom,
to build an i2c driver as a module,
m8xx_cpm_hostallocmust be exported. We are using a driver which is not in the kernel tree[1]. I tried to merge the in-kernel i2c driver with it, but I failed and don't have the time to investigate why our driver works with the dbox2 board and the in-kernel driver doesn't.This function has been exported in 2.4. Is it ok to do that for 2.6, too?
Must the driver use hostalloc? I didn't think that i2c was called so early that kmalloc/bootmem_alloc() (or so) couldn't be used.
--
Tom Rini
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 2 lines · Tom Rini
Must the driver use hostalloc? I didn't think that i2c was called so early that kmalloc/bootmem_alloc() (or so) couldn't be used.
Should use ...consistent_alloc()
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 7 lines · Dan Malek
Quoted 2 lines · Tom Rini
Must the driver use hostalloc? I didn't think that i2c was called so early that kmalloc/bootmem_alloc() (or so) couldn't be used.
Should use ...consistent_alloc()
Not having the full context handy (and trying to listen to rml right now), yes, that too could be the correct answer here.
--
Tom Rini
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 8 lines · Dan Malek
Quoted 2 lines · Tom Rini
Must the driver use hostalloc? I didn't think that i2c was called so early that kmalloc/bootmem_alloc() (or so) couldn't be used.
Should use ...consistent_alloc()
That doesn't exist in 2.6. Use dma_alloc_coherent().
-Matt
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 1 line · Matt Porter
That doesn't exist in 2.6. Use
dma_alloc_coherent().
Right....that one, too. :-)
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Am Fr, den 23.07.2004 schrieb Matt Porter um 17:38:
Quoted 11 lines · Dan Malek
Quoted 8 lines · Tom Rini
Quoted 3 lines
Must the driver use hostalloc? I didn't think that i2c was called so early that kmalloc/bootmem_alloc() (or so) couldn't be used.
Should use ...consistent_alloc()
That doesn't exist in 2.6. Use
dma_alloc_coherent().
Thanks, that works, but requires the attached patch. Please apply.
Regards,
Andreas
# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/07/24 14:59:23+02:00 [email protected]
# export __dma_alloc_coherent and __dma_free_coherent (required for CONFIG_NOT_COHERENT_CACHE)
#
# arch/ppc/kernel/dma-mapping.c # 2004/07/24 14:59:03+02:00 [email protected] +2 -1 # export __dma_alloc_coherent and __dma_free_coherent (required for CONFIG_NOT_COHERENT_CACHE) # diff -Nru a/arch/ppc/kernel/dma-mapping.c b/arch/ppc/kernel/dma-mapping.c --- a/arch/ppc/kernel/dma-mapping.c 2004-07-24 15:00:12 +02:00 +++ b/arch/ppc/kernel/dma-mapping.c 2004-07-24 15:00:12 +02:00 @@ -254,6 +254,7 @@ no_page: return NULL; } +EXPORT_SYMBOL(__dma_alloc_coherent);
/*
* free a page as defined by the above mapping.
@@ -317,7 +318,7 @@
__func__, vaddr);
dump_stack();
}
-EXPORT_SYMBOL(dma_free_coherent);
+EXPORT_SYMBOL(__dma_free_coherent);
/*
* Initialise the consistent memory allocation.
Quoted 4 lines · Andreas Oberritter
Am Fr, den 23.07.2004 schrieb Matt Porter um 17:38:
Quoted 1 line
That doesn't exist in 2.6. Use
dma_alloc_coherent().Thanks, that works, but requires the attached patch. Please apply.
Ack. I forgot to submit this one before I left on vacation, it was languishing in one of my working trees. Submitted.
Thanks,
Matt
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
A message that is not in the archive (sent off-list or not yet received): 20820601.1090640061250.JavaMail.administrator@RnDserver
page fault
hi all,
i am a newbie,so i may be far behind the curve,but please bear with me. i am porting hardhat linux for MPPC860T for our custome hardware and i am not using any bootloader instead i use my custome utility to download kernel to board,in /arch/ppc/m8xx_setup.c in function m8xx_init i give
bd_t *binfo;
binfo =res;
binfo->bi_memstart=0;
binfo->bi_memsize=10*1024*1024;
binfo->bi_intfreq=50;#ifdef CONFIG_BLK_DEV_INITRD
initrd_start = 10*1024*1024 + KERNELBASE;
initrd_end = 16*1024*1024 + KERNELBASE;#endif
as i want to use 10 mb of my ram for execution and rest up to 16 mb for file system currently it is nfs mounted.
problem is that it all went ok in kernel space but as soon as it enters in user space it starts giving PAGE_FAULTS.
how can i remove this.
Thanks in anticipation
--
YOU CAN ACHIEVE ANYTHING BY PROGRAMMING YOUR MIND-SET !
with warm regards
Bharat Bhushan
coral Telecom,Noida
india
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Re: page fault
Quoted 2 lines · bharat
problem is that it all went ok in kernel space but as soon as it enters in user space it starts giving
PAGE_FAULTS.
You seem to have posted this in reply to Andreas Oberritter's message in which he offered a patch to export m8xx_cpm_hostalloc().
Please could you explain why these are related -- did you only start seeing this problem after you applied his patch?
--
dwmw2
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/