diff options
| -rw-r--r-- | arch/sparc/mm/iommu.c | 13 | ||||
| -rw-r--r-- | arch/sparc64/kernel/time.c | 22 | ||||
| -rw-r--r-- | drivers/video/sbuslib.c | 9 | ||||
| -rw-r--r-- | drivers/video/sbuslib.h | 2 | ||||
| -rw-r--r-- | sound/sparc/cs4231.c | 3 |
5 files changed, 23 insertions, 26 deletions
diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c index 489bf68d5f05..77840c804786 100644 --- a/arch/sparc/mm/iommu.c +++ b/arch/sparc/mm/iommu.c | |||
| @@ -295,8 +295,7 @@ static void iommu_release_one(u32 busa, int npages, struct sbus_bus *sbus) | |||
| 295 | int ioptex; | 295 | int ioptex; |
| 296 | int i; | 296 | int i; |
| 297 | 297 | ||
| 298 | if (busa < iommu->start) | 298 | BUG_ON(busa < iommu->start); |
| 299 | BUG(); | ||
| 300 | ioptex = (busa - iommu->start) >> PAGE_SHIFT; | 299 | ioptex = (busa - iommu->start) >> PAGE_SHIFT; |
| 301 | for (i = 0; i < npages; i++) { | 300 | for (i = 0; i < npages; i++) { |
| 302 | iopte_val(iommu->page_table[ioptex + i]) = 0; | 301 | iopte_val(iommu->page_table[ioptex + i]) = 0; |
| @@ -340,9 +339,9 @@ static int iommu_map_dma_area(dma_addr_t *pba, unsigned long va, | |||
| 340 | iopte_t *first; | 339 | iopte_t *first; |
| 341 | int ioptex; | 340 | int ioptex; |
| 342 | 341 | ||
| 343 | if ((va & ~PAGE_MASK) != 0) BUG(); | 342 | BUG_ON((va & ~PAGE_MASK) != 0); |
| 344 | if ((addr & ~PAGE_MASK) != 0) BUG(); | 343 | BUG_ON((addr & ~PAGE_MASK) != 0); |
| 345 | if ((len & ~PAGE_MASK) != 0) BUG(); | 344 | BUG_ON((len & ~PAGE_MASK) != 0); |
| 346 | 345 | ||
| 347 | /* page color = physical address */ | 346 | /* page color = physical address */ |
| 348 | ioptex = bit_map_string_get(&iommu->usemap, len >> PAGE_SHIFT, | 347 | ioptex = bit_map_string_get(&iommu->usemap, len >> PAGE_SHIFT, |
| @@ -405,8 +404,8 @@ static void iommu_unmap_dma_area(unsigned long busa, int len) | |||
| 405 | unsigned long end; | 404 | unsigned long end; |
| 406 | int ioptex = (busa - iommu->start) >> PAGE_SHIFT; | 405 | int ioptex = (busa - iommu->start) >> PAGE_SHIFT; |
| 407 | 406 | ||
| 408 | if ((busa & ~PAGE_MASK) != 0) BUG(); | 407 | BUG_ON((busa & ~PAGE_MASK) != 0); |
| 409 | if ((len & ~PAGE_MASK) != 0) BUG(); | 408 | BUG_ON((len & ~PAGE_MASK) != 0); |
| 410 | 409 | ||
| 411 | iopte += ioptex; | 410 | iopte += ioptex; |
| 412 | end = busa + len; | 411 | end = busa + len; |
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index 459c8fbe02b4..a22930d62adf 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c | |||
| @@ -280,9 +280,9 @@ static struct sparc64_tick_ops stick_operations __read_mostly = { | |||
| 280 | * Since STICK is constantly updating, we have to access it carefully. | 280 | * Since STICK is constantly updating, we have to access it carefully. |
| 281 | * | 281 | * |
| 282 | * The sequence we use to read is: | 282 | * The sequence we use to read is: |
| 283 | * 1) read low | 283 | * 1) read high |
| 284 | * 2) read high | 284 | * 2) read low |
| 285 | * 3) read low again, if it rolled over increment high by 1 | 285 | * 3) read high again, if it rolled re-read both low and high again. |
| 286 | * | 286 | * |
| 287 | * Writing STICK safely is also tricky: | 287 | * Writing STICK safely is also tricky: |
| 288 | * 1) write low to zero | 288 | * 1) write low to zero |
| @@ -295,18 +295,18 @@ static struct sparc64_tick_ops stick_operations __read_mostly = { | |||
| 295 | static unsigned long __hbird_read_stick(void) | 295 | static unsigned long __hbird_read_stick(void) |
| 296 | { | 296 | { |
| 297 | unsigned long ret, tmp1, tmp2, tmp3; | 297 | unsigned long ret, tmp1, tmp2, tmp3; |
| 298 | unsigned long addr = HBIRD_STICK_ADDR; | 298 | unsigned long addr = HBIRD_STICK_ADDR+8; |
| 299 | 299 | ||
| 300 | __asm__ __volatile__("ldxa [%1] %5, %2\n\t" | 300 | __asm__ __volatile__("ldxa [%1] %5, %2\n" |
| 301 | "add %1, 0x8, %1\n\t" | 301 | "1:\n\t" |
| 302 | "ldxa [%1] %5, %3\n\t" | ||
| 303 | "sub %1, 0x8, %1\n\t" | 302 | "sub %1, 0x8, %1\n\t" |
| 303 | "ldxa [%1] %5, %3\n\t" | ||
| 304 | "add %1, 0x8, %1\n\t" | ||
| 304 | "ldxa [%1] %5, %4\n\t" | 305 | "ldxa [%1] %5, %4\n\t" |
| 305 | "cmp %4, %2\n\t" | 306 | "cmp %4, %2\n\t" |
| 306 | "blu,a,pn %%xcc, 1f\n\t" | 307 | "bne,a,pn %%xcc, 1b\n\t" |
| 307 | " add %3, 1, %3\n" | 308 | " mov %4, %2\n\t" |
| 308 | "1:\n\t" | 309 | "sllx %4, 32, %4\n\t" |
| 309 | "sllx %3, 32, %3\n\t" | ||
| 310 | "or %3, %4, %0\n\t" | 310 | "or %3, %4, %0\n\t" |
| 311 | : "=&r" (ret), "=&r" (addr), | 311 | : "=&r" (ret), "=&r" (addr), |
| 312 | "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3) | 312 | "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3) |
diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c index 55e6e2d60d3a..a4d7cc51ce0b 100644 --- a/drivers/video/sbuslib.c +++ b/drivers/video/sbuslib.c | |||
| @@ -199,8 +199,7 @@ struct fbcmap32 { | |||
| 199 | #define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32) | 199 | #define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32) |
| 200 | #define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32) | 200 | #define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32) |
| 201 | 201 | ||
| 202 | static int fbiogetputcmap(struct file *file, struct fb_info *info, | 202 | static int fbiogetputcmap(struct fb_info *info, unsigned int cmd, unsigned long arg) |
| 203 | unsigned int cmd, unsigned long arg) | ||
| 204 | { | 203 | { |
| 205 | struct fbcmap32 __user *argp = (void __user *)arg; | 204 | struct fbcmap32 __user *argp = (void __user *)arg; |
| 206 | struct fbcmap __user *p = compat_alloc_user_space(sizeof(*p)); | 205 | struct fbcmap __user *p = compat_alloc_user_space(sizeof(*p)); |
| @@ -236,8 +235,7 @@ struct fbcursor32 { | |||
| 236 | #define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32) | 235 | #define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32) |
| 237 | #define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32) | 236 | #define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32) |
| 238 | 237 | ||
| 239 | static int fbiogscursor(struct file *file, struct fb_info *info, | 238 | static int fbiogscursor(struct fb_info *info, unsigned long arg) |
| 240 | unsigned long arg) | ||
| 241 | { | 239 | { |
| 242 | struct fbcursor __user *p = compat_alloc_user_space(sizeof(*p)); | 240 | struct fbcursor __user *p = compat_alloc_user_space(sizeof(*p)); |
| 243 | struct fbcursor32 __user *argp = (void __user *)arg; | 241 | struct fbcursor32 __user *argp = (void __user *)arg; |
| @@ -263,8 +261,7 @@ static int fbiogscursor(struct file *file, struct fb_info *info, | |||
| 263 | return info->fbops->fb_ioctl(info, FBIOSCURSOR, (unsigned long)p); | 261 | return info->fbops->fb_ioctl(info, FBIOSCURSOR, (unsigned long)p); |
| 264 | } | 262 | } |
| 265 | 263 | ||
| 266 | long sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd, | 264 | int sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) |
| 267 | unsigned long arg) | ||
| 268 | { | 265 | { |
| 269 | switch (cmd) { | 266 | switch (cmd) { |
| 270 | case FBIOGTYPE: | 267 | case FBIOGTYPE: |
diff --git a/drivers/video/sbuslib.h b/drivers/video/sbuslib.h index f753939013ed..492828c3fe8f 100644 --- a/drivers/video/sbuslib.h +++ b/drivers/video/sbuslib.h | |||
| @@ -20,7 +20,7 @@ extern int sbusfb_mmap_helper(struct sbus_mmap_map *map, | |||
| 20 | int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, | 20 | int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, |
| 21 | struct fb_info *info, | 21 | struct fb_info *info, |
| 22 | int type, int fb_depth, unsigned long fb_size); | 22 | int type, int fb_depth, unsigned long fb_size); |
| 23 | long sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd, | 23 | int sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd, |
| 24 | unsigned long arg); | 24 | unsigned long arg); |
| 25 | 25 | ||
| 26 | #endif /* _SBUSLIB_H */ | 26 | #endif /* _SBUSLIB_H */ |
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index e9086e95a31f..fd6543998788 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c | |||
| @@ -69,13 +69,14 @@ struct sbus_dma_info { | |||
| 69 | }; | 69 | }; |
| 70 | #endif | 70 | #endif |
| 71 | 71 | ||
| 72 | struct snd_cs4231; | ||
| 72 | struct cs4231_dma_control { | 73 | struct cs4231_dma_control { |
| 73 | void (*prepare)(struct cs4231_dma_control *dma_cont, int dir); | 74 | void (*prepare)(struct cs4231_dma_control *dma_cont, int dir); |
| 74 | void (*enable)(struct cs4231_dma_control *dma_cont, int on); | 75 | void (*enable)(struct cs4231_dma_control *dma_cont, int on); |
| 75 | int (*request)(struct cs4231_dma_control *dma_cont, dma_addr_t bus_addr, size_t len); | 76 | int (*request)(struct cs4231_dma_control *dma_cont, dma_addr_t bus_addr, size_t len); |
| 76 | unsigned int (*address)(struct cs4231_dma_control *dma_cont); | 77 | unsigned int (*address)(struct cs4231_dma_control *dma_cont); |
| 77 | void (*reset)(struct snd_cs4231 *chip); | 78 | void (*reset)(struct snd_cs4231 *chip); |
| 78 | void (*preallocate)(struct snd_cs4231 *chip, struct snd_snd_pcm *pcm); | 79 | void (*preallocate)(struct snd_cs4231 *chip, struct snd_pcm *pcm); |
| 79 | #ifdef EBUS_SUPPORT | 80 | #ifdef EBUS_SUPPORT |
| 80 | struct ebus_dma_info ebus_info; | 81 | struct ebus_dma_info ebus_info; |
| 81 | #endif | 82 | #endif |
