提交 cfc6a554 编写于 作者: E Eric Miao 提交者: Eric Miao

ARM: pxa: fix cpu_is_pxa*() not expanding to zero when not configured

When CONFIG_PXA3xx is not selected, cpu_is_pxa3xx() doesn't expand to
zero, which in some places doesn't result in correct optimization.
Signed-off-by: NEric Miao <eric.y.miao@gmail.com>
Reported-and-tested-by: NMarek Vasut <marek.vasut@gmail.com>
上级 32c4dad8
...@@ -264,23 +264,35 @@ ...@@ -264,23 +264,35 @@
* <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x
* == 0x3 for pxa300/pxa310/pxa320 * == 0x3 for pxa300/pxa310/pxa320
*/ */
#if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x)
#define __cpu_is_pxa2xx(id) \ #define __cpu_is_pxa2xx(id) \
({ \ ({ \
unsigned int _id = (id) >> 13 & 0x7; \ unsigned int _id = (id) >> 13 & 0x7; \
_id <= 0x2; \ _id <= 0x2; \
}) })
#else
#define __cpu_is_pxa2xx(id) (0)
#endif
#ifdef CONFIG_PXA3xx
#define __cpu_is_pxa3xx(id) \ #define __cpu_is_pxa3xx(id) \
({ \ ({ \
unsigned int _id = (id) >> 13 & 0x7; \ unsigned int _id = (id) >> 13 & 0x7; \
_id == 0x3; \ _id == 0x3; \
}) })
#else
#define __cpu_is_pxa3xx(id) (0)
#endif
#if defined(CONFIG_CPU_PXA930) || defined(CONFIG_CPU_PXA935)
#define __cpu_is_pxa93x(id) \ #define __cpu_is_pxa93x(id) \
({ \ ({ \
unsigned int _id = (id) >> 4 & 0xfff; \ unsigned int _id = (id) >> 4 & 0xfff; \
_id == 0x683 || _id == 0x693; \ _id == 0x683 || _id == 0x693; \
}) })
#else
#define __cpu_is_pxa93x(id) (0)
#endif
#define cpu_is_pxa2xx() \ #define cpu_is_pxa2xx() \
({ \ ({ \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册