mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Andrew Morton <akpm@osdl.org>
Cc: Brice.Goglin@ens-lyon.org, linux-kernel@vger.kernel.org, rth@twiddle.net
Subject: Re: Kernel panic during SysRq-b on Alpha
Date: Thu, 22 Sep 2005 14:34:27 +0400	[thread overview]
Message-ID: <20050922143427.A29921@jurassic.park.msu.ru> (raw)
In-Reply-To: <20050922022152.0c0f0c97.akpm@osdl.org>; from akpm@osdl.org on Thu, Sep 22, 2005 at 02:21:52AM -0700

On Thu, Sep 22, 2005 at 02:21:52AM -0700, Andrew Morton wrote:
> hm, you might need to do some special-casing around that function.

Maybe something like this?
I think this also makes more obvious how index_of() was
supposed to work.

Ivan.

--- 2.6.14-rc1/include/asm-alpha/compiler.h.inline	Mon Aug 29 03:41:01 2005
+++ linux/include/asm-alpha/compiler.h	Thu Sep 22 13:49:53 2005
@@ -98,6 +98,9 @@
 #undef inline
 #undef __inline__
 #undef __inline
-
+#if __GNUC__ == 3 && __GNUC_MINOR__ >= 1 || __GNUC__ > 3
+#undef __always_inline
+#define __always_inline		inline __attribute__((always_inline))
+#endif
 
 #endif /* __ALPHA_COMPILER_H */
--- 2.6.14-rc1/mm/slab.c	Tue Sep 13 14:16:37 2005
+++ linux/mm/slab.c	Thu Sep 22 13:58:18 2005
@@ -308,12 +308,12 @@ struct kmem_list3 __initdata initkmem_li
 #define	SIZE_L3 (1 + MAX_NUMNODES)
 
 /*
- * This function may be completely optimized away if
+ * This function must be completely optimized away if
  * a constant is passed to it. Mostly the same as
  * what is in linux/slab.h except it returns an
  * index.
  */
-static inline int index_of(const size_t size)
+static __always_inline int index_of(const size_t size)
 {
 	if (__builtin_constant_p(size)) {
 		int i = 0;
@@ -329,7 +329,8 @@ static inline int index_of(const size_t 
 			extern void __bad_size(void);
 			__bad_size();
 		}
-	}
+	} else
+		BUG();
 	return 0;
 }
 

  reply	other threads:[~2005-09-22 10:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-21 13:11 Brice Goglin
2005-09-22  6:12 ` Ivan Kokshaysky
2005-09-22  6:42   ` Andrew Morton
2005-09-22  9:04     ` Ivan Kokshaysky
2005-09-22  9:21       ` Andrew Morton
2005-09-22 10:34         ` Ivan Kokshaysky [this message]
2005-09-22 10:13       ` Brice Goglin
2005-09-22 10:42         ` Ivan Kokshaysky
2005-09-23 22:03         ` Ivan Kokshaysky

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=20050922143427.A29921@jurassic.park.msu.ru \
    --to=ink@jurassic.park.msu.ru \
    --cc=Brice.Goglin@ens-lyon.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rth@twiddle.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®