public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: linux-kernel@vger.kernel.org, gerg@uclinux.org,
	linux-m68k@vger.kernel.org, geert@linux-m68k.org
Subject: Re: m68k with mmu doesn't compile after 66d857b08b8c3ed
Date: Sat, 20 Aug 2011 15:14:10 -0500	[thread overview]
Message-ID: <4E501592.4080907@landley.net> (raw)
In-Reply-To: <4E5008A1.8070105@landley.net>

On 08/20/2011 02:18 PM, Rob Landley wrote:
> The m68k build in 3.0 dies with this:
> 
>   CC      arch/m68k/kernel/dma.o
> In file included from arch/m68k/kernel/dma.c:4:
> arch/m68k/kernel/dma_no.c: In function 'dma_sync_single_for_cpu':
> arch/m68k/kernel/dma_no.c:44: error: implicit declaration of function
> 'flush_dcache_range'
> make[1]: *** [arch/m68k/kernel/dma.o] Error 1
> make: *** [arch/m68k/kernel] Error 2
> 
> That file includes <asm/cacheflush.h>, which for m68k is:
> 
> #ifdef __uClinux__
> #include "cacheflush_no.h"
> #else
> #include "cacheflush_mm.h"
> #endif
> 
> The nommu header (cacheflush_no.h) does #define flush_dcache_range(),
> but the clacheflush_mm.h version does not.  I.E. you can only currently
> build m68k for Coldfire, you can no longer build it for an actual m68k.
> 
> (A git log of Linus' tree shows cacheflush_mm.h hasn't been touched
> since 2010, and I pulled earlier today.)
> 
> Rob

I worked around the above problem with this rather disgusting hack:

--- a/arch/m68k/include/asm/cacheflush_mm.h
+++ b/arch/m68k/include/asm/cacheflush_mm.h
@@ -129,6 +129,7 @@ static inline void __flush_page_to_ram(void *vaddr)
 }

 #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1
+#define flush_dcache_range(page, len)  __flush_cache_all()
 #define flush_dcache_page(page)
__flush_page_to_ram(page_address(page))
 #define flush_dcache_mmap_lock(mapping)                do { } while (0)
 #define flush_dcache_mmap_unlock(mapping)      do { } while (0)

And then it died with:

  AS      arch/m68k/kernel/entry.o
arch/m68k/kernel/entry_no.S: Assembler messages:
arch/m68k/kernel/entry_no.S:46: Error: Unknown operator -- statement
`save_all' ignored
arch/m68k/kernel/entry_no.S:55: Error: Unknown operator -- statement
`save_all' ignored

This is because arch/m68k/include/asm/entry_no.h has this:

#else /* !CONFIG_COLDFIRE */

/*
 * Standard 68k interrupt entry and exit macros.
 */
.macro SAVE_ALL
        clrl    %sp@-                   /* stkadj */
        movel   %d0,%sp@-               /* orig d0 */
        movel   %d0,%sp@-               /* d0 */
        moveml  %d1-%d5/%a0-%a2,%sp@-
.endm

And arch/m68k/include/asm/entry_mm.h does not.

Rob

      parent reply	other threads:[~2011-08-20 20:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-20 19:18 m68k with mmu doesn't compile after 66d857b08b8c3ed Rob Landley
2011-08-20 19:46 ` Geert Uytterhoeven
2011-08-20 22:22   ` Rob Landley
2011-08-22  3:40   ` Greg Ungerer
2011-08-23 11:57     ` Rob Landley
2011-08-20 20:14 ` Rob Landley [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E501592.4080907@landley.net \
    --to=rob@landley.net \
    --cc=geert@linux-m68k.org \
    --cc=gerg@uclinux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox