diff options
Diffstat (limited to 'drivers/parisc')
-rw-r--r-- | drivers/parisc/ccio-dma.c | 14 | ||||
-rw-r--r-- | drivers/parisc/eisa.c | 4 | ||||
-rw-r--r-- | drivers/parisc/iommu-helpers.h | 4 | ||||
-rw-r--r-- | drivers/parisc/pdc_stable.c | 2 | ||||
-rw-r--r-- | drivers/parisc/power.c | 1 | ||||
-rw-r--r-- | drivers/parisc/sba_iommu.c | 6 | ||||
-rw-r--r-- | drivers/parisc/superio.c | 8 |
7 files changed, 19 insertions, 20 deletions
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index 894fdb9d44c0..b3c4dbff26b8 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/types.h> | 34 | #include <linux/types.h> |
35 | #include <linux/kernel.h> | ||
35 | #include <linux/init.h> | 36 | #include <linux/init.h> |
36 | #include <linux/mm.h> | 37 | #include <linux/mm.h> |
37 | #include <linux/spinlock.h> | 38 | #include <linux/spinlock.h> |
@@ -292,7 +293,6 @@ static int ioc_count; | |||
292 | #define PDIR_INDEX(iovp) ((iovp)>>IOVP_SHIFT) | 293 | #define PDIR_INDEX(iovp) ((iovp)>>IOVP_SHIFT) |
293 | #define MKIOVP(pdir_idx) ((long)(pdir_idx) << IOVP_SHIFT) | 294 | #define MKIOVP(pdir_idx) ((long)(pdir_idx) << IOVP_SHIFT) |
294 | #define MKIOVA(iovp,offset) (dma_addr_t)((long)iovp | (long)offset) | 295 | #define MKIOVA(iovp,offset) (dma_addr_t)((long)iovp | (long)offset) |
295 | #define ROUNDUP(x,y) ((x + ((y)-1)) & ~((y)-1)) | ||
296 | 296 | ||
297 | /* | 297 | /* |
298 | ** Don't worry about the 150% average search length on a miss. | 298 | ** Don't worry about the 150% average search length on a miss. |
@@ -668,7 +668,7 @@ ccio_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt) | |||
668 | size_t saved_byte_cnt; | 668 | size_t saved_byte_cnt; |
669 | 669 | ||
670 | /* round up to nearest page size */ | 670 | /* round up to nearest page size */ |
671 | saved_byte_cnt = byte_cnt = ROUNDUP(byte_cnt, IOVP_SIZE); | 671 | saved_byte_cnt = byte_cnt = ALIGN(byte_cnt, IOVP_SIZE); |
672 | 672 | ||
673 | while(byte_cnt > 0) { | 673 | while(byte_cnt > 0) { |
674 | /* invalidate one page at a time */ | 674 | /* invalidate one page at a time */ |
@@ -751,7 +751,7 @@ ccio_map_single(struct device *dev, void *addr, size_t size, | |||
751 | offset = ((unsigned long) addr) & ~IOVP_MASK; | 751 | offset = ((unsigned long) addr) & ~IOVP_MASK; |
752 | 752 | ||
753 | /* round up to nearest IOVP_SIZE */ | 753 | /* round up to nearest IOVP_SIZE */ |
754 | size = ROUNDUP(size + offset, IOVP_SIZE); | 754 | size = ALIGN(size + offset, IOVP_SIZE); |
755 | spin_lock_irqsave(&ioc->res_lock, flags); | 755 | spin_lock_irqsave(&ioc->res_lock, flags); |
756 | 756 | ||
757 | #ifdef CCIO_MAP_STATS | 757 | #ifdef CCIO_MAP_STATS |
@@ -814,7 +814,7 @@ ccio_unmap_single(struct device *dev, dma_addr_t iova, size_t size, | |||
814 | 814 | ||
815 | iova ^= offset; /* clear offset bits */ | 815 | iova ^= offset; /* clear offset bits */ |
816 | size += offset; | 816 | size += offset; |
817 | size = ROUNDUP(size, IOVP_SIZE); | 817 | size = ALIGN(size, IOVP_SIZE); |
818 | 818 | ||
819 | spin_lock_irqsave(&ioc->res_lock, flags); | 819 | spin_lock_irqsave(&ioc->res_lock, flags); |
820 | 820 | ||
@@ -1227,7 +1227,7 @@ ccio_get_iotlb_size(struct parisc_device *dev) | |||
1227 | #endif /* 0 */ | 1227 | #endif /* 0 */ |
1228 | 1228 | ||
1229 | /* We *can't* support JAVA (T600). Venture there at your own risk. */ | 1229 | /* We *can't* support JAVA (T600). Venture there at your own risk. */ |
1230 | static struct parisc_device_id ccio_tbl[] = { | 1230 | static const struct parisc_device_id ccio_tbl[] = { |
1231 | { HPHW_IOA, HVERSION_REV_ANY_ID, U2_IOA_RUNWAY, 0xb }, /* U2 */ | 1231 | { HPHW_IOA, HVERSION_REV_ANY_ID, U2_IOA_RUNWAY, 0xb }, /* U2 */ |
1232 | { HPHW_IOA, HVERSION_REV_ANY_ID, UTURN_IOA_RUNWAY, 0xb }, /* UTurn */ | 1232 | { HPHW_IOA, HVERSION_REV_ANY_ID, UTURN_IOA_RUNWAY, 0xb }, /* UTurn */ |
1233 | { 0, } | 1233 | { 0, } |
@@ -1370,7 +1370,7 @@ ccio_ioc_init(struct ioc *ioc) | |||
1370 | } | 1370 | } |
1371 | } | 1371 | } |
1372 | 1372 | ||
1373 | static void | 1373 | static void __init |
1374 | ccio_init_resource(struct resource *res, char *name, void __iomem *ioaddr) | 1374 | ccio_init_resource(struct resource *res, char *name, void __iomem *ioaddr) |
1375 | { | 1375 | { |
1376 | int result; | 1376 | int result; |
@@ -1537,7 +1537,7 @@ int ccio_request_resource(const struct parisc_device *dev, | |||
1537 | * If so, initialize the chip and tell other partners in crime they | 1537 | * If so, initialize the chip and tell other partners in crime they |
1538 | * have work to do. | 1538 | * have work to do. |
1539 | */ | 1539 | */ |
1540 | static int ccio_probe(struct parisc_device *dev) | 1540 | static int __init ccio_probe(struct parisc_device *dev) |
1541 | { | 1541 | { |
1542 | int i; | 1542 | int i; |
1543 | struct ioc *ioc, **ioc_p = &ioc_list; | 1543 | struct ioc *ioc, **ioc_p = &ioc_list; |
diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c index 309076b39853..771cef592542 100644 --- a/drivers/parisc/eisa.c +++ b/drivers/parisc/eisa.c | |||
@@ -307,7 +307,7 @@ static void init_eisa_pic(void) | |||
307 | 307 | ||
308 | #define is_mongoose(dev) (dev->id.sversion == 0x00076) | 308 | #define is_mongoose(dev) (dev->id.sversion == 0x00076) |
309 | 309 | ||
310 | static int __devinit eisa_probe(struct parisc_device *dev) | 310 | static int __init eisa_probe(struct parisc_device *dev) |
311 | { | 311 | { |
312 | int i, result; | 312 | int i, result; |
313 | 313 | ||
@@ -387,7 +387,7 @@ static int __devinit eisa_probe(struct parisc_device *dev) | |||
387 | return 0; | 387 | return 0; |
388 | } | 388 | } |
389 | 389 | ||
390 | static struct parisc_device_id eisa_tbl[] = { | 390 | static const struct parisc_device_id eisa_tbl[] = { |
391 | { HPHW_BA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00076 }, /* Mongoose */ | 391 | { HPHW_BA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00076 }, /* Mongoose */ |
392 | { HPHW_BA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00090 }, /* Wax EISA */ | 392 | { HPHW_BA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00090 }, /* Wax EISA */ |
393 | { 0, } | 393 | { 0, } |
diff --git a/drivers/parisc/iommu-helpers.h b/drivers/parisc/iommu-helpers.h index 38d9e1aba1d0..0a1f99a2e93e 100644 --- a/drivers/parisc/iommu-helpers.h +++ b/drivers/parisc/iommu-helpers.h | |||
@@ -138,7 +138,7 @@ iommu_coalesce_chunks(struct ioc *ioc, struct scatterlist *startsg, int nents, | |||
138 | ** exceed DMA_CHUNK_SIZE if we coalesce the | 138 | ** exceed DMA_CHUNK_SIZE if we coalesce the |
139 | ** next entry. | 139 | ** next entry. |
140 | */ | 140 | */ |
141 | if(unlikely(ROUNDUP(dma_len + dma_offset + startsg->length, | 141 | if(unlikely(ALIGN(dma_len + dma_offset + startsg->length, |
142 | IOVP_SIZE) > DMA_CHUNK_SIZE)) | 142 | IOVP_SIZE) > DMA_CHUNK_SIZE)) |
143 | break; | 143 | break; |
144 | 144 | ||
@@ -158,7 +158,7 @@ iommu_coalesce_chunks(struct ioc *ioc, struct scatterlist *startsg, int nents, | |||
158 | ** Allocate space for DMA stream. | 158 | ** Allocate space for DMA stream. |
159 | */ | 159 | */ |
160 | sg_dma_len(contig_sg) = dma_len; | 160 | sg_dma_len(contig_sg) = dma_len; |
161 | dma_len = ROUNDUP(dma_len + dma_offset, IOVP_SIZE); | 161 | dma_len = ALIGN(dma_len + dma_offset, IOVP_SIZE); |
162 | sg_dma_address(contig_sg) = | 162 | sg_dma_address(contig_sg) = |
163 | PIDE_FLAG | 163 | PIDE_FLAG |
164 | | (iommu_alloc_range(ioc, dma_len) << IOVP_SHIFT) | 164 | | (iommu_alloc_range(ioc, dma_len) << IOVP_SHIFT) |
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c index 815e445c3125..924ef0609460 100644 --- a/drivers/parisc/pdc_stable.c +++ b/drivers/parisc/pdc_stable.c | |||
@@ -1067,7 +1067,7 @@ pdc_stable_init(void) | |||
1067 | error = subsys_create_file(&stable_subsys, attr); | 1067 | error = subsys_create_file(&stable_subsys, attr); |
1068 | 1068 | ||
1069 | /* register the paths subsys as a subsystem of stable subsys */ | 1069 | /* register the paths subsys as a subsystem of stable subsys */ |
1070 | kset_set_kset_s(&paths_subsys, stable_subsys); | 1070 | kobj_set_kset_s(&paths_subsys, stable_subsys); |
1071 | if ((rc = subsystem_register(&paths_subsys))) | 1071 | if ((rc = subsystem_register(&paths_subsys))) |
1072 | goto fail_subsysreg; | 1072 | goto fail_subsysreg; |
1073 | 1073 | ||
diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c index 6dedbdef7106..90cca5e3805f 100644 --- a/drivers/parisc/power.c +++ b/drivers/parisc/power.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/reboot.h> | 41 | #include <linux/reboot.h> |
42 | #include <linux/sched.h> | 42 | #include <linux/sched.h> |
43 | #include <linux/kthread.h> | 43 | #include <linux/kthread.h> |
44 | #include <linux/pm.h> | ||
44 | 45 | ||
45 | #include <asm/pdc.h> | 46 | #include <asm/pdc.h> |
46 | #include <asm/io.h> | 47 | #include <asm/io.h> |
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c index 322957ac2ad1..d044c48323e6 100644 --- a/drivers/parisc/sba_iommu.c +++ b/drivers/parisc/sba_iommu.c | |||
@@ -113,8 +113,6 @@ module_param(sba_reserve_agpgart, int, 0444); | |||
113 | MODULE_PARM_DESC(sba_reserve_agpgart, "Reserve half of IO pdir as AGPGART"); | 113 | MODULE_PARM_DESC(sba_reserve_agpgart, "Reserve half of IO pdir as AGPGART"); |
114 | #endif | 114 | #endif |
115 | 115 | ||
116 | #define ROUNDUP(x,y) ((x + ((y)-1)) & ~((y)-1)) | ||
117 | |||
118 | 116 | ||
119 | /************************************ | 117 | /************************************ |
120 | ** SBA register read and write support | 118 | ** SBA register read and write support |
@@ -352,7 +350,7 @@ sba_search_bitmap(struct ioc *ioc, unsigned long bits_wanted) | |||
352 | ** SBA HW features in the unmap path. | 350 | ** SBA HW features in the unmap path. |
353 | */ | 351 | */ |
354 | unsigned long o = 1 << get_order(bits_wanted << PAGE_SHIFT); | 352 | unsigned long o = 1 << get_order(bits_wanted << PAGE_SHIFT); |
355 | uint bitshiftcnt = ROUNDUP(ioc->res_bitshift, o); | 353 | uint bitshiftcnt = ALIGN(ioc->res_bitshift, o); |
356 | unsigned long mask; | 354 | unsigned long mask; |
357 | 355 | ||
358 | if (bitshiftcnt >= BITS_PER_LONG) { | 356 | if (bitshiftcnt >= BITS_PER_LONG) { |
@@ -779,7 +777,7 @@ sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size, | |||
779 | offset = iova & ~IOVP_MASK; | 777 | offset = iova & ~IOVP_MASK; |
780 | iova ^= offset; /* clear offset bits */ | 778 | iova ^= offset; /* clear offset bits */ |
781 | size += offset; | 779 | size += offset; |
782 | size = ROUNDUP(size, IOVP_SIZE); | 780 | size = ALIGN(size, IOVP_SIZE); |
783 | 781 | ||
784 | spin_lock_irqsave(&ioc->res_lock, flags); | 782 | spin_lock_irqsave(&ioc->res_lock, flags); |
785 | 783 | ||
diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c index 1fd97f7c8b98..a708c329675e 100644 --- a/drivers/parisc/superio.c +++ b/drivers/parisc/superio.c | |||
@@ -389,7 +389,7 @@ int superio_fixup_irq(struct pci_dev *pcidev) | |||
389 | return local_irq; | 389 | return local_irq; |
390 | } | 390 | } |
391 | 391 | ||
392 | static void __devinit superio_serial_init(void) | 392 | static void __init superio_serial_init(void) |
393 | { | 393 | { |
394 | #ifdef CONFIG_SERIAL_8250 | 394 | #ifdef CONFIG_SERIAL_8250 |
395 | int retval; | 395 | int retval; |
@@ -423,7 +423,7 @@ static void __devinit superio_serial_init(void) | |||
423 | } | 423 | } |
424 | 424 | ||
425 | 425 | ||
426 | static void __devinit superio_parport_init(void) | 426 | static void __init superio_parport_init(void) |
427 | { | 427 | { |
428 | #ifdef CONFIG_PARPORT_PC | 428 | #ifdef CONFIG_PARPORT_PC |
429 | if (!parport_pc_probe_port(sio_dev.pp_base, | 429 | if (!parport_pc_probe_port(sio_dev.pp_base, |
@@ -450,7 +450,7 @@ static void superio_fixup_pci(struct pci_dev *pdev) | |||
450 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415, superio_fixup_pci); | 450 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415, superio_fixup_pci); |
451 | 451 | ||
452 | 452 | ||
453 | static int __devinit | 453 | static int __init |
454 | superio_probe(struct pci_dev *dev, const struct pci_device_id *id) | 454 | superio_probe(struct pci_dev *dev, const struct pci_device_id *id) |
455 | { | 455 | { |
456 | struct superio_device *sio = &sio_dev; | 456 | struct superio_device *sio = &sio_dev; |
@@ -485,7 +485,7 @@ superio_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
485 | return -ENODEV; | 485 | return -ENODEV; |
486 | } | 486 | } |
487 | 487 | ||
488 | static struct pci_device_id superio_tbl[] = { | 488 | static const struct pci_device_id superio_tbl[] = { |
489 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_LIO) }, | 489 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_LIO) }, |
490 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_USB) }, | 490 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_USB) }, |
491 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415) }, | 491 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415) }, |