From: Florian Fainelli <florian@openwrt.org>
To: peter fuerst <post@pfrst.de>
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: Re: [PATCH] MIPS: make CAC_ADDR and UNCAC_ADDR account for PHYS_OFFSET
Date: Tue, 9 Mar 2010 22:23:46 +0100 [thread overview]
Message-ID: <201003092223.50837.florian@openwrt.org> (raw)
In-Reply-To: <Pine.LNX.4.21.1003092137280.898-100000@Opal.Peter>
[-- Attachment #1: Type: Text/Plain, Size: 2666 bytes --]
Le mardi 9 mars 2010 22:03:27, peter fuerst a écrit :
> Hi Florian, thats funny!
>
> On Tue, 9 Mar 2010, Florian Fainelli wrote:
> > Date: Tue, 9 Mar 2010 15:46:01 +0100
> > From: Florian Fainelli <florian@openwrt.org>
> > To: linux-mips@linux-mips.org
> > Cc: ralf@linux-mips.org
> > Subject: [PATCH] MIPS: make CAC_ADDR and UNCAC_ADDR account for
> > PHYS_OFFSET
> >
> > On AR7, ...
> >
> > Signed-off-by: Regards, Florian Fainelli <florian@openwrt.org>
> > ---
> > diff --git a/arch/mips/include/asm/page.h
> > b/arch/mips/include/asm/page.h index ac32572..7b11df5 100644
> > --- a/arch/mips/include/asm/page.h
> > +++ b/arch/mips/include/asm/page.h
> > @@ -188,8 +188,10 @@ typedef struct { unsigned long pgprot; } pgprot_t;
> > #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
> > VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
> >
> > -#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE)
> > -#define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET)
> > +#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE + \
> > + PHYS_OFFSET)
> > +#define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET + \
> > + PHYS_OFFSET)
> >
> > #include <asm-generic/memory_model.h>
> > #include <asm-generic/getorder.h>
>
> I assume, you don't want "+" PHYS_OFFSET in both defines.
>
> Two years and a month ago almost the same patch (which used to work on
> the machine that needed it :) was submitted:
Oh I actually did even search for that one.
>
> --- a/linux-2.6.24/include/asm-mips/page.h Fri Jan 25 12:23:51 2008
> +++ b/linux-2.6.24/include/asm-mips/page.h Wed Feb 6 23:26:31 2008
> @@ -184,8 +184,8 @@
> #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
> VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
>
> -#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE)
> -#define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET)
> +#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + PHYS_OFFSET +
> UNCAC_BASE) +#define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET -
> PHYS_OFFSET)
>
> #include <asm-generic/memory_model.h>
> #include <asm-generic/page.h>
>
> But correct versions of these macros seem to be essential for very
> "exotic" systems only ;-)
You are right. This is actually needed when people do weird designs, and that
happens ;) Will resubmit with the proper fixing.
--
Best regards, Florian Fainelli
Email: florian@openwrt.org
Web: http://openwrt.org
IRC: [florian] on irc.freenode.net
-------------------------------
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
prev parent reply other threads:[~2010-03-09 21:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-09 14:46 [PATCH] MIPS: make CAC_ADDR and UNCAC_ADDR account for PHYS_OFFSET Florian Fainelli
2010-03-09 21:03 ` peter fuerst
2010-03-09 21:23 ` Florian Fainelli [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=201003092223.50837.florian@openwrt.org \
--to=florian@openwrt.org \
--cc=linux-mips@linux-mips.org \
--cc=post@pfrst.de \
--cc=ralf@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.