Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Mar 2015 16:49:19 +0000
From:      "zbb (Zbigniew Bodek)" <phabric-noreply@FreeBSD.org>
To:        freebsd-arm@freebsd.org
Subject:   [Differential] [Commented On] D2017: Allow to disable alignment faults in the kernel configuration file
Message-ID:  <b34d9aaa22cda48d72d61bf4f9f0f1c3@localhost.localdomain>
In-Reply-To: <differential-rev-PHID-DREV-phrk75eo7uo5meyd5xay-req@FreeBSD.org>
References:  <differential-rev-PHID-DREV-phrk75eo7uo5meyd5xay-req@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
zbb added a comment.

**Jakub Palider wrote:**
>Yes, I think I understand your reasoning, but you refer to a more
>generic problem, related to CPU settings vs compiler code generation.
>Let me show a more concrete example. Below is an extract from fault when
>there is no ARM32_DISABLE_ALIGNMENT_FAULTS set.
>
>r7=a5b60b36a
>Stopped at      tcp_input+0x738:        ldr     r0, [r7, #0x004]
>
>Here, we can see instruction (LDR) which *does* operate on unaligned
>addresses, so I assume compiler was clever enough not to use any of
>those "forbidden" instructions (e.g. LDMIA/STMIA). Nevertheless the bit
>SCTRL.A set still causes that fault happen and handled in the kernel.
>As for alignment correctness in network code... well, I know it is
>theoretically possible, but ensuring that would come with an
>unacceptable performance cost.
>
>Summing up, I think that the option ought to be exported - especially
>that this patch does no more than just changing feature visibility.
>Feature which had been added to cpufunc.c already - not without a
>reason.

I personally don't understand about what is this discussion because from my point of view we have some portion of code that depends on an option that cannot be set in the configuration file. In this patch we just want to add the possibility to enable it.

REVISION DETAIL
  https://reviews.freebsd.org/D2017

To: zbb, ian, andrew, imp
Cc: meloun-miracle-cz, freebsd-arm



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b34d9aaa22cda48d72d61bf4f9f0f1c3>