Received: by 10.223.164.202 with SMTP id h10csp660158wrb; Tue, 14 Nov 2017 07:39:01 -0800 (PST) X-Google-Smtp-Source: AGs4zMZZA/K5qFt2Pne5LmHW/oVOMILkLlh2Wng0WbnyjPFt3VBk4feRku1McyM3MRyFPPx3F4rN X-Received: by 10.98.202.74 with SMTP id n71mr14110695pfg.202.1510673941703; Tue, 14 Nov 2017 07:39:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510673941; cv=none; d=google.com; s=arc-20160816; b=TF1FTTylJjvqO+3dY0942jrpkegtxelpWEMIprVGWFgKzgszQlT3t6LLJ+1KQvXfqa 0/MkKV6pAHn1QcVV/esr2AEFljg67fn2JeZPVBlJW0i6+mBtagNmb8ZlmFd4lHcY5M+c VmpOqIN6bRHlxMQj9vEmhJ6NR8W0yCwUIPK7gebTClMi32xC9Kn4NaWwCCDmE52HNHCM fzB9hL2SVbpxPxHXY7LnEhvc9vWUFRN1ICu8yWg2lFqN+qZrjv49tHgaPyVzLTNDdyNc KrulFYApXYeSNN3/xya36yAEHTvEOYcUa5NsFK/UbboHelLN5sUI9G7Y2zX5JXXoaRLO GGRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=L41Xz6pf+5T2ULtjLHw91HlAla7lbCIY5HJ2/7TvsUA=; b=SlWzPpQY+l33jxCkdpNeaEkCpZxBxo5HioZLxJfy9QrBzO1q1dIGLKa+sUjlo51zhG YFp4b/EoOrhAnYLvJkb8Euxbxj/xqa+VufgAaCuT8lYoUKd0POGQlsa9Qnm/FhRj2Q9V Zqy8JDLdXKd/OTRoUYpu2VfBb8Rv1ELVu5Ip8qQ/i9nNf55UZih4bukEChvo8zpgRa9t 0DYa++8BsEA/IYdxlwqQuAfXen7YHDgGehO9zr8yu3+Jpjz6CSkLuDCjcnYuWdMwnQgo dQLIoyumEhVmeieS2MOK24YIPBW0HZe7vz28mtxBxwx7wm8WAMZGN/WlGO6PuGiJrtev iIuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si16261109plz.518.2017.11.14.07.38.39; Tue, 14 Nov 2017 07:39:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754190AbdKNNsW (ORCPT + 88 others); Tue, 14 Nov 2017 08:48:22 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:43230 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751836AbdKNNsQ (ORCPT ); Tue, 14 Nov 2017 08:48:16 -0500 Received: from localhost.localdomain ([127.0.0.1]:50598 "EHLO linux-mips.org" rhost-flags-OK-OK-OK-FAIL) by eddie.linux-mips.org with ESMTP id S23992724AbdKNNf0Vpqm0 (ORCPT ); Tue, 14 Nov 2017 14:35:26 +0100 Received: from h7.dl5rb.org.uk (localhost [127.0.0.1]) by h7.dl5rb.org.uk (8.15.2/8.14.8) with ESMTP id vAEDZPb4013136; Tue, 14 Nov 2017 14:35:25 +0100 Received: (from ralf@localhost) by h7.dl5rb.org.uk (8.15.2/8.15.2/Submit) id vAEDZPZH013135; Tue, 14 Nov 2017 14:35:25 +0100 Date: Tue, 14 Nov 2017 14:35:24 +0100 From: Ralf Baechle To: jiaxun.yang@flygoat.com Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/4] MIPS: Loongson64: Yeeloong add platform driver Yeeloong is a laptop with a MIPS Loongson 2F processor, AMD CS5536 chipset, and KB3310B controller. Message-ID: <20171114133524.GE13046@linux-mips.org> References: <20171112063617.26546-1-jiaxun.yang@flygoat.com> <20171112063617.26546-3-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171112063617.26546-3-jiaxun.yang@flygoat.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 12, 2017 at 02:36:16PM +0800, jiaxun.yang@flygoat.com wrote: > + asm(".set noreorder\n"); > + /* input enable */ > + outl(0x00000800, (gpio_base | 0xA0)); > + /* revert the input */ > + outl(0x00000800, (gpio_base | 0xA4)); > + /* event-int enable */ > + outl(0x00000800, (gpio_base | 0xB8)); > + asm(".set reorder\n"); I forgot to comment on this .set noreorder thing. GCC expects gas to be in reorder mode at the end of every bit of inline assembler, so above code is at the mercy of GCC. Not sure what the intent was here, was it to avoid GCC from reordering the outl() calls? These are already marked volatlile and should not be reordered by GCC. .set (no)reorder on the other hand is a directive to GAS and GCC won't be influenced at all by it. Cheers, Ralf From 1584047906521841736@xxx Tue Nov 14 13:23:24 +0000 2017 X-GM-THRID: 1583841670985932847 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread