All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Timur Tabi <timur@codeaurora.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-watchdog@vger.kernel.org,
	Ashwin Chaugule <ashwin.chaugule@linaro.org>,
	Vipul Gandhi <vgandhi@codeaurora.org>, Fu Wei <fu.wei@linaro.org>,
	Al Stone <al.stone@linaro.org>, Wim Van Sebroeck <wim@iguana.be>,
	Hanjun Guo <hanjun.guo@linaro.org>,
	Graeme Gregory <graeme.gregory@linaro.org>,
	linaro-acpi@lists.linaro.org
Subject: Re: [PATCH] [v2] watchdog: introduce the ARM64 SBSA watchdog driver
Date: Thu, 14 May 2015 16:41:05 -0700	[thread overview]
Message-ID: <55553291.3050009@roeck-us.net> (raw)
In-Reply-To: <55550D8E.6000408@codeaurora.org>

On 05/14/2015 02:03 PM, Timur Tabi wrote:
> On 05/14/2015 03:45 PM, Guenter Roeck wrote:
>> It concerns me that you point to other drivers as argument for using the
>> endianness conversion your code. That raises the question if you really
>> understand the hardware.
>
> The only information I have on how the hardware works is the SBSA document and the internal documentation for our ARM64 server chip.
>
>  > Is the register known to be a little endian register,
>> even on a big endian machine, or is it in host byte order ? You don't really
>> answer that question.
>
> The ARM SBSA says in section 4.1.1:
>
>      * CPUs shall implement little-endian support.
>
That doesn't really say anything. It neither says that the CPU must _run_
in little endian mode, nor does it say anything about its register byte order.

> That's the only reference to endianness in the document.  I don't know if that means that the device registers must also be little-endian. Does Linux even support running ARM64 in big-endian mode?
>

Interesting question. You should be able to answer it yourself.
Hint: Look in arch/arm64/Kconfig.

> So maybe it's safe to say that everything must be little endian?  If so, do I still need the __le32 in the structs, and should I still use cpu_to_le32()?
>

We still don't know if the registers are in host byte order or in little endian
order. If registers are in host byte order, there is no need for a conversion.

Guenter


  reply	other threads:[~2015-05-14 23:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14 16:52 [PATCH] [v2] watchdog: introduce the ARM64 SBSA watchdog driver Timur Tabi
2015-05-14 20:03 ` Arnd Bergmann
2015-05-14 20:15   ` Timur Tabi
2015-05-14 20:45     ` Guenter Roeck
2015-05-14 21:03       ` Timur Tabi
2015-05-14 23:41         ` Guenter Roeck [this message]
2015-05-14 23:49           ` Timur Tabi
2015-05-15  9:16             ` Arnd Bergmann
2015-05-15 12:14               ` Timur Tabi
2015-05-15 13:20                 ` [Linaro-acpi] " Arnd Bergmann
2015-05-15 16:21                   ` Timur Tabi
2015-05-15 18:57                     ` Arnd Bergmann

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=55553291.3050009@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=al.stone@linaro.org \
    --cc=arnd@arndb.de \
    --cc=ashwin.chaugule@linaro.org \
    --cc=fu.wei@linaro.org \
    --cc=graeme.gregory@linaro.org \
    --cc=hanjun.guo@linaro.org \
    --cc=linaro-acpi@lists.linaro.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=timur@codeaurora.org \
    --cc=vgandhi@codeaurora.org \
    --cc=wim@iguana.be \
    /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.