From: Arnd Bergmann <arnd.bergmann@de.ibm.com>
To: linuxppc-dev@ozlabs.org
Cc: linux-kernel@vger.kernel.org, openib-general@openib.org,
Christoph Raisch <RAISCH@de.ibm.com>,
Hoang-Nam Nguyen <HNGUYEN@de.ibm.com>,
Marcus Eder <MEDER@de.ibm.com>
Subject: Re: [PATCH 06/16] ehca: common include files
Date: Thu, 27 Apr 2006 13:19:06 +0200 [thread overview]
Message-ID: <200604271319.06844.arnd.bergmann@de.ibm.com> (raw)
In-Reply-To: <4450A183.6030405@de.ibm.com>
On Thursday 27 April 2006 12:48, Heiko J Schick wrote:
> +/**
> + * ehca_adr_bad - Handle to be used for adress translation mechanisms,
> + * currently a placeholder.
> + */
> +inline static int ehca_adr_bad(void *adr)
'static inline', not 'inline static', by convention.
> +/* We will remove this lines in SVN when it is included in the Linux kernel.
> + * We don't want to introducte unnecessary dependencies to a patched kernel.
> + */
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)
Well, you should also remove this for submission, I guess ;-)
> +#define EHCA_EDEB_TRACE_MASK_SIZE 32
> +extern u8 ehca_edeb_mask[EHCA_EDEB_TRACE_MASK_SIZE];
> +#define EDEB_ID_TO_U32(str4) (str4[3] | (str4[2] << 8) | (str4[1] << 16) | \
> + (str4[0] << 24))
> +
> +inline static u64 ehca_edeb_filter(const u32 level,
> + const u32 id, const u32 line)
'static inline' again. best grep all your source for this, there are probably
more places.
> +{
> + u64 ret = 0;
> + u32 filenr = 0;
> + u32 filter_level = 9;
> + u32 dynamic_level = 0;
> +
> + /* This is code written for the gcc -O2 optimizer which should colapse
> + * to two single ints filter_level is the first level kicked out by
> + * compiler means trace everythin below 6. */
> + if (id == EDEB_ID_TO_U32("ehav")) {
> + filenr = 0x01;
> + filter_level = 8;
> + }
> + if (id == EDEB_ID_TO_U32("clas")) {
> + filenr = 0x02;
> + filter_level = 8;
> + }
> + if (id == EDEB_ID_TO_U32("cqeq")) {
> + filenr = 0x03;
> + filter_level = 8;
> + }
> + if (id == EDEB_ID_TO_U32("shca")) {
> + filenr = 0x05;
> + filter_level = 8;
> + }
> + if (id == EDEB_ID_TO_U32("eirq")) {
> + filenr = 0x06;
> + filter_level = 8;
> + }
> + if (id == EDEB_ID_TO_U32("lMad")) {
> + filenr = 0x07;
> + filter_level = 8;
> + }
> + if (id == EDEB_ID_TO_U32("mcas")) {
> + filenr = 0x08;
> + filter_level = 8;
> + }
> + if (id == EDEB_ID_TO_U32("mrmw")) {
> + filenr = 0x09;
> + filter_level = 8;
> + }
> + if (id == EDEB_ID_TO_U32("vpd ")) {
> + filenr = 0x0a;
> + filter_level = 8;
> + }
> + if (id == EDEB_ID_TO_U32("e_qp")) {
> + filenr = 0x0b;
> + filter_level = 8;
> + }
> + if (id == EDEB_ID_TO_U32("uqes")) {
> + filenr = 0x0c;
> + filter_level = 8;
> + }
> + if (id == EDEB_ID_TO_U32("PHYP")) {
> + filenr = 0x0d;
> + filter_level = 8;
> + }
> + if (id == EDEB_ID_TO_U32("hcpi")) {
> + filenr = 0x0e;
> + filter_level = 8;
> + }
> + if (id == EDEB_ID_TO_U32("iptz")) {
> + filenr = 0x0f;
> + filter_level = 8;
> + }
> + if (id == EDEB_ID_TO_U32("spta")) {
> + filenr = 0x10;
> + filter_level = 8;
> + }
> + if (id == EDEB_ID_TO_U32("simp")) {
> + filenr = 0x11;
> + filter_level = 8;
> + }
> + if (id == EDEB_ID_TO_U32("reqs")) {
> + filenr = 0x12;
> + filter_level = 8;
> + }
I guess you can convert that to
switch (id) {
case EBEB_ID_CLAS:
...
case EDEB_ID_CQEQ:
...
}
> +
> +#ifdef EHCA_USE_HCALL_KERNEL
> +#ifdef CONFIG_PPC_PSERIES
> +
> +#include <asm/paca.h>
> +
You could make everything down from here a separate header
for hcall.
next prev parent reply other threads:[~2006-04-27 11:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-27 10:48 [PATCH 06/16] ehca: common include files Heiko J Schick
2006-04-27 11:19 ` Arnd Bergmann [this message]
2006-04-27 21:31 ` Heiko J Schick
2006-04-28 5:11 ` Kyle Moffett
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=200604271319.06844.arnd.bergmann@de.ibm.com \
--to=arnd.bergmann@de.ibm.com \
--cc=HNGUYEN@de.ibm.com \
--cc=MEDER@de.ibm.com \
--cc=RAISCH@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=openib-general@openib.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;
as well as URLs for NNTP newsgroup(s).