From patchwork Tue May 16 19:39:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94892 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp663682vqo; Tue, 16 May 2023 12:49:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7vx0arbEEf9sD1CSmNqtGQ5Lt/bLMN+5dwXnNTYzOmgEXNctsWHTudjo5Lg6aWXWFJ80a/ X-Received: by 2002:a05:6a20:cd:b0:103:d2cd:4dec with SMTP id 13-20020a056a2000cd00b00103d2cd4decmr18060996pzh.55.1684266572885; Tue, 16 May 2023 12:49:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684266572; cv=none; d=google.com; s=arc-20160816; b=HzPjCFZvZVgpyCrK+b3fpGdm4LuuvPk5084tHe1oQ4yi+tMrvYGKTHThOAYPH8bUCY 65YUYaup+Bs9N6YTqN6P8ytfs7oK0XWKdOvVWd7oSQZXHTtdFShJNqt+OZBT9il/ef99 rtwbNdBe8O6Ld3LUN1sKB7IUvZUYJWY3QvzRLvdmobssa3teRoPMIWzi03O/AT3mkm3p vU+OWX5UZYhpD+1jQnsZAJSJT4d5Hjo/wUaTN+1XpwpB/G4jZCIh9OUyftH5Pi05Bc9z nqtZIO+sG4VyuABnbYJ9sj/b4qN6hKNYsPjWmas+Jj/gB8rv6FxIHU235HHQXGRWvnyM nuxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=PG58NQMQBsZoD1f1hPZB7YEsg0Uj68I50AXN14phZwM=; b=dsHuzPlIHk/IcZn6DXxGlT3fNCppNROmI6RXEDIk4W6YwwSzH8WYW+IeeJJsydwrUK iW/x0maHX5Dtov3nhzqwlyOvstsae8S/r8Xne6vfsYy3+9Xo/ilR7OtGrPwbuAgSoUZ/ j6mqiR2yGLp0trPWTCDfysoRyhwsJMhNA/ChJEupIGalZVRAFa71MIBvI+n3nf96YJrl JU0+6s/+7R3+EZUES0t0ylTF8P/ze7SjYngJBMwlzAgpNLry0bw9t+t8KklNi4RICP5J VTK82xZak0DtmkAFRG+Ns8TA3xpJprLQ19PEh1CICKJO//WswX9k2nE1kGHYFMzkToY4 1Dzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PPja12+j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l64-20020a638843000000b00534253c0576si4810773pgd.535.2023.05.16.12.49.20; Tue, 16 May 2023 12:49:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PPja12+j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230205AbjEPTln (ORCPT + 99 others); Tue, 16 May 2023 15:41:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230085AbjEPTle (ORCPT ); Tue, 16 May 2023 15:41:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FE454494; Tue, 16 May 2023 12:41:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BF0F5635A1; Tue, 16 May 2023 19:40:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD8D0C433EF; Tue, 16 May 2023 19:40:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684266009; bh=8n2CvzDo289ObcDnbgcLUxlNv6SunFRuUSz2MeWdEMM=; h=From:To:Cc:Subject:Date:From; b=PPja12+jUDGrCbIzpFocVLXHKNfRllVRa/7kobiZhwTwubGr2MFZw3y/5/bvrEThA 6WGO5HuaTDWe0pTkZTYjFic6nTQPW1y6R0j7/qko/z2uhI8mzQuFlE+F8v0jV5ZA3E kmoXEWxYtS7L2k2x0Q0sOCBdMiYZgIwHHyxmgtABBeENRgim1TWHxLzFiK9At1lMYJ bAMffkM6q+jFgAxDo7kq6qiANwmEeUEKDR/6i9YugWrRPujT0/sTlnRmOpckxiq6Vr gtFoFG6xUDZrBqapU28gMi80jXfo4h54UuTP/g20HqiPcM3vdS0rL2jF0zX2p0IFAA OGpcDJsH+d8vQ== From: Arnd Bergmann To: Thomas Bogendoerfer Cc: Arnd Bergmann , Greg Kroah-Hartman , Geert Uytterhoeven , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] mips: provide unxlate_dev_mem_ptr() in asm/io.h Date: Tue, 16 May 2023 21:39:42 +0200 Message-Id: <20230516194000.548487-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766081506186027276?= X-GMAIL-MSGID: =?utf-8?q?1766081506186027276?= From: Arnd Bergmann The unxlate_dev_mem_ptr() function has no prototype on the mips architecture, which does not include asm-generic/io.h, so gcc warns about the __weak definition: drivers/char/mem.c:94:29: error: no previous prototype for 'unxlate_dev_mem_ptr' [-Werror=missing-prototypes] Since everyone else already gets the generic definition or has a custom one, there is not really much point in having a __weak version as well. Remove this one, and instead add a trivial macro to the mips header. Once we convert mips to use the asm-generic header, this can go away again. Signed-off-by: Arnd Bergmann --- arch/mips/include/asm/io.h | 1 + drivers/char/mem.c | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index cc28d207a061..affd21e9c20b 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h @@ -554,6 +554,7 @@ extern void (*_dma_cache_inv)(unsigned long start, unsigned long size); * access */ #define xlate_dev_mem_ptr(p) __va(p) +#define unxlate_dev_mem_ptr(p, v) do { } while (0) void __ioread64_copy(void *to, const void __iomem *from, size_t count); diff --git a/drivers/char/mem.c b/drivers/char/mem.c index f494d31f2b98..94eff6a2a7b6 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -90,13 +90,6 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size) } #endif -#ifndef unxlate_dev_mem_ptr -#define unxlate_dev_mem_ptr unxlate_dev_mem_ptr -void __weak unxlate_dev_mem_ptr(phys_addr_t phys, void *addr) -{ -} -#endif - static inline bool should_stop_iteration(void) { if (need_resched()) From patchwork Tue May 16 19:39:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94893 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp663927vqo; Tue, 16 May 2023 12:50:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6amwtaRNtkD+QyZ52PzkfTMEyL3S+mUkUKeu0pz8GLgAE8TSjzYI5SIF5JwmgY7XsEUHBP X-Received: by 2002:a17:90a:f0d1:b0:253:26e5:765a with SMTP id fa17-20020a17090af0d100b0025326e5765amr2306417pjb.48.1684266604912; Tue, 16 May 2023 12:50:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684266604; cv=none; d=google.com; s=arc-20160816; b=F6C98wOdea52FG5zNV/zxuwoiZ+fuSk94QnRSIMStmcifhoSX14ezMAyzu1h1x0KHV 580oy37RPmWNtfp/Ze0LDzMDy25oLW14qhBjiYTIX2X7ztgijMB+hkGXNFRauSMrPyqh Ii59NQ82DvQka9KRtKpCJlFFy8rkLGi4MaWZy4uYVgS5LOCPkce4lzIRMwgHF/kiF7fv mw7XEcOhG2u2d1e/wAZogtP44bIemq5fN3U0WRZZPA3xjoaYOZNqnKgclUG6YF6ccqtv KLAhQO0l5pmtT5IXcEJgCXQIKNYMCjwbb3PEfykqcV0bhlNqnNz1xcmmcLIcCQoWiPGF QY/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wagfD2xPf4w7xjsc66G9teyLkex06RJHs0hIaQiVLEg=; b=Ql8tUAjjzvQHcyTYKHPgJ/+9U2XImaVvpcn44Noyu1pvGhwHrXiMKNiziLnN9m11vg YYOSPzjx3zEZ54NdF0kxcBTEzM8oivJbxP+vSioNWDiC/3P1+gGRf4xw6tD0HU756D5C pIo1QbtjsI9jvPAuvJHlOgkFKQNVlwsGPnNJYVdLqSp+DSIEBIq5U5ehdLPUanf6yM8R a7kLD4dyDntF82pKmGwcpMYsUev3zdiBtIdPmSbMaEX2VWjh+R2PqxH6SZpJse11JIUC nR0llM4rK2jP6bwL4QB/tRe2P+gFiW+tNAqER4PIKAW89CsXyHHYSzFTovlAqphhLiUD fFvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VvSe0V1I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y17-20020a63b511000000b005031abe8d8bsi12685762pge.745.2023.05.16.12.49.52; Tue, 16 May 2023 12:50:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VvSe0V1I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229935AbjEPTll (ORCPT + 99 others); Tue, 16 May 2023 15:41:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229905AbjEPTle (ORCPT ); Tue, 16 May 2023 15:41:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57CF5AD13; Tue, 16 May 2023 12:41:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 99DB16324B; Tue, 16 May 2023 19:40:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31695C4339B; Tue, 16 May 2023 19:40:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684266022; bh=jJJcduVZoL7FA07spYoM0rBgXI6P51X+u5P3BZBB8fU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VvSe0V1IjrV/xFL3ACCeditJS5NKMhIffRaUX/X6MOSnLt3NG4iN/7P07PEq9pQtu mgSLVxphCbj7fdh/UKsfk4HjiIZn3RbHL2pzJsNvwWK9RGRlnkdKkt/raraPfB1sV7 daSCbdfM8GNCmhkkqjzctsDV1Za66AzuIgNvxQey4QHzPIKUBL4pjQqIfFUKPRKSgm hqkWcOL5VzJqBx02Wp1bdFEUVZVM1sydcwWi5ZYIcpGKU5hiP2BLDNwn8jOYCFS6fC PuGngq4gX5q3w8wm49Uba4ldqZPo4CoWWIPblDRg3VnuR8EO4m4GiCOWyoqIPyghap IGuGelICq4oJA== From: Arnd Bergmann To: Thomas Bogendoerfer Cc: Arnd Bergmann , Mike Rapoport , Andrew Morton , "Matthew Wilcox (Oracle)" , Jiaxun Yang , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] mips: asm-offsets: add missing prototypes Date: Tue, 16 May 2023 21:39:43 +0200 Message-Id: <20230516194000.548487-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516194000.548487-1-arnd@kernel.org> References: <20230516194000.548487-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766081539241978511?= X-GMAIL-MSGID: =?utf-8?q?1766081539241978511?= From: Arnd Bergmann Building with -Werror and W=1 fails entirely because of warnings in asm-offsets.c: arch/mips/kernel/asm-offsets.c:26:6: error: no previous prototype for 'output_ptreg_defines' [-Werror=missing-prototypes] arch/mips/kernel/asm-offsets.c:78:6: error: no previous prototype for 'output_task_defines' [-Werror=missing-prototypes] arch/mips/kernel/asm-offsets.c:92:6: error: no previous prototype for 'output_thread_info_defines' [-Werror=missing-prototypes] arch/mips/kernel/asm-offsets.c:108:6: error: no previous prototype for 'output_thread_defines' [-Werror=missing-prototypes] arch/mips/kernel/asm-offsets.c:136:6: error: no previous prototype for 'output_thread_fpu_defines' [-Werror=missing-prototypes] Nothing actually calls these functions, so just add prototypes to shut up the warnings. Signed-off-by: Arnd Bergmann --- arch/mips/kernel/asm-offsets.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c index 40fd4051bb3d..d1b11f66f748 100644 --- a/arch/mips/kernel/asm-offsets.c +++ b/arch/mips/kernel/asm-offsets.c @@ -23,6 +23,7 @@ #include +void output_ptreg_defines(void); void output_ptreg_defines(void) { COMMENT("MIPS pt_regs offsets."); @@ -75,6 +76,7 @@ void output_ptreg_defines(void) BLANK(); } +void output_task_defines(void); void output_task_defines(void) { COMMENT("MIPS task_struct offsets."); @@ -89,6 +91,7 @@ void output_task_defines(void) BLANK(); } +void output_thread_info_defines(void); void output_thread_info_defines(void) { COMMENT("MIPS thread_info offsets."); @@ -105,6 +108,7 @@ void output_thread_info_defines(void) BLANK(); } +void output_thread_defines(void); void output_thread_defines(void) { COMMENT("MIPS specific thread_struct offsets."); @@ -133,6 +137,7 @@ void output_thread_defines(void) } #ifdef CONFIG_MIPS_FP_SUPPORT +void output_thread_fpu_defines(void); void output_thread_fpu_defines(void) { OFFSET(THREAD_FPU, task_struct, thread.fpu); @@ -176,6 +181,7 @@ void output_thread_fpu_defines(void) } #endif +void output_mm_defines(void); void output_mm_defines(void) { COMMENT("Size of struct page"); @@ -210,6 +216,7 @@ void output_mm_defines(void) } #ifdef CONFIG_32BIT +void output_sc_defines(void); void output_sc_defines(void) { COMMENT("Linux sigcontext offsets."); @@ -232,6 +239,7 @@ void output_sc_defines(void) #endif #ifdef CONFIG_64BIT +void output_sc_defines(void); void output_sc_defines(void) { COMMENT("Linux sigcontext offsets."); @@ -245,6 +253,7 @@ void output_sc_defines(void) } #endif +void output_signal_defined(void); void output_signal_defined(void) { COMMENT("Linux signal numbers."); @@ -284,6 +293,7 @@ void output_signal_defined(void) } #ifdef CONFIG_CPU_CAVIUM_OCTEON +void output_octeon_cop2_state_defines(void); void output_octeon_cop2_state_defines(void) { COMMENT("Octeon specific octeon_cop2_state offsets."); @@ -315,6 +325,7 @@ void output_octeon_cop2_state_defines(void) #endif #ifdef CONFIG_HIBERNATION +void output_pbe_defines(void); void output_pbe_defines(void) { COMMENT(" Linux struct pbe offsets. "); @@ -327,6 +338,7 @@ void output_pbe_defines(void) #endif #ifdef CONFIG_CPU_PM +void output_pm_defines(void); void output_pm_defines(void) { COMMENT(" PM offsets. "); @@ -341,6 +353,7 @@ void output_pm_defines(void) #endif #ifdef CONFIG_MIPS_FP_SUPPORT +void output_kvm_defines(void); void output_kvm_defines(void) { COMMENT(" KVM/MIPS Specific offsets. "); @@ -385,6 +398,7 @@ void output_kvm_defines(void) #endif #ifdef CONFIG_MIPS_CPS +void output_cps_defines(void); void output_cps_defines(void) { COMMENT(" MIPS CPS offsets. ");