mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: mike.miller@hp.com, iss_storagedev@hp.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] __iomem annotations for cciss
Date: Sun, 3 Oct 2004 13:46:55 +0200	[thread overview]
Message-ID: <20041003114655.GA32392@lst.de> (raw)

Also remove the page masking before ioremap, it's not been nessecary for
ages.


--- 1.122/drivers/block/cciss.c	2004-08-23 10:15:28 +02:00
+++ edited/drivers/block/cciss.c	2004-10-02 15:14:22 +02:00
@@ -1841,17 +1841,6 @@
 	cmd_free(info_p, c, 1);
 	return (status);
 } 
-/*
- * Map (physical) PCI mem into (virtual) kernel space
- */
-static ulong remap_pci_mem(ulong base, ulong size)
-{
-        ulong page_base        = ((ulong) base) & PAGE_MASK;
-        ulong page_offs        = ((ulong) base) - page_base;
-        ulong page_remapped    = (ulong) ioremap(page_base, page_offs+size);
-
-        return (ulong) (page_remapped ? (page_remapped + page_offs) : 0UL);
-}
 
 /* 
  * Takes jobs of the Q and sends them to the hardware, then puts it on 
@@ -2369,11 +2358,7 @@
          *   table
 	 */
 
-	c->paddr = pci_resource_start(pdev, 0); /* addressing mode bits already removed */
-#ifdef CCISS_DEBUG
-	printk("address 0 = %x\n", c->paddr);
-#endif /* CCISS_DEBUG */ 
-	c->vaddr = remap_pci_mem(c->paddr, 200);
+	c->vaddr = ioremap(pci_resource_start(pdev, 0), 200);
 
 	/* Wait for the board to become ready.  (PCI hotplug needs this.)
 	 * We poll for up to 120 secs, once per 100ms. */
@@ -2410,8 +2395,7 @@
 #ifdef CCISS_DEBUG
 	printk("cfg offset = %x\n", cfg_offset);
 #endif /* CCISS_DEBUG */
-	c->cfgtable = (CfgTable_struct *) 
-		remap_pci_mem(pci_resource_start(pdev, cfg_base_addr_index)
+	c->cfgtable = ioremap(pci_resource_start(pdev, cfg_base_addr_index)
 				+ cfg_offset, sizeof(CfgTable_struct));
 	c->board_id = board_id;
 
@@ -2824,7 +2808,7 @@
 	}
 	free_irq(hba[i]->intr, hba[i]);
 	pci_set_drvdata(pdev, NULL);
-	iounmap((void*)hba[i]->vaddr);
+	iounmap(hba[i]->vaddr);
 	cciss_unregister_scsi(i);  /* unhook from SCSI subsystem */
 	unregister_blkdev(COMPAQ_CISS_MAJOR+i, hba[i]->devname);
 	remove_proc_entry(hba[i]->devname, proc_cciss);	
--- 1.24/drivers/block/cciss.h	2004-08-23 10:15:28 +02:00
+++ edited/drivers/block/cciss.h	2004-10-02 15:12:53 +02:00
@@ -43,11 +43,10 @@
 	char	firm_ver[4]; // Firmware version 
 	struct pci_dev *pdev;
 	__u32	board_id;
-	unsigned long vaddr;
-	unsigned long paddr;
+	void __iomem *vaddr;
 	unsigned long io_mem_addr;
 	unsigned long io_mem_length;
-	CfgTable_struct *cfgtable;
+	CfgTable_struct __iomem *cfgtable;
 	unsigned int intr;
 	int	interrupts_enabled;
 	int 	max_commands;

                 reply	other threads:[~2004-10-03 11:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20041003114655.GA32392@lst.de \
    --to=hch@lst.de \
    --cc=iss_storagedev@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.miller@hp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome