From: Martin Hicks <mort@wildopensource.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] runtime platform detection in GENERIC kernels
Date: Tue, 20 May 2003 19:56:48 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590723705959@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590723705791@msgid-missing>
On Fri, May 16, 2003 at 01:35:52PM -0600, Alex Williamson wrote:
> Martin Hicks wrote:
> > Here is the next iteration, based on your suggestions. It also caches
> > the result of the first acpi_get_sysname() call, since this really
> > shouldn't change while the machine is running.
> >
>
> Martin,
>
> Everything is already in place to make this much easier.
> I was thinking something more like this:
>
> #define ia64_platform_is(x) (strcmp(x,platform_name) = 0)
>
> The name is stored in the machvec, so you don't need to cache
> it anywhere else.
Patch attached against Bjorn's 2.4 bk tree.
--
Wild Open Source Inc. mort@wildopensource.com
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1122 -> 1.1123
# include/asm-ia64/system.h 1.15 -> 1.16
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/05/20 mort@green.i.bork.org 1.1123
# Add a small macro ia64_platform_is(platform) which checks
# if the platform is indeed "platform".
# --------------------------------------------
#
diff -Nru a/include/asm-ia64/system.h b/include/asm-ia64/system.h
--- a/include/asm-ia64/system.h Tue May 20 19:54:44 2003
+++ b/include/asm-ia64/system.h Tue May 20 19:54:44 2003
@@ -27,6 +27,7 @@
#include <linux/kernel.h>
#include <linux/types.h>
+#include <linux/string.h>
struct pci_vector_struct {
__u16 segment; /* PCI Segment number */
@@ -290,6 +291,8 @@
__switch_to(prev,next,last); \
} while (0)
#endif
+
+#define ia64_platform_is(x) (!strcmp(x, platform_name))
#endif /* __KERNEL__ */
prev parent reply other threads:[~2003-05-20 19:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-14 15:03 [Linux-ia64] runtime platform detection in GENERIC kernels Martin Hicks
2003-05-14 15:32 ` Alex Williamson
2003-05-14 15:47 ` Martin Hicks
2003-05-14 20:49 ` Jes Sorensen
2003-05-16 19:21 ` Martin Hicks
2003-05-16 19:35 ` Alex Williamson
2003-05-20 19:56 ` Martin Hicks [this message]
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=marc-linux-ia64-105590723705959@msgid-missing \
--to=mort@wildopensource.com \
--cc=linux-ia64@vger.kernel.org \
/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