linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mtd: only use __xipram annotation when XIP_KERNEL is set
Date: Sat, 05 Mar 2016 01:24:36 +0100	[thread overview]
Message-ID: <3582240.H8v1IXn8EB@wuerfel> (raw)
In-Reply-To: <20160305001057.GC55664@google.com>

On Friday 04 March 2016 16:10:57 Brian Norris wrote:
>   5d284e353eb1 ARM: pxa: avoid accessing interrupt registers directly
> 
>   CC      drivers/mtd/chips/cfi_cmdset_0002.o
> drivers/mtd/chips/cfi_cmdset_0002.c: In function ?xip_udelay?:
> drivers/mtd/chips/cfi_cmdset_0002.c:962:35: warning: initialization makes integer from pointer without a cast [enabled by default]
> drivers/mtd/chips/cfi_cmdset_0002.c:967:8: error: ?ICIP? undeclared (first use in this function)
> drivers/mtd/chips/cfi_cmdset_0002.c:967:8: note: each undeclared identifier is reported only once for each function it appears in
> drivers/mtd/chips/cfi_cmdset_0002.c:967:15: error: ?ICMR? undeclared (first use in this function)
> drivers/mtd/chips/cfi_cmdset_0002.c:981:123: error: invalid operands to binary / (have ?void *? and ?int?)
> drivers/mtd/chips/cfi_cmdset_0002.c:982:14: warning: assignment makes integer from pointer without a cast [enabled by default]
> drivers/mtd/chips/cfi_cmdset_0002.c:984:124: error: invalid operands to binary / (have ?void *? and ?int?)
> drivers/mtd/chips/cfi_cmdset_0002.c:1034:10: warning: assignment makes integer from pointer without a cast [enabled by default]
> drivers/mtd/chips/cfi_cmdset_0002.c:1045:118: error: invalid operands to binary / (have ?void *? and ?int?)
> 
> Looks like arch/arm/mach-pxa/include/mach/mtd-xip.h can't find ICIP or ICMR...
> 

Right, I also have a workaround for that one, but found later that it
won't work. I think this is the patch that broke it five years ago:

commit 5d284e353eb11ab2e8b1c5671ba06489b0bd1e0c
Author: Eric Miao <eric.y.miao@gmail.com>
Date:   Wed Apr 27 22:48:04 2011 +0800

    ARM: pxa: avoid accessing interrupt registers directly
    
    Signed-off-by: Eric Miao <eric.y.miao@gmail.com>

diff --git a/arch/arm/mach-pxa/include/mach/regs-intc.h b/arch/arm/mach-pxa/include/mach/regs-intc.h
deleted file mode 100644
index 662288eb6f95..000000000000
--- a/arch/arm/mach-pxa/include/mach/regs-intc.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef __ASM_MACH_REGS_INTC_H
-#define __ASM_MACH_REGS_INTC_H
-
-#include <mach/hardware.h>
-
-/*
- * Interrupt Controller
- */
-
-#define ICIP           __REG(0x40D00000)  /* Interrupt Controller IRQ Pending Register */
-#define ICMR           __REG(0x40D00004)  /* Interrupt Controller Mask Register */
-#define ICLR           __REG(0x40D00008)  /* Interrupt Controller Level Register */
-#define ICFP           __REG(0x40D0000C)  /* Interrupt Controller FIQ Pending Register */
-#define ICPR           __REG(0x40D00010)  /* Interrupt Controller Pending Register */
-#define ICCR           __REG(0x40D00014)  /* Interrupt Controller Control Register */
-#define ICHP           __REG(0x40D00018)  /* Interrupt Controller Highest Priority Register */

and it's possible that nobody ever noticed...

I guess we can bring back the macros for the case that MTD_XIP and XIP_KERNEL
are both enabled.

	Arnd

  reply	other threads:[~2016-03-05  0:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-25 15:41 [PATCH] mtd: only use __xipram annotation when XIP_KERNEL is set Arnd Bergmann
2016-03-05  0:02 ` Brian Norris
2016-03-05  0:10   ` Brian Norris
2016-03-05  0:24     ` Arnd Bergmann [this message]
2016-03-05  8:45       ` Robert Jarzmik
2016-03-06 19:56         ` Arnd Bergmann
2016-03-05  0:19   ` Arnd Bergmann
2016-03-05  0:22     ` Brian Norris
2016-03-05  0:28       ` David Woodhouse
2016-03-05  0:43         ` Brian Norris
2016-03-17 15:56           ` Arnd Bergmann
2016-03-05  0:33       ` Arnd Bergmann
2016-03-07 16:43         ` Tony Lindgren

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=3582240.H8v1IXn8EB@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).