diff options
-rw-r--r-- | Documentation/DocBook/kernel-hacking.tmpl | 2 | ||||
-rw-r--r-- | MAINTAINERS | 6 | ||||
-rw-r--r-- | README | 9 | ||||
-rw-r--r-- | arch/ppc64/Makefile | 2 | ||||
-rw-r--r-- | arch/ppc64/kernel/pSeries_iommu.c | 169 | ||||
-rw-r--r-- | arch/ppc64/kernel/pci.c | 9 | ||||
-rw-r--r-- | arch/ppc64/kernel/prom_init.c | 3 | ||||
-rw-r--r-- | arch/x86_64/Kconfig | 2 | ||||
-rw-r--r-- | drivers/block/cciss.c | 5 | ||||
-rw-r--r-- | drivers/block/ll_rw_blk.c | 38 | ||||
-rw-r--r-- | drivers/message/i2o/config-osm.c | 5 | ||||
-rw-r--r-- | fs/fat/inode.c | 11 | ||||
-rw-r--r-- | fs/proc/base.c | 84 | ||||
-rw-r--r-- | include/linux/mm.h | 10 | ||||
-rw-r--r-- | include/linux/syscalls.h | 2 | ||||
-rw-r--r-- | kernel/printk.c | 7 | ||||
-rw-r--r-- | mm/mmap.c | 2 | ||||
-rw-r--r-- | mm/mprotect.c | 3 |
18 files changed, 218 insertions, 151 deletions
diff --git a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl index 6367bba32d22..582032eea872 100644 --- a/Documentation/DocBook/kernel-hacking.tmpl +++ b/Documentation/DocBook/kernel-hacking.tmpl | |||
@@ -1105,7 +1105,7 @@ static struct block_device_operations opt_fops = { | |||
1105 | </listitem> | 1105 | </listitem> |
1106 | <listitem> | 1106 | <listitem> |
1107 | <para> | 1107 | <para> |
1108 | Function names as strings (__func__). | 1108 | Function names as strings (__FUNCTION__). |
1109 | </para> | 1109 | </para> |
1110 | </listitem> | 1110 | </listitem> |
1111 | <listitem> | 1111 | <listitem> |
diff --git a/MAINTAINERS b/MAINTAINERS index dc8f3babcabd..ade7415d2467 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -2266,6 +2266,12 @@ M: kristen.c.accardi@intel.com | |||
2266 | L: pcihpd-discuss@lists.sourceforge.net | 2266 | L: pcihpd-discuss@lists.sourceforge.net |
2267 | S: Maintained | 2267 | S: Maintained |
2268 | 2268 | ||
2269 | SKGE, SKY2 10/100/1000 GIGABIT ETHERNET DRIVERS | ||
2270 | P: Stephen Hemminger | ||
2271 | M: shemminger@osdl.org | ||
2272 | L: netdev@vger.kernel.org | ||
2273 | S: Maintained | ||
2274 | |||
2269 | SPARC (sparc32): | 2275 | SPARC (sparc32): |
2270 | P: William L. Irwin | 2276 | P: William L. Irwin |
2271 | M: wli@holomorphy.com | 2277 | M: wli@holomorphy.com |
@@ -149,6 +149,9 @@ CONFIGURING the kernel: | |||
149 | "make gconfig" X windows (Gtk) based configuration tool. | 149 | "make gconfig" X windows (Gtk) based configuration tool. |
150 | "make oldconfig" Default all questions based on the contents of | 150 | "make oldconfig" Default all questions based on the contents of |
151 | your existing ./.config file. | 151 | your existing ./.config file. |
152 | "make silentoldconfig" | ||
153 | Like above, but avoids cluttering the screen | ||
154 | with question already answered. | ||
152 | 155 | ||
153 | NOTES on "make config": | 156 | NOTES on "make config": |
154 | - having unnecessary drivers will make the kernel bigger, and can | 157 | - having unnecessary drivers will make the kernel bigger, and can |
@@ -169,9 +172,6 @@ CONFIGURING the kernel: | |||
169 | should probably answer 'n' to the questions for | 172 | should probably answer 'n' to the questions for |
170 | "development", "experimental", or "debugging" features. | 173 | "development", "experimental", or "debugging" features. |
171 | 174 | ||
172 | - Check the top Makefile for further site-dependent configuration | ||
173 | (default SVGA mode etc). | ||
174 | |||
175 | COMPILING the kernel: | 175 | COMPILING the kernel: |
176 | 176 | ||
177 | - Make sure you have gcc 2.95.3 available. | 177 | - Make sure you have gcc 2.95.3 available. |
@@ -199,6 +199,9 @@ COMPILING the kernel: | |||
199 | are installing a new kernel with the same version number as your | 199 | are installing a new kernel with the same version number as your |
200 | working kernel, make a backup of your modules directory before you | 200 | working kernel, make a backup of your modules directory before you |
201 | do a "make modules_install". | 201 | do a "make modules_install". |
202 | In alternative, before compiling, edit your Makefile and change the | ||
203 | "EXTRAVERSION" line - its content is appended to the regular kernel | ||
204 | version. | ||
202 | 205 | ||
203 | - In order to boot your new kernel, you'll need to copy the kernel | 206 | - In order to boot your new kernel, you'll need to copy the kernel |
204 | image (e.g. .../linux/arch/i386/boot/bzImage after compilation) | 207 | image (e.g. .../linux/arch/i386/boot/bzImage after compilation) |
diff --git a/arch/ppc64/Makefile b/arch/ppc64/Makefile index 17d2c1eac3b8..521c2a5a2862 100644 --- a/arch/ppc64/Makefile +++ b/arch/ppc64/Makefile | |||
@@ -107,7 +107,7 @@ install: vmlinux | |||
107 | $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@ | 107 | $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@ |
108 | 108 | ||
109 | defaultimage-$(CONFIG_PPC_PSERIES) := zImage | 109 | defaultimage-$(CONFIG_PPC_PSERIES) := zImage |
110 | defaultimage-$(CONFIG_PPC_PMAC) := vmlinux | 110 | defaultimage-$(CONFIG_PPC_PMAC) := zImage.vmode |
111 | defaultimage-$(CONFIG_PPC_MAPLE) := zImage | 111 | defaultimage-$(CONFIG_PPC_MAPLE) := zImage |
112 | defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux | 112 | defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux |
113 | KBUILD_IMAGE := $(defaultimage-y) | 113 | KBUILD_IMAGE := $(defaultimage-y) |
diff --git a/arch/ppc64/kernel/pSeries_iommu.c b/arch/ppc64/kernel/pSeries_iommu.c index f0fd7fbd6531..8c6313e7e145 100644 --- a/arch/ppc64/kernel/pSeries_iommu.c +++ b/arch/ppc64/kernel/pSeries_iommu.c | |||
@@ -265,8 +265,10 @@ static void iommu_table_setparms(struct pci_controller *phb, | |||
265 | tbl->it_offset = phb->dma_window_base_cur >> PAGE_SHIFT; | 265 | tbl->it_offset = phb->dma_window_base_cur >> PAGE_SHIFT; |
266 | 266 | ||
267 | /* Test if we are going over 2GB of DMA space */ | 267 | /* Test if we are going over 2GB of DMA space */ |
268 | if (phb->dma_window_base_cur + phb->dma_window_size > (1L << 31)) | 268 | if (phb->dma_window_base_cur + phb->dma_window_size > 0x80000000ul) { |
269 | udbg_printf("PCI_DMA: Unexpected number of IOAs under this PHB.\n"); | ||
269 | panic("PCI_DMA: Unexpected number of IOAs under this PHB.\n"); | 270 | panic("PCI_DMA: Unexpected number of IOAs under this PHB.\n"); |
271 | } | ||
270 | 272 | ||
271 | phb->dma_window_base_cur += phb->dma_window_size; | 273 | phb->dma_window_base_cur += phb->dma_window_size; |
272 | 274 | ||
@@ -310,92 +312,84 @@ static void iommu_table_setparms_lpar(struct pci_controller *phb, | |||
310 | 312 | ||
311 | static void iommu_bus_setup_pSeries(struct pci_bus *bus) | 313 | static void iommu_bus_setup_pSeries(struct pci_bus *bus) |
312 | { | 314 | { |
313 | struct device_node *dn, *pdn; | 315 | struct device_node *dn; |
314 | struct pci_dn *pci; | ||
315 | struct iommu_table *tbl; | 316 | struct iommu_table *tbl; |
317 | struct device_node *isa_dn, *isa_dn_orig; | ||
318 | struct device_node *tmp; | ||
319 | struct pci_dn *pci; | ||
320 | int children; | ||
316 | 321 | ||
317 | DBG("iommu_bus_setup_pSeries, bus %p, bus->self %p\n", bus, bus->self); | 322 | DBG("iommu_bus_setup_pSeries, bus %p, bus->self %p\n", bus, bus->self); |
318 | 323 | ||
319 | /* For each (root) bus, we carve up the available DMA space in 256MB | 324 | dn = pci_bus_to_OF_node(bus); |
320 | * pieces. Since each piece is used by one (sub) bus/device, that would | 325 | pci = PCI_DN(dn); |
321 | * give a maximum of 7 devices per PHB. In most cases, this is plenty. | 326 | |
322 | * | 327 | if (bus->self) { |
323 | * The exception is on Python PHBs (pre-POWER4). Here we don't have EADS | 328 | /* This is not a root bus, any setup will be done for the |
324 | * bridges below the PHB to allocate the sectioned tables to, so instead | 329 | * device-side of the bridge in iommu_dev_setup_pSeries(). |
325 | * we allocate a 1GB table at the PHB level. | 330 | */ |
331 | return; | ||
332 | } | ||
333 | |||
334 | /* Check if the ISA bus on the system is under | ||
335 | * this PHB. | ||
326 | */ | 336 | */ |
337 | isa_dn = isa_dn_orig = of_find_node_by_type(NULL, "isa"); | ||
327 | 338 | ||
328 | dn = pci_bus_to_OF_node(bus); | 339 | while (isa_dn && isa_dn != dn) |
329 | pci = dn->data; | 340 | isa_dn = isa_dn->parent; |
330 | 341 | ||
331 | if (!bus->self) { | 342 | if (isa_dn_orig) |
332 | /* Root bus */ | 343 | of_node_put(isa_dn_orig); |
333 | if (is_python(dn)) { | ||
334 | unsigned int *iohole; | ||
335 | |||
336 | DBG("Python root bus %s\n", bus->name); | ||
337 | |||
338 | iohole = (unsigned int *)get_property(dn, "io-hole", 0); | ||
339 | |||
340 | if (iohole) { | ||
341 | /* On first bus we need to leave room for the | ||
342 | * ISA address space. Just skip the first 256MB | ||
343 | * alltogether. This leaves 768MB for the window. | ||
344 | */ | ||
345 | DBG("PHB has io-hole, reserving 256MB\n"); | ||
346 | pci->phb->dma_window_size = 3 << 28; | ||
347 | pci->phb->dma_window_base_cur = 1 << 28; | ||
348 | } else { | ||
349 | /* 1GB window by default */ | ||
350 | pci->phb->dma_window_size = 1 << 30; | ||
351 | pci->phb->dma_window_base_cur = 0; | ||
352 | } | ||
353 | |||
354 | tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL); | ||
355 | |||
356 | iommu_table_setparms(pci->phb, dn, tbl); | ||
357 | pci->iommu_table = iommu_init_table(tbl); | ||
358 | } else { | ||
359 | /* Do a 128MB table at root. This is used for the IDE | ||
360 | * controller on some SMP-mode POWER4 machines. It | ||
361 | * doesn't hurt to allocate it on other machines | ||
362 | * -- it'll just be unused since new tables are | ||
363 | * allocated on the EADS level. | ||
364 | * | ||
365 | * Allocate at offset 128MB to avoid having to deal | ||
366 | * with ISA holes; 128MB table for IDE is plenty. | ||
367 | */ | ||
368 | pci->phb->dma_window_size = 1 << 27; | ||
369 | pci->phb->dma_window_base_cur = 1 << 27; | ||
370 | |||
371 | tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL); | ||
372 | |||
373 | iommu_table_setparms(pci->phb, dn, tbl); | ||
374 | pci->iommu_table = iommu_init_table(tbl); | ||
375 | |||
376 | /* All child buses have 256MB tables */ | ||
377 | pci->phb->dma_window_size = 1 << 28; | ||
378 | } | ||
379 | } else { | ||
380 | pdn = pci_bus_to_OF_node(bus->parent); | ||
381 | 344 | ||
382 | if (!bus->parent->self && !is_python(pdn)) { | 345 | /* Count number of direct PCI children of the PHB. |
383 | struct iommu_table *tbl; | 346 | * All PCI device nodes have class-code property, so it's |
384 | /* First child and not python means this is the EADS | 347 | * an easy way to find them. |
385 | * level. Allocate new table for this slot with 256MB | 348 | */ |
386 | * window. | 349 | for (children = 0, tmp = dn->child; tmp; tmp = tmp->sibling) |
387 | */ | 350 | if (get_property(tmp, "class-code", NULL)) |
351 | children++; | ||
388 | 352 | ||
389 | tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL); | 353 | DBG("Children: %d\n", children); |
390 | 354 | ||
391 | iommu_table_setparms(pci->phb, dn, tbl); | 355 | /* Calculate amount of DMA window per slot. Each window must be |
356 | * a power of two (due to pci_alloc_consistent requirements). | ||
357 | * | ||
358 | * Keep 256MB aside for PHBs with ISA. | ||
359 | */ | ||
392 | 360 | ||
393 | pci->iommu_table = iommu_init_table(tbl); | 361 | if (!isa_dn) { |
394 | } else { | 362 | /* No ISA/IDE - just set window size and return */ |
395 | /* Lower than first child or under python, use parent table */ | 363 | pci->phb->dma_window_size = 0x80000000ul; /* To be divided */ |
396 | pci->iommu_table = PCI_DN(pdn)->iommu_table; | 364 | |
397 | } | 365 | while (pci->phb->dma_window_size * children > 0x80000000ul) |
366 | pci->phb->dma_window_size >>= 1; | ||
367 | DBG("No ISA/IDE, window size is %x\n", pci->phb->dma_window_size); | ||
368 | pci->phb->dma_window_base_cur = 0; | ||
369 | |||
370 | return; | ||
398 | } | 371 | } |
372 | |||
373 | /* If we have ISA, then we probably have an IDE | ||
374 | * controller too. Allocate a 128MB table but | ||
375 | * skip the first 128MB to avoid stepping on ISA | ||
376 | * space. | ||
377 | */ | ||
378 | pci->phb->dma_window_size = 0x8000000ul; | ||
379 | pci->phb->dma_window_base_cur = 0x8000000ul; | ||
380 | |||
381 | tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL); | ||
382 | |||
383 | iommu_table_setparms(pci->phb, dn, tbl); | ||
384 | pci->iommu_table = iommu_init_table(tbl); | ||
385 | |||
386 | /* Divide the rest (1.75GB) among the children */ | ||
387 | pci->phb->dma_window_size = 0x80000000ul; | ||
388 | while (pci->phb->dma_window_size * children > 0x70000000ul) | ||
389 | pci->phb->dma_window_size >>= 1; | ||
390 | |||
391 | DBG("ISA/IDE, window size is %x\n", pci->phb->dma_window_size); | ||
392 | |||
399 | } | 393 | } |
400 | 394 | ||
401 | 395 | ||
@@ -446,14 +440,29 @@ static void iommu_bus_setup_pSeriesLP(struct pci_bus *bus) | |||
446 | static void iommu_dev_setup_pSeries(struct pci_dev *dev) | 440 | static void iommu_dev_setup_pSeries(struct pci_dev *dev) |
447 | { | 441 | { |
448 | struct device_node *dn, *mydn; | 442 | struct device_node *dn, *mydn; |
443 | struct iommu_table *tbl; | ||
449 | 444 | ||
450 | DBG("iommu_dev_setup_pSeries, dev %p (%s)\n", dev, dev->pretty_name); | 445 | DBG("iommu_dev_setup_pSeries, dev %p (%s)\n", dev, dev->pretty_name); |
451 | /* Now copy the iommu_table ptr from the bus device down to the | 446 | |
452 | * pci device_node. This means get_iommu_table() won't need to search | ||
453 | * up the device tree to find it. | ||
454 | */ | ||
455 | mydn = dn = pci_device_to_OF_node(dev); | 447 | mydn = dn = pci_device_to_OF_node(dev); |
456 | 448 | ||
449 | /* If we're the direct child of a root bus, then we need to allocate | ||
450 | * an iommu table ourselves. The bus setup code should have setup | ||
451 | * the window sizes already. | ||
452 | */ | ||
453 | if (!dev->bus->self) { | ||
454 | DBG(" --> first child, no bridge. Allocating iommu table.\n"); | ||
455 | tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL); | ||
456 | iommu_table_setparms(PCI_DN(dn)->phb, dn, tbl); | ||
457 | PCI_DN(mydn)->iommu_table = iommu_init_table(tbl); | ||
458 | |||
459 | return; | ||
460 | } | ||
461 | |||
462 | /* If this device is further down the bus tree, search upwards until | ||
463 | * an already allocated iommu table is found and use that. | ||
464 | */ | ||
465 | |||
457 | while (dn && dn->data && PCI_DN(dn)->iommu_table == NULL) | 466 | while (dn && dn->data && PCI_DN(dn)->iommu_table == NULL) |
458 | dn = dn->parent; | 467 | dn = dn->parent; |
459 | 468 | ||
diff --git a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c index 861138ad092c..ff4be1da69d5 100644 --- a/arch/ppc64/kernel/pci.c +++ b/arch/ppc64/kernel/pci.c | |||
@@ -246,11 +246,14 @@ static unsigned int pci_parse_of_flags(u32 addr0) | |||
246 | unsigned int flags = 0; | 246 | unsigned int flags = 0; |
247 | 247 | ||
248 | if (addr0 & 0x02000000) { | 248 | if (addr0 & 0x02000000) { |
249 | flags |= IORESOURCE_MEM; | 249 | flags = IORESOURCE_MEM | PCI_BASE_ADDRESS_SPACE_MEMORY; |
250 | flags |= (addr0 >> 22) & PCI_BASE_ADDRESS_MEM_TYPE_64; | ||
251 | flags |= (addr0 >> 28) & PCI_BASE_ADDRESS_MEM_TYPE_1M; | ||
250 | if (addr0 & 0x40000000) | 252 | if (addr0 & 0x40000000) |
251 | flags |= IORESOURCE_PREFETCH; | 253 | flags |= IORESOURCE_PREFETCH |
254 | | PCI_BASE_ADDRESS_MEM_PREFETCH; | ||
252 | } else if (addr0 & 0x01000000) | 255 | } else if (addr0 & 0x01000000) |
253 | flags |= IORESOURCE_IO; | 256 | flags = IORESOURCE_IO | PCI_BASE_ADDRESS_SPACE_IO; |
254 | return flags; | 257 | return flags; |
255 | } | 258 | } |
256 | 259 | ||
diff --git a/arch/ppc64/kernel/prom_init.c b/arch/ppc64/kernel/prom_init.c index 9979919cdf92..f252670874a4 100644 --- a/arch/ppc64/kernel/prom_init.c +++ b/arch/ppc64/kernel/prom_init.c | |||
@@ -1711,6 +1711,7 @@ static void __init flatten_device_tree(void) | |||
1711 | unsigned long offset = reloc_offset(); | 1711 | unsigned long offset = reloc_offset(); |
1712 | unsigned long mem_start, mem_end, room; | 1712 | unsigned long mem_start, mem_end, room; |
1713 | struct boot_param_header *hdr; | 1713 | struct boot_param_header *hdr; |
1714 | struct prom_t *_prom = PTRRELOC(&prom); | ||
1714 | char *namep; | 1715 | char *namep; |
1715 | u64 *rsvmap; | 1716 | u64 *rsvmap; |
1716 | 1717 | ||
@@ -1765,6 +1766,7 @@ static void __init flatten_device_tree(void) | |||
1765 | RELOC(dt_struct_end) = PAGE_ALIGN(mem_start); | 1766 | RELOC(dt_struct_end) = PAGE_ALIGN(mem_start); |
1766 | 1767 | ||
1767 | /* Finish header */ | 1768 | /* Finish header */ |
1769 | hdr->boot_cpuid_phys = _prom->cpu; | ||
1768 | hdr->magic = OF_DT_HEADER; | 1770 | hdr->magic = OF_DT_HEADER; |
1769 | hdr->totalsize = RELOC(dt_struct_end) - RELOC(dt_header_start); | 1771 | hdr->totalsize = RELOC(dt_struct_end) - RELOC(dt_header_start); |
1770 | hdr->off_dt_struct = RELOC(dt_struct_start) - RELOC(dt_header_start); | 1772 | hdr->off_dt_struct = RELOC(dt_struct_start) - RELOC(dt_header_start); |
@@ -1854,7 +1856,6 @@ static void __init prom_find_boot_cpu(void) | |||
1854 | 1856 | ||
1855 | cpu_pkg = call_prom("instance-to-package", 1, 1, prom_cpu); | 1857 | cpu_pkg = call_prom("instance-to-package", 1, 1, prom_cpu); |
1856 | 1858 | ||
1857 | prom_setprop(cpu_pkg, "linux,boot-cpu", NULL, 0); | ||
1858 | prom_getprop(cpu_pkg, "reg", &getprop_rval, sizeof(getprop_rval)); | 1859 | prom_getprop(cpu_pkg, "reg", &getprop_rval, sizeof(getprop_rval)); |
1859 | _prom->cpu = getprop_rval; | 1860 | _prom->cpu = getprop_rval; |
1860 | 1861 | ||
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 0969d570f3b5..21afa69a086d 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
@@ -308,7 +308,7 @@ config HPET_TIMER | |||
308 | present. The HPET provides a stable time base on SMP | 308 | present. The HPET provides a stable time base on SMP |
309 | systems, unlike the TSC, but it is more expensive to access, | 309 | systems, unlike the TSC, but it is more expensive to access, |
310 | as it is off-chip. You can find the HPET spec at | 310 | as it is off-chip. You can find the HPET spec at |
311 | <http://www.intel.com/labs/platcomp/hpet/hpetspec.htm>. | 311 | <http://www.intel.com/hardwaredesign/hpetspec.htm>. |
312 | 312 | ||
313 | config X86_PM_TIMER | 313 | config X86_PM_TIMER |
314 | bool "PM timer" | 314 | bool "PM timer" |
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index c56f995aadad..486b6e1c7dfb 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -483,9 +483,6 @@ static int cciss_open(struct inode *inode, struct file *filep) | |||
483 | printk(KERN_DEBUG "cciss_open %s\n", inode->i_bdev->bd_disk->disk_name); | 483 | printk(KERN_DEBUG "cciss_open %s\n", inode->i_bdev->bd_disk->disk_name); |
484 | #endif /* CCISS_DEBUG */ | 484 | #endif /* CCISS_DEBUG */ |
485 | 485 | ||
486 | if (host->busy_initializing) | ||
487 | return -EBUSY; | ||
488 | |||
489 | if (host->busy_initializing || drv->busy_configuring) | 486 | if (host->busy_initializing || drv->busy_configuring) |
490 | return -EBUSY; | 487 | return -EBUSY; |
491 | /* | 488 | /* |
@@ -2991,6 +2988,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, | |||
2991 | hba[i]->access.set_intr_mask(hba[i], CCISS_INTR_ON); | 2988 | hba[i]->access.set_intr_mask(hba[i], CCISS_INTR_ON); |
2992 | 2989 | ||
2993 | cciss_procinit(i); | 2990 | cciss_procinit(i); |
2991 | hba[i]->busy_initializing = 0; | ||
2994 | 2992 | ||
2995 | for(j=0; j < NWD; j++) { /* mfm */ | 2993 | for(j=0; j < NWD; j++) { /* mfm */ |
2996 | drive_info_struct *drv = &(hba[i]->drv[j]); | 2994 | drive_info_struct *drv = &(hba[i]->drv[j]); |
@@ -3033,7 +3031,6 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, | |||
3033 | add_disk(disk); | 3031 | add_disk(disk); |
3034 | } | 3032 | } |
3035 | 3033 | ||
3036 | hba[i]->busy_initializing = 0; | ||
3037 | return(1); | 3034 | return(1); |
3038 | 3035 | ||
3039 | clean4: | 3036 | clean4: |
diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c index 483d71b10cf9..baedac522945 100644 --- a/drivers/block/ll_rw_blk.c +++ b/drivers/block/ll_rw_blk.c | |||
@@ -2373,44 +2373,6 @@ int blkdev_issue_flush(struct block_device *bdev, sector_t *error_sector) | |||
2373 | 2373 | ||
2374 | EXPORT_SYMBOL(blkdev_issue_flush); | 2374 | EXPORT_SYMBOL(blkdev_issue_flush); |
2375 | 2375 | ||
2376 | /** | ||
2377 | * blkdev_scsi_issue_flush_fn - issue flush for SCSI devices | ||
2378 | * @q: device queue | ||
2379 | * @disk: gendisk | ||
2380 | * @error_sector: error offset | ||
2381 | * | ||
2382 | * Description: | ||
2383 | * Devices understanding the SCSI command set, can use this function as | ||
2384 | * a helper for issuing a cache flush. Note: driver is required to store | ||
2385 | * the error offset (in case of error flushing) in ->sector of struct | ||
2386 | * request. | ||
2387 | */ | ||
2388 | int blkdev_scsi_issue_flush_fn(request_queue_t *q, struct gendisk *disk, | ||
2389 | sector_t *error_sector) | ||
2390 | { | ||
2391 | struct request *rq = blk_get_request(q, WRITE, __GFP_WAIT); | ||
2392 | int ret; | ||
2393 | |||
2394 | rq->flags |= REQ_BLOCK_PC | REQ_SOFTBARRIER; | ||
2395 | rq->sector = 0; | ||
2396 | memset(rq->cmd, 0, sizeof(rq->cmd)); | ||
2397 | rq->cmd[0] = 0x35; | ||
2398 | rq->cmd_len = 12; | ||
2399 | rq->data = NULL; | ||
2400 | rq->data_len = 0; | ||
2401 | rq->timeout = 60 * HZ; | ||
2402 | |||
2403 | ret = blk_execute_rq(q, disk, rq, 0); | ||
2404 | |||
2405 | if (ret && error_sector) | ||
2406 | *error_sector = rq->sector; | ||
2407 | |||
2408 | blk_put_request(rq); | ||
2409 | return ret; | ||
2410 | } | ||
2411 | |||
2412 | EXPORT_SYMBOL(blkdev_scsi_issue_flush_fn); | ||
2413 | |||
2414 | static void drive_stat_acct(struct request *rq, int nr_sectors, int new_io) | 2376 | static void drive_stat_acct(struct request *rq, int nr_sectors, int new_io) |
2415 | { | 2377 | { |
2416 | int rw = rq_data_dir(rq); | 2378 | int rw = rq_data_dir(rq); |
diff --git a/drivers/message/i2o/config-osm.c b/drivers/message/i2o/config-osm.c index af32ab4e90cd..10432f665201 100644 --- a/drivers/message/i2o/config-osm.c +++ b/drivers/message/i2o/config-osm.c | |||
@@ -56,8 +56,11 @@ static int __init i2o_config_init(void) | |||
56 | return -EBUSY; | 56 | return -EBUSY; |
57 | } | 57 | } |
58 | #ifdef CONFIG_I2O_CONFIG_OLD_IOCTL | 58 | #ifdef CONFIG_I2O_CONFIG_OLD_IOCTL |
59 | if (i2o_config_old_init()) | 59 | if (i2o_config_old_init()) { |
60 | osm_err("old config handler initialization failed\n"); | ||
60 | i2o_driver_unregister(&i2o_config_driver); | 61 | i2o_driver_unregister(&i2o_config_driver); |
62 | return -EBUSY; | ||
63 | } | ||
61 | #endif | 64 | #endif |
62 | 65 | ||
63 | return 0; | 66 | return 0; |
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 51b1d15d9d5c..e2effe2dc9b2 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c | |||
@@ -300,9 +300,9 @@ static int fat_fill_inode(struct inode *inode, struct msdos_dir_entry *de) | |||
300 | inode->i_blksize = sbi->cluster_size; | 300 | inode->i_blksize = sbi->cluster_size; |
301 | inode->i_blocks = ((inode->i_size + (sbi->cluster_size - 1)) | 301 | inode->i_blocks = ((inode->i_size + (sbi->cluster_size - 1)) |
302 | & ~((loff_t)sbi->cluster_size - 1)) >> 9; | 302 | & ~((loff_t)sbi->cluster_size - 1)) >> 9; |
303 | inode->i_mtime.tv_sec = inode->i_atime.tv_sec = | 303 | inode->i_mtime.tv_sec = |
304 | date_dos2unix(le16_to_cpu(de->time), le16_to_cpu(de->date)); | 304 | date_dos2unix(le16_to_cpu(de->time), le16_to_cpu(de->date)); |
305 | inode->i_mtime.tv_nsec = inode->i_atime.tv_nsec = 0; | 305 | inode->i_mtime.tv_nsec = 0; |
306 | if (sbi->options.isvfat) { | 306 | if (sbi->options.isvfat) { |
307 | int secs = de->ctime_cs / 100; | 307 | int secs = de->ctime_cs / 100; |
308 | int csecs = de->ctime_cs % 100; | 308 | int csecs = de->ctime_cs % 100; |
@@ -310,8 +310,11 @@ static int fat_fill_inode(struct inode *inode, struct msdos_dir_entry *de) | |||
310 | date_dos2unix(le16_to_cpu(de->ctime), | 310 | date_dos2unix(le16_to_cpu(de->ctime), |
311 | le16_to_cpu(de->cdate)) + secs; | 311 | le16_to_cpu(de->cdate)) + secs; |
312 | inode->i_ctime.tv_nsec = csecs * 10000000; | 312 | inode->i_ctime.tv_nsec = csecs * 10000000; |
313 | inode->i_atime.tv_sec = | ||
314 | date_dos2unix(le16_to_cpu(0), le16_to_cpu(de->adate)); | ||
315 | inode->i_atime.tv_nsec = 0; | ||
313 | } else | 316 | } else |
314 | inode->i_ctime = inode->i_mtime; | 317 | inode->i_ctime = inode->i_atime = inode->i_mtime; |
315 | 318 | ||
316 | return 0; | 319 | return 0; |
317 | } | 320 | } |
@@ -513,7 +516,9 @@ retry: | |||
513 | raw_entry->starthi = cpu_to_le16(MSDOS_I(inode)->i_logstart >> 16); | 516 | raw_entry->starthi = cpu_to_le16(MSDOS_I(inode)->i_logstart >> 16); |
514 | fat_date_unix2dos(inode->i_mtime.tv_sec, &raw_entry->time, &raw_entry->date); | 517 | fat_date_unix2dos(inode->i_mtime.tv_sec, &raw_entry->time, &raw_entry->date); |
515 | if (sbi->options.isvfat) { | 518 | if (sbi->options.isvfat) { |
519 | __le16 atime; | ||
516 | fat_date_unix2dos(inode->i_ctime.tv_sec,&raw_entry->ctime,&raw_entry->cdate); | 520 | fat_date_unix2dos(inode->i_ctime.tv_sec,&raw_entry->ctime,&raw_entry->cdate); |
521 | fat_date_unix2dos(inode->i_atime.tv_sec,&atime,&raw_entry->adate); | ||
517 | raw_entry->ctime_cs = (inode->i_ctime.tv_sec & 1) * 100 + | 522 | raw_entry->ctime_cs = (inode->i_ctime.tv_sec & 1) * 100 + |
518 | inode->i_ctime.tv_nsec / 10000000; | 523 | inode->i_ctime.tv_nsec / 10000000; |
519 | } | 524 | } |
diff --git a/fs/proc/base.c b/fs/proc/base.c index 23db452ab428..fb34f88a4a74 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -340,6 +340,52 @@ static int proc_root_link(struct inode *inode, struct dentry **dentry, struct vf | |||
340 | return result; | 340 | return result; |
341 | } | 341 | } |
342 | 342 | ||
343 | |||
344 | /* Same as proc_root_link, but this addionally tries to get fs from other | ||
345 | * threads in the group */ | ||
346 | static int proc_task_root_link(struct inode *inode, struct dentry **dentry, struct vfsmount **mnt) | ||
347 | { | ||
348 | struct fs_struct *fs; | ||
349 | int result = -ENOENT; | ||
350 | struct task_struct *leader = proc_task(inode); | ||
351 | |||
352 | task_lock(leader); | ||
353 | fs = leader->fs; | ||
354 | if (fs) { | ||
355 | atomic_inc(&fs->count); | ||
356 | task_unlock(leader); | ||
357 | } else { | ||
358 | /* Try to get fs from other threads */ | ||
359 | task_unlock(leader); | ||
360 | struct task_struct *task = leader; | ||
361 | read_lock(&tasklist_lock); | ||
362 | if (pid_alive(task)) { | ||
363 | while ((task = next_thread(task)) != leader) { | ||
364 | task_lock(task); | ||
365 | fs = task->fs; | ||
366 | if (fs) { | ||
367 | atomic_inc(&fs->count); | ||
368 | task_unlock(task); | ||
369 | break; | ||
370 | } | ||
371 | task_unlock(task); | ||
372 | } | ||
373 | } | ||
374 | read_unlock(&tasklist_lock); | ||
375 | } | ||
376 | |||
377 | if (fs) { | ||
378 | read_lock(&fs->lock); | ||
379 | *mnt = mntget(fs->rootmnt); | ||
380 | *dentry = dget(fs->root); | ||
381 | read_unlock(&fs->lock); | ||
382 | result = 0; | ||
383 | put_fs_struct(fs); | ||
384 | } | ||
385 | return result; | ||
386 | } | ||
387 | |||
388 | |||
343 | #define MAY_PTRACE(task) \ | 389 | #define MAY_PTRACE(task) \ |
344 | (task == current || \ | 390 | (task == current || \ |
345 | (task->parent == current && \ | 391 | (task->parent == current && \ |
@@ -471,14 +517,14 @@ static int proc_oom_score(struct task_struct *task, char *buffer) | |||
471 | 517 | ||
472 | /* permission checks */ | 518 | /* permission checks */ |
473 | 519 | ||
474 | static int proc_check_root(struct inode *inode) | 520 | /* If the process being read is separated by chroot from the reading process, |
521 | * don't let the reader access the threads. | ||
522 | */ | ||
523 | static int proc_check_chroot(struct dentry *root, struct vfsmount *vfsmnt) | ||
475 | { | 524 | { |
476 | struct dentry *de, *base, *root; | 525 | struct dentry *de, *base; |
477 | struct vfsmount *our_vfsmnt, *vfsmnt, *mnt; | 526 | struct vfsmount *our_vfsmnt, *mnt; |
478 | int res = 0; | 527 | int res = 0; |
479 | |||
480 | if (proc_root_link(inode, &root, &vfsmnt)) /* Ewww... */ | ||
481 | return -ENOENT; | ||
482 | read_lock(¤t->fs->lock); | 528 | read_lock(¤t->fs->lock); |
483 | our_vfsmnt = mntget(current->fs->rootmnt); | 529 | our_vfsmnt = mntget(current->fs->rootmnt); |
484 | base = dget(current->fs->root); | 530 | base = dget(current->fs->root); |
@@ -511,6 +557,16 @@ out: | |||
511 | goto exit; | 557 | goto exit; |
512 | } | 558 | } |
513 | 559 | ||
560 | static int proc_check_root(struct inode *inode) | ||
561 | { | ||
562 | struct dentry *root; | ||
563 | struct vfsmount *vfsmnt; | ||
564 | |||
565 | if (proc_root_link(inode, &root, &vfsmnt)) /* Ewww... */ | ||
566 | return -ENOENT; | ||
567 | return proc_check_chroot(root, vfsmnt); | ||
568 | } | ||
569 | |||
514 | static int proc_permission(struct inode *inode, int mask, struct nameidata *nd) | 570 | static int proc_permission(struct inode *inode, int mask, struct nameidata *nd) |
515 | { | 571 | { |
516 | if (generic_permission(inode, mask, NULL) != 0) | 572 | if (generic_permission(inode, mask, NULL) != 0) |
@@ -518,6 +574,20 @@ static int proc_permission(struct inode *inode, int mask, struct nameidata *nd) | |||
518 | return proc_check_root(inode); | 574 | return proc_check_root(inode); |
519 | } | 575 | } |
520 | 576 | ||
577 | static int proc_task_permission(struct inode *inode, int mask, struct nameidata *nd) | ||
578 | { | ||
579 | struct dentry *root; | ||
580 | struct vfsmount *vfsmnt; | ||
581 | |||
582 | if (generic_permission(inode, mask, NULL) != 0) | ||
583 | return -EACCES; | ||
584 | |||
585 | if (proc_task_root_link(inode, &root, &vfsmnt)) | ||
586 | return -ENOENT; | ||
587 | |||
588 | return proc_check_chroot(root, vfsmnt); | ||
589 | } | ||
590 | |||
521 | extern struct seq_operations proc_pid_maps_op; | 591 | extern struct seq_operations proc_pid_maps_op; |
522 | static int maps_open(struct inode *inode, struct file *file) | 592 | static int maps_open(struct inode *inode, struct file *file) |
523 | { | 593 | { |
@@ -1419,7 +1489,7 @@ static struct inode_operations proc_fd_inode_operations = { | |||
1419 | 1489 | ||
1420 | static struct inode_operations proc_task_inode_operations = { | 1490 | static struct inode_operations proc_task_inode_operations = { |
1421 | .lookup = proc_task_lookup, | 1491 | .lookup = proc_task_lookup, |
1422 | .permission = proc_permission, | 1492 | .permission = proc_task_permission, |
1423 | }; | 1493 | }; |
1424 | 1494 | ||
1425 | #ifdef CONFIG_SECURITY | 1495 | #ifdef CONFIG_SECURITY |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 82d7024f0765..097b3a3c693d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -136,6 +136,7 @@ extern unsigned int kobjsize(const void *objp); | |||
136 | #define VM_EXEC 0x00000004 | 136 | #define VM_EXEC 0x00000004 |
137 | #define VM_SHARED 0x00000008 | 137 | #define VM_SHARED 0x00000008 |
138 | 138 | ||
139 | /* mprotect() hardcodes VM_MAYREAD >> 4 == VM_READ, and so for r/w/x bits. */ | ||
139 | #define VM_MAYREAD 0x00000010 /* limits for mprotect() etc */ | 140 | #define VM_MAYREAD 0x00000010 /* limits for mprotect() etc */ |
140 | #define VM_MAYWRITE 0x00000020 | 141 | #define VM_MAYWRITE 0x00000020 |
141 | #define VM_MAYEXEC 0x00000040 | 142 | #define VM_MAYEXEC 0x00000040 |
@@ -350,7 +351,8 @@ static inline void put_page(struct page *page) | |||
350 | * only one copy in memory, at most, normally. | 351 | * only one copy in memory, at most, normally. |
351 | * | 352 | * |
352 | * For the non-reserved pages, page_count(page) denotes a reference count. | 353 | * For the non-reserved pages, page_count(page) denotes a reference count. |
353 | * page_count() == 0 means the page is free. | 354 | * page_count() == 0 means the page is free. page->lru is then used for |
355 | * freelist management in the buddy allocator. | ||
354 | * page_count() == 1 means the page is used for exactly one purpose | 356 | * page_count() == 1 means the page is used for exactly one purpose |
355 | * (e.g. a private data page of one process). | 357 | * (e.g. a private data page of one process). |
356 | * | 358 | * |
@@ -376,10 +378,8 @@ static inline void put_page(struct page *page) | |||
376 | * attaches, plus 1 if `private' contains something, plus one for | 378 | * attaches, plus 1 if `private' contains something, plus one for |
377 | * the page cache itself. | 379 | * the page cache itself. |
378 | * | 380 | * |
379 | * All pages belonging to an inode are in these doubly linked lists: | 381 | * Instead of keeping dirty/clean pages in per address-space lists, we instead |
380 | * mapping->clean_pages, mapping->dirty_pages and mapping->locked_pages; | 382 | * now tag pages as dirty/under writeback in the radix tree. |
381 | * using the page->list list_head. These fields are also used for | ||
382 | * freelist managemet (when page_count()==0). | ||
383 | * | 383 | * |
384 | * There is also a per-mapping radix tree mapping index to the page | 384 | * There is also a per-mapping radix tree mapping index to the page |
385 | * in memory if present. The tree is rooted at mapping->root. | 385 | * in memory if present. The tree is rooted at mapping->root. |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 425f58c8ea4a..a6f03e473737 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -508,5 +508,7 @@ asmlinkage long sys_keyctl(int cmd, unsigned long arg2, unsigned long arg3, | |||
508 | 508 | ||
509 | asmlinkage long sys_ioprio_set(int which, int who, int ioprio); | 509 | asmlinkage long sys_ioprio_set(int which, int who, int ioprio); |
510 | asmlinkage long sys_ioprio_get(int which, int who); | 510 | asmlinkage long sys_ioprio_get(int which, int who); |
511 | asmlinkage long sys_set_mempolicy(int mode, unsigned long __user *nmask, | ||
512 | unsigned long maxnode); | ||
511 | 513 | ||
512 | #endif | 514 | #endif |
diff --git a/kernel/printk.c b/kernel/printk.c index a967605bc2e3..4b8f0f9230a4 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -488,6 +488,11 @@ static int __init printk_time_setup(char *str) | |||
488 | 488 | ||
489 | __setup("time", printk_time_setup); | 489 | __setup("time", printk_time_setup); |
490 | 490 | ||
491 | __attribute__((weak)) unsigned long long printk_clock(void) | ||
492 | { | ||
493 | return sched_clock(); | ||
494 | } | ||
495 | |||
491 | /* | 496 | /* |
492 | * This is printk. It can be called from any context. We want it to work. | 497 | * This is printk. It can be called from any context. We want it to work. |
493 | * | 498 | * |
@@ -565,7 +570,7 @@ asmlinkage int vprintk(const char *fmt, va_list args) | |||
565 | loglev_char = default_message_loglevel | 570 | loglev_char = default_message_loglevel |
566 | + '0'; | 571 | + '0'; |
567 | } | 572 | } |
568 | t = sched_clock(); | 573 | t = printk_clock(); |
569 | nanosec_rem = do_div(t, 1000000000); | 574 | nanosec_rem = do_div(t, 1000000000); |
570 | tlen = sprintf(tbuf, | 575 | tlen = sprintf(tbuf, |
571 | "<%c>[%5lu.%06lu] ", | 576 | "<%c>[%5lu.%06lu] ", |
@@ -1640,7 +1640,7 @@ static void unmap_vma_list(struct mm_struct *mm, struct vm_area_struct *vma) | |||
1640 | /* | 1640 | /* |
1641 | * Get rid of page table information in the indicated region. | 1641 | * Get rid of page table information in the indicated region. |
1642 | * | 1642 | * |
1643 | * Called with the page table lock held. | 1643 | * Called with the mm semaphore held. |
1644 | */ | 1644 | */ |
1645 | static void unmap_region(struct mm_struct *mm, | 1645 | static void unmap_region(struct mm_struct *mm, |
1646 | struct vm_area_struct *vma, struct vm_area_struct *prev, | 1646 | struct vm_area_struct *vma, struct vm_area_struct *prev, |
diff --git a/mm/mprotect.c b/mm/mprotect.c index e9fbd013ad9a..57577f63b305 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c | |||
@@ -248,7 +248,8 @@ sys_mprotect(unsigned long start, size_t len, unsigned long prot) | |||
248 | 248 | ||
249 | newflags = vm_flags | (vma->vm_flags & ~(VM_READ | VM_WRITE | VM_EXEC)); | 249 | newflags = vm_flags | (vma->vm_flags & ~(VM_READ | VM_WRITE | VM_EXEC)); |
250 | 250 | ||
251 | if ((newflags & ~(newflags >> 4)) & 0xf) { | 251 | /* newflags >> 4 shift VM_MAY% in place of VM_% */ |
252 | if ((newflags & ~(newflags >> 4)) & (VM_READ | VM_WRITE | VM_EXEC)) { | ||
252 | error = -EACCES; | 253 | error = -EACCES; |
253 | goto out; | 254 | goto out; |
254 | } | 255 | } |