aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/drivers.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-01-24treewide: Constify most dma_map_ops structuresBart Van Assche1-1/+1
Most dma_map_ops structures are never modified. Constify these structures such that these can be write-protected. This patch has been generated as follows: git grep -l 'struct dma_map_ops' | xargs -d\\n sed -i \ -e 's/struct dma_map_ops/const struct dma_map_ops/g' \ -e 's/const struct dma_map_ops {/struct dma_map_ops {/g' \ -e 's/^const struct dma_map_ops;$/struct dma_map_ops;/' \ -e 's/const const struct dma_map_ops /const struct dma_map_ops /g'; sed -i -e 's/const \(struct dma_map_ops intel_dma_ops\)/\1/' \ $(git grep -l 'struct dma_map_ops intel_dma_ops'); sed -i -e 's/const \(struct dma_map_ops dma_iommu_ops\)/\1/' \ $(git grep -l 'struct dma_map_ops' | grep ^arch/powerpc); sed -i -e '/^struct vmd_dev {$/,/^};$/ s/const \(struct dma_map_ops[[:blank:]]dma_ops;\)/\1/' \ -e '/^static void vmd_setup_dma_ops/,/^}$/ s/const \(struct dma_map_ops \*dest\)/\1/' \ -e 's/const \(struct dma_map_ops \*dest = \&vmd->dma_ops\)/\1/' \ drivers/pci/host/*.c sed -i -e '/^void __init pci_iommu_alloc(void)$/,/^}$/ s/dma_ops->/intel_dma_ops./' arch/ia64/kernel/pci-dma.c sed -i -e 's/static const struct dma_map_ops sn_dma_ops/static struct dma_map_ops sn_dma_ops/' arch/ia64/sn/pci/pci_dma.c sed -i -e 's/(const struct dma_map_ops \*)//' drivers/misc/mic/bus/vop_bus.c Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Juergen Gross <jgross@suse.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: linux-arch@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Russell King <linux@armlinux.org.uk> Cc: x86@kernel.org Signed-off-by: Doug Ledford <dledford@redhat.com>
2016-11-02parisc: use KERN_CONT when printing device inventoryHelge Deller1-3/+3
Recent changes to printk require KERN_CONT uses to continue logging messages. So add KERN_CONT to output of device inventory. Signed-off-by: Helge Deller <deller@gmx.de>
2016-01-20parisc: convert to dma_map_opsChristoph Hellwig1-1/+1
Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Helge Deller <deller@gmx.de> Acked-by: Helge Deller <deller@gmx.de> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Cc: Joerg Roedel <jroedel@suse.de> Cc: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-12-11parisc/PCI: Use dev_is_pci() to identify PCI devicesYijing Wang1-17/+5
Use dev_is_pci() instead of equivalent local function. Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2013-06-01parisc: memory overflow, 'name' length is too short for usingChen Gang1-1/+1
'path.bc[i]' can be asigned by PCI_SLOT() which can '> 10', so sizeof(6 * "%u:" + "%u" + '\0') may be 21. Since 'name' length is 20, it may be memory overflow. And 'path.bc[i]' is 'unsigned char' for printing, we can be sure the max length of 'name' must be less than 28. So simplify thinking, we can use 28 instead of 20 directly, and do not think of whether 'patchc.bc[i]' can '> 100'. Signed-off-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Helge Deller <deller@gmx.de>
2011-10-31parisc: Add export.h to files needing EXPORT_SYMBOL/THIS_MODULEPaul Gortmaker1-0/+1
These guys were getting it implicitly via module.h before, when module.h was everywhere. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2009-01-05parisc: add uevent helper for parisc busHelge Deller1-6/+34
parisc: add uevent helper for parisc bus udev device-driver auto detection was failing to work on the GSC bus, since udev didn't knew wich driver to load due to a missing MODALIAS environment variable from kernel. This patch fixes this by adding the MODALIAS environment variable to the uevent kernel notifications. Since modalias_show() generated the modalias string already, I splitted this out and created a new static function make_modalias() which is now used by modalias_show() and the new parisc_uevent() function. Tested on 715/64 and c3000. Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
2008-11-26parisc: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers1-2/+4
(I did not compile or test it, please let me know, or help fixing it, if something is wrong with the conversion) This patch is part of a larger patch series which will remove the "char bus_id[20]" name string from struct device. The device name is managed in the kobject anyway, and without any size limitation, and just needlessly copied into "struct device". To set and read the device name dev_name(dev) and dev_set_name(dev) must be used. If your code uses static kobjects, which it shouldn't do, "const char *init_name" can be used to statically provide the name the registered device should have. At registration time, the init_name field is cleared, to enforce the use of dev_name(dev) to access the device name at a later time. We need to get rid of all occurrences of bus_id in the entire tree to be able to enable the new interface. Please apply this patch, and possibly convert any remaining remaining occurrences of bus_id. We want to submit a patch to -next, which will remove bus_id from "struct device", to find the remaining pieces to convert, and finally switch over to the new api, which will remove the 20 bytes array and does no longer have a size limitation. Thanks, Kay Cc: Matthew Wilcox <matthew@wil.cx> Cc: linux-parisc@vger.kernel.org Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
2007-02-17[PARISC] display parisc device modalias in sysfsKyle McMartin1-0/+11
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-12-08[PARISC] avoid compiler warnings when compiling 64bitHelge Deller1-3/+5
Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-10-07[PA-RISC] Fix boot breakageMatthew Wilcox1-3/+3
Conditionals were the wrong way around. Turns out I was booting the wrong kernel when testing the original fix. Signed-off-by: Matthew Wilcox <matthew@wil.cx>
2006-10-05[PA-RISC] Fix must_check warnings in drivers.cMatthew Wilcox1-3/+8
Panic if we can't register the parisc bus or the root parisc device. There's no way we can boot without them, so let the user know ASAP. If we can't register a parisc device, handle the failure gracefully. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
2006-01-22[PARISC] Use kzalloc and other janitor-style cleanupsHelge Deller1-2/+1
Helge, o Convert a bunch of kmalloc/memset uses to kzalloc. o pci.c: Add some __read_mostly annotations. o pci.c: Move constant pci_post_reset_delay to asm/pci.h o grfioctl.h: Add A4450A to comment of CRT_ID_VISUALIZE_EG. o Add some consts to perf.c/perf_images.h Matthew, o sticore.c: Add some consts to suppress compile warnings. Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-01-13[PATCH] Add parisc_bus_type probe and remove methodsRussell King1-2/+2
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-10[PARISC] Fix GSC graphics cards with 64MB regionsMatthew Wilcox1-3/+8
Make knapps work with its 64MB gfx card. I probably just broke another machine in the process, but assuming 64MB when 64MB aligned is probably safer than assuming 32MB all the time. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-01-10[PARISC] Add __read_mostly section for pariscHelge Deller1-1/+1
Flag a whole bunch of things as __read_mostly on parisc. Also flag a few branches as unlikely() and cleanup a bit of code. Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17[PARISC] Improve the error message when we get a clashing mod pathMatthew Wilcox1-2/+6
Improve the error message when we get a clashing mod path, and actually display the IODC data and path for the conflicting device. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21[PARISC] Convert parisc_device tree to use struct device klistsMatthew Wilcox1-86/+187
Fix parse_tree_node. much more needs to be done to fix this file. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Make drivers.c compile based on a patch from Pat Mochel. From: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org> Fix drivers.c to create new device tree nodes when no match is found. Signed-off-by: Richard Hirst <rhirst@parisc-linux.org> Do a proper depth-first search returning parents before children, using the new klist infrastructure. Signed-off-by: Richard Hirst <rhirst@parisc-linux.org> Fixed parisc_device traversal so that pdc_stable works again Fixed check_dev so it doesn't dereference a parisc_device until it has verified the bus type Signed-off-by: Randolph Chung <tausq@parisc-linux.org> Convert pa_dev->hpa from an unsigned long to a struct resource. Use insert_resource() instead of request_mem_region(). Request resources at bus walk time instead of driver probe time. Don't release the resources as we don't have any hotplug parisc_device support yet. Add parisc_pathname() to conveniently get the textual representation of the hwpath used in sysfs. Inline the remnants of claim_device() into its caller. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> I noticed that some of the STI regions weren't showing up in iomem. Reading the STI spec indicated that all STI devices occupy at least 32MB. So check for STI HPAs and give them 32MB instead of 4kB. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-06-20[PATCH] Driver Core: arch: update device attribute callbacksYani Ioannou1-1/+1
Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+765
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!