* [PATCH] export m8xx_cpm_hostalloc
@ 2004-07-23 13:49 Andreas Oberritter
2004-07-23 13:51 ` Andreas Oberritter
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Andreas Oberritter @ 2004-07-23 13:49 UTC (permalink / raw)
To: Tom Rini; +Cc: linuxppc-embedded
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
[1]:
http://cvs.tuxbox.org/cgi-bin/viewcvs.cgi/tuxbox/driver/i2c/dbox2_i2c.c?rev=1.28&content-type=text/vnd.viewcvs-markup
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH] export m8xx_cpm_hostalloc 2004-07-23 13:49 [PATCH] export m8xx_cpm_hostalloc Andreas Oberritter @ 2004-07-23 13:51 ` Andreas Oberritter 2004-07-23 14:02 ` Tom Rini [not found] ` <20820601.1090640061250.JavaMail.administrator@RnDserver> 2 siblings, 0 replies; 11+ messages in thread From: Andreas Oberritter @ 2004-07-23 13:51 UTC (permalink / raw) To: Tom Rini; +Cc: linuxppc-embedded [-- Attachment #1: Type: text/plain, Size: 43 bytes --] Forgot to attach the patch, so here it is. [-- Attachment #2: export_hostalloc.diff --] [-- Type: text/x-patch, Size: 791 bytes --] # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/07/23 15:13:53+02:00 obi@pegasos.saftware.de # export m8xx_cpm_hostalloc for modularized i2c driver # # arch/ppc/8xx_io/commproc.c # 2004/07/23 15:13:33+02:00 obi@pegasos.saftware.de +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. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] export m8xx_cpm_hostalloc 2004-07-23 13:49 [PATCH] export m8xx_cpm_hostalloc Andreas Oberritter 2004-07-23 13:51 ` Andreas Oberritter @ 2004-07-23 14:02 ` Tom Rini 2004-07-23 14:41 ` Dan Malek [not found] ` <20820601.1090640061250.JavaMail.administrator@RnDserver> 2 siblings, 1 reply; 11+ messages in thread From: Tom Rini @ 2004-07-23 14:02 UTC (permalink / raw) To: Andreas Oberritter; +Cc: linuxppc-embedded On Fri, Jul 23, 2004 at 03:49:27PM +0200, Andreas Oberritter wrote: > 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? 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/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] export m8xx_cpm_hostalloc 2004-07-23 14:02 ` Tom Rini @ 2004-07-23 14:41 ` Dan Malek 2004-07-23 14:42 ` Tom Rini 2004-07-23 15:38 ` Matt Porter 0 siblings, 2 replies; 11+ messages in thread From: Dan Malek @ 2004-07-23 14:41 UTC (permalink / raw) To: Tom Rini; +Cc: linuxppc-embedded, Andreas Oberritter On Jul 23, 2004, at 10:02 AM, Tom Rini wrote: > 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/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] export m8xx_cpm_hostalloc 2004-07-23 14:41 ` Dan Malek @ 2004-07-23 14:42 ` Tom Rini 2004-07-23 15:38 ` Matt Porter 1 sibling, 0 replies; 11+ messages in thread From: Tom Rini @ 2004-07-23 14:42 UTC (permalink / raw) To: Dan Malek; +Cc: linuxppc-embedded, Andreas Oberritter On Fri, Jul 23, 2004 at 10:41:36AM -0400, Dan Malek wrote: > > On Jul 23, 2004, at 10:02 AM, Tom Rini wrote: > > >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/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] export m8xx_cpm_hostalloc 2004-07-23 14:41 ` Dan Malek 2004-07-23 14:42 ` Tom Rini @ 2004-07-23 15:38 ` Matt Porter 2004-07-23 16:27 ` Dan Malek 2004-07-24 13:04 ` Andreas Oberritter 1 sibling, 2 replies; 11+ messages in thread From: Matt Porter @ 2004-07-23 15:38 UTC (permalink / raw) To: Dan Malek; +Cc: Tom Rini, linuxppc-embedded, Andreas Oberritter On Fri, Jul 23, 2004 at 10:41:36AM -0400, Dan Malek wrote: > > On Jul 23, 2004, at 10:02 AM, Tom Rini wrote: > > > 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/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] export m8xx_cpm_hostalloc 2004-07-23 15:38 ` Matt Porter @ 2004-07-23 16:27 ` Dan Malek 2004-07-24 13:04 ` Andreas Oberritter 1 sibling, 0 replies; 11+ messages in thread From: Dan Malek @ 2004-07-23 16:27 UTC (permalink / raw) To: Matt Porter; +Cc: linuxppc-embedded, Tom Rini, Andreas Oberritter On Jul 23, 2004, at 11:38 AM, Matt Porter wrote: > 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/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] export m8xx_cpm_hostalloc 2004-07-23 15:38 ` Matt Porter 2004-07-23 16:27 ` Dan Malek @ 2004-07-24 13:04 ` Andreas Oberritter 2004-07-24 18:52 ` Matt Porter 1 sibling, 1 reply; 11+ messages in thread From: Andreas Oberritter @ 2004-07-24 13:04 UTC (permalink / raw) To: Matt Porter; +Cc: Dan Malek, Tom Rini, linuxppc-embedded [-- Attachment #1: Type: text/plain, Size: 502 bytes --] Am Fr, den 23.07.2004 schrieb Matt Porter um 17:38: > On Fri, Jul 23, 2004 at 10:41:36AM -0400, Dan Malek wrote: > > > > On Jul 23, 2004, at 10:02 AM, Tom Rini wrote: > > > > > 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 [-- Attachment #2: dma.diff --] [-- Type: text/x-patch, Size: 946 bytes --] # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/07/24 14:59:23+02:00 obi@pegasos.saftware.de # 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 obi@pegasos.saftware.de +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. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] export m8xx_cpm_hostalloc 2004-07-24 13:04 ` Andreas Oberritter @ 2004-07-24 18:52 ` Matt Porter 0 siblings, 0 replies; 11+ messages in thread From: Matt Porter @ 2004-07-24 18:52 UTC (permalink / raw) To: Andreas Oberritter; +Cc: Matt Porter, Dan Malek, Tom Rini, linuxppc-embedded On Sat, Jul 24, 2004 at 03:04:06PM +0200, Andreas Oberritter wrote: > Am Fr, den 23.07.2004 schrieb Matt Porter um 17:38: > > 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/ ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <20820601.1090640061250.JavaMail.administrator@RnDserver>]
* page fault [not found] ` <20820601.1090640061250.JavaMail.administrator@RnDserver> @ 2004-07-24 3:52 ` bharat 2004-07-24 17:16 ` David Woodhouse 0 siblings, 1 reply; 11+ messages in thread From: bharat @ 2004-07-24 3:52 UTC (permalink / raw) To: PPC_LINUX 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/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: page fault 2004-07-24 3:52 ` page fault bharat @ 2004-07-24 17:16 ` David Woodhouse 0 siblings, 0 replies; 11+ messages in thread From: David Woodhouse @ 2004-07-24 17:16 UTC (permalink / raw) To: bharat; +Cc: PPC_LINUX On Sat, 2004-07-24 at 09:22 +0530, bharat wrote: > 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/ ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2004-07-24 18:52 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-23 13:49 [PATCH] export m8xx_cpm_hostalloc Andreas Oberritter
2004-07-23 13:51 ` Andreas Oberritter
2004-07-23 14:02 ` Tom Rini
2004-07-23 14:41 ` Dan Malek
2004-07-23 14:42 ` Tom Rini
2004-07-23 15:38 ` Matt Porter
2004-07-23 16:27 ` Dan Malek
2004-07-24 13:04 ` Andreas Oberritter
2004-07-24 18:52 ` Matt Porter
[not found] ` <20820601.1090640061250.JavaMail.administrator@RnDserver>
2004-07-24 3:52 ` page fault bharat
2004-07-24 17:16 ` David Woodhouse
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).