[uClinux-dev] Re: [PATCH] NOMMU: Work around the lack of vmap()/vunmap() in firmware_loading_store() [ver #2]

2011-03-23 Thread Mike Frysinger
On Thu, Apr 8, 2010 at 09:51, David Howells wrote:
> Work around the lack of vmap()/vunmap() in firmware_loading_store() when
> operating in NOMMU mode.  vmap() cannot be implemented as there's no virtual
> mapping available.
>
> Instead, in NOMMU mode, make available a function (vcoalesce()) that can
> coalesce the supplied data into one big buffer and store as the address vmap()
> would've returned.
>
> This can be #defined to vmap() in NOMMU mode by interested parties.

seems this patch missed updating vunmap():

void vunmap(const void *addr)
{
   BUG();
}

that BUG() just needs to be changed to a kfree(addr) ...
-mike
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [PATCH] NOMMU: support SMP dynamic percpu_alloc

2011-03-23 Thread Mike Frysinger
On Wed, Mar 23, 2011 at 8:20 PM, David Howells wrote:
> Mike Frysinger wrote:
>> The percpu code requires more functions to be implemented in the mm core
>> which nommu currently does not provide.  So add inline implementations
>> since these are largely meaningless on nommu systems.
>
> Under what conditions are these required?
>
> I've seen one percpu compilation bug that I've made a patch for (see
> attached), but none of these.  Is SMP required to trigger them?

yes, it only occurs in SMP builds.

i havent seen the build error you mention below, but i think that's
because in a past discussion we determined that NOMMU ports should be
setting VMALLOC_START to 0 and VMALLOC_END to -1.  is that no longer
the case ?

there are bunch more places where things would fail if
VMALLOC_{START,END} werent defined ...
-mike
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [PATCH] NOMMU: support SMP dynamic percpu_alloc

2011-03-23 Thread David Howells
Mike Frysinger  wrote:

> The percpu code requires more functions to be implemented in the mm core
> which nommu currently does not provide.  So add inline implementations
> since these are largely meaningless on nommu systems.

Under what conditions are these required?

I've seen one percpu compilation bug that I've made a patch for (see
attached), but none of these.  Is SMP required to trigger them?

David
---
From: David Howells 
Subject: [PATCH] NOMMU: percpu should use is_vmalloc_addr().

per_cpu_ptr_to_phys() uses VMALLOC_START and VMALLOC_END to determine if an
address is in the vmalloc() region or not.  This is incorrect on NOMMU as
there is no real vmalloc() capability (vmalloc() is emulated by kmalloc()).

The correct way to do this is to use is_vmalloc_addr().  This encapsulates the
vmalloc() region test in MMU mode and just returns 0 in NOMMU mode.

On FRV in NOMMU mode, the percpu compilation fails without this patch:

mm/percpu.c: In function 'per_cpu_ptr_to_phys':
mm/percpu.c:1011: error: 'VMALLOC_START' undeclared (first use in this function)
mm/percpu.c:1011: error: (Each undeclared identifier is reported only once
mm/percpu.c:1011: error: for each function it appears in.)
mm/percpu.c:1012: error: 'VMALLOC_END' undeclared (first use in this function)
mm/percpu.c:1018: warning: control reaches end of non-void function

Signed-off-by: David Howells 
---

 mm/percpu.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)


diff --git a/mm/percpu.c b/mm/percpu.c
index 3f93001..55d4d11 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -1008,8 +1008,7 @@ phys_addr_t per_cpu_ptr_to_phys(void *addr)
}
 
if (in_first_chunk) {
-   if ((unsigned long)addr < VMALLOC_START ||
-   (unsigned long)addr >= VMALLOC_END)
+   if (!is_vmalloc_addr(addr))
return __pa(addr);
else
return page_to_phys(vmalloc_to_page(addr));
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [uclinux-dist-devel] [PATCH] NOMMU: support SMP dynamic percpu_alloc

2011-03-23 Thread David Howells
Mike Frysinger  wrote:

> > that was going on, my FRV board has been locked away in storage.
> 
> i can send you a free Blackfin board :)

I never say no to stuff - which is part of the reason my office is a mess -
but I have my FRV board connected back up now.

David
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [uclinux-dist-devel] [PATCH] NOMMU: support SMP dynamic percpu_alloc

2011-03-23 Thread Mike Frysinger
On Wed, Mar 23, 2011 at 8:06 PM, David Howells wrote:
> Mike Frysinger  wrote:
>> but David seems to be afk for a while ?
>
> Yeah...  I moved house and then we had to redecorate and stuff, and whilst all

ah, np

> that was going on, my FRV board has been locked away in storage.

i can send you a free Blackfin board :)
-mike
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [uclinux-dist-devel] [PATCH] NOMMU: support SMP dynamic percpu_alloc

2011-03-23 Thread David Howells
Mike Frysinger  wrote:

> but David seems to be afk for a while ?

Yeah...  I moved house and then we had to redecorate and stuff, and whilst all
that was going on, my FRV board has been locked away in storage.

David
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [PATCH 0/1] m68k: merge m68k and m68knommu arch directories

2011-03-23 Thread Greg Ungerer

Hi Geert,

On 24/03/11 08:14, Geert Uytterhoeven wrote:

On Wed, Mar 23, 2011 at 23:07, Geert Uytterhoeven  wrote:

On Tue, Mar 22, 2011 at 05:43, á  wrote:

The following patch merges the m68k and m68knommu arch directories.
This patch has been trimmed for review purposes - the automated file
moving and mergeing carried out by the script contained in this email
has been removed. Only the manually required changes after running the
script are shown as the patch. (So to end up with the final required
change you need to run this script then apply the patch).

This change is available as the only commit on the m68knommu git tree,
for-linux branch:

The following changes since commit a952baa034ae7c2e4a66932005cbc7ebbccfe28d:
áLinus Torvalds (1):
á á á áMerge branch 'for-linus' of git://git.kernel.org/.../dtor/input

are available in the git repository at:

ágit://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu.git for-linus

Greg Ungerer (1):
á á ám68k: merge m68k and m68knommu arch directories


It is also on the for-next branch in that tree, so will get some testing
in the next tree for the next few days.


defconfig is now a nommu-config, and it fails?


BTW, haven't tried it myself yet. I'm busy bisecting an issue with
initrds, which
got introduced between 2.6.37 and 2.6.38.

Init fails with "init: cannot open inittab", followed by
"Kernel panic - not syncing: Attempted to kill init!".

As I can't get ramdisks to work on ARAnyM, I need to use real hardware, which
suffers a lot from long reboot/copy kernel/test cycles...


As one data point (though not sure how useful this is to you... :-)
I can compile for an Atari target with the merge tree and load it
and run it on ARAnyM - using a ramdisk for root fs. Seems to work
ok.

Regards
Greg



Greg Ungerer  --  Principal EngineerEMAIL: g...@snapgear.com
SnapGear Group, McAfee  PHONE:   +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, AustraliaWEB: http://www.SnapGear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [uclinux-dist-devel] [PATCH] NOMMU: support SMP dynamic percpu_alloc

2011-03-23 Thread Mike Frysinger
On Wed, Mar 23, 2011 at 08:37, Paul Mundt wrote:
> Looks ok to me. I've got a couple other fixes I'm working on at the
> moment, so I'll roll this in to my nommu tree and send it along.

are you picking up nommu fixes in general now ?  there's a long
standing issue of the firmware subdir not working on nommu due to its
usage of vmap() and i wrote a patch for it, but David seems to be afk
for a while ?
-mike
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [PATCH 0/1] m68k: merge m68k and m68knommu arch directories

2011-03-23 Thread Greg Ungerer


Hi Geert,

On 24/03/11 08:07, Geert Uytterhoeven wrote:

On Tue, Mar 22, 2011 at 05:43,  wrote:

The following patch merges the m68k and m68knommu arch directories.
This patch has been trimmed for review purposes - the automated file
moving and mergeing carried out by the script contained in this email
has been removed. Only the manually required changes after running the
script are shown as the patch. (So to end up with the final required
change you need to run this script then apply the patch).

This change is available as the only commit on the m68knommu git tree,
for-linux branch:

The following changes since commit a952baa034ae7c2e4a66932005cbc7ebbccfe28d:
áLinus Torvalds (1):
á á á áMerge branch 'for-linus' of git://git.kernel.org/.../dtor/input

are available in the git repository at:

ágit://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu.git for-linus

Greg Ungerer (1):
á á ám68k: merge m68k and m68knommu arch directories


It is also on the for-next branch in that tree, so will get some testing
in the next tree for the next few days.


defconfig is now a nommu-config, and it fails?

http://kisskb.ellerman.id.au/kisskb/buildresult/4012794/


Yep, that looks wrong. I'll move the define for KBUILD_DEFCONFIG
into arch/m68k/Makefile (and remove the existing defines in Makefile_mm
and Makefile_no). That will make the DEFCONFIG as it was before,
multi_defconfig.

> arch/m68k/kernel/entry_no.S:47: Error: Unknown operator -- statement
> `save_all' ignored

This is due to compiling for the non-mmu targets and not using
a m68k-uclinux- toolchain. Unfortunately the compiler must define
__uClinux__ to compile for non-mmu targets. This isn't new, we
have had this problem ever since the merge of the header files.
(The exported headers need some switch to use to base some
conditionals on, and kernel config options cannot be used in
exported headers).

But with a fixed defconfig, you won't see this anymore :-)

I'll fix up the git commit on m68knommu git tree.

Thanks!
Greg



arch/m68k/kernel/entry_no.S:56: Error: Unknown operator -- statement
`save_all' ignored
arch/m68k/kernel/entry_no.S:92: Error: operands mismatch -- statement
`moveml %a3-%a6/%d6-%d7,%sp@-' ignored
arch/m68k/kernel/entry_no.S:96: Error: operands mismatch -- statement
`moveml %sp@+,%a3-%a6/%d6-%d7' ignored
arch/m68k/kernel/entry_no.S:100: Error: operands mismatch -- statement
`moveml %a3-%a6/%d6-%d7,%sp@-' ignored
arch/m68k/kernel/entry_no.S:104: Error: operands mismatch -- statement
`moveml %sp@+,%a3-%a6/%d6-%d7' ignored
arch/m68k/kernel/entry_no.S:108: Error: operands mismatch -- statement
`moveml %a3-%a6/%d6-%d7,%sp@-' ignored
arch/m68k/kernel/entry_no.S:112: Error: operands mismatch -- statement
`moveml %sp@+,%a3-%a6/%d6-%d7' ignored
arch/m68k/kernel/entry_no.S:116: Error: operands mismatch -- statement
`moveml %a3-%a6/%d6-%d7,%sp@-' ignored
arch/m68k/kernel/entry_no.S:118: Error: operands mismatch -- statement
`moveml %sp@+,%a3-%a6/%d6-%d7' ignored
arch/m68k/kernel/entry_no.S:122: Error: operands mismatch -- statement
`moveml %a3-%a6/%d6-%d7,%sp@-' ignored
arch/m68k/kernel/entry_no.S:124: Error: operands mismatch -- statement
`moveml %sp@+,%a3-%a6/%d6-%d7' ignored
arch/m68k/platform/coldfire/entry.S:65: Error: Unknown operator --
statement `save_all' ignored
arch/m68k/platform/coldfire/entry.S:92: Error: operands mismatch --
statement `moveml %a3-%a6/%d6-%d7,%sp@-' ignored
arch/m68k/platform/coldfire/entry.S:94: Error: operands mismatch --
statement `moveml %sp@+,%a3-%a6/%d6-%d7' ignored
arch/m68k/platform/coldfire/entry.S:100: Error: operands mismatch --
statement `moveml %a3-%a6/%d6-%d7,%sp@-' ignored
arch/m68k/platform/coldfire/entry.S:104: Error: operands mismatch --
statement `moveml %sp@+,%a3-%a6/%d6-%d7' ignored
arch/m68k/platform/coldfire/entry.S:144: Error: Unknown operator --
statement `restore_user' ignored
arch/m68k/platform/coldfire/entry.S:156: Error: operands mismatch --
statement `moveml %a3-%a6/%d6-%d7,%sp@-' ignored
arch/m68k/platform/coldfire/entry.S:160: Error: operands mismatch --
statement `moveml %sp@+,%a3-%a6/%d6-%d7' ignored
arch/m68k/platform/coldfire/entry.S:169: Error: Unknown operator --
statement `save_all' ignored
arch/m68k/platform/coldfire/entry.S:193: Error: Unknown operator --
statement `rdusp' ignored
arch/m68k/platform/coldfire/entry.S:196: Error: operands mismatch --
statement `moveml %a3-%a6/%d6-%d7,%sp@-' ignored
arch/m68k/platform/coldfire/entry.S:199: Error: operands mismatch --
statement `moveml %sp@+,%a3-%a6/%d6-%d7' ignored
arch/m68k/platform/coldfire/entry.S:202: Error: Unknown operator --
statement `wrusp' ignored

Gr{oetje,eeting}s,

á á á á á á á á á á á á Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
á á á á á á á á á á á á á áá áá -- Linus Tor

[uClinux-dev] Re: [PATCH 0/1] m68k: merge m68k and m68knommu arch directories

2011-03-23 Thread Geert Uytterhoeven
On Wed, Mar 23, 2011 at 23:07, Geert Uytterhoeven  wrote:
> On Tue, Mar 22, 2011 at 05:43,   wrote:
>> The following patch merges the m68k and m68knommu arch directories.
>> This patch has been trimmed for review purposes - the automated file
>> moving and mergeing carried out by the script contained in this email
>> has been removed. Only the manually required changes after running the
>> script are shown as the patch. (So to end up with the final required
>> change you need to run this script then apply the patch).
>>
>> This change is available as the only commit on the m68knommu git tree,
>> for-linux branch:
>>
>> The following changes since commit a952baa034ae7c2e4a66932005cbc7ebbccfe28d:
>>  Linus Torvalds (1):
>>        Merge branch 'for-linus' of git://git.kernel.org/.../dtor/input
>>
>> are available in the git repository at:
>>
>>  git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu.git for-linus
>>
>> Greg Ungerer (1):
>>      m68k: merge m68k and m68knommu arch directories
>>
>>
>> It is also on the for-next branch in that tree, so will get some testing
>> in the next tree for the next few days.
>
> defconfig is now a nommu-config, and it fails?

BTW, haven't tried it myself yet. I'm busy bisecting an issue with
initrds, which
got introduced between 2.6.37 and 2.6.38.

Init fails with "init: cannot open inittab", followed by
"Kernel panic - not syncing: Attempted to kill init!".

As I can't get ramdisks to work on ARAnyM, I need to use real hardware, which
suffers a lot from long reboot/copy kernel/test cycles...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [PATCH 0/1] m68k: merge m68k and m68knommu arch directories

2011-03-23 Thread Geert Uytterhoeven
On Tue, Mar 22, 2011 at 05:43,   wrote:
> The following patch merges the m68k and m68knommu arch directories.
> This patch has been trimmed for review purposes - the automated file
> moving and mergeing carried out by the script contained in this email
> has been removed. Only the manually required changes after running the
> script are shown as the patch. (So to end up with the final required
> change you need to run this script then apply the patch).
>
> This change is available as the only commit on the m68knommu git tree,
> for-linux branch:
>
> The following changes since commit a952baa034ae7c2e4a66932005cbc7ebbccfe28d:
>  Linus Torvalds (1):
>        Merge branch 'for-linus' of git://git.kernel.org/.../dtor/input
>
> are available in the git repository at:
>
>  git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu.git for-linus
>
> Greg Ungerer (1):
>      m68k: merge m68k and m68knommu arch directories
>
>
> It is also on the for-next branch in that tree, so will get some testing
> in the next tree for the next few days.

defconfig is now a nommu-config, and it fails?

http://kisskb.ellerman.id.au/kisskb/buildresult/4012794/

arch/m68k/kernel/entry_no.S:47: Error: Unknown operator -- statement
`save_all' ignored
arch/m68k/kernel/entry_no.S:56: Error: Unknown operator -- statement
`save_all' ignored
arch/m68k/kernel/entry_no.S:92: Error: operands mismatch -- statement
`moveml %a3-%a6/%d6-%d7,%sp@-' ignored
arch/m68k/kernel/entry_no.S:96: Error: operands mismatch -- statement
`moveml %sp@+,%a3-%a6/%d6-%d7' ignored
arch/m68k/kernel/entry_no.S:100: Error: operands mismatch -- statement
`moveml %a3-%a6/%d6-%d7,%sp@-' ignored
arch/m68k/kernel/entry_no.S:104: Error: operands mismatch -- statement
`moveml %sp@+,%a3-%a6/%d6-%d7' ignored
arch/m68k/kernel/entry_no.S:108: Error: operands mismatch -- statement
`moveml %a3-%a6/%d6-%d7,%sp@-' ignored
arch/m68k/kernel/entry_no.S:112: Error: operands mismatch -- statement
`moveml %sp@+,%a3-%a6/%d6-%d7' ignored
arch/m68k/kernel/entry_no.S:116: Error: operands mismatch -- statement
`moveml %a3-%a6/%d6-%d7,%sp@-' ignored
arch/m68k/kernel/entry_no.S:118: Error: operands mismatch -- statement
`moveml %sp@+,%a3-%a6/%d6-%d7' ignored
arch/m68k/kernel/entry_no.S:122: Error: operands mismatch -- statement
`moveml %a3-%a6/%d6-%d7,%sp@-' ignored
arch/m68k/kernel/entry_no.S:124: Error: operands mismatch -- statement
`moveml %sp@+,%a3-%a6/%d6-%d7' ignored
arch/m68k/platform/coldfire/entry.S:65: Error: Unknown operator --
statement `save_all' ignored
arch/m68k/platform/coldfire/entry.S:92: Error: operands mismatch --
statement `moveml %a3-%a6/%d6-%d7,%sp@-' ignored
arch/m68k/platform/coldfire/entry.S:94: Error: operands mismatch --
statement `moveml %sp@+,%a3-%a6/%d6-%d7' ignored
arch/m68k/platform/coldfire/entry.S:100: Error: operands mismatch --
statement `moveml %a3-%a6/%d6-%d7,%sp@-' ignored
arch/m68k/platform/coldfire/entry.S:104: Error: operands mismatch --
statement `moveml %sp@+,%a3-%a6/%d6-%d7' ignored
arch/m68k/platform/coldfire/entry.S:144: Error: Unknown operator --
statement `restore_user' ignored
arch/m68k/platform/coldfire/entry.S:156: Error: operands mismatch --
statement `moveml %a3-%a6/%d6-%d7,%sp@-' ignored
arch/m68k/platform/coldfire/entry.S:160: Error: operands mismatch --
statement `moveml %sp@+,%a3-%a6/%d6-%d7' ignored
arch/m68k/platform/coldfire/entry.S:169: Error: Unknown operator --
statement `save_all' ignored
arch/m68k/platform/coldfire/entry.S:193: Error: Unknown operator --
statement `rdusp' ignored
arch/m68k/platform/coldfire/entry.S:196: Error: operands mismatch --
statement `moveml %a3-%a6/%d6-%d7,%sp@-' ignored
arch/m68k/platform/coldfire/entry.S:199: Error: operands mismatch --
statement `moveml %sp@+,%a3-%a6/%d6-%d7' ignored
arch/m68k/platform/coldfire/entry.S:202: Error: Unknown operator --
statement `wrusp' ignored

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [PATCH] NOMMU: support SMP dynamic percpu_alloc

2011-03-23 Thread Greg Ungerer

On 23/03/11 06:41, Mike Frysinger wrote:

From: Graf Yang

The percpu code requires more functions to be implemented in the mm core
which nommu currently does not provide.  So add inline implementations
since these are largely meaningless on nommu systems.

Signed-off-by: Graf Yang
Signed-off-by: Mike Frysinger


Acked-by: Greg Ungerer 



---
  include/linux/vmalloc.h |   32 
  1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 81f8622..01bbeb4 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -98,10 +98,27 @@ extern struct vm_struct *remove_vm_area(const void *addr);

  extern int map_vm_area(struct vm_struct *area, pgprot_t prot,
struct page ***pages);
+#ifdef CONFIG_MMU
  extern int map_kernel_range_noflush(unsigned long start, unsigned long size,
pgprot_t prot, struct page **pages);
  extern void unmap_kernel_range_noflush(unsigned long addr, unsigned long 
size);
  extern void unmap_kernel_range(unsigned long addr, unsigned long size);
+#else
+static inline int
+map_kernel_range_noflush(unsigned long start, unsigned long size,
+   pgprot_t prot, struct page **pages)
+{
+   return size>>  PAGE_SHIFT;
+}
+static inline void
+unmap_kernel_range_noflush(unsigned long addr, unsigned long size)
+{
+}
+static inline void
+unmap_kernel_range(unsigned long addr, unsigned long size)
+{
+}
+#endif

  /* Allocate/destroy a 'vmalloc' VM area. */
  extern struct vm_struct *alloc_vm_area(size_t size);
@@ -119,11 +136,26 @@ extern struct vm_struct *vmlist;
  extern __init void vm_area_register_early(struct vm_struct *vm, size_t align);

  #ifdef CONFIG_SMP
+# ifdef CONFIG_MMU
  struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets,
 const size_t *sizes, int nr_vms,
 size_t align);

  void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms);
+# else
+static inline struct vm_struct **
+pcpu_get_vm_areas(const unsigned long *offsets,
+   const size_t *sizes, int nr_vms,
+   size_t align)
+{
+   return NULL;
+}
+
+static inline void
+pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms)
+{
+}
+# endif
  #endif

  #endif /* _LINUX_VMALLOC_H */



--

Greg Ungerer  --  Principal EngineerEMAIL: g...@snapgear.com
SnapGear Group, McAfee  PHONE:   +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, AustraliaWEB: http://www.SnapGear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [PATCH] m68k,m68knommu: Wire up syncfs

2011-03-23 Thread Greg Ungerer

On 23/03/11 22:35, Geert Uytterhoeven wrote:

Signed-off-by: Geert Uytterhoeven


Acked-by: Greg Ungerer 



To be folded with the previous one.

  arch/m68k/include/asm/unistd.h   |3 ++-
  arch/m68k/kernel/entry.S |1 +
  arch/m68knommu/kernel/syscalltable.S |1 +
  3 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h
index f69f7ce..29e1790 100644
--- a/arch/m68k/include/asm/unistd.h
+++ b/arch/m68k/include/asm/unistd.h
@@ -346,10 +346,11 @@
  #define __NR_name_to_handle_at340
  #define __NR_open_by_handle_at341
  #define __NR_clock_adjtime342
+#define __NR_syncfs343

  #ifdef __KERNEL__

-#define NR_syscalls343
+#define NR_syscalls344

  #define __ARCH_WANT_IPC_PARSE_VERSION
  #define __ARCH_WANT_OLD_READDIR
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S
index 8f9524a..1359ee6 100644
--- a/arch/m68k/kernel/entry.S
+++ b/arch/m68k/kernel/entry.S
@@ -753,4 +753,5 @@ sys_call_table:
.long sys_name_to_handle_at /* 340 */
.long sys_open_by_handle_at
.long sys_clock_adjtime
+   .long sys_syncfs

diff --git a/arch/m68knommu/kernel/syscalltable.S 
b/arch/m68knommu/kernel/syscalltable.S
index 605bbbe..9b8393d 100644
--- a/arch/m68knommu/kernel/syscalltable.S
+++ b/arch/m68knommu/kernel/syscalltable.S
@@ -361,6 +361,7 @@ ENTRY(sys_call_table)
.long sys_name_to_handle_at /* 340 */
.long sys_open_by_handle_at
.long sys_clock_adjtime
+   .long sys_syncfs

.rept NR_syscalls-(.-sys_call_table)/4
.long sys_ni_syscall



--

Greg Ungerer  --  Principal EngineerEMAIL: g...@snapgear.com
SnapGear Group, McAfee  PHONE:   +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, AustraliaWEB: http://www.SnapGear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Re: [PATCH] NOMMU: support SMP dynamic percpu_alloc

2011-03-23 Thread Paul Mundt
On Tue, Mar 22, 2011 at 04:41:46PM -0400, Mike Frysinger wrote:
> From: Graf Yang 
> 
> The percpu code requires more functions to be implemented in the mm core
> which nommu currently does not provide.  So add inline implementations
> since these are largely meaningless on nommu systems.
> 
> Signed-off-by: Graf Yang 
> Signed-off-by: Mike Frysinger 

Looks ok to me. I've got a couple other fixes I'm working on at the
moment, so I'll roll this in to my nommu tree and send it along.
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] [PATCH] m68k,m68knommu: Wire up syncfs

2011-03-23 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven 
---
To be folded with the previous one.

 arch/m68k/include/asm/unistd.h   |3 ++-
 arch/m68k/kernel/entry.S |1 +
 arch/m68knommu/kernel/syscalltable.S |1 +
 3 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h
index f69f7ce..29e1790 100644
--- a/arch/m68k/include/asm/unistd.h
+++ b/arch/m68k/include/asm/unistd.h
@@ -346,10 +346,11 @@
 #define __NR_name_to_handle_at 340
 #define __NR_open_by_handle_at 341
 #define __NR_clock_adjtime 342
+#define __NR_syncfs343
 
 #ifdef __KERNEL__
 
-#define NR_syscalls343
+#define NR_syscalls344
 
 #define __ARCH_WANT_IPC_PARSE_VERSION
 #define __ARCH_WANT_OLD_READDIR
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S
index 8f9524a..1359ee6 100644
--- a/arch/m68k/kernel/entry.S
+++ b/arch/m68k/kernel/entry.S
@@ -753,4 +753,5 @@ sys_call_table:
.long sys_name_to_handle_at /* 340 */
.long sys_open_by_handle_at
.long sys_clock_adjtime
+   .long sys_syncfs
 
diff --git a/arch/m68knommu/kernel/syscalltable.S 
b/arch/m68knommu/kernel/syscalltable.S
index 605bbbe..9b8393d 100644
--- a/arch/m68knommu/kernel/syscalltable.S
+++ b/arch/m68knommu/kernel/syscalltable.S
@@ -361,6 +361,7 @@ ENTRY(sys_call_table)
.long sys_name_to_handle_at /* 340 */
.long sys_open_by_handle_at
.long sys_clock_adjtime
+   .long sys_syncfs
 
.rept NR_syscalls-(.-sys_call_table)/4
.long sys_ni_syscall
-- 
1.7.0.4


Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] linux to coldfire MCF52259

2011-03-23 Thread Wolfgang Wegner
Hi,

On Wed, Mar 23, 2011 at 09:12:47AM +0100, Lubo?? Melichar wrote:
> Hi all,
> could anyone help me how to get linux to coldfire?

first of all: I do not think that uClinux will run on an MCF52259.
This is a microcontroller with very limited internal RAM and Flash,
and no decent external memory interface. With resources like 64 kB
RAM, I see no chance of getting uClinux to run, let alone start
any application.

If you have this processor and want to get something running,
probably the easiest solution is to use Freescale's MQX, or you
head over to www.freertos.org and see if you can adapt one of
the existing MCF52221 or MCF5223x projects.

In case you are looking for a V2 Coldfire with uClinux, have a
look at MCF527x/528x - but you need external SDRAM for them, and
a BGA layout, AFAIR.

> I am really a beginner in this way.
> I dont know which tools I need...
> Is the dBUG tool already included in the chip?
> I would appreciate any help - links, tutorials ...

Tools? gcc, gdb, binutils, uClinux-dist, ... ;-)

I have good experience with the toolchains provided by CodeSourcery -
don't worry, just look for the Lite Edition, it contains all you
need for uClinux development, and is much less pain than building
the toolchain yourself. (The last time I started a project, the
toolchain on the uclinux project pages was too old for some other
stuff, this is why I looked for another solution. Maybe situation
has changed meanwhile, it was 3 years ago.)

That's for the software. The debug tool is more of a problem.
Coldfire uses BDM, and things get a bit confusing because of
different versions.
Meanwhile there are some Open-Source/Low-Cost debug tools out
there, have a look at USBDM, which seems to be the most advanced
one:
http://usbdm.sourceforge.net/
There are some companies selling pre-built devices, as far as I know.

Regards,
Wolfgang

___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] linux to coldfire MCF52259

2011-03-23 Thread Luboš Melichar
Hi all,
could anyone help me how to get linux to coldfire?

I am really a beginner in this way.
I dont know which tools I need...
Is the dBUG tool already included in the chip?
I would appreciate any help - links, tutorials ...

Thanks
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev