From patchwork Sat Nov 12 15:40:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 13041299 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CF68DC4332F for ; Sat, 12 Nov 2022 15:43:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Subject:From:To:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ZVNIuD4HcbWZzzNl+ggTA1KIIjMWyaS2rlff6jBsmKg=; b=Kxry8vhlF/GOvL sCJpBr4rZ/SK+LKiwPvMiLwGyiFMlL5ef8/f0CMmkPo+c0KRswCAf/KMgEz+d6kh/at/FAxQgNAxp hhxxKgYxGd1I6DraRSDPInGQ87d7JMNfOPY8JiY3s3mzNVghfMCUSNnCisAn7hSSu68hY8rjNtSnw Qi+f6hlvy3DkJJyEC6rnOWp/XZFyIKt/JNXdWIBN/E2XWQyC//BpUm1iYsapZyOlkI12KzxvKKGJZ /L3brePinMOVdAAZCDC3RuYADUvMuIiqxSSJug2OL6Uq5ehoyjtLfZMO5ZuQlEPdkM5XqEU06tg9S eYYL6wbSkZF7V7pkV1+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1otsdr-006Tzw-IU; Sat, 12 Nov 2022 15:42:00 +0000 Received: from mail-eopbgr70128.outbound.protection.outlook.com ([40.107.7.128] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1otsd2-006TRA-MO for linux-arm-kernel@lists.infradead.org; Sat, 12 Nov 2022 15:41:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jwqaHWe8eAlKYWcOSryYES4aAJ7jTCTpTvgglVXhmazhEUb88UGuVRHWX2H8JbWI/KVYc1sjW1URE/kC9SFPKEclcqb2bfezkWZofyuytZXE+TsztfuLYS67G3pNs3m3JOA/x4w52t5B/Th7SFQqIyridDW/F83JMhs3tZuI274Afv5NxfVGweKUWZRbOMbWIZ5OCoQJD70WoJFGsrRNa8M8O+8apEy92Hvy09D/uYNXG8IpMACur1ssnbOmJPmGRUB7Tvu0bSoy0kt2EFaKkshOOBIoBFRMsQ9LhAyYycdrxmlfvzyym1pgTxz/B1ixv4ics3cW20Uogii5oL227Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uqhKasZBlkgm5NROFm5coMmTKsICdPOLkS2XWzt0JW8=; b=L2r5TXNhpLcLJtFaxjNxK7PUqMgCHyWm+iPADCyUPohuDmUsGHRcoBQPq+YNBSNSDaV/LAEygbRZpmQ6lRutuzxZQN4LFkn0O2IEi0wTdI7nUfI/qT4zHZumy9+KiCjFftKNz2rge1nUkOr6KGe9JTOAoVUFRtwK4+StdCvWuAs7R9aUjRcdXUUQm3Rnn72Sec0laj5ZtsEBjoA5lKtgwvwE9Z0V2omTpTg/tQN1yrtFk+P4aM4FG15HcY5mcSvf7ae8jrd73X8stLaMm712TyqFW7gNiPqHfaGLadMnyEGBatIxnQicJ521nm9ZDdsjTbKig5A/QLDzw+cYLdq16w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=axentia.se; dmarc=pass action=none header.from=axentia.se; dkim=pass header.d=axentia.se; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axentia.se; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uqhKasZBlkgm5NROFm5coMmTKsICdPOLkS2XWzt0JW8=; b=E38VY+BNQmANMsb/cYpVaUs1aGx31KDYKHhEcMM2eF5YdPBUwQZ6lwks6trCqYMjaBrpjH0rkEjkd7J5UVVWbLK2Ft1M3D8/d6rrU9CgB40PaN23Xzyqh7hXU1g81lo/u+scoTg33tCYzS7EeQtCQgh7djK6qGzx48L8O09BzLc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=axentia.se; Received: from VI1PR02MB4445.eurprd02.prod.outlook.com (2603:10a6:803:ab::28) by AS4PR02MB8384.eurprd02.prod.outlook.com (2603:10a6:20b:51b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.26; Sat, 12 Nov 2022 15:41:01 +0000 Received: from VI1PR02MB4445.eurprd02.prod.outlook.com ([fe80::ad1e:9bed:b822:8d08]) by VI1PR02MB4445.eurprd02.prod.outlook.com ([fe80::ad1e:9bed:b822:8d08%7]) with mapi id 15.20.5813.013; Sat, 12 Nov 2022 15:41:01 +0000 Message-ID: Date: Sat, 12 Nov 2022 16:40:59 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-US To: linux-kernel@vger.kernel.org From: Peter Rosin Subject: [PATCH] ARM: at91: fix build for SAMA5D3 w/o L2 cache X-ClientProxiedBy: GV3P280CA0032.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:9::33) To VI1PR02MB4445.eurprd02.prod.outlook.com (2603:10a6:803:ab::28) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR02MB4445:EE_|AS4PR02MB8384:EE_ X-MS-Office365-Filtering-Correlation-Id: 52caad54-b4a3-4b2b-6bc0-08dac4c44cfc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SlfOTP3MsrUf9MPbTn9OB3u1ZQvKADC1eXyrLEOC+AHYfPf/kwh447cqJ8lHfOdZFNHQl+cK5HRowDQ+e4AZpH4CW1rWVA2cqRkXHVKy+tQGv5y20RaAUSBqm6H1+jj4A4dIWvesbZqLdotJqPbrxLyGnk3hmj/K4zafWGNYygOi5k+wgqAQDKNbL4Rstx7NcPQANfblM2TyjFY+6U7zCKyA0LOsmtN2UNJAaWHsEIJcMJzCFfe9gP5mnmH0bSR68TvXRzsiKh7RW+Ydb7vDRoqugQD8kWfM6B/ZGLyFTu2WSkAIL8wuQ1D64nekFoUkGu1VJoNn1gdAgGDbeAfViUY8cph7NjRx/wKcqflBFXV8mObxxQz3r+wi+E1oqJRwf8j+VsV6yXF8uEJZ3/pnxDPng70YuqVA0ppV0KWCOf90EH2JsxlxRghYm9q+Sz8aWjtkhPbHuj95Js5q8OILNsg1Dd0n2F/8Xhgt1ZXLfooSS4OiIvW9rEQSsIg7RS1cCpY+eCTsFn4pWSnBNVG4lCoAU30GOHXAFxVJV7LxUTWWMpR3WPY4LosdSmQr76/q8MZW1gGJnol6qMg5yYHBL8sL7I8qHMdqamyDo9rqoBWrjbN5afuR9zsRamkuuU0RcSsdXedHS7BYablFrssof34c2aeUAlbWHEE5frDAhmANx6YIgvb2om7kh7L9nQeGuLevLhvylnqK6lxW3oR56tvkPmMGkRkFt26avW7oF4jUMVLEiRc2RS9dN8+B6Q5KMGXtfJx+tqVmmuC3Vsjo/s/hk6jF7lG6It9r1lcmzxU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR02MB4445.eurprd02.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(136003)(376002)(396003)(366004)(39830400003)(346002)(451199015)(186003)(6512007)(38100700002)(4326008)(26005)(83380400001)(6506007)(2906002)(2616005)(478600001)(316002)(5660300002)(6486002)(41300700001)(54906003)(8936002)(6916009)(8676002)(66476007)(66556008)(66946007)(36756003)(31696002)(86362001)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?88Ax2cY81x6Pkuq9EvqId3OzGXrF?= =?utf-8?q?GNsBOcjPCkO7UX7u0K2caaPSgefIfZe4qilw8m2WP9l4Qx+VLTZFcIluBQ8r1B7i2?= =?utf-8?q?N/FBpWy4I9Xm2YGUz6EQdrCkeAWcLikFylSfSHdZqeTAJVHzYV329P8txPQiOE2ay?= =?utf-8?q?06UvBQFlsiYUA3sh8AP55JBellOCmZ23YFGgyyqQviDyCtDqvBZkULaTpZm5xgrf1?= =?utf-8?q?9wwk7VfIU7y1dG1SgXB/h3cNLEHXgSYqaeY0pHfBTLUXKkfmv0NfJIqZPp4V6deMs?= =?utf-8?q?/3PCnq5NS/SXkWlSZ5wCEirMH4lOlTrp7hKs9rXFZQNcFOME0+NkqDQO9L8o1ObhJ?= =?utf-8?q?PbQm64AOrNIQhwCMD5U0RG23W4lpNy/bqc2lo6bV1yZgctzQRYiKcGinD6fB9+CnE?= =?utf-8?q?WM4tR5uo0OvbzbYWQYhufXMGkzjLH8R41TY5IeBFqdll7HRiNaWIyG7sfYBQHg1G0?= =?utf-8?q?demGzIWuk+fhC3CJ+wZ0ck1bvHlPVQJgC86q2Uq+MljPbaLJqR8FesGxMrgVhGyfJ?= =?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=?utf-8?q?i9Qxy3SdFMNHhWheMYAc5W/OrvAGxajItV697oAPZBdlr6Z2k6pCFni4zt/62bna1?= =?utf-8?q?e+eUg31n2NQBwkuKu5j+6GgyeY3vBe/I3KzRpvdLZP9NutbDxok9TFc6tMXy1waEr?= =?utf-8?q?IpmcW/kVKysh?= X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-Network-Message-Id: 52caad54-b4a3-4b2b-6bc0-08dac4c44cfc X-MS-Exchange-CrossTenant-AuthSource: VI1PR02MB4445.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Nov 2022 15:41:01.2466 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hmg2Vha/DRPJLPFIU3Q8f5KH5TRU4/i8aEZ8yrgv9QF5q6LlEhj83ak6FW2Gjl7S X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR02MB8384 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221112_074109_608897_547736AF X-CRM114-Status: GOOD ( 13.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Russell King , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Claudiu Beznea , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The L2 cache is present on the newer SAMA5D2 and SAMA5D4 families, but apparently not for the older SAMA5D3. At least not always. Solves a build-time regression with the following symptom: sama5.c:(.init.text+0x48): undefined reference to `outer_cache' Fixes: 3b5a7ca7d252 ("ARM: at91: setup outer cache .write_sec() callback if needed") Signed-off-by: Peter Rosin --- arch/arm/mach-at91/sama5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Hi! I'm not sure this is the correct solution? Maybe SAMA5D3 should bring in CONFIG_OUTER_CACHE unconditionally instead? But that seems like a bigger change, and not just a tweak of the regressing commit... Cheers, Peter diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c index 67ed68fbe3a5..bf2b5c6a18c6 100644 --- a/arch/arm/mach-at91/sama5.c +++ b/arch/arm/mach-at91/sama5.c @@ -26,7 +26,7 @@ static void sama5_l2c310_write_sec(unsigned long val, unsigned reg) static void __init sama5_secure_cache_init(void) { sam_secure_init(); - if (sam_linux_is_optee_available()) + if (IS_ENABLED(CONFIG_OUTER_CACHE) && sam_linux_is_optee_available()) outer_cache.write_sec = sama5_l2c310_write_sec; }