All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kenji Kaneshige <kaneshige.kenji-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
To: Bjorn Helgaas <bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
Cc: Adam Belay <ambx1-IBH0VoN/3vPQT0dZR+AlfA@public.gmane.org>,
	Matthieu Castet <castet.matthieu-GANU6spQydw@public.gmane.org>,
	Li Shaohua <shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] PNPACPI: fix types when decoding ACPI resources [resend]
Date: Wed, 03 Aug 2005 10:05:30 +0900	[thread overview]
Message-ID: <42F0185A.7060901@jp.fujitsu.com> (raw)
In-Reply-To: <200508020955.54844.bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>

Hi Bjorn,

>  static void
> -pnpacpi_parse_allocated_irqresource(struct pnp_resource_table * res, int irq)
> +pnpacpi_parse_allocated_irqresource(struct pnp_resource_table * res, u32 irq)
>  {
>  	int i = 0;
>  	while (!(res->irq_resource[i].flags & IORESOURCE_UNSET) &&
> @@ -85,13 +85,13 @@
>  			res->irq_resource[i].flags |= IORESOURCE_DISABLED;
>  			return;
>  		}
> -		res->irq_resource[i].start =(unsigned long) irq;
> -		res->irq_resource[i].end = (unsigned long) irq;
> +		res->irq_resource[i].start = irq;
> +		res->irq_resource[i].end = irq;
>  	}
>  }

This breaks the following patch that is already included into -mm
tree.

http://sourceforge.net/mailarchive/forum.php?thread_id=7844247&forum_id=6102

I think we need to check if acpi_register_gsi() succeeded or not.

Thanks,
Kenji Kaneshige



Bjorn Helgaas wrote:
> Any objections to the patch below?  I posted it last Wednesday,
> but haven't heard anything.  Once we have this fix, 8250_pnp
> should have sufficient functionality that we can get rid of
> 8250_acpi.
> 
> 
> 
> Use types that match the ACPI resource structures.  Previously
> the u64 value from an RSTYPE_ADDRESS64 was passed as an int,
> which corrupts the value.
> 
> This is one of the things that prevents 8250_pnp from working
> on HP ia64 boxes.  After 8250_pnp works, we will be able to
> remove 8250_acpi.c.
> 
> Signed-off-by: Bjorn Helgaas <bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
> 
> Index: work/drivers/pnp/pnpacpi/rsparser.c
> ===================================================================
> --- work.orig/drivers/pnp/pnpacpi/rsparser.c	2005-07-25 15:04:26.000000000 -0600
> +++ work/drivers/pnp/pnpacpi/rsparser.c	2005-07-27 10:02:19.000000000 -0600
> @@ -73,7 +73,7 @@
>  }
>  
>  static void
> -pnpacpi_parse_allocated_irqresource(struct pnp_resource_table * res, int irq)
> +pnpacpi_parse_allocated_irqresource(struct pnp_resource_table * res, u32 irq)
>  {
>  	int i = 0;
>  	while (!(res->irq_resource[i].flags & IORESOURCE_UNSET) &&
> @@ -85,13 +85,13 @@
>  			res->irq_resource[i].flags |= IORESOURCE_DISABLED;
>  			return;
>  		}
> -		res->irq_resource[i].start =(unsigned long) irq;
> -		res->irq_resource[i].end = (unsigned long) irq;
> +		res->irq_resource[i].start = irq;
> +		res->irq_resource[i].end = irq;
>  	}
>  }
>  
>  static void
> -pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table * res, int dma)
> +pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table * res, u32 dma)
>  {
>  	int i = 0;
>  	while (i < PNP_MAX_DMA &&
> @@ -103,14 +103,14 @@
>  			res->dma_resource[i].flags |= IORESOURCE_DISABLED;
>  			return;
>  		}
> -		res->dma_resource[i].start =(unsigned long) dma;
> -		res->dma_resource[i].end = (unsigned long) dma;
> +		res->dma_resource[i].start = dma;
> +		res->dma_resource[i].end = dma;
>  	}
>  }
>  
>  static void
>  pnpacpi_parse_allocated_ioresource(struct pnp_resource_table * res,
> -	int io, int len)
> +	u32 io, u32 len)
>  {
>  	int i = 0;
>  	while (!(res->port_resource[i].flags & IORESOURCE_UNSET) &&
> @@ -122,14 +122,14 @@
>  			res->port_resource[i].flags |= IORESOURCE_DISABLED;
>  			return;
>  		}
> -		res->port_resource[i].start = (unsigned long) io;
> -		res->port_resource[i].end = (unsigned long)(io + len - 1);
> +		res->port_resource[i].start = io;
> +		res->port_resource[i].end = io + len - 1;
>  	}
>  }
>  
>  static void
>  pnpacpi_parse_allocated_memresource(struct pnp_resource_table * res,
> -	int mem, int len)
> +	u64 mem, u64 len)
>  {
>  	int i = 0;
>  	while (!(res->mem_resource[i].flags & IORESOURCE_UNSET) &&
> @@ -141,8 +141,8 @@
>  			res->mem_resource[i].flags |= IORESOURCE_DISABLED;
>  			return;
>  		}
> -		res->mem_resource[i].start = (unsigned long) mem;
> -		res->mem_resource[i].end = (unsigned long)(mem + len - 1);
> +		res->mem_resource[i].start = mem;
> +		res->mem_resource[i].end = mem + len - 1;
>  	}
>  }
>  
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Acpi-devel mailing list
> Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/acpi-devel
> 



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click

WARNING: multiple messages have this Message-ID (diff)
From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Adam Belay <ambx1@neo.rr.com>,
	Matthieu Castet <castet.matthieu@free.fr>,
	Li Shaohua <shaohua.li@intel.com>,
	acpi-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [ACPI] [PATCH] PNPACPI: fix types when decoding ACPI resources [resend]
Date: Wed, 03 Aug 2005 10:05:30 +0900	[thread overview]
Message-ID: <42F0185A.7060901@jp.fujitsu.com> (raw)
In-Reply-To: <200508020955.54844.bjorn.helgaas@hp.com>

Hi Bjorn,

>  static void
> -pnpacpi_parse_allocated_irqresource(struct pnp_resource_table * res, int irq)
> +pnpacpi_parse_allocated_irqresource(struct pnp_resource_table * res, u32 irq)
>  {
>  	int i = 0;
>  	while (!(res->irq_resource[i].flags & IORESOURCE_UNSET) &&
> @@ -85,13 +85,13 @@
>  			res->irq_resource[i].flags |= IORESOURCE_DISABLED;
>  			return;
>  		}
> -		res->irq_resource[i].start =(unsigned long) irq;
> -		res->irq_resource[i].end = (unsigned long) irq;
> +		res->irq_resource[i].start = irq;
> +		res->irq_resource[i].end = irq;
>  	}
>  }

This breaks the following patch that is already included into -mm
tree.

http://sourceforge.net/mailarchive/forum.php?thread_id=7844247&forum_id=6102

I think we need to check if acpi_register_gsi() succeeded or not.

Thanks,
Kenji Kaneshige



Bjorn Helgaas wrote:
> Any objections to the patch below?  I posted it last Wednesday,
> but haven't heard anything.  Once we have this fix, 8250_pnp
> should have sufficient functionality that we can get rid of
> 8250_acpi.
> 
> 
> 
> Use types that match the ACPI resource structures.  Previously
> the u64 value from an RSTYPE_ADDRESS64 was passed as an int,
> which corrupts the value.
> 
> This is one of the things that prevents 8250_pnp from working
> on HP ia64 boxes.  After 8250_pnp works, we will be able to
> remove 8250_acpi.c.
> 
> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
> 
> Index: work/drivers/pnp/pnpacpi/rsparser.c
> ===================================================================
> --- work.orig/drivers/pnp/pnpacpi/rsparser.c	2005-07-25 15:04:26.000000000 -0600
> +++ work/drivers/pnp/pnpacpi/rsparser.c	2005-07-27 10:02:19.000000000 -0600
> @@ -73,7 +73,7 @@
>  }
>  
>  static void
> -pnpacpi_parse_allocated_irqresource(struct pnp_resource_table * res, int irq)
> +pnpacpi_parse_allocated_irqresource(struct pnp_resource_table * res, u32 irq)
>  {
>  	int i = 0;
>  	while (!(res->irq_resource[i].flags & IORESOURCE_UNSET) &&
> @@ -85,13 +85,13 @@
>  			res->irq_resource[i].flags |= IORESOURCE_DISABLED;
>  			return;
>  		}
> -		res->irq_resource[i].start =(unsigned long) irq;
> -		res->irq_resource[i].end = (unsigned long) irq;
> +		res->irq_resource[i].start = irq;
> +		res->irq_resource[i].end = irq;
>  	}
>  }
>  
>  static void
> -pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table * res, int dma)
> +pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table * res, u32 dma)
>  {
>  	int i = 0;
>  	while (i < PNP_MAX_DMA &&
> @@ -103,14 +103,14 @@
>  			res->dma_resource[i].flags |= IORESOURCE_DISABLED;
>  			return;
>  		}
> -		res->dma_resource[i].start =(unsigned long) dma;
> -		res->dma_resource[i].end = (unsigned long) dma;
> +		res->dma_resource[i].start = dma;
> +		res->dma_resource[i].end = dma;
>  	}
>  }
>  
>  static void
>  pnpacpi_parse_allocated_ioresource(struct pnp_resource_table * res,
> -	int io, int len)
> +	u32 io, u32 len)
>  {
>  	int i = 0;
>  	while (!(res->port_resource[i].flags & IORESOURCE_UNSET) &&
> @@ -122,14 +122,14 @@
>  			res->port_resource[i].flags |= IORESOURCE_DISABLED;
>  			return;
>  		}
> -		res->port_resource[i].start = (unsigned long) io;
> -		res->port_resource[i].end = (unsigned long)(io + len - 1);
> +		res->port_resource[i].start = io;
> +		res->port_resource[i].end = io + len - 1;
>  	}
>  }
>  
>  static void
>  pnpacpi_parse_allocated_memresource(struct pnp_resource_table * res,
> -	int mem, int len)
> +	u64 mem, u64 len)
>  {
>  	int i = 0;
>  	while (!(res->mem_resource[i].flags & IORESOURCE_UNSET) &&
> @@ -141,8 +141,8 @@
>  			res->mem_resource[i].flags |= IORESOURCE_DISABLED;
>  			return;
>  		}
> -		res->mem_resource[i].start = (unsigned long) mem;
> -		res->mem_resource[i].end = (unsigned long)(mem + len - 1);
> +		res->mem_resource[i].start = mem;
> +		res->mem_resource[i].end = mem + len - 1;
>  	}
>  }
>  
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Acpi-devel mailing list
> Acpi-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/acpi-devel
> 


  parent reply	other threads:[~2005-08-03  1:05 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-02 15:55 [PATCH] PNPACPI: fix types when decoding ACPI resources [resend] Bjorn Helgaas
2005-08-02 15:55 ` Bjorn Helgaas
     [not found] ` <200508020955.54844.bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
2005-08-03  1:01   ` Shaohua Li
2005-08-03  1:01     ` Shaohua Li
     [not found]     ` <1123030861.2937.4.camel-ECwVeV2eNyQD0+JXs3kMbRL4W9x8LtSr@public.gmane.org>
2005-08-03 15:20       ` Bjorn Helgaas
2005-08-03 15:20         ` [ACPI] " Bjorn Helgaas
     [not found]         ` <200508030920.13450.bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
2005-08-03 21:16           ` matthieu castet
2005-08-03 21:16             ` [ACPI] " matthieu castet
     [not found]             ` <42F1343B.70707-GANU6spQydw@public.gmane.org>
2005-08-03 21:41               ` Bjorn Helgaas
2005-08-03 21:41                 ` [ACPI] " Bjorn Helgaas
     [not found]                 ` <200508031541.53777.bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
2005-08-04 12:38                   ` matthieu castet
2005-08-04 12:38                     ` [ACPI] " matthieu castet
     [not found]                     ` <42F20C5B.3020506-GANU6spQydw@public.gmane.org>
2005-08-04 15:57                       ` Bjorn Helgaas
2005-08-04 15:57                         ` [ACPI] " Bjorn Helgaas
     [not found]                         ` <200508040957.55485.bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
2005-08-04 16:08                           ` matthieu castet
2005-08-04 16:08                             ` [ACPI] " matthieu castet
2005-08-04  0:51               ` Shaohua Li
2005-08-04  0:51                 ` [ACPI] " Shaohua Li
2005-08-28 17:40                 ` matthieu castet
2005-08-04  0:46           ` Shaohua Li
2005-08-04  0:46             ` [ACPI] " Shaohua Li
2005-08-03  1:05   ` Kenji Kaneshige [this message]
2005-08-03  1:05     ` [ACPI] " Kenji Kaneshige
     [not found]     ` <42F0185A.7060901-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2005-08-03 18:29       ` Bjorn Helgaas
2005-08-03 18:29         ` [ACPI] " Bjorn Helgaas
     [not found]         ` <200508031229.05343.bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
2005-08-04  5:18           ` Kenji Kaneshige
2005-08-04  5:18             ` [ACPI] " Kenji Kaneshige

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=42F0185A.7060901@jp.fujitsu.com \
    --to=kaneshige.kenji-+cum20s59erqfuhtdcdx3a@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=ambx1-IBH0VoN/3vPQT0dZR+AlfA@public.gmane.org \
    --cc=bjorn.helgaas-VXdhtT5mjnY@public.gmane.org \
    --cc=castet.matthieu-GANU6spQydw@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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 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.