diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-10 15:58:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-10 15:58:34 -0500 |
commit | 2b1768f39aebfcccdc5b948eb4962918a5a64581 (patch) | |
tree | f92c98ef10cf1ded4985050589413946aa8f0e6c /drivers | |
parent | affd9a8dbc22beadae1186aa060685d6f6a06792 (diff) | |
parent | 226f7cea949303a3e1911999a9a2c71b0a708e73 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Pull sparc fixes from David Miller:
"Several build/bug fixes for sparc, including:
1) Configuring a mix of static vs. modular sparc64 crypto modules
didn't work, remove an ill-conceived attempt to only have to build
the device match table for these drivers once to fix the problem.
Reported by Meelis Roos.
2) Make the montgomery multiple/square and mpmul instructions actually
usable in 32-bit tasks. Essentially this involves providing 32-bit
userspace with a way to use a 64-bit stack when it needs to.
3) Our sparc64 atomic backoffs don't yield cpu strands properly on
Niagara chips. Use pause instruction when available to achieve
this, otherwise use a benign instruction we know blocks the strand
for some time.
4) Wire up kcmp
5) Fix the build of various drivers by removing the unnecessary
blocking of OF_GPIO when SPARC.
6) Fix unintended regression wherein of_address_to_resource stopped
being provided. Fix from Andreas Larsson.
7) Fix NULL dereference in leon_handle_ext_irq(), also from Andreas
Larsson."
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
sparc64: Fix build with mix of modular vs. non-modular crypto drivers.
sparc: Support atomic64_dec_if_positive properly.
of/address: sparc: Declare of_address_to_resource() as an extern function for sparc again
sparc32, leon: Check for existent irq_map entry in leon_handle_ext_irq
sparc: Add sparc support for platform_get_irq()
sparc: Allow OF_GPIO on sparc.
qlogicpti: Fix build warning.
sparc: Wire up sys_kcmp.
sparc64: Improvde documentation and readability of atomic backoff code.
sparc64: Use pause instruction when available.
sparc64: Fix cpu strand yielding.
sparc64: Make montmul/montsqr/mpmul usable in 32-bit threads.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/platform.c | 7 | ||||
-rw-r--r-- | drivers/gpio/Kconfig | 2 | ||||
-rw-r--r-- | drivers/scsi/qlogicpti.c | 13 |
3 files changed, 9 insertions, 13 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 8727e9c5eea4..72c776f2a1f5 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
@@ -83,9 +83,16 @@ EXPORT_SYMBOL_GPL(platform_get_resource); | |||
83 | */ | 83 | */ |
84 | int platform_get_irq(struct platform_device *dev, unsigned int num) | 84 | int platform_get_irq(struct platform_device *dev, unsigned int num) |
85 | { | 85 | { |
86 | #ifdef CONFIG_SPARC | ||
87 | /* sparc does not have irqs represented as IORESOURCE_IRQ resources */ | ||
88 | if (!dev || num >= dev->archdata.num_irqs) | ||
89 | return -ENXIO; | ||
90 | return dev->archdata.irqs[num]; | ||
91 | #else | ||
86 | struct resource *r = platform_get_resource(dev, IORESOURCE_IRQ, num); | 92 | struct resource *r = platform_get_resource(dev, IORESOURCE_IRQ, num); |
87 | 93 | ||
88 | return r ? r->start : -ENXIO; | 94 | return r ? r->start : -ENXIO; |
95 | #endif | ||
89 | } | 96 | } |
90 | EXPORT_SYMBOL_GPL(platform_get_irq); | 97 | EXPORT_SYMBOL_GPL(platform_get_irq); |
91 | 98 | ||
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index d055cee36942..f11d8e3b4041 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig | |||
@@ -47,7 +47,7 @@ if GPIOLIB | |||
47 | 47 | ||
48 | config OF_GPIO | 48 | config OF_GPIO |
49 | def_bool y | 49 | def_bool y |
50 | depends on OF && !SPARC | 50 | depends on OF |
51 | 51 | ||
52 | config DEBUG_GPIO | 52 | config DEBUG_GPIO |
53 | bool "Debug GPIO calls" | 53 | bool "Debug GPIO calls" |
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index b191dd549207..71fddbc60f18 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c | |||
@@ -1294,26 +1294,19 @@ static struct scsi_host_template qpti_template = { | |||
1294 | static const struct of_device_id qpti_match[]; | 1294 | static const struct of_device_id qpti_match[]; |
1295 | static int __devinit qpti_sbus_probe(struct platform_device *op) | 1295 | static int __devinit qpti_sbus_probe(struct platform_device *op) |
1296 | { | 1296 | { |
1297 | const struct of_device_id *match; | ||
1298 | struct scsi_host_template *tpnt; | ||
1299 | struct device_node *dp = op->dev.of_node; | 1297 | struct device_node *dp = op->dev.of_node; |
1300 | struct Scsi_Host *host; | 1298 | struct Scsi_Host *host; |
1301 | struct qlogicpti *qpti; | 1299 | struct qlogicpti *qpti; |
1302 | static int nqptis; | 1300 | static int nqptis; |
1303 | const char *fcode; | 1301 | const char *fcode; |
1304 | 1302 | ||
1305 | match = of_match_device(qpti_match, &op->dev); | ||
1306 | if (!match) | ||
1307 | return -EINVAL; | ||
1308 | tpnt = match->data; | ||
1309 | |||
1310 | /* Sometimes Antares cards come up not completely | 1303 | /* Sometimes Antares cards come up not completely |
1311 | * setup, and we get a report of a zero IRQ. | 1304 | * setup, and we get a report of a zero IRQ. |
1312 | */ | 1305 | */ |
1313 | if (op->archdata.irqs[0] == 0) | 1306 | if (op->archdata.irqs[0] == 0) |
1314 | return -ENODEV; | 1307 | return -ENODEV; |
1315 | 1308 | ||
1316 | host = scsi_host_alloc(tpnt, sizeof(struct qlogicpti)); | 1309 | host = scsi_host_alloc(&qpti_template, sizeof(struct qlogicpti)); |
1317 | if (!host) | 1310 | if (!host) |
1318 | return -ENOMEM; | 1311 | return -ENOMEM; |
1319 | 1312 | ||
@@ -1445,19 +1438,15 @@ static int __devexit qpti_sbus_remove(struct platform_device *op) | |||
1445 | static const struct of_device_id qpti_match[] = { | 1438 | static const struct of_device_id qpti_match[] = { |
1446 | { | 1439 | { |
1447 | .name = "ptisp", | 1440 | .name = "ptisp", |
1448 | .data = &qpti_template, | ||
1449 | }, | 1441 | }, |
1450 | { | 1442 | { |
1451 | .name = "PTI,ptisp", | 1443 | .name = "PTI,ptisp", |
1452 | .data = &qpti_template, | ||
1453 | }, | 1444 | }, |
1454 | { | 1445 | { |
1455 | .name = "QLGC,isp", | 1446 | .name = "QLGC,isp", |
1456 | .data = &qpti_template, | ||
1457 | }, | 1447 | }, |
1458 | { | 1448 | { |
1459 | .name = "SUNW,isp", | 1449 | .name = "SUNW,isp", |
1460 | .data = &qpti_template, | ||
1461 | }, | 1450 | }, |
1462 | {}, | 1451 | {}, |
1463 | }; | 1452 | }; |