diff mbox series

hdata: Fix SP attention area address

Message ID 20200205105805.13227-1-hegdevasant@linux.vnet.ibm.com
State Accepted
Headers show
Series hdata: Fix SP attention area address | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (179d53dfcca30436777b0c748d530a979bbc8a45)
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present

Commit Message

Vasant Hegde Feb. 5, 2020, 10:58 a.m. UTC
SP attention area is aligned. We were sending wrong address.
Hence `attn` on FSP based system is failing. Align SP attention
area so that FSP can locate attention data.

Fixes: 518e554 (spira: fix endian conversions in spira data structures)
CC: Nicholas Piggin <npiggin@gmail.com>

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
 hdata/spira.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Oliver O'Halloran Feb. 17, 2020, 4:04 a.m. UTC | #1
On Wed, Feb 5, 2020 at 9:58 PM Vasant Hegde
<hegdevasant@linux.vnet.ibm.com> wrote:
>
> SP attention area is aligned. We were sending wrong address.
> Hence `attn` on FSP based system is failing. Align SP attention
> area so that FSP can locate attention data.
>
> Fixes: 518e554 (spira: fix endian conversions in spira data structures)
> CC: Nicholas Piggin <npiggin@gmail.com>
>
> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>

Thanks, merged as eebee394a618240123974e78a90f8b6e1ff54443
diff mbox series

Patch

diff --git a/hdata/spira.c b/hdata/spira.c
index 7c5918d2d..76c3d60a5 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -11,6 +11,7 @@ 
 #include <opal-dump.h>
 #include <fsp-attn.h>
 #include <fsp-leds.h>
+#include <skiboot.h>
 
 #include "hdata.h"
 #include "hostservices.h"
@@ -58,7 +59,7 @@  extern struct hsr_data_area cpu_ctl_hsr_area;
  */
 #define CPU_CTL_INIT_DATA_OFF		(CPU_CTL_OFF)
 #define CPU_CTL_SPAT_AREA_OFF		(CPU_CTL_INIT_DATA_OFF + sizeof(struct cpu_ctl_init_data) + SKIBOOT_BASE)
-#define CPU_CTL_SP_ATTN_AREA1_OFF	(CPU_CTL_SPAT_AREA_OFF + sizeof(struct sp_addr_table))
+#define CPU_CTL_SP_ATTN_AREA1_OFF	(ALIGN_UP((CPU_CTL_SPAT_AREA_OFF + sizeof(struct sp_addr_table)), ATTN_AREA_SZ))
 #define CPU_CTL_SP_ATTN_AREA2_OFF	(CPU_CTL_SP_ATTN_AREA1_OFF + sizeof(struct sp_attn_area))
 #define CPU_CTL_HSR_AREA_OFF		(CPU_CTL_SP_ATTN_AREA2_OFF + sizeof(struct sp_attn_area))