From: Kevin Hilman <khilman@deeprootsystems.com>
To: Jean Pihet <jean.pihet@newoldbits.com>
Cc: linux-omap@vger.kernel.org, "G, Manjunath Kondaiah" <manjugk@ti.com>
Subject: Re: [PATCH] Revert "OMAP: mach-omap2: Fix incorrect assignment warnings"
Date: Fri, 08 Oct 2010 13:06:30 -0700 [thread overview]
Message-ID: <87y6a8v48p.fsf@deeprootsystems.com> (raw)
In-Reply-To: <AANLkTimCXyTh30iGVd2j8JUcfT2a0+xrT8AqjX=qQ0k+@mail.gmail.com> (Jean Pihet's message of "Fri, 8 Oct 2010 18:49:13 +0200")
Jean Pihet <jean.pihet@newoldbits.com> writes:
> This patch reverts commit 914bab936fe0388a529079679e2f137aa4ff548d, which
> breaks the OFF mode on the OMAP3 platforms.
> The details are here below.
>
> The intent behind the original patch was to fix some compiler
> warnings, which I do not have on my side. Is the problem dependent on
> the setup and config used?
> From ec85bc90978cf0f257e73eaad593ffb774595863 Mon Sep 17 00:00:00 2001
> From: Jean Pihet <jean.pihet@newoldbits.com>
> Date: Fri, 8 Oct 2010 18:36:48 +0200
> Subject: [PATCH] Revert "OMAP: mach-omap2: Fix incorrect assignment warnings"
>
> This reverts commit 914bab936fe0388a529079679e2f137aa4ff548d, which
> breaks the OFF mode on the OMAP3 platforms.
>
> The use of a void* pointer for scratchpad_address confuses the
> compiler which generates wrong offset for the access to the L4
> address space. In that case an alignement fault is generated
> during the wake-up from OFF mode.
>
> The code that causes problem is:
> __raw_readl(scratchpad_address + OMAP343X_TABLE_ADDRESS_OFFSET);
Thanks Jean for tracking down why off-mode was broken on the master
branch.
I completely agree this patch should be reverted. However, the
description here could be a litle more descriptive.
Specifically, the compiler is not confused and generating the wrong
offset. The compiler is doing what it was told told.
The problem is that the original patch rather blindly replaced a u32
pointer with a void pointer to fix a sparse warning. However, the code
using that pointer was doing pointer math which has different results
for a void pointer than for a u32 pointer.
I'll reply in more detail to the original patch.
Kevin
next prev parent reply other threads:[~2010-10-08 20:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-08 16:49 [PATCH] Revert "OMAP: mach-omap2: Fix incorrect assignment warnings" Jean Pihet
2010-10-08 17:53 ` Paul Walmsley
2010-10-08 20:06 ` Kevin Hilman [this message]
2010-10-08 22:47 ` Kevin Hilman
2010-10-09 6:55 ` Jean Pihet
2010-10-11 8:31 ` Jean Pihet
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=87y6a8v48p.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=jean.pihet@newoldbits.com \
--cc=linux-omap@vger.kernel.org \
--cc=manjugk@ti.com \
/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.