nouveau_mem.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. /*
  2. * Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved.
  3. * Copyright 2005 Stephane Marchesin
  4. *
  5. * The Weather Channel (TM) funded Tungsten Graphics to develop the
  6. * initial release of the Radeon 8500 driver under the XFree86 license.
  7. * This notice must be preserved.
  8. *
  9. * Permission is hereby granted, free of charge, to any person obtaining a
  10. * copy of this software and associated documentation files (the "Software"),
  11. * to deal in the Software without restriction, including without limitation
  12. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  13. * and/or sell copies of the Software, and to permit persons to whom the
  14. * Software is furnished to do so, subject to the following conditions:
  15. *
  16. * The above copyright notice and this permission notice (including the next
  17. * paragraph) shall be included in all copies or substantial portions of the
  18. * Software.
  19. *
  20. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  21. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  22. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  23. * THE AUTHORS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  24. * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  25. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  26. * DEALINGS IN THE SOFTWARE.
  27. *
  28. * Authors:
  29. * Keith Whitwell <keith@tungstengraphics.com>
  30. */
  31. #include "drmP.h"
  32. #include "drm.h"
  33. #include "drm_sarea.h"
  34. #include "nouveau_drv.h"
  35. /*
  36. * NV10-NV40 tiling helpers
  37. */
  38. static void
  39. nv10_mem_set_region_tiling(struct drm_device *dev, int i, uint32_t addr,
  40. uint32_t size, uint32_t pitch)
  41. {
  42. struct drm_nouveau_private *dev_priv = dev->dev_private;
  43. struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo;
  44. struct nouveau_fb_engine *pfb = &dev_priv->engine.fb;
  45. struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph;
  46. struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i];
  47. tile->addr = addr;
  48. tile->size = size;
  49. tile->used = !!pitch;
  50. nouveau_fence_unref((void **)&tile->fence);
  51. if (!pfifo->cache_flush(dev))
  52. return;
  53. pfifo->reassign(dev, false);
  54. pfifo->cache_flush(dev);
  55. pfifo->cache_pull(dev, false);
  56. nouveau_wait_for_idle(dev);
  57. pgraph->set_region_tiling(dev, i, addr, size, pitch);
  58. pfb->set_region_tiling(dev, i, addr, size, pitch);
  59. pfifo->cache_pull(dev, true);
  60. pfifo->reassign(dev, true);
  61. }
  62. struct nouveau_tile_reg *
  63. nv10_mem_set_tiling(struct drm_device *dev, uint32_t addr, uint32_t size,
  64. uint32_t pitch)
  65. {
  66. struct drm_nouveau_private *dev_priv = dev->dev_private;
  67. struct nouveau_fb_engine *pfb = &dev_priv->engine.fb;
  68. struct nouveau_tile_reg *tile = dev_priv->tile.reg, *found = NULL;
  69. int i;
  70. spin_lock(&dev_priv->tile.lock);
  71. for (i = 0; i < pfb->num_tiles; i++) {
  72. if (tile[i].used)
  73. /* Tile region in use. */
  74. continue;
  75. if (tile[i].fence &&
  76. !nouveau_fence_signalled(tile[i].fence, NULL))
  77. /* Pending tile region. */
  78. continue;
  79. if (max(tile[i].addr, addr) <
  80. min(tile[i].addr + tile[i].size, addr + size))
  81. /* Kill an intersecting tile region. */
  82. nv10_mem_set_region_tiling(dev, i, 0, 0, 0);
  83. if (pitch && !found) {
  84. /* Free tile region. */
  85. nv10_mem_set_region_tiling(dev, i, addr, size, pitch);
  86. found = &tile[i];
  87. }
  88. }
  89. spin_unlock(&dev_priv->tile.lock);
  90. return found;
  91. }
  92. void
  93. nv10_mem_expire_tiling(struct drm_device *dev, struct nouveau_tile_reg *tile,
  94. struct nouveau_fence *fence)
  95. {
  96. if (fence) {
  97. /* Mark it as pending. */
  98. tile->fence = fence;
  99. nouveau_fence_ref(fence);
  100. }
  101. tile->used = false;
  102. }
  103. /*
  104. * NV50 VM helpers
  105. */
  106. int
  107. nv50_mem_vm_bind_linear(struct drm_device *dev, uint64_t virt, uint32_t size,
  108. uint32_t flags, uint64_t phys)
  109. {
  110. struct drm_nouveau_private *dev_priv = dev->dev_private;
  111. struct nouveau_gpuobj *pgt;
  112. unsigned block;
  113. int i;
  114. virt = ((virt - dev_priv->vm_vram_base) >> 16) << 1;
  115. size = (size >> 16) << 1;
  116. phys |= ((uint64_t)flags << 32);
  117. phys |= 1;
  118. if (dev_priv->vram_sys_base) {
  119. phys += dev_priv->vram_sys_base;
  120. phys |= 0x30;
  121. }
  122. while (size) {
  123. unsigned offset_h = upper_32_bits(phys);
  124. unsigned offset_l = lower_32_bits(phys);
  125. unsigned pte, end;
  126. for (i = 7; i >= 0; i--) {
  127. block = 1 << (i + 1);
  128. if (size >= block && !(virt & (block - 1)))
  129. break;
  130. }
  131. offset_l |= (i << 7);
  132. phys += block << 15;
  133. size -= block;
  134. while (block) {
  135. pgt = dev_priv->vm_vram_pt[virt >> 14];
  136. pte = virt & 0x3ffe;
  137. end = pte + block;
  138. if (end > 16384)
  139. end = 16384;
  140. block -= (end - pte);
  141. virt += (end - pte);
  142. while (pte < end) {
  143. nv_wo32(dev, pgt, pte++, offset_l);
  144. nv_wo32(dev, pgt, pte++, offset_h);
  145. }
  146. }
  147. }
  148. dev_priv->engine.instmem.flush(dev);
  149. nv_wr32(dev, 0x100c80, 0x00050001);
  150. if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) {
  151. NV_ERROR(dev, "timeout: (0x100c80 & 1) == 0 (2)\n");
  152. NV_ERROR(dev, "0x100c80 = 0x%08x\n", nv_rd32(dev, 0x100c80));
  153. return -EBUSY;
  154. }
  155. nv_wr32(dev, 0x100c80, 0x00000001);
  156. if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) {
  157. NV_ERROR(dev, "timeout: (0x100c80 & 1) == 0 (2)\n");
  158. NV_ERROR(dev, "0x100c80 = 0x%08x\n", nv_rd32(dev, 0x100c80));
  159. return -EBUSY;
  160. }
  161. nv_wr32(dev, 0x100c80, 0x00040001);
  162. if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) {
  163. NV_ERROR(dev, "timeout: (0x100c80 & 1) == 0 (2)\n");
  164. NV_ERROR(dev, "0x100c80 = 0x%08x\n", nv_rd32(dev, 0x100c80));
  165. return -EBUSY;
  166. }
  167. nv_wr32(dev, 0x100c80, 0x00060001);
  168. if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) {
  169. NV_ERROR(dev, "timeout: (0x100c80 & 1) == 0 (2)\n");
  170. NV_ERROR(dev, "0x100c80 = 0x%08x\n", nv_rd32(dev, 0x100c80));
  171. return -EBUSY;
  172. }
  173. return 0;
  174. }
  175. void
  176. nv50_mem_vm_unbind(struct drm_device *dev, uint64_t virt, uint32_t size)
  177. {
  178. struct drm_nouveau_private *dev_priv = dev->dev_private;
  179. struct nouveau_gpuobj *pgt;
  180. unsigned pages, pte, end;
  181. virt -= dev_priv->vm_vram_base;
  182. pages = (size >> 16) << 1;
  183. while (pages) {
  184. pgt = dev_priv->vm_vram_pt[virt >> 29];
  185. pte = (virt & 0x1ffe0000ULL) >> 15;
  186. end = pte + pages;
  187. if (end > 16384)
  188. end = 16384;
  189. pages -= (end - pte);
  190. virt += (end - pte) << 15;
  191. while (pte < end)
  192. nv_wo32(dev, pgt, pte++, 0);
  193. }
  194. dev_priv->engine.instmem.flush(dev);
  195. nv_wr32(dev, 0x100c80, 0x00050001);
  196. if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) {
  197. NV_ERROR(dev, "timeout: (0x100c80 & 1) == 0 (2)\n");
  198. NV_ERROR(dev, "0x100c80 = 0x%08x\n", nv_rd32(dev, 0x100c80));
  199. return;
  200. }
  201. nv_wr32(dev, 0x100c80, 0x00000001);
  202. if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) {
  203. NV_ERROR(dev, "timeout: (0x100c80 & 1) == 0 (2)\n");
  204. NV_ERROR(dev, "0x100c80 = 0x%08x\n", nv_rd32(dev, 0x100c80));
  205. return;
  206. }
  207. nv_wr32(dev, 0x100c80, 0x00040001);
  208. if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) {
  209. NV_ERROR(dev, "timeout: (0x100c80 & 1) == 0 (2)\n");
  210. NV_ERROR(dev, "0x100c80 = 0x%08x\n", nv_rd32(dev, 0x100c80));
  211. return;
  212. }
  213. nv_wr32(dev, 0x100c80, 0x00060001);
  214. if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) {
  215. NV_ERROR(dev, "timeout: (0x100c80 & 1) == 0 (2)\n");
  216. NV_ERROR(dev, "0x100c80 = 0x%08x\n", nv_rd32(dev, 0x100c80));
  217. }
  218. }
  219. /*
  220. * Cleanup everything
  221. */
  222. void
  223. nouveau_mem_close(struct drm_device *dev)
  224. {
  225. struct drm_nouveau_private *dev_priv = dev->dev_private;
  226. nouveau_bo_unpin(dev_priv->vga_ram);
  227. nouveau_bo_ref(NULL, &dev_priv->vga_ram);
  228. ttm_bo_device_release(&dev_priv->ttm.bdev);
  229. nouveau_ttm_global_release(dev_priv);
  230. if (drm_core_has_AGP(dev) && dev->agp) {
  231. struct drm_agp_mem *entry, *tempe;
  232. /* Remove AGP resources, but leave dev->agp
  233. intact until drv_cleanup is called. */
  234. list_for_each_entry_safe(entry, tempe, &dev->agp->memory, head) {
  235. if (entry->bound)
  236. drm_unbind_agp(entry->memory);
  237. drm_free_agp(entry->memory, entry->pages);
  238. kfree(entry);
  239. }
  240. INIT_LIST_HEAD(&dev->agp->memory);
  241. if (dev->agp->acquired)
  242. drm_agp_release(dev);
  243. dev->agp->acquired = 0;
  244. dev->agp->enabled = 0;
  245. }
  246. if (dev_priv->fb_mtrr) {
  247. drm_mtrr_del(dev_priv->fb_mtrr,
  248. pci_resource_start(dev->pdev, 1),
  249. pci_resource_len(dev->pdev, 1), DRM_MTRR_WC);
  250. dev_priv->fb_mtrr = 0;
  251. }
  252. }
  253. static uint32_t
  254. nouveau_mem_detect_nv04(struct drm_device *dev)
  255. {
  256. uint32_t boot0 = nv_rd32(dev, NV03_BOOT_0);
  257. if (boot0 & 0x00000100)
  258. return (((boot0 >> 12) & 0xf) * 2 + 2) * 1024 * 1024;
  259. switch (boot0 & NV03_BOOT_0_RAM_AMOUNT) {
  260. case NV04_BOOT_0_RAM_AMOUNT_32MB:
  261. return 32 * 1024 * 1024;
  262. case NV04_BOOT_0_RAM_AMOUNT_16MB:
  263. return 16 * 1024 * 1024;
  264. case NV04_BOOT_0_RAM_AMOUNT_8MB:
  265. return 8 * 1024 * 1024;
  266. case NV04_BOOT_0_RAM_AMOUNT_4MB:
  267. return 4 * 1024 * 1024;
  268. }
  269. return 0;
  270. }
  271. static uint32_t
  272. nouveau_mem_detect_nforce(struct drm_device *dev)
  273. {
  274. struct drm_nouveau_private *dev_priv = dev->dev_private;
  275. struct pci_dev *bridge;
  276. uint32_t mem;
  277. bridge = pci_get_bus_and_slot(0, PCI_DEVFN(0, 1));
  278. if (!bridge) {
  279. NV_ERROR(dev, "no bridge device\n");
  280. return 0;
  281. }
  282. if (dev_priv->flags & NV_NFORCE) {
  283. pci_read_config_dword(bridge, 0x7C, &mem);
  284. return (uint64_t)(((mem >> 6) & 31) + 1)*1024*1024;
  285. } else
  286. if (dev_priv->flags & NV_NFORCE2) {
  287. pci_read_config_dword(bridge, 0x84, &mem);
  288. return (uint64_t)(((mem >> 4) & 127) + 1)*1024*1024;
  289. }
  290. NV_ERROR(dev, "impossible!\n");
  291. return 0;
  292. }
  293. /* returns the amount of FB ram in bytes */
  294. int
  295. nouveau_mem_detect(struct drm_device *dev)
  296. {
  297. struct drm_nouveau_private *dev_priv = dev->dev_private;
  298. if (dev_priv->card_type == NV_04) {
  299. dev_priv->vram_size = nouveau_mem_detect_nv04(dev);
  300. } else
  301. if (dev_priv->flags & (NV_NFORCE | NV_NFORCE2)) {
  302. dev_priv->vram_size = nouveau_mem_detect_nforce(dev);
  303. } else
  304. if (dev_priv->card_type < NV_50) {
  305. dev_priv->vram_size = nv_rd32(dev, NV04_FIFO_DATA);
  306. dev_priv->vram_size &= NV10_FIFO_DATA_RAM_AMOUNT_MB_MASK;
  307. } else {
  308. dev_priv->vram_size = nv_rd32(dev, NV04_FIFO_DATA);
  309. dev_priv->vram_size |= (dev_priv->vram_size & 0xff) << 32;
  310. dev_priv->vram_size &= 0xffffffff00ll;
  311. if (dev_priv->chipset == 0xaa || dev_priv->chipset == 0xac) {
  312. dev_priv->vram_sys_base = nv_rd32(dev, 0x100e10);
  313. dev_priv->vram_sys_base <<= 12;
  314. }
  315. }
  316. NV_INFO(dev, "Detected %dMiB VRAM\n", (int)(dev_priv->vram_size >> 20));
  317. if (dev_priv->vram_sys_base) {
  318. NV_INFO(dev, "Stolen system memory at: 0x%010llx\n",
  319. dev_priv->vram_sys_base);
  320. }
  321. if (dev_priv->vram_size)
  322. return 0;
  323. return -ENOMEM;
  324. }
  325. #if __OS_HAS_AGP
  326. static void nouveau_mem_reset_agp(struct drm_device *dev)
  327. {
  328. uint32_t saved_pci_nv_1, saved_pci_nv_19, pmc_enable;
  329. saved_pci_nv_1 = nv_rd32(dev, NV04_PBUS_PCI_NV_1);
  330. saved_pci_nv_19 = nv_rd32(dev, NV04_PBUS_PCI_NV_19);
  331. /* clear busmaster bit */
  332. nv_wr32(dev, NV04_PBUS_PCI_NV_1, saved_pci_nv_1 & ~0x4);
  333. /* clear SBA and AGP bits */
  334. nv_wr32(dev, NV04_PBUS_PCI_NV_19, saved_pci_nv_19 & 0xfffff0ff);
  335. /* power cycle pgraph, if enabled */
  336. pmc_enable = nv_rd32(dev, NV03_PMC_ENABLE);
  337. if (pmc_enable & NV_PMC_ENABLE_PGRAPH) {
  338. nv_wr32(dev, NV03_PMC_ENABLE,
  339. pmc_enable & ~NV_PMC_ENABLE_PGRAPH);
  340. nv_wr32(dev, NV03_PMC_ENABLE, nv_rd32(dev, NV03_PMC_ENABLE) |
  341. NV_PMC_ENABLE_PGRAPH);
  342. }
  343. /* and restore (gives effect of resetting AGP) */
  344. nv_wr32(dev, NV04_PBUS_PCI_NV_19, saved_pci_nv_19);
  345. nv_wr32(dev, NV04_PBUS_PCI_NV_1, saved_pci_nv_1);
  346. }
  347. #endif
  348. int
  349. nouveau_mem_init_agp(struct drm_device *dev)
  350. {
  351. #if __OS_HAS_AGP
  352. struct drm_nouveau_private *dev_priv = dev->dev_private;
  353. struct drm_agp_info info;
  354. struct drm_agp_mode mode;
  355. int ret;
  356. if (nouveau_noagp)
  357. return 0;
  358. nouveau_mem_reset_agp(dev);
  359. if (!dev->agp->acquired) {
  360. ret = drm_agp_acquire(dev);
  361. if (ret) {
  362. NV_ERROR(dev, "Unable to acquire AGP: %d\n", ret);
  363. return ret;
  364. }
  365. }
  366. ret = drm_agp_info(dev, &info);
  367. if (ret) {
  368. NV_ERROR(dev, "Unable to get AGP info: %d\n", ret);
  369. return ret;
  370. }
  371. /* see agp.h for the AGPSTAT_* modes available */
  372. mode.mode = info.mode;
  373. ret = drm_agp_enable(dev, mode);
  374. if (ret) {
  375. NV_ERROR(dev, "Unable to enable AGP: %d\n", ret);
  376. return ret;
  377. }
  378. dev_priv->gart_info.type = NOUVEAU_GART_AGP;
  379. dev_priv->gart_info.aper_base = info.aperture_base;
  380. dev_priv->gart_info.aper_size = info.aperture_size;
  381. #endif
  382. return 0;
  383. }
  384. int
  385. nouveau_mem_init(struct drm_device *dev)
  386. {
  387. struct drm_nouveau_private *dev_priv = dev->dev_private;
  388. struct ttm_bo_device *bdev = &dev_priv->ttm.bdev;
  389. int ret, dma_bits = 32;
  390. dev_priv->fb_phys = pci_resource_start(dev->pdev, 1);
  391. dev_priv->gart_info.type = NOUVEAU_GART_NONE;
  392. if (dev_priv->card_type >= NV_50 &&
  393. pci_dma_supported(dev->pdev, DMA_BIT_MASK(40)))
  394. dma_bits = 40;
  395. ret = pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(dma_bits));
  396. if (ret) {
  397. NV_ERROR(dev, "Error setting DMA mask: %d\n", ret);
  398. return ret;
  399. }
  400. ret = nouveau_ttm_global_init(dev_priv);
  401. if (ret)
  402. return ret;
  403. ret = ttm_bo_device_init(&dev_priv->ttm.bdev,
  404. dev_priv->ttm.bo_global_ref.ref.object,
  405. &nouveau_bo_driver, DRM_FILE_PAGE_OFFSET,
  406. dma_bits <= 32 ? true : false);
  407. if (ret) {
  408. NV_ERROR(dev, "Error initialising bo driver: %d\n", ret);
  409. return ret;
  410. }
  411. INIT_LIST_HEAD(&dev_priv->ttm.bo_list);
  412. spin_lock_init(&dev_priv->ttm.bo_list_lock);
  413. spin_lock_init(&dev_priv->tile.lock);
  414. dev_priv->fb_available_size = dev_priv->vram_size;
  415. dev_priv->fb_mappable_pages = dev_priv->fb_available_size;
  416. if (dev_priv->fb_mappable_pages > pci_resource_len(dev->pdev, 1))
  417. dev_priv->fb_mappable_pages =
  418. pci_resource_len(dev->pdev, 1);
  419. dev_priv->fb_mappable_pages >>= PAGE_SHIFT;
  420. /* remove reserved space at end of vram from available amount */
  421. dev_priv->fb_available_size -= dev_priv->ramin_rsvd_vram;
  422. dev_priv->fb_aper_free = dev_priv->fb_available_size;
  423. /* mappable vram */
  424. ret = ttm_bo_init_mm(bdev, TTM_PL_VRAM,
  425. dev_priv->fb_available_size >> PAGE_SHIFT);
  426. if (ret) {
  427. NV_ERROR(dev, "Failed VRAM mm init: %d\n", ret);
  428. return ret;
  429. }
  430. ret = nouveau_bo_new(dev, NULL, 256*1024, 0, TTM_PL_FLAG_VRAM,
  431. 0, 0, true, true, &dev_priv->vga_ram);
  432. if (ret == 0)
  433. ret = nouveau_bo_pin(dev_priv->vga_ram, TTM_PL_FLAG_VRAM);
  434. if (ret) {
  435. NV_WARN(dev, "failed to reserve VGA memory\n");
  436. nouveau_bo_ref(NULL, &dev_priv->vga_ram);
  437. }
  438. /* GART */
  439. #if !defined(__powerpc__) && !defined(__ia64__)
  440. if (drm_device_is_agp(dev) && dev->agp) {
  441. ret = nouveau_mem_init_agp(dev);
  442. if (ret)
  443. NV_ERROR(dev, "Error initialising AGP: %d\n", ret);
  444. }
  445. #endif
  446. if (dev_priv->gart_info.type == NOUVEAU_GART_NONE) {
  447. ret = nouveau_sgdma_init(dev);
  448. if (ret) {
  449. NV_ERROR(dev, "Error initialising PCI(E): %d\n", ret);
  450. return ret;
  451. }
  452. }
  453. NV_INFO(dev, "%d MiB GART (aperture)\n",
  454. (int)(dev_priv->gart_info.aper_size >> 20));
  455. dev_priv->gart_info.aper_free = dev_priv->gart_info.aper_size;
  456. ret = ttm_bo_init_mm(bdev, TTM_PL_TT,
  457. dev_priv->gart_info.aper_size >> PAGE_SHIFT);
  458. if (ret) {
  459. NV_ERROR(dev, "Failed TT mm init: %d\n", ret);
  460. return ret;
  461. }
  462. dev_priv->fb_mtrr = drm_mtrr_add(pci_resource_start(dev->pdev, 1),
  463. pci_resource_len(dev->pdev, 1),
  464. DRM_MTRR_WC);
  465. return 0;
  466. }