All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Will Deacon <will.deacon@arm.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [GIT PULL] arm64 updates for 4.12
Date: Fri, 5 May 2017 21:16:14 +0100	[thread overview]
Message-ID: <20170505201613.GA26309@e104818-lin.cambridge.arm.com> (raw)
In-Reply-To: <CA+55aFxFoV_BUbQ=fUAWd2WxGRPe3K_eb7yfZYrh7oa6UOgOCA@mail.gmail.com>

On Fri, May 05, 2017 at 12:38:32PM -0700, Linus Torvalds wrote:
> On Fri, May 5, 2017 at 9:13 AM, Catalin Marinas <catalin.marinas@arm.com> wrote:
> > diff --cc arch/arm64/include/asm/bug.h
> 
> Hmm. The trivial resolution I did gets a different diff as the end
> result, but your diff looks different.
> 
> I think you used "-U2" to make for a smaller and more targeted context..
> 
> So I think the trivial resolution is what you meant. But I couldn't
> test it, so I thought I'd mention this oddity.

I indeed used -U2 as I thought that the rest of non-conflicting changes
were just complicating the diff. Sorry about the confusion. Here's the
default diff:

diff --cc arch/arm64/include/asm/bug.h
index a9be1072933c,0bfe1df12b19..000000000000
--- a/arch/arm64/include/asm/bug.h
+++ b/arch/arm64/include/asm/bug.h
@@@ -45,19 -42,27 +42,26 @@@
  _BUGVERBOSE_LOCATION(__FILE__, __LINE__)		\
  		".short " #flags "\n\t"			\
  		".popsection\n"				\
- 							\
- 	"1:	brk %[imm]"				\
- 		:: [imm] "i" (BUG_BRK_IMM)		\
- )
+ 	"1:	"
+ #else
+ #define __BUG_ENTRY(flags) ""
+ #endif
+ 
+ #define __BUG_FLAGS(flags)				\
+ 	asm volatile (					\
+ 		__BUG_ENTRY(flags)			\
+ 		"brk %[imm]" :: [imm] "i" (BUG_BRK_IMM)	\
+ 	);
  
- #define BUG() do {				\
- 	_BUG_FLAGS(0);				\
- 	unreachable();				\
+ 
+ #define BUG() do {					\
+ 	__BUG_FLAGS(0);					\
+ 	unreachable();					\
  } while (0)
  
- #define __WARN_FLAGS(flags) _BUG_FLAGS(BUGFLAG_WARNING|(flags))
 -#define __WARN_TAINT(taint) 				\
 -	__BUG_FLAGS(BUGFLAG_TAINT(taint))
++#define __WARN_FLAGS(flags) __BUG_FLAGS(BUGFLAG_WARNING|(flags))
  
- #endif /* ! CONFIG_GENERIC_BUG */
+ #define HAVE_ARCH_BUG
  
  #include <asm-generic/bug.h>
  

-- 
Catalin

WARNING: multiple messages have this Message-ID (diff)
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [GIT PULL] arm64 updates for 4.12
Date: Fri, 5 May 2017 21:16:14 +0100	[thread overview]
Message-ID: <20170505201613.GA26309@e104818-lin.cambridge.arm.com> (raw)
In-Reply-To: <CA+55aFxFoV_BUbQ=fUAWd2WxGRPe3K_eb7yfZYrh7oa6UOgOCA@mail.gmail.com>

On Fri, May 05, 2017 at 12:38:32PM -0700, Linus Torvalds wrote:
> On Fri, May 5, 2017 at 9:13 AM, Catalin Marinas <catalin.marinas@arm.com> wrote:
> > diff --cc arch/arm64/include/asm/bug.h
> 
> Hmm. The trivial resolution I did gets a different diff as the end
> result, but your diff looks different.
> 
> I think you used "-U2" to make for a smaller and more targeted context..
> 
> So I think the trivial resolution is what you meant. But I couldn't
> test it, so I thought I'd mention this oddity.

I indeed used -U2 as I thought that the rest of non-conflicting changes
were just complicating the diff. Sorry about the confusion. Here's the
default diff:

diff --cc arch/arm64/include/asm/bug.h
index a9be1072933c,0bfe1df12b19..000000000000
--- a/arch/arm64/include/asm/bug.h
+++ b/arch/arm64/include/asm/bug.h
@@@ -45,19 -42,27 +42,26 @@@
  _BUGVERBOSE_LOCATION(__FILE__, __LINE__)		\
  		".short " #flags "\n\t"			\
  		".popsection\n"				\
- 							\
- 	"1:	brk %[imm]"				\
- 		:: [imm] "i" (BUG_BRK_IMM)		\
- )
+ 	"1:	"
+ #else
+ #define __BUG_ENTRY(flags) ""
+ #endif
+ 
+ #define __BUG_FLAGS(flags)				\
+ 	asm volatile (					\
+ 		__BUG_ENTRY(flags)			\
+ 		"brk %[imm]" :: [imm] "i" (BUG_BRK_IMM)	\
+ 	);
  
- #define BUG() do {				\
- 	_BUG_FLAGS(0);				\
- 	unreachable();				\
+ 
+ #define BUG() do {					\
+ 	__BUG_FLAGS(0);					\
+ 	unreachable();					\
  } while (0)
  
- #define __WARN_FLAGS(flags) _BUG_FLAGS(BUGFLAG_WARNING|(flags))
 -#define __WARN_TAINT(taint) 				\
 -	__BUG_FLAGS(BUGFLAG_TAINT(taint))
++#define __WARN_FLAGS(flags) __BUG_FLAGS(BUGFLAG_WARNING|(flags))
  
- #endif /* ! CONFIG_GENERIC_BUG */
+ #define HAVE_ARCH_BUG
  
  #include <asm-generic/bug.h>
  

-- 
Catalin

  reply	other threads:[~2017-05-05 20:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05 16:13 [GIT PULL] arm64 updates for 4.12 Catalin Marinas
2017-05-05 16:13 ` Catalin Marinas
2017-05-05 19:38 ` Linus Torvalds
2017-05-05 19:38   ` Linus Torvalds
2017-05-05 20:16   ` Catalin Marinas [this message]
2017-05-05 20:16     ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170505201613.GA26309@e104818-lin.cambridge.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.