All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@nokia.com>
To: Kyungmin Park <kmpark@infradead.org>
Cc: "Bityutskiy Artem \(Nokia-D/Helsinki\)"
	<Artem.Bityutskiy@nokia.com>,
	linux-mtd Mailing List <linux-mtd@lists.infradead.org>
Subject: Re: UBIFS abnormal unaligned access at OneNAND 4KiB page
Date: Mon, 03 Aug 2009 12:08:04 +0300	[thread overview]
Message-ID: <4A76A8F4.60601@nokia.com> (raw)
In-Reply-To: <9c9fda240908030157y57ff53c1la1fc1e41a2fb435d@mail.gmail.com>

Kyungmin Park wrote:
> On Mon, Aug 3, 2009 at 4:51 PM, Adrian Hunter<adrian.hunter@nokia.com> wrote:
>> Kyungmin Park wrote:
>>> On Mon, Aug 3, 2009 at 3:40 PM, Adrian Hunter<adrian.hunter@nokia.com>
>>> wrote:
>>>> Kyungmin Park wrote:
>>>>> On Mon, Aug 3, 2009 at 3:29 PM, Adrian Hunter<adrian.hunter@nokia.com>
>>>>> wrote:
>>>>>> Kyungmin Park wrote:
>>>>>>> Now I'm working with 4KiB pagesize OneNAND, I got problem with
>>>>>>> unaligned byte align again.
>>>>>>>
>>>>>>> <7>UBIFS DBG (pid 1): read_znode: LEB 78:205824, level 0, 8 branch
>>>>>>> <7>UBIFS DBG (pid 1): ubifs_read_node: LEB 78:206016, indexing node,
>>>>>>> length 48
>>>>>>> onenand_mlc_read_ops_nolock[1108] buf c41bda80 1216 48
>>>>>>> <7>UBIFS DBG (pid 1): read_znode: LEB 78:206016, level 0, 1 branch
>>>>>>> onenand_mlc_read_ops_nolock[1108] buf c40a68c0 441 13
>>>>>>> onenand_read_bufferram[674] area 0x400, buffer c40a68c0, offset 441,
>>>>>>> count
>>>>>>> 13
>>>>>>> <1>Unhandled fault: external abort on non-linefetch (0x1008) at
>>>>>>> 0xc58805ba
>>>>>>>
>>>>>>> In the previous time, we got the similar case. but the problem gone
>>>>>>> with some patch. but it happens again.
>>>>>>>
>>>>>>> Do you have any idea?
>>>>>> It is up to your driver to meet your bus requirements.  If the bus
>>>>>> requires
>>>>>> word (2 bytes) aligned accesses then you must check the alignment in
>>>>>> the
>>>>>> driver and read the ends words separately.
>>>>> It's onenand_base.c. Only change is page size is 4KiB. others are same.
>>>>>
>>>>>> UBIFS does make unaligned reads to the LPT e.g. reading 13 bytes at
>>>>>> offset
>>>>>> 441
>>>>> I think so. but now I got the these unaligned reads.
>>>>> That's mystery
>>>> Well, onenand_read_bufferram seems to check only the 'count', not the
>>>> 'offset'
>>> I added the handling of offset also
>> Show me
> 
> +       if (ONENAND_CHECK_BYTE_ACCESS(offset)) {
> +               unsigned short word;
> +
> +               printk("%s[%d] area 0x%x, buffer %p, offset %d, count %d\n", __f
> +
> +               /* Read aligned word(16-bit) size */
> +               word = this->read_word(bufferram + offset - 1);
> +               buffer[0] = (word & 0xff00) >> 8;
> +
> +               buffer++;
> +               offset++;

Is it correct to increase the buffer and the offset?


> +               count--;
> +               printk("%s[%d] area 0x%x, buffer %p, offset %d, count %d\n", __f
> +       }
> 

      reply	other threads:[~2009-08-03  9:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-03  5:35 UBIFS abnormal unaligned access at OneNAND 4KiB page Kyungmin Park
2009-08-03  6:29 ` Adrian Hunter
2009-08-03  6:34   ` Kyungmin Park
2009-08-03  6:40     ` Adrian Hunter
2009-08-03  7:00       ` Kyungmin Park
2009-08-03  7:51         ` Adrian Hunter
2009-08-03  8:57           ` Kyungmin Park
2009-08-03  9:08             ` Adrian Hunter [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=4A76A8F4.60601@nokia.com \
    --to=adrian.hunter@nokia.com \
    --cc=Artem.Bityutskiy@nokia.com \
    --cc=kmpark@infradead.org \
    --cc=linux-mtd@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 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.