Age | Commit message (Collapse) | Author | Files | Lines |
|
There is no use for time, remove it.
Fixes the following error (and the warning once stdint.h was included):
libc/test/run-time.c:40:2: error: unknown type name ‘uint32_t’
uint32_t time;
libc/test/run-time.c:41:11: warning: unused variable ‘time’
[-Wunused-variable]
uint32_t time;
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Both the FSP RTC and the upcoming IPMI RTC implementation need to
manipulate time in various ways. Rather than re-implementing slightly
different versions of the calculations twice lets implement some
standard library functions (with tests) and use those.
This patch adds mktime and gmtime_r to the libc.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
For better debugability, the patch adds git version and backtrace
details to user data section (along with file info which was already
present).
After adding required details TermImmedData looks like:
TermImmedData |
| 00000000 63386631 6639322D 64697274 793A0000 c8f1f92-dirty:.. |
| 00000010 00000000 00000000 00000000 00000000 ................ |
| 00000020 00000000 00000000 43505520 30303030 ........CPU 0000 |
| 00000030 30303264 20426163 6B747261 63653A0A 002d Backtrace:. |
| 00000040 20533A20 30303030 30303030 33316162 S: 0000000031ab |
| 00000050 36626130 20523A20 30303030 30303030 6ba0 R: 00000000 |
| 00000060 33303031 33306238 0A20533A 20303030 300130b8. S: 000 |
| 00000070 30303030 30333161 62366334 3020523A 0000031ab6c40 R: |
| 00000080 20303030 30303030 30333030 34623738 000000003004b78 |
| 00000090 380A2053 3A203030 30303030 30303331 8. S: 0000000031 |
| 000000A0 61623663 63302052 3A203030 30303030 ab6cc0 R: 000000 |
| 000000B0 30303330 30313736 31300A20 533A2030 0030017610. S: 0 |
| 000000C0 30303030 30303033 31616236 64343020 000000031ab6d40 |
| 000000D0 523A2030 30303030 30303033 30303035 R: 0000000030005 |
| 000000E0 3133340A 20533A20 30303030 30303030 134. S: 00000000 |
| 000000F0 33316162 36663030 20523A20 30303030 31ab6f00 R: 0000 |
| 00000100 30303030 33303030 32353534 0A000000 000030002554.... |
| 00000110 00000000 00000000 00000000 00000000 ................ |
| 00000120 00000000 00000000 00000000 00000000 ................ |
| 00000130 00000000 00000000 00000000 00000000 ................ |
| 00000140 00000000 00000000 00000000 00000000 ................ |
| 00000150 00000000 00000000 00000000 00000000 ................ |
| 00000160 00000000 00000000 00000000 00000000 ................ |
| 00000170 00000000 00000000 00000000 00000000 ................ |
| 00000180 00000000 00000000 00000000 00000000 ................ |
| 00000190 00000000 00000000 00000000 00000000 ................ |
| 000001A0 00000000 00000000 00000000 00000000 ................ |
| 000001B0 00000000 00000000 00000000 00000000 ................ |
| 000001C0 00000000 00000000 00000000 636F7265 ............core |
| 000001D0 2F6F7061 6C2E633A 3233383A 30000000 /opal.c:238:0... |
|------------------------------------------------------------------------------|
Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Moving assert_fail() out of libc and into core/utils.c so that we can
sanely call prlog(PR_EMERG).
We shorten it from three fputs calls down to one prlog() call.
This may increase the number of cycles and stack usage for when we
hit an assert, which may not be desirable.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Replace the libc printf implementation with a wrapper that does
fancy log things such as display timestamp and the log level.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
At present CPU control area ntuple in SPIRA structure is NULL.
ATTN component in Service Processor side checks for this field and if its empty,
it logs hardcoded SRC (0xBB821410) and generates SYSDUMP. So we have 1 SRC for
all failure (assert call) from OPAL side. This makes difficult to debug the issue.
Service processor provides attention area interface (FIPS PHyp Attentions spec),
so that we can pass SRC and user data (error message) to service processor.
This will helps us identify different failures in OPAL.
This patch enables attention area and provides interface (update_sp_attn_area())
to add src and user data (error message) through assert macro.
Attention SRC format:
1st byte - Opal src type
2-4 bytes - Holds the address of the assert function call
Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|